|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Uses of FeatureSetting in kdl.prox.model2.rpt |
|---|
| Fields in kdl.prox.model2.rpt declared as FeatureSetting | |
|---|---|
FeatureSetting |
RPTNode.split
|
| Fields in kdl.prox.model2.rpt with type parameters of type FeatureSetting | |
|---|---|
java.util.List<FeatureSetting> |
RPTState.featureSettingList
|
| Methods in kdl.prox.model2.rpt that return FeatureSetting | |
|---|---|
FeatureSetting |
RPTNode.getSplit()
|
| Methods in kdl.prox.model2.rpt that return types with arguments of type FeatureSetting | |
|---|---|
java.util.List<FeatureSetting> |
RPT.getLearnedSplits()
Finds the featureSettings along the branches of the tree |
| Methods in kdl.prox.model2.rpt with parameters of type FeatureSetting | |
|---|---|
void |
RPTNode.setSplit(FeatureSetting fs)
|
| Uses of FeatureSetting in kdl.prox.model2.rpt.aggregators |
|---|
| Methods in kdl.prox.model2.rpt.aggregators that return FeatureSetting | |
|---|---|
FeatureSetting |
ValueFilteredAggregator.computeTable(NSTCache cache,
FeatureSetting fs)
|
FeatureSetting |
UnfilteredAggregator.computeTable(NSTCache cache,
FeatureSetting fs)
|
abstract FeatureSetting |
Aggregator.computeTable(NSTCache cache,
FeatureSetting fs)
This is used to compute a single table. |
| Methods in kdl.prox.model2.rpt.aggregators with parameters of type FeatureSetting | |
|---|---|
FeatureSetting |
ValueFilteredAggregator.computeTable(NSTCache cache,
FeatureSetting fs)
|
FeatureSetting |
UnfilteredAggregator.computeTable(NSTCache cache,
FeatureSetting fs)
|
abstract FeatureSetting |
Aggregator.computeTable(NSTCache cache,
FeatureSetting fs)
This is used to compute a single table. |
| Uses of FeatureSetting in kdl.prox.model2.rpt.featuresettings |
|---|
| Subclasses of FeatureSetting in kdl.prox.model2.rpt.featuresettings | |
|---|---|
class |
UnfilteredFeatureSetting
|
class |
ValueFilteredFeatureSetting
|
| Uses of FeatureSetting in kdl.prox.model2.rpt.modules.splitting |
|---|
| Methods in kdl.prox.model2.rpt.modules.splitting that return FeatureSetting | |
|---|---|
FeatureSetting |
Split.getFs()
|
| Constructors in kdl.prox.model2.rpt.modules.splitting with parameters of type FeatureSetting | |
|---|---|
Split(FeatureSetting fs,
RPTScoringModule score)
|
| Uses of FeatureSetting in kdl.prox.model2.rpt.util |
|---|
| Methods in kdl.prox.model2.rpt.util that return types with arguments of type FeatureSetting | |
|---|---|
static java.util.List<FeatureSetting> |
FSGenerationUtil.createFSTables(Container cont,
java.util.List<FeatureSetting> fsList,
RPTState rptState)
Used by RPT.apply: creates tables for a list of already established FeatureSettings NOTE: Remember to clear the nstCache before calling it --unless you intend to re-use old tables. |
static java.util.List<FeatureSetting> |
FSGenerationUtil.createFSTables(Container cont,
Source[] sourceList,
RPTState rptState)
|
static java.util.List<FeatureSetting> |
FSGenerationUtil.createFSTables(Container cont,
Source[] sourceList,
RPTState rptState,
java.util.List<java.lang.String> validAggregatorNamesList,
java.util.List<java.lang.String> invalidAggregatorNamesForCore)
Used by RPT.learn: Creates all the possible Feature Settings from the sources and the validAggregatorNamesList |
| Methods in kdl.prox.model2.rpt.util with parameters of type FeatureSetting | |
|---|---|
static NST[] |
BranchingUtil.getBranchSubgIDs(FeatureSetting split,
RPTState state)
|
| Method parameters in kdl.prox.model2.rpt.util with type arguments of type FeatureSetting | |
|---|---|
static java.util.List<FeatureSetting> |
FSGenerationUtil.createFSTables(Container cont,
java.util.List<FeatureSetting> fsList,
RPTState rptState)
Used by RPT.apply: creates tables for a list of already established FeatureSettings NOTE: Remember to clear the nstCache before calling it --unless you intend to re-use old tables. |
| Uses of FeatureSetting in kdl.prox.model2.util |
|---|
| Methods in kdl.prox.model2.util that return FeatureSetting | |
|---|---|
static FeatureSetting |
XMLUtil.readFeatureSettingFromXML(org.jdom.Element contEle)
Creates a feature setting from an XML element of type |
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |


Serialized Form
|
Package interbase.interclient |
cpds
javax.sql.ConnectionPoolDataSource cpds
user_
java.lang.String user_
password_
java.lang.String password_
factoryName_
java.lang.String factoryName_
maxPoolCount_
int maxPoolCount_
minPoolCount_
int minPoolCount_
maxCount_
int maxCount_
timeout_
int timeout_
waitCount_
int waitCount_
loginTimeout
int loginTimeout
- The time in seconds to wait for connections on this data source.
This is not stored as part of datasource under JNDI.
logWriter_
java.io.PrintWriter logWriter_
databaseName
java.lang.String databaseName
- The target database for this data source.
dataSourceName
java.lang.String dataSourceName
- A data source name; used to name an
underlying XADataSource, or ConnectionPoolDataSource
when pooling of connections is done.
description
java.lang.String description
- A description of this data source.
networkProtocol
java.lang.String networkProtocol
- The database protocol to use for a connection to this data source.
password
java.lang.String password
- The user password to use for a connection to this data source.
portNumber
int portNumber
- The port number where InterServer listens for connection requests to this data source.
roleName
java.lang.String roleName
- The user's SQL role to use for a connection to this data source.
serverName
java.lang.String serverName
- The server where InterServer manages requests to this data source.
user
java.lang.String user
- The user name to use for a connection to this data source.
sqlDialect
int sqlDialect
- The SQL Dialect to use for a connection to this data source.
driver_
java.lang.String driver_
charSet
java.lang.String charSet
- The character encoding to use for a connection to this data source.
serverManagerHost
java.lang.String serverManagerHost
- The InterBase server to be serviced by a ServerManager on this data source.
If this property is null,
serverName
is used.
suggestedCachePages
int suggestedCachePages
- The suggested number of cache pages to use for a connection to this data source.
sweepOnConnect
boolean sweepOnConnect
- Should the database be swept clean of old record versions upon connection to this data source.
createDatabase
boolean createDatabase
ref_
javax.naming.Reference ref_
props
java.util.Properties props
loaded
boolean loaded


This is a page to test how html-archiver handles inline scripts.
Because inline scripts do not refer to external resources, they should always be left unmodified.


Date: March 14, 2018
Time: 2:00 pm EST
Join Mike Belsito, co-founder of Product Collective; and Jake Sorofman, CMO of Pendo and former Gartner VP and chief of research for a rich discussion on the key characteristics of the highest performing product leaders. If you’re a product manager, a product executive or aspire to hold a product leadership role, you’re bound to walk away better prepared to master your role.


Separated Soul:
The Claw of Antharas barely touched my face, but it gripped my soul, and ripped it from me!
I can sense the other souls around here. If you want, I can send you to where these souls are located.
Also, using the Will of Antharas that you have, I can break the seal on the Blood Crystal. How about it?
Hunter's Village
Entrance of Dragon Valley
The Center of Dragon Valley
Deep inside Dragon Valley(North)
Entrance of Antharas' Lair
Antharas' Lair - Magic Force Field Bridge
Deep inside Antharas' Lair
Hear about Blood Crystal of Antharas
Request item synthesis
Quest


Graphical Effects
Effects are visual items that can be added to Qt Quick user interface as UI components. To import the Qt Graphical Effects types, include the Qt Graphical Effects module by adding the following statement to the QML file:
import QtGraphicalEffects 1.0
To use the effects, simply add a specific effect declaration to the QML scene and configure the effects properties. The source item type can be any QML type, even video or another effect. Pipelining multiple effects together is a simple way to create even more impressive output.
The following list presents the functional division of types that are part of Qt Graphical Effects:
Blend
Merges two source items by using a blend mode |
Color
Adjusts brightness and contrast | |
Alters the colors of the source item by applying an overlay color | |
Sets the color in the HSL color space | |
Reduces the saturation of the colors | |
Alters the luminance of the source item | |
Alters the source item colors in the HSL color space | |
Adjusts color levels in the RGBA color space |
Gradient
Draws a conical gradient | |
Draws a linear gradient | |
Draws a radial gradient |
Distortion
Moves the pixels of the source item according to the given displacement map |
Drop Shadow
Generates a soft shadow behind the source item | |
Generates a colorized and blurred shadow inside the source |
Blur
Applies a fast blur effect to one or more source items | |
Applies a higher quality blur effect | |
Applies a blur effect with a varying intesity | |
Blurs repeatedly, providing a strong blur effect |
Motion Blur
Applies blur effect to the specified direction | |
Applies directional blur in a circular direction around the items center point | |
Applies directional blur effect towards source items center point |
Glow
Generates a halo like glow around the source item | |
Generates a blurred and colorized rectangle, which gives the impression that the source is glowing |
Mask
Masks the source item with another item | |
Masks the source item with another item and applies a threshold value |


