text:
module Butter
  class Something
  end
end

module GitHub
  # Sings you a poem.
  #
  # name - Your name as a String.
  #
  # Returns a String poem.
  def self.poem(name)
    "Roses are red, " +
      "violets are blue, " +
        "#{name}'s a sucker, " +
          "and now you are, too."
  end

  # Chimney is the API for getting and setting Smoke routes.
  #
  # Setup
  # -----
  #
  # In order for Chimney to function, some setup keys are required to exist in the
  # routing Redis. This sections shows you how to enter the required
  # information. Start by connecting to the routing Redis:
  #
  #     require 'chimney'
  #     chimney = Chimney.new('router.example.com:21201')
  #
  # The routing Redis must contain one or more storage host values.
  #
  #     chimney.add_storage_server('s1.example.com')
  #     chimney.add_storage_server('s2.example.com')
  #
  # Each storage host is expected to have disk usage information (percent of disk
  # used) that is kept up to date (via cron or similar). If these are not set, the
  # host that will be chosen for new routes is arbitrary, but will always be the
  # same. This is a simple example of a cron script that is responsible for
  # updating the usage keys:
  #
  #     (0..15).map { |num| num.to_s(16) }.each do |part|
  #       host = get_current_host # => 's1.example.com'
  #       percent_used = get_partition_usage(part) # => 17.23
  #       chimney.set_partition_usage(host, part, percent_used)
  #     end
  #
  # Usage
  # -----
  #
  # Make sure you require this sucker.
  #
  #     require 'chimney'
  #
  # Chimney must be initialized with the host:port of the routing Redis server.
  #
  #     chimney = Chimney.new('router.example.com:21201')
  #
  # Looking up a route for a user is simple. This command simply finds the host
  # upon which the user is stored. If the router Redis is unreachable, Chimney
  # will check its internal cache. If that is a miss, it will try to reconnect to
  # the router. If that fails, it will fallback on making calls to Smoke and
  # checking each storage server for the user. Subsequent lookups will then be
  # able to find the route in the cache. This mechanism should ensure high
  # tolerance to failures of the routing server.
  #
  #     chimney.get_user_route('mojombo')
  #     # => 'domU-12-31-38-01-C8-F1.compute-1.internal'
  #
  # Setting a route for a new user is also a simple call. This command will first
  # refresh the cached list of available storage hosts, then figure out which one
  # of them is least loaded. This host will be set as the route for the user and
  # returned. If the user already exists in the routing table, the host is
  # returned and the routing table is unaffected.
  #
  #     chimney.set_user_route('franko')
  #     # => domU-12-31-38-01-C8-F1.compute-1.internal
  #
  # If you need to change the name of the user, but keep the host the same:
  #
  #     chimney.rename_user_route('oldname', 'newname')
  #
  # If you need to remove a route for a user:
  #
  #     chimney.delete_user_route('mojombo')
  #
  # If you need the absolute path to a user on disk (class or instance method):
  #
  #     Chimney.shard_user_path('mojombo')
  #     chimney.shard_user_path('mojombo')
  #     # => "/data/repositories/2/a8/e2/95/mojombo"
  #
  # If you need the absolute path to a repo on disk (class or instance method):
  #
  #     Chimney.shard_repo_path('mojombo', 'god')
  #     chimney.shard_repo_path('mojombo', 'god')
  #     # => "/data/repositories/2/a8/e2/95/mojombo/god.git"
  #
  # Getting and setting routes for gists is similar to that for users:
  #
  #     chimney.get_gist_route('1234')
  #     # => 'domU-12-31-38-01-C8-F1.compute-1.internal'
  #
  #     chimney.set_gist_route('4e460bfd6c184058c7a3')
  #     # => 'domU-12-31-38-01-C8-F1.compute-1.internal'
  #
  # If you need the absolute path to a gist on disk (class or instance method):
  #
  #     Chimney.shard_gist_path('1234')
  #     chimney.shard_gist_path('1234')
  #     # => "/data/repositories/0/81/dc/9b/gist/1234.git"
  #
  # If you need the unix user that has access to the repository data (class or
  # instance method):
  #
  #     Chimney.unix_user
  #     chimney.unix_user
  #     # => 'root'
  #
  # That's it!
  class Chimney
    SMOKE_HOSTS_FILE = '/tmp/smoke_hosts'
    REPO_DIR = ENV['REPO_ROOT'] || '/data/repositories'
    UNIX_USER = 'git'

    attr_accessor :host, :port
    attr_accessor :client, :hosts, :cache, :verbose, :logger

    # Instantiate a new Chimney object.
    #
    # server - The host:port of the routing redis instance.
    # logger - An optional Logger object. If none is given, Chimney
    #          writes to /dev/null.
    #
    # Returns a configured Chimney instance.
    def initialize(server, logger = nil)
      self.cache = {}
      self.hosts = []
      self.logger = logger || Logger.new('/dev/null')

      self.host = server.split(':').first
      self.port = server.split(':').last.to_i
      ensure_client_connection
    end

    # Add a storage server to the list.
    #
    # host - The String hostname to add.
    #
    # Returns the Array of String hostnames after the addition.
    def self.add_storage_server(host)
      if current_servers = self.client.get('gh.storage.servers')
        new_servers = [current_servers, host].join(',')
      else
        new_servers = host
      end
      self.client.set('gh.storage.servers', new_servers)
      new_servers.split(',')
    end

    # Remove a storage server from the list.
    #
    # host - The String hostname to remove.
    #
    # Returns the Array of String hostnames after the removal.
    # Raises Chimney::NoSuchStorageServer if the storage server is not currently
    #   in the list.
    def remove_storage_server(host)
      if current_servers = self.client.get('gh.storage.servers')
        servers = current_servers.split(',')
        if servers.delete(host)
          self.client.set('gh.storage.servers', servers.join(','))
          return servers
        else
          raise NoSuchStorageServer.new(host)
        end
      else
        raise NoSuchStorageServer.new(host)
      end
    end

    # The list of storage server hostnames.
    #
    # Returns an Array of String hostnames.
    def storage_servers
      self.client.get('gh.storage.servers').split(',')
    end

    # Checks if the storage server is currently online.
    #
    # host - The String hostname to check.
    #
    # Returns true if the server is online, false if not.
    def storage_server_online?(host)
      !self.client.exists("gh.storage.server.offline.#{host}")
    rescue Errno::ECONNREFUSED
      # If we can't connect to Redis, check to see if the BERTRPC
      # server is alive manually.
      begin
        smoke(host).alive?
      rescue BERTRPC::ReadTimeoutError
        false
      end
    end

    # Sets a storage server as being online.
    #
    # host - The String hostname to set.
    #
    # Returns nothing.
    def set_storage_server_online(host)
      self.client.delete("gh.storage.server.offline.#{host}")
    end

    # Sets a storage server as being offline.
    #
    # host     - The String hostname to set.
    # duration - An optional number of seconds after which the
    #            server will no longer be considered offline; with
    #            no duration, servers are kept offline until marked
    #            online manually.
    #
    # Returns true if the server was not previously offline, nil otherwise.
    def set_storage_server_offline(host, duration=nil)
      key = "gh.storage.server.offline.#{host}"
      if self.client.set_unless_exists(key, Time.now.to_i)
        self.client.expire(key, duration) if duration
        true
      end
    end

    # If a server is offline, tells us when we first noticed.
    #
    # host - The String hostname to check.
    #
    # Returns nothing if the storage server is online.
    # Returns an instance of Time representing the moment we set the
    #   server as offline if it is offline.
    def self.storage_server_offline_since(host)
      if time = self.client.get("gh.storage.server.offline.#{host}")
        Time.at(time.to_i)
      end
    rescue Errno::ECONNREFUSED
      # If we can't connect to Redis and we're wondering when the
      # storage server went offline, return whatever.
      Time.now
    end

    # Maximum number of network failures that can occur with a file server
    # before it's marked offline.
    DISRUPTION_THRESHOLD = 10

    # The window of time, in seconds, under which no more than
    # DISRUPTION_THRESHOLD failures may occur.
    DISRUPTION_WINDOW = 5

    # Called when some kind of network disruption occurs when communicating
    # with a file server. When more than DISRUPTION_THRESHOLD failures are
    # reported within DISRUPTION_WINDOW seconds, the server is marked offline
    # for two minutes.
    #
    # The return value can be used to determine the action taken:
    #   nil when the storage server is already marked offline.
    #   > 0 when the number of disruptions is under the threshold.
    #   -1 when the server has been marked offline due to too many disruptions.
    def storage_server_disruption(host)
      return if !self.storage_server_online?(host)
      key = "gh.storage.server.disrupt.#{host}"
      if counter_suffix = self.client.get(key)
        count = self.client.incr("#{key}.#{counter_suffix}")
        if count > DISRUPTION_THRESHOLD
          if self.set_storage_server_offline(host, 30)
            self.client.del(key, "#{key}.#{counter_suffix}")
            -1
          end
        else
          count
        end
      else
        if self.client.set_unless_exists(key, Time.now.to_f * 1000)
          self.client.expire(key, DISRUPTION_WINDOW)
          self.storage_server_disruption(host)
        else
          # we raced to set first and lost, wrap around and try again
          self.storage_server_disruption(host)
        end
      end
    end

    # Lookup a route for the given user.
    #
    # user - The String username.
    #
    # Returns the hostname of the storage server.
    def get_user_route(user)
      try_route(:user, user)
    end

    # Lookup a route for the given gist.
    #
    # gist - The String gist ID.
    #
    # Returns the hostname of the storage server.
    def get_gist_route(gist)
      try_route(:gist, gist)
    end

    # Find the least loaded storage server and set a route there for
    # the given +user+. If the user already exists, do nothing and
    # simply return the host that user is on.
    #
    # user - The String username.
    #
    # Returns the chosen hostname.
    def set_user_route(user)
      set_route(:user, user)
    end

    # Explicitly set the user route to the given host.
    #
    # user - The String username.
    # host - The String hostname.
    #
    # Returns the new String hostname.
    # Raises Chimney::NoSuchStorageServer if the storage server is not currently
    #   in the list.
    def set_user_route!(user, host)
      unless self.storage_servers.include?(host)
        raise NoSuchStorageServer.new(host)
      end
      set_route(:user, user, host)
    end

    # Find the least loaded storage server and set a route there for
    # the given +gist+. If the gist already exists, do nothing and
    # simply return the host that gist is on.
    #
    # gist - The String gist ID.
    #
    # Returns the chosen hostname.
    def set_gist_route(gist)
      set_route(:gist, gist)
    end

    # Change the name of the given user without changing the associated host.
    #
    # old_user - The old user name.
    # new_user - The new user name.
    #
    # Returns the hostname on success, or nil if the old user was not found
    #   or if the new user already exists.
    def rename_user_route(old_user, new_user)
      if (host = get_user_route(old_user)) && !get_user_route(new_user)
        delete_user_route(old_user)
        set_route(:user, new_user, host)
      else
        nil
      end
    end

    # Delete the route for the given user.
    #
    # user - The String username.
    #
    # Returns nothing.
    def delete_user_route(user)
      self.client.delete("gh.storage.user.#{user}")
    end

    # Delete the route for the given gist.
    #
    # gist - The String gist ID.
    #
    # Returns nothing.
    def delete_gist_route(gist)
      self.client.delete("gh.storage.gist.#{gist}")
    end

    # Set the partition usage for a given host.
    #
    # host      - The String hostname.
    # partition - The single lowercase hex digit partition String.
    # usage     - The percent of disk space used as a Float [0.0-100.0].
    #
    # Returns nothing.
    def set_partition_usage(host, partition, usage)
      self.client.set("gh.storage.server.usage.percent.#{host}.#{partition}", usage.to_s)
    end

    # The list of partition usage percentages.
    #
    # host - The optional String hostname to restrict the response to.
    #
    # Returns an Array of [partition:String, percentage:Float].
    def partition_usage(host = nil)
      pattern = "gh.storage.server.usage.percent."
      pattern += host ? "#{host}.*" : "*"
      self.client.keys(pattern).map do |x|
        [x, self.client.get(x).to_f]
      end
    end

    # Calculate the absolute path of the user's storage directory.
    #
    # user - The String username.
    #
    # Returns the String path:
    #   e.g. '/data/repositories/2/a8/e2/95/mojombo'.
    def self.shard_user_path(user)
      hex = Digest::MD5.hexdigest(user)
      partition = partition_hex(user)
      shard = File.join(partition, hex[0..1], hex[2..3], hex[4..5])
      File.join(REPO_DIR, shard, user)
    end

    def shard_user_path(user)
      Chimney.shard_user_path(user)
    end

    # Calculate the absolute path of the repo's storage directory.
    #
    # user - The String username.
    # repo - The String repo name.
    #
    # Returns the String path:
    #   e.g. '/data/repositories/2/a8/e2/95/mojombo/god.git'.
    def self.shard_repo_path(user, repo)
      hex = Digest::MD5.hexdigest(user)
      partition = partition_hex(user)
      shard = File.join(partition, hex[0..1], hex[2..3], hex[4..5])
      File.join(REPO_DIR, shard, user, "#{repo}.git")
    end

    def shard_repo_path(user, repo)
      Chimney.shard_repo_path(user, repo)
    end

    # Calculate the absolute path of the gist's storage directory.
    #
    # gist - The String gist ID.
    #
    # Returns String path:
    #   e.g. '/data/repositories/0/81/dc/9b/gist/1234.git'.
    def self.shard_gist_path(gist)
      hex = Digest::MD5.hexdigest(gist)
      partition = partition_hex(gist)
      shard = File.join(partition, hex[0..1], hex[2..3], hex[4..5])
      File.join(REPO_DIR, shard, 'gist', "#{gist}.git")
    end

    def shard_gist_path(gist)
      Chimney.shard_gist_path(gist)
    end

    # Calculate the partition hex digit.
    #
    # name - The String username or gist.
    #
    # Returns a single lowercase hex digit [0-9a-f] as a String.
    def self.partition_hex(name)
      Digest::MD5.hexdigest(name)[0].chr
    end

    def partition_hex(name)
      Chimney.partition_hex(name)
    end

    # The unix user account that has access to the repository data.
    #
    # Returns the String user e.g. 'root'.
    def self.unix_user
      UNIX_USER
    end

    def unix_user
      Chimney.unix_user
    end

    # The short name of the server currently executing this code. If this is a
    # front end and we're on fe2.rs.github.com, this will return "fe2".
    #
    # Returns a String host short name e.g. "fe2".
    def self.current_server
      if hostname =~ /github\.com/
        hostname.split('.').first
      else
        "localhost"
      end
    end

    def current_server
      Chimney.current_server
    end

    # The full hostname of the current server.
    #
    # Returns a String hostname e.g. "fe2.rs.github.com".
    def self.hostname
      `hostname`.chomp
    end

    private

    # Ensure that a valid connection to the routing server has been made
    # and that the list of hosts has been fetched.
    #
    # Returns nothing.
    def ensure_client_connection
      logger.info "Starting Chimney..."
      self.client = Redis.new(:host => self.host, :port => self.port)
      if hosts = self.client.get('gh.storage.servers')
        self.hosts = hosts.split(',')
        write_hosts_to_file
        logger.info "Found #{self.hosts.size} hosts from Router."
      else
        read_hosts_from_file
        raise InvalidRoutingServer.new("Hosts could not be loaded.") if self.hosts.empty?
        logger.warn "Router does not contain hosts list; loaded #{self.hosts.size} hosts from file."
      end
    rescue Errno::ECONNREFUSED
      read_hosts_from_file
      raise InvalidRoutingServer.new("Hosts could not be loaded.") if self.hosts.empty?
      logger.warn "Unable to connect to Router; loaded #{self.hosts.size} hosts from file."
    end

    # Write the hosts list to a file.
    #
    # Returns nothing.
    def write_hosts_to_file
      File.open(SMOKE_HOSTS_FILE, 'w') do |f|
        f.write(self.hosts.join(','))
      end
    end

    # Read the hosts from a file.
    #
    # Returns nothing.
    def read_hosts_from_file
      if File.exists?(SMOKE_HOSTS_FILE)
        self.hosts = File.read(SMOKE_HOSTS_FILE).split(',')
      end
    end

    # Reload the hosts list from the router.
    #
    # Returns nothing.
    def reload_hosts_list
      self.hosts = self.storage_servers
      write_hosts_to_file
    end

    # Find the storage server with the least disk usage for the target partition.
    #
    # type - Either :user or :gist.
    # name - The String username or gist.
    #
    # Returns a hostname.
    def find_least_loaded_host(name)
      partition = partition_hex(name)
      self.hosts.select { |h| storage_server_online?(h) }.map do |host|
        [self.client.get("gh.storage.server.usage.percent.#{host}.#{partition}").to_f, host]
      end.sort.first.last
    end

    # Set the route for a given user or gist.
    #
    # type - Either :user or :gist.
    # name - The String username or gist.
    # host - The String hostname that will be set if it is present (optional).
    #
    # Returns the String hostname that was set.
    def set_route(type, name, host = nil)
      if !host && existing_host = self.client.get("gh.storage.#{type}.#{name}")
        return existing_host
      end

      unless host
        reload_hosts_list
        host = find_least_loaded_host(name)
      end

      self.client.set("gh.storage.#{type}.#{name}", host)
      host
    end

    # Try to find a route using a variety of different fallbacks.
    #
    # type - Either :user or :gist.
    # name - The String username or gist.
    #
    # Returns the hostname of the storage server.
    def try_route(type, name)
      try_route_with_redis(type, name)
    end

    # Try the lookup from redis. If redis is unavailable, try
    # to do the lookup from internal cache.
    #
    # type - Either :user or :gist.
    # name - The String username or gist.
    #
    # Returns the hostname of the storage server.
    def try_route_with_redis(type, name)
      if host = self.client.get("gh.storage.#{type}.#{name}")
        logger.debug "Found host '#{host}' for #{type} '#{name}' from Router."
        self.cache[name] = host
      else
        self.cache.delete(name)
      end
      host
    rescue Errno::ECONNREFUSED
      logger.warn "No connection to Router..."
      try_route_with_internal_cache(type, name)
    end

    # Try the lookup from the internal route cache. If the key is not
    # in internal cache, try to reconnect to redis and redo the lookup.
    #
    # type - Either :user or :gist.
    # name - The String username or gist.
    #
    # Returns the hostname of the storage server.
    def try_route_with_internal_cache(type, name)
      if host = self.cache[name]
        logger.debug "Found '#{host}' for #{type} '#{name}' from Internal Cache."
        host
      else
        logger.warn "No entry in Internal Cache..."
        try_route_with_new_redis_connection(type, name)
      end
    end

    # Try the lookup with a new redis connection. If redis is still
    # unavailable, try each storage server in turn to look for the user/gist.
    #
    # type - Either :user or :gist.
    # name - The String username or gist.
    #
    # Returns the hostname of the storage server.
    def try_route_with_new_redis_connection(type, name)
      self.client.connect_to_server
      host = self.client.get("gh.storage.#{type}.#{name}")
      logger.debug "Found host '#{host}' for #{type} '#{name}' from Router after reconnect."
      host
    rescue Errno::ECONNREFUSED
      logger.warn "Still no connection to Router..."
      try_route_with_individual_storage_checks(type, name)
    end

    # Try the lookup by asking each storage server if the user or gist dir exists.
    #
    # type - Either :user or :gist.
    # name - The String username or gist.
    #
    # Returns the hostname of the storage server or nil.
    def try_route_with_individual_storage_checks(type, name)
      self.hosts.each do |host|
        logger.debug "Trying host '#{host}' via Smoke for existence of #{type} '#{name}'..."

        svc = smoke(host)
        exist =
          case type
          when :user: svc.user_dir_exist?(name)
          when :gist: svc.gist_dir_exist?(name)
          else false
          end

        if exist
          self.cache[name] = host
          logger.debug "Found host '#{host}' for #{type} '#{name}' from Smoke."
          return host
        end
      end
      logger.warn "No host found for #{type} '#{name}'."
      nil
    rescue Object => e
      logger.error "No host found for #{type} '#{name}' because of '#{e.message}'."
      nil
    end

    def smoke(host)
      BERTRPC::Service.new(host, 8149, 2).call.store
    end
  end

  class Math
    # Duplicate some text an abitrary number of times.
    #
    # text  - The String to be duplicated.
    # count - The Integer number of times to duplicate the text.
    #
    # Examples
    #   multiplex('Tom', 4)
    #   # => 'TomTomTomTom'
    #
    # Returns the duplicated String.
    def multiplex(text, count)
      text * count
    end
  end
