This lecture reviews basic material that you should know about defining and using classes, although it also presents some new (hopefully easy to understand) material that you may have not seen. Primarily this lecture discusses how to use the namespaces in class objects and their instance objects to store data as well as functions/methods.
[top]
When we define a class in a Python, we are binding the class name to an object representing the entire class. We call the class object to create a new object that is an instance of the class: Python constructs an empty instance object and then calls the ___init__ method defined in the class, (passing the new/empty instance object to the self parameter) to initialize the state of the instance object. Recall that all names in Python refer/are-bound to objects; so defining
class C: ...
creates the name C and binds it to an object representing the class C.
What names are attributes defined in a class object's namespace? I'm not talking about the instance objects that will be constructed from the class C, but the names in the namespace of the class object itself. Mostly, a class defines names that are bound to its methods (__init__, etc.), but later in this lecture we will discuss names representing class variables as well as class methods.
When we want to construct an object that is an instance of a class, we refer to a class object (typically by a name bound to it) followed by () and possibly arguments in these parentheses. Python does three things when constructing new instance objects:
It calls a special function that creates an object that is a new instance of the class. Note that this object automatically has an dictionary associated with it, with the name __dict__, but that dictionary starts empty.
It calls the __init__ method for the class, passing the object created in (1) to the first/self parameter of __init__ , and following this with all the other argument values in the parentheses used in the call to construct the state of this instance. Typically it assigns values to self/instance variables, storing the name/binding in __dict__ for the self object.
A reference to the object that was created in (1) and initialized in (2) is returned as the result of constructing the object: most likely this reference will be bound to a name: e.g., c = C(...) which means c refers to a newly constructed/initialized object of class C.
So if we call c = C(1,2) Python calls C.__init__(reference to new object,1,2) and binds c to refer to the newly constructed object somehow initialized by 1 and 2.
Note that we can define other names that can bind to/share the same class object. For example:
class C: def init(self): print('instance of C object initialized') self.m = 'starting' # initialize an instance/attribute name
D = C # C and D share the same class object x = C() # Use C to construct an instance of a class C object y = D() # Use D to construct an instance of a class C object
print(C,D,x,y) print(type(x), type(y), type(C), type(type(x)))
Running this script produces the following: the first two lines from calling __init__ twice, the next two from calling the two print statements above
instance of C object initialized instance of C object initialized <class '__main__.C'> <class '__main__.C'> <__main__.C object at 0x027B0E10> <__main__.C object at 0x02889C50> <class '__main__.C'> <class '__main__.C'> <class 'type'> <class 'type'>
Finally, if we print(x.m) or print(y.m) it prints 'starting'
We can use the type function to determine the type of any object. The objects x and y refer to are instances of the class C, defined in the main script. C (and all classes that we define) are instances of a special class called 'type'). So x is an instance of C, and C is an instance of 'type'.
[top]
All objects have namespaces, which are dictionaries in which names defined in that object are bound-to/associated-with values. Typically we write something like:
self.name = value
in the __init__ or any other method, to defined a name in the dictionary of the object self refers to, and bind that name (or update an exsting binding) to refer to value.
Now we illustrate a cruder way to add names to the namespace of an object. This way is not recommended now, but it furthers our understanding of objects and their namespaces in Python, and we will find concrete uses for this understanding later. Given class C defined above, we can write
c = C() print(c.__dict__) c.x = 1 c.y = 'two' c.__dict__['z'] = 3 print(c.__dict__) print(c.m, c.x, c.y, c.z)
Running this script produces
instance of C object initialized {'m': 'starting'} {'x': 1, 'y': 'two', 'm': 'starting', 'z': 3} starting 1 two 3
So, we have used two different forms for adding three names to the namespace/dictionary for the object that c refers to (which initially stores the name m, initialized by self.m = 'starting'). Adding names updates the object's __dict__. Writing object.name = value is equivalent to writing object.__dict__['name'] = value.
The object c has a __dict__ attribute that stores its namespace bindings. Each identifier for which we define an attribute for the object appears as a string keyword in __dict__.
Generally we don't initialize the namespace of an object this way; instead we use the automatically-called __init__ method and its self parameter to do the initialization. But really, the same thing is happening in __init__ below as was shown above.
class C: def init(self,initx,inity): print('instance of C object initialized') self.x = initx # value depends on the argument matching initx self.y = inity # value depends on the argument matching inity self.z = 3 # always the same object: 3
c = C(1,'two') print(c.\_\_dict\_\_)
Running this script produces the same results.
instance of C object initialized {'z': 3, 'y': 'two', 'x': 1}
The purpose of the __init__ method is to create all the attribute names needed by the object's methods and initializes them appropriately. Typically, once __init__ is called, no new names are added to the object's namespace (although Python allows additions, as illustrated in the prior section (c.x = 1) and some useful examples are illustrated later in this lecture as well). Every object constructed is likely to need exactly the same names: all the names used in the methods defined in the class; methods that process instance objects of the class. The __init__ method, which is automatically called by Python when an object is constructed, is a convenient place to localize the creation and initialization of all these attribute names.
So, for every assignment statement
self.name = value
Python puts an entry into the object's namespace (self.__dict_) with the key 'name' (keys are strings) associated with value. We can do this in the __init__ method or after the object is constructed: both ways are shown above. When self.name appears in an expression (e.g., a = self.name), Python substitutes the expression self.__dict__['name'] for the right hand side of the =, to retrieve the value of that name from the self object's namespace/dictionary.
If we try to access a non-existent attribute name (c.mumble in the class C above, which is translated into c.__dict__['mumble']), Python raises an exception. print(c.mumble) prints the exception as
AttributeError: 'C' object has no attribute 'mumble'
Note that some names defined in __init__ (z above) always receive the same initialization, so we don't need a parameter to initialize them. But often names need to be initialized to different values when different objects are constructed, so typically we add just enough parameters to the __init__ method to allow us to specify how those names with different values should be initialized.
Interlude: assert in initialization
Sometimes __init__ will ensure that a parameter is matched to an argument that stores a legal and reasonable value for it; if not, Python will raise an exception to indicate that the object being constructed cannot be properly initialized. Sometimes it raises an exception explicitly, using an if statement that tests for an illegal value. Sometimes it uses an assert statement for this purpose. Remember that the form of assert is:
assert boolean-test, string
which is equivalent to the slightly more verbose
if not boolean-test: raise AssertionError(string)
I suggest that the string argument to AssertionError should always contain 4 parts:
(1) The name of the class (if the problem occurs in the method of a class) or the name of the module (if the problem occurs in a function in a module)
(2) The name of the method/function that detects the problem (here __init__)
(3) A short description of the problem...
(4) ...including the values of the argument(s) that is causing the problem
For example, if class C included an __init__ method that required x's argument to be a positive integer, we could write __init__ as follows. We typically check all the arguments FIRST in this method, before binding any self/instance names.
def __init__(self,x): assert type(x) is int and x > 0, 'C.__init__: x('+str(x)+') must be an int and positive' ...
or
def __init__(self,x): assert type(x) is int and x > 0, 'C.__init__: x({v}) must be an int and positive'.format(v=x) ...
If so, calling C(-1) would result in the error message
C.__init__: x(-1) must be an int and positive
and calling C('abc') would result in the error message
C.__init__: x(abc) must be an int and positive
Such a message provides useful information to whoever is writing/debugging the program. In a well-written program, someone just using the program (possible not a programer) should not have to read/interpret such a message.
Question: if we wrote the assert as just x > 0, what exception would be raised by calling C('abc') and why? Why is the given assertion "better", even though it is less efficient to check?
We could be even more descriptive and write def init(self,x): assert type(x) is int, 'C.init: x('{v}') must be an int'.format(v=x) assert x > 0, 'C.init: x({v}) must be positive'.format(v=x)
Note that int refers to the int class (not an instance of an int class: e.g., not 1), so writing "type(x) is int" is checking whether the type of the object x refers to is the same as the object int refers to: meaning x is bound to an object constructed from the int class.
Once an object is constructed and initialized, typically we use it by calling methods (or possibly passing it to another function/method that calls its methods). We call an object's method using the syntax object.method(arguments); recall the Fundamental Equation of Object-Oriented Programming.
o.m(...) is translated into type(o).m(o,...)
This means, the method m in the class specifying the type of object o is called, and the object o used to call the method is passed to the method as the first argument (matching the self parameter). For example, 'a;b;c'.split(';') is translated into type('a;b;c').split('a;b;c',';') which is equivalent to str.split('a;b;c',';'). It calls the split method defined in the str class with the arguments 'a;b;c' (matching the self parameter) and ';' (matching the second parameter).
Before finishing the discussion of objects and their dictionaries, recall that C refers to a class object. As an object, it also has a __dict__ that stores its namespace. Here is some code that shows what names are defined in the C object.
for (k,v) in C.__dict__.items(): print(k,'->',v)
And here is what it prints.
__weakref__ ->
Note that __init__ is the only function that we defined, and it is there (on the 4th line). Because I ran this code as a script (the main module), its __module__ variable is bound to '__main__', which you should know something about, because you should have written (and understand) code like
if __module__ == '__main__': ...
If this module were imported, the __module__ key would be associated with the file/module name it was written in, when imported. Only the module corresponding to the script that started execution has its __module__ key bound to '__main__'. We can test this name to run the script only when its module is run, not when it is imported by another module. The if accomplishes this behavior.
If I had defined C with a docstring it would appear as an attribute of __doc__. Don't worry about __weakref__, the internal __dict__ or __qualname__.
[top]
Let's discuss four different kinds of names in relation to classes. We will call all these names variables.
(1) local variables: defined and used inside functions/methods to help with the computation; parameter variables are considered local variables too. (2) instance variables of an object: typically defined inside __init__ and used inside class methods (we saw other ways to define them above too). These are referred to as self.name. (3) class variables: typically defined in classes (at same level as methods, not inside methods) and typically used in methods; we use a class variable for information COMMON to all objects of a class (rather than putting the same local variable in each object constructed from the class). Methods are actually class variables, bound to function objects. All class variables are defined in the class object and they are found by the Fundamental Equation of Object-Oriented Programming through instances of that class. That is, if class C defines an attribute a (method or class variable) and x refers to an object constructed from class C, then x.a will find attribut a in class C, but only if it is not stored directly in x (in x's __dict__). For class variables, that is typically what we want. (4) global variables: typically defined in modules (outside of functions and classes) and used inside functions and/or class methods; we typically avoid using them (don't use global variables), and when we do use them, we do so in a cautious and limited manner.
You should know how to use all these kinds of variables (and their semantics). Use local variables and instance variables as needed (most function/methods have the former, and most classes define the later in __init__ and use them in methods). Class variables are sometimes useful to solve certain kinds of problems where common information is stored among all the instances, by storing them just once in their common class object. Global variables are fine to use in scripts, but are often frowned upon when declared in modules that are imported (although they too have their uses there, but in more advanced settings).
The following script uses each kind of variable, appropriately named. Ensure that you understand how each use of these variables works. The use of the command named 'global' (see the two lines with #comments) is explained in more detail below.
global_var = 0
class C:
class_var = 0
def __init__(self,init_instance_var): self.instance_var = init_instance_var def bump(self,name): print(name,'bumped') #global_var = 100 # comment out this line or the next global global_var # comment out this line or the previous global_var += 1 C.class_var += 1 # self.class_var get translated to C.class_var self.instance_var += 1 def report(self,var_name): print('instance referred to by', var_name, ': global_var =', global_var, '/class_var =', self.class_var, # can write as self._class_var '/instance_var=', self.instance_var)
x=C(10) x.report('x') x.bump('x') x.report('x') print()
prints instance referred to by x : globalvar = 0 /classvar = 0 /instancevar= 10 x bumped instance referred to by x : globalvar = 1 /classvar = 1 /instancevar= 11
print('y = x') y = x y.bump('y') x.report('x') y.report('y') print()
prints y = x y bumped instance referred to by x : globalvar = 2 /classvar = 2 /instancevar= 12 instance referred to by y : globalvar = 2 /classvar = 2 /instancevar= 12
print('y = C(20)') y=C(20) y.bump('y') y.report('y') print()
prints y = C(20) y bumped instance referred to by y : globalvar = 3 /classvar = 3 /instance_var= 21
C.report(x,'x') # same as x.report('x') by the Fundamental Equation of OOP type(x).report(x,'x') # ditto: the meaning of the Fundamental Equation of OOP print()
prints instance referred to by x : globalvar = 3 /classvar = 3 /instancevar= 12 instance referred to by x : globalvar = 3 /classvar = 3 /instancevar= 12
print(C.class_var, x.class_var) # discussed below print(x.instance_var)
prints 3 3 12
So, the global variable is changing every time, as is the class variable, because there is just one of each. But each object thta is an instance of C has its own instance variable, which changes only when bump is called on that instance.
If we instead commented as follows
global_var = 100 # comment out this line or the next #global global_var # comment out this line or the previous
running the script would have the following result: By removing the statement global global_var, then the statement global_var = 100 actually defines a local variable in the bump method -despite its name- so its increment does not affect the true global_var, which stays at zero.
Recall, if a variable defined in a function/method has not been declared global, it is created as a local variable inside the function/procedure.
Note that one can REFER to the value of a global_var inside methods of class C WITHOUT a global declaration (see the report method), but if a method wants to CHANGE global_var it must declare it global (then all reference and changes are to the real global variable). With no global global_var, the assignment global_var = 100 creates a new name local to the bump method and always binds it to 100.
instance referred to by x : global_var = 0 /class_var = 0 /instance_var= 10 x bumped instance referred to by x : global_var = 0 /class_var = 1 /instance_var= 11
y = x y bumped instance referred to by x : global_var = 0 /class_var = 2 /instance_var= 12 instance referred to by y : global\_var = 0 /class\_var = 2 /instance\_var= 12 y = C(20) y bumped instance referred to by y : global_var = 0 /class_var = 3 /instance_var= 21 instance referred to by x : global\_var = 0 /class\_var = 3 /instance\_var= 12
1 1 11
Finally, it is clear what C.class_var and x.instance_var refer to, but what about x.class_var? As shown above this prints 1 just as C.class_var does. This meaning is a result of the Fundamental Equation of Object Oriented Programming (but applied to variable attributes, not method attributes).
----- Technically, when specifying o.attr, any access to an attribute name in object o (whether a variable or method) Python first tries to find attr in the object o; if it is not defined in o's namespace/__dict__ Python uses the FEOOP to try to find it by checking type(o).attr, which attempts to find attr in type(o)'s namespace/__dict__. So when trying to find x.class_var if fails to find class_var in o's namespace/__dict__, so it tries type(o).class_var or C.class_var and finds the class_var attribute in C's namespace/__dict__.
When we study inheritance, we will learn more about how Python searches for all attributes by generalizing this rule: if it is not in an instance, then it tries in the class that instance was constructed from, and if not in that class, it tries in its super classes, and if not in its superclass....
But for now remember: to find an attribute, look first in the namespace of the object; if it isn't there, then look in the namespace of the class thta the object was constructed from.
[top] 1) Defining/using a method for a class, AFTER the class has been declared:
2) Defining a method for an instance (but not the whole class) after the instance has been constructed:
We will now discuss one more interesting thing a dynamic language like Python can do (but languages like Java and C++ cannot). We can change the meaning of a class as a program is running. Let's go back to a very simple class C, that stores one instance variable, but has no methods that change it. The report method prints the value of this instance variable.
class C: def init(self,initinstancevar): self.instancevar = initinstance_var
def report(self,var_name): print('instance referred to by', var_name, '/instance_var=', self.instance_var)
Now look at the following code. It defines x to refer to an object constructed from the class C, which defines only a report method (and then it calls that method to report). Next it defines the bump function with a first parameter named self: its body increments the instance_var in self's namespace dictionary. We call bump with x and it updates x's instance_var (as seen by the report).
Then we do something strange. We add the bump function into the namespace of C's class object with the name cbump (that is just the same as writing C.__dict__['cbump'] = bump, creating the cbump method). We could have used just bump, but instead used a slightly different name. Then, we call x.cbump('x') which by the Fundamental Equation of OOP is the same as calling C.cbump(x,'x') and because we just made the cbump attribute of the object representing class C refer to the bump function, its meaning is to call the same function object that bump refers to.
x=C(10) x.report('x') # By FEOOP, exactly the same as calling C.report(x,'x') print()
prints instance referred to by x /instance_var= 10
def bump(self,name): print(name,'bumped') self.instance_var += 1 bump(x,'x') x.report('x') print()
prints x bumped instance referred to by x /instance_var= 11
C.cbump = bump; # put bump in the namespace of C, with the name cbump x.cbump('x') # By FEOOP, exactly the same as calling C.cbump(x,'x') x.report('x') print()
prints x bumped instance referred to by x /instance_var= 12
y=C(20) y.cbump('y') y.report('y')
prints y bumped instance referred to by y /instance_var= 21
So, even after the class C has been defined, we can still add a method to it namespace and then can call it using any object that has already been (or will be) constructed from the class C. That is, we can change the meaning of a class C, and all the objects constructed from the class will respond to the change through the FEOOP.
Recall that the del command gets rid of an association in a dict. If we wrote del C.cbump, then if we tried to call that method by x.cbump('x') the result would be that Python raises
AttributeError: 'C' object has no attribute 'cbump'
So we can both ADD and REMOVE names from a class object's namespace!
Note that we could have defined/written bump as follows (note use of p not self as the first parameter of bump)
def bump(p,name): print(name,'bumped') p.instance_var += 1
and nothing changes, so long as every occurrence of self is changed to p inside the bump function (as is done). We could likewise write
def report(p,var): ...
inside the C class itself. The parameter name self is just the standard name used in Python code; but there is nothing magical about this name, and we can substitute whatever name we want for the first parameter. This parameter will be matched with the object used to call the method. Although any name is allowed, I strongly recommend always following Python's convention and using the name self. Eclipse always supplies the name self automatically as the first parameter to any methods we define.
Defining a method for an instance (but not the whole class) after the instance has been constructed:
In fact, Python also allows us to add a reference to the bump method to a single instance of an object constructed from class C, not the class itself. Therefore unlike the example above, bump is callable only on that one object it was added to, not on all the other instances of that class. We can also use this technique to add a method to an object that is different than the one defined in the object's class.
Start with the class C as defined above, defining just __init__ and report. Then
def bump(self,name): print(name,'bumped') self.instance_var += 1 x = C(0) y = C(100) x.bump = bump; x.bump(x,'x') x.bump(x,'x') x.report('x')
y.bump(y,'y') # fails because there is no bump attribute in the object y y.report('y') # refers to, either directly in y or in y's class C
Note that calling x.bump(..) finds the bump method in x's namespace, without needing to translate it using the Fundamental Equation of Object-Oriented Programming. Without the translation, we explicitly need to pass the x argument which becomes bump's self parameter.
Generally when looking up the attribute x.attr (whether attr is a variable or method name), Python first looks in the namespace of the object x refers to, and if it doesn't find attr, it next looks in the namespace of the object type(x) refers to.
When run, this script produces:
x bumped
x bumped
instance referred to by x /instance_var= 2
Traceback (most recent call last):
File "C:\Users\pattis\Desktop\python32\test\script.py", line 21, in
The error message mentions C because after failing to find the bump attribute in the object y refers to, it looks in the object C refers to; when it fails there too, the raised exception reports the error.
So, we can add methods to
(a) classes: methods that all the instances of that class can refer to, via FEEOP (b) an instance of the class, such that only that instance can call the method (and their self parameter must also be passed as an explicit argument), since FEOOP is not used.
Combining both worlds using delegation
Suppose that we wanted to be able to call methods attached to objects, but do so using the standard object.method(...) syntax, as we did in the first part of this section. In the second part of this section, we had to duplicate the object, e.g., calling x.bump(x,'x') instead of just x.bump('x'). We will see how to return to this simpler behavior using the concept of delegation in Python.
We start by defining C as follows, adding the bump function below
class C: def init(self,initinstancevar): self.instancevar = initinstance_var
def report(self,var): print('instance referred to by', var, '/instance_var=', self.instance_var) def bump(self,name): try: self.object_bump(self,name) except AttributeError: print('could not bump',name) # or just pass to handle the exception; # or omit try/except altogther
In this definition of C, there is a bump method defined in the class C, for all instances constructed from this class to execute, findable by FEEOP.
When bump is called here, it tries to call a method named object_bump on the instance it was supplied, passing the object itself to object_bump (doing explicitly what FEOOP does implicitly/automatically). If that instance defines an object_bump function, it is executed; if not, Python raises an attribute exception, which at present prints a message, but if replaced by pass would just silently fail. Of course, we could also remove the entire try/except so an attribute failure would raise an exception and stop execution.
Note that in the call x.bump(...) Python uses the Fundamental Equation of OOP to translate this call into C.bump(x,'x'), which calls the equivalent of x.object_bump(x,'x').
In the world of programming, this is called delegation (which we will see more of): the bump method delegates to the object_bump method (if present) to get its work done.
Here is a script, using this class. It attaches different object_bump methods to the instance x refers to, and the instance y refers to, but not to the instance z refers to (nor to the class C). It calls this object_bump method not directly, but through delegation by calling bump in the C class.
x = C(10) y = C(20) z = C(30)
def bump1(self,name): print('bump1',name) self.instance_var += 1
def bump2(self,name): print('bump2',name) self.instance_var += 2 x.object_bump = bump1 y.object_bump = bump2 # No binding of z.object_bump x.report('x') x.bump('x') x.report('x') print()
prints instance referred to by x /instancevar= 10 bump1 x instance referred to by x /instancevar= 11
y.report('y') y.bump('y') y.report('y') print()
prints instance referred to by y /instancevar= 20 bump2 y instance referred to by y /instancevar= 22
z.report('z') z.bump('z') z.report('z')
prints instance referred to by z /instancevar= 30 could not bump z instance referred to by z /instancevar= 30
[top]
Note that we can redefine a function or class. For example, we can write
def f(): return 0 def f(): return 1 print(f())
Calling f() would return 1. Eclipse gets upset about this, and marks the second definition as an error (duplicate signature), but there is nothing technically wrong with this code (although the first definition is useless, and there may be a mistake in the spelling of one of these functions). Python will run the script. We can also write the following script, which Eclipse won't complain about, and runs the same.
def f(): return 0 def g(): return 1 f = g print(f())
Calling f() returns 1. Again, def just makes a name refer to a function object; if, as in the case of the two definitions of the f name above, the name already refers to an object, the binding of f is just changed to refer to the function object g refers to.
Conceptually, it is no different than writing x = 1 and then x = 2 (changing what x refers to from the int object 1 to the int object 2).
We can do the same thing for classes, as we saw with the names C and D in the first example in these notes.
In summary, def f or class C just define a name and binds it to a function/class object. We can call the function or the class's constructor. We can rebind that name later to any other object. We can even write
def f(): return 0 f = 0
Now f is bound to an int instance object, not a function object.
[top] ...single/double underscore prefix
If calling o.method(...) returns information about an o's state but does not change o's state, it is called an accessor (or query). If o.method(...) changes o's state and returns None (all functions/methods must return some value), it is called a mutator (or command). Some method calls do both: they change o's state but also return a non-None value.
A design question arises. Suppose that we know that an object o of a class C has an instance variable name iv: should we directly refer to o.iv? Should we use its value by writing o.iv or change it by writing o.iv = ....? The high road says, no: a class should hide the actual instance variables from the clients/users of the class; they should provide methods to manipulate the objects under control of the class. What instance variables we need to implement a class might change over time, but the methods that define the behavior of objects created from that class should stay the same and always work correctly with whatever instance variables we are using.
Python is a bit at odds with this philosophy. Some languages (Java/C++) have a mechanism whereby instance variables can be tagged PRIVATE, so that they are accessible only from methods defined in the class itself; these languages do not allow new instance variables nor methods to be added dynamically to objects as Python does (as we showed above).
Python's philosophy is a bit more open to accessing instance variables outside of the class methods. But there is danger in doing so, and beginners often use this convenience and end up taking longer to get their code to work correctly, and also make it harder to understand and change the code, because they are accessing information that is not guaranteed to be there in future changes to the code.
In fact, Python does have a weaker form of tagging PRIVATE names, which we can use for names that should not be referred to outside the methods in the object's class. Below we explain the meaning of instance variable names that begin with one or two underscores (but don't have two trailing underscores, so are unlike __init__).
Single Underscore:
When a programmer uses a single underscore in a name in a class (for data or a method), he/she is indicating that the name should NOT BE ACCESSED outside of the methods in the class. But, there is nothing in the Python interpreter that stops anyone from accessing that name. We can use this convention for private data and helper methods.
class C: def init(self): self._mv = 1
def _f(self): return self._mv == 1 x = C() print(x.\_mv, x.\_f())
When run, this script produces: 1 True
Still, if a class is written with names prefixed by a single underscore, it indicates that objects constructed from that class should not access those names outside of the methods defined inside the class.
Double Underscore:
If a Python name in a class begins with two underscores, it can be referred to by that name in the class, but not easily outside the class: but it can still be referred to outside the class, but with a "mangled" name that includes the name of the class. If a class C defines a name __mv then the name outside the class can be referred to as _C__mv. This is called a "mangled" name.
So, if we changed the code in the class C above by writing _mv as __mv and _f as __f, and tried to execute
x = C() print(x.\_\_mv, x.\_\_f())
Python would complain by raising an AttributeError exception for the first value in the print statement
AttributeError: 'C' object has no attribute '__mv'
It x.__mv was remove, Python would complain about x.__f(), indicating the object has no attribute '__f'.
But given class C defines __mv, and __f we could execute the following code
x = C() print(x.\_C\_\_mv, x.\_C\_\_f())
by writing the mangled names. When we run this script it again produces: 1 True
In fact, if we printed the dictionary for x, it would show '_C__mv' as a key, which is the true name of these functions outside of the module.
print(x.__dict__) would print: {'_C__mv': 1}
So, Python does contain two conventions for hiding names: the first (one underscore) is purely suggestive; the second (two underscores) actually makes it harder to refer to such names outside of a class.
But neither truly prohibits accessing the information by referring to the name.
When we discuss operator overloading (later this week) and inheritance (later in the quarter) we will learn more about controlling access to names defined in objects and classes.
[top]
We normally define classes in modules, and often a module does nothing but define just one class (although some define multiple, related classes). Other modules define lots of functions. All such modules are called library modules (not scripts) because they typically don't run code themselves, but we import them to gain access to the names (of classes and functions) that they define. (If they do run code, it is inside the code if __module__ == '__main__': and often the code there allows us to test the class or module).
We can declare a class in a function and call the function to return an object constructed from the class (and even use the returned object if we know its defined instance variables or methods).
def f(x): class C: def __init__(self,x): self.val = x def double (self) : return 2*self.val return C(x) y = f(1) print(y, y.val, y.double())
When run, this script prints the following.
<__main__.f.
The first value indicates (reading the first word after the left angle-bracket, from back to front) that class C is defined local to function f, which is in the script we ran (named by Python to be __main__).
We can also declare a class in a class, and call some method in the class to return an object constructed from the inner class (and even use the object if we know its defined instance variables or methods).
class C:
def init(self,x,y):
self.x = x
self.y = y
class Cinner:
def init(self,x): self.val = x
def double (self) : return 2*self.val
def identity(self) : return (self.x, self.y)
def xconstruct(self): return C.Cinner(self.x)
def yconstruct(self): return C.Cinner(self.y)
z = C(1,2) a = z.x_construct() b = z.y_construct() print( z, a, b,sep='\n') print(z.identity(), a.double(), b.double())
When run this script prints: <main.C object at 0x02A36310> <main.C.Cinner object at 0x02A36290> <main.C.Cinner object at 0x02A36E70> (1, 2) 2 4
z.x_construct() returns a reference to an instance of class C.Cinner, that was initialized by the x parameter in the __init__ method. When we call a.double(), the double method defined in Cinner() returns twice the value it was initialized with.
In fact, instead of the x_construct and y_construct functions, we could define a more general construct function that takes either 'x' or 'y as arguments and constructs an object for self.x or self.y. The first way to do this uses the parameter (matching 'x' or 'y') as a key to access __dict__
def construct(self,which): return C.Cinner(self.\_\_dict\_\_[which])
The second way to do this uses the eval function, whose argument is either 'self.x' or 'self.y' depdending on the value of which.
def construct(self,which): return C.Cinner(eval('self.'+which))
[top]
A method defined in a class is considered "static" if it does not have a self parameter. Sometimes it is useful to write methods in a class that have this property.
For example, suppose that we wanted to declare a Point2d class for storing the x,y coordinates for Points in 2-d space. The __init__ method would take two such arguments. But suppose that we also wanted to create Point2d objects by specifying polar coordinates (i.e, using a distance and angle in radians). We could write such a class (with this static method) as follows.
import math
Class Point2d: def init(self,x,y): self.x = x self.y = y
@staticmethod def from_polar(dist,angle): return Point2d( dist*math.cos(angle), dist*math.sin(angle) ) ...more code
This method is preceded by @staticmethod (a decorator: we will discuss decorators later). It is meant to be called from outside the class, to create Point2d objects from polar coordinates. We can write calls like
a = Point2d(0., 1.) b = Point2d.from\_polar(1.0, math.pi/4)
Notice that we call Point2d.from_polar outside of the class by using the class name Point2d and the static method name from_polar defined in that class. It has no self parameter.
Likewise, suppose that we wanted to write a helper function for computing the distance between two Point2d objects as a static method in this class. We could write it as
@staticmethod def _distance(x1,y1,x2,y2): return math.sqrt( (x1-x2)**2 + (y1-y2)**2 ) def dist(self,another): return Point2d._distance(self.x, self.y, another.x, another.y)
Here this helper function is meant to be called only by the dist method in this class, so we write its name with a leading underscore. Note that again we call it using Point2d. Because of FEOOP, we could also call this helper as self._distance(self.x, self.y, another.x, another.y) because type(self) is Point2d. Because it is static, the call does not put self as the first argument.
Finally, we could also write this helper function as a global function defined outside Point2d, in the module that Point2d is defined in. But it is better to minimize any kinds of global names; so, it is better to define this name inside the class. In this way it won't conflict with any other name the importing module has defined.
[top] simple class features; it doesn't use many of the features discussed here.
Later during this week, we will learn how to use methods to overload operators that allow us to take advantage of Python's syntactic features. We will learn about many other special functions named like __init__ with double underscores front and back.
[top]
class C: def __init__(self): print('C object created') D = C def C(): print('C function called') x = C() y = D()
class C: def init(self,a): self.a = a
x = C(1) C.__init__(x,2) print(x.a)
Write a class C whose __init__ method has a self parameter, followed by low and high. __init__ should store these values in self's dictionary using the same names, but do so only if low is strictly less than high (otherwise it should raise the AssertionError exception with an appropriate string.
Explain why each of the following code fragments does what it does: two execute (with different results) and one raises an exception.
g = 0 g = 0 g = 0 def f(): def f(): def f(): print(g) print(g) print(g) global g g += 1 g += 1 f() f() f() g += 1 g += 1 g += 1 f() f() f()
That is, for a class C
a = C(...) b = C(...) print(C.instance_count) prints 2 c = C(...) print(C.instance\_count) prints 3
class C: def init(self,initinstancevar): self.instancevar = initinstance_var
def report(self,var): print('instance referred to by', var, '/instance_var=', self.instance_var) def bump(self,name): try: self.object_bump(name) except AttributeError: print('could not bump',name) # or just pass to handle the exception
x = C(10) y = C(20)
def bump(self,name): print('bumped',name) self.instance_var += 1 C.object_bump = bump x.report('x') x.bump('x') x.report('x') y.report('y') y.bump('y') y.report('y')
print = 1 print(print)


