193 Matching Annotations
  1. Last 7 days
  2. Oct 2019
  3. Sep 2019
  4. Aug 2019
    1. intern

      sys.intern in Python3

    2. ascii letters, digits or underscores

      String composed of these characters are interned. Aka the following will not be interned:

      f = 'f o'

      but the following will be interned:

      f = 'f_o'

    3. sequences generated through peephole optimization are discarded if their length is superior to 20

      So values generated via peephole optimization above 20 are not 'pre-computed' but left as is:

      'a' * 21 # remains in the byte code where as
      'a' * 20 # gets converted to 'aaaaaaaaaaaaaaaaaaaa'
      
    4. string subclasses cannot be interned

      Meaning

      class NewString(str):
         pass
      assert NewString('f') is 'f'
      

      Will fail. Where as:

      f = 'f'
      assert f is 'f'
      

      Will pass.

      This is presents a case for not building custom string types in Python as it breaks the string cache and can result in a performance hit.

    5. strings can be compared by a O(1) pointer comparison instead of a O(n) byte-per-byte comparison

      This is a huge advantage. Not only does it save memory by not duplicating simple and common string values, but the comparison method has an early exit that compares the pointers instead of the values. aka in sudo-code form:

      // compare pointers
      if self._value is value:
         return True
      
      // compare values
      for i, v in enumerate(self._value):
         if v != value[i]:
            return False
      return True
      
    1. Centric web solution is the renowned best web development company.

      We have a very highly experienced and expert development team who are experts in web design & development.

      We provide various services like Wordpress web development, eCommerce web development, Wordpress theme design and plugin development, website maintenance & optimization.

      For more our services call us on +91 98587 58541 or visit our website https://www.centricwebsolution.com/.

      Our Services Are:-

      • Web Design & Development
      • WordPress Development
      • WooCommerce Development
      • Custom Web Application Development
      • Website Migration Services
      • Website Maintenance & Performance optimization
      • Website Plugin and API Development
      • Website Store Optimization
      • PHP Web Development
      • Enterprise Web Application Development
      • Laravel Development Services
      • Angularjs Development Services

  5. Jul 2019
    1. Performance assessment does not have to be a time-consuming ordeal; it is a great way to assess our students' skills. It is essential to create a rubric that is simple, quick, and objective. This article discusses the process of creating a rubric as well as showing a rubric used by the author in her general music classroom for several years. Differences between assessment and evaluation are also mentioned.

      How to create a rubric for performance assessment?

  6. hal.archives-ouvertes.fr hal.archives-ouvertes.fr