end

module GitHub
  class Jobs
    # Performs a job.
    #
    # Returns nothing.
    def perform
    end
  end
end


text:
"""This example gets all line items with names starting with 'line item'."""

import tempfile

# Import appropriate modules from the client library.
from googleads import dfp

def main(client):
  # Initialize a report downloader.
  report_downloader = client.GetDataDownloader(version='v201411')

  output_file = tempfile.NamedTemporaryFile(
      prefix='line_items_named_like_', suffix='.csv', mode='w', delete=False)

  # Create bind value to select line items with names starting with 'line item'.
  values = [{
      'key': 'name',
      'value': {
          'xsi_type': 'TextValue',
          'value': 'line item%'
      }
  }]

  pql_query = ('SELECT Name, Id, Status FROM Line_Item '
               'WHERE Name LIKE :name')

  # Downloads the response from PQL select statement to the specified file
  report_downloader.DownloadPqlResultToCsv(
      pql_query, output_file, values)
  output_file.close()

  print ('Saved line items to... %s' % output_file.name)

if __name__ == '__main__':
  # Initialize client object.
  dfp_client = dfp.DfpClient.LoadFromStorage()
  main(dfp_client)

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Statistics of SCONJ in UD_Galician</title>
    <link rel="root" href=""/>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/jquery-ui-redmond.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style-vis.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/hint.css"/>

          home

          edit page
          issue tracker

          <gcse:search></gcse:search>

        This page pertains to UD version 2.

            It appears that you have Javascript disabled.
            Please consider enabling Javascript for this page to see the visualizations.

Treebank Statistics: UD_Galician: POS Tags: SCONJ

There are 10 SCONJ lemmas (0%), 10 SCONJ types (0%) and 1607 SCONJ tokens (1%).
Out of 16 observed tags, the rank of SCONJ is: 12 in number of lemmas, 13 in number of types and 12 in number of tokens.

The 10 most frequent SCONJ lemmas: que, como, se, porque, coma, pois, ca, mentres, malia, cando

The 10 most frequent SCONJ types:  que, como, se, porque, coma, pois, ca, mentres, malia, cando

The 10 most frequent ambiguous lemmas: que (<tt>PRON</tt> 1910, <tt>SCONJ</tt> 1194, <tt>DET</tt> 14), como (<tt>PRON</tt> 496, <tt>SCONJ</tt> 113, <tt>ADV</tt> 16), se (<tt>PRON</tt> 2181, <tt>SCONJ</tt> 91), mentres (<tt>ADV</tt> 32, <tt>SCONJ</tt> 14), cando (<tt>PRON</tt> 137, <tt>ADV</tt> 9, <tt>SCONJ</tt> 7)

