Creates a new inline result of game type.

        Args:
            short_name (`str`):
                The short name of the game to use.
344650
async def game(
            self, short_name, *, id=None,
            text=None, parse_mode=(), link_preview=True,
            geo=None, period=60, contact=None, game=False, buttons=None
    ):
        
        result = types.InputBotInlineResultGame(
            id=id or '',
            short_name=short_name,
            send_message=await self._message(
                text=text, parse_mode=parse_mode, link_preview=link_preview,
                geo=geo, period=period,
                contact=contact,
                game=game,
                buttons=buttons
            )
        )
        if id is None:
            result.id = hashlib.sha256(bytes(result)).hexdigest()

        return result
192153
def _construct_result(left, result, index, name, dtype=None):
    
    out = left._constructor(result, index=index, dtype=dtype)
    out = out.__finalize__(left)
    out.name = name
    return out
1294411
def get_name_as_short_text(cls, name_field: cryptography.x509.Name) -> str:
        
        # Name_field is supposed to be a Subject or an Issuer; print the CN if there is one
        common_names = cls.get_common_names(name_field)
        if common_names:
            # We don't support certs with multiple CNs
            return common_names[0]
        else:
            # Otherwise show the whole field
            return cls.get_name_as_text(name_field)
422921
def bank_short_name(self):
        """"""
        entry = registry.get('bic').get(self.compact)
        if entry:
            return entry.get('short_name')
562532
def direct_command_short(self, command):
        """"""
        self.logger.info("direct_command_short: Command %s", command)
        command_url = (self.hub_url + '/3?' + command + "=I=0")
        return self.post_direct_command(command_url)
788786
def get_display_name(self, short=False):
        
        if self.location is None:
            return '[New file]'
        elif short:
            return os.path.basename(self.location)
        else:
            return self.location
11637
def new_product(self, name):
        
        n = self._product_cls(self, name, summary_cls=self._summary_cls)
        self.graph.add_node(n)
        self.products.append(n)
        return n
286819
def new(cls, cx, cy, shape_id, pic):
        
        inline = parse_xml(cls._inline_xml())
        inline.extent.cx = cx
        inline.extent.cy = cy
        inline.docPr.id = shape_id
        inline.docPr.name = 'Picture %d' % shape_id
        inline.graphic.graphicData.uri = (
            'http://schemas.openxmlformats.org/drawingml/2006/picture'
        )
        inline.graphic.graphicData._insert_pic(pic)
        return inline
531000
def show(ctx, short_name):
    
    wva = get_wva(ctx)
    subscription = wva.get_subscription(short_name)
    cli_pprint(subscription.get_metadata())
944456
def short_text__str(self, column_name, output_column_prefix):
        

        from ._ngram_counter import NGramCounter
        from ._tfidf import TFIDF

        return [NGramCounter(features=[column_name],
                             n = 3,
                             method = "character",
                             output_column_prefix = output_column_prefix),

                 TFIDF(features=[column_name],
                       min_document_frequency=0.01,
                       max_document_frequency=0.5,
                       output_column_prefix = output_column_prefix)]
927536
def _new_type(cls, args):
        

        fformat = ["%r" if f is None else "%s=%%r" % f for f in args]
        fformat = "(%s)" % ", ".join(fformat)

        class _ResultTuple(cls):
            __slots__ = ()
            _fformat = fformat
            if args:
                for i, a in enumerate(args):
                    if a is not None:
                        vars()[a] = property(itemgetter(i))
                del i, a

        return _ResultTuple
1302345
def text(short):
    """"""
    return indent(short, branch_method=html_block_tag, leaf_method=convert_line, pass_syntax=PASS_SYNTAX,
                  flush_left_syntax=FLUSH_LEFT_SYNTAX, flush_left_empty_line=FLUSH_LEFT_EMPTY_LINE,
                  indentation_method=find_indentation)
98197
public void setShortAttribute(String name, Short value) {
		ensureValue();
		Attribute attribute = new ShortAttribute(value);
		attribute.setEditable(isEditable(name));
		getValue().getAllAttributes().put(name, attribute);
	}
208635
public static Short getShort(short pValue) {
        if (pValue >= SHORT_LOWER_BOUND &&
                pValue <= SHORT_UPPER_BOUND) {
            return mShorts[((int) pValue) - SHORT_LOWER_BOUND];
        } else {
            return new Short(pValue);
        }
    }
49960
public void addNamedEvent (String shortName, Class<? extends ComponentSystemEvent> cls)
    {
        String key = shortName;
        Collection<Class<? extends ComponentSystemEvent>> eventList;
        
        // Per the spec, if the short name is missing, generate one.
        
        if (shortName == null)
        {
            key = getFixedName (cls);
        }
        
        eventList = events.get (key);
        
        if (eventList == null)
        {
            // First event registered to this short name.
            
            eventList = new LinkedList<Class<? extends ComponentSystemEvent>>();
            
            events.put (key, eventList);
        }
        
        eventList.add (cls);
    }
343932
def get_short_module_name(module_name, obj_name):
    
    scope = {}
    try:
        # Find out what the real object is supposed to be.
        exec('from %s import %s' % (module_name, obj_name), scope, scope)
        real_obj = scope[obj_name]
    except Exception:
        return module_name

    parts = module_name.split('.')
    short_name = module_name
    for i in range(len(parts) - 1, 0, -1):
        short_name = '.'.join(parts[:i])
        scope = {}
        try:
            exec('from %s import %s' % (short_name, obj_name), scope, scope)
            # Ensure shortened object is the same as what we expect.
            assert real_obj is scope[obj_name]
        except Exception:  # libraries can throw all sorts of exceptions...
            # get the last working module name
            short_name = '.'.join(parts[:(i + 1)])
            break
    return short_name
725651
def win_shortcut(source, link_name):
    
    if True:
        import ctypes
        kdll = ctypes.windll.LoadLibrary("kernel32.dll")
        code = 1 if isdir(source) else 0
        kdll.CreateSymbolicLinkA(source, link_name, code)
    else:
        import ctypes
        csl = ctypes.windll.kernel32.CreateSymbolicLinkW
        csl.argtypes = (ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_uint32)
        csl.restype = ctypes.c_ubyte
        flags = 1 if isdir(source) else 0
        retval = csl(link_name, source, flags)
        if retval == 0:
            #warn_msg = '[util_path] Unable to create symbolic link on windows.'
            #print(warn_msg)
            #warnings.warn(warn_msg, category=UserWarning)
            if checkpath(link_name):
                return True
            raise ctypes.WinError()