This is the profiles page. this is the 'regular' page when the url is typed in
175597
@RequestMapping(value = "/profiles", method = RequestMethod.GET)
    public String list(Model model) {
        Profile profiles = new Profile();
        model.addAttribute("addNewProfile", profiles);
        model.addAttribute("version", Constants.VERSION);
        logger.info("Loading initial page");

        return "profiles";
    }
817320
function profile(username = _noUsernameError()) {
	return co(function *resolveUsername() {
		const userId = yield _getIdByUsername(username);
		const url = `${API}/users/${userId}`;
		const params = { app: 3	};

		return http
			.GET(url, params)
			.then(data => data.profile);
	});
}
632614
def show_profiles(self):
        
        for i, (id, profiler, showed) in enumerate(self.profilers):
            if not showed and profiler:
                profiler.show(id)
                # mark it as showed
                self.profilers[i][2] = True
512116
def pages_breadcrumb(context, page, url='/'):
    
    lang = context.get('lang', pages_settings.PAGE_DEFAULT_LANGUAGE)
    page = get_page_from_string_or_id(page, lang)
    pages_navigation = None
    if page:
        pages_navigation = page.get_ancestors()
    context.update({'pages_navigation': pages_navigation, 'page': page})
    return context
675832
function getUserProfile()
    {
        $this->api->curl_header = array(
            'Authorization: Bearer '.$this->api->access_token,
        );
        $data = $this->api->get( $this->userProfileUrl );
        $data = VariableUtil::json2Array($data);

        /*
         * Get the base URL with the instance to store it along with the
         * Token data.
         */
        $urlParts = parse_url($data['profile']);
        $this->api->api_base_url = $urlParts['scheme'].'://'.$urlParts['host'];

        return $data;
    }
958248
def profile
      unless @profile
        if associated_profile
          @profile = Profile.new(associated_profile)
        else
          options = {:fields => 'user_id', :includes => 'Profile'}
          options = options.merge(:access_token => token, :access_secret => secret) if (token && secret)
          tmp = User.find(username, options)
          @profile = Profile.new(tmp.associated_profile)
        end
      end
      @profile
    end
27804
def get_profiles(self, profile_base="/data/b2g/mozilla", timeout=None):
        

        rv = {}

        if timeout is None:
            timeout = self._timeout

        profile_path = posixpath.join(profile_base, "profiles.ini")
        try:
            proc = self.shell("cat %s" % profile_path, timeout=timeout)
            config = ConfigParser.ConfigParser()
            config.readfp(proc.stdout_file)
            for section in config.sections():
                items = dict(config.items(section))
                if "name" in items and "path" in items:
                    path = items["path"]
                    if "isrelative" in items and int(items["isrelative"]):
                        path = posixpath.normpath("%s/%s" % (profile_base, path))
                    rv[items["name"]] = path
        finally:
            proc.stdout_file.close()
            proc.stderr_file.close()

        return rv
499515
public function index()
    {
        // Setup default profile summary sections
        $sections = ArrayList::create();

        $sections->push(
            ArrayData::create(
                array(
                "Title" => "",
                "Content" => $this->renderWith(
                    "UsersProfileSummary",
                    array("CurrentUser" => Member::currentUser())
                )
                )
            )
        );

        // Allow users to add extra content sections to the
        // summary
        $this->extend("updateIndexSections", $sections);

        $this->customise(
            array(
            "Title" => _t('Users.ProfileSummary', 'Profile Summary'),
            "MetaTitle" => _t('Users.ProfileSummary', 'Profile Summary'),
            "Content" => $this->renderWith(
                "UsersAccountSections",
                array("Sections" => $sections)
            )
            )
        );

        $this->extend("onBeforeIndex");

        return $this->renderWith(
            array(
            "UserAccount",
            "Page"
            )
        );
    }
2980
def GET(self, *args, **kwargs):
        
        if self.user_manager.session_logged_in():
            if not self.user_manager.session_username() and not self.__class__.__name__ == "ProfilePage":
                raise web.seeother("/preferences/profile")

            if not self.is_lti_page and self.user_manager.session_lti_info() is not None: #lti session
                self.user_manager.disconnect_user()
                return self.template_helper.get_renderer().auth(self.user_manager.get_auth_methods(), False)

            return self.GET_AUTH(*args, **kwargs)
        else:
            return self.template_helper.get_renderer().auth(self.user_manager.get_auth_methods(), False)