The 10 most frequent ambiguous types:  que (<tt>PRON</tt> 1907, <tt>SCONJ</tt> 1187, <tt>DET</tt> 9), como (<tt>PRON</tt> 462, <tt>SCONJ</tt> 107, <tt>ADV</tt> 13), se (<tt>PRON</tt> 2157, <tt>SCONJ</tt> 49), coma (<tt>SCONJ</tt> 47, <tt>VERB</tt> 1), mentres (<tt>ADV</tt> 29, <tt>SCONJ</tt> 13), cando (<tt>PRON</tt> 104, <tt>ADV</tt> 7, <tt>SCONJ</tt> 6)

que

<tt>PRON</tt> 1907: A diferenza máis inmediata entre a varicela en vacinados e non vacinados é o número de lesións que provocan .

<tt>SCONJ</tt> 1187: Para que tanto esforzo ?

<tt>DET</tt> 9: Como saber que é o que realmente hai que manter , apoiar ou preservar de a propia diversidade cultural local ?

como

<tt>PRON</tt> 462: A faceta máis sinxela e artesanal ten como obxecto a captura de moluscos en os areais costeiros e fai se a pé .

<tt>SCONJ</tt> 107: A reserva total de auga obtería se como a suma de as reservas individuais de todos os horizontes ou capas que formen o solo .

<tt>ADV</tt> 13: Unha vez acabada a intervención suturan se os cortes realizados como en calquera outro tipo de intervención , lava se o corpo e envolve se en un sudario .

se

<tt>PRON</tt> 2157: E a quen se lle pide a fe de bautismo ?

<tt>SCONJ</tt> 49: En función de a resposta procede se a extracción e desconectase o corpo de a máquina e se lle suprime a medicación .

coma

<tt>SCONJ</tt> 47: Todos estes países deixaron de ser os principais en a actualidade por a competencia vía prezos de países coma Marrocos .

<tt>VERB</tt> 1: Corresponde se este input a aquela producción que sae de a industria conserveira para retornar novamente a o sector , é dicir , aquela producción encargada a outras fábricas galegas ou de o resto de o mundo , e comercializadas coma producción propia .

mentres

<tt>ADV</tt> 29: A proporción de mostras tomadas a o 3º día de vida en o ano 2002 foi de o 3,38 % mentres que en o ano 2004 foi de o 39 % .

<tt>SCONJ</tt> 13: Por iso mentres en os macroescenarios oía se o de " make poverty history " , en as rúas de Edimburgo berraban " make G8 history " .

cando

<tt>PRON</tt> 104: O provedor realizará a reposición automática cando o nivel de gas se encontre por debaixo de o volume mínimo establecido .

<tt>ADV</tt> 7: A situación cambiará cando , como parece , a oferta de a Rede vaia asociada a a oferta televisiva e se utilice como pantalla de servicio a de o propio televisor .

<tt>SCONJ</tt> 6: A transmisión de coñecemento tecnolóxico será maior cando os acordos de integración inclúen tamén a mobilidade de o capital .

Morphology

The form / lemma ratio of SCONJ is 1.000000 (the average of all parts of speech is 1.520215).

The 1st highest number of forms (1) was observed with the lemma "ca": ca.

The 2nd highest number of forms (1) was observed with the lemma "cando": cando.

The 3rd highest number of forms (1) was observed with the lemma "coma": coma.

SCONJ does not occur with any features.

Relations

SCONJ nodes are attached to their parents using 6 different relations: <tt>mark</tt> (1506; 94% instances), <tt>case</tt> (74; 5% instances), <tt>cc</tt> (15; 1% instances), <tt>xcomp</tt> (7; 0% instances), <tt>root</tt> (3; 0% instances), <tt>ccomp</tt> (2; 0% instances)

Parents of SCONJ nodes belong to 11 different parts of speech: <tt>VERB</tt> (1130; 70% instances), <tt>NOUN</tt> (205; 13% instances), <tt>ADJ</tt> (166; 10% instances), <tt>ADP</tt> (64; 4% instances), <tt>ADV</tt> (16; 1% instances), <tt>PROPN</tt> (9; 1% instances), <tt>PRON</tt> (7; 0% instances), <tt>NUM</tt> (5; 0% instances),  (3; 0% instances), <tt>PART</tt> (1; 0% instances), <tt>SCONJ</tt> (1; 0% instances)

1492 (93%) SCONJ nodes are leaves.

44 (3%) SCONJ nodes have one child.

22 (1%) SCONJ nodes have two children.

49 (3%) SCONJ nodes have three or more children.

The highest child degree of a SCONJ node is 12.

Children of SCONJ nodes are attached using 12 different relations: <tt>punct</tt> (93; 36% instances), <tt>nmod</tt> (74; 28% instances), <tt>advmod</tt> (61; 23% instances), <tt>ccomp</tt> (12; 5% instances), <tt>cop</tt> (4; 2% instances), <tt>nsubj</tt> (4; 2% instances), <tt>case</tt> (3; 1% instances), <tt>amod</tt> (2; 1% instances), <tt>aux</tt> (2; 1% instances), <tt>cc</tt> (2; 1% instances), <tt>xcomp</tt> (2; 1% instances), <tt>det</tt> (1; 0% instances)

Children of SCONJ nodes belong to 13 different parts of speech: <tt>PUNCT</tt> (90; 35% instances), <tt>NOUN</tt> (69; 27% instances), <tt>ADV</tt> (60; 23% instances), <tt>VERB</tt> (11; 4% instances), <tt>ADJ</tt> (9; 3% instances), <tt>DET</tt> (6; 2% instances), <tt>AUX</tt> (4; 2% instances), <tt>ADP</tt> (3; 1% instances), <tt>CCONJ</tt> (2; 1% instances), <tt>NUM</tt> (2; 1% instances), <tt>PRON</tt> (2; 1% instances), <tt>PROPN</tt> (1; 0% instances), <tt>SCONJ</tt> (1; 0% instances)

© 2014–2021
            Universal Dependencies contributors.
            Site powered by Annodoc and brat
.


text:
package com.blazebit.persistence.view.impl.update.listener;

import com.blazebit.persistence.view.EntityViewManager;
import com.blazebit.persistence.view.PreRemoveListener;

import javax.persistence.EntityManager;
import java.lang.reflect.Method;

/**
 *
 * @author Christian Beikov
 * @since 1.4.0
 */
public class ViewInstancePreRemoveListener extends ViewInstanceListener implements PreRemoveListener<Object> {

    private final boolean possiblyCancelling;

    public ViewInstancePreRemoveListener(Method listener) {
        super(listener);
        this.possiblyCancelling = listener.getReturnType() == boolean.class || listener.getReturnType() == Boolean.class;
    }

    public boolean isPossiblyCancelling() {
        return possiblyCancelling;
    }

    @Override
    public boolean preRemove(EntityViewManager entityViewManager, EntityManager entityManager, Object view) {
        Object result = invoke(entityViewManager, entityManager, view);
        return !Boolean.FALSE.equals(result);
    }

}


text:
import sys, os
import tree #todo: get rid of this later
import indexer

class NoProcessorError(Exception):
    pass

class ProcessingFailure(Exception):
    pass

cols = 79

def dircount(d):
    return len([1 for el in d.split("/") if el != '.'])

class Walker:

    def __init__(self, df, fext, linkrel):
        self.df = df
        self.linkrel = linkrel
        self.fext = fext
        self.walked = []
        self.failures = []

    def walkdir(self, topdir, prefix=''):
        self.basecount = dircount(topdir)
        os.path.walk(topdir, self.walk, prefix)

    def walk(self, prefix, d, names):
        linkrel = prefix + '../' * (dircount(d) - self.basecount)
        for name in names:
            fullpath = os.path.join(d, name)
            fext = os.path.splitext(name)[1]
            if fext == self.fext:
                self.walked.append((linkrel, fullpath))

    def generate(self):
        i = 0
        indexer.clearEntries()
        tree.filenum = 0
        for linkrel, fullpath in self.walked:
            linkrel = self.linkrel + linkrel
            i += 1
            fname = os.path.splitext(fullpath)[0]
            self.percentdone((float(i) / len(self.walked)), fname)
            try:
                self.df(fullpath, linkrel)
            except ProcessingFailure, e:
                self.failures.append((fullpath, e))
        indexer.generateIndex()
        self.percentdone(1., None)

    def percentdone(self, percent, fname):
        # override for neater progress bars
        proglen = 40
        hashes = int(percent * proglen)
        spaces = proglen - hashes
        progstat = "[%s%s] (%s)" %('#' * hashes, ' ' * spaces,fname or "*Done*")
        progstat += (cols - len(progstat)) * ' '
        progstat += '\r'
        sys.stdout.write(progstat)
        sys.stdout.flush()
        if fname is None:
            print

class PlainReportingWalker(Walker):

    def percentdone(self, percent, fname):
        if fname:
            print fname

class NullReportingWalker(Walker):

    def percentdone(self, percent, fname):
        pass

def parallelGenerator(originalFileName, outputExtension):
    return os.path.splitext(originalFileName)[0]+outputExtension

def fooAddingGenerator(originalFileName, outputExtension):
    return os.path.splitext(originalFileName)[0]+"foo"+outputExtension

def outputdirGenerator(originalFileName, outputExtension, inputdir, outputdir):
    originalFileName = os.path.abspath(originalFileName)
    abs_inputdir = os.path.abspath(inputdir)
    if os.path.commonprefix((originalFileName, abs_inputdir)) != abs_inputdir:
        raise ValueError("Original file name '" + originalFileName +
              "' not under input directory '" + abs_inputdir + "'")

    adjustedPath = os.path.join(outputdir, os.path.basename(originalFileName))
    return tree.getOutputFileName(adjustedPath, outputExtension)

def getFilenameGenerator(config, outputExt):
    if config.get('outputdir'):
        return (lambda originalFileName, outputExtension:
            outputdirGenerator(originalFileName, outputExtension,
                               os.path.abspath(config.get('inputdir')),
                               os.path.abspath(config.get('outputdir'))))
    else:
        return tree.getOutputFileName

def getProcessor(module, output, config):
    try:
        m = getattr(module.factory, 'generate_'+output)
    except AttributeError:
        raise NoProcessorError("cannot generate "+output+" output")

    if config.get('ext'):
        ext = config['ext']
    else:
        from default import htmlDefault
        ext = htmlDefault['ext']

    return m(config, getFilenameGenerator(config, ext))


text:
#include "NegativeNodeHandler.h"
#include<lang/log/LogLevel.h>

#include <commonlib/commonlib.h>

#include <lang/model/allmodel.h>
#include "../CallbackRegister.h"

namespace IAS {
namespace Lang {
namespace Printer {
namespace Expr {

/*************************************************************************/
NegativeNodeHandler::NegativeNodeHandler() throw(){
	IAS_TRACER;
}

/*************************************************************************/
NegativeNodeHandler::~NegativeNodeHandler() throw(){
	IAS_TRACER;
}
/*************************************************************************/
void NegativeNodeHandler::call(const Model::Node* pNode, CallbackCtx *pCtx, std::ostream& os){
	IAS_TRACER;

	IAS_TYPEID_CHECK(Model::Expr::NegativeNode, pNode);
	const Model::Expr::NegativeNode *pNegativeNode = IAS_DYNAMICCAST_CONST(Model::Expr::NegativeNode, pNode);
	handleUnary(pNegativeNode->getChild(),pCtx,os,"-");

}
/*************************************************************************/
}
}
}
}


text:
<?php
declare(strict_types = 1);

namespace Enm\ShopwareSdk\Model\Wrapper;

use Enm\ShopwareSdk\Model\RootModelInterface;

/**
 * @author Dirk Heyka <heyka@eosnewmedia.de>
 */
interface WrapperInterface
{

    /**
     * @return RootModelInterface
     */
    public function getData(): RootModelInterface;

    /**
     * @param RootModelInterface $model
     *
     * @return WrapperInterface
     */
    public function setData(RootModelInterface $model): WrapperInterface;
}


text:
/*
 * Do not modify this file. This file is generated from the cloudhsm-2014-05-30.normal.json service model.
 */
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;