This example shows the accessibility features of Telerik DatePicker for ASP.NET MVC and Telerik TimePicker for ASP.NET MVC.
Telerik DatePicker for ASP.NET MVC and Telerik TimePicker for ASP.NET MVC are level A accessible (in compliance with the W3C Web Accessibility Guidelines 2.0).


iRODS Consortium
The iRODS Consortium provides assistance and services directly to Consortium Members and contract clients.
- Click here for more information about Consortium Membership.
- Click here for more information about services from the iRODS Consortium.
We also provide several training workshops each year. Please
contact us for an up-to-date schedule of upcoming courses, or to tell us where you would like to see iRODS training in the future.
Additional Resources
iRODS support is available from the community and the consortium development team via the
iRODS chat Google Group.
Bugs and feature requests are tracked via
GitHub.
For security issues or topics that require significant additional detail, please contact the iRODS Consortium support team
directly.
In addition to Consortium membership, the iRODS Consortium offers a range of professional services to current and prospective iRODS users, including system architecture, installation assistance, rule and microservice development, directed software development, custom training, and more.
Maintenance and Support
The Consortium additionally offers annual maintenance contracts to support your organization as you develop and deploy with iRODS. These contracts start at 10 hours of support per year and include email and telephone consultations. On-site support is also available.
Continuous Integration
The iRODS Consortium provides continuous integration and testing against every commit to the iRODS code base. Consortium members can include specific software and hardware in this continuous integration process. The cost to host hardware at the RENCI data center for this process is $100 a month per rack unit (U). This fee is waived for up to 10U of rack space for Premier consortium members.
Services from the iRODS Consortium are obtained in one of three ways:
• As a standalone service contract.
• As a benefit of Consortium membership.
• As a supplement to Consortium membership.
More information about Consortium membership is available
here. Our standard non-member support agreement is
here.
If you would like to learn more about services from the iRODS Consortium, contact the iRODS Consortium support team
directly.