80359
def get_urlpatterns(self):
        
        return [
            path(
                _('profile/edit/'),
                self.forum_profile_update_view.as_view(),
                name='profile_update',
            ),
            path(
                _('profile/<str:pk>/'),
                self.forum_profile_detail_view.as_view(),
                name='profile',
            ),
            path(
                _('profile/<str:pk>/posts/'),
                self.user_posts_list.as_view(),
                name='user_posts',
            ),
            path(
                _('subscriptions/'),
                self.topic_subscription_list_view.as_view(),
                name='user_subscriptions',
            ),
            path(
                _('topic/<int:pk>/subscribe/'),
                self.topic_subscribe_view.as_view(),
                name='topic_subscribe',
            ),
            path(
                _('topic/<int:pk>/unsubscribe/'),
                self.topic_unsubscribe_view.as_view(),
                name='topic_unsubscribe',
            ),
        ]
861161
def default_profiler(f, _type, _value):
    ''' 
    '''
    try:
        profile_print(
            '\n'.join([
                get_frame_src(f),
                get_locals(f),
                '----------------------------------------'
            ])
        )
    except:
        pass
374310
def profile_url(obj, profile_app_name, profile_model_name):
    
    try:
        content_type = ContentType.objects.get(
            app_label=profile_app_name,
            model=profile_model_name.lower()
        )
        profile = content_type.get_object_for_this_type(user=obj.user)
        return profile.get_absolute_url()
    except ContentType.DoesNotExist:
        return ""
    except AttributeError:
        return ""
965422
def profile(request):
    '''
        
    '''
    context = {}

    if request.method == 'POST':
        form = PasswordChangeForm(request.user, request.POST)
        if form.is_valid():
            form.save()
            messages.info(request, 'Password Changed.')
    else:
        form = PasswordChangeForm(request.user)

    key = Key.objects.get(email=request.user.email)
    
    #analytics
    endpoint_q = key.reports.values('api__name', 'endpoint').annotate(calls=Sum('calls')).order_by('-calls')
    endpoints = [{'endpoint':'.'.join((d['api__name'], d['endpoint'])),
                  'calls': d['calls']} for d in endpoint_q]
    date_q = key.reports.values('date').annotate(calls=Sum('calls')).order_by('date')
    context['endpoints'], context['endpoint_calls'] = _dictlist_to_lists(endpoints, 'endpoint', 'calls')
    context['timeline'] = date_q

    context['form'] = form
    context['key'] = key
    context['password_is_key'] = request.user.check_password(key.key)
    return render_to_response('locksmith/profile.html', context,
                              context_instance=RequestContext(request))
204885
async def profile(self, ctx, tag):
        ''''''
        if not self.check_valid_tag(tag):
            return await ctx.send('Invalid tag!')

        profile = await self.cr.get_profile(tag)

        em = discord.Embed(color=0x00FFFFF)
        em.set_author(name=str(profile), icon_url=profile.clan_badge_url)
        em.set_thumbnail(url=profile.arena.badge_url)

        # Example of adding data. (Bad)
        for attr in self.cdir(profile):
            value = getattr(profile, attr) 
            if not callable(value):
                em.add_field(
                    name=attr.replace('_').title(), 
                    value=str(value)
                    )

        await ctx.send(embed=em)
1227520
public function profile()
    {
        $user = $_SESSION['phpci_user'];

        if ($this->request->getMethod() == 'POST') {
            $name = $this->getParam('name', null);
            $email = $this->getParam('email', null);
            $password = $this->getParam('password', null);

            $currentLang = Lang::getLanguage();
            $chosenLang = $this->getParam('language', $currentLang);

            if ($chosenLang !== $currentLang) {
                setcookie('phpcilang', $chosenLang, time() + (10 * 365 * 24 * 60 * 60), '/');
                Lang::setLanguage($chosenLang);
            }

            $_SESSION['phpci_user'] = $this->userService->updateUser($user, $name, $email, $password);
            $user = $_SESSION['phpci_user'];

            $this->view->updated = 1;
        }

        $this->layout->title = $user->getName();
        $this->layout->subtitle = Lang::get('edit_profile');

        $values = $user->getDataArray();

        if (array_key_exists('phpcilang', $_COOKIE)) {
            $values['language'] = $_COOKIE['phpcilang'];
        }

        $form = new Form();
        $form->setAction(PHPCI_URL.'user/profile');
        $form->setMethod('POST');

        $name = new Form\Element\Text('name');
        $name->setClass('form-control');
        $name->setContainerClass('form-group');
        $name->setLabel(Lang::get('name'));
        $name->setRequired(true);
        $form->addField($name);

        $email = new Form\Element\Email('email');
        $email->setClass('form-control');
        $email->setContainerClass('form-group');
        $email->setLabel(Lang::get('email_address'));
        $email->setRequired(true);
        $form->addField($email);

        $password = new Form\Element\Password('password');
        $password->setClass('form-control');
        $password->setContainerClass('form-group');
        $password->setLabel(Lang::get('password_change'));
        $password->setRequired(false);
        $form->addField($password);

        $lang = new Form\Element\Select('language');
        $lang->setClass('form-control');
        $lang->setContainerClass('form-group');
        $lang->setLabel(Lang::get('language'));
        $lang->setRequired(true);
        $lang->setOptions(Lang::getLanguageOptions());
        $lang->setValue(Lang::getLanguage());
        $form->addField($lang);

        $submit = new Form\Element\Submit();
        $submit->setClass('btn btn-success');
        $submit->setValue(Lang::get('save'));
        $form->addField($submit);

        $form->setValues($values);

        $this->view->form = $form;

        return $this->view->render();
    }
