Setting Up Resource
500344
def setup_resource(self):
        
        template = self.template
        variables = self.get_variables()

        tclass = variables['Class']
        tprops = variables['Properties']
        output = variables['Output']

        klass = load_object_from_string('troposphere.' + tclass)

        instance = klass.from_dict('ResourceRefName', tprops)

        template.add_resource(instance)
        template.add_output(Output(
            output,
            Description="A reference to the object created in this blueprint",
            Value=Ref(instance)
        ))
191843
def _setup_resources():
    
    target_procs = 10240
    cur_proc, max_proc = resource.getrlimit(resource.RLIMIT_NPROC)
    target_proc = min(max_proc, target_procs) if max_proc > 0 else target_procs
    resource.setrlimit(resource.RLIMIT_NPROC, (max(cur_proc, target_proc), max_proc))
    cur_hdls, max_hdls = resource.getrlimit(resource.RLIMIT_NOFILE)
    target_hdls = min(max_hdls, target_procs) if max_hdls > 0 else target_procs
    resource.setrlimit(resource.RLIMIT_NOFILE, (max(cur_hdls, target_hdls), max_hdls))
1037012
def setup!
      env = ::Librarian::Chef::Environment.new(project_path: Dir.pwd)
      @originalpath, env.config_db.local['path'] = env.config_db.local['path'], @tmpdir
      ::Librarian::Action::Resolve.new(env).run
      ::Librarian::Action::Install.new(env).run

      ::RSpec.configure { |config| config.cookbook_path = @tmpdir }
    end
1108971
public function setup(): void
    {
        $this->rtl = I18N::direction() === 'rtl';

        $this->rkeywords = '';

        // I18N: This is a report footer. %s is the name of the application.
        $this->generated_by = I18N::translate('Generated by %s', Webtrees::NAME . ' ' . Webtrees::VERSION);

        // Paper size - defaults to A4 if the report fails to define a size.
        [$this->page_width, $this->page_height] = self::PAPER_SIZES[$this->page_format] ?? self::PAPER_SIZES['A4'];
    }
974290
def _setup(self):
        

        cls = self.__class__
        cls._id_map = {}
        cls._name_map = {}
        for index, info in enumerate(cls._alternatives):
            if len(info) < 3:
                info = info + ({},)
                cls._alternatives[index] = info
            id_ = _build_id_tuple(info[2], info[1])
            cls._id_map[id_] = index
            cls._name_map[info[0]] = index
1286664
def _build_resource(self):
        """"""
        resource = {"name": self.name}

        if self.dns_name is not None:
            resource["dnsName"] = self.dns_name

        if self.description is not None:
            resource["description"] = self.description

        if self.name_server_set is not None:
            resource["nameServerSet"] = self.name_server_set

        return resource
219700
@Override
	protected void setup() throws MojoExecutionException {
		if (verbose) {
			getLog().info("Rox configuration is generated");
		}
		
		// Check if the ROX configuration is available
		if (roxActive && roxConfig != null) {
			// Check the ROX configuration file
			if (!roxConfig.exists() || !roxConfig.isFile() || !roxConfig.getAbsolutePath().endsWith(".yml")) {
				getLog().warn("The " + ROX_PROPERTIES_FILENAME + " configuration seems not to be a valid file or path is incorrect. Rox will be disabled.");
				roxActive = false;
			}
			else {
				try {
					// Prepare the resource to copy
					Resource r = new Resource();
					r.setFiltering(true);
					r.setDirectory(roxConfig.getParent());
					r.setIncludes(Arrays.asList(new String[] {roxConfig.getName()}));

					// Configure the resource filtering
					MavenResourcesExecution mre = new MavenResourcesExecution(
						Arrays.asList(new Resource[] {r}), getWorkingDirectory(), project, encoding, null, null, session
					);
					
					// Filter the resources
					mavenResourcesFiltering.filterResources(mre);
				}
				catch (MavenFilteringException mfe) {
					getLog().warn("Unable to filter the " + ROX_PROPERTIES_FILENAME + " file. Rox will be disabled.", mfe);
					roxActive = false;
				}
			}
		}
		else {
			getLog().info("No rox configuration to use");
			roxActive = false;
		}		
	}
523384
private static function setup()
    {
        $files = ['Routes', 'Setup', 'Response'];
        $folder = static::$root.'Setup'.'/';

        self::call($files, $folder);

        $files = ['Database', 'Panel', 'Security', 'Maintenance', 'Loggin', 'Translator', 'App', 'Robots'];
        $folder = static::$root.'Setup/Documentations'.'/';

        self::call($files, $folder);

        $files = ['AppSetupException'];
        $folder = static::$root.'Setup/Exceptions'.'/';

        self::call($files, $folder);
    }
245590
function setup() {
        $dataStore = new PersonalDataStoreStub();
        $this->eventStore = new TestEventStoreSpy();

        $this->container = new ContainerStub();
        $this->container->set(EventStore::class, $this->eventStore);

        $this->classMap  = new DomainEventClassMap();
        $this->commandBus = new ReflectionResolutionCommandBus($this->container);

        $this->serializer = new ReflectionBasedDomainEventSerializer(
            $this->classMap,
            new ValueSerializer($dataStore),
            $dataStore
        );
    }
298578
def start(self):
        """"""
        # Get specified resource.
        resource_list = getattr(self, f'{self.resource_type}_list')
        resource_action = getattr(resource_list, self.resource_action)
        resource_action(self.resource_name)
582972
def setup(self):
        """"""
        # If the app was invoked to specified to prepend the path, do so now
        if self.args.prepend_path:
            self._prepend_python_path(self.args.prepend_path)
651681
def setup(self):
        """"""
        if not self.networks():
            super(MCMCP, self).setup()
            for net in self.networks():
                AnimalSource(network=net)
1045340
protected function setUp()
    {
        if (empty($this->asset)) {
            return;
        }

        $this->asset = $this->normalizePath($this->asset);
        $this->realPath = $this->locateResource();

        // The asset has not been located, so the full path is the asset itself
        if (null === $this->realPath) {
            $this->realPath = $this->asset;
        }
        $this->absolutePath = $this->retrieveBundleWebFolder();
    }
658029
protected function setUp()
	{
		$this->bbcodeMonkey = new BBCodeMonkey($this->configurator);
		$this->collection   = new BBCodeCollection;
		$this->repositories = new RepositoryCollection($this->bbcodeMonkey);
		$this->repositories->add('default', __DIR__ . '/Configurator/repository.xml');
	}
894389
def setup(self):
        '''
        
        '''
        self.zoo_client.add_listener(self.state_listener)

        if self.ensure:
            self.zoo_client.ensure_path(self.my_file)
164246
def set_up
      @start = Hoiio::IVRBlock::Start.new @client
      @middle = Hoiio::IVRBlock::Middle.new @client
      @end = Hoiio::IVRBlock::End.new @client
    end
147975
def add_resources(self, resources):
    
    new_resources = self._build_resource_dictionary(resources)

    for key in new_resources:
      self._resources[key] = new_resources[key]
    self._dirty_attributes.add(u'resources')