using Amazon.Runtime;
using Amazon.Runtime.Internal;

namespace Amazon.CloudHSM.Model
{
    /// <summary>
    /// Container for the parameters to the DeleteHsm operation.
    /// Deletes an HSM. Once complete, this operation cannot be undone and your key material
    /// cannot be recovered.
    /// </summary>
    public partial class DeleteHsmRequest : AmazonCloudHSMRequest
    {
        private string _hsmArn;

        /// <summary>
        /// Gets and sets the property HsmArn.
        /// <para>
        /// The ARN of the HSM to delete.
        /// </para>
        /// </summary>
        public string HsmArn
        {
            get { return this._hsmArn; }
            set { this._hsmArn = value; }
        }

        // Check to see if HsmArn property is set
        internal bool IsSetHsmArn()
        {
            return this._hsmArn != null;
        }

    }
}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using LTM.Common.Data;
using LTM.Common.Filter;

namespace LTM.Common.Extensions
{
    /// <summary>
    ///     集合扩展方法类
    /// </summary>
    public static class CollectionExtensions
    {
        #region IEnumerable的扩展

        /// <summary>
        ///     将集合展开并分别转换成字符串,再以指定的分隔符衔接,拼成一个字符串返回。默认分隔符为逗号
        /// </summary>
        /// <param name="collection"> 要处理的集合 </param>
        /// <param name="separator"> 分隔符,默认为逗号 </param>
        /// <returns> 拼接后的字符串 </returns>
        public static string ExpandAndToString<T>(this IEnumerable<T> collection, string separator = ",")
        {
            return collection.ExpandAndToString(t => t.ToString(), separator);
        }

        /// <summary>
        ///     循环集合的每一项,调用委托生成字符串,返回合并后的字符串。默认分隔符为逗号
        /// </summary>
        /// <param name="collection">待处理的集合</param>
        /// <param name="itemFormatFunc">单个集合项的转换委托</param>
        /// <param name="separetor">分隔符,默认为逗号</param>
        /// <typeparam name="T">泛型类型</typeparam>
        /// <returns></returns>
        public static string ExpandAndToString<T>(this IEnumerable<T> collection, Func<T, string> itemFormatFunc,
            string separetor = ",")
        {
            collection = collection as IList<T> ?? collection.ToList();
            itemFormatFunc.CheckNotNull(nameof(itemFormatFunc));
            if (!collection.Any())
            {
                return null;
            }
            var sb = new StringBuilder();
            var i = 0;
            var count = collection.Count();
            foreach (var t in collection)
            {
                if (i == count - 1)
                {
                    sb.Append(itemFormatFunc(t));
                }
                else
                {
                    sb.Append(itemFormatFunc(t) + separetor);
                }
                i++;
            }
            return sb.ToString();
        }

        /// <summary>
        ///     集合是否为空
        /// </summary>
        /// <param name="collection"> 要处理的集合 </param>
        /// <typeparam name="T"> 动态类型 </typeparam>
        /// <returns> 为空返回True,不为空返回False </returns>
        public static bool IsEmpty<T>(this IEnumerable<T> collection)
        {
            collection = collection as IList<T> ?? collection.ToList();
            return !collection.Any();
        }

        /// <summary>
        ///     根据第三方条件是否为真来决定是否执行指定条件的查询
        /// </summary>
        /// <param name="source"> 要查询的源 </param>
        /// <param name="predicate"> 查询条件 </param>
        /// <param name="condition"> 第三方条件 </param>
        /// <typeparam name="T"> 动态类型 </typeparam>
        /// <returns> 查询的结果 </returns>
        public static IEnumerable<T> WhereIf<T>(this IEnumerable<T> source, Func<T, bool> predicate, bool condition)
        {
            predicate.CheckNotNull(nameof(predicate));
            source = source as IList<T> ?? source.ToList();

            return condition ? source.Where(predicate) : source;
        }

        /// <summary>
        ///     根据指定条件返回集合中不重复的元素
        /// </summary>
        /// <typeparam name="T">动态类型</typeparam>
        /// <typeparam name="TKey">动态筛选条件类型</typeparam>
        /// <param name="source">要操作的源</param>
        /// <param name="keySelector">重复数据筛选条件</param>
        /// <returns>不重复元素的集合</returns>
        public static IEnumerable<T> DistinctBy<T, TKey>(this IEnumerable<T> source, Func<T, TKey> keySelector)
        {
            keySelector.CheckNotNull(nameof(keySelector));
            source = source as IList<T> ?? source.ToList();

            return source.GroupBy(keySelector).Select(group => group.First());
        }

        #endregion IEnumerable的扩展

        #region IQueryable的扩展

        /// <summary>
        ///     根据第三方条件是否为真来决定是否执行指定条件的查询
        /// </summary>
        /// <param name="source"> 要查询的源 </param>
        /// <param name="predicate"> 查询条件 </param>
        /// <param name="condition"> 第三方条件 </param>
        /// <typeparam name="T"> 动态类型 </typeparam>
        /// <returns> 查询的结果 </returns>
        public static IQueryable<T> WhereIf<T>(this IQueryable<T> source, Expression<Func<T, bool>> predicate,
            bool condition)
        {
            source.CheckNotNull(nameof(source));
            predicate.CheckNotNull(nameof(predicate));

            return condition ? source.Where(predicate) : source;
        }

        /// <summary>
        ///     把<see cref="IQueryable{T}" />集合按指定字段与排序方式进行排序
        /// </summary>
        /// <param name="source">要排序的数据集</param>
        /// <param name="propertyName">排序属性名</param>
        /// <param name="sortDirection">排序方向</param>
        /// <typeparam name="T">动态类型</typeparam>
        /// <returns>排序后的数据集</returns>
        public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> source,
            string propertyName,
            ListSortDirection sortDirection = ListSortDirection.Ascending)
        {
            source.CheckNotNull(nameof(source));
            propertyName.CheckNotNullOrEmpty(nameof(propertyName));

            return QueryablePropertySorter<T>.OrderBy(source, propertyName, sortDirection);
        }

        /// <summary>
        ///     把<see cref="IQueryable{T}" />集合按指定字段排序条件进行排序
        /// </summary>
        /// <typeparam name="T">动态类型</typeparam>
        /// <param name="source">要排序的数据集</param>
        /// <param name="sortCondition">列表字段排序条件</param>
        /// <returns></returns>
        public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> source, SortCondition sortCondition)
        {
            source.CheckNotNull(nameof(source));
            sortCondition.CheckNotNull(nameof(sortCondition));

            return source.OrderBy(sortCondition.SortField, sortCondition.ListSortDirection);
        }

        /// <summary>
        ///     把<see cref="IOrderedQueryable{T}" />集合继续按指定字段排序方式进行排序
        /// </summary>
        /// <typeparam name="T">动态类型</typeparam>
        /// <param name="source">要排序的数据集</param>
        /// <param name="propertyName">排序属性名</param>
        /// <param name="sortDirection">排序方向</param>
        /// <returns></returns>
        public static IOrderedQueryable<T> ThenBy<T>(this IOrderedQueryable<T> source,
            string propertyName,
            ListSortDirection sortDirection = ListSortDirection.Ascending)
        {
            source.CheckNotNull(nameof(source));
            propertyName.CheckNotNullOrEmpty(nameof(propertyName));

            return QueryablePropertySorter<T>.ThenBy(source, propertyName, sortDirection);
        }

        /// <summary>
        ///     把<see cref="IOrderedQueryable{T}" />集合继续指定字段排序方式进行排序
        /// </summary>
        /// <typeparam name="T">动态类型</typeparam>
        /// <param name="source">要排序的数据集</param>
        /// <param name="sortCondition">列表字段排序条件</param>
        /// <returns></returns>
        public static IOrderedQueryable<T> ThenBy<T>(this IOrderedQueryable<T> source, SortCondition sortCondition)
        {
            source.CheckNotNull(nameof(source));
            sortCondition.CheckNotNull(nameof(sortCondition));

            return source.ThenBy(sortCondition.SortField, sortCondition.ListSortDirection);
        }

        private static Action<T> Fix<T>(Func<Action<T>, Action<T>> f)
        {
            return x => f(Fix(f))(x);
        }

        private static void Render<T>(T model, Func<Action<T>, Action<T>> f)
        {
            Fix(f)(model);
        }

        /// <summary>
        ///     从指定集合TSource递归出无限级TResult集合、常用于树形数据
        /// </summary>
        /// <typeparam name="TResult">返回的集合类型</typeparam>
        /// <typeparam name="TSource">原始类型</typeparam>
        /// <param name="sources">原始集合数据</param>
        /// <param name="roots">原始根节点数据</param>
        /// <param name="mapper">类型映射mapper</param>
        /// <param name="getchilden">子集合表达式</param>
        /// <param name="chidenway">集合的处理方式</param>
        /// <returns>TResult集合</returns>
        public static ICollection<TResult> RenderTree<TSource, TResult>(this List<TSource> sources,
            List<TSource> roots, Func<TSource, int, TResult> mapper, Func<TSource, List<TSource>
                , List<TSource>> getchilden, Action<TResult, TResult> chidenway) where TResult : new()
        {
            var Items = new List<TResult>();
            var parentnode = default(TResult);
            var level = 0;
            Render(roots, render => categories =>
            {
                foreach (var cat in categories)
                {
                    var item = mapper(cat, level);
                    var childens = getchilden(cat, sources);
                    if (roots.Contains(cat))
                    {
                        parentnode = default(TResult);
                        level = 0;
                        Items.Add(item);
                        parentnode = item;
                    }
                    else
                    {
                        chidenway(parentnode, item);
                        if (childens.Count > 0)
                        {
                            level++;
                            parentnode = item;
                        }
                    }
                    render(childens);
                }
            });
            return Items;
        }

        public static ICollection<TResult> RenderTree<TSource, TResult>(this List<TSource> sources,
            List<TSource> roots, Func<TSource, int, TResult> mapper, Func<TSource, List<TSource>
                , List<TSource>> getchilden, Action<TResult, TResult, List<TResult>> chidenway) where TResult : new()
        {
            var Items = new List<TResult>();
            var parentnode = default(TResult);
            var level = 0;
            Render(roots, render => categories =>
            {
                foreach (var cat in categories)
                {
                    var item = mapper(cat, level);
                    var childens = getchilden(cat, sources);
                    if (roots.Contains(cat))
                    {
                        parentnode = default(TResult);
                        level = 0;
                        Items.Add(item);
                        parentnode = item;
                    }
                    else
                    {
                        chidenway(parentnode, item, Items);
                        if (childens.Count > 0)
                        {
                            level++;
                            parentnode = item;
                        }
                    }
                    render(childens);
                }
            });
            return Items;
        }

        /*/// <summary>
        /// 从指定<see cref="IQueryable{T}"/>集合中筛选指定键范围内的子数据集
        /// </summary>
        /// <typeparam name="TSource">集合元素类型</typeparam>
        /// <typeparam name="TKey">筛选键类型</typeparam>
        /// <param name="source">要筛选的数据源</param>
        /// <param name="keySelector">筛选键的范围表达式</param>
        /// <param name="start">筛选范围起始值</param>
        /// <param name="end">筛选范围结束值</param>
        /// <param name="startEqual">是否等于起始值</param>
        /// <param name="endEqual">是否等于结束集</param>
        /// <returns></returns>
        public static IQueryable<TSource> Between<TSource, TKey>(this IQueryable<TSource> source,
            Expression<Func<TSource, TKey>> keySelector,
            TKey start,
            TKey end,
            bool startEqual = false,
            bool endEqual = false) where TKey : IComparable<TKey>
        {
            Expression[] paramters = keySelector.Parameters.Cast<Expression>().ToArray();
            Expression key = Expression.Invoke(keySelector, paramters);
            Expression startBound = startEqual
                ? Expression.GreaterThanOrEqual(key, Expression.Constant(start))
                : Expression.GreaterThan(key, Expression.Constant(start));
            Expression endBound = endEqual
                ? Expression.LessThanOrEqual(key, Expression.Constant(end))
                : Expression.LessThan(key, Expression.Constant(end));
            Expression and = Expression.AndAlso(startBound, endBound);
            Expression<Func<TSource, bool>> lambda = Expression.Lambda<Func<TSource, bool>>(and, keySelector.Parameters);
            return source.Where(lambda);
        }*/

        #endregion IQueryable的扩展
    }
}


