Casey C


in progress



Home

Project

Blog

GitHub

LinkedIn

  1. __ init __() is what’s called when a user wants to create an instance of a class.
  2. self is a way to refer to a class instance even though we don’t know what the user is actually going to name their instance. When defining typical class instance methods, like __ init __(), self is the first argument. However, if you recall an instance, when using __ init __(), the user doesn’t need to pass a value to this self argument; this is done automatically behind the scenes.
  3. Every commit to a repository has a unique identifier called a hash (since it is generated by running the changes through a pseudo-random number generator called a hash function). This hash is normally written as a 40-character hexadecimal string like 7c35a3ce607a14953f070f0f83b5d74c2296ef93, but most of the time, you only have to give Git the first 6 or 8 characters in order to identify the commit you mean. Hashes are what enable Git to share data efficiently between repositories. If two files are the same, their hashes are guaranteed to be the same. Similarly, if two commits contain the same files and have the same ancestors, their hashes will be the same as well. Git can therefore tell what information needs to be saved where by comparing hashes rather than comparing entire files.
  4. pd.query(‘_____ ‘)
    df = pd.DataFrame(np.random.randn(10, 2), columns=list('ab'))
    df.query('a > b')
    df[df.a > df.b]   # same result as the previous expression
    
  5. To create strings that span multiple lines, triple single quotes ‘’’ or triple double quotes “”” are used to enclose the string.
  6. JSON(JavaScript Object Notation) represents data as nested “lists” and “dictionaries”.
  7. REST(Representational state transfer) is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to the REST architectural style, called RESTful Web services(RWS), provide interoperability between computer systems on the Internet. RWS allow the requesting systems to access and manipulate textual representations of Web resources by using a uniform and predefined set of stateless operations. In RWS, requests made to a resource’s URL will elicit a response with a payload formmatted in HTML, XML, JSON, or some other format. The response can confirm that some alteration has been made to the stored resource, and the response can provide hypertext links to other related resources or collections of resources. When HTTP is used, as is most common, the operations(HTTP methods) available are GET, HEAD, POST, PUT, PATCH, DELETE, CONNECT, OPTIONS and TRACE.
  8. unsigned INT: all integer types can have an optional(nonstandard) attribute UNSIGNED. Unsigned type can be used to permit only nonnegative numbers in a column or when you need a larger upper numeric range for the column. If an INT is unsigned, the size of the column’s range is the same but its endpoints shift from -2^31 and 2^31-1 up to 0 and 2^32-1.
  9. CDN: short for content delivery network. It is a system of distributed servers(network) that deliver pages and other web content to a user, based on the geographic locations of the user, the origin of the webpage and the content delivery server.