407804
public static Profile getCurrentProfile() {
        RequestContext context = RequestContext.getCurrent();
        if (context != null) {
            return getProfile(context.getRequest());
        } else {
            return null;
        }
    }
263514
function( b, profile ) {

	// The object table to use
	this.profile = profile;

	// Exported properties prefix
	this.prefix = "";

	// If we are given an array as buffer, it means
	// that we loaded separate chunks rather than a 
	// single, unifide buffer.
	this.sparse = (b instanceof Array);
	var hv16, hv32, primBufLen, header_size = 32;
	if (this.sparse) {

		// Setup views to the buffer
		this.u8  = new Uint8Array(b[0]);
		this.s8  = new Int8Array(b[0]);
		this.u16 = new Uint16Array(b[1]);
		this.s16 = new Int16Array(b[1]);
		this.u32 = new Uint32Array(b[2]);
		this.s32 = new Int32Array(b[2]);
		this.f32 = new Float32Array(b[2]);
		this.f64 = new Float64Array(b[3]);

		// Header views
		hv16 = new Uint16Array(b[0], 0, header_size/2);
		hv32 = new Uint32Array(b[0], 0, header_size/4);

		// Length of the primary buffer
		primBufLen = b[0].byteLength;

	} else {

		// Setup views to the buffer
		this.u8  = new Uint8Array(b);
		this.s8  = new Int8Array(b);
		this.u16 = new Uint16Array(b);
		this.s16 = new Int16Array(b);
		this.u32 = new Uint32Array(b);
		this.s32 = new Int32Array(b);
		this.f32 = new Float32Array(b);
		this.f64 = new Float64Array(b);

		// Header views
		hv16 = new Uint16Array(b);
		hv32 = new Uint32Array(b);

		// Length of the primary buffer
		primBufLen = b.byteLength;

	}

	// Read header
	this.magic  	= hv16[0];
	this.table_id  	= hv16[1];
	this.version 	= hv16[2];
	this.table_count= hv16[3];

	// Expand version
	this.ver_major = this.version & 0x00ff;
	this.ver_minor = (this.version & 0xff00) >> 8;

	// Calculate upper bounds
	this.max64  	= hv32[2];
	this.max32 		= hv32[3];
	this.max16 		= hv32[4];
	this.max8  		= hv32[5];
	this.lenST 		= hv32[6];
	this.lenOT 		= hv32[7];

	// Validate magic
	if (this.magic == 0x3142) {
		throw {
			'name' 		: 'EndianessError',
			'message'	: 'Unfortunately the JBB format is currently only compatible with Little-Endian CPUs',
			toString 	: function(){return this.name + ": " + this.message;}
		}
	} else if (this.magic != 0x4231) {
		throw {
			'name' 		: 'DecodingError',
			'message'	: 'This does not look like a JBB archive! (Magic is 0x'+this.magic.toString(16)+')',
			toString 	: function(){return this.name + ": " + this.message;}
		}
	}

	// Validate bundle version number
	if (this.version != 0x0102) {
		throw {
			'name' 		: 'DecodingError',
			'message'	: 'Unsupported bundle version v'+this.ver_minor+'.'+this.ver_minor,
			toString 	: function(){return this.name + ": " + this.message;}
		}
	}

	// Setup indices
	if (this.sparse) {

		// Setup indices
		this.i64 = 0;
		this.i32 = 0;
		this.i16 = 0;
		this.i8  = header_size;
		this.iEnd= this.i8 + this.max8 - this.lenST;

		// Offsets of array beginning (for getting array portions)
		this.ofs8  = this.i8;
		this.ofs16 = this.i16;
		this.ofs32 = this.i32;
		this.ofs64 = this.i64;

	} else {

		// Setup indices
		this.i64 = header_size;
		this.i32 = this.i64 + this.max64;
		this.i16 = this.i32 + this.max32;
		this.i8  = this.i16 + this.max16;
		this.iEnd= this.i8 + this.max8 - this.lenST;

		// Offsets of array beginning (for getting array portions)
		this.ofs8  = this.i8;
		this.ofs16 = this.i16;
		this.ofs32 = this.i32;
		this.ofs64 = this.i64;

		// Convert to element index
		this.i16 /= 2;
		this.i32 /= 4;
		this.i64 /= 8;

	}

	// Current position of i16 used later
	var ci16 = this.i16;

	// Load object tables
	var ots = [];
	if (this.table_count <= 1) {

		// The bundle can have no profile if needed
		if (this.table_id !== 0x00)
			ots.push( this.table_id );

	} else if (this.table_id !== 0x00) {
		throw {
			'name' 		: 'DecodingError',
			'message'	: 'Invalid header data',
			toString 	: function(){return this.name + ": " + this.message;}
		}
	} else {
		// Read known table IDs
		for (var i=0; i<this.table_count; ++i) {
			ots.push( this.u16[ this.i16++ ] );
		}
	}

	// Activate the correct object IDs
	this.profile.use( ots );		

	// Internal reference table
	this.iref_table = [];

	// Populate string lookup table
	var str = "", parsing = false;
	this.string_table = [];
	if (this.lenST > 0) {
		for (var l=this.i8+this.max8, i=l-this.lenST; i<l; ++i) {
			var c = this.u8[i];
			if (c === 0) {
				this.string_table.push(str);
				str = "";
				parsing = false;
			} else {
				str += String.fromCharCode(c);
				parsing = true;
			}
		}
		if (parsing) this.string_table.push(str);
	}

	// Populate object signature lookup table
	var obj = [], keysPending = 0, active = false;
	this.signature_table = [];
	if (this.lenOT > 0) {
		for (var l=ci16*2+this.max16, i=l-this.lenOT; i<l; i+=2) {
			var c = this.u16[i/2];
			if (keysPending--) {
				obj.push( this.string_table[c] );
			} else {
				if (active) this.signature_table.push(obj);
				obj = []; keysPending = c;
				active = true;
			}
		}
		if (active) this.signature_table.push(obj);
	}


	// NOTE: The follwing functions *MUST* have a body smaller than 600
	//       bytes in order to be inlined by the compiler.

	// Create fast numerical read functions
	var scope = this;

	// Create fast typed array read function
	if (this.sparse) {
		this.readTypedArray = function( t, l ) 
		{ var o8=this.i8,o16=2*this.i16,o32=4*this.i32,o64=8*this.i64;
		  switch (t) {
				case 0:this.i8+=l;return new Uint8Array(b[0],o8,l);
				case 1:this.i8+=l;return new Int8Array(b[0],o8,l);
				case 2:this.i16+=l;return new Uint16Array(b[1],o16,l);
				case 3:this.i16+=l;return new Int16Array(b[1],o16,l);
				case 4:this.i32+=l;return new Uint32Array(b[2],o32,l);
				case 5:this.i32+=l;return new Int32Array(b[2],o32,l);
				case 6:this.i32+=l;return new Float32Array(b[2],o32,l);
				case 7:this.i64+=l;return new Float64Array(b[3],o64,l);
			}
		}
	} else {
		this.readTypedArray = function( t, l )
		{ var o8=this.i8,o16=2*this.i16,o32=4*this.i32,o64=8*this.i64;
		  switch (t) {
				case 0:this.i8+=l;return new Uint8Array(b,o8,l);
				case 1:this.i8+=l;return new Int8Array(b,o8,l);
				case 2:this.i16+=l;return new Uint16Array(b,o16,l);
				case 3:this.i16+=l;return new Int16Array(b,o16,l);
				case 4:this.i32+=l;return new Uint32Array(b,o32,l);
				case 5:this.i32+=l;return new Int32Array(b,o32,l);
				case 6:this.i32+=l;return new Float32Array(b,o32,l);
				case 7:this.i64+=l;return new Float64Array(b,o64,l);
			}
		}
	}

	// Create simple object factories from the object table
	this.factory_plain = [];
	this.factory_plain_bulk = [];
	for (var i=0; i<this.signature_table.length; ++i) {

		// Build factory funtion
		var props = this.signature_table[i], llen = props.length,
			factoryPlain = "return {", factoryBulk = "var c=values.length/"+llen+";"+factoryPlain;
		for (var j=0; j<llen; ++j) {
			factoryPlain += "'"+props[j]+"': values["+j+"],";
			factoryBulk +=  "'"+props[j]+"': values[i+c*"+j+"],";
			// factoryBulk +=  "'"+props[j]+"': values[("+j+"*len)+i],";
		}
		factoryPlain += "}";
		factoryBulk += "}";

		// Compile factory function
		this.factory_plain.push( new Function("values", factoryPlain) );
		this.factory_plain_bulk.push( new Function("values", "i", factoryBulk) );
		// this.factory_plain_bulk.push( new Function("values", "len", "i", factoryBulk) );

	}

	// Generate property de-weaving functions for some 
	// widely used dimentions
	this.factory_weave = [
		function(a,b) { return [] }
	];
	for (var i=1; i<16; ++i) {
		this.factory_weave.push( genWeavePropFn(i) );
	}

}