text:
package com.cebedo.pmsys.pojo;

import org.springframework.web.multipart.MultipartFile;

import com.cebedo.pmsys.model.Project;

public class FormMassUpload {

    private Project project;
    private MultipartFile file;

    public FormMassUpload() {
	;
    }

    public FormMassUpload(Project proj) {
	setProject(proj);
    }

    public Project getProject() {
	return project;
    }

    public void setProject(Project project) {
	this.project = project;
    }

    public MultipartFile getFile() {
	return file;
    }

    public void setFile(MultipartFile staffFile) {
	this.file = staffFile;
    }

}


text:
from unittest import mock
from django.conf import settings
from django.test import TestCase
from django.test.utils import override_settings

from readthedocs.builds.constants import LATEST
from readthedocs.core.templatetags import core_tags
from readthedocs.projects.models import Project

@override_settings(USE_SUBDOMAIN=False, PRODUCTION_DOMAIN='readthedocs.org')
class CoreTagsTests(TestCase):
    fixtures = ['eric', 'test_data']

    def setUp(self):
        url_base = 'http://{domain}/docs/pip{{version}}'.format(
            domain=settings.PRODUCTION_DOMAIN,
        )

        self.pip_latest_url = url_base.format(version='/en/latest/')
        self.pip_latest_url_index = url_base.format(version='/en/latest/index.html')
        self.pip_latest_fr_url = url_base.format(version='/fr/latest/')
        self.pip_abc_url = url_base.format(version='/en/abc/')
        self.pip_abc_url_index = url_base.format(version='/en/abc/index.html')
        self.pip_abc_fr_url = url_base.format(version='/fr/abc/')
        self.pip_abc_fr_url_index = url_base.format(version='/fr/abc/index.html')
        self.pip_abc_xyz_page_url = url_base.format(version='/en/abc/xyz')
        self.pip_abc_xyz_fr_page_url = url_base.format(version='/fr/abc/xyz')
        self.pip_latest_document_url = url_base.format(version='/en/latest/document')
        self.pip_latest_document_page_url = url_base.format(version='/en/latest/document.html')

        self.client.login(username='eric', password='test')
        self.pip = Project.objects.get(slug='pip')
        self.pip_fr = Project.objects.create(name='PIP-FR', slug='pip-fr', language='fr', main_language_project=self.pip)

    def test_project_only(self):
        proj = Project.objects.get(slug='pip')
        url = core_tags.make_document_url(proj)
        self.assertEqual(url, self.pip_latest_url)
        url = core_tags.make_document_url(proj, '')
        self.assertEqual(url, self.pip_latest_url)

    def test_translation_project_only(self):
        proj = Project.objects.get(slug='pip-fr')
        url = core_tags.make_document_url(proj)
        self.assertEqual(url, self.pip_latest_fr_url)
        url = core_tags.make_document_url(proj, '')
        self.assertEqual(url, self.pip_latest_fr_url)

    def test_project_and_version(self):
        proj = Project.objects.get(slug='pip')
        url = core_tags.make_document_url(proj, 'abc')
        self.assertEqual(url, self.pip_abc_url)
        url = core_tags.make_document_url(proj, 'abc', '')
        self.assertEqual(url, self.pip_abc_url)

    def test_translation_project_and_version(self):
        proj = Project.objects.get(slug='pip-fr')
        url = core_tags.make_document_url(proj, 'abc')
        self.assertEqual(url, self.pip_abc_fr_url)
        url = core_tags.make_document_url(proj, 'abc', '')
        self.assertEqual(url, self.pip_abc_fr_url)

    def test_project_and_version_and_page(self):
        proj = Project.objects.get(slug='pip')
        url = core_tags.make_document_url(proj, 'abc', 'xyz')
        self.assertEqual(url, self.pip_abc_xyz_page_url)
        url = core_tags.make_document_url(proj, 'abc', 'index', 'index.html')
        self.assertEqual(url, self.pip_abc_url_index)

    def test_translation_project_and_version_and_page(self):
        proj = Project.objects.get(slug='pip-fr')
        url = core_tags.make_document_url(proj, 'abc', 'xyz')
        self.assertEqual(url, self.pip_abc_xyz_fr_page_url)
        url = core_tags.make_document_url(proj, 'abc', 'index', 'index.html')
        self.assertEqual(url, self.pip_abc_fr_url_index)

    def test_mkdocs(self):
        proj = Project.objects.get(slug='pip')
        url = core_tags.make_document_url(proj, LATEST, 'document')
        self.assertEqual(url, self.pip_latest_document_url)

    def test_mkdocs_no_directory_urls(self):
        proj = Project.objects.get(slug='pip')
        url = core_tags.make_document_url(proj, LATEST, 'document', 'document.html')
        self.assertEqual(url, self.pip_latest_document_page_url)

    def test_mkdocs_index_no_directory_urls(self):
        proj = Project.objects.get(slug='pip')
        url = core_tags.make_document_url(proj, LATEST, 'index', 'index.html')
        self.assertEqual(url, self.pip_latest_url_index)

    def test_escapejson(self):
        tests = (
            ({}, '{}'),
            ({'a': 'b'}, '{"a": "b"}'),
            ({"'; //": '""'}, '{"\'; //": "\\"\\""}'),
            ({"<script>alert('hi')</script>": ''}, '{"\\u003Cscript\\u003Ealert(\'hi\')\\u003C/script\\u003E": ""}'),
        )

        for in_value, out_value in tests:
            self.assertEqual(core_tags.escapejson(in_value), out_value)


text:
title: MapSaintLucia - a Community Development Roadmap
description: "Congratulations! You just completed a successful mapathon and are excited for the possibilities for undertaking more mapping events. What then, should you do next? This document contains elements of an open mapping plan for Saint Lucia with a special focus on continuing technical proficiency and community development. This is envisioned as a six-month roadmap, but can easily be adjusted to suit the needs of the local community."
---

Congratulations! You just completed a successful mapathon and are excited for the possibilities for undertaking more mapping events. What then, should you do next? This document contains elements of an open mapping plan for Saint Lucia with a special focus on continuing technical proficiency and community development. This is envisioned as a six-month roadmap, but can easily be adjusted to suit the needs of the local community.

### Schedule Regular Events:

The OpenStreetMap community typically schedule at least four events a year, though we always have more.

- Begin organizing the next mapathon now. The dates for 2016 are:
    - Winter: March 5-6
    - Spring: May 14-15
    - Summer: August 9-10
    - Fall: November 5-6