It's Only a Movie! by Richard Haberski Jr., Kentucky: University Press of Kentucky. 2001. Review by Harvey Karten<EMAIL_ADDRESS>As a film critic for several online sites, I share with others of my vocation a distress that while the public may be reading us, the reviews themselves seem to be influencing only a few in their choices of films. I like to say defensively that it is not the critic's function to operate as a Consumer Reports guide, to send people to the theaters or to guide them into settling back into their couches. But the writing is on the wall; or, rather, the writing should be there but it isn't: critics have lost much of the authority they once had to influence the public. In a short book filled with lush prose, Richard J. Haberski Jr. strives to tell us why critical authority has declined albeit less rapidly than the current NASDAQ chart, topping his tome off with a mixed conclusion. On the one hand movies are such a joyful medium, the film world may not really suffer for the breakdown in authority. On the other hand, "It is sad that today movie critics appear powerless ot help us discover the art of moviegoing."
Tracing a brief film history encompassing the impact of select organizations like the National Board of Review on the movie choices available to us, Haberski's book is most enlightening and relevant (at least to critics like me) when it referees debates among several major writers such as Pauline Kael, Andrew Sarris, Stanley Kauffmann and Dwight MacDonald--writers who have had often divergent viewpoints on such issues as the importance of the director, the gap between the younger and older audience, the relative values of elitism and democracy, and most of all the big question of whether movies should even be considered an art that justifies critical analysis.
Theory aside, the general public felt comfortable with the idea of art until the dawn of the Pop era signalled by the ideas and paintings of Andy Warhol. The book reaches a high point in its examination of the Big Debate between the Andrew ("auteur theory) Sarris--who believes that the director is the all-important creator of a film, and the late Pauline ("It's Only a Movie!") Kael - -who was known for toughness toward sugarcoated movies like "The Sound of Music" and praised almost universally condemned fare like "Bonnie and Clyde." Despite her staunch advocacy of strong films, Kael amassed a large readership with her disdain for pretension and love for good films whether or not they had "something to say."
"It's Only a Movie!" is a must-read for critics and would make a sure-fire addition to the library of movie buffs everywhere.
========== X-RAMR-ID: 29398 X-Language: en X-RT-SourceID: 570 X-RT-AuthorID: 1123
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Fight of the Day: James J. Braddock vs. Joe Louis
by Luke Irwin
Date: June 22, 1937
Card:
Championship(s): Lineal Heavyweight Championship
Venue: Comiskey Park
Location: Chicago, Illinois
Date: June 22, 1937
Card:
Championship(s): Lineal Heavyweight Championship
Venue: Comiskey Park
Location: Chicago, Illinois


| 933 | (A) | hase chosen the for cheftayne to be thaire chefe lorde |
| 940 | (C) | ¶ Haue chosyn þe for chefeteyne . to be her emperour |
| 926 | (D) | have chose þe her chefeteyn to be her chef lord |
| 903 | (E) | han chose þe her chyfteyn . & emperour to be |
| (Ex) | ---- no text ---- | |
| 958 | (L) | han chosen þe her chyuentayn here chef lorde to worþe |
| 876 | (P) | Has chosen þe for chyftane to be oure chefe lorde |
| 913 | (U) | haue chosen the for chief / her chiuetaigne to bene |
| (V) | ---- no text ---- |


Monitoring Tool
Error. Please check your credentials and try again.
Username
This is required.
Password
This is required.
Login
By logging in, you agree Terms & Privacy.


$ python3 Python 3.5.2+ (default, Sep 10 2016, 10:24:58) [GCC 6.2.0 20160901] on linux Type "help", "copyright", "credits" or "license" for more information. >>> print("Hello RoboCup!") Hello RoboCup!
# Hello world print("Hello World!") # Set a variable myinteger = 1 mydouble = 1.0 mystr = "one" print(myinteger) print(mydouble) print(mystr)
Hello World! 1 1.0 one
if True: print("I'm going to print out") if False: print("I'm never going to run =(") if True: print("RoboCup is Great!") else: print("RoboCup Sucks!!!!") a = 5 if a > 2: print("A was greater than 2!") if a > 2 and a < 10: print("A was > 2 and < 5") print("A is greater than 3" if a > 3 else "A is less than 3") print("A is greater than 9" if a < 3 else "A is less than 9")
I'm going to print out RoboCup is Great! A was greater than 2! A was > 2 and < 5 A is greater than 3 A is less than 9
a = 10 while a > 0: print(a, end=" ") a = a - 1 print("") print(list(range(10))) for i in range(10): print(i * i, end=" ") print("")
10 9 8 7 6 5 4 3 2 1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0 1 4 9 16 25 36 49 64 81
def func1(a, b): return a + b print(func1(2, 4)) # Lambda Expressions ('advanced' topic) def secret_func(): return "RoboCup!" def welcome(target): return "Welcome to " + target() print(welcome(secret_func)) print(welcome(lambda: "RoboJackets!")) # Lambda with arguments # print(welcome(lambda arg1, arg2: "RoboJackets!"))
6 Welcome to RoboCup! Welcome to RoboJackets!
class BaseClass(): globalVar = 1 # Constructor def __init__(self): print("Initializing a Base") self.localVar = 2 class ChildClass(BaseClass): def __init__(self): super().__init__() # call superclass constructor print("Initializing Child") print("Our local var is: " + str(self.localVar)) # When defining class methods, pass 'self' as the first arg. # Self refers to the current class instance. a = BaseClass() print("---") a = ChildClass()
Initializing a Base --- Initializing a Base Initializing Child Our local var is: 2
soccer/gameplay/skills/
soccer/gameplay/tactics/
soccer/gameplay/plays/*/
# First create a state Enum (An enum is just a group of names) class OurState(enum.Enum): start = 0 processing = 1 terminated = 2 # Then, register your states in our state machine class # You must be in a play/tactic/skill for this to work self.add_state(PlayName.OurState.start, # This is the superclass of our state. Most of the time, # this is 'running' (see below) behavior.Behavior.State.start) self.add_state(PlayName.OurState.processing, behavior.Behavior.State.running) self.add_state(PlayName.OurState.terminated, behavior.Behavior.State.completed)
self.add_transition( # Start state for this transition behavior.Behavior.State.start, # End state for this transition PlayName.OurState.processing, # Condition for this transition (Replace 'True' with a conditional) lambda: True, # Documentation String 'immediately')
# Assuming we have the PlayName.OurState.processing state # Action taken when entering this state def on_enter_processing(self): print("We have begun our processing") # Action taken every frame we are in the processing state def execute_processing(self): print("Processing is Ongoing") # Action taken when we exit the processing state def on_exit_processing(self): print("Processing is Completed!")
soccer/gameplay/plays/skel/which_half.py
to soccer/gameplay/plays/testing
# Gets the y position of the ball main.ball().pos.y # Gets the field length in meters constants.Field.Length


--- title: "Project Idea: XML-RPC desktop client/debugger" date: 2006-08-04 01:33:42 +1000 modified: 2006-08-04 11:33:42 +1000 uid: http://paul.annesley.cc/articles/2006/08/04/project-idea-xml-rpc-desktop-clientdebugger layout: post ---
While working with XML-RPC in PHP, I've been frustrated that the only desktop debugging client I could find was the XML-RPC Client for Mac, which doesn't do me much good in Windows.
I'm going to try and find time to have a go at building such a tool for Windows, either as a Java application or a XUL Firefox Extension - neither of which I have ever written a useful application with.
Some things to consider would be support for HTTP cookies, support for json-rpc as well as XML-RPC, and perhaps a plugin interface to allow addons which are useful for more than just adhoc debugging.


OT
`Prev `__
O
`Next `__
--------------
**OT**: //
[Usenet: common] Abbreviation for “off-topic”. This is used to respond
to a question that is inappropriate for the newsgroup that the
questioner posted to. Often used in an HTML-style modifier or with
adverbs. See also `*TAN* <../T/TAN.html>`__.
--------------
+------------------------+----------------------------+-------------------------+
| `Prev `__ | `Up <../O.html>`__ | `Next `__ |
+------------------------+----------------------------+-------------------------+
| OSS | `Home <../index.html>`__ | OTOH |
+------------------------+----------------------------+-------------------------+


Source code for agentframework
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 18 08:26:33 2019
@author: gyral
"""
import random
[docs]class Agent():
def __init__(self, environment, agents, y = None, x = None):
"""
This is the constructor, which is a method that is called when an
object (Agent) is created from a class. Furthermore, it allows the
class to initialize its attributes/properties (e.g. move, eat etc.).
"""
self.environment = environment
self.agents = agents
self.store = 0
if (x == None):
self._x = random.randint(0,300)
else:
self._x = x
if (y == None):
self._y = random.randint(0,300)
else:
self._y = y
[docs] def set_y(self, y):
"""
Setters: Making y private and setting it equal to a specified
integer value.
"""
self._y = y
[docs] def set_x(self, x):
"""
Setters: Making x private setting it equal to a specified
integer value.
"""
self._x = x
[docs] def get_y(self):
"""
Getters: getting the private y value
"""
return self._y
[docs] def get_x(self):
"""
Getters: getting the private x value
"""
return self._x
[docs] def move(self):
"""
Moving agents randomly:
- Problem: agents might be missing from the graph if they ended up
wandering off the edge.
- Solution: Torus - permit agents leaving the top of an area to
come in at the bottom and leaving left come in on the right side.
:param [self]: [pointing to the object itself ((data type: tuple))]
:return: [new random x and y values for the parameter self]
"""
if random.random() < 0.5:
self._y = (self._y + 1) % 300
else:
self._y = (self._y - 1) % 300
if random.random() < 0.5:
self._x = (self._x + 1) % 300
else:
self._x = (self._x - 1) % 300
[docs] def eat(self):
"""
Using the if statement to determine whether agents should eat the
environment or not.
If the environment is greater than 10 than subtract 10 units from the
environment and add it to the agent's store.
:param [self]: [pointing to the object itself (data type: tuple)]
:return: [values for the "environment" and "store" variables]
"""
if self.environment[self.get_y()][self.get_x()] > 10:
self.environment[self.get_y()][self.get_x()] -= 10
self.store += 10
# =============================================================================
# # Extension from practical 6 (I/O)
# # Displaing information about agents' location and stores
# =============================================================================
# =============================================================================
# def __str__(self):
# print("x location: ", self.get_x())
# print("y location: ", self.get_y())
# print("store: ", self.store)
#
# =============================================================================
[docs] def share_with_neighbours(self, neighbourhood):
"""
Calculating the distance to each of the other agent,
and if they tend to be within the neighbourhood distance then sets its
and its neighbours stores equal to the average of their two stores
Looping through the agents in self.agents.
1) Calculating the distance between self and the current other agent.
2) If the distance is less than or equal to neighbourhood
(by default 20 is the radius around agents)then add
self.store and agent.store.
3) Calculate the average by dividing the sum by 2.
4) Store this average into both the self.store and agent.store.
:param [self, neighbourhood]: [pointing to the agent itself
(data type: tuple) and neighbourhood (data type: integer)]
"""
for agent in self.agents:
distance = self.distance_between(agent)
if distance <= neighbourhood:
average = (self.store + agent.store)/2
self.store = average
agent.store = average
#print("Sharing " + str(distance) + " " + str(average))
[docs] def distance_between(self, other_agent):
"""
# Calculating how far the agents are by using Pythagoras
Agent 1 = self.
Agent 2 = other_agent.
:param [self, other_agent]: [pointing to the agent itself
(data type: tuple) and another agent (data type: tuple)]
:return: [distance between Agent 1 and Agent 2 by using
Pythagoras (data type: float)]
"""
return (((self.get_x() - other_agent.get_x())**2) +
((self.get_y() - other_agent.get_y())**2))**0.5


ControllerCellTypeOption
public enum ControllerCellTypeOption
Option enum to determine what time of cell registering and dequeueing to use
associated String
values are reuseIdentifier
-
UITableView cell subclassed with no xib or storyboard,
customIdentifier
required in initializerDeclaration
Swift
case classOnly(String)
-
UITableView cell from storyboard,
customIdentifier
required inGeneralTableController
initializerDeclaration
Swift
case storyboard(String)
-
UITableView cell subclassed with xib file that has matching names across class name, xib file name, and reuseIdentifier.
Declaration
Swift
case xibAuto
-
UITableView cell subclassed with xib, where xib and class have matching names, but the identifier is different and is required in
GeneralTableController
initizier.Declaration
Swift
case xibManual(String)


Pelosi: 'Sad' That Trump Doesn't Understand He Isn't 'Above the Law' | Breitbart
by Ian HanchettWhile speaking on Wednesday, House Speaker Nancy Pelosi (D-CA) stated that she is “sad” that President Trump “doesn’t understand that Article II does not say that he can do whatever he wants, that he is not above the law, and that he will be held accountable.”
Pelosi said, “We are defenders of our democracy. So, I’m very prayerful, thoughtful, and actually sad today that our country has to come to a place where the president doesn’t understand that Article II does not say that he can do whatever he wants, that he is not above the law, and that he will be held accountable.”
Follow Ian Hanchett on Twitter @IanHanchett


Happening now
Join Twitter today.
Sign up
Log in
×
Create your account
Next
About
Help Center
Terms of Service
Privacy Policy
Cookie Policy
Ads info
Blog
Status
Careers
Brand Resources
Advertising
Marketing
Twitter for Business
Developers
Directory
Settings
© 2021 Twitter, Inc.


kml.createFolder
Create a folder inside the current kml file
Contents
Syntax
k = kml('kml title here'); folder = k.createFolder('folder title here') --- any plot code here, using e.g. folder.plot(...) k.run;
Description
folder = kml.createFolder('title') creates a folder inside the current kml object. It is also possible to create nested folders, by using the same method in the folder object.
To plot inside a folder, simple use any available functions from the kml toolbox, as in:
folder.plot(...), folder.scatter(...), folder.model(...), etc...
Example
% Create a new kml object k = kml('my kml file'); % Create some folders in the kml file for i = 1:10 mainFolder = k.createFolder(sprintf('Folder %i', i)); for j = 1:10 nestedFolder = mainFolder.createFolder(sprintf('Nested Folder %i', j)); end end % Save the kml and open it in Google Earth k.run;
This example creates a nested folder structure like this:
This file is part of the kml toolbox. Copyright 2012 Rafael Fernandes de Oliveira (rafael@rafael.aero)


| DOSE: |
|
oral |
2C-T-7 |
(powder / crystals) |
I received my 2C-T-7 the day before the last two deaths were reported. If I had seen these earlier, I would have never ordered the material. As it stands, I'm glad I ordered when I did.
Having read the reports like everyone else, I expected a visual trip. Aside from a few mushroom journeys, it had been a good decade since my tripping days and I was primed and excited to reintroduce myself to these states. Because of this excitement, my first experience with 2C-T-7 was a major dissapointment. 20mg and another 10mg at T+2:00. Slight visual disturbance, annoying oscillations between hot and cold, no insights, no sense of awe, and a general feeling of irritability. I spent the majority of the trip dwelling an how 'bunk' it felt.
My next experience proved much more fruitful. Having much lower expectations and the goal of understanding my apathy, I took 40mg on an empty stomach. The slow ramp-up (1.5-2hrs) gave me plenty of time to kick myself for trying this stuff again. Had a brief wave of fear thinking about the related deaths, which was quickly dispelled out of necessity, 'not going down this road!' with a smile and feline distraction. T+2.5, I'm in. 'Oooh, I see! This feels goood!' I curl up in a ball on the rug, rocking back and forth letting warm waves of pleasure pulse thru my body. Friendly. Safe. Similar to E, but different. A taste of acid, but just a taste. Visuals were more pronounced, but their importance seemed irrelevant, just an after-thought in the full, sensuous body of the trip. Cut to the chase...
The crying begins! After a couple of hours enjoying myself, I focus on my goal. 'What was it? Come to terms with something...' I start to weep. I realize how desperately lonely I am. How I push away my friends. How I've fooled myself into believing this is O.K. How I've distracted myself from years of pain. Deep, gut-wrenching sobs, snotty, wonderful tears. It's now that I notice I'm in two seperate and distinct mental states. My 'crying self' realizes it's being watched by my 'observer self' who's grinning ear to ear. 'Don't let me stop you boy! Carry on!' I'm dissoriented and confused, I shift between these perspectives and can't resolve them into 'me'. I can't express how distinct these 'individuals' were.
Was I so cut off from my true emotions that this is how they have to manifest? I watch this force of 'emotion' in my mind's eye. Wow, emotion is powerful! I realize my 'crying self' has been starving. The 'observer's' yelling 'Go baby, Go!' I finish my first true cry in years under the watchful, caring gaze of myself.
At some point I became 'me' again and laughed, and thought, and laughed, till the wee hours of the morning:)
My third experience with 2C-T-7 was pure fun. 30mg. I knew what to expect, I knew what it could do, and I knew that I liked it.
My verdict on 2C-T-7? You get out what you put in.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Register to host additional dates below: Date Venue Address Food Sponsor Provide Food? Reserved Reserved


این یک متن فارسی می باشد
Hellooo!!!
This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.
This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.
This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.
This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.
This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.
This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.
Yahoo
This is a paragraph.
This is a paragraph.
This is a bold sentence.
This is also a bold sentence. with a standard tag
This is a underline.
This is a italic.
This is also an italic sentence. with strong tag
this is a text after hr fljflsajfk
this is a list ul type unordered list
this is a list ol type ordered list
This is an image
This is an image
| Name | Family | Age |
|---|---|---|
| Ali | Ahmadi | 29 |
| Erfan | khomami | 31 |
This is Tag < a >.
Back to Top Hello Dear!


Add users or groups as members of your API, and define their roles to manage and perform tasks and operations.


--- layout: post title: "Python language basics" date: 2014-07-12 23:51:05 categories: python, basics ---
For a developer is not enough to know one programming language, it is often said that is good to know many of them. After all the language is but a mere tool to build programs. Python has been around for many years and one of my pending task was to take a look at it. Some friends (@Eugenia4v,@Claw_Shadow,@D00m3dr4v3n) are always telling me about the benefits of Python not to mention plenty of papers where Python is even recommended as the language of choice to get into programming. I guess that when Google itself has been using Python from the beginning, and when this language is a requirement for many job offers there is something about it. Despite the title of this post, I spent more than 21 minutes coding around and trying the basics so don't expect a deep dive into Python. This is just a quick guide
Python is: interpreted, weakly typed, (could be compilated), case sensitive, supports oop, functional, imperative programming,... apart from the classic definition, if you come from c style languages at first glance you'll notice the lack of semicolons. But the real change in Python is the use of indentation to create code blocks. So instead using brackets for if-else-loops-functions you have to use indents or tabs properly. This at least, somehow leads to mandatory code convention (they exists too), here there is no room for discussion about the most clear way to write an if-else structure; there is only "one style" so follow it or your code will not run at all. But to sum up, and above all, python was designed to be easy to read
All the sample code used in this post is included in one single file.
So you have just installed python in you windows box or you are running a linux machine, which means that python is most likely in da house. Open any text editor, write this and save it with .py extension:
print 'Hello World desde España y olé' # testing utf-8 :P print "Welcome to python \'resume\'" print "New Line \n and ring the bell \a"
To run this we can just execute python filename.py
, or give it execution perms and run it directly
If you want to test some python code directly in the interpreter, just run python and the python prompt will show up awaiting for your commands.
We have single line comments and multiline comments. The first line gives support for utf-8 characters.
# -*- coding: utf-8 -*- # This is a single line comment """ some python in a few lines, by Pello Altadill This is a multiple line comment more suitable for long texts like this greetz to any """
There are no types in python. Variable declaration is the simplest possible.
# variable definitions ########### number = 666 negativeNumber = -42 decimals = 3.1415 name = "Legion" anotherName = "Legion of Doom" letterA = 'a' letterB = "b" godExists = True itsMe = False # multiline string, prayer = """Gods of war I call you, my sword is by my side, I seek a life of honor, free from all false pride""" # multiple assignment, c-style a = b = c = 0 # but not strongly typed... a = True c = 'Hello' a = 10 b = -a c = 42
Comparing with other languages we have some extra operators here. Bit operators are omitted, but you've them all.
# expressions ########## # arithmethyc a = b + c b = a - c c = a * b a = b / c # returns floating point a = b // c # integer division modulus = a % c thePower = a ** 3 # of course this are available: a += b b -= c c *= a a /= b b %= 42 # booleans, as always theTruth = godExists and itsMe theTruth = godExists or false theTruth = not godExists # comparison operators areEqual = a == b areNotEqual = a!= b # a <> b works, but obsolete isBigger = a > b isLess = a < b biggerOrEqual = a >= b lessOrEqual = a <= b # combination of all of them superTrue = ( (a-1) > b) or (not(c == (b*4))) # concatenation use , in general. + for strings print "My name is " , name print a , " - " , b , " - " , c # if whe use + whe must convert to string print str(a) + "," + str(b) + "," + str(c) print prayer # del unbinds variable values del prayer # print prayer would now fail
Python offers if, if-else, if-elsif-else but there is NO switch/case.
# conditional ######################### # single if if godExists: print "God is real unless declared integer" ## single line if if True:print 'I am single lined if' anything = '1' if anything: print "Yeah, anything different to 0 means True" # 0, None, "", '', empty structures (),[],{} are the same as False numberZero = 0 if not numberZero: print "And 0 is False" # we can omit or put parenthesis if (a<b or b==c): print "a less than b or b equals c" # if-else if a > b: print "a is bigger than b" else: print "a is NOT bigger than b" # elif if a > b: print "a is bigger than b" elif a < b: print "a is less than b" elif a == b: print "a and b are equal" elif a == 0: pass # this a way to do NOTHING , as we can't leave a block empty else: print "a and b are alien" # THERE IS NO switch case # but you can do it with a elif structure
for and while loops as always but... there is no do-while. for is very simple and works well as foreach.
# loops ########################### # while loop c = 3 while c>0 : print "a loop with c" , c c-=1 # for loop # for i in range(begin,end), does not reach end for x in range(0,5): print "for loop with x " , x # with different step # range(5) = [0, 1, 2, 3, 4] # for (i in range(begin,end, step)) for x in range(0,10,2): print "for loop inc 2 with x " , x for x in range(5,0,-1): print "for loop dec with x " , x # xrange(number): from 0 to number for x in xrange(5): # 0..4 print "testing xrange: " , x name = 'Python' for x in name: print "for loop with string: " , x # break and continue works in python as well # applied to while and for # with break we stop and exit the loop findTheX = 'sdfXsaf' for x in findTheX: if x == "X": print "found the X, now exit" break # with continue we finish current iteration and go for next someVocals = '0a00i0e00u000a' for x in someVocals: if x =='0': continue elif x =='a': print "a founded" elif x=='e': print "e founded" # else clause ###### after for and while is executed after the normal # execution of the iteration, but NOT when the execution has been # interrupted by break, exceptions or returns. counter = 0 for x in someVocals: if x == 'a': counter += 1 else: print "Total a letters found in " , someVocals , ": " , counter # THERE IS NO do-while structure
The most basic way to pass arguments to a python script is using the sys.argv list. But, there are other richer modules available to get arguments in getopt style.
print 'Total arguments: ' , number , len(sys.argv) for a in sys.argv: print a # reading from console value = raw_input("write something") print value
We have three kind of basic structures, but beware, once defined tuples can't be changed: they are immutable
# STRUCTURES ############################# # Tuples = IMMUTABLE, ordered, sequence of arbitrary items someValues = (42, 15, 69) otherValues = ('Meaning', 42, True, -0.3) newTuple = tuple('aeiou') # this creates ('a','e','i','o','u') emptyTuple= () print "First: " , otherValues[0] print "Last: " , otherValues[-1] # This is a way to add an elemtn otherValues+= (34,56) # THIS IS NOT ALLOWED as a tuple is IMMUTABLE # otherValues[0] = 'Satan' # of course is iterable for v in otherValues: print "Tuple: " , v # Lists = MUTABLE, ordered, sequence of arbitrary items superList = ['Python','Ruby','Go'] otherList = ['God',666, True] emptyList = [] print "First: " , superList[0] print "Last: " , superList[-1] # This is a way to add an elemtn superList+= ['NodeJS'] otherList[0] = 'Satan' for x in superList: print "Superlist : " , x # Dictionaries = MUTABLE, arbitrary collection of items # indexed by arbitrary items = similar to hashtables, hash, maps, you name it. ages = {'Gandalf':1432, 'Aragorn':543, 'Bilbo':112} emptyDictionary = {} # using the builtin function: trigValues = dict(sin=34,cos=353.23,tan=34) otherAges = dict([['Frodo',34],['Samwise',35]]) ages['Bilbo'] = 120 ages['Radagast'] = 1423 # iterating... for key in ages: print key , " : " , ages[key] # SLICING SEQUENCES # We access an element with sequence[index] # to get a slice of if: sequence[begin:length:stride] # stride is the distance or leap ports = [20, 21, 25, 80, 443, 110, 143]; webPorts = ports[3:2] # [80, 443] ftpPorts = ports[:2]; # [20, 21] somePorts = ports[1:6:2] # [21, 80, 110] # Strings are IMMUTABLE!! and slicing works the same way myName = "Pello Xabier Altadill Izura" # so this is illegal #myName[0] = 'L' print myName[0] , " name: " , myName[:5]
If we want to manipulate these structures, we have many built-in methods available.
def, function name and parameters, that's all.
# function definition ################# def hello(): print "hello" def add(a,b): return a+b def isEven(a): return (a%2==0) def withDefaultValues(a, b=0, c=42): result = a + b - c print "Parameter values: " print "a is " , a print "b is " , b print "c is " , c return result # calling functions hello hello() a = add(600,66) print "Result of addition: " , add(a,b) b = isEven(a) print "Result of isEven for " , a , ": " , b withDefaultValues(5) withDefaultValues(15,-5)
Put code in a file called filename.py and we can reuse it in other files just by doing import filename. Of course, apart from OOP, there are other options to package and reuse code more efficiently.
This is our super module, which has one super function
# hello.py def sayHello(name=""): return "Hello " , name
And this is the code to import and use that module
# importing an external 'hello.py' source import hello as myModule print myModule.sayHello("my little friend")
You may heard something about IDLE.  We could always use eclipse with plugins, aptana,... or pycharm by jetbrains if we prefer a simpler sintax-highlighted text editor check these out:
One of the complains you may have heard about python is that version 3 and 2 are not compatible. Apart from that it is one of the languages that any coder should know (in addition to all object oriented c-style languages imho). What about the OOP? well, I was horrified when I saw some code. It looked as dirty as perl, or even more (I like perl btw). Maybe another day.
When it comes to language preferences, it's always the same. Some people don't like java at all. Many coders think that php is not a language to be taken seriously. Other radicals hate whatever.NET from Microsoft. There are always fierce Python and Ruby supporters. I think that you have to forget your preferences and try to learn them all and master a few of them. Which language is the best? it depends. After all, web servers are written in c++ (yeah, nodejs too) and that's fine. And on top of the webserver we have realms of webapps built with interpreted languages: php, python, ruby, java, c#, js, ... . As for the dbms: frequently coded in c++, with sql, js, json on top.


Privacy Policy
Privacy Policy
Maysam Shahsavari built the SimpleDB app as an Open Source app. This SERVICE is provided by Maysam Shahsavari at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
Information Collection and Use
This app does not collect any information of any kind.
Contact Me
If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me.


{{user.username}}'s bookings
{% for reserve in reserves_list %}
Tour: {{ reserve.name.name }}
Start_date: {{ reserve.start_date }}
End_date: {{ reserve.end_date }}
Booking status: {{ reserve.status|yesno:"Booked succesfully,Wait for the admin's reply" }}
{% empty %}
No bookings here
{% endfor %}
Back to profile
Main page


Arsenal in battle over potential £60million transfer amid doubts over keeping current star
by Mark BrusArsenal are reportedly up against Inter Milan in a transfer battle for exciting Brazilian wonderkid Reinier Jesus.
The 17-year-old looks a hugely promising attacking midfield talent who could be the next big thing from Brazil to make a career for himself in Europe.
MORE: Video: Furious Arsenal fan throws his season ticket away after another poor result
Arsenal did well to sign another teenage talent from Brazil during the summer as they brought in Gabriel Martinelli, who has made a fine start to life at the Emirates Stadium.
And now, it’s being claimed by the Sun that they’re alongside Inter in the running for this potential £60million transfer deal.
The Gunners are targeting a move for Reinier amid doubts over the future of star striker Pierre-Emerick Aubameyang, so he could be being eyed as a long-term replacement, the Sun’s report suggests.
Most Arsenal fans would surely agree that some investment is needed as soon as possible after a poor start to the season.
Still, many would probably also argue that the priority should be changing the manager as Unai Emery seems to be badly struggling to get the best out of this squad.
The Spanish tactician has, however, tended to be quite good at bringing young players through, so could perhaps do with a big talent like Reinier coming in as another option.
If, however, there is some chance of losing Aubameyang, as the Sun mention, it’s surely going to take more than just signing youngsters like this to fill the void.


name: inverse layout: true class: center, middle, inverse --- # Session 2 ## Python's basic syntax --- name: default layout: true --- .left-column[ ## Basics ] .right-column[ ##Program Flow The python interpreter starts at the top of a program, and works its way down, line by line. ] -- .right-column[ - but it can jump around if you loop, or call a function. ] -- .right-column[ - sometimes these jumps will be "implicit": Python will call them behind the scenes ] --- .left-column[ ## Basics ] .right-column[ ## Variables Most introductory programming texts describe variables as "little boxes" .width100pc[ ![Three boxes with variables in them](img/little_boxes.png) ] ] -- .right-column[ This is true in languages like C, that deal directly with memory addresses, but not in Python ] --- .left-column[ ## Basics ] .right-column[ ## Variables In Python, creating a variable is more like sticking a label on a piece of data so you can find it again. .height250[ ![A paper label on a piece of string](img/label_tag.jpg) ] ] -- .right-column[ So if you type `a = "Hello World"`, the label `a` will be attached to the string `"Hello World"` ] -- .right-column[ if you then type `b = a`, `b` will *also* be attached to the string `"Hello World"` ] --- .left-column[ ## Basics ] .right-column[ ## Variables Variables can point to any Python structure, including functions, instances, classes, modules (we'll see how to use this later on) ] -- .right-column[ They start with a letter or underscore, and continue with letters, underscores and numbers. ] -- .right-column[ ## Typing Python is a dynamic language, but also strongly typed ] -- .right-column[ `"1" + 1` will raise a TypeError exception, because "1" is a string. ] -- .right-column[ You'll need to **cast** some things to the right type, like this: `int("1") + 1` ] -- .right-column[ There are some odd-looking exceptions to this rule though, like `"Hello World" * 5` ] --- .left-column[ ## Basics ## Data types ] .right-column[ ## Simple data types: Numbers Python has several built-in numeric types ] -- .right-column[ **Integers:** 0, 1, 2, ... They can go arbitrarily high and will use native integers where possible. ] -- .right-column[ Higher value integers will switch to "Long integers" transparently. ] -- .right-column[ **Floats:** These are fractional or real numbers, like 3.141592 or 0.0125 ] -- .right-column[ Floats are approximate, so you'll get odd errors for some values, especially high precision ones ] -- .right-column[ ``` >>> sum([0.1] * 10) 0.9999999999999999 ``` ] --- .left-column[ ## Basics ## Data types ] .right-column[ ## Simple data types: Numbers Python will also convert between integer and float where necessary ``` >>> 3 / 2 1.5 >>> 3 // 2 1 ``` ] -- .right-column[ If you definitely need arbitrary precision (usually if you're dealing with money) use the `decimal` module ``` >>> from decimal import Decimal >>> sum([Decimal("0.1")] * 10) Decimal('1.0') >>> Decimal(0.1) Decimal('0.1000000000000000055511151231257827021181583404541015625') ``` ] --- .left-column[ ## Basics ## Data types ] .right-column[ ## Simple data types: Strings Strings are a sequence of characters. There are two types: binary and unicode. **Note: If you're on Windows, you might want to use the IDLE editor for this next bit. Windows terminals don't use unicode.** ] -- .right-column[ Binary strings are sequences of ascii bytes (0-255), like you might find in a file. ``` >>> "Hello".encode() b'Hello' >>> b"Hello".decode() 'Hello' ``` ] --- .left-column[ ## Basics ## Data types ] .right-column[ ## Simple data types: Strings Unicode strings are sequences of characters. We use them because some characters need more than one byte ``` >>> '★Hello★'.encode() b'\xe2\x98\x85Hello\xe2\x98\x85' >>> b"\xe2\x98\x85Hello\xe2\x98\x85".decode("utf-8") '★Hello★' ``` ] -- .right-column[ Note that you need to know what encoding to use when converting from bytes. Weird things happen when you use the wrong one ``` >>> b"\xe2\x98\x85Hello\xe2\x98\x85".decode("latin-1") 'â\x98\x85Helloâ\x98\x85' ``` ] --- .left-column[ ## Basics ## Data types ] .right-column[ ## Simple data types: Using strings There are a few ways to declare a string "double quotes" 'single quotes' "it's ok to have single quotes within doubles" 'or "vice versa"' 'You can also \'escape\' quotes if you have to' """Finally, there are triple quoted strings, which can run over multiple lines""" '''They can be double or single''' ] --- .left-column[ ## Basics ## Data types ] .right-column[ ## Simple data types: Using strings Python will also concatenate strings that are next to each other ``` >>> print ("Hello " "World") Hello World ``` And you can join up longer strings over multiple lines if you use brackets >>> print ("Hello " ... "Wor" ... "ld") Hello World ] --- .left-column[ ## Basics ## Data types ] .right-column[ ## Simple data types: Using strings Strings also have a lot of useful methods for information. ``` >>> "a string".endswith("string") True >>> "str" in "a string" True >>> "# A comment line".startswith("#") True ``` ] -- .right-column[ ... and manipulation ``` >>> "Mon Tues Wed Thu Fri Sat Sun".split() ['Mon', 'Tues', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] >>> " weird line \n\n".strip() 'weird line' >>> "anthony".title() 'Anthony' ``` These can often save you using something more complex, like a regular expression. ] --- .left-column[ ## Basics ## Data types ] .right-column[ ## Simple data types: Using strings The final thing to talk about with strings is how to use them with variables. The easiest way is just to add them together: print ("'a_string' is: " + a_string) print ("'a_number' is: " + str(a_number) ] -- .right-column[ In the past, you could also use '%' formatting (like C), and `.format()` strings print ("'a_string' is: %s" % a_string) print ("'a_number is: %d" % a_number) print ("'a_string' is: {}".format(a_string)) print (("'a_string' is: {0}, " "'a_number' is {1}").format(a_string, a_number)) ] --- .left-column[ ## Basics ## Data types ] .right-column[ ## Simple data types: F-strings In Python 3.6, there's a new type of string, called an f-string, which is a lot easier to use. ``` print (f"'a_string' is: {a_string}, " f"'a_number' is: {a_number}") ``` ] -- .right-column[ Just put an `f` at the front of the string, and then the quoting is similar to templating languages like Django's - just wrap the variable name in curly quotes. ] -- .right-column[ And they follow the `.format()` language specification, so you can align the printing, pad variables, access class attributes, dictionary keys, and so on. ] --- .left-column[ ## Basics ## Data types ## If/Else/While ] .right-column[ ## If and Else You can test something using expressions and run different code paths: ``` if a_number >= 42: print ("The number is too high!") else: print ("The number is ok.") ``` You can also use `if` just by itself ] -- .right-column[ If you need to test multiple cases, then you can use `elif` too: ``` if a_number >= 42: print ("The number is too high!") elif a_number >= 37: print ("The number is very high!") elif a_number >= 29: print ("The number is a little bit high...") else: print ("The number is ok.") ``` ] --- .left-column[ ## Basics ## Data types ## If/Else ] .right-column[ ## If and Else The tests in if statements can be anything: - values or variables - `True`, `None`, `"A string"` - logic statements, like `a >= 2`, `c < 5`, `d == "Test"` - a function or method call, `a_string.startswith("#")` - a combination, using `and`, `or`, `not` and brackets `(a >= 2 or c < 5) and d == "Test"` ] -- .right-column[ The concept of "truthiness": - non-zero values and non-empty things are generally true - zeros, blank strings and empty things are false - not really good practice though - better to declare the test explicitly ``` if user_input == "": print ("You need to enter a value") ``` ] --- .left-column[ ## Basics ## Data types ## If/Else ## Data structures ] .right-column[ ## More complex data types: Structures Lots of data is structured. You might store information about someone, and need to know - their name - email address - phone number - who their friends are Or you might want to store a list of people at PyCon. ] -- .right-column[ Using the right structure makes it easier and faster to get your data when you need it. ] --- .left-column[ ## Basics ## Data types ## If/Else ## Data structures ] .right-column[ ## Lists A bunch of things, stored in order. Can be anything in Python - strings, numbers, variables, other lists, etc. ``` my_list = ['1', 'Two', 3, None, a_string, [], [1, 2, 3]] ``` ] -- .right-column[ You can access the contents with an index, by popping off the last element, or by looping over them ``` first_item = my_list[0] a_number = my_list[2] last_element = my_list[-1] first_three = my_list[:3] last_three = my_list[-3:] list_copy = my_list[:] my_list[5] = ['a', 'b', 'c'] ``` ] -- .right-column[ This removes the last element from `my_list` and puts it in `last_element` ``` last_element = my_list.pop() ``` ] --- .left-column[ ## Basics ## Data types ## If/Else ## Data structures ] .right-column[ ## Dictionaries These are used for storing and quickly accessing values at will, using a key. The key has to be something static (hashable), like a number or string - it can't be something mutable like a list. The value can be anything. Keys also have to be unique. Reusing a key overrides the old value. ``` pycon_people['Anthony'] = ["Anthony", "Briggs", ...] ``` ] -- .right-column[ To declare a dictionary, use curly brackets, like this: ``` pycon_people = {} pycon_people = {'Anthony': ["Anthony", "Briggs", ...], } ``` ] -- .right-column[ If you need to test whether a key's in a dictionary, you can use the `in` keyword ``` "Anthony" in pycon_people ``` ] --- .left-column[ ## Basics ## Data types ## If/Else ## Data structures ] .right-column[ # Sets Similar to a dictionary, but just the keys. The items in it still have to be hashable, and testing for membership is fast. ``` pycon_registered = set("Anthony", "Richard", "Tennessee") pycon_registered = {"Anthony", "Richard", "Tennessee"} ``` ] -- .right-column[ ``` >>> "Bruce" in pycon_registered False ``` ] --- .left-column[ ## Basics ## Data types ## If/Else ## Data structures ] .right-column[ # Tuples These are like a static list. You can't add extra elements to them, or change existing elements (Unless they're mutable). Tuples are useful for things like points in geometry (x, y) or fixed rows of data. ``` 2d_point = (2, 3) ``` ] -- .right-column[ Tuples are also used in multiple assignment: ``` x, y = 2, 3 ``` The tuple is actually defined by the comma, not the brackets ``` >>> 2d_point = 2, 3 >>> 2d_point (2, 3) >>> type(2d_point)
``` (But don't do this, it's terrible) ] --- .left-column[ ## Basics ## Data types ## If/Else ## Data structures ## Looping ] .right-column[ ## For loops Anything which can have multiple elements in it (technically called "iterables") can be used in a for loop. (All the data types we've used so far except numbers are iterable - strings will loop over each character) Let's say we want to send a reminder email to everyone on our mailing list who hasn't registered for PyCon AU yet... ``` # pycon_people = {'name': [first, last, email, ...] } for name, person in pycon_people.items(): if name not in pycon_registered: email = person[2] send_pycon_nag_email( name=person[0], email=email) ``` Caveat: Don't fiddle with something while you're looping over it ] --- .left-column[ ## Basics ## Data types ## If/Else ## Data structures ## Looping ] .right-column[ ## Looping You can use `break` to stop a loop completely, and `continue` to stop the current one and start on the next. ``` for name, person in pycon_people.items(): if name in pycon_registered: continue # ... later on ... if smtp_status == "permanent error": log("The mail server is down!") break ``` ] -- .right-column[ There are also two built-in functions, `sorted` and `reversed`, which can help with some iterables. ``` for name in sorted(pycon_registered): log("Registered person: " + name) ``` Sorted also has a `reverse` keyword: `sorted(thing, reverse=True)` ] --- .left-column[ ## Basics ## Data types ## If/Else ## Data structures ## Looping ] .right-column[ ## While loops These aren't used very often, but can be handy. ``` while pycon_tickets_remaining > 0: handle_ticket_registration(person) pycon_tickets_remaining -= 1 ``` ] -- .right-column[ You can also use them as infinite (indefinite?) loops or event loops: ``` while True: if something_happened(): break ``` ] --- .left-column[ ## Basics ## Data types ## If/Else ## Data structures ## Looping ] .right-column[ ## List comprehensions You can think of these as super fast `for` loops, since the iteration part is handled by C. ``` reg_people = [person for person in pycon_people.values() if person[0] in pycon_registered] ``` They're more declarative, that is, you tell Python what you want, rather than how to get it. "I want each person in `pycon_people`'s values, ***if*** that person's name is in `pycon_registered`" ] -- .right-column[ The item, the iterable and the if statement can be pretty much any python expression ``` = [person[0] + person[1] ... ] = [... if person[0] in pycon_registered and "example.com" not in person[2]] ``` .footnote[.red[*] These are readable versions of map, filter and lambda, and are copied from Haskell] ] --- .left-column[ ## Basics ## Data types ## If/Else ## Data structures ## Looping ] .right-column[ ## Other comprehensions There are other types of comprehensions that you can use. **Generator expressions** will generate the iterable one element at a time, useful for larger sets, or ones with expensive elements. ``` reg_people = (person for person in pycon_people.values() if person[0] in pycon_registered) ``` ] -- .right-column[ **Set and dictionary comprehensions** are (funnily enough) the set and dictionary equivalents of list comprehensions. ``` test_emails = {person[3] for person in pycon_people.values() if "example.com" in person[2]} emails = {person[0] + person[1]: person[2] for person in pycon_people.values()} ``` ] --- class: center, middle, inverse # Short break? # Questions? # Sample code? --- .left-column[ ## Functions ] .right-column[ ## Functions Functions are a way of partitioning off sections of your program so that it's easier to understand, the parts are less coupled, and you can reuse them. ``` def printable_person(person): return (f'{person[0]} {person[1]}, ' f'email: "{person[0]} {person[1]}" <{person[2]}>') ``` ] -- .right-column[ Functions (usually) have a name, a number of *arguments* that you provide when you call them, and can return a value. ``` >>> details = printable_person(person) 'Anthony Briggs, email: "Anthony Briggs"
' ``` The number of arguments have to correspond. If you call a function with a different number, Python will raise a TypeError. ] --- .left-column[ ## Functions ] .right-column[ ## Doc strings Functions can (should!) have a string immediately after them, which documents what they do. ``` def printable_person(person): """A printable representation of a person, used in the admin screen.""" return (f'{person[0]} {person[1]}, ' f'email: "{person[0]} {person[1]}" <{person[2]}>') ``` It'll appear in `help()`, and you can see it through the __doc__ attribute. ] --- .left-column[ ## Functions ] .right-column[ ## Keyword arguments You can provide arguments by name if there are a lot of them, or it makes your program more readable. ``` speaker_details = printable_person(person=speaker) send_email(to=speaker_email, sender=pycon_organiser, subject="Your talk ...", content="Dear Speaker, ...") ``` Keyword arguments need to come after any unnamed arguments, otherwise you can't tell which are which. ] -- .right-column[ There's also a syntax which allows you to assign arguments and keyword arguments to a list and dictionary instead of individual variables. ``` def special_function(*args, **kwargs): name = args[0] email = kwargs['email'] ``` You can also call functions using `*` and `**`. ] --- .left-column[ ## Functions ] .right-column[ ## Default arguments Finally, you can define your functions with default arguments. If they're not specified when the function's called, then they'll get their defaults. ``` def add_person(first_name, last_name, email="", phone="", address=""): "Add a new person to the database." ``` ] -- .right-column[ **There's a catch though.** The default arguments are created when the function is defined, not when it's called. So if your default argument is mutable, like a list or a dictionary, make sure you copy it if you're going to change it. ``` def add_person(..., talks=[]): "Add a person, including their talks" # ... for talk in get_talks(person): talks.append(talk) person.talks = talks # this will bite you! ``` ] --- .left-column[ ## Functions ## Exceptions ] .right-column[ ## Handling exceptions When Python runs into something it can't handle, it raises an Exception. Sometimes this is an error, but some libraries use it as a normal operation. It's possible to handle any exception that Python throws (except `SyntaxError`). To do that, wrap your code in an exception handler, also called a `try..except` statement. ``` empty_list = [] try: print (empty_list[2]) except IndexError as error: print ("There was an IndexError:", error) ``` If an `IndexError` is raised in the try clause, it'll jump to the except part and print the error, then continue with the code after that. ] --- .left-column[ ## Functions ## Exceptions ] .right-column[ ## Handling multiple exceptions You can extend a `try..except` to handle multiple exceptions, by listing them one after the other ``` try: print (empty_list[2]) except IndexError as error: print ("There was an IndexError:", error) except NameError as error: print ("There was a NameError:", error) ``` ] -- .right-column[ You can also set up a 'catch-all' handler, **but** this is bad practice. You'll catch exceptions you shouldn't and make your programs harder to debug. ``` empty_list = [] try: print (empty_list["2"]) except: print("There was some sort of error.") try: print (empty_list["2"]) except Exception as error: print (f"There was a {type(error).__name__}:", error) ``` ] --- name: last-page template: inverse ## Question time? ## Let's look at some code? ## 5 minute break


{% extends 'layouts/base-fullscreen.html' %} {% block title %} Error 404 {% endblock title %} {% block stylesheets %}{% endblock stylesheets %} {% block content %} Error 404 Something went wrong. Page not found If the problem persists, please contact support. HOME {% endblock content %} {% block javascripts %}{% endblock javascripts %}
Something went wrong.
If the problem persists, please contact support.


Interim Director, School of Technology Studies
Professor, Dept. of Computer Science, Eastern Michigan University
School of Technology Studies Sill Hall 122 Eastern Michigan University Ypsilanti, MI 48197 USA Phone:<PHONE_NUMBER>, Fax:<PHONE_NUMBER>
You can drop by my office and usually I will be able, and happy, to talk. Still, if you come during times other than my office hours, I may not be able to see you. Always feel free to contact me to make an appointment (preferably via e-mail).
Computer game design and implementation, User-Interface Design in web applications, Applications of evolutionary computation, especially genetic programming. Domains of particular interest include software reliability and financial market analysis. Applications of massive parallelism to paradigms of artificial intelligence, knowledge representation, case-based design, search. Applications of distributed computing to environmental simulations.
BiologyLabs: a set of web-based biology experiments implemented in Java.
CyberLab Equation Editor: component of the CyberLab system for managing the mathematical model underlying scientific simulations.
Sc.B., Computer Science, Brown University, 1984.
R. France, M. Evett and E. Grant, "Towards Semantic-Based Object-Oriented CASE Tools", Proceedings Automated Software Engineering --- ASE'97, 12th IEEE International Conference, IEEE, 1997.
Y. Xu and M. Evett, "Parallelization of the canal subsystem of the Everglades Landscape Model", technical report TR-CSE-97-42, Dept. Computer Science & Engineering, Florida Atlantic Univ., 1997.
Evett, M.P., Hendler, J.A., Mahanti, A. and Nau, D. "PRA*: Massively Parallel Heuristic Search," J. Parallel and Distributed Computing, 25, No.2 (March), pp. 133-143, 1995. [Figures for that paper.]
Evett, M.P., Hendler, J.A. and Spector, L. "Knowledge Representation on the Connection Machine," Journal of Parallel and Distributed Computing (JPDC) Vol. 22(2), Aug. 1994, pp 168-184.


Reports a deprecated XML element or attribute.
Symbols can be marked by XML comment or documentation tag with text 'deprecated'.


Click on the map to identify features.
- To configure this dijit, click the icon located on the top-right corner of the dijit.
- You can detach the dijit from the map by clicking the icon on the top-left corner.
- Select View -> Page Source in the menu bar for source code
- See Developer Documentation for the dijit


<\AlgoCode/>
Examples
Input / Output
Conditions
Loop
Functions
Classes
Exercice
Input / Output
Conditions
Loop
Functions
Classes
// Write your algorithm there...
Learn algorithms
Input / Output
Conditions
Loop
Functions
Classes
C
C++
Python2
Python3
PHP
Java
>Console
© 2017 AlgoCode All rights reserved by Sanix Darker.
English
French


How to send your friends free chocolate with Cadbury Secret Santa postal service
The Cadbury bus has rolled into the city centre
by Emma GrimshawForget the Coca Cola truck because tonight the Cadbury bus has rolled into Bristol offering chocolate fans a chance to send a surprise gift to a special someone for free.
The Cadbury Secret Santa Postal Service has come to our city as part of its UK tour covering 10 places.
Lines of people are queueing in the city centre, on St Augustine's Parade, for their chance to post a treat.
People can pick between Cadbury Dairy Milk, Cadbury Dairy Milk Whole Nut, Cadbury Dairy Milk Caramel, Cadbury Dairy Milk Fruit and Nut or Cadbury Dairy Milk Oreo.
But you'll have to rush because the service is only there until 7pm tonight (November 25).
A spokesperson said: "Cadbury Secret Santa Postal Services will be springing up to spread festive cheer across the country. Pop along to post a free Cadbury treat to your favourite person at our Cadbury Secret Santa Postal Service."
For anyone who misses out today, if you purchase a Cadbury bar from WHSmith you will be able to post the gift for free.
For the latest news in and around Bristol, visit and bookmark Bristol Live's homepage.


HTML
HTML is the meat of a web page - it describes the content and general layout of a page.
HTML is the meat of a web page - it describes the content and general layout of a page.
CSS makes sites pretty - it describes the presentation and design of the underlying HTML.
Javascript is responsible for making things happen - it makes your website as interactive as you want.
Our weekly meetings discuss computer networking and the Internet as well as current advances in frontend and backend web development. At the beginning of the year, we'll look at the inner workings of the Internet and demo interesting APIs and browser features. We have two learning tracks for coding: front-end and back-end.
Front-end is the part of the website you see, the content and the design. This track is a great fit for beginner coders and will cover HTML and CSS. Through our lessons and hands-on projects, you'll be able to code your own personal website (in addition to several smaller side projects) by the end of the year!
Back-end holds the logic and interactivity of your website. If you have basic experience with languages like Java, Python, or C++, back-end is for you! Some back-end projects include an interactive blog, Firebase database, browser games, and an HTTP server.
Whether you're looking to get into coding or to advance your existing skills, or if you're just curious about how the Internet works, Web Dev Club is the place for you!
We will hold monthly coding workshops for both beginners and veteran coders. These optional workshops will be 1-2 hours during 7th period or afterschool. Interested members with no prior experience have the opportunity to learn the basics of website development (HTML, CSS, and Javascript) through projects created during each workshop, such as a landing page for a personal website. Coders with more experience get to engage in more advanced workshops, which explore a number of topics including, but not limited to, PHP, AJAX, node.js, servers, and databases.


Object attribute standlone text
Use label="text"
,to set the object attribute as standlone text.
Object Attributes with long text truncation
By default object attribute text will be truncated when the content is more than the view port avalible. On
mouseover user can view the full text in tooltip
Object Attributes with link option
Use [islink]="true"
along with
linkedText="linktext"
. Will help to give option to bind required operation on
click of link item.
[disabled]="true"
make the link non operable.


{% assign slab_no = "8" %}
{% assign slab_type = "content" %}
{% capture slab_name %}{{ slab_type }}-{{ slab_no }}{% endcapture %}
Slabs Framework comes with several componentes easy and complex which can be easily mix into almost any design. All component are build in the same style so it can be easy integreted in any kind of projects.


{{ p4_program_name|upper }}
Flow Scope:
{{ flow_scope|join(',') }}
EFSM header match fields:
{{ efsm_match_fields|join(',') }}
Header condition field (@meta):
{{ header_condition_field }}
Transition builder
matchField
{% for m in efsm_match_fields %}
{{ m }}
{% endfor %}
=
ADD MATCH
>
>=
<
<=
==
!=
ADD CONDITION
→
=
+
-
>>
<<
*
ADD UPDATE
action
{% for a, p in actions.items() %}
{{ a+'('+p|join(',')+')' }}
{% endfor %}
SET ACTION
Transition staging area
→
CLEAR TRANSITION
{% if onos %}
ONOS address
ONOS IP
ONOS REST API Port
FlowBlaze Device ID
{% endif %}
LOAD FSM
SAVE FSM
LOAD SAMPLE FSM 1
LOAD SAMPLE FSM 2
GENERATE SWITCH CONFIG
{% if onos %}
GENERATE SWITCH CONFIG ONOS
{% endif %}
CLEAR FSM
Your browser does not support
the HTML5 <canvas> element
FSM designer instructions:
Add a state:
double-click on the canvas
Add an arrow:
shift-drag on the canvas
Move something:
drag it around
Delete something:
click it and press the delete key
Based on Finite State Machine Designer (
http://madebyevan.com/fsm/ - https://github.com/evanw/fsm
)


Section 1.8
Process Priority
You can set the Work Priority of Slips7ream quickly using the Process Priority dropdown. This will also set the priority of any external processes used by Slips7ream. By default, Normal is the best option, but you can select other options depending on what other tasks your computer is running:
- Realtime: Slips7ream will have the highest possible priority. (This can cause other applications to hang or your computer to become unresponsive.)
- High: Slips7ream will be in the top priority list, using all available processor time.
- Above Normal: Slips7ream will take priority over normal tasks without interfering with higher priority processes.
- Normal: The default priority value.
- Below Normal: Slips7ream will allow other processes to take precedence. This option is best if you want Slips7ream to run in the background.
- Low: Slips7ream will only run on idle time, and will be pre-empted by normal program use.
CAUTION: Use extreme care when specifying High or Realtime. The threads of a process with Realtime priority preempt the threads of all other processes, including operating system processes performing important tasks, and can cause disk caches not to flush or cause the mouse to be unresponsive.


You are seeing this page because you are surfing offline. This site is optimized for offline usage but this page is not yet cached. You can view already visited pages while you are waiting for network.
You are seeing this page because you are surfing offline. This site is optimized for offline usage but this page is not yet cached. You can view already visited pages while you are waiting for network.


“Music exists in time; architecture, instead, does exist in space. Dance lives altogether in space and time.” Curt Sachs_
Zona Martiska consists of an immersive performance in which all participants share the intimacy of a collective urban exploration. Freely inspired by "Stalker" of A.Tarkovskij, the performance guides the audience through unexplored and abandoned architectural pieces. Thanks to a robot and sensors on the dancers' body, the result is a unique and site-specific performance.
how it started
The beginning of the journey was quite unexpected:
- from design to composing music - teamed up to participate in a public . The aim of the scholarship was to of a concept coming from a team of under-30 kids. Suprise, we won the prize and got to work!All in all we knew where we wanted to go:
. And that is what we started to research, opening a call for three dancers and a choreographer.We quickly identified two components. On the one hand, we wanted a sort of an
, measuring distances and turning them into a soundscape that interacts with the moving audience. On the other hand, performers were to be equipped with that translate their movement into sound modulations.reharsing and researching
After putting together the team, we launched three residence programs in which we investigated both
of the soon-to-be performance. Performers were equipped with a - a very precise and easy to hack IMU sensor, which could talk to Max Msp via a software called Osculator.So how did it work? Each one of the performer could
a specific musical instrument, according to the - were the key parameters.At the same time, Martino -
- came to life and started to detect presence of walls, obstacles and people while rotating on its body. The distance detected would be transformed into aMartino got then upgraded to a real
, which gave him a total italian classy look.Parallel to that, we also kept on investigating what was the other core part of the performance: architecture. We were looking for
and were keen on using to bring in audience to places which are not accessible. Luckily, the region of Piedmont opened for us the door of the -abandoned since 1998 - right in the outskirt of Turin.Needless to say, we were happy as kids in front of such a
- it was the right venue for our performance.3-2-1 live!
So it happened, on a three days palimpsest we launced six shows of about fifty minutes. At each time, only 50 visitors were allowed, cause we wanted it to be an
.Martino the robot scanner also got
: it is now equipped with a 40m range sensor and a laser scanner which shows the direction of the sensing unit.The video below shows an extract from the performance,
!To conclude we received plenty of
. However, as expected, several people found the interaction too difficult to be understood - surely something to work on for the !That's how we created a
, an interactive performance in Turin, Italy.Behind the scenes
Zona Martiska -an informal collective Simona Deaconescu anything which had to do with technology: from the robot to the body sensors on the dancers event production in general Klak Stories for Artists


write down your configuration in JSON format here:
Production Config
this config will be used on top of your default configuration in production instances and will
override already existing config values.
Config Script
this script will be executed at instance startup. you can utilize it to configure
the platform based on environment variables, or put more complex objects into the config.
Config Updated!
Project configuration successfully updated. You should now see the effects of these
new configurations on your project.
Syntax Error
There is an error in the syntax of the configuration you wrote.
Make sure you completely comply with JSON formatting.


Sorry, our server is offline at the moment.
You may contact us at
<EMAIL_ADDRESS>if the problem persists.


WHAT DO YOU WANT TO KNOW ABOUT US
I LOVE MUSIC
I PLAYING THE KEYBOARD
I SINGING
GO BACK TO HOME PAGE


library(ffscrapr) #> memorycache library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union library(purrr) library(glue) #> #> Attaching package: 'glue' #> The following object is masked from 'package:dplyr': #> #> collapse
The Sleeper API is pretty extensive. If there is something you’d like to access that’s beyond the current scope of ffscrapr, you can use the lower-level “sleeper_getendpoint
” function to create a GET request and access the data, while still using the authentication and rate-limiting features I’ve already created.
Here is an example of how you can call one of the endpoints - in this case, let’s pull Sleeper’s trending players data!
We’ll start by opening up this page, https://docs.sleeper.app/#trending-players, which is the documentation page for this particular endpoint. From here, we can see that Sleeper’s documentation says the endpoint is:
https://api.sleeper.app/v1/players/<sport>/trending/<type>?lookback_hours=<hours>&limit=<int>
The sleeper_getendpoint function already has the https://api.sleeper.app/v1/
part encoded, so all we’ll need to do is pass in the remaining part of the URL.
We’ll need to fill out the other parameters as per the documentation: sport is NFL
, type is either add
or drop
, lookback_hours is optional in hours, and limit is optional in number of rows. We can use the glue
package to parameterise this, although you can also use base R’s paste function just as easily.
type <- "add" lookback_hours <- 48 limit_rows <- 10 query <- glue::glue('players/nfl/trending/{type}?lookback_hours={lookback_hours}&limit={limit_rows}') query #> players/nfl/trending/add?lookback_hours=48&limit=10 response_trending <- sleeper_getendpoint(query) str(response_trending, max.level = 1) #> List of 3 #> $ content :List of 10 #> $ query : chr "https://api.sleeper.app/v1/players/nfl/trending/add?lookback_hours=48&limit=10" #> $ response:List of 10 #> ..- attr(*, "class")= chr "response" #> - attr(*, "class")= chr "sleeper_api"
Along with the parsed content, the function also returns the query and the response that was sent by the server. These are helpful for debugging, but we can turn the content into a dataframe with some careful application of the tidyverse.
df_trending <- response_trending %>% purrr::pluck("content") %>% dplyr::bind_rows() head(df_trending) #> # A tibble: 6 x 2 #> player_id count #> <chr> <int> #> 1 6918 576024 #> 2 2306 317318 #> 3 LAC 252331 #> 4 5347 235951 #> 5 4994 190242 #> 6 MIA 132275
This isn’t very helpful without knowing who these players are, so let’s pull the players endpoint in as well - this one has a convenient function!
players <- sleeper_players() %>% select(player_id, player_name, pos, team, age) trending <- df_trending %>% left_join(players, by = "player_id") trending #> # A tibble: 10 x 6 #> player_id count player_name pos team age #> <chr> <int> <chr> <chr> <chr> <dbl> #> 1 6918 576024 Salvon Ahmed RB MIA 21.9 #> 2 2306 317318 Jameis Winston QB NO 26.9 #> 3 LAC 252331 <NA> DEF LAC NA #> 4 5347 235951 Nyheim Hines RB IND 24 #> 5 4994 190242 Kalen Ballage RB LAC 24.9 #> 6 MIA 132275 <NA> DEF MIA NA #> 7 5086 117850 Marquez Valdes-Scantling WR GB 26.1 #> 8 3209 113404 Devontae Booker RB LV 28.5 #> 9 6819 112572 Michael Pittman WR IND 23.1 #> 10 5890 106069 Damien Harris RB NE 23.8
There - this means something to us now! As of this writing (2020-11-10), Kalen Ballage was the most added player. Haven’t we been bitten by this before?


4. Auditing Demos¶
The following demos are designed to show how to use PySparkAudit
to aduit rdd DataFrame
.
4.1. Auditing function by function¶
If you just need a piece of the audit result, you can call the corresponding function to generate it. There are 9 basic auditing functions, 3 figure plot functions and 3 summary functions in the PySparkAudit library.
syntax
from PySparkAudit import *
Basic Functions:
- data_types:
PySparkAudit.data_types
- dtypes_class:
PySparkAudit.dtypes_class
- dtypes_class:
PySparkAudit.counts
- dtypes_class:
PySparkAudit.describe
- dtypes_class:
PySparkAudit.percentiles
- dtypes_class:
PySparkAudit.feature_len
- dtypes_class:
PySparkAudit.freq_items
- dtypes_class:
PySparkAudit.rates
- dtypes_class:
PySparkAudit.corr_matrix
- data_types:
Plot Functions:
- hist_plot:
PySparkAudit.hist_plot
- bar_plot:
PySparkAudit.bar_plot
- trend_plot:
PySparkAudit.trend_plot
- hist_plot:
Summary Functions
- dataset_summary:
PySparkAudit.dataset_summary
- numeric_summary:
PySparkAudit.numeric_summary
- category_summary:
PySparkAudit.category_summary
- dataset_summary:
For example:
from pyspark.sql import SparkSession
spark = SparkSession \
.builder \
.appName("Python Spark regression example") \
.config("spark.some.config.option", "some-value") \
.getOrCreate()
# import PySpark Audit functions
from PySparkAudit import data_types, hist_plot, bar_plot, freq_items,feature_len
from PySparkAudit import dataset_summary, rates
from PySparkAudit import trend_plot, auditing
# load dataset
data = spark.read.csv(path='Heart.csv',
sep=',', encoding='UTF-8', comment=None, header=True, inferSchema=True)
# audit function by function
# data types
print(data_types(data))
# check frequent items
print(freq_items(data))
# bar plot for categorical features
bar_plot(data, display=True)
Result:
feature dtypes
0 Age int
1 Sex int
2 ChestPain string
3 RestBP int
4 Chol int
5 Fbs int
6 RestECG int
7 MaxHR int
8 ExAng int
9 Oldpeak double
10 Slope int
11 Ca string
12 Thal string
13 AHD string
feature freq_items[value, freq]
0 Age [[58, 19], [57, 17], [54, 16], [59, 14], [52, ...
1 Sex [[1, 206], [0, 97]]
2 ChestPain [[asymptomatic, 144], [nonanginal, 86], [nonty...
3 RestBP [[120, 37], [130, 36], [140, 32], [110, 19], [...
4 Chol [[197, 6], [234, 6], [204, 6], [254, 5], [212,...
5 Fbs [[0, 258], [1, 45]]
6 RestECG [[0, 151], [2, 148], [1, 4]]
7 MaxHR [[162, 11], [163, 9], [160, 9], [152, 8], [132...
8 ExAng [[0, 204], [1, 99]]
9 Oldpeak [[0.0, 99], [1.2, 17], [0.6, 14], [1.0, 14], [...
10 Slope [[1, 142], [2, 140], [3, 21]]
11 Ca [[0, 176], [1, 65], [2, 38], [3, 20], [NA, 4]]
12 Thal [[normal, 166], [reversable, 117], [fixed, 18]...
13 AHD [[No, 164], [Yes, 139]]
================================================================
The Bar plot Bar_plots.pdf was located at:
/home/feng/Dropbox/MyTutorial/PySparkAudit/test/Audited
Process finished with exit code 0
and
4.2. Auditing in one function¶
For example:
from pyspark.sql import SparkSession
spark = SparkSession \
.builder \
.appName("Python Spark regression example") \
.config("spark.some.config.option", "some-value") \
.getOrCreate()
# from PySparkAudit import dtypes_class, hist_plot, bar_plot, freq_items,feature_len
# from PySparkAudit import dataset_summary, rates, trend_plot
# path = '/home/feng/Desktop'
# import PySpark Audit function
from PySparkAudit import auditing
# load dataset
data = spark.read.csv(path='Heart.csv',
sep=',', encoding='UTF-8', comment=None, header=True, inferSchema=True)
# auditing in one function
print(auditing(data, display=True))
Result:
4.2.1. print in bash¶
================================================================
The audited results summary audited_results.xlsx was located at:
/home/feng/Dropbox/MyTutorial/PySparkAudit/test/Audited
================================================================
The correlation matrix plot Corr.png was located at:
/home/feng/Dropbox/MyTutorial/PySparkAudit/test/Audited
================================================================
The Histograms plot Histograms.pdf was located at:
/home/feng/Dropbox/MyTutorial/PySparkAudit/test/Audited
Histograms plots are done!
================================================================
The Bar plot Bar_plots.pdf was located at:
/home/feng/Dropbox/MyTutorial/PySparkAudit/test/Audited
Caution: no date features in the dataset!!!
  Audited results folder¶
The files in 00-audited_results.xlsx
:
- Dataset_summary
- Numeric_summary
- Category_summary
- Correlation_matrix
- Histograms in
Histograms.pdf
- Barplots in
Bar_plots.pdf
4.3. Auditing on Big Dataset¶
In this section, we will demonstrate the auditing performance and audited results on the big data set.
The data set is Spanish High Speed Rail tickets pricing
. It is available at :
https://www.kaggle.com/thegurus/spanish-high-speed-rail-system-ticket-pricing. This data set has 2579771
samples and 10 features.
From the following CPU time, you will see most
of the time was spent on plotting the histograms. If your time and memory are limited, we will suggest
you to use sample_size
to generate the subset of the the dataset to plot histograms.
For example:
from pyspark.sql import SparkSession
spark = SparkSession \
.builder \
.appName("Python Spark regression example") \
.config("spark.some.config.option", "some-value") \
.getOrCreate()
# from PySparkAudit import dtypes_class, hist_plot, bar_plot, freq_items,feature_len
# from PySparkAudit import dataset_summary, rates, trend_plot
# Audited results output path
out_path = '/home/feng/Desktop'
# import PySpark Audit function
from PySparkAudit import auditing
# load dataset
# Spanish High Speed Rail tickets pricing - Renfe (~2.58M)
# https://www.kaggle.com/thegurus/spanish-high-speed-rail-system-ticket-pricing
data = spark.read.csv(path='/home/feng/Downloads/renfe.csv',
sep=',', encoding='UTF-8', comment=None, header=True, inferSchema=True)
# auditing in one function
auditing(data, output_dir=out_path, tracking=True)
Result:
4.3.1. print in bash¶
================================================================
The audited results summary audited_results.xlsx was located at:
/home/feng/Desktop/Audited
Generate data set summary took = 60.535009145736694 s
================================================================
Collecting data types.... Please be patient!
Generate counts took = 0.0016515254974365234 s
================================================================
Collecting features' counts.... Please be patient!
Generate counts took = 6.502962350845337 s
================================================================
Collecting data frame description.... Please be patient!
Generate data frame description took = 1.5562639236450195 s
================================================================
Calculating percentiles.... Please be patient!
Generate percentiles took = 19.76785445213318 s
================================================================
Calculating features' length.... Please be patient!
Generate features' length took = 4.953453540802002 s
================================================================
Calculating top 5 frequent items.... Please be patient!
Generate rates took: 4.761325359344482 s
================================================================
Calculating rates.... Please be patient!
Generate rates took: 17.201056718826294 s
Auditing numerical data took = 54.77840781211853 s
================================================================
Collecting data types.... Please be patient!
Generate counts took = 0.001623392105102539 s
================================================================
Collecting features' counts.... Please be patient!
Generate counts took = 12.59226107597351 s
================================================================
Calculating features' length.... Please be patient!
Generate features' length took = 5.332952976226807 s
================================================================
Calculating top 5 frequent items.... Please be patient!
Generate rates took: 6.832213878631592 s
================================================================
Calculating rates.... Please be patient!
Generate rates took: 23.704302072525024 s
Auditing categorical data took = 48.484763622283936 s
================================================================
The correlation matrix plot Corr.png was located at:
/home/feng/Desktop/Audited
Calculating correlation matrix... Please be patient!
Generate correlation matrix took = 19.61273431777954 s
================================================================
The Histograms plots *.png were located at:
/home/feng/Desktop/Audited/02-hist
Plotting histograms of _c0.... Please be patient!
Plotting histograms of price.... Please be patient!
Histograms plots are DONE!!!
Generate histograms plots took =<PHONE_NUMBER>378479 s
================================================================
The Bar plot Bar_plots.pdf was located at:
/home/feng/Desktop/Audited
Plotting barplot of origin.... Please be patient!
Plotting barplot of destination.... Please be patient!
Plotting barplot of train_type.... Please be patient!
Plotting barplot of train_class.... Please be patient!
Plotting barplot of fare.... Please be patient!
Plotting barplot of insert_date.... Please be patient!
Plotting barplot of start_date.... Please be patient!
Plotting barplot of end_date.... Please be patient!
Bar plots are DONE!!!
Generate bar plots took = 24.17994236946106 s
================================================================
The Trend plot Trend_plots.pdf was located at:
/home/feng/Desktop/Audited
Plotting trend plot of _c0.... Please be patient!
Plotting trend plot of price.... Please be patient!
Trend plots are DONE!!!
Generate trend plots took = 11.697550296783447 s
Generate all the figures took =<PHONE_NUMBER>2404785 s
Generate all audited results took =<PHONE_NUMBER>0632935 s
================================================================
The auditing processes are DONE!!!
4.3.2. Audited results folder¶
.,,.
,;;*;;;;,
.-'``;-');;.
/' .-. /*;;
.' \d \;; .;;;,
/ o ` \; ,__. ,;*;;;*;,
\__, _.__,' \_.-') __)--.;;;;;*;;;;,
`""`;;;\ /-')_) __) `\' ';;;;;;
;*;;; -') `)_) |\ | ;;;;*;
;;;;| `---` O | | ;;*;;;
*;*;\| O / ;;;;;*
;;;;;/| .-------\ / ;*;;;;;
;;;*;/ \ | '. (`. ;;;*;;;
;;;;;'. ; | ) \ | ;;;;;;
,;*;;;;\/ |. / /` | ';;;*;
;;;;;;/ |/ / /__/ ';;;
'*wf*/ | / | ;*;
`""""` `""""` ;'


Blu -- ncurses-like CSS UI library
Main Menu
Mouse navigates the menu. <Click> selects subpages. Highlighted letters are the first letters of each word.
Shorten a URL (EXPERIMENTAL)
Upload a file (EXPERIMENTAL)
Pastebin text (EXPERIMENTAL)
Select
Exit
Help


{% extends "app/layout2.html" %} {% block content %} YOUE COMPLAINT HAS BEEN REGISTERED SUCCESSFULLY ! {% endblock %}


{% extends "layout.html" %} {% block title %}{{ _("Page Not Found") }}{% endblock %} {% block contents %}
{{ _("Sorry, the page you requested does not exist.") }}
{% trans %}You may have followed a bad link or mis-typed a URL. That’s most likely what went wrong.{% endtrans %}
{% trans index_link=url_for('core/index') %}You may want to have a look at the main page.{% endtrans %}
{% endblock %}


With a fresh style and a touch of inspiration from the masters of the time past I always challenge my skills and push my limits as I am aware that greatness is achieved through hard work and passion.
Let's talk
Let me know how can I help you.
Pointvoucher Hero
Flat Illustration
Pointvoucher provides an entertainment platform for consumers and a marketing platform for brands. Consumers can download exciting branded mobile games and play their way to real products and experiences for the time they spend interacting with the games. Vouchers can be claimed in the branded voucher shops connected to the game or in the Pointvoucher shop where they will be exposed to games from other partners. Brands will get a plug n play marketing platform with high conversion rates, data & permissions, drive to shop mechanism, huge engagement rates and access to new customers through the platform.
The goal was to create a “Hero” that would incorporate the logo and communicate Pointvoucher’s core principles: playfullness, gamification and competitiveness. After some research, it has been concluded that table football portrays the exact experience players have when using the Pointvoucher products. It is fun , engaging and you win by scoring points, similar to Pointvoucher’s vouchers-for-points rewarding system.
Date: January 2017
Client: Pointvoucher
Category: Illustration
Pointvoucher Mascot
Flat Illustration
In order for Pointvoucher to have an unique identity, creating a spokesperson that communicates its core values and purpose to its target group was the next step. The result was a mascot with its own persona.
His story is that he (Mr. Bib) has a background in marketing and sales, but decided to leave that career path and now, he only plays games and makes a living off the vouchers he wins. Inspiration for Mr. Bib came from an inflatable orca doll we had around the office.
Various illustrations of the mascot in different scenarios were created to be used throughout Pointvoucher’s online channels. The illustrations depict the main touchpoints on Pointvoucher’s main website and they communicate their core concepts while being playful, friendly and appealing to all age groups.
Client: Pointvoucher
Category: Illustration
Gigabit
Branding and Identity Concept Development
Gigabit A/S is an internet service provider from Copenhagen, Denmark and it holds the title of being the first to offer a gigabit internet connection in Denmark for modest fares. To help it sizzle and communicate to its target group, bringing in and retaining clients, it needed its own brand identity. Thus, a logo was tailored to represent professionalism, technology and efficiency. Being new on the market, a flyer was created for the offline advertisement campaign.
Client: Gigabit
Category: Identity
Pointvoucher Waffle
Illustration
The Pointvoucher logo was incorporated in an illustration-just like in the hero-to create printed material for promotional purposes. This was used to deliver stickers and t-shirts.
The waffle represents the playfulness of the brand and the temptation of Pointvoucher’s users towards it, as it is too good to resist.
Client: Pointvoucher
Category: Brand Illustration
Play London with Mr. Bean
Illustration - UI
Together with London & Partners, Pointvoucher has developed a concept for a match-3 game that would represent London thematically and would encourage players to travel through the city and discover attractions.
The main incentive for the users to do that would be the vouchers and other collectibles made available through the Augmented Reality options, similar to Pokemon Go’s, on location. My role was to create the game assets, such as creating the key buildings, characters,icons, various UI elements and backgrounds
Almost all of the assets completed had to be redesigned, however, when it was decided that the game would incorporate Mr. Bean as the main protagonist of the game, as he represents an iconic figure for London or England, in general.
After partnering with Tiger Aspect Productions, the company who owns the rights to Mr. Bean animated series, there was a new visual identity guide to be taken into account when redelivering the assets. Mr. Bean animated series represented the style which would dictate our design.
Client: Pointvoucher
Category: Illustration - UI Design
Golden Lion
Illustration
Personal commision for print to be used on my own e-store on Red Bubble website. Available for print on various items, such as tees, hoodies, notebooks and other
Category: Illustration
Football Players
Illustration
A series of illustrations of different football clubs to be used on the forums of Footyroom. The stylistic requirement was to emulate Cristiano Siqueira’s vector style
Category: Illustration
Zombie Jesus
Illustration
Personal commission. Started as a self-portrait for cel-shading study, it evolved into the concept of adapting the story of the death and rebirth of the messiah to the more modern undead lore. Available for print.