Returns the campaign number(s) for a given EPIC target. If target
    is not found, returns :py:obj:`None`.

    :param int EPIC: The EPIC number of the target.
435080
def Campaign(EPIC, **kwargs):
    '''
    

    '''

    campaigns = []
    for campaign, stars in GetK2Stars().items():
        if EPIC in [s[0] for s in stars]:
            campaigns.append(campaign)
    if len(campaigns) == 0:
        return None
    elif len(campaigns) == 1:
        return campaigns[0]
    else:
        return campaigns
1260798
def find_by_campaign(campaign_id, _connection=None, page_size=100,
        page_number=0, sort_by=enums.DEFAULT_SORT_BY,
        sort_order=enums.DEFAULT_SORT_ORDER):
        
        return connection.ItemResultSet(
            'find_videos_by_campaign_id', Video, _connection, page_size,
            page_number, sort_by, sort_order, campaign_id=campaign_id)
1147997
def campaign_name(self, campaign_name):
        
        if campaign_name is None:
            raise ValueError("Invalid value for `campaign_name`, must not be `None`")
        if campaign_name is not None and len(campaign_name) > 250:
            raise ValueError("Invalid value for `campaign_name`, length must be less than or equal to `250`")
        if campaign_name is not None and len(campaign_name) < 1:
            raise ValueError("Invalid value for `campaign_name`, length must be greater than or equal to `1`")

        self._campaign_name = campaign_name
188273
public static Predicate<Number> getGreater(Number target) {
		return number -> number.doubleValue() > target.doubleValue();
	}
880865
def get_chest(self, index=0):
        ''''''
        
        index += self.chest_cycle.position

        if index == self.chest_cycle.super_magical:
            return 'Super Magical'
        if index == self.chest_cycle.epic:
            return 'Epic'
        if index == self.chest_cycle.legendary:
            return 'Legendary'

        return CHESTS[index % len(CHESTS)]
1078339
def _get_candidates(self):
        
        candidates = np.where(self.dpp_vector == 0)
        return None if len(candidates[0]) == 0 else candidates[0]
738789
def srun(self):
        
        commands = self.campaign.process.get('commands', {})
        srun = find_executable(commands.get('srun', 'srun'))
        if six.PY2:
            srun = srun.encode('utf-8')
        return srun
183800
def get_campaign(self, campaign_id):
        
        api = self._get_api(update_service.DefaultApi)
        return Campaign(api.update_campaign_retrieve(campaign_id))
1227633
def search_target_obj(target):
    '''
    
    '''
    base_url = "http://asterank.com/api/skymorph/search?"

    if not isinstance(target, str):
        raise ValueError("The target arg you provided is not the type of str")
    else:
        base_url += "target=" + target

    return dispatch_http_get(base_url)
888624
public int getCount(Class target)
    {
        PersistenceBroker broker = ((HasBroker) odmg.currentTransaction()).getBroker();
        int result = broker.getCount(new QueryByCriteria(target));
        return result;
    }
890932
def get_target(self, target):
        
        if target not in self._target_cache:
            self._target_cache[target] = self._get_target(target)
        return self._target_cache[target]
21234
def Module(EPIC, campaign=None):
    '''
    

    '''

    channel = Channel(EPIC, campaign=campaign)
    nums = {2: 1, 3: 5, 4: 9, 6: 13, 7: 17, 8: 21, 9: 25,
            10: 29, 11: 33, 12: 37, 13: 41, 14: 45, 15: 49,
            16: 53, 17: 57, 18: 61, 19: 65, 20: 69, 22: 73,
            23: 77, 24: 81}
    for c in [channel, channel - 1, channel - 2, channel - 3]:
        if c in nums.values():
            for mod, chan in nums.items():
                if chan == c:
                    return mod
    return None
243164
def season(self):
        
        try:
            self._season
        except AttributeError:
            self._season = self._mission.Season(self.ID)
            if hasattr(self._season, '__len__'):
                raise AttributeError(
                    "Please choose a campaign/season for this target: %s." %
                    self._season)
        return self._season
65953
def GetCampaignFeeds(client, feed, placeholder_type):
  
  campaign_feed_service = client.GetService('CampaignFeedService', 'v201809')

  campaign_feeds = []
  more_pages = True

  selector = {
      'fields': ['CampaignId', 'MatchingFunction', 'PlaceholderTypes'],
      'predicates': [
          {
              'field': 'Status',
              'operator': 'EQUALS',
              'values': ['ENABLED']
          },
          {
              'field': 'FeedId',
              'operator': 'EQUALS',
              'values': [feed['id']]
          },
          {
              'field': 'PlaceholderTypes',
              'operator': 'CONTAINS_ANY',
              'values': [placeholder_type]
          }
      ],
      'paging': {
          'startIndex': 0,
          'numberResults': PAGE_SIZE
      }
  }

  while more_pages:
    page = campaign_feed_service.get(selector)

    if 'entries' in page:
      campaign_feeds.extend(page['entries'])

    selector['paging']['startIndex'] += PAGE_SIZE
    more_pages = selector['paging']['startIndex'] < int(page['totalNumEntries'])

  return campaign_feeds
136557
def get_benchmark_types(campaign):
    
    for benchmarks in campaign.benchmarks.values():
        for name, benchmark in benchmarks.items():
            if name != 'sbatch':  # exclude special sbatch name
                yield benchmark.type
667554
public Epic epic(String name, Project project) {
        return epic(name, project, null);
    }
239705
def followed_topic_num(self):
        
        if self.url is not None:
            tag = self.soup.find('div', class_='zm-profile-side-topics')
            if tag is not None:
                return int(re_get_number.match(
                    tag.parent.strong.text).group(1))
        return 0