- Use the TeachOSM Tasking Manager to create bite-sized mapping jobs for future events: [http://tasks.teachosm.org/](http://tasks.teachosm.org/)

- Consider a theme for next mapathon. You can focus on a specific geographic area, e.g. all roads and buildings in Laborie or Micoud. Or, you can focus on collecting a specific feature, such as collecting all fire stations or schools. In fact, mapping critical infrastructure makes a great project due to the high value of the data.  But smaller mapping projects can also be useful such as mapping historical and cultural sites, capturing hiking trails using GPS, or even mapping all local rum shops.
- Plan an Open Mapping Roadshow and hold OpenStreetMap mapathons across Saint Lucia. The regional ICT Access centers make excellent sites for mapathons as they are properly equipped and offer access to local mapping communities. Follow the basic requirements for hosting a mapathon (e.g. computers, wifi, FieldPapers, and Mapillary).

## Data quality & Validation:

Begin taking steps to address data quality. It's common for new mappers to enter roads that don't connect properly, building corners that should be squared, and features improperly tagged. The following resources provide examples of validation and data quality procedures.

- To square building corners, see the 'Buildings' section of the Bandung tracing guide: [http://hotosm.github.io/tracing-guides/guide/Bandung-Indo.html](http://hotosm.github.io/tracing-guides/guide/Bandung-Indo.html)

- The JOSM editor (see Power Mapping, below) provides robust data validation tools. To use them, see this tracing guide: [http://hotosm.github.io/tracing-guides/tip/josm-validation.html](http://hotosm.github.io/tracing-guides/tip/josm-validation.html)
- MapRoulette: [http://maproulette.org/](http://maproulette.org/) - An fun and addictive tool to improve data quality.

## Power Mapping:

OpenStreetMap's web-based iD editor is the easiest and most convenient way to get started mapping. But eventually, you will become quite proficient in OpenStreetMap mapping techniques and you will want to graduate to the Java OpenStreetMap Editor, aka JOSM. JOSM allows you to map quickly with keyboard shortcuts, a series of editing tools for common tasks and specialized plugins. Here is your guide to take your mapping skills to the next level.

- A quick guide to JOSM: [http://hotosm.github.io/tracing-guides/guide/josm101-part1.html](http://hotosm.github.io/tracing-guides/guide/josm101-part1.html)
- Becoming a power mapper: [https://www.mapbox.com/blog/osm-mapping-guide/](https://www.mapbox.com/blog/osm-mapping-guide/)
- Graduate to JOSM: [https://www.mapbox.com/blog/making-the-most-josm/](https://www.mapbox.com/blog/making-the-most-josm/)
- Becoming a power mapper: [https://www.mapbox.com/blog/power-mapper/](https://www.mapbox.com/blog/power-mapper/)
- Keyboard shortcuts for the iD editor: [http://wiki.openstreetmap.org/wiki/ID/Shortcuts](http://wiki.openstreetmap.org/wiki/ID/Shortcuts)
- More editing tips for the iD editor: [http://osmgeoweek.org/plan/id-editor/](http://osmgeoweek.org/plan/id-editor/)

## Reference Materials:

- How to tag that thing? See the Map Features page on the wiki: [http://wiki.openstreetmap.org/wiki/Map_Features](http://wiki.openstreetmap.org/wiki/Map_Features)
- Use TagInfo to know which tags are in common usage - [http://taginfo.openstreetmap.org/](http://taginfo.openstreetmap.org/)

- Begin development of a Tracing Guide specific to the Eastern Caribbean region. The tracing guide should show examples of land uses specific to the eastern Caribbean, such as banana farms, orchards for tropical fruits, buildings peculiar to Saint Lucia. See more here: [http://hotosm.github.io/tracing-guides/](http://hotosm.github.io/tracing-guides/)
- The OSM Wiki page for Saint Lucia is YOUR place to add projects, resources, contacts, and more: [http://wiki.openstreetmap.org/wiki/WikiProject_Saint_Lucia](http://wiki.openstreetmap.org/wiki/WikiProject_Saint_Lucia)
- Subscribe to Talk-Carib and start conversation about mapping projects: [https://lists.openstreetmap.org/listinfo/talk-carib](https://lists.openstreetmap.org/listinfo/talk-carib)
- Continue cultivating Street/Field Survey using FieldPapers. http://fieldpapers.org/

## Education & Credentials:

Geobadges are micro-credentials for students or all ages: [http://geobadges.org/](http://geobadges.org/)

TeachOSM offers resources to teachers and instructors who want to use OpenStreetMap to teach geographic skills and reasoning - [http://teachosm.org/](http://teachosm.org/)

## Promotional:

Here are some resources to promote future events with comparisons, establish bragging rights, and create printed maps.

- Use Geofabrik's Map Compare to measure progress against proprietary maps - [http://tools.geofabrik.de/mc/#16/13.8192/-60.8997&num=2&mt0=mapnik&mt1=google-map](http://tools.geofabrik.de/mc/#16/13.8192/-60.8997&num=2&mt0=mapnik&mt1=google-map)
- OSM Fight is a fun little game to pit your mapping skills against your peers! [http://osmfight.neis-one.org](http://osmfight.neis-one.org)
- Printed maps - [http://maperitive.net/](http://maperitive.net/) is a lightweight application that provides the ability to print specialized maps based on GPS and OpenStreetMap. The user controls what data are on the map and how they are rendered.


text:
cycledirections-scraper
=======================

A scrappy scraper script that looks up directions pages for Glasgow to see if they have cycling directions.

The idea behind how it works:

1. Grabs Glasgow related venues from the Google places API (usually returns 20 per search term)
2. Searches venue name   'directions'
3. The top search result for each venue is scraped to see if it mentions cycling/bikes/cycle and if it mentions walking/walk/car/bus/train
4. The name, website, address, and whether the direction terms were matched are stored into a CSV. There's also a column for whether an error occurred while try to grab this data.

====

The dataset is an example. This was built up from the following api searches:

- food in Glasgow
- shops in Glasgow
- gallery in Glasgow
- gyms in Glasgow
- bars in Glasgow
- colleges in Glasgow
- unversity in Glasgow
- library in Glasgow
- clinic in Glasgow
- hospital in Glasgow
- cinema in Glasgow
- community centres in Glasgow

====

As you can see from the data set, there are a few false positives, in terms of directions pages and in terms of pages with cycling directions.

But good on you GFT and NHS Greater Glasgow and Clyde for providing cycling directions!


text:
/**
 * TPermissionReturn.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 May 16, 2006 (03:42:07 EDT) WSDL2Java emitter.
 */

package gov.lbl.srm.v22.stubs;

public class TPermissionReturn implements java.io.Serializable
{
    private org.apache.axis.types.URI surl;

    private gov.lbl.srm.v22.stubs.TReturnStatus status;

    private java.lang.String owner;

    private gov.lbl.srm.v22.stubs.TPermissionMode ownerPermission;

    private gov.lbl.srm.v22.stubs.ArrayOfTUserPermission arrayOfUserPermissions;

    private gov.lbl.srm.v22.stubs.ArrayOfTGroupPermission arrayOfGroupPermissions;

    private gov.lbl.srm.v22.stubs.TPermissionMode otherPermission;

    public TPermissionReturn()
    {
    }

    public TPermissionReturn(org.apache.axis.types.URI surl, gov.lbl.srm.v22.stubs.TReturnStatus status,
            java.lang.String owner, gov.lbl.srm.v22.stubs.TPermissionMode ownerPermission,
            gov.lbl.srm.v22.stubs.ArrayOfTUserPermission arrayOfUserPermissions,
            gov.lbl.srm.v22.stubs.ArrayOfTGroupPermission arrayOfGroupPermissions,
            gov.lbl.srm.v22.stubs.TPermissionMode otherPermission)
    {
        this.surl = surl;
        this.status = status;
        this.owner = owner;
        this.ownerPermission = ownerPermission;
        this.arrayOfUserPermissions = arrayOfUserPermissions;
        this.arrayOfGroupPermissions = arrayOfGroupPermissions;
        this.otherPermission = otherPermission;
    }

    /**
     * Gets the surl value for this TPermissionReturn.
     *
     * @return surl
     */
    public org.apache.axis.types.URI getSurl()
    {
        return surl;
    }

    /**
     * Sets the surl value for this TPermissionReturn.
     *
     * @param surl
     */
    public void setSurl(org.apache.axis.types.URI surl)
    {
        this.surl = surl;
    }

    /**
     * Gets the status value for this TPermissionReturn.
     *
     * @return status
     */
    public gov.lbl.srm.v22.stubs.TReturnStatus getStatus()
    {
        return status;
    }

    /**
     * Sets the status value for this TPermissionReturn.
     *
     * @param status
     */
    public void setStatus(gov.lbl.srm.v22.stubs.TReturnStatus status)
    {
        this.status = status;
    }

    /**
     * Gets the owner value for this TPermissionReturn.
     *
     * @return owner
     */
    public java.lang.String getOwner()
    {
        return owner;
    }

    /**
     * Sets the owner value for this TPermissionReturn.
     *
     * @param owner
     */
    public void setOwner(java.lang.String owner)
    {
        this.owner = owner;
    }

    /**
     * Gets the ownerPermission value for this TPermissionReturn.
     *
     * @return ownerPermission
     */
    public gov.lbl.srm.v22.stubs.TPermissionMode getOwnerPermission()
    {
        return ownerPermission;
    }

    /**
     * Sets the ownerPermission value for this TPermissionReturn.
     *
     * @param ownerPermission
     */
    public void setOwnerPermission(gov.lbl.srm.v22.stubs.TPermissionMode ownerPermission)
    {
        this.ownerPermission = ownerPermission;
    }

    /**
     * Gets the arrayOfUserPermissions value for this TPermissionReturn.
     *
     * @return arrayOfUserPermissions
     */
    public gov.lbl.srm.v22.stubs.ArrayOfTUserPermission getArrayOfUserPermissions()
    {
        return arrayOfUserPermissions;
    }

    /**
     * Sets the arrayOfUserPermissions value for this TPermissionReturn.
     *
     * @param arrayOfUserPermissions
     */
    public void setArrayOfUserPermissions(gov.lbl.srm.v22.stubs.ArrayOfTUserPermission arrayOfUserPermissions)
    {
        this.arrayOfUserPermissions = arrayOfUserPermissions;
    }

    /**
     * Gets the arrayOfGroupPermissions value for this TPermissionReturn.
     *
     * @return arrayOfGroupPermissions
     */
    public gov.lbl.srm.v22.stubs.ArrayOfTGroupPermission getArrayOfGroupPermissions()
    {
        return arrayOfGroupPermissions;
    }

    /**
     * Sets the arrayOfGroupPermissions value for this TPermissionReturn.
     *
     * @param arrayOfGroupPermissions
     */
    public void setArrayOfGroupPermissions(gov.lbl.srm.v22.stubs.ArrayOfTGroupPermission arrayOfGroupPermissions)
    {
        this.arrayOfGroupPermissions = arrayOfGroupPermissions;
    }

    /**
     * Gets the otherPermission value for this TPermissionReturn.
     *
     * @return otherPermission
     */
    public gov.lbl.srm.v22.stubs.TPermissionMode getOtherPermission()
    {
        return otherPermission;
    }

    /**
     * Sets the otherPermission value for this TPermissionReturn.
     *
     * @param otherPermission
     */
    public void setOtherPermission(gov.lbl.srm.v22.stubs.TPermissionMode otherPermission)
    {
        this.otherPermission = otherPermission;
    }

    private java.lang.Object __equalsCalc = null;

    public synchronized boolean equals(java.lang.Object obj)
    {
        if (!(obj instanceof TPermissionReturn))
            return false;
        TPermissionReturn other = (TPermissionReturn) obj;
        if (obj == null)
            return false;
        if (this == obj)
            return true;
        if (__equalsCalc != null)
        {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true
                && ((this.surl == null && other.getSurl() == null) || (this.surl != null && this.surl.equals(other
                        .getSurl())))
                && ((this.status == null && other.getStatus() == null) || (this.status != null && this.status
                        .equals(other.getStatus())))
                && ((this.owner == null && other.getOwner() == null) || (this.owner != null && this.owner.equals(other
                        .getOwner())))
                && ((this.ownerPermission == null && other.getOwnerPermission() == null) || (this.ownerPermission != null && this.ownerPermission
                        .equals(other.getOwnerPermission())))
                && ((this.arrayOfUserPermissions == null && other.getArrayOfUserPermissions() == null) || (this.arrayOfUserPermissions != null && this.arrayOfUserPermissions
                        .equals(other.getArrayOfUserPermissions())))
                && ((this.arrayOfGroupPermissions == null && other.getArrayOfGroupPermissions() == null) || (this.arrayOfGroupPermissions != null && this.arrayOfGroupPermissions
                        .equals(other.getArrayOfGroupPermissions())))
                && ((this.otherPermission == null && other.getOtherPermission() == null) || (this.otherPermission != null && this.otherPermission
                        .equals(other.getOtherPermission())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;

    public synchronized int hashCode()
    {
        if (__hashCodeCalc)
        {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getSurl() != null)
        {
            _hashCode += getSurl().hashCode();
        }
        if (getStatus() != null)
        {
            _hashCode += getStatus().hashCode();
        }
        if (getOwner() != null)
        {
            _hashCode += getOwner().hashCode();
        }
        if (getOwnerPermission() != null)
        {
            _hashCode += getOwnerPermission().hashCode();
        }
        if (getArrayOfUserPermissions() != null)
        {
            _hashCode += getArrayOfUserPermissions().hashCode();
        }
        if (getArrayOfGroupPermissions() != null)
        {
            _hashCode += getArrayOfGroupPermissions().hashCode();
        }
        if (getOtherPermission() != null)
        {
            _hashCode += getOtherPermission().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
            TPermissionReturn.class, true);

    static
    {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://srm.lbl.gov/StorageResourceManager",
                "TPermissionReturn"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("surl");
        elemField.setXmlName(new javax.xml.namespace.QName("", "surl"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "anyURI"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("status");
        elemField.setXmlName(new javax.xml.namespace.QName("", "status"));
        elemField
                .setXmlType(new javax.xml.namespace.QName("http://srm.lbl.gov/StorageResourceManager", "TReturnStatus"));
        elemField.setMinOccurs(0);
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("owner");
        elemField.setXmlName(new javax.xml.namespace.QName("", "owner"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("ownerPermission");
        elemField.setXmlName(new javax.xml.namespace.QName("", "ownerPermission"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://srm.lbl.gov/StorageResourceManager",
                "TPermissionMode"));
        elemField.setMinOccurs(0);
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("arrayOfUserPermissions");
        elemField.setXmlName(new javax.xml.namespace.QName("", "arrayOfUserPermissions"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://srm.lbl.gov/StorageResourceManager",
                "ArrayOfTUserPermission"));
        elemField.setMinOccurs(0);
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("arrayOfGroupPermissions");
        elemField.setXmlName(new javax.xml.namespace.QName("", "arrayOfGroupPermissions"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://srm.lbl.gov/StorageResourceManager",
                "ArrayOfTGroupPermission"));
        elemField.setMinOccurs(0);
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("otherPermission");
        elemField.setXmlName(new javax.xml.namespace.QName("", "otherPermission"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://srm.lbl.gov/StorageResourceManager",
                "TPermissionMode"));
        elemField.setMinOccurs(0);
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc()
    {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(java.lang.String mechType,
            java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
    {
        return new org.apache.axis.encoding.ser.BeanSerializer(_javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(java.lang.String mechType,
            java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
    {
        return new org.apache.axis.encoding.ser.BeanDeserializer(_javaType, _xmlType, typeDesc);
    }

}


text:
import { injectReducer } from '../../store/reducers'

export default (store) => ({
  path: 'async',
  /*  Async getComponent is only invoked when route matches   */
  getComponent (nextState, cb) {
    /*  Webpack - use 'require.ensure' to create a split point
        and embed an async module loader (jsonp) when bundling   */
    require.ensure([], (require) => {
      /*  Webpack - use require callback to define
          dependencies for bundling   */
      const Async = require('./containers/AsyncContainer').default
      const reducer = require('./modules/async').default

      /*  Add the reducer to the store on key 'counter'  */
      injectReducer(store, { key: 'async', reducer })

      /*  Return getComponent   */
      cb(null, Async)

    /* Webpack named bundle   */
    }, 'async')
  }
})


text:
package org.carlspring.strongbox.yaml.configuration.repository;

import org.carlspring.strongbox.providers.layout.NugetLayoutProvider;
import org.carlspring.strongbox.yaml.repository.CustomRepositoryConfiguration;
import org.carlspring.strongbox.yaml.repository.CustomRepositoryConfigurationDto;

import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * @author carlspring
 * @author Pablo Tirado
 */
@JsonTypeName(NugetLayoutProvider.ALIAS)
public class NugetRepositoryConfigurationDto
        extends CustomRepositoryConfigurationDto implements NugetRepositoryConfiguration
{
    private String feedVersion = "2.0";

    private Integer remoteFeedPageSize;

    public String getFeedVersion()
    {
        return feedVersion;
    }

    public void setFeedVersion(String feedVersion)
    {
        this.feedVersion = feedVersion;
    }

    public Integer getRemoteFeedPageSize()
    {
        return remoteFeedPageSize;
    }

    public void setRemoteFeedPageSize(Integer remoteFeedPageSize)
    {
        this.remoteFeedPageSize = remoteFeedPageSize;
    }

    @Override
    public CustomRepositoryConfiguration getImmutable()
    {
        return new NugetRepositoryConfigurationData(this);
    }
}


text:
package com.jvmhub.tutorial;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;

import users.Users;
import users.UsersController;

public class App {
	private static SessionFactory ourSessionFactory;
    private static ServiceRegistry serviceRegistry;
    public static void main(String[] args) {
		try {
			StartDB();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		Users nazanin = UsersController.getByUserName("nazanin");
		nazanin.make_a_consult("biorze", "1394/01/03", "vai azizam", "love");
	}

	public static void StartDB() throws Exception {
		try {
            Configuration configuration = new Configuration();
            configuration.configure();
            error("1");
            serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();
            error("2");
            ourSessionFactory = configuration.buildSessionFactory(serviceRegistry);
        } catch (Throwable ex) {
            throw new ExceptionInInitializerError(ex);
        }

		error("chetori?");
		Session session = ourSessionFactory.openSession();
		error("salam");
		session.beginTransaction();
		session.getTransaction().commit();
		session.close();

//		AppUser user = new AppUser("firstuser");
//		session.save(user);
//		GeneralDoctor u  = new GeneralDoctor(12134, "kehsani", "salam", "gisha", "986978978958", "kiana",
//				"ehsani", "chera?", "injuri");
//		GeneralDoctor d = new GeneralDoctor(1212, "hg", "hjg", "jhg", "9879878978977", "jgj", "jgfgh", "jgj", "hgfh");
//		Patient p = new Patient(110001, "vaAleik", "hh",
//				"kjk", "879980980687", "kjhjk", "kjhjk", "kjhjk", "jkhkj");
//		Doctor doc1 = new GeneralDoctor(6571, "doc1", "123", "hameja", "123456768877", "namedocyek", "famdocyek", "y?", "bashe");
//		Patient p2 = new Patient(76712, "pat1", "123", "ja", "548974239847", "namepayek", "fampayek", "?", "da");
//
//
//		Medicate m = new Medicate(d.getUsername(), p.getUsername());
//		MedicateDB.save(m);
//		m = new Medicate(d.getUsername(), p2.getUsername());
//		MedicateDB.save(m);
//		m = new Medicate(doc1.getUsername(), p2.getUsername());
//		MedicateDB.save(m);
//		d.accept_patient(p2);
//		GeneralDoctor d = (GeneralDoctor) UsersDB.getByUserName("biorze");
//		new Consult("biorze", "nazanin", "13920101", "salam khubi");
//		d.accept_patient("nazanin");
//		d.accept_patient("kiana");
//		System.out.println(d.get_unaccepted_requests().size());;
//		ArrayList<Patient> plist =  MedicateDBPersistent.patient_from_doctor("hg", false);
//		for(Patient r : plist)
//		{
//			error(r.getUsername() + " " + r.getName());
//		}
//		new BodyInfo("biorze", "nazanin", 100, 200, 2.4, 10);

	}
	public static Session get_session(){
		return ourSessionFactory.openSession();
	}
	public static void error(String s){
		System.out.println(s);
	}
}


text:
@echo off
:: TIM
:: ------------------
:: MIGRATIONPREP.BAT
:: ------------------

:: Check installed progs list. Export to file.
:: Prompt to Disable A/V temporarily. (CAN WE USE A FLAG FROM WINDOWS DEFENDER TO TEST AND NOT STOP EXECUTION UNTIL RESTARTED AT THE END?)
:: Check for saved passwords in browsers
:: Check for saved Networking indfformation
::   - Static IP
::   - WiFi Passwords
::   - Dump to file
:: Check for current User Profile settings in each user
::   - Desktop icons
::   - Desktop BG
::   - Mouse settings
::   - Text size settings
::   - Default browser settings
:: Check for Email app, calendar and contacts information
::   - Check for WinLiveMail
::       - Export Mailboxes
::       - Export Calendar
::       - Export Address Book
::   - Check for Outlook
::       - Export Mailboxes
::       - Export Calendar
::       - Export Address Book
::   - Check for Thunderbird
::       - Export Mailboxes
::       - Export Calendar
::       - Export Address Book

:: BatchGotAdmin
:-------------------------------------
::  --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

:: --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0"
:--------------------------------------

    SETLOCAL EnableDelayedExpansion
    color 1f
    mode 100,35
	title CleanTech - Prep Stage

	cls

	set horiz_line=-
	set dash=-

	for /L %%i in (0,1,88) do (
		set horiz_line=-!horiz_line!
	)

	echo %horiz_line%
	echo CleanTech - Prep Stage
	echo %horiz_line%
	echo,


text:
package org.todss.client.test.model;

import javafx.beans.Observable;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.collections.ObservableMap;
import javafx.util.Callback;
import org.todss.algorithm.model.Alarm;
import org.todss.algorithm.model.Frequency;

public class Preset {
    private StringProperty name = new SimpleStringProperty();
    private Alarm[] alarms = new Alarm[2];
    private boolean[] alarmStatuses = new boolean[2];
    private Frequency frequency;
    private int margin = 0;
    private ObservableMap<FXTravel, Boolean> travels = FXCollections.observableHashMap();

    public Preset(String name) {
        setName(name);
    }

    public String getName() {
        return name.get();
    }

    public void setName(String name) {
        this.name.set(name);
    }

    public void setAlarm(int index, Alarm alarm, boolean status) {
        alarms[index] = alarm;
        alarmStatuses[index] = status;
    }

    public Alarm[] getAlarms() {
        return alarms;
    }

    public ObservableMap<FXTravel, Boolean> getTravels() {
        return travels;
    }

    public ObservableList<FXTravel> getTravelList() {
        ObservableList<FXTravel> list = FXCollections.observableArrayList(FXTravel.extractor());
        list.addAll(travels.keySet());

        return list;
    }

    public boolean isTravelActive(FXTravel travel) {
        try {
            return travels.get(travel);
        } catch (Exception e) {
            return false;
        }
    }

    public void setTravelActive(FXTravel travel, boolean status) {
        travels.put(travel, status);
    }

    public void addTravel(FXTravel travel, boolean status) {
        travels.put(travel, status);
    }

    public void removeTravel(FXTravel travel) {
        travels.remove(travel);
    }

    static Callback<Preset, Observable[]> extractor() {
        return (Preset p) -> new Observable[]{ p.name };
    }

    @Override
    public String toString() {
        return getName();
    }
}


text:
require 'rails_helper'

RSpec.describe "hyrax/base/_representative_media.html.erb" do
  let(:presenter) { instance_double(ScannedResourceShowPresenter, member_presenters: member_presenters, id: "1", persisted?: true, model_name: ScannedResource.model_name) }
  let(:member_presenters) { [] }
  let(:can_manifest) { true }
  before do
    allow(presenter).to receive(:to_model).and_return(presenter)
    allow(view).to receive(:can?).with(:manifest, presenter).and_return(can_manifest)
    assign(:manifest_uri, 'http://localhost')
    render partial: "hyrax/base/representative_media", locals: { presenter: presenter }
  end
  context "when there are no generic files" do
    it "shows a filler" do
      expect(response).to have_selector "img[src='/assets/nope.png']"
    end
  end
  context "when there are generic files" do
    let(:member_presenters) { [1] }
    it "renders the viewer" do
      assign(:manifest, test: 'test')
      render partial: "hyrax/base/representative_media", locals: { presenter: presenter }

      expect(response).to have_selector ".viewer[data-uri]"
    end
    context "and the user doesn't have permission to manifest" do
      let(:can_manifest) { false }
      it "doesn't render the viewer" do
        expect(response).to have_selector "img[src='/assets/nope.png']"
      end
    end

    context "without a valid IIIF Manifest" do
      before do
        assign(:manifest, nil)
      end

      it "does not render the viewer" do
        expect(response).not_to have_selector ".viewer[data-uri]"
      end
    end
  end
end


text:
/*
	ADDRESS RESOLUTION PROTOCOL

  This protocol is used to discover the local hardware address for machines
  given their IP address.

  Our goal is to report the mapping of IP address to MAC address. Some of the
  bits of data we discover will be tied to a MAC address only (such as wifi
  probes), others will be tied to an IP address.

  TODO: Eventually we'll keep a table of mappings so that we can detect when
  the mappings change, such as when one person logs off and another person
  logs on, and is given the IP address of the previous person. We need to
  create a "break" at this point, so that we don't accidentally associate
  different people with the same IP address
*/
#include "util-platform.h"
#include "stack-frame.h"
#include "util-extract.h"
#include "squirrel.h"
#include <stdio.h>
#include "util-annexk.h"

/*
    Ethernet transmission layer (not necessarily accessible to
	 the user):
	48.bit: Ethernet address of destination
	48.bit: Ethernet address of sender
	16.bit: Protocol type = ether_type$ADDRESS_RESOLUTION
    Ethernet packet data:
	16.bit: (ar$hrd) Hardware address space (e.g., Ethernet,
			 Packet Radio Net.)
	16.bit: (ar$pro) Protocol address space.  For Ethernet
			 hardware, this is from the set of type
			 fields ether_typ$<protocol>.
	 8.bit: (ar$hln) byte length of each hardware address
	 8.bit: (ar$pln) byte length of each protocol address
	16.bit: (ar$op)  opcode (ares_op$REQUEST | ares_op$REPLY)
	nbytes: (ar$sha) Hardware address of sender of this
			 packet, n from the ar$hln field.
	mbytes: (ar$spa) Protocol address of sender of this
			 packet, m from the ar$pln field.
	nbytes: (ar$tha) Hardware address of target of this
			 packet (if known).
	mbytes: (ar$tpa) Protocol address of target.
	*/

void squirrel_arp(struct Squirrel *squirrel, struct StackFrame *frame, const unsigned char *px, unsigned length)
{
	unsigned layer2_address_type;
	unsigned layer2_address_length;
	unsigned layer3_address_type;
	unsigned layer3_address_length;
	unsigned opcode;
	unsigned ip_src;
	unsigned ip_dst;
	const unsigned char *mac_src;
	const unsigned char *mac_dst;
	char ip_text[16];

	if (length < 8) {
		FRAMERR(frame, "%s: truncated\n", "ARP");
		return;
	}

	layer2_address_type = ex16be(px+0);
	layer3_address_type = ex16be(px+2);
	layer2_address_length = px[4];
	layer3_address_length = px[5];
	opcode = ex16be(px+6);

	if (layer2_address_type != 0x0001) {
		FRAMERR(frame, "%s: unknown\n", "ARP");
	}
	if (layer2_address_length != 0x06) {
		FRAMERR(frame, "%s: unknown\n", "ARP");
		return; /* Even if the type is not Ethernet, we'll continue, but the MAC address must be 6 bytes long, or we fail*/
	}

	if (layer3_address_type != 0x0800) {
		FRAMERR(frame, "%s: unknown\n", "ARP");
		return; /* If it's not IP, then ignore it */
	}
	if (layer3_address_length != 0x04) {
		FRAMERR(frame, "%s: unknown\n", "ARP");
		return; /* If IP addresses are not 4-bytes, then leave. TODO: what about 16 bytes addresses in ARP? */
	}
	if (opcode != 1 && opcode != 2) {
		FRAMERR(frame, "%s: unknown\n", "ARP");
		return;
	}

	mac_src = px+8;
	ip_src = ex32be(px+8+layer2_address_length);
	mac_dst = px+8+layer2_address_length+layer3_address_length;
	ip_dst = ex32be(px+8+layer2_address_length+layer3_address_length+layer2_address_length);

    if (ip_src == 0)
        return;

    switch (opcode) {
    case 1:
    case 2:
		sprintf_s(ip_text, sizeof(ip_text), "%u.%u.%u.%u",
			(ip_src>>24)&0xFF,
			(ip_src>>16)&0xFF,
			(ip_src>> 8)&0xFF,
			(ip_src>> 0)&0xFF
			);
		sqdb_add_info(squirrel->sqdb,
                      mac_src,
                      frame->wifi.bss_mac,
                      "ip",
                      ip_text, -1);
        break;
    }

}


text:
// @ts-check

import { SString } from './SString.js';
import { universe } from '../vm/Universe.js';
import { isOperator } from '../compiler/Lexer.js';

export class SSymbol extends SString {
  constructor(value) {
    super(value);
    this.numberOfSignatureArguments = this.determineNumberOfSignatureArguments();
  }

  getClass() {
    return universe.symbolClass;
  }

  getString() {
    // Get the string associated to this symbol
    return this.value;
  }

  determineNumberOfSignatureArguments() {
    // Check for binary signature
    if (this.isBinarySignature()) {
      return 2;
    }
    // Count the colons in the signature string
    let numberOfColons = 0;

    // Iterate through every character in the signature string
    for (let i = 0; i < this.value.length; i += 1) {
      if (this.value.charAt(i) === ':') { numberOfColons += 1; }
    }

    // The number of arguments is equal to the number of colons plus one
    return numberOfColons + 1;
  }

  toString() {
    return `#${this.value}`;
  }

  getNumberOfSignatureArguments() {
    return this.numberOfSignatureArguments;
  }

  isBinarySignature() {
    // Check the individual characters of the string
    for (const c in this.value) {
      if (!isOperator(c)) { return false; }
    }
    return true;
  }
}


text:
__doc__="""
Copy sidebearings from one font to another.
"""

import vanilla, math
windowHeight = 185

class MetricsCopy( object ):
	"""GUI for copying glyph metrics from one font to another"""

	def __init__( self ):
		self.listOfMasters = []
		self.updateListOfMasters()

		self.w = vanilla.FloatingWindow( (400, windowHeight), "Steal Sidebearings", minSize=(350, windowHeight), maxSize=(650, windowHeight), autosaveName="com.mekkablue.MetricsCopy.mainwindow" )

		self.w.text_anchor = vanilla.TextBox( (15, 12+2, 130, 17), "Copy metrics from:", sizeStyle='small')
		self.w.from_font = vanilla.PopUpButton( (150, 12, -15, 17), self.listOfMasterNames(), sizeStyle='small', callback=self.buttonCheck)

		self.w.text_value = vanilla.TextBox( (15, 12+2+25, 130, 17), "To selected glyphs in:", sizeStyle='small')
		self.w.to_font = vanilla.PopUpButton( (150, 12+25, -15, 17), self.listOfMasterNames()[::-1], sizeStyle='small', callback=self.buttonCheck)

		self.w.lsb   = vanilla.CheckBox( ( 17, 12+50, 80, 20), "LSB", value=True, callback=self.buttonCheck, sizeStyle='small' )
		self.w.rsb   = vanilla.CheckBox( ( 97, 12+50, 80, 20), "RSB", value=True, callback=self.buttonCheck, sizeStyle='small' )
		self.w.width = vanilla.CheckBox( (177, 12+50, 80, 20), "Width", value=False, callback=self.buttonCheck, sizeStyle='small' )

		self.w.ignoreSuffixes  = vanilla.CheckBox( (15+2, 12+75, 110, 20), "Ignore dotsuffix:", value=False, sizeStyle='small', callback=self.buttonCheck )
		self.w.suffixToBeIgnored = vanilla.EditText( (150, 12+75, -15, 20), ".alt", sizeStyle = 'small')

		self.w.keepWindowOpen  = vanilla.CheckBox( (15+2, 12+100, 150, 20), "Keep this window open", value=False, sizeStyle='small' )

		self.w.copybutton = vanilla.Button((-80, -32, -15, 17), "Copy", sizeStyle='small', callback=self.copyMetrics)
		self.w.setDefaultButton( self.w.copybutton )

		if not self.LoadPreferences( ):
			self.outputError( "Could not load preferences at startup. Will resort to defaults." )

		self.w.open()
		self.w.makeKey()

		self.buttonCheck( None )

	def updateListOfMasters( self ):
		try:
			masterList = []

			for thisFont in Glyphs.fonts:
				for thisMaster in thisFont.masters:
					masterList.append( thisMaster )

			masterList.reverse() # so index accessing works as expected, and the default is: current font = target
			self.listOfMasters = masterList
		except:
			print traceback.format_exc()

	def listOfMasterNames( self ):
		try:
			myMasterNameList = [
				"%i: %s - %s" % (
					i+1,
					self.listOfMasters[i].font().familyName,
					self.listOfMasters[i].name
				) for i in range(len( self.listOfMasters ))
			]
			return myMasterNameList
		except:
			print traceback.format_exc()

	def outputError( self, errMsg ):
		print "Steal Sidebearings Warning:", errMsg

	def buttonCheck( self, sender ):
		try:
			# check if both font selection point to the same font
			# and disable action button if they do:
			fromFont = self.w.from_font.getItems()[ self.w.from_font.get() ]
			toFont   = self.w.to_font.getItems()[ self.w.to_font.get() ]

			if fromFont == toFont:
				self.w.copybutton.enable( onOff=False )
			else:
				self.w.copybutton.enable( onOff=True )

			# check if checkbox is enabled
			# and sync availability of text box
			suffixCheckBoxChecked = self.w.ignoreSuffixes.get()
			if suffixCheckBoxChecked:
				self.w.suffixToBeIgnored.enable( onOff=True )
			else:
				self.w.suffixToBeIgnored.enable( onOff=False )

			# All of LSB, RSB and Width must not be on at the same time:
			if self.w.rsb.get() and self.w.lsb.get() and self.w.width.get():
				if sender == self.w.rsb:
					self.w.width.set(False)
				else:
					self.w.rsb.set(False)

			if not self.SavePreferences( self ):
				self.outputError( "Could not save preferences." )
		except:
			print traceback.format_exc()

	def SavePreferences( self, sender ):
		try:
			Glyphs.defaults["com.mekkablue.MetricsCopy.ignoreSuffixes"] = self.w.ignoreSuffixes.get()
			Glyphs.defaults["com.mekkablue.MetricsCopy.suffixToBeIgnored"] = self.w.suffixToBeIgnored.get()
			Glyphs.defaults["com.mekkablue.MetricsCopy.rsb"] = self.w.rsb.get()
			Glyphs.defaults["com.mekkablue.MetricsCopy.lsb"] = self.w.lsb.get()
			Glyphs.defaults["com.mekkablue.MetricsCopy.width"] = self.w.width.get()
			return True
		except:
			return False

	def LoadPreferences( self ):
		try:
			self.w.ignoreSuffixes.set( Glyphs.defaults["com.mekkablue.MetricsCopy.ignoreSuffixes"] )
			self.w.suffixToBeIgnored.set( Glyphs.defaults["com.mekkablue.MetricsCopy.suffixToBeIgnored"] )
			self.w.lsb.set( Glyphs.defaults["com.mekkablue.MetricsCopy.lsb"] )
			self.w.rsb.set( Glyphs.defaults["com.mekkablue.MetricsCopy.rsb"] )
			self.w.width.set( Glyphs.defaults["com.mekkablue.MetricsCopy.width"] )
			return True
		except:
			return False

	def transform(self, shiftX=0.0, shiftY=0.0, rotate=0.0, skew=0.0, scale=1.0):
		"""
		Returns an NSAffineTransform object for transforming layers.
		Apply an NSAffineTransform t object like this:
			Layer.transform_checkForSelection_doComponents_(t,False,True)
		Access its transformation matrix like this:
			tMatrix = t.transformStruct() # returns the 6-float tuple
		Apply the matrix tuple like this:
			Layer.applyTransform(tMatrix)
			Component.applyTransform(tMatrix)
			Path.applyTransform(tMatrix)
		Chain multiple NSAffineTransform objects t1, t2 like this:
			t1.appendTransform_(t2)
		"""
		myTransform = NSAffineTransform.transform()
		if rotate:
			myTransform.rotateByDegrees_(rotate)
		if scale != 1.0:
			myTransform.scaleBy_(scale)
		if not (shiftX == 0.0 and shiftY == 0.0):
			myTransform.translateXBy_yBy_(shiftX,shiftY)
		if skew:
			skewStruct = NSAffineTransformStruct()
			skewStruct.m11 = 1.0
			skewStruct.m22 = 1.0
			skewStruct.m21 = math.tan(math.radians(skew))
			skewTransform = NSAffineTransform.transform()
			skewTransform.setTransformStruct_(skewStruct)
			myTransform.appendTransform_(skewTransform)
		return myTransform

	def copyMetrics(self, sender):
		fromFontIndex  = self.w.from_font.get()
		toFontIndex    = self.w.to_font.get() * -1 - 1
		sourceMaster   = self.listOfMasters[ fromFontIndex ]
		targetMaster   = self.listOfMasters[ toFontIndex ]
		sourceMasterID = sourceMaster.id
		targetMasterID = targetMaster.id
		sourceFont     = sourceMaster.font()
		targetFont     = targetMaster.font()
		ignoreSuffixes = self.w.ignoreSuffixes.get()
		lsbIsSet = self.w.lsb.get()
		rsbIsSet = self.w.rsb.get()
		widthIsSet = self.w.width.get()
		suffixToBeIgnored = self.w.suffixToBeIgnored.get().strip(".")
		selectedLayers = targetFont.selectedLayers

		print "Copying %i glyph metrics from %s %s to %s %s:" % (
				len(selectedLayers),
				sourceFont.familyName, sourceMaster.name,
				targetFont.familyName, targetMaster.name
			)

		for thisLayer in [ targetFont.glyphs[l.parent.name].layers[targetMasterID] for l in selectedLayers ]:
			try:
				glyphName = thisLayer.parent.name

				if ignoreSuffixes:
					# replace suffix in the middle of the name:
					glyphName = glyphName.replace( ".%s." % suffixToBeIgnored, "." )

					# replace suffix at the end of the name:
					if glyphName.endswith( ".%s" % suffixToBeIgnored ):
						glyphName = glyphName[:-len(suffixToBeIgnored)-1]

				sourceLayer = sourceFont.glyphs[ glyphName ].layers[ sourceMasterID ]

				if lsbIsSet:
					thisLayer.setLSB_( sourceLayer.LSB )
				if widthIsSet:
					thisLayer.setWidth_( sourceLayer.width )
					if rsbIsSet:
						shift = thisLayer.RSB - sourceLayer.RSB
						shiftTransform = self.transform(shiftX=shift)
						thisLayer.transform_checkForSelection_doComponents_(shiftTransform,False,True)
				elif rsbIsSet:
					thisLayer.setRSB_( sourceLayer.RSB )

				print "     %i <- %s -> %i (w: %i)" % ( thisLayer.LSB, glyphName, thisLayer.RSB, thisLayer.width )
			except Exception, e:
				if "'objc.native_selector' object has no attribute 'name'" not in e: # CR in the selection string
					print "Error:", e

		if not self.w.keepWindowOpen.get():
			self.w.close()

MetricsCopy()