idx int64 0 251k | question stringlengths 53 3.53k | target stringlengths 5 1.23k | len_question int64 20 893 | len_target int64 3 238 |
|---|---|---|---|---|
244,700 | def _is_ready ( self , unit_data ) : return set ( unit_data . keys ( ) ) . issuperset ( set ( self . required_keys ) ) | Helper method that tests a set of relation data and returns True if all of the required_keys are present . | 39 | 22 |
244,701 | def service_restart ( service_name ) : if host . service_available ( service_name ) : if host . service_running ( service_name ) : host . service_restart ( service_name ) else : host . service_start ( service_name ) | Wrapper around host . service_restart to prevent spurious unknown service messages in the logs . | 58 | 19 |
244,702 | def manage ( self ) : hookenv . _run_atstart ( ) try : hook_name = hookenv . hook_name ( ) if hook_name == 'stop' : self . stop_services ( ) else : self . reconfigure_services ( ) self . provide_data ( ) except SystemExit as x : if x . code is None or x . code == 0 : hookenv . _run_atexit ( ) hookenv . _run_atexit ( ) | Handle the current hook by doing The Right Thing with the registered services . | 102 | 14 |
244,703 | def provide_data ( self ) : for service_name , service in self . services . items ( ) : service_ready = self . is_ready ( service_name ) for provider in service . get ( 'provided_data' , [ ] ) : for relid in hookenv . relation_ids ( provider . name ) : units = hookenv . related_units ( relid ) if not units : continue remote_service = units [ 0 ] . split ( '/' ) [ 0 ] argspec = getargspec ( provider . provide_data ) if len ( argspec . args ) > 1 : data = provider . provide_data ( remote_service , service_ready ) else : data = provider . provide_data ( ) if data : hookenv . relation_set ( relid , data ) | Set the relation data for each provider in the provided_data list . | 170 | 14 |
244,704 | def reconfigure_services ( self , * service_names ) : for service_name in service_names or self . services . keys ( ) : if self . is_ready ( service_name ) : self . fire_event ( 'data_ready' , service_name ) self . fire_event ( 'start' , service_name , default = [ service_restart , manage_ports ] ) self . save_ready ( service_name ) else : if self . was_ready ( service_name ) : self . fire_event ( 'data_lost' , service_name ) self . fire_event ( 'stop' , service_name , default = [ manage_ports , service_stop ] ) self . save_lost ( service_name ) | Update all files for one or more registered services and if ready optionally restart them . | 162 | 16 |
244,705 | def stop_services ( self , * service_names ) : for service_name in service_names or self . services . keys ( ) : self . fire_event ( 'stop' , service_name , default = [ manage_ports , service_stop ] ) | Stop one or more registered services by name . | 56 | 9 |
244,706 | def get_service ( self , service_name ) : service = self . services . get ( service_name ) if not service : raise KeyError ( 'Service not registered: %s' % service_name ) return service | Given the name of a registered service return its service definition . | 47 | 12 |
244,707 | def fire_event ( self , event_name , service_name , default = None ) : service = self . get_service ( service_name ) callbacks = service . get ( event_name , default ) if not callbacks : return if not isinstance ( callbacks , Iterable ) : callbacks = [ callbacks ] for callback in callbacks : if isinstance ( callback , ManagerCallback ) : callback ( self , service_name , event_name ) else : callback ( service_name ) | Fire a data_ready data_lost start or stop event on a given service . | 106 | 17 |
244,708 | def is_ready ( self , service_name ) : service = self . get_service ( service_name ) reqs = service . get ( 'required_data' , [ ] ) return all ( bool ( req ) for req in reqs ) | Determine if a registered service is ready by checking its required_data . | 53 | 16 |
244,709 | def save_ready ( self , service_name ) : self . _load_ready_file ( ) self . _ready . add ( service_name ) self . _save_ready_file ( ) | Save an indicator that the given service is now data_ready . | 43 | 13 |
244,710 | def save_lost ( self , service_name ) : self . _load_ready_file ( ) self . _ready . discard ( service_name ) self . _save_ready_file ( ) | Save an indicator that the given service is no longer data_ready . | 43 | 14 |
244,711 | def is_enabled ( ) : output = subprocess . check_output ( [ 'ufw' , 'status' ] , universal_newlines = True , env = { 'LANG' : 'en_US' , 'PATH' : os . environ [ 'PATH' ] } ) m = re . findall ( r'^Status: active\n' , output , re . M ) return len ( m ) >= 1 | Check if ufw is enabled | 93 | 6 |
244,712 | def is_ipv6_ok ( soft_fail = False ) : # do we have IPv6 in the machine? if os . path . isdir ( '/proc/sys/net/ipv6' ) : # is ip6tables kernel module loaded? if not is_module_loaded ( 'ip6_tables' ) : # ip6tables support isn't complete, let's try to load it try : modprobe ( 'ip6_tables' ) # great, we can load the module return True except subprocess . CalledProcessError as ex : hookenv . log ( "Couldn't load ip6_tables module: %s" % ex . output , level = "WARN" ) # we are in a world where ip6tables isn't working if soft_fail : # so we inform that the machine doesn't have IPv6 return False else : raise UFWIPv6Error ( "IPv6 firewall support broken" ) else : # the module is present :) return True else : # the system doesn't have IPv6 return False | Check if IPv6 support is present and ip6tables functional | 229 | 13 |
244,713 | def default_policy ( policy = 'deny' , direction = 'incoming' ) : if policy not in [ 'allow' , 'deny' , 'reject' ] : raise UFWError ( ( 'Unknown policy %s, valid values: ' 'allow, deny, reject' ) % policy ) if direction not in [ 'incoming' , 'outgoing' , 'routed' ] : raise UFWError ( ( 'Unknown direction %s, valid values: ' 'incoming, outgoing, routed' ) % direction ) output = subprocess . check_output ( [ 'ufw' , 'default' , policy , direction ] , universal_newlines = True , env = { 'LANG' : 'en_US' , 'PATH' : os . environ [ 'PATH' ] } ) hookenv . log ( output , level = 'DEBUG' ) m = re . findall ( "^Default %s policy changed to '%s'\n" % ( direction , policy ) , output , re . M ) if len ( m ) == 0 : hookenv . log ( "ufw couldn't change the default policy to %s for %s" % ( policy , direction ) , level = 'WARN' ) return False else : hookenv . log ( "ufw default policy for %s changed to %s" % ( direction , policy ) , level = 'INFO' ) return True | Changes the default policy for traffic direction | 307 | 7 |
244,714 | def revoke_access ( src , dst = 'any' , port = None , proto = None ) : return modify_access ( src , dst = dst , port = port , proto = proto , action = 'delete' ) | Revoke access to an address or subnet | 47 | 9 |
244,715 | def rmmod ( module , force = False ) : cmd = [ 'rmmod' ] if force : cmd . append ( '-f' ) cmd . append ( module ) log ( 'Removing kernel module %s' % module , level = INFO ) return subprocess . check_call ( cmd ) | Remove a module from the linux kernel | 66 | 7 |
244,716 | def is_module_loaded ( module ) : matches = re . findall ( '^%s[ ]+' % module , lsmod ( ) , re . M ) return len ( matches ) > 0 | Checks if a kernel module is already loaded | 44 | 9 |
244,717 | def get_config ( ) : volume_config = { } config = hookenv . config ( ) errors = False if config . get ( 'volume-ephemeral' ) in ( True , 'True' , 'true' , 'Yes' , 'yes' ) : volume_config [ 'ephemeral' ] = True else : volume_config [ 'ephemeral' ] = False try : volume_map = yaml . safe_load ( config . get ( 'volume-map' , '{}' ) ) except yaml . YAMLError as e : hookenv . log ( "Error parsing YAML volume-map: {}" . format ( e ) , hookenv . ERROR ) errors = True if volume_map is None : # probably an empty string volume_map = { } elif not isinstance ( volume_map , dict ) : hookenv . log ( "Volume-map should be a dictionary, not {}" . format ( type ( volume_map ) ) ) errors = True volume_config [ 'device' ] = volume_map . get ( os . environ [ 'JUJU_UNIT_NAME' ] ) if volume_config [ 'device' ] and volume_config [ 'ephemeral' ] : # asked for ephemeral storage but also defined a volume ID hookenv . log ( 'A volume is defined for this unit, but ephemeral ' 'storage was requested' , hookenv . ERROR ) errors = True elif not volume_config [ 'device' ] and not volume_config [ 'ephemeral' ] : # asked for permanent storage but did not define volume ID hookenv . log ( 'Ephemeral storage was requested, but there is no volume ' 'defined for this unit.' , hookenv . ERROR ) errors = True unit_mount_name = hookenv . local_unit ( ) . replace ( '/' , '-' ) volume_config [ 'mountpoint' ] = os . path . join ( MOUNT_BASE , unit_mount_name ) if errors : return None return volume_config | Gather and sanity - check volume configuration data | 447 | 9 |
244,718 | def get_audits ( ) : audits = [ ] settings = utils . get_settings ( 'os' ) # Ensure that the /etc/security/limits.d directory is only writable # by the root user, but others can execute and read. audits . append ( DirectoryPermissionAudit ( '/etc/security/limits.d' , user = 'root' , group = 'root' , mode = 0o755 ) ) # If core dumps are not enabled, then don't allow core dumps to be # created as they may contain sensitive information. if not settings [ 'security' ] [ 'kernel_enable_core_dump' ] : audits . append ( TemplatedFile ( '/etc/security/limits.d/10.hardcore.conf' , SecurityLimitsContext ( ) , template_dir = TEMPLATES_DIR , user = 'root' , group = 'root' , mode = 0o0440 ) ) return audits | Get OS hardening security limits audits . | 204 | 8 |
244,719 | def _take_action ( self ) : # Do the action if there isn't an unless override. if self . unless is None : return True # Invoke the callback if there is one. if hasattr ( self . unless , '__call__' ) : return not self . unless ( ) return not self . unless | Determines whether to perform the action or not . | 67 | 11 |
244,720 | def install_alternative ( name , target , source , priority = 50 ) : if ( os . path . exists ( target ) and not os . path . islink ( target ) ) : # Move existing file/directory away before installing shutil . move ( target , '{}.bak' . format ( target ) ) cmd = [ 'update-alternatives' , '--force' , '--install' , target , name , source , str ( priority ) ] subprocess . check_call ( cmd ) | Install alternative configuration | 108 | 3 |
244,721 | def ensure_packages ( packages ) : required = filter_installed_packages ( packages ) if required : apt_install ( required , fatal = True ) | Install but do not upgrade required plugin packages . | 31 | 9 |
244,722 | def _calculate_workers ( ) : multiplier = config ( 'worker-multiplier' ) or DEFAULT_MULTIPLIER count = int ( _num_cpus ( ) * multiplier ) if multiplier > 0 and count == 0 : count = 1 if config ( 'worker-multiplier' ) is None and is_container ( ) : # NOTE(jamespage): Limit unconfigured worker-multiplier # to MAX_DEFAULT_WORKERS to avoid insane # worker configuration in LXD containers # on large servers # Reference: https://pad.lv/1665270 count = min ( count , MAX_DEFAULT_WORKERS ) return count | Determine the number of worker processes based on the CPU count of the unit containing the application . | 141 | 20 |
244,723 | def get_related ( self ) : # Fresh start self . related = False try : for interface in self . interfaces : if relation_ids ( interface ) : self . related = True return self . related except AttributeError as e : log ( "{} {}" "" . format ( self , e ) , 'INFO' ) return self . related | Check if any of the context interfaces have relation ids . Set self . related and return True if one of the interfaces has relation ids . | 72 | 29 |
244,724 | def canonical_names ( self ) : cns = [ ] for r_id in relation_ids ( 'identity-service' ) : for unit in related_units ( r_id ) : rdata = relation_get ( rid = r_id , unit = unit ) for k in rdata : if k . startswith ( 'ssl_key_' ) : cns . append ( k . lstrip ( 'ssl_key_' ) ) return sorted ( list ( set ( cns ) ) ) | Figure out which canonical names clients will access this service . | 110 | 11 |
244,725 | def _determine_ctxt ( self ) : rel = os_release ( self . pkg , base = 'icehouse' ) version = '2' if CompareOpenStackReleases ( rel ) >= 'pike' : version = '3' service_type = 'volumev{version}' . format ( version = version ) service_name = 'cinderv{version}' . format ( version = version ) endpoint_type = 'publicURL' if config ( 'use-internal-endpoints' ) : endpoint_type = 'internalURL' catalog_info = '{type}:{name}:{endpoint}' . format ( type = service_type , name = service_name , endpoint = endpoint_type ) return { 'volume_api_version' : version , 'volume_catalog_info' : catalog_info , } | Determines the Volume API endpoint information . | 185 | 9 |
244,726 | def _determine_ctxt ( self ) : if config ( 'aa-profile-mode' ) in [ 'disable' , 'enforce' , 'complain' ] : ctxt = { 'aa_profile_mode' : config ( 'aa-profile-mode' ) , 'ubuntu_release' : lsb_release ( ) [ 'DISTRIB_RELEASE' ] } if self . aa_profile : ctxt [ 'aa_profile' ] = self . aa_profile else : ctxt = None return ctxt | Validate aa - profile - mode settings is disable enforce or complain . | 119 | 15 |
244,727 | def manually_disable_aa_profile ( self ) : profile_path = '/etc/apparmor.d' disable_path = '/etc/apparmor.d/disable' if not os . path . lexists ( os . path . join ( disable_path , self . aa_profile ) ) : os . symlink ( os . path . join ( profile_path , self . aa_profile ) , os . path . join ( disable_path , self . aa_profile ) ) | Manually disable an apparmor profile . | 108 | 8 |
244,728 | def setup_aa_profile ( self ) : self ( ) if not self . ctxt : log ( "Not enabling apparmor Profile" ) return self . install_aa_utils ( ) cmd = [ 'aa-{}' . format ( self . ctxt [ 'aa_profile_mode' ] ) ] cmd . append ( self . ctxt [ 'aa_profile' ] ) log ( "Setting up the apparmor profile for {} in {} mode." "" . format ( self . ctxt [ 'aa_profile' ] , self . ctxt [ 'aa_profile_mode' ] ) ) try : check_call ( cmd ) except CalledProcessError as e : # If aa-profile-mode is set to disabled (default) manual # disabling is required as the template has been written but # apparmor is yet unaware of the profile and aa-disable aa-profile # fails. If aa-disable learns to read profile files first this can # be removed. if self . ctxt [ 'aa_profile_mode' ] == 'disable' : log ( "Manually disabling the apparmor profile for {}." "" . format ( self . ctxt [ 'aa_profile' ] ) ) self . manually_disable_aa_profile ( ) return status_set ( 'blocked' , "Apparmor profile {} failed to be set to {}." "" . format ( self . ctxt [ 'aa_profile' ] , self . ctxt [ 'aa_profile_mode' ] ) ) raise e | Setup an apparmor profile . The ctxt dictionary will contain the apparmor profile mode and the apparmor profile name . Makes calls out to aa - disable aa - complain or aa - enforce to setup the apparmor profile . | 324 | 48 |
244,729 | def execd_module_paths ( execd_dir = None ) : if not execd_dir : execd_dir = default_execd_dir ( ) if not os . path . exists ( execd_dir ) : return for subpath in os . listdir ( execd_dir ) : module = os . path . join ( execd_dir , subpath ) if os . path . isdir ( module ) : yield module | Generate a list of full paths to modules within execd_dir . | 96 | 15 |
244,730 | def execd_submodule_paths ( command , execd_dir = None ) : for module_path in execd_module_paths ( execd_dir ) : path = os . path . join ( module_path , command ) if os . access ( path , os . X_OK ) and os . path . isfile ( path ) : yield path | Generate a list of full paths to the specified command within exec_dir . | 79 | 16 |
244,731 | def execd_run ( command , execd_dir = None , die_on_error = True , stderr = subprocess . STDOUT ) : for submodule_path in execd_submodule_paths ( command , execd_dir ) : try : subprocess . check_output ( submodule_path , stderr = stderr , universal_newlines = True ) except subprocess . CalledProcessError as e : hookenv . log ( "Error ({}) running {}. Output: {}" . format ( e . returncode , e . cmd , e . output ) ) if die_on_error : sys . exit ( e . returncode ) | Run command for each module within execd_dir which defines it . | 145 | 14 |
244,732 | def getrange ( self , key_prefix , strip = False ) : self . cursor . execute ( "select key, data from kv where key like ?" , [ '%s%%' % key_prefix ] ) result = self . cursor . fetchall ( ) if not result : return { } if not strip : key_prefix = '' return dict ( [ ( k [ len ( key_prefix ) : ] , json . loads ( v ) ) for k , v in result ] ) | Get a range of keys starting with a common prefix as a mapping of keys to values . | 104 | 18 |
244,733 | def update ( self , mapping , prefix = "" ) : for k , v in mapping . items ( ) : self . set ( "%s%s" % ( prefix , k ) , v ) | Set the values of multiple keys at once . | 41 | 9 |
244,734 | def unset ( self , key ) : self . cursor . execute ( 'delete from kv where key=?' , [ key ] ) if self . revision and self . cursor . rowcount : self . cursor . execute ( 'insert into kv_revisions values (?, ?, ?)' , [ key , self . revision , json . dumps ( 'DELETED' ) ] ) | Remove a key from the database entirely . | 81 | 8 |
244,735 | def unsetrange ( self , keys = None , prefix = "" ) : if keys is not None : keys = [ '%s%s' % ( prefix , key ) for key in keys ] self . cursor . execute ( 'delete from kv where key in (%s)' % ',' . join ( [ '?' ] * len ( keys ) ) , keys ) if self . revision and self . cursor . rowcount : self . cursor . execute ( 'insert into kv_revisions values %s' % ',' . join ( [ '(?, ?, ?)' ] * len ( keys ) ) , list ( itertools . chain . from_iterable ( ( key , self . revision , json . dumps ( 'DELETED' ) ) for key in keys ) ) ) else : self . cursor . execute ( 'delete from kv where key like ?' , [ '%s%%' % prefix ] ) if self . revision and self . cursor . rowcount : self . cursor . execute ( 'insert into kv_revisions values (?, ?, ?)' , [ '%s%%' % prefix , self . revision , json . dumps ( 'DELETED' ) ] ) | Remove a range of keys starting with a common prefix from the database entirely . | 254 | 15 |
244,736 | def delta ( self , mapping , prefix ) : previous = self . getrange ( prefix , strip = True ) if not previous : pk = set ( ) else : pk = set ( previous . keys ( ) ) ck = set ( mapping . keys ( ) ) delta = DeltaSet ( ) # added for k in ck . difference ( pk ) : delta [ k ] = Delta ( None , mapping [ k ] ) # removed for k in pk . difference ( ck ) : delta [ k ] = Delta ( previous [ k ] , None ) # changed for k in pk . intersection ( ck ) : c = mapping [ k ] p = previous [ k ] if c != p : delta [ k ] = Delta ( p , c ) return delta | return a delta containing values that have changed . | 163 | 9 |
244,737 | def hook_scope ( self , name = "" ) : assert not self . revision self . cursor . execute ( 'insert into hooks (hook, date) values (?, ?)' , ( name or sys . argv [ 0 ] , datetime . datetime . utcnow ( ) . isoformat ( ) ) ) self . revision = self . cursor . lastrowid try : yield self . revision self . revision = None except Exception : self . flush ( False ) self . revision = None raise else : self . flush ( ) | Scope all future interactions to the current hook execution revision . | 110 | 11 |
244,738 | def add_bridge ( name , datapath_type = None ) : log ( 'Creating bridge {}' . format ( name ) ) cmd = [ "ovs-vsctl" , "--" , "--may-exist" , "add-br" , name ] if datapath_type is not None : cmd += [ '--' , 'set' , 'bridge' , name , 'datapath_type={}' . format ( datapath_type ) ] subprocess . check_call ( cmd ) | Add the named bridge to openvswitch | 114 | 8 |
244,739 | def add_bridge_port ( name , port , promisc = False ) : log ( 'Adding port {} to bridge {}' . format ( port , name ) ) subprocess . check_call ( [ "ovs-vsctl" , "--" , "--may-exist" , "add-port" , name , port ] ) subprocess . check_call ( [ "ip" , "link" , "set" , port , "up" ] ) if promisc : subprocess . check_call ( [ "ip" , "link" , "set" , port , "promisc" , "on" ] ) else : subprocess . check_call ( [ "ip" , "link" , "set" , port , "promisc" , "off" ] ) | Add a port to the named openvswitch bridge | 170 | 10 |
244,740 | def del_bridge_port ( name , port ) : log ( 'Deleting port {} from bridge {}' . format ( port , name ) ) subprocess . check_call ( [ "ovs-vsctl" , "--" , "--if-exists" , "del-port" , name , port ] ) subprocess . check_call ( [ "ip" , "link" , "set" , port , "down" ] ) subprocess . check_call ( [ "ip" , "link" , "set" , port , "promisc" , "off" ] ) | Delete a port from the named openvswitch bridge | 130 | 10 |
244,741 | def get_certificate ( ) : if os . path . exists ( CERT_PATH ) : log ( 'Reading ovs certificate from {}' . format ( CERT_PATH ) ) with open ( CERT_PATH , 'r' ) as cert : full_cert = cert . read ( ) begin_marker = "-----BEGIN CERTIFICATE-----" end_marker = "-----END CERTIFICATE-----" begin_index = full_cert . find ( begin_marker ) end_index = full_cert . rfind ( end_marker ) if end_index == - 1 or begin_index == - 1 : raise RuntimeError ( "Certificate does not contain valid begin" " and end markers." ) full_cert = full_cert [ begin_index : ( end_index + len ( end_marker ) ) ] return full_cert else : log ( 'Certificate not found' , level = WARNING ) return None | Read openvswitch certificate from disk | 205 | 7 |
244,742 | def check_for_eni_source ( ) : with open ( '/etc/network/interfaces' , 'r' ) as eni : for line in eni : if line == 'source /etc/network/interfaces.d/*' : return with open ( '/etc/network/interfaces' , 'a' ) as eni : eni . write ( '\nsource /etc/network/interfaces.d/*' ) | Juju removes the source line when setting up interfaces replace if missing | 96 | 13 |
244,743 | def delete_package ( self , cache , pkg ) : if self . is_virtual_package ( pkg ) : log ( "Package '%s' appears to be virtual - purging provides" % pkg . name , level = DEBUG ) for _p in pkg . provides_list : self . delete_package ( cache , _p [ 2 ] . parent_pkg ) elif not pkg . current_ver : log ( "Package '%s' not installed" % pkg . name , level = DEBUG ) return else : log ( "Purging package '%s'" % pkg . name , level = DEBUG ) apt_purge ( pkg . name ) | Deletes the package from the system . | 146 | 8 |
244,744 | def _get_ip_address ( self , request ) : ipaddr = request . META . get ( "HTTP_X_FORWARDED_FOR" , None ) if ipaddr : # X_FORWARDED_FOR returns client1, proxy1, proxy2,... return ipaddr . split ( "," ) [ 0 ] . strip ( ) return request . META . get ( "REMOTE_ADDR" , "" ) | Get the remote ip address the request was generated from . | 93 | 11 |
244,745 | def _get_view_name ( self , request ) : method = request . method . lower ( ) try : attributes = getattr ( self , method ) view_name = type ( attributes . __self__ ) . __module__ + '.' + type ( attributes . __self__ ) . __name__ return view_name except AttributeError : return None | Get view name . | 76 | 4 |
244,746 | def _get_view_method ( self , request ) : if hasattr ( self , 'action' ) : return self . action if self . action else None return request . method . lower ( ) | Get view method . | 42 | 4 |
244,747 | def _get_response_ms ( self ) : response_timedelta = now ( ) - self . log [ 'requested_at' ] response_ms = int ( response_timedelta . total_seconds ( ) * 1000 ) return max ( response_ms , 0 ) | Get the duration of the request response cycle is milliseconds . In case of negative duration 0 is returned . | 61 | 20 |
244,748 | def should_log ( self , request , response ) : return self . logging_methods == '__all__' or request . method in self . logging_methods | Method that should return a value that evaluated to True if the request should be logged . By default check if the request method is in logging_methods . | 36 | 31 |
244,749 | def merge_dicts ( dicts , op = operator . add ) : a = None for b in dicts : if a is None : a = b . copy ( ) else : a = dict ( a . items ( ) + b . items ( ) + [ ( k , op ( a [ k ] , b [ k ] ) ) for k in set ( b ) & set ( a ) ] ) return a | Merge a list of dictionaries . | 88 | 8 |
244,750 | def getLayerIndex ( url ) : urlInfo = None urlSplit = None inx = None try : urlInfo = urlparse . urlparse ( url ) urlSplit = str ( urlInfo . path ) . split ( '/' ) inx = urlSplit [ len ( urlSplit ) - 1 ] if is_number ( inx ) : return int ( inx ) except : return 0 finally : urlInfo = None urlSplit = None del urlInfo del urlSplit gc . collect ( ) | Extract the layer index from a url . | 104 | 9 |
244,751 | def getLayerName ( url ) : urlInfo = None urlSplit = None try : urlInfo = urlparse . urlparse ( url ) urlSplit = str ( urlInfo . path ) . split ( '/' ) name = urlSplit [ len ( urlSplit ) - 3 ] return name except : return url finally : urlInfo = None urlSplit = None del urlInfo del urlSplit gc . collect ( ) | Extract the layer name from a url . | 86 | 9 |
244,752 | def random_string_generator ( size = 6 , chars = string . ascii_uppercase ) : try : return '' . join ( random . choice ( chars ) for _ in range ( size ) ) except : line , filename , synerror = trace ( ) raise ArcRestHelperError ( { "function" : "random_string_generator" , "line" : line , "filename" : filename , "synerror" : synerror , } ) finally : pass | Generates a random string from a set of characters . | 106 | 11 |
244,753 | def random_int_generator ( maxrange ) : try : return random . randint ( 0 , maxrange ) except : line , filename , synerror = trace ( ) raise ArcRestHelperError ( { "function" : "random_int_generator" , "line" : line , "filename" : filename , "synerror" : synerror , } ) finally : pass | Generates a random integer from 0 to maxrange inclusive . | 85 | 12 |
244,754 | def local_time_to_online ( dt = None ) : is_dst = None utc_offset = None try : if dt is None : dt = datetime . datetime . now ( ) is_dst = time . daylight > 0 and time . localtime ( ) . tm_isdst > 0 utc_offset = ( time . altzone if is_dst else time . timezone ) return ( time . mktime ( dt . timetuple ( ) ) * 1000 ) + ( utc_offset * 1000 ) except : line , filename , synerror = trace ( ) raise ArcRestHelperError ( { "function" : "local_time_to_online" , "line" : line , "filename" : filename , "synerror" : synerror , } ) finally : is_dst = None utc_offset = None del is_dst del utc_offset | Converts datetime object to a UTC timestamp for AGOL . | 202 | 13 |
244,755 | def is_number ( s ) : try : float ( s ) return True except ValueError : pass try : import unicodedata unicodedata . numeric ( s ) return True except ( TypeError , ValueError ) : pass return False | Determines if the input is numeric | 49 | 8 |
244,756 | def init_config_json ( config_file ) : json_data = None try : if os . path . exists ( config_file ) : #Load the config file with open ( config_file ) as json_file : json_data = json . load ( json_file ) return unicode_convert ( json_data ) else : return None except : line , filename , synerror = trace ( ) raise ArcRestHelperError ( { "function" : "init_config_json" , "line" : line , "filename" : filename , "synerror" : synerror , } ) finally : json_data = None del json_data gc . collect ( ) | Deserializes a JSON configuration file . | 148 | 8 |
244,757 | def write_config_json ( config_file , data ) : outfile = None try : with open ( config_file , 'w' ) as outfile : json . dump ( data , outfile ) except : line , filename , synerror = trace ( ) raise ArcRestHelperError ( { "function" : "init_config_json" , "line" : line , "filename" : filename , "synerror" : synerror , } ) finally : outfile = None del outfile gc . collect ( ) | Serializes an object to disk . | 115 | 7 |
244,758 | def unicode_convert ( obj ) : try : if isinstance ( obj , dict ) : return { unicode_convert ( key ) : unicode_convert ( value ) for key , value in obj . items ( ) } elif isinstance ( obj , list ) : return [ unicode_convert ( element ) for element in obj ] elif isinstance ( obj , str ) : return obj elif isinstance ( obj , six . text_type ) : return obj . encode ( 'utf-8' ) elif isinstance ( obj , six . integer_types ) : return obj else : return obj except : return obj | Converts unicode objects to anscii . | 137 | 10 |
244,759 | def find_replace ( obj , find , replace ) : try : if isinstance ( obj , dict ) : return { find_replace ( key , find , replace ) : find_replace ( value , find , replace ) for key , value in obj . items ( ) } elif isinstance ( obj , list ) : return [ find_replace ( element , find , replace ) for element in obj ] elif obj == find : return unicode_convert ( replace ) else : try : return unicode_convert ( find_replace_string ( obj , find , replace ) ) #obj = unicode_convert(json.loads(obj)) #return find_replace(obj,find,replace) except : return unicode_convert ( obj ) except : line , filename , synerror = trace ( ) raise ArcRestHelperError ( { "function" : "find_replace" , "line" : line , "filename" : filename , "synerror" : synerror , } ) finally : pass | Searches an object and performs a find and replace . | 218 | 12 |
244,760 | def _tostr ( self , obj ) : if not obj : return '' if isinstance ( obj , list ) : return ', ' . join ( map ( self . _tostr , obj ) ) return str ( obj ) | converts a object to list if object is a list it creates a comma seperated string . | 49 | 20 |
244,761 | def _unzip_file ( self , zip_file , out_folder ) : try : zf = zipfile . ZipFile ( zip_file , 'r' ) zf . extractall ( path = out_folder ) zf . close ( ) del zf return True except : return False | unzips a file to a given folder | 64 | 9 |
244,762 | def _list_files ( self , path ) : files = [ ] for f in glob . glob ( pathname = path ) : files . append ( f ) files . sort ( ) return files | lists files in a given directory | 41 | 6 |
244,763 | def _get_content_type ( self , filename ) : mntype = mimetypes . guess_type ( filename ) [ 0 ] filename , fileExtension = os . path . splitext ( filename ) if mntype is None and fileExtension . lower ( ) == ".csv" : mntype = "text/csv" elif mntype is None and fileExtension . lower ( ) == ".sd" : mntype = "File/sd" elif mntype is None : #mntype = 'application/octet-stream' mntype = "File/%s" % fileExtension . replace ( '.' , '' ) return mntype | gets the content type of a file | 150 | 7 |
244,764 | def value ( self ) : if self . _outline is None : return { "type" : "esriSMS" , "style" : self . _style , "color" : self . _color . value , "size" : self . _size , "angle" : self . _angle , "xoffset" : self . _xoffset , "yoffset" : self . _yoffset } else : return { "type" : "esriSMS" , "style" : self . _style , "color" : self . _color . value , "size" : self . _size , "angle" : self . _angle , "xoffset" : self . _xoffset , "yoffset" : self . _yoffset , "outline" : { "width" : self . _outline [ 'width' ] , "color" : self . _color . value } } | returns the object as dictionary | 196 | 6 |
244,765 | def unfederate ( self , serverId ) : url = self . _url + "/servers/{serverid}/unfederate" . format ( serverid = serverId ) params = { "f" : "json" } return self . _get ( url = url , param_dict = params , proxy_port = self . _proxy_port , proxy_url = self . _proxy_ur ) | This operation unfederates an ArcGIS Server from Portal for ArcGIS | 90 | 16 |
244,766 | def validateAllServers ( self ) : url = self . _url + "/servers/validate" params = { "f" : "json" } return self . _get ( url = url , param_dict = params , proxy_port = self . _proxy_port , proxy_url = self . _proxy_ur ) | This operation provides status information about a specific ArcGIS Server federated with Portal for ArcGIS . | 72 | 21 |
244,767 | def editLogSettings ( self , logLocation , logLevel = "WARNING" , maxLogFileAge = 90 ) : url = self . _url + "/settings/edit" params = { "f" : "json" , "logDir" : logLocation , "logLevel" : logLevel , "maxLogFileAge" : maxLogFileAge } return self . _post ( url = url , param_dict = params , securityHandler = self . _securityHandler , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | edits the log settings for the portal site | 123 | 9 |
244,768 | def query ( self , logLevel = "WARNING" , source = "ALL" , startTime = None , endTime = None , logCodes = None , users = None , messageCount = 1000 ) : url = self . _url + "/query" filter_value = { "codes" : [ ] , "users" : [ ] , "source" : "*" } if source . lower ( ) == "all" : filter_value [ 'source' ] = "*" else : filter_value [ 'source' ] = [ source ] params = { "f" : "json" , "level" : logLevel } if not startTime is None and isinstance ( startTime , datetime ) : params [ 'startTime' ] = startTime . strftime ( "%Y-%m-%dT%H:%M:%S" ) #2015-01-31T15:00:00 if not endTime is None and isinstance ( endTime , datetime ) : params [ 'endTime' ] = startTime . strftime ( "%Y-%m-%dT%H:%M:%S" ) if not logCodes is None : filter_value [ 'codes' ] = logCodes . split ( ',' ) if not users is None : filter_value [ 'users' ] = users . split ( ',' ) if messageCount is None : params [ 'pageSize' ] = 1000 elif isinstance ( messageCount , ( int , long , float ) ) : params [ 'pageSize' ] = int ( messageCount ) else : params [ 'pageSize' ] = 1000 params [ 'filter' ] = filter_value return self . _get ( url = url , param_dict = params , securityHandler = self . _securityHandler , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | allows users to look at the log files from a the REST endpoint | 409 | 13 |
244,769 | def deleteCertificate ( self , certName ) : params = { "f" : "json" } url = self . _url + "/sslCertificates/{cert}/delete" . format ( cert = certName ) return self . _post ( url = url , param_dict = params , proxy_port = self . _proxy_port , proxy_url = self . _proxy_url ) | This operation deletes an SSL certificate from the key store . Once a certificate is deleted it cannot be retrieved or used to enable SSL . | 87 | 27 |
244,770 | def exportCertificate ( self , certName , outFolder = None ) : params = { "f" : "json" } url = self . _url + "/sslCertificates/{cert}/export" . format ( cert = certName ) if outFolder is None : outFolder = tempfile . gettempdir ( ) return self . _post ( url = url , param_dict = params , out_folder = outFolder , proxy_port = self . _proxy_port , proxy_url = self . _proxy_url ) | This operation downloads an SSL certificate . The file returned by the server is an X . 509 certificate . The downloaded certificate can be imported into a client that is making HTTP requests . | 116 | 36 |
244,771 | def generateCertificate ( self , alias , commonName , organizationalUnit , city , state , country , keyalg = "RSA" , keysize = 1024 , sigalg = "SHA256withRSA" , validity = 90 ) : params = { "f" : "json" , "alias" : alias , "commonName" : commonName , "organizationalUnit" : organizationalUnit , "city" : city , "state" : state , "country" : country , "keyalg" : keyalg , "keysize" : keysize , "sigalg" : sigalg , "validity" : validity } url = self . _url + "/SSLCertificate/ generateCertificate" return self . _post ( url = url , param_dict = params , proxy_port = self . _proxy_port , proxy_url = self . _proxy_url ) | Use this operation to create a self - signed certificate or as a starting point for getting a production - ready CA - signed certificate . The portal will generate a certificate for you and store it in its keystore . | 189 | 42 |
244,772 | def getAppInfo ( self , appId ) : params = { "f" : "json" , "appID" : appId } url = self . _url + "/oauth/getAppInfo" return self . _get ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | Every application registered with Portal for ArcGIS has a unique client ID and a list of redirect URIs that are used for OAuth . This operation returns these OAuth - specific properties of an application . You can use this information to update the redirect URIs by using the Update App Info operation . | 83 | 60 |
244,773 | def getUsersEnterpriseGroups ( self , username , searchFilter , maxCount = 100 ) : params = { "f" : "json" , "username" : username , "filter" : searchFilter , "maxCount" : maxCount } url = self . _url + "/Groups/getEnterpriseGroupsForUser" return self . _get ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | This operation lists the groups assigned to a user account in the configured enterprise group store . You can use the filter parameter to narrow down the search results . | 110 | 30 |
244,774 | def refreshGroupMembership ( self , groups ) : params = { "f" : "json" , "groups" : groups } url = self . _url + "/groups/refreshMembership" return self . _post ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | This operation iterates over every enterprise account configured in the portal and determines if the user account is a part of the input enterprise group . If there are any change in memberships the database and the indexes are updated for each group . While portal automatically refreshes the memberships during a user login and during a periodic refresh configured through the Update Identity Store operation this operation allows an administrator to force a refresh . | 81 | 80 |
244,775 | def searchEnterpriseGroups ( self , searchFilter = "" , maxCount = 100 ) : params = { "f" : "json" , "filter" : searchFilter , "maxCount" : maxCount } url = self . _url + "/groups/searchEnterpriseGroups" return self . _post ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | This operation searches groups in the configured enterprise group store . You can narrow down the search using the search filter parameter . | 100 | 23 |
244,776 | def SSLCertificates ( self ) : url = self . _url + "/SSLCertificate" params = { "f" : "json" } return self . _post ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | Lists certificates . | 72 | 4 |
244,777 | def updateAppInfo ( self , appInfo ) : params = { "f" : "json" , "appInfo" : appInfo } url = self . _url + "/oauth/updateAppInfo" return self . _post ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | This operation allows you to update the OAuth - specific properties associated with an application . Use the Get App Info operation to obtain the existing OAuth properties that can be edited . | 83 | 35 |
244,778 | def updateEnterpriseUser ( self , username , idpUsername ) : params = { "f" : "json" , "username" : username , "idpUsername" : idpUsername } url = self . _url + "/users/updateEnterpriseUser" return self . _post ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | This operation allows an administrator to update the idpUsername for an enterprise user in the portal . This is used when migrating from accounts used with web - tier authentication to SAML authentication . | 98 | 38 |
244,779 | def updateIdenityStore ( self , userPassword , user , userFullnameAttribute , ldapURLForUsers , userEmailAttribute , usernameAttribute , isPasswordEncrypted = False , caseSensitive = True ) : url = self . _url + "/config/updateIdentityStore" params = { "f" : "json" , "userPassword" : userPassword , "isPasswordEncrypted" : isPasswordEncrypted , "user" : user , "userFullnameAttribute" : userFullnameAttribute , "ldapURLForUsers" : ldapURLForUsers , "userEmailAttribute" : userEmailAttribute , "usernameAttribute" : usernameAttribute , "caseSensitive" : caseSensitive } return self . _post ( url = url , param_dict = params , securityHandler = self . _securityHandler , proxy_port = self . _proxy_port , proxy_url = self . _proxy_url ) | r You can use this operation to change the identity provider configuration in your portal . When Portal for ArcGIS is first installed it supports token - based authentication using the built - in identity store for accounts . To configure your portal to connect to your enterprise authentication mechanism it must be configured to use an enterprise identity store such as Windows Active Directory or LDAP . | 201 | 71 |
244,780 | def editDirectory ( self , directoryName , physicalPath , description ) : url = self . _url + "/directories/%s/edit" % directoryName params = { "f" : "json" , "physicalPath" : physicalPath , "description" : description } return self . _post ( url = url , param_dict = params , securityHandler = self . _securityHandler , proxy_port = self . _proxy_port , proxy_url = self . _proxy_url ) | The edit operation on a directory can be used to change the physical path and description properties of the directory . This is useful when changing the location of a directory from a local path to a network share . However the API does not copy your content and data from the old path to the new path . This has to be done independently by the system administrator . | 106 | 70 |
244,781 | def releaseLicense ( self , username ) : url = self . _url + "/licenses/releaseLicense" params = { "username" : username , "f" : "json" } return self . _post ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | If a user checks out an ArcGIS Pro license for offline or disconnected use this operation releases the license for the specified account . A license can only be used with a single device running ArcGIS Pro . To check in the license a valid access token and refresh token is required . If the refresh token for the device is lost damaged corrupted or formatted the user will not be able to check in the license . This prevents the user from logging in to ArcGIS Pro from any other device . As an administrator you can release the license . This frees the outstanding license and allows the user to check out a new license or use ArcGIS Pro in a connected environment . | 78 | 135 |
244,782 | def removeAllEntitlements ( self , appId ) : params = { "f" : "json" , "appId" : appId } url = self . _url + "/licenses/removeAllEntitlements" return self . _post ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | This operation removes all entitlements from the portal for ArcGIS Pro or additional products such as Navigator for ArcGIS and revokes all entitlements assigned to users for the specified product . The portal is no longer a licensing portal for that product . License assignments are retained on disk . Therefore if you decide to configure this portal as a licensing portal for the product again in the future all licensing assignments will be available in the website . | 87 | 87 |
244,783 | def updateLanguages ( self , languages ) : url = self . _url = "/languages/update" params = { "f" : "json" , "languages" : languages } return self . _post ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | You can use this operation to change which languages will have content displayed in portal search results . | 79 | 18 |
244,784 | def updateLicenseManager ( self , licenseManagerInfo ) : url = self . _url + "/licenses/updateLicenseManager" params = { "f" : "json" , "licenseManagerInfo" : licenseManagerInfo } return self . _post ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | ArcGIS License Server Administrator works with your portal and enforces licenses for ArcGIS Pro . This operation allows you to change the license server connection information for your portal . When you import entitlements into portal using the Import Entitlements operation a license server is automatically configured for you . If your license server changes after the entitlements have been imported you only need to change the license server connection information . You can register a backup license manager for high availability of your licensing portal . When configuring a backup license manager you need to make sure that the backup license manager has been authorized with the same organizational entitlements . After configuring the backup license manager Portal for ArcGIS is restarted automatically . When the restart completes the portal is configured with the backup license server you specified . | 86 | 156 |
244,785 | def updateIndexConfiguration ( self , indexerHost = "localhost" , indexerPort = 7199 ) : url = self . _url + "/indexer/update" params = { "f" : "json" , "indexerHost" : indexerHost , "indexerPort" : indexerPort } return self . _get ( url = url , param_dict = params , securityHandler = self . _securityHandler , proxy_port = self . _proxy_port , proxy_url = self . _proxy_url ) | You can use this operation to change the connection information for the indexing service . By default Portal for ArcGIS runs an indexing service that runs on port 7199 . If you want the sharing API to refer to the indexing service on another instance you need to provide the host and port parameters . | 114 | 61 |
244,786 | def exportSite ( self , location ) : params = { "location" : location , "f" : "json" } url = self . _url + "/exportSite" return self . _post ( url = url , param_dict = params ) | This operation exports the portal site configuration to a location you specify . | 53 | 13 |
244,787 | def importSite ( self , location ) : params = { "location" : location , "f" : "json" } url = self . _url + "/importSite" return self . _post ( url = url , param_dict = params ) | This operation imports the portal site configuration to a location you specify . | 53 | 13 |
244,788 | def joinSite ( self , machineAdminUrl , username , password ) : params = { "machineAdminUrl" : machineAdminUrl , "username" : username , "password" : password , "f" : "json" } url = self . _url + "/joinSite" return self . _post ( url = url , param_dict = params ) | The joinSite operation connects a portal machine to an existing site . You must provide an account with administrative privileges to the site for the operation to be successful . | 75 | 31 |
244,789 | def unregisterMachine ( self , machineName ) : url = self . _url + "/machines/unregister" params = { "f" : "json" , "machineName" : machineName } return self . _post ( url = url , param_dict = params , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | This operation unregisters a portal machine from a portal site . The operation can only performed when there are two machines participating in a portal site . | 83 | 29 |
244,790 | def federation ( self ) : url = self . _url + "/federation" return _Federation ( url = url , securityHandler = self . _securityHandler , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | returns the class that controls federation | 57 | 7 |
244,791 | def system ( self ) : url = self . _url + "/system" return _System ( url = url , securityHandler = self . _securityHandler , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | Creates a reference to the System operations for Portal | 55 | 10 |
244,792 | def security ( self ) : url = self . _url + "/security" return _Security ( url = url , securityHandler = self . _securityHandler , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | Creates a reference to the Security operations for Portal | 55 | 10 |
244,793 | def logs ( self ) : url = self . _url + "/logs" return _log ( url = url , securityHandler = self . _securityHandler , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | returns the portals log information | 56 | 6 |
244,794 | def search ( self , q = None , per_page = None , page = None , bbox = None , sort_by = "relavance" , sort_order = "asc" ) : url = self . _url + "/datasets.json" param_dict = { "sort_by" : sort_by , "f" : "json" } if q is not None : param_dict [ 'q' ] = q if per_page is not None : param_dict [ 'per_page' ] = per_page if page is not None : param_dict [ 'page' ] = page if bbox is not None : param_dict [ 'bbox' ] = bbox if sort_by is not None : param_dict [ 'sort_by' ] = sort_by if sort_order is not None : param_dict [ 'sort_order' ] = sort_order ds_data = self . _get ( url = url , param_dict = param_dict , securityHandler = self . _securityHandler , additional_headers = [ ] , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) return ds_data | searches the opendata site and returns the dataset results | 262 | 13 |
244,795 | def getDataset ( self , itemId ) : if self . _url . lower ( ) . find ( 'datasets' ) > - 1 : url = self . _url else : url = self . _url + "/datasets" return OpenDataItem ( url = url , itemId = itemId , securityHandler = self . _securityHandler , proxy_url = self . _proxy_url , proxy_port = self . _proxy_port ) | gets a dataset class | 100 | 4 |
244,796 | def __init ( self ) : url = "%s/%s.json" % ( self . _url , self . _itemId ) params = { "f" : "json" } json_dict = self . _get ( url , params , securityHandler = self . _securityHandler , proxy_port = self . _proxy_port , proxy_url = self . _proxy_url ) self . _json_dict = json_dict self . _json = json . dumps ( self . _json_dict ) setattr ( self , "data" , json_dict [ 'data' ] ) if 'data' in json_dict : for k , v in json_dict [ 'data' ] . items ( ) : setattr ( self , k , v ) del k , v | gets the properties for the site | 169 | 6 |
244,797 | def export ( self , outFormat = "shp" , outFolder = None ) : export_formats = { 'shp' : ".zip" , 'kml' : '.kml' , 'geojson' : ".geojson" , 'csv' : '.csv' } url = "%s/%s%s" % ( self . _url , self . _itemId , export_formats [ outFormat ] ) results = self . _get ( url = url , securityHandler = self . _securityHandler , out_folder = outFolder ) if 'status' in results : self . time . sleep ( 7 ) results = self . export ( outFormat = outFormat , outFolder = outFolder ) return results | exports a dataset t | 158 | 5 |
244,798 | def error ( self ) : if self . _error is None : try : #__init is renamed to the class with an _ init = getattr ( self , "_" + self . __class__ . __name__ + "__init" , None ) if init is not None and callable ( init ) : init ( ) except Exception as e : pass return self . _error | gets the error | 80 | 3 |
244,799 | def _2 ( self ) : boundary = self . boundary buf = StringIO ( ) for ( key , value ) in self . form_fields : buf . write ( '--%s\r\n' % boundary ) buf . write ( 'Content-Disposition: form-data; name="%s"' % key ) buf . write ( '\r\n\r\n%s\r\n' % value ) for ( key , filename , mimetype , filepath ) in self . files : if os . path . isfile ( filepath ) : buf . write ( '--{boundary}\r\n' 'Content-Disposition: form-data; name="{key}"; ' 'filename="{filename}"\r\n' 'Content-Type: {content_type}\r\n\r\n' . format ( boundary = boundary , key = key , filename = filename , content_type = mimetype ) ) with open ( filepath , "rb" ) as f : shutil . copyfileobj ( f , buf ) buf . write ( '\r\n' ) buf . write ( '--' + boundary + '--\r\n\r\n' ) buf = buf . getvalue ( ) self . form_data = buf | python 2 . x version of formatting body data | 278 | 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.