--- layout: post title: Budding professional coder resources type: post parent_id: '0' published: false password: '' status: draft categories: [] tags: [] meta: _wpcom_is_markdown: '1' author: login: timabell email<EMAIL_ADDRESS>display_name: timabell first_name: '' last_name: '' permalink: "/" ---
I've been mentoring (spellcheck suggests "tormenting". hmmm.) a lovely dev who's joined a client after an extensive training program at Makers academy. They've done a great job of giving a broad foundation in programming, including practical use of git
It's become clears there's a bunch of things I just know as an old hand developer, and a bunch of tools I'm aware of that aren't as obvious as I thought. So here they are....
Practical doing
Concepts
Tools
Resources
Career tips


Build System Packaging Module
Overview
The Build System Packaging Module provides the
build system with the ability to create various packagings
of files. This includes the ability to create tar files,
zip files, etc.
NOTE: Due to limitations in gmake's ability to interpret
generated dependency chains on the fly, making some of
the package targets in a fresh tree may not work in the
first invocation even though the dependencies have been
mapped out. To work around this problem is is recommended
that an 'all' or 'depends' build be invoked separately
before any of the targets provided by this module are
requested.
Macros and Controls
- PACKAGE_ROOT
-
The root of the directory for some packaging module targets.
The default value for this is $(COMPONENT_ROOT)/package.
- PACKAGE_TARGET_DIR
-
The target directory for some package targets. Package
targets share a component wide target directory so
component packages can by built up here piece by piece
as the build progresses through the component source tree.
The default value for this is $(PACKAGE_ROOT)/built/$(BS_PLATFORM_ARCH_FULL).
- PACKAGE_RELEASE_DIR
-
A final staging dir for deliverable tarballs, bundled package, and files.
The default value for this is $(PACKAGE_ROOT)/release/$(BS_PLATFORM_ARCH_FULL).
The distinction between this and pushing components to dist is fuzzy.
Targets
Functions
PACKAGEFILE_TARGETS
PACKAGEFILE_TARGETS Overview
PACKAGEFILE_TARGETS is the pattern target used to package
files from a build into the component wide package
directory for eventual component roll up. In essence, PACKAGEFILE_TARGETS
is a glorified interface to the file copy command. Only files
may be packaged with this pattern target; directories should be packaged
with the PACKAGEDIR_TARGETS
pattern target.
By default, the file packaged by a given PACKAGEFILE_TARGETS pattern target
will be <package file target> found in either the target
dir for the build system's platform or the default
native code tool chain's target platform. This may be overridden
by the <package file target>
<package file target>_FROM option.
PACKAGEFILE_TARGETS will be built during the "posttarget" phase of a build.
PACKAGEFILE_TARGETS may be built in isolation by requesting the "packaging_packagefile"
target.
PACKAGEFILE_TARGETS Options
- <package file target>_DEST
-
Specifies the file name and path under $(PACKAGE_TARGET_DIR) to copy the
<package file target> to. This option must specify a
file location and not a directory. The default value is
simply <package file target>.
- <package file target>_FROM
-
Override the entire default source path to the
<package file target>. Setting this option
makes renders the _PLATFORM option moot.
This option can be used with a <package file target>
to achieve the same behavior provided by the PACKAGE_RAW_TARGETS
of the old build system.
- <package file target>_DEP
-
Specify additional dependancies for the current target.
PACKAGEDIR_TARGETS
PACKAGEDIR_TARGETS Overview
PACKAGEDIR_TARGETS is the pattern target used to package
directories from a build into the component wide package
directory for eventual component roll up. Only directories
may be packaged with this pattern target; files should be packaged
with the PACKAGEFILE_TARGETS
pattern target.
By default, the directory packaged by a given PACKAGEDIR_TARGETS pattern target
will be <package dir target> found in either the target
dir for the build system's platform or the default
native code tool chain's target platform. This may be overridden
by the <package dir target>
<package dir target>_FROM option.
PACKAGEDIR_TARGETS will be built during the "posttarget" phase of a build.
PACKAGEDIR_TARGETS may be built in isolation by requesting the "packaging_packagedir"
target.
WARNING:
PACKAGEDIR_TARGETS pattern targets WILL NOT be cleaned by building the "clean" target.
These pattern targets will only be cleaned by building the "nuke" target.
Furthermore, these targets will be remade with every build of the "posttarget" phase.
These are side effects of directory targets potentially overlapping, and of not having
their full contents enumerated to the build system for dependancy resolution.
PACKAGEDIR_TARGETS Options
- <package dir target>_DEST
-
Specifies the directory name and path under $(PACKAGE_TARGET_DIR) to copy the
<package dir target> to. This option must specify a
directory name. The default value is the basename
of the current target. If the target already exists, the current
target will be overlayed into the existing directory.
- <package dir target>_FROM
-
Override the entire default source path to the
<package dir target>. Setting this option
makes renders the _PLATFORM option moot.
This option can be used with a <package dir target>
to achieve the same behavior provided by the PACKAGE_RAW_TARGETS
of the old build system.
- <package dir target>_SCRUB
-
Specifies a list of files or directories to remove from the
package once it has been copied to the $(PACKAGE_TARGET_DIR).
This option is useful for cleaning out CVS directories or other
ancillary files when packaging directories.
WARNING:Use of the _SCRUB option for PACKAGEDIR_TARGETS
may have unintended consequences when multiple targets overlay into
the same directory.
- <package dir target>_DEP
-
Specify additional dependancies for the current target.
TARGZ_TARGETS
TARGZ_TARGETS Overview
TARGZ_TARGETS is the pattern target used to create tar'ed and gzip'ed
archive files.
By default, the archive will be created in a file named
$(BS_ARCH_TARGET_DIR)/<targz target>.tar.gz, but this
may be overridden by target specific controls.
TARGZ_TARGETS will be built during the "posttarget" phase of a build.
TARGZ_TARGETS may be built in isolation by requesting the "packaging_targz"
target.
TARGZ_TARGETS Options
- <targz target>_DEST
- Specify an override location for the archive file
produced by the evaluation of the pattern rules.
The default archive file will be
$(BS_ARCH_TARGET_DIR)/<targz target>.tar.gz,rules,
but specifying paths under the $(PACKAGE_TARGET_DIR)
or $(PACKAGE_STAGE_DIR) may be useful for producing
archive files for final component delivery.
- <targz target>_FILES
-
Specify a list of files to include in the archive.
- <targz target>_MANIFEST
-
Specify a manifest file containing a list of
files to include in the archive. The contents
of the manifest are treated as if they appeared
in the _FILES option.
- <targz target>_CWD
-
The parent directory of the files specified
by the _FILES or _MANIFEST options. Files
to appear in a given <targz target>
archive must be located under the directory specified
by the _CWD option, and will have the _CWD directory
prefix stripped prior to being placed in the archive.
The default value for the _CWD option is the
target directory $(BS_ARCH_TARGET_DIR), but
it is expected that values containing $(PACKAGE_TARGET_DIR)
will be useful.
ZIP_TARGETS
ZIP_TARGETS Overview
ZIP_TARGETS is the pattern target used to create zip archive files.
By default, the archive will be created in a file named
$(BS_ARCH_TARGET_DIR)/<zip target>.zip, but this
may be overridden by target specific controls.
ZIP_TARGETS will be built during the "posttarget" phase of a build.
ZIP_TARGETS may be built in isolation by requesting the "packaging_zip"
target.
ZIP_TARGETS Options
- <zip target>_DEST
-
Specify an override location for the archive file
produced by the evaluation of the pattern rules.
The default archive file will be
$(BS_ARCH_TARGET_DIR)/<zip target>.tar.gz,rules,
but specifying paths under the $(PACKAGE_TARGET_DIR)
or $(PACKAGE_STAGE_DIR) may be useful for producing
archive files for final component delivery.
- <zip target>_FILES
-
Specify a list of files to include in the archive.
- <zip target>_MANIFEST
-
Specify a manifest file containing a list of
files to include in the archive. The contents
of the manifest are treated as if they appeared
in the _FILES option.
- <zip target>_CWD
-
The parent directory of the files specified
by the _FILES or _MANIFEST options. Files
to appear in a given <zip target>
archive must be located under the directory specified
by the _CWD option, and will have the _CWD directory
prefix stripped prior to being placed in the archive.
The default value for the _CWD option is the
target directory $(BS_ARCH_TARGET_DIR), but
it is expected that values containing $(PACKAGE_TARGET_DIR)
will be useful.
packaging_packagefile
packaging_packagefile Overview
Simple target to trigger the building of PACKAGEFILE_TARGETS
pattern targets independent of the main build "posttarget" phase.
packaging_packagedir
packaging_packagedir Overview
Simple target to trigger the building of PACKAGEDIR_TARGETS
pattern targets independent of the main build "posttarget" phase.
packaging_targz
packaging_targz Overview
Simple target to trigger the building of TARGZ_TARGETS
pattern targets independent of the main build "posttarget" phase.
packaging_zip
packaging_zip Overview
Simple target to trigger the building of ZIP_TARGETS
pattern targets independent of the main build "posttarget" phase.
packaging_info
packaging_info Overview
Simple target to display information about the macro
settings of all global macros used by the packaging module of
the build system. The packaging_info target will be
built during the "info" phase of a build, and can be built in
isolation by requesting the packaging_info target.
packaging_man
packaging_man Overview
Simple target to display usage information and help pertaining to
the packaging module of the build system.
The packaging_man target will be built during the "man"
phase of a build, and can be built in isolation by requesting
the packaging_man target.
PACKAGING_FUNC_GET_TARGZ_REALTARGET
This function is provided to translate a targz pattern target
as it is named in the TARGZ_TARGETS list to the
real target that results from the pattern rules.
PACKAGING_FUNC_GET_TARGZ_FLAGTARGET
This function is provided to translate a targz pattern target
as it is named in the TARGZ_TARGETS list to the
flag target that is used to track dependencies on a given
targz pattern target. This flag target is probably of little
use outside the the internals of the packaging build system module,
since PACKAGING_FUNC_GET_TARGZ_REALTARGET provides a better
candidate for chaining a target target in the dependency
list of another pattern target.
PACKAGING_FUNC_GET_ZIP_REALTARGET
This function is provided to translate a zip pattern target
as it is named in the ZIP_TARGETS list to the
real target that results from the pattern rules.
PACKAGING_FUNC_GET_ZIP_FLAGTARGET
This function is provided to translate a zip pattern target
as it is named in the ZIP_TARGETS list to the
flag target that is used to track dependencies on a given
zip pattern target. This flag target is probably of little
use outside the the internals of the packaging build system module,
since PACKAGING_FUNC_GET_ZIP_REALTARGET provides a better
candidate for chaining a target target in the dependency
list of another pattern target.
Example Makefile
COMPONENT_ROOT=../..
BS_ROOT=$(COMPONENT_ROOT)/../build3
include $(BS_ROOT)/defines.mk
#
# The resulting package isn't really useful, just shows how you can use the target options
#
moof_pkg_target=moof-tar1.tar.gz
PACKAGEDIR_TARGETS=foo-pkg1 $(moof_pkg_target)
TARGZ_TARGETS=moof-tar1
foo-pkg1_FROM=$(COMPONENT_ROOT)/sample-srcdir
#foo-pkg1_DEST=$(PROJECT)
foo-pkg1_SCRUB=CVS
moof-tar1_FILES=foo-pkg1
moof-tar1_CWD=$(PACKAGE_TARGET_DIR)
#$(moof_pkg_target)_FROM=$(BS_ARCH_TARGET_DIR)/moof-tar1.tar.gz # This is the default
$(moof_pkg_target)_DEST=moof-tarball-package-dir/
include $(BS_ROOT)/rules.mk


;;; ----------------------------------------------------
;;; Filename: list-extra.ss
;;; Author: Damir Cavar<EMAIL_ADDRESS>;;;
;;; (C) 2006 by Damir Cavar
;;;
;;; This code is published under the restrictive GPL!
;;; Please find the text of the GPL here:
;;; http://www.gnu.org/licenses/gpl.txt
;;;
;;; It is free for use, change, etc. as long as the copyright
;;; note above is included in any modified version of the code.
;;;
;;; Functions:
;;; sublist (list from-integer to-integer)
;;; Returns a sublist from a list, including the from index,
;;; excluding the to index.
;;; This function is safe for the indices being out of range.
;;;
;;; Usage:
;;; (load "list-extra.ss")
;;; ----------------------------------------------------
(define sublist
(lambda (mlist from to)
(let ([res '()]
[counter 0])
(for-each (lambda (x)
(if (and (<= from counter) (< counter to))
(if (> (length res) 0)
(set! res (append res (list x)))
(set! res (list x))))
(set! counter (+ counter 1)))
mlist)
res)))


--- title: for no compelling reason... date: 2006-07-21 04:56:52 +1000 modified: 2006-07-21 14:56:52 +1000 uid: http://paul.annesley.cc/?p=4 layout: post ---
From Netscape's Preliminary Specification for HTTP cookies:
"The state object is called a cookie, for no compelling reason."


Surge is an educational organisation based in Mumbai. We believe that world needs innovators more than anything else and at Surge, our mission is to empower every student by providing them right knowledge, training them with latest cutting-edge technology and help them to innovate or work with the existing tech innovators/organization. We Provide Industry training and Recruitment in the field of Machine Learning, Deep Learning, Android, Full Stack Development and many more. We have trained students from more than 20 Engineering Colleges and corporates. All our alumni are working with prestigious companies like Reliance Jio, Disperze, Accenture, Deutsche bank, IIT- Bombay and many more with the highest package of 18 LPA
Industrial Training | Technology | Internship | Recruitment
Candidate is supposed to work from his/her college, and help Surge to reach more crowd. He/She Should be responsible for developing and deploying marketing strategies. His/Her Job will include Lead Generation, Email and Social media marketing (Sharing, broadcasting), student registration. Help us to collaborate with the colleges in Mumbai by organising Tech Seminar and Networking Events. His/Her primary job will be bringing registration for our upcoming events/courses.
BE/B.Tech/B.Sc/BCA/ MCA degree. University scores no bar. Performance & hands-on knowledge with strong rooting of basics is MUST.
How to Apply : Interested candidates are requested to send their resumes at<EMAIL_ADDRESS>with the Answer of following questions.


ScrollyTeller
ScrollyTeller is a JavaScript library that builds the HTML for a scrolling
data story from csv files, and provides a flexible framework for triggering chart actions when
text "narration" scrolls into view. For an introduction to the mechanics of scrollytelling, see the
excellent Scrollama library, which
ScrollyTeller relies on for detecting scroll events
and progress.
Scroll down to learn how to create a data story using
ScrollyTeller. The spacebar and arrow keys also advance the
story.
Use the
buttons to jump to different parts of the
story.


Linux Jargon
http://slides.lucywyman.me/linux-jargon.html
Note
Let us take a tour through space and time to visit the milestones of Technology as we know it now. This talk will be your guide, cultural and technical. Rest easy, gentle n00b, and come along for the ride.


| Week # |
Date | Topics Covered |
Practice Problems |
Home Work Due |
|---|---|---|---|---|
| Week 1 | Get set up. Lecture 2: (second half). Linear equations: graphs of lines, the point-slope and slope-intercept formulas, intercepts. Solving systems of linear equations. Examples |
Linear Equations | Solutions |
|
| Holiday: Independence Day (no class) |
||||
| Finish: Solving systems of linear equations. Lecture 1: Interval notation, set notation, inequalites, solving inequalities, absolute value. |
Absolute Value | Solutions Quiz 1 |
||
Friday 07/06 |
Lecture 1:
Solving inequalities using the key number method. Equations involving rational expressions, review of factoring. Simplifying rational expressions. Manipulating polynomial expressions. Conjugate denominators. Rationalizing the denominator. |
Quiz 2 |
||
| Week 2 |
Lecture 1:
Solving inequalities using the key number method. Examples. See also Math 140 worked examples. |
Key Number Method | Solutions
Quiz 3 |
|
| Exponents; smplifying expressions with exponents. See the rules for working with integer exponents and examples. also working with rational exponents. |
Quiz 4 |
|||
|
Quiz 5 |
||||
Lecture 3: Functions.
Definitions and examples. Linear functions. Definitions and examples. |
||||
| Week 3 | Lecture 4: Functions.
Graphing functions. Domain, range, turning points, minmum and maximum values, intervals of increase and decrease. The constant, square, cube, inverse, inverse squared, square root, cube root, absolute value functions. |
Functions: Examples | Solutions
Quiz 6 |
|
| Lecture 6 :
Composition of functions. Writing a function as a composition of two (or more) simpler functions. |
Functions: Arithmetic Functions: Composition |
Arithmetic Solutions Composition Solutions Quiz 7 |
||
| Lecture 8 : Quadratic equations. Equations of quadratic type. |
Quadratic Equations | Solutions
Quiz 8 |
||
The plan: you come to class with questions and problems, I provide answers. The practice midterm exam will be available in the computer lab beginning this week. |
Sample Questions The solutions to these sample questions will not be posted. |
Sample Exam A Sample Exam B Sample Exam C Sample Exam D |
||
| Week 4 | Midterm Knowledge Survey The midterm exam is a computer multiple choice exam |
|||
| Lecture 7 : Inverse functions.
Existence of inverse functions. Horizontal line test. Composition of a function with its inverse. Graphs of inverse functions, computing the inverse of a function. |
Functions: The Inverse | Solutions | ||
|
Lecture 8 : Quadratic functions. Graphs of parabolas. Applications. |
Quadratic Functions |
Quiz 9 |
||
|
Lecture 3 : Factor Theorem.
Division Law. Rational functions and expressions. Polynomial long division. |
Polynomial long division | Solutions
Quiz 10 |
||
| Week 5 | Lecture 5: Graphing Techniques. Translations, reflections, symmetry, shifts. |
Quiz 11 |
||
| Lecture 9 & 10 :
Graphing polynomial and rational functions. Degrees of roots and asymptotes, vertical and horizontal asymptotes. |
Quiz 12 |
|||
| Lecture 12 : Properties of logarithms. |
Working with logarithms. | Solutions.
Quiz 13 |
||
Lecture 12 & 13 : Exponential and logarithmic equations. |
Exponential Equations. Logarithmic Equations. | Solutions.
Solutions. |
||
| Week 6 | Lecture 11 & 12 : Graphing exponential and logarithmic functions. | |||
| Lecture 14 : Exponential Growth. | Exponential Growth. | |||
Final Topics |
Sample Questions | The solutions to the sample questions will not be posted. | ||


Ezekiel 16:9
Then washed I thee with water; yea, I throughly washed away thy blood from thee, and I anointed thee with oil.


ZOZOR
ZOZOR
ZOZOR
ZOZOR
ZOZOR
ZOZOR
ZOZOR
ZOZOR
ZOZOR
ZOZOR
ZOZOR
PHP EXERCISE
PHP EXERCISE
PHP EXERCISE
PHP EXERCISE
PHP EXERCISE
PHP EXERCISE
PHP EXERCISE
PHP EXERCISE
PHP EXERCISE
PHP EXERCISE
PHP EXERCISE
IN-CLASS EXERCISE
IN-CLASS EXERCISE
IN-CLASS EXERCISE
IN-CLASS EXERCISE
IN-CLASS EXERCISE
IN-CLASS EXERCISE
IN-CLASS EXERCISE
IN-CLASS EXERCISE
IN-CLASS EXERCISE
IN-CLASS EXERCISE
IN-CLASS EXERCISE


This question floods Facebook groups, texts to current students and calls to the housing phone line. People swear by Jefferson hall, or absolutely need to be on West Green, or throw a fit if they’re put in “Dirty South.”
The truth is, walking into any freshman year dorm can be a little underwhelming. The in-window box AC unit rattles just out of sync with the weird noises from the refrigerator, and the slightly-dusty linoleum tile floors beg for the rug still waiting in the minivan. The walls are plaster or plaster-colored cinder block, and the bathroom is both too far and not far enough down the hall. It can be easy to wonder in slight disdain: this is the room that causes so much worry?
Yes, this 10 ft. by 14 ft. dollhouse will be kitchen, bedroom, living room and home for the next year, and when students move in, they will be far past the stress of room selection. They will have graduated to the worry of being near classes, friends and Court Street.
The secret to room selection is simple, however: it doesn’t matter where you live on campus.
People will fight this cold truth and swear up and down their year would have been different if they were in Boyd or didn’t have to walk up Morton hill every day. However, a dorm room is such a small part of the freshman year experience.
Students will make friends who live on their same floor as well as friends who live across campus. The quality of people in a residence hall has nothing to do with the dorm itself, and it is the people who will make college special, not a dorm room. Once students join clubs and make friends there will be some days they barely spend any time in their rooms at all. Whichever residence hall they live in won’t matter toward the quality of their experience nearly as much as making memories, meeting new people and trying new things will.
Some people are easily stressed by the location of their residence hall as well. However, as a freshman, classes will still slant toward satisfying general education requirements, so most freshmen’s schedules will consist of classes spread all throughout campus. Campus is also remarkably walkable, so even if students feel far away from a class or building, they can typically get there in at most fifteen minutes.
Furthermore, first year residence halls are remarkably similar to one another. Some may have elevators, renovated restrooms, sinks in the rooms or centralized air conditioning, but those small building to building changes have a minimal effect on the on-campus living experience. Where to live is one of the first choices incoming students get to make for themselves, so it makes sense to worry about choosing correctly. However, the truth is that there is no wrong choice.
My advice? No matter what room you walk into in August, just make it your own. Don’t get distracted by the location, flaws or lack of elevator. Think of the empty room as a blank canvas, and work to make it feel like home.  Making the space feel personal and aesthetic is really the only thing students can do to ensure their dorm is a “good” one.
Freshman year will be defined by friends, experiences, memories, classes and so much more than a residence hall. Students should embrace the positive qualities of whichever space they end up in, and remember it will only be a small factor in their overall experience. Among the hundreds of more influential experiences, however, enjoy the communal bathrooms, janky heat and unexplained noises. Relish in the two years of wonderful, awkward, inconsequential dorm living that unites us all.
Katie Millard is a sophomore studying journalism at Ohio University. Please note that the views and opinions of the columnists do not reflect those of The Post. What are your thoughts? Tell Katie by tweeting her at @Katie_Millard11


| number of optimized structures |
261 |
47 |
308 |
| converged in preliminary cell opt. |
50.96% |
42.55% |
49.68% |
| converged, but Δ
E final cell opt. > −1.0 meV/atom
|
12.03% |
70.00% |
19.61% |
| avg. steps in preliminary cell opt. |
16.3 |
16.5 |
16.3 |
| avg. steps in final cell opt. |
150.3 |
113.3 |
144.7 |


Check the console log
Card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Go somewhere
RedBackground stuff


Authors: Anatolii Kosorukov<EMAIL_ADDRESS>[web site: rustkas.github.io/].
Erlang Regular Expressions simplifyer. Functions for simplifying working with Regular Expressions. Overcoming the limitations of the re library, expanding its capabilities, as well as additional functions to simplify the work with regular expressions.Generated by EDoc


WITNESS LIST
Public Health Committee
April 3, 2013 - 8:00 AM
For:
Smith, Andrew (University Health System)
Smith, John (The Center for Health Care Services)
Taylor, Dr. Sally (University Health System)
On:
Ghahremani, Kay (HHSC)
Registering, but not testifying:
For:
Claitor, Diana (Self; Texas Jail Project)
Earnest, Daniel (San Antonio Police Officers Association)
Gonzales, Gilbert (The Center for Health Care Services, Bexar County Mental Health)
Holmes, Harry (Harris County Healthcare Alliance)
Humphrey, Cynthia (Association of Substance Abuse Programs)
Johnson, Lee (Texas Council of Community Centers)
Ligon, Katharine (Center for Public Policy Priorities)
Mitchell, Seth (Bexar County Commissioners Court)
Moscoso, Washington (San Antonio Police Officer's Association)
rodriguez, Jimmy (San antonio police officers association)
Sisk, Cathy (Harris County)
Switzer, Gyl (Mental health america of texas)
Yanas, Chris (Teaching hospitals of texas)
Yin, Stephanie (Self; National Alliance on Mental Illness (NAMI) Texas)
Against:
Louderback, AJ (Sheriffs Association of Texas)
Nicholes, Laura (Texas Association of Counties)
On:
Perez, Gina (HHSC Resource)
For:
MItchell, Gwen (Self; Texans for Dental Reform -(TDR))
Zalud, Lucille (Self; TDR)
On:
Parker, Glenn (Texas State Board of Dental Examiners)
Registering, but not testifying:
For:
Black, Rick (Self; Texas Dental Association)
Jacob, Lisa (Texas Academy of Pediatric Dentistry)
Mitchell, Clara (Self; TDR)
1
WITNESS LIST
For:
Moriarty, Jim (Self)
Nix, John (Self; TDR)
Nix, Melissa (Self; TDR)
Putthoff, Susan (Texas Academy of General Dentistry)
Ross, Susan (Self)
Rudd, Jim (Tx Society of Oral Maxillofacial Surg.)
Terry, Sue (Self; Tdr)
On:
Hildebrand, Julie (Texas State Board of Dental Examiners)
Jones, Lisa (Texas State Board of Dental Examiners)
For:
Black, Rick (Self; Texas Dental Association)
Jacob, Lisa (Texas academy of Pediatric Dentistry)
Jordan, William (Self; Texas society of oral and maxillofacial surgeons)
Moriarty, Jim (Self)
Moriarty, Jim (Self)
Putthoff, Susan (Texas Academy of General Dentistry)
Spann, Carla (Self; Texas Dental Association)
Wesson, Gary (Self)
Against:
Berlin, Marvin (Self)
Bresnen, Steve (Heartland Dental Care)
Brown (Self)
Brown, Karol (Self)
Davidson, John (Texas public policy foundation)
Dent, Jacob (Self)
Jones, David (Self)
Poest, Benjamin (Self)
Richardson, Randy (Self)
Street, Karen (Self)
On:
Hildebrand, Julie (Texas State Board of Dental Examiners)
Kaelin, John (Self; Tx coalition of dso)
Parker, Glenn (Texas State Board of Dental Examiners)
Stick, Jack (HHSC OIG)
Registering, but not testifying:
For:
Bingham, William (Texas dental association)
Boyle, Kathleen (TDAA)
Gay, Clifford (Self)
Lane, Ronda (TDAA)
2
WITNESS LIST
Against:
Connett, Brent (Texas Conservative Coalition)
Matocha, Dustin (Texans for Fiscal Responsibility)
McClelland, Terra (Ncdr)
Moser, Dr Charles (Self; South Texas Dental)
Vielma, Eliza (Americans for Prosperity)
On:
Jones, Lisa (Texas State Board of Dental Examiners)
Rodriguez, Irma (Texas state board of dental examiners)
For:
Hardin, Paul (Texas physical therapy association)
Registering, but not testifying:
For:
Finch, Dan (Texas Medical Association)
On:
Maline, John (Executive Council of Physical Therapy and Occupational Therapy Examiners)
On:
KLOERIS, CHRIS (Texas optometry board)
Registering, but not testifying:
For:
Avery, Bj (Self; Texas optometric asso)
Henderson, Justin (Texas Optometric Association)
Lucas, Tommy (Self; Texas Optometric Association)
Nguyen, Steve (Self)
For:
Baker, Chris (American Orthodontic Society)
On:
Ghahremani, Kay (HHSC Resource)
Peppard, Mark (Texas Academy of General Dentistry)
Registering, but not testifying:
For:
Boyle, Kathleen (TDAA)
Jacob, Lisa (Texas Academy of Pediatric Dentistry)
Lane, Ronda (TDAA)
On:
Hildebrand, Julie (Texas State Board of Dental Examiners)
3
WITNESS LIST
On:
Jones, Lisa (Texas State Board of Dental Examiners)
Moriarty, Jim (Self)
Parker, Glenn (Texas State Board of Dental Examiners)
For:
Mintz, David (Texas Academy of General Dentistry)
On:
Hildebrand, Julie (Texas State Board of Dental Examiners)
Parker, Glenn (Texas State Board of Dental Examiners)
Registering, but not testifying:
For:
Moriarty, Jim (Self)
Peppard, Mark (Texas Academy of General Dentistry)
On:
Black, Rick (Self; Texas Dental Association)
Boyle, Kathleen (TDAA)
Jones, Lisa (Texas State Board of Dental Examiners)
Lane, Ronda (TDAA)
Rodriguez, Irma (Texas state board of dental examiners)
On:
Flack, Teri (Self; Texas State Genealogical Society)
Kaufman, Susan (Self; Texas state genealogical society)
Kerr, Lonzo (DSHS)
Nieman, Lisa (Dshs)
Whited, Randy (Self; Texas State Genealogical Society)
Wylie, John (Self; Texas State Genealogical Society)
Registering, but not testifying:
For:
Holmes, Harry (Harris County Healthcare Alliance)
On:
Wylie, Barbara (Self; Texas State Genealogical Society)
For:
Flack, Teri (Self; Texas State Genealogical Society)
On:
Kerr, Lonzo (DSHS)
Nieman, Lisa (Dshs)
4
WITNESS LIST
Registering, but not testifying:
For:
Kaufman, Susan (Self; Texas state genealogical society)
Whited, Randy (Self; Texas State Genealogical Society)
Wylie, Barbara (Self; Texas State Genealogical Society)
Wylie, John (Self; Texas State Genealogical Society)
5


Početna
Pancetta
Ribs
Drumstick
Meatball
T-Bone
Početna
Pancetta
Ribs
Drumstick
Meatball
T-bone
Call to action: 01 55 5550
Bacon ipsum dolor si amet beef ribs ham hock
T-bone pancetta salami andouille capicola short loin pork pork loin short ribs venison tongue sirloin chicken. Tenderloin drumstick meatball, turkey brisket corned beef ham hock.
CALL TO ACTION
01 55 5550
Turkey boudin
filet pork meatball
Frankfurter pancetta ground round cow sirloin pork belly capicola, jerky ham hock.   Turducken drumstick doner pork chop meatloaf brisket bacon sirloin. Jowl meatball chicken venison tongue.
Bacon chuck
Beef ribs corned beef beef prosciutto pork chop chicken. Beef tail ham hock boudin meatball doner.
TELEFON
+ 385 (0)
91 000 000
FAX
+ 385 (0)
00 00 000
EMAIL
<EMAIL_ADDRESS>ADRESA
Neka Adresa, 10000 Zagreb


1 write to Name
System.Management.Automation (1)
engine\CommandInfo.cs (1)
920
Name
= name;
1 reference to Name
System.Management.Automation (1)
engine\CommandInfo.cs (1)
966
private static bool IsPSTypeName(in PSMemberNameAndType member) => member.
Name
.Equals(nameof(PSTypeName), StringComparison.OrdinalIgnoreCase);


Refreshing the collection¶
To refresh the collection - i.e., to align the dataset to the current state of Kaggle - download the latest version of Meta Kaggle.
Once Meta Kaggle has been downloaded on your machine and the corresponding environment variable has been set, you can start the refresh process by issuing the following command:
python kgtorrent.py refresh --strategy HTTP
A new MySQL database will be created and populated with the information from the lastest Meta Kaggle. Warning: if a database with the same name already exists, it will be overwritten. Then the download procedure will start; this time, the list of notebooks to be downloaded will be checked against the files that are already present in the dataset folder: notebooks that are already locally available will not be downloaded. Moreover, notebooks from the previous version of KGTorrent that are no more referenced in the refreshed database will be deleted. Indeed, it can happen that notebooks get deleted from the platform and loose their reference in Meta Kaggle.


GOLDEN HOUR - The Final Act
August 24, 1pm - 3am
FREE
Here it is: the times for the last ever monthly Golden Hour at The Forest. Stay for the day and dance till the end. Or pop in for just an hour. Or stay out of our way. Whatever. We don’t care, this is the end. All times are subject to change, technical difficulties will be regular and you should expect and enjoy surprises. We’ll also have a poster exhibition and a chance to buy some of your favourite GH posters. See you there. Or not.
1.15 —- Tom Pow
1.30 —- Good music from Lake & Vanessa
1.50 —- Reel Festivals Film from Roxanna Pope
(break)
2.10 —- William Letford
— poems from up high
2.25 —- Toby Mottershead
blues and booze from the Black Diamond Conductor. Hoot hoot!
2.45 —- film
(break)
3.00 – Emily Ballou — Prize-winning poet and ace in the hole.
3.15 – Billy Liar — acoustic punk glory
3.25 – Luke Williams & Natasha Soobramanien
A Sonic Reading for Luke’s highly praised first novel — The Echo Chamber
(break)
4.20 – Ericka Duffy — master of all.
4.35 – Cardboard Orchestra
live improvised electro from another room
5.10 – film
(break)
5.30 – Anna Crowe — powerful poems with a gentle voice.
6.00 – Robin Grey — guitar, violin, accordion, love, barefeet, joy, music, happiness.
6.40 – film
(break)
7.00 – Kirstin Innes — stories that wham, pow, bang.
7.15 – Jen and the Gents — Poppy loveliness which warms all the cold bits.
7.30 – film
DJ Dolphin boy — kicks into your eardrums
(break)
8.00 —- John Glenday — poems like crazy shining diamonds
8.20 —- Little Big Band — crooning toones! — an easy listening mash-up.
8.40 – cartoon
(break)
8.55 — Alan Bisset — His stories are all right. His hair is perfect.
9.10 — The Ghost of Joeseph Seal — yes, haunting.
9.30 — cartoon
(break)
10.00 – Jane Flett — seamstress of most fetching stories and poems.
10.10 — Jonny Berliner — Joyus songs about crustacaens, exhaustion, and glucose.
11.30 —- Paper Cinema — A cast of hand-drawn marionettes are magically brought to life. This is what happens at the accidental meeting of inkblots, photocopies, cardboard, angle-poise lamps, the occasional table, video technology, a laptop and a banana box.
00.00 —- Jason Morton — Or is he? Stories or Disaster. We never know.
00.15 — Jed Milroy and Hailey Beavis — bring us up and break us down. Shake it till you make it.


Hold Fast
My Technical Blogs
Blog 1: Git Blog
Blog 2: CSS Design
Blog 3: Arrays vs. Hashes
Blog 4: Enumerable Methods
My Cultural Blog
Blog 1: Learning How to Learn
Blog 2: My Thinking Style
Blog 3: Tech Issues Today
Blog 4: Tech Issues Today


Designates an element to be used as the delete button for a chip.
This element is passed as a child of the md-chips
element.
The designated button will be just appended to the chip and removes the given chip on click.
By default the button is not being styled by the md-chips
component.


RuPaul’s Drag Race UK: BBC to make season 2
RuPaul's Drag Race UK, the BBC Three drag queen reality competition, has been commissioned for a second series.
The first ever UK version of the show is in the middle of its debut season, with the finale on 21 November.
Drag Race features a regular panel of judges made up of Strictly Come Dancing contestant Michelle Visage, BBC chat show host Graham Norton and comedian Alan Carr.
The second season of the iPlayer show will air next year.
"I want to thank the BBC and all our fans for their overwhelming support of RuPaul's Drag Race UK," Emmy Award-winning host RuPaul said.
"This season's queens proved that Britain's Got Charisma, Uniqueness, Nerve, and Talent - and I want to see more!"
The US version of the show first aired in 2009, has run for 11 seasons and inspired a number of spin-off shows.
Season one of the UK version, which began airing in October, has attracted 6.5 million requests on iPlayer just over halfway through the series.
Celebrity guest judges on the first season have included actor Andrew Garfield, Little Mix's Jade Thirlwall, singer Cheryl and Game of Thrones actress Maisie Williams.
The show sees drag queen contestants - with names such as Baga Chipz, Sum Ting Wong and Divina De Campo - compete in challenges related to drag queen skills, such as singing, acting and comedy.


@(gameState: models.game.mask.GameMask,
quiz: models.quiz.Quiz,
question: models.quiz.question.TangentQuestion,
currentAnswer: Option[Either[models.quiz.answer.TangentAnswer, models.quiz.answer.TangentAnswer]])(implicit user: models.user.User, session: play.api.db.slick.Config.driver.simple.Session)
@import controllers.game.routes.{GamesRequestorController, GamesController}
@import controllers.quiz.tangent.TangentQuestionForm
@import helper._
@import com.artclod.play.s
@mainWithBorder("Answering Question", tag.courseOpLink(gameState.game.course), tag.gameLink(Html("game"), gameState.game)) {
You are answering Question for a game with @gameState.other.nameView
What is the Tangent of:
@question.display(false)
@for(answerEither <- currentAnswer) {
@answerEither match {
case Right(answer) => {You answered @answer.display that answer was @mathml.correct(answer.correct)}
case Left(answerTmp) => {You answered @answerTmp.display Sorry but the system was unable to determine if that answer was correct :( please try another answer}
}
}
@views.html.quiz.tangent.answerEditor(gameState.answerTangentQuestion(question.id), currentAnswer){@tag.gameLink(Html("Back to the Quiz"), gameState.game)}
@* ===== Results ===== *@
@defining(question.results(user)) { results : models.quiz.question.TangentQuestionResults =>
@if(results.answers.nonEmpty) {
You have answered this questions @results.answers.size time@s(results.answers)
@for(answer <- results.answers) {
- @answer.display this answer was @mathml.correct(answer.correct)
}
}
}
}


is a flexible and efficient library for deep learning.
Building a high-performance deep learning library requires many system-level design decisions. In this design note, we share the rationale for the specific choices made when designing MXNet. We imagine that these insights may be useful to both deep learning practioners and builders of other deep learning systems.
We’re happy to introduce a new elegant, easy to use, imperative interface for MXNet.
Learn MoreWe're excited to announce the release of MXNet 0.12.0! Check out the release notes for latest updates.
Learn MoreWe’re excited to announce that MXNet has been accepted to the Apache Incubator.
Learn MoreOff the shelf pre-trained models. Fast implementations of many state-of-art models.
Explore projects from simple demos, exmaples, tutorials to state-of-the-art research.
These tutorials introduce a few fundamental concepts in deep learning and how to implement them in MXNet.


{{project.name}}
{{tagName}}
Add
Edit
Download
Description
{{project.desc}}
Transcription Deadline
{{getDateString(project.transcDeadline)}}
Embargo Date
{{getDateString(project.embargoDate)}}
{{project.nod}}
Docs
{{project.notd}}
Transcribed
{{project.status}}
{{project.visibility}}
Public
Private
Save
Cancel
Sorry.. No files have been added yet..
{{file.name}}
Set as Exemplar


|
Wayland Client API
1.16.0
|
The global interface exposing sub-surface compositing capabilities. More...
Macros | |
| #define | WL_SUBCOMPOSITOR_DESTROY_SINCE_VERSION 1 |
| #define | WL_SUBCOMPOSITOR_GET_SUBSURFACE_SINCE_VERSION 1 |
Functions | |
| static void | wl_subcompositor_set_user_data (struct wl_subcompositor *wl_subcompositor, void *user_data) |
| static void * | wl_subcompositor_get_user_data (struct wl_subcompositor *wl_subcompositor) |
| static void | wl_subcompositor_destroy (struct wl_subcompositor *wl_subcompositor) |
| Informs the server that the client will not be using this protocol object anymore. More... | |
| static struct wl_subsurface * | wl_subcompositor_get_subsurface (struct wl_subcompositor *wl_subcompositor, struct wl_surface *surface, struct wl_surface *parent) |
| Create a sub-surface interface for the given surface, and associate it with the given parent surface. More... | |
The global interface exposing sub-surface compositing capabilities.
A wl_surface, that has sub-surfaces associated, is called the parent surface. Sub-surfaces can be arbitrarily nested and create a tree of sub-surfaces.
The root surface in a tree of sub-surfaces is the main surface. The main surface cannot be a sub-surface, because sub-surfaces must always have a parent.
A main surface with its sub-surfaces forms a (compound) window. For window management purposes, this set of wl_surface objects is to be considered as a single window, and it should also behave as such.
The aim of sub-surfaces is to offload some of the compositing work within a window from clients to the compositor. A prime example is a video player with decorations and video in separate wl_surface objects. This should allow the compositor to pass YUV video buffer processing to dedicated overlay hardware when possible.
| #define WL_SUBCOMPOSITOR_DESTROY_SINCE_VERSION 1 |
| #define WL_SUBCOMPOSITOR_GET_SUBSURFACE_SINCE_VERSION 1 |
|
inlinestatic |
Informs the server that the client will not be using this protocol object anymore.
This does not affect any other objects, wl_subsurface objects included.
|
static |
Create a sub-surface interface for the given surface, and associate it with the given parent surface.
This turns a plain wl_surface into a sub-surface.
The to-be sub-surface must not already have another role, and it must not have an existing wl_subsurface object. Otherwise a protocol error is raised.
Adding sub-surfaces to a parent is a double-buffered operation on the parent (see wl_surface.commit). The effect of adding a sub-surface becomes visible on the next time the state of the parent surface is applied.
This request modifies the behaviour of wl_surface.commit request on the sub-surface, see the documentation on wl_subsurface interface.
|
inlinestatic |
|
inlinestatic |


‘Misty Copelands’ Are Rare in World of Ballet, and Black Entrepreneur Looks to Change That
by Lauren FloydWhen Robin Pitts, founder of the dance studio Dance Makers, started dancing at 7 years old she didn’t see many people on TV who looked like her.
Her mother wasn’t even sure she’d like dance, after it didn’t take with her older sister.
Still, the aspiring ballerina begged until her mother relented.
More than 30 years later, she still hasn’t stopped dancing.
“I’m a studio kid,” Pitts told Atlanta Black Star Nov. 12.
She’s focusing more on the administrative side of dance these days, having founded the Maryland-based Dance Makers studio in 2001 and leading the organization into its 18th year.
The company, a relatively small studio with about 400 students, competes against studios that sometimes have as many as 12,000 or 15,000 students.
It’s attracted prominent instructors from noted choreographer and Julliard-trained dancer Roger Jeffrey to Caroline Rocher Barnes, who studied at the Alvin Ailey American Dance Center before joining The Dance Theatre of Harlem.
“In our community those parents who want technique, they come to us.” Pitts said.
She started her company, which offers jazz, ballet and hip-hop, with a mission to introduce more technically trained Black ballerinas onto the dance scene.
“When we go to dance competitions we’re the minority,” she said.
It’s not uncommon to see Black band dancers or artists in other types of dance, but “you don’t see a lot of Misty Copelands,” she said.
Copeland became the first Black woman to be promoted to principal dancer in the 75-year-history of American Ballet Theatre on June 30, 2015.
“It’s important because I think we need to see brown people,” Pitts said. “I never saw that.”
Ballet’s “precise focus of synchronization and uniformed visual blending including skin tone” has made it a difficult task for brown ballerinas to be as accepted and rise in premier ballet, according to a Dance Makers news release.
“For years Brown ballerinas have been told that their skin tone disrupts the visual uniformity of performances,” the company said.
In her documentary “A Ballerina’s Tale,” Copeland and other Black ballerinas spoke about the struggles they faced fitting into a ballet culture in which their skin colors and bodies weren’t widely accepted.
“I didn’t fit the mode,” Copeland said in the documentary. “Based on my body type, pedigree and background, I should not have been part of one of the greatest ballet companies.
I don’t think the classic ballet will ever accept me, I’m Black, I have a large chest, and I’m muscular.”
Pitts said the lack of diversity in dance has also been a major obstacle for her company when it comes time to recruit new students.
“We can go to competition and compete against one studio and beat them,” Pitts said, “and parents will go right over to them.”
She said some organizations don’t even offer the same quality of instruction, but people are “more forgiving.”
“And that bothers me,” Pitts said.
Pitts said she wants to put her company on a larger platform and one day have her studio featured on a reality TV show, but her most immediate goals are preparing her students for the real world.
Getting a college degree has to be part of that preparation because dance has a “very short lifespan,” Pitts said.
“There’s no way for us to survive. We need our education in order to be a competitor,” the entrepreneur said. “We have to do everything three times as hard.”


This is the portfolio of prospective web developer, Evan Stewart. He was born and raised with a midwest mindset.
Evan moved to Portland in 2008 and split time between Alaska before permanetly moving in 2011. You can usually find him biking around the city or occupying your local pinball room. His background is in Accounting, Marketing and German. He tore apart and rebuilt his first computer at 15 and has been interested in computers and coding ever since.
Interests
If you want to contact him, yell out your window, or Email him


Instructions
Welcome to Zabatuti's Tax Calculator!
To Calculate your tax you will need to
enter your income into the box to your
right. Once you have entered your income
the website will automaticaly calculate
your income for you and will apear under
the box, next to the allocated spot.
Graph
This graph displays the income tax payed on incomes between 0 and 250000. The graph has been designed for you to have a clearer understanding of your own tax output. The tax calculator shown above will calculate your tax so you dont have too.


Next: Balancing
Up: Nonsymmetric Eigenproblems
Previous: Nonsymmetric Eigenproblems
  Contents
  Index
Eigenvalues, Eigenvectors and Schur Factorization
Let A be a square n-by-n matrix. A scalar
is called
an eigenvalue and a non-zero column vector v the corresponding
right eigenvector if
.
A nonzero column vector u
satisfying
is called the left eigenvector.
The first basic task
of the routines described in this section
is to compute, for a given matrix A, all n values of
and,
if desired, their associated right eigenvectors v and/or
left eigenvectors u.
A second basic task is to compute the Schur factorization of a matrix A.
If A is complex, then its Schur factorization is A=ZTZH, where
Z is unitary and T is upper triangular. If A is real, its
Schur factorization is A=ZTZT, where Z is orthogonal.
and T is upper quasi-triangular (1-by-1 and 2-by-2 blocks on
its diagonal).
The columns of Z are called the Schur vectors of A.
The eigenvalues of A appear on the diagonal of T; complex conjugate
eigenvalues of a real A correspond to 2-by-2 blocks on the diagonal of T.
These two basic tasks can be performed in the following stages:
- 1.
- A general matrix A is reduced to upper Hessenberg form H
which is zero below the first subdiagonal. The reduction may be written
A=QHQT with Q orthogonal if A is real, or
A=QHQH with Q unitary if A is complex.
The reduction is performed by subroutine xGEHRD, which
represents
Q in a factored form, as described in section 5.4.
The routine xORGHR (or in the complex case xUNGHR) is provided to
form Q explicitly.
The routine xORMHR (or in the complex case xUNMHR) is provided to
multiply another matrix by Q without forming Q explicitly.
- 2.
- The upper Hessenberg matrix H is reduced to Schur form T,
giving the Schur factorization H=STST
(for H real) or H=STSH (for H complex). The matrix S (the Schur vectors
of H) may
optionally be computed as well. Alternatively S may be postmultiplied
into the matrix Q determined in stage 1, to give the matrix Z = Q S, the
Schur vectors of A. The eigenvalues are obtained from the
diagonal of T. All this is done by subroutine xHSEQR.
- 3.
- Given the eigenvalues, the eigenvectors may be computed in
two different ways. xHSEIN performs inverse iteration on H to compute
the eigenvectors of H;
xORMHR can then be used to multiply the eigenvectors by the matrix Q
in order to transform them to eigenvectors of A.
xTREVC computes the eigenvectors of T, and optionally transforms them
to those of H or A if the matrix S or Z is supplied.
Both xHSEIN and xTREVC allow selected left and/or right eigenvectors
to be computed.
Other subsidiary tasks may be performed before or after those just described.
Next: Balancing
Up: Nonsymmetric Eigenproblems
Previous: Nonsymmetric Eigenproblems
  Contents
  Index
Susan Blackford
1999-10-01


Sniper Ghost Warrior Contracts PC Performance Analysis
by John PapadopoulosCI Games has released the latest part in its Sniper Ghost Warrior series, Sniper Ghost Warrior Contracts. Contrary to its Sniper Ghost Warrior 3, Sniper Ghost Warrior Contracts is a more linear title. The game is using CRYENGINE so it’s time now to benchmark it and see how it performs on the PC platform.
For this PC Performance Analysis, we used an Intel i9 9900K with 16GB of DDR4 at 3600Mhz, AMD’s Radeon RX580 and RX Vega 64, NVIDIA’s RTX 2080Ti, GTX980Ti and GTX690. We also used Windows 10 64-bit, the GeForce driver 441.20 and the Radeon Software Adrenalin 2019 Edition 19.11.3 drivers. NVIDIA has not included any SLI profile for this title, meaning that our GTX690 performed similarly to a single GTX680.
CI Games has added very few graphics settings to tweak. PC gamers can adjust the quality of in-game effects, object detail, particles, physics, post-processing, shader and shading. And while there isn’t any resolution scale option, the team has provided a Field of View slider.
The game does not come with any built-in benchmark tool. As such, we’ve used the first level for both our CPU and GPU benchmarks.
In order to find out how the game scales on multiple CPU threads, we simulated a dual-core, a quad-core and a hexa-core CPU. And even though it’s only using the DirectX 11 API, Sniper Ghost Warrior Contracts does not require a high-end CPU. With Hyper Threading enabled, our simulated dual-core system was able to provide a constant 60fps experience at 1080p/Very High.
It’s also worth noting that even though our older Intel i7 4930K was bottlenecking our NVIDIA RTX2080Ti, it was still able to provide a smooth gaming experience. Thus, owners of older CPUs will be able to enjoy this latest Sniper Ghost Warrior game.
The game also does not appear to require a high-end GPU, however it appears that it has some weird performance issues with the Vega architecture. For some reason, our AMD Vega 64 under-performed in this particular title. What’s really crucial to note is that our AMD RX580 performed incredibly well. In fact, the RX580 was way faster than the Vega 64 at 1080p/Very High. Furthermore, we experience noticeable stuttering issues on the Vega 64 that were completely absent on the RX580. We were also able to replicate these performance issues multiple times. Therefore, AMD will have to address these performance issues via a new driver for its Vega GPUs.
Excluding the AMD Vega 64 with its performance issues, our AMD RX580, GTX980Ti and RTX2080Ti were able to run the game with 60fps at 1080p/Very High. At 1440p, the only GPU that was able to offer a smooth gaming experience was the RTX2080Ti. As for running the game in 4K/Very High, NVIDIA’s RTX2080Ti was dropping below 60fps in various scenes. Similarly to other titles, we suggest using a custom 1800p resolution for the RTX2080Ti. That is of course if you want to get a constant 60fps experience at Very High settings.
Graphics wise, Sniper Ghost Warrior Contracts looks actually pretty great. CI Games has used a lot of high-resolution textures and there are some really cool weather effects. The team has also added a new dismemberment system. While it does not push the graphical boundaries of what current FPS games can achieve, Sniper Ghost Warrior Contracts looks great. Moreover, it looks and runs better than its predecessor, Sniper Ghost Warrior 3.
In conclusion, Sniper Ghost Warrior Contracts appears to be running great on the PC platform. Still, there is undoubtedly room for improvement here. A lower-level API like Vulkan or DX12 could further improve performance on older CPUs. Furthermore, CI Games will have to work with AMD in order to resolve the performance issues on the Vega GPUs. A wider range of graphics settings would also be a welcome addition.
Enjoy!