| Trees | Indices | Toggle frames |
|---|
Image load, capture and high-level texture functions.
Only basic functionality is described here; for full reference see the accompanying documentation.
To load an image:
from pyglet import image pic = image.load('picture.png')
The supported image file types include PNG, BMP, GIF, JPG, and many more, somewhat depending on the operating system. To load an image from a file-like object instead of a filename:
pic = image.load('hint.jpg', file=fileobj)
The hint helps the module locate an appropriate decoder to use based on the file extension. It is optional.
Once loaded, images can be used directly by most other modules of pyglet. All images have a width and height you can access:
width, height = pic.width, pic.height
You can extract a region of an image (this keeps the original image intact; the memory is shared efficiently):
subimage = pic.get_region(x, y, width, height)
Remember that y-coordinates are always increasing upwards.
To draw an image at some point on the screen:
pic.blit(x, y, z)
This assumes an appropriate view transform and projection have been applied.
Some images have an intrinsic "anchor point": this is the point which will be aligned to the x and y coordinates when the image is drawn. By default the anchor point is the lower-left corner of the image. You can use the anchor point to center an image at a given point, for example:
pic.anchor_x = pic.width // 2 pic.anchor_y = pic.height // 2 pic.blit(x, y, z)
If you are using OpenGL directly, you can access the image as a texture:
texture = pic.get_texture()
(This is the most efficient way to obtain a texture; some images are immediately loaded as textures, whereas others go through an intermediate form). To use a texture with pyglet.gl:
from pyglet.gl import * glEnable(texture.target) # typically target is GL_TEXTURE_2D glBindTexture(texture.target, texture.id) # ... draw with the texture
To access raw pixel data of an image:
rawimage = pic.get_image_data()
(If the image has just been loaded this will be a very quick operation; however if the image is a texture a relatively expensive readback operation will occur). The pixels can be accessed as a string:
format = 'RGBA'
pitch = rawimage.width * len(format)
pixels = rawimage.get_data(format, pitch)
"format" strings consist of characters that give the byte order of each color component. For example, if rawimage.format is 'RGBA', there are four color components: red, green, blue and alpha, in that order. Other common format strings are 'RGB', 'LA' (luminance, alpha) and 'I' (intensity).
The "pitch" of an image is the number of bytes in a row (this may validly be more than the number required to make up the width of the image, it is common to see this for word alignment). If "pitch" is negative the rows of the image are ordered from top to bottom, otherwise they are ordered from bottom to top.
Retrieving data with the format and pitch given in ImageData.format and ImageData.pitch avoids the need for data conversion (assuming you can make use of the data in this arbitrary format).
| pyglet.image.atlas Group multiple small images into larger textures. |
| ImageException | |
|
ImagePattern
Abstract image creation class.
|
|
|
SolidColorImagePattern
Creates an image filled with a solid color.
|
|
|
CheckerImagePattern
Create an image with a tileable checker image.
|
|
|
AbstractImage
Abstract class representing an image.
|
|
|
AbstractImageSequence
Abstract sequence of images.
|
|
|
TextureSequence
Interface for a sequence of textures.
|
|
|
UniformTextureSequence
Interface for a sequence of textures, each with the same dimensions.
|
|
|
ImageData
An image represented as a string of unsigned bytes.
|
|
| ImageDataRegion | |
|
CompressedImageData
Image representing some compressed data suitable for direct uploading
to driver.
|
|
|
Texture
An image loaded into video memory that can be efficiently drawn
to the framebuffer.
|
|
|
TextureRegion
A rectangular region of a texture, presented as if it were
a separate texture.
|
|
|
Texture3D
A texture with more than one image slice.
|
|
|
TileableTexture
A texture that can be tiled efficiently.
|
|
|
DepthTexture
A texture with depth samples (typically 24-bit).
|
|
|
BufferManager
Manages the set of framebuffers for a context.
|
|
|
BufferImage
An abstract framebuffer.
|
|
|
ColorBufferImage
A color framebuffer.
|
|
|
DepthBufferImage
The depth buffer.
|
|
|
BufferImageMask
A single bit of the stencil buffer.
|
|
|
ImageGrid
An imaginary grid placed over an image allowing easy access to
regular regions of that image.
|
|
|
TextureGrid
A texture containing a regular grid of texture regions.
|
|
|
Animation
Sequence of images with timing information.
|
|
|
AnimationFrame
A single frame of an animation.
|
| AbstractImage |
load(filename,
file=None,
decoder=None)
Load an image from a file.
|
| AbstractImage |
create(width,
height,
pattern=None)
Create an image optionally filled with the given pattern.
|
| BufferManager |
get_buffer_manager()
Get the buffer manager for the current OpenGL context.
|
| Animation |
load_animation(filename,
file=None,
decoder=None)
Load an animation from a file.
|
file
is
unspecified.Note: You can make no assumptions about the return type; usually it will be ImageData or CompressedImageData, but decoders are free to return any subclass of AbstractImage.
Note: You can make no assumptions about the return type; usually it will be ImageData or CompressedImageData, but patterns are free to return any subclass of AbstractImage.
Load an animation from a file.
Currently, the only supported format is GIF.
file
is unspecified.| Trees | Indices | Toggle frames |
|---|
| Generated by Epydoc 3.0beta1 on Sun Mar 22 20:15:38 2009 | http://epydoc.sourceforge.net |


Azam century in vain as Australia win first Test
by https://www.dawn.com/authors/119/afp, AFPAustralia went one up in their two-Test series against Pakistan when they won the first Test by an innings and five runs at the Gabba in Brisbane on Sunday.
Australian skipper Tim Paine said he would prefer all home Test series to begin at the Gabba after his team won the opening match at the Brisbane fortress by an innings and five runs late on the fourth day for their 29th consecutive Test victory at the venue dating back to 1988.
"We like playing here and we've done well here for a long time, so we'd like to start here against anyone," Paine said when asked whether India should open next year's Test tour in Brisbane, the traditional start to an Australian summer.
On India's last tour of Australia, the first Test was moved to Adelaide where the tourists won by 31 runs.
Pakistan were left chasing the match once they were bowled out for 240 in their first innings having won the toss and elected to bat.
Australia replied with 580 on the back of big centuries by man-of-the match Marnus Labuschagne and opener David Warner.
Australia's top three of Joe Burns (97), Warner (154) and Labuschagne (185) scored 436 runs, with Paine saying the team now had the benefit of stability at the top of the order.
"We've known Burnsie's a top-quality opening bat for a long time and it's great having him back in the side opening with Davey (Warner)," Paine said.
"It's been hard to have stability because we haven't been performing as we'd like [...] but I think we've got a pretty good group at the moment and can still get a lot better as well."
After beginning their second innings 340 runs behind Australia and then losing three cheap wickets in the afternoon session on Saturday, the Pakistanis put up stern resistance Sunday before finally succumbing late in the final session.
Babar Azam scored a magnificent century and Mohammad Rizwan fell five runs short of his first as Pakistan were dismissed for 335 late on the fourth day.
Leg-spinner Yasir Shah also made his highest Test score with a fighting 42 to allow the Pakistanis to head to the second Test in Adelaide with some momentum despite the loss.
But there was to be no denying an Australian attack on Sunday which probed and struck at vital moments, whenever Pakistan seemed to be getting the upper hand.
Josh Hazlewood was the pick of the Australian bowlers with 4-63, while Mitchell Starc took 3-73, Pat Cummins 2-69 and Nathan Lyon 1-74.
Pakistan captain Azhar Ali said his team had been on the back foot early and not been able to recover.
"When we won the toss, we wanted to score big in the first innings, but I think on the first day we won two sessions but we lost one very badly," he said.
"I think if you lose one session very badly in Test matches it is always very hard to come back from that, especially in Australia."
But he said he was proud of the way they had fought back.
"I'd have to say the way we batted in the second innings, particularly the way Babar and Rizwan batted, they really showed great fight," he said.
Earlier, Azam reached his second Test century — and his first in Australia — with an impressive knock.
The elegant right-hander had been in excellent form in the lead-up games, but was out to a disappointing shot in the first innings for just one.
He was a different player in the second innings, however, and never looked in trouble until he edged Nathan Lyon to wicketkeeper Tim Paine to fall for 104.
The second Test begins in Adelaide on November 29.


publications
Publications by categories in reversed chronological order. Generated by jekyll-scholar.
2023
-
Soil organic carbon models need independent time-series validation for reliable prediction Communications Earth and EnvironmentA Continental- Scale Estimate of Soil Organic Carbon Change at NEON Sites and Their Environmental and Edaphic Controls JGR BiogeosciencesAdaptation Strategies Strongly Reduce the Future Impacts ofClimate Change on Simulated Crop Yields Earth's FutureBurning trees in frozen soil: Simulating fire, vegetation, soil, and hydrologyin the boreal forests of Alaska Ecological ModellingHow does management affect soil C sequestration and greenhouse gas fluxes in boreal and temperate forests?- a review Forest Ecology and Management
2022
- Multi-modelling predictions show high uncertainty of required carbon input changes to reach a 4‰ target European Journal of Soil Science
-
Effects of abiotic factors affecting processes of soil organic carbon sequestration at different scales in Understanding and fostering soil carbon sequestration, Ed. Cornelia Rumpel. Burleigh Dodds Science Publishing
-
Reviews and syntheses: The promise of big soil data, moving current practices towards future potential Biogeosciences
-
Surface temperatures reveal the patterns of vegetation water stress and their environmental drivers across the tropical Americas Global Change Biology
-
Next generation soil biogeochemistry model representations: A proposed community open source model farm (BeTR-S) in Multi-Scale Biogeochemical Processes in Soil Ecosystems: Critical Reactions and Resilience to Climate Changes, eds. Y. Yang, M. Keiluweit, N. Senesi and B. Xing
-
Improved global-scale predictions of soil carbon stocks with Millennial Version 2 Soil Biology and Biochemistry
2021
- Identifying Data Needed to Reduce Parameter Uncertainty in a Coupled Microbial Soil C and N Decomposition Model JGR: Biogeosciences
-
Uncovering the past and future climate drivers of wheat yield shocks in Europe with machine learning Earth's Future
2020
-
Microbial dynamics and soil physicochemical properties explain large‐scale variations in soil organic carbon Global Change Biology
2019
-
Soil organic matter temperature sensitivity cannot be directly inferred from spatial gradients Global Biogeochemical Cycles
2018
-
Multiple models and experiments underscore large uncertainty in soil carbon dynamics Biogeochemistry
-
Partitioning Soil Respiration: Quantifying the Artifacts of the Trenching Method Biogeochemistry
-
The Millennial model: in search of measurable pools and exchanges in soil carbon cycling for the new century Biogeochemistry
2017
-
Microbial community-level regulation explains soil carbon responses to long-term litter manipulations Nature Communications
-
A parsimonious modular approach to building a mechanistic belowground carbon and nitrogen model JGR Biogeosciences
2016
-
Seasonality and partitioning of root allocation to rhizosphere soils in a midlatitude forest Ecosphere
2015
-
Rhizosphere processes are quantitatively important components of terrestrial carbon and nutrient cycles Global Change Biology


Attributes are set dynamically via properties. Properties correspond to
the standard Google Data API query parameters with YouTube Data API
extensions. |
| |
- Method resolution order:
- YouTubePlaylistQuery
- YouTubeVideoQuery
- gdata.service.Query
- __builtin__.dict
- __builtin__.object
Methods defined here:
- __init__(self, playlist_id, text_query=None, params=None, categories=None)
Data descriptors inherited from YouTubeVideoQuery:
- format
- The format query parameter
- location
- The location query parameter
- lr
- The lr (language restriction) query parameter
- orderby
- The orderby query parameter
- racy
- The racy query parameter
- restriction
- The restriction query parameter
- time
- The time query parameter
- vq
- The video query (vq) query parameter
Methods inherited from gdata.service.Query:
- ToUri(self)
- __str__(self)
Data descriptors inherited from gdata.service.Query:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- alt
- The feed query's alt parameter
- author
- The feed query's author parameter
- max_results
- The feed query's max-results parameter
- published_max
- The feed query's published-max parameter
- published_min
- The feed query's published-min parameter
- start_index
- The feed query's start-index parameter
- text_query
- The feed query's q parameter
- updated_max
- The feed query's updated-max parameter
- updated_min
- The feed query's updated-min parameter
Methods inherited from __builtin__.dict:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __contains__(...)
- D.__contains__(k) -> True if D has a key k, else False
- __delitem__(...)
- x.__delitem__(y) <==> del x[y]
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __repr__(...)
- x.__repr__() <==> repr(x)
- __setitem__(...)
- x.__setitem__(i, y) <==> x[i]=y
- __sizeof__(...)
- D.__sizeof__() -> size of D in memory, in bytes
- clear(...)
- D.clear() -> None. Remove all items from D.
- copy(...)
- D.copy() -> a shallow copy of D
- get(...)
- D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- has_key(...)
- D.has_key(k) -> True if D has a key k, else False
- items(...)
- D.items() -> list of D's (key, value) pairs, as 2-tuples
- iteritems(...)
- D.iteritems() -> an iterator over the (key, value) items of D
- iterkeys(...)
- D.iterkeys() -> an iterator over the keys of D
- itervalues(...)
- D.itervalues() -> an iterator over the values of D
- keys(...)
- D.keys() -> list of D's keys
- pop(...)
- D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
- D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
- setdefault(...)
- D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
- D.update(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k]
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]
- values(...)
- D.values() -> list of D's values
Data and other attributes inherited from __builtin__.dict:
- __hash__ = None
- __new__ = <built-in method __new__ of type object at 0x7569a0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- fromkeys = <built-in method fromkeys of type object at 0xd3d9a0>
- dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.
|
class YouTubeService(gdata.service.GDataService) |
| |
Client for the YouTube service.
Performs all documented Google Data YouTube API functions, such as inserting,
updating and deleting videos, comments, playlist, subscriptions etc.
YouTube Service requires authentication for any write, update or delete
actions.
Attributes:
email: An optional string identifying the user. Required only for
authenticated actions.
password: An optional string identifying the user's password.
source: An optional string identifying the name of your application.
server: An optional address of the YouTube API server. gdata.youtube.com
is provided as the default value.
additional_headers: An optional dictionary containing additional headers
to be passed along with each request. Use to store developer key.
client_id: An optional string identifying your application, required for
authenticated requests, along with a developer key.
developer_key: An optional string value. Register your application at
http://code.google.com/apis/youtube/dashboard to obtain a (free) key. |
| |
- Method resolution order:
- YouTubeService
- gdata.service.GDataService
- atom.service.AtomService
- __builtin__.object
Methods defined here:
- AddComment(self, comment_text, video_entry)
- Add a comment to a video entry.
Needs authentication. Note that each comment that is posted must contain
the video entry that it is to be posted to.
Args:
comment_text: A string representing the text of the comment.
video_entry: The YouTubeVideoEntry to be commented on.
Returns:
True if the comment was added successfully.
- AddComplaint(self, complaint_text, complaint_term, video_id)
- Add a complaint for a particular video entry.
Needs authentication.
Args:
complaint_text: A string representing the complaint text.
complaint_term: A string representing the complaint category term.
video_id: A string representing the ID of YouTubeVideoEntry to
complain about.
Returns:
True if posted successfully.
Raises:
YouTubeError: Your complaint_term is not valid.
- AddContact(self, contact_username, my_username='default')
- Add a new contact to the currently authenticated user's contact feed.
Needs authentication.
Args:
contact_username: A string representing the username of the contact
that you wish to add.
my_username: An optional string representing the username to whose
contact the new contact is to be added.
Returns:
A YouTubeContactEntry if added successfully.
- AddPlaylist(self, playlist_title, playlist_description, playlist_private=None)
- Add a new playlist to the currently authenticated users account.
Needs authentication.
Args:
playlist_title: A string representing the title for the new playlist.
playlist_description: A string representing the description of the
playlist.
playlist_private: An optional boolean, set to True if the playlist is
to be private.
Returns:
The YouTubePlaylistEntry if successfully posted.
- AddPlaylistVideoEntryToPlaylist(self, playlist_uri, video_id, custom_video_title=None, custom_video_description=None)
- Add a video entry to a playlist, optionally providing a custom title
and description.
Needs authentication.
Args:
playlist_uri: A string representing the URI of the playlist to which this
video entry is to be added.
video_id: A string representing the ID of the video entry to add.
custom_video_title: An optional string representing a custom title for
the video (only shown on the playlist).
custom_video_description: An optional string representing a custom
description for the video (only shown on the playlist).
Returns:
A YouTubePlaylistVideoEntry if successfully posted.
- AddRating(self, rating_value, video_entry)
- Add a rating to a video entry.
Needs authentication.
Args:
rating_value: The integer value for the rating (between 1 and 5).
video_entry: The YouTubeVideoEntry to be rated.
Returns:
True if the rating was added successfully.
Raises:
YouTubeError: rating_value must be between 1 and 5 in AddRating().
- AddSubscriptionToChannel(self, username_to_subscribe_to, my_username='default')
- Add a new channel subscription to the currently authenticated users
account.
Needs authentication.
Args:
username_to_subscribe_to: A string representing the username of the
channel to which we want to subscribe to.
my_username: An optional string representing the name of the user which
we want to subscribe. Defaults to currently authenticated user.
Returns:
A new YouTubeSubscriptionEntry if successfully posted.
- AddSubscriptionToFavorites(self, username, my_username='default')
- Add a new subscription to a users favorites to the currently
authenticated user's account.
Needs authentication
Args:
username: A string representing the username of the user's favorite feed
to subscribe to.
my_username: An optional string representing the username of the user
that is to be subscribed. Defaults to currently authenticated user.
Returns:
A new YouTubeSubscriptionEntry if successful.
- AddSubscriptionToQuery(self, query, my_username='default')
- Add a new subscription to a specific keyword query to the currently
authenticated user's account.
Needs authentication
Args:
query: A string representing the keyword query to subscribe to.
my_username: An optional string representing the username of the user
that is to be subscribed. Defaults to currently authenticated user.
Returns:
A new YouTubeSubscriptionEntry if successful.
- AddVideoEntryToFavorites(self, video_entry, username='default')
- Add a video entry to a users favorite feed.
Needs authentication.
Args:
video_entry: The YouTubeVideoEntry to add.
username: An optional string representing the username to whose favorite
feed you wish to add the entry. Defaults to the currently
authenticated user.
Returns:
The posted YouTubeVideoEntry if successfully posted.
- AddVideoResponse(self, video_id_to_respond_to, video_response)
- Add a video response.
Needs authentication.
Args:
video_id_to_respond_to: A string representing the ID of the video to be
responded to.
video_response: YouTubeVideoEntry to be posted as a response.
Returns:
True if video response was posted successfully.
- CheckUploadStatus(self, video_entry=None, video_id=None)
- Check upload status on a recently uploaded video entry.
Needs authentication. Either video_entry or video_id must be provided.
Args:
video_entry: An optional YouTubeVideoEntry whose upload status to check
video_id: An optional string representing the ID of the uploaded video
whose status is to be checked.
Returns:
A tuple containing (video_upload_state, detailed_message) or None if
no status information is found.
Raises:
YouTubeError: You must provide at least a video_entry or a video_id to the
CheckUploadStatus() method.
- DeleteContact(self, contact_username, my_username='default')
- Delete a contact from a users contact feed.
Needs authentication.
Args:
contact_username: A string representing the username of the contact
that is to be deleted.
my_username: An optional string representing the username of the user's
contact feed from which to delete the contact. Defaults to the
currently authenticated user.
Returns:
True if the contact was deleted successfully
- DeletePlaylist(self, playlist_uri)
- Delete a playlist from the currently authenticated users playlists.
Needs authentication.
Args:
playlist_uri: A string representing the URI of the playlist that is
to be deleted.
Returns:
True if successfully deleted.
- DeletePlaylistVideoEntry(self, playlist_uri, playlist_video_entry_id)
- Delete a playlist video entry from a playlist.
Needs authentication.
Args:
playlist_uri: A URI representing the playlist from which the playlist
video entry is to be removed from.
playlist_video_entry_id: A string representing id of the playlist video
entry that is to be removed.
Returns:
True if entry was successfully deleted.
- DeleteSubscription(self, subscription_uri)
- Delete a subscription from the currently authenticated user's account.
Needs authentication.
Args:
subscription_uri: A string representing the URI of the subscription that
is to be deleted.
Returns:
True if deleted successfully.
- DeleteVideoEntry(self, video_entry)
- Deletes a video entry.
Needs authentication.
Args:
video_entry: The YouTubeVideoEntry to be deleted.
Returns:
True if entry was deleted successfully.
- DeleteVideoEntryFromFavorites(self, video_id, username='default')
- Delete a video entry from the users favorite feed.
Needs authentication.
Args:
video_id: A string representing the ID of the video that is to be removed
username: An optional string representing the username of the user's
favorite feed. Defaults to the currently authenticated user.
Returns:
True if entry was successfully deleted.
- DeleteVideoResponse(self, video_id, response_video_id)
- Delete a video response.
Needs authentication.
Args:
video_id: A string representing the ID of video that contains the
response.
response_video_id: A string representing the ID of the video that was
posted as a response.
Returns:
True if video response was deleted succcessfully.
- GetFormUploadToken(self, video_entry, uri='http://gdata.youtube.com/action/GetUploadToken')
- Receives a YouTube Token and a YouTube PostUrl from a YouTubeVideoEntry.
Needs authentication.
Args:
video_entry: The YouTubeVideoEntry to upload (meta-data only).
uri: An optional string representing the URI from where to fetch the
token information. Defaults to the YOUTUBE_UPLOADTOKEN_URI.
Returns:
A tuple containing the URL to which to post your video file, along
with the youtube token that must be included with your upload in the
form of: (post_url, youtube_token).
- GetMostDiscussedVideoFeed(self)
- Retrieve the 'most_discussed' standard video feed.
Returns:
A YouTubeVideoFeed if successfully retrieved.
- GetMostLinkedVideoFeed(self)
- Retrieve the 'most_linked' standard video feed.
Returns:
A YouTubeVideoFeed if successfully retrieved.
- GetMostRecentVideoFeed(self)
- Retrieve the 'most_recent' standard video feed.
Returns:
A YouTubeVideoFeed if successfully retrieved.
- GetMostRespondedVideoFeed(self)
- Retrieve the 'most_responded' standard video feed.
Returns:
A YouTubeVideoFeed if successfully retrieved.
- GetMostViewedVideoFeed(self)
- Retrieve the 'most_viewed' standard video feed.
Returns:
A YouTubeVideoFeed if successfully retrieved.
- GetRecentlyFeaturedVideoFeed(self)
- Retrieve the 'recently_featured' standard video feed.
Returns:
A YouTubeVideoFeed if successfully retrieved.
- GetTopFavoritesVideoFeed(self)
- Retrieve the 'top_favorites' standard video feed.
Returns:
A YouTubeVideoFeed if successfully retrieved.
- GetTopRatedVideoFeed(self)
- Retrieve the 'top_rated' standard video feed.
Returns:
A YouTubeVideoFeed if successfully retrieved.
- GetUserFavoritesFeed(self, username='default')
- Retrieve the favorites feed for a given user.
Args:
username: An optional string representing the username whose favorites
feed is to be retrieved. Defaults to the currently authenticated user.
Returns:
A YouTubeVideoFeed if successfully retrieved.
- GetWatchOnMobileVideoFeed(self)
- Retrieve the 'watch_on_mobile' standard video feed.
Returns:
A YouTubeVideoFeed if successfully retrieved.
- GetYouTubeContactEntry(self, uri)
- Retrieve a YouTubeContactEntry.
Args:
uri: A string representing the URI of the contact entry that is to
be retrieved.
Returns:
A YouTubeContactEntry if successfully retrieved.
- GetYouTubeContactFeed(self, uri=None, username='default')
- Retrieve a YouTubeContactFeed.
Either a uri or a username must be provided.
Args:
uri: An optional string representing the URI of the contact feed that
is to be retrieved.
username: An optional string representing the username. Defaults to the
currently authenticated user.
Returns:
A YouTubeContactFeed if successfully retrieved.
Raises:
YouTubeError: You must provide at least a uri or a username to the
GetYouTubeContactFeed() method.
- GetYouTubePlaylistEntry(self, uri)
- Retrieve a YouTubePlaylistEntry.
Args:
uri: A string representing the URI of the playlist feed that is to
be retrieved.
Returns:
A YouTubePlaylistEntry if successfully retrieved.
- GetYouTubePlaylistFeed(self, uri=None, username='default')
- Retrieve a YouTubePlaylistFeed (a feed of playlists for a user).
Either a uri or a username must be provided.
Args:
uri: An optional string representing the URI of the playlist feed that
is to be retrieved.
username: An optional string representing the username. Defaults to the
currently authenticated user.
Returns:
A YouTubePlaylistFeed if successfully retrieved.
Raises:
YouTubeError: You must provide at least a uri or a username to the
GetYouTubePlaylistFeed() method.
- GetYouTubePlaylistVideoFeed(self, uri=None, playlist_id=None)
- Retrieve a YouTubePlaylistVideoFeed (a feed of videos on a playlist).
Either a uri or a playlist_id must be provided.
Args:
uri: An optional string representing the URI of the playlist video feed
that is to be retrieved.
playlist_id: An optional string representing the Id of the playlist whose
playlist video feed is to be retrieved.
Returns:
A YouTubePlaylistVideoFeed if successfully retrieved.
Raises:
YouTubeError: You must provide at least a uri or a playlist_id to the
GetYouTubePlaylistVideoFeed() method.
- GetYouTubeRelatedVideoFeed(self, uri=None, video_id=None)
- Retrieve a YouTubeRelatedVideoFeed.
Either a uri for the feed or a video_id is required.
Args:
uri: An optional string representing the URI of the feed that is to
be retrieved.
video_id: An optional string representing the ID of the video for which
to retrieve the related video feed.
Returns:
A YouTubeRelatedVideoFeed if successfully retrieved.
Raises:
YouTubeError: You must provide at least a uri or a video_id to the
GetYouTubeRelatedVideoFeed() method.
- GetYouTubeSubscriptionEntry(self, uri)
- Retrieve a YouTubeSubscriptionEntry.
Args:
uri: A string representing the URI of the entry that is to be retrieved.
Returns:
A YouTubeVideoSubscriptionEntry if successfully retrieved.
- GetYouTubeSubscriptionFeed(self, uri=None, username='default')
- Retrieve a YouTubeSubscriptionFeed.
Either the uri of the feed or a username must be provided.
Args:
uri: An optional string representing the URI of the feed that is to
be retrieved.
username: An optional string representing the username whose subscription
feed is to be retrieved. Defaults to the currently authenticted user.
Returns:
A YouTubeVideoSubscriptionFeed if successfully retrieved.
- GetYouTubeUserEntry(self, uri=None, username=None)
- Retrieve a YouTubeUserEntry.
Either a uri or a username must be provided.
Args:
uri: An optional string representing the URI of the user entry that is
to be retrieved.
username: An optional string representing the username.
Returns:
A YouTubeUserEntry if successfully retrieved.
Raises:
YouTubeError: You must provide at least a uri or a username to the
GetYouTubeUserEntry() method.
- GetYouTubeUserFeed(self, uri=None, username=None)
- Retrieve a YouTubeVideoFeed of user uploaded videos
Either a uri or a username must be provided. This will retrieve list
of videos uploaded by specified user. The uri will be of format
"http://gdata.youtube.com/feeds/api/users/{username}/uploads".
Args:
uri: An optional string representing the URI of the user feed that is
to be retrieved.
username: An optional string representing the username.
Returns:
A YouTubeUserFeed if successfully retrieved.
Raises:
YouTubeError: You must provide at least a uri or a username to the
GetYouTubeUserFeed() method.
- GetYouTubeVideoCommentEntry(self, uri)
- Retrieve a YouTubeVideoCommentEntry.
Args:
uri: A string representing the URI of the comment entry that is to
be retrieved.
Returns:
A YouTubeCommentEntry if successfully retrieved.
- GetYouTubeVideoCommentFeed(self, uri=None, video_id=None)
- Retrieve a YouTubeVideoCommentFeed.
Either a uri or a video_id must be provided.
Args:
uri: An optional string representing the URI of the comment feed that
is to be retrieved.
video_id: An optional string representing the ID of the video for which
to retrieve the comment feed.
Returns:
A YouTubeVideoCommentFeed if successfully retrieved.
Raises:
YouTubeError: You must provide at least a uri or a video_id to the
GetYouTubeVideoCommentFeed() method.
- GetYouTubeVideoEntry(self, uri=None, video_id=None)
- Retrieve a YouTubeVideoEntry.
Either a uri or a video_id must be provided.
Args:
uri: An optional string representing the URI of the entry that is to
be retrieved.
video_id: An optional string representing the ID of the video.
Returns:
A YouTubeVideoFeed if successfully retrieved.
Raises:
YouTubeError: You must provide at least a uri or a video_id to the
GetYouTubeVideoEntry() method.
- GetYouTubeVideoFeed(self, uri)
- Retrieve a YouTubeVideoFeed.
Args:
uri: A string representing the URI of the feed that is to be retrieved.
Returns:
A YouTubeVideoFeed if successfully retrieved.
- GetYouTubeVideoResponseEntry(self, uri)
- Retrieve a YouTubeVideoResponseEntry.
Args:
uri: A string representing the URI of the video response entry that
is to be retrieved.
Returns:
A YouTubeVideoResponseEntry if successfully retrieved.
- GetYouTubeVideoResponseFeed(self, uri=None, video_id=None)
- Retrieve a YouTubeVideoResponseFeed.
Either a uri or a playlist_id must be provided.
Args:
uri: An optional string representing the URI of the video response feed
that is to be retrieved.
video_id: An optional string representing the ID of the video whose
response feed is to be retrieved.
Returns:
A YouTubeVideoResponseFeed if successfully retrieved.
Raises:
YouTubeError: You must provide at least a uri or a video_id to the
GetYouTubeVideoResponseFeed() method.
- InsertVideoEntry(self, video_entry, filename_or_handle, youtube_username='default', content_type='video/quicktime')
- Upload a new video to YouTube using the direct upload mechanism.
Needs authentication.
Args:
video_entry: The YouTubeVideoEntry to upload.
filename_or_handle: A file-like object or file name where the video
will be read from.
youtube_username: An optional string representing the username into whose
account this video is to be uploaded to. Defaults to the currently
authenticated user.
content_type: An optional string representing internet media type
(a.k.a. mime type) of the media object. Currently the YouTube API
supports these types:
o video/mpeg
o video/quicktime
o video/x-msvideo
o video/mp4
o video/x-flv
Returns:
The newly created YouTubeVideoEntry if successful.
Raises:
AssertionError: video_entry must be a gdata.youtube.VideoEntry instance.
YouTubeError: An error occurred trying to read the video file provided.
gdata.service.RequestError: An error occurred trying to upload the video
to the API server.
- Query(self, uri)
- Performs a query and returns a resulting feed or entry.
Args:
uri: A string representing the URI of the feed that is to be queried.
Returns:
On success, a tuple in the form:
(boolean succeeded=True, ElementTree._Element result)
On failure, a tuple in the form:
(boolean succeeded=False, {'status': HTTP status code from server,
'reason': HTTP reason from the server,
'body': HTTP body of the server's response})
- UpdateContact(self, contact_username, new_contact_status, new_contact_category, my_username='default')
- Update a contact, providing a new status and a new category.
Needs authentication.
Args:
contact_username: A string representing the username of the contact
that is to be updated.
new_contact_status: A string representing the new status of the contact.
This can either be set to 'accepted' or 'rejected'.
new_contact_category: A string representing the new category for the
contact, either 'Friends' or 'Family'.
my_username: An optional string representing the username of the user
whose contact feed we are modifying. Defaults to the currently
authenticated user.
Returns:
A YouTubeContactEntry if updated succesfully.
Raises:
YouTubeError: New contact status must be within the accepted values. Or
new contact category must be within the accepted categories.
- UpdatePlaylist(self, playlist_id, new_playlist_title, new_playlist_description, playlist_private=None, username='default')
- Update a playlist with new meta-data.
Needs authentication.
Args:
playlist_id: A string representing the ID of the playlist to be updated.
new_playlist_title: A string representing a new title for the playlist.
new_playlist_description: A string representing a new description for the
playlist.
playlist_private: An optional boolean, set to True if the playlist is
to be private.
username: An optional string representing the username whose playlist is
to be updated. Defaults to the currently authenticated user.
Returns:
A YouTubePlaylistEntry if the update was successful.
- UpdatePlaylistVideoEntryMetaData(self, playlist_uri, playlist_entry_id, new_video_title, new_video_description, new_video_position)
- Update the meta data for a YouTubePlaylistVideoEntry.
Needs authentication.
Args:
playlist_uri: A string representing the URI of the playlist that contains
the entry to be updated.
playlist_entry_id: A string representing the ID of the entry to be
updated.
new_video_title: A string representing the new title for the video entry.
new_video_description: A string representing the new description for
the video entry.
new_video_position: An integer representing the new position on the
playlist for the video.
Returns:
A YouTubePlaylistVideoEntry if the update was successful.
- UpdateVideoEntry(self, video_entry)
- Updates a video entry's meta-data.
Needs authentication.
Args:
video_entry: The YouTubeVideoEntry to update, containing updated
meta-data.
Returns:
An updated YouTubeVideoEntry on success or None.
- YouTubeQuery(self, query)
- Performs a YouTube specific query and returns a resulting feed or entry.
Args:
query: A Query object or one if its sub-classes (YouTubeVideoQuery,
YouTubeUserQuery or YouTubePlaylistQuery).
Returns:
Depending on the type of Query object submitted returns either a
YouTubeVideoFeed, a YouTubeUserFeed, a YouTubePlaylistFeed. If the
Query object provided was not YouTube-related, a tuple is returned.
On success the tuple will be in this form:
(boolean succeeded=True, ElementTree._Element result)
On failure, the tuple will be in this form:
(boolean succeeded=False, {'status': HTTP status code from server,
'reason': HTTP reason from the server,
'body': HTTP body of the server response})
- __init__(self, email=None, password=None, source=None, server='gdata.youtube.com', additional_headers=None, client_id=None, developer_key=None, **kwargs)
- Creates a client for the YouTube service.
Args:
email: string (optional) The user's email address, used for
authentication.
password: string (optional) The user's password.
source: string (optional) The name of the user's application.
server: string (optional) The name of the server to which a connection
will be opened. Default value: 'gdata.youtube.com'.
client_id: string (optional) Identifies your application, required for
authenticated requests, along with a developer key.
developer_key: string (optional) Register your application at
http://code.google.com/apis/youtube/dashboard to obtain a (free) key.
**kwargs: The other parameters to pass to gdata.service.GDataService
constructor.
Data descriptors defined here:
- client_id
- The ClientId property
- developer_key
- The Developer Key property
Methods inherited from gdata.service.GDataService:
- AuthSubTokenInfo(self)
- Fetches the AuthSub token's metadata from the server.
Raises:
NonAuthSubToken if the user's auth token is not an AuthSub token
- ClientLogin(self, username, password, account_type=None, service=None, auth_service_url=None, source=None, captcha_token=None, captcha_response=None)
- Convenience method for authenticating using ProgrammaticLogin.
Sets values for email, password, and other optional members.
Args:
username:
password:
account_type: string (optional)
service: string (optional)
auth_service_url: string (optional)
captcha_token: string (optional)
captcha_response: string (optional)
- Delete(self, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4)
- Deletes the entry at the given URI.
Args:
uri: string The URI of the entry to be deleted. Example:
'/base/feeds/items/ITEM-ID'
extra_headers: dict (optional) HTTP headers which are to be included.
The client automatically sets the Content-Type and
Authorization headers.
url_params: dict (optional) Additional URL parameters to be included
in the URI. These are translated into query arguments
in the form '&dict_key=value&...'.
Example: {'max-results': '250'} becomes &max-results=250
escape_params: boolean (optional) If false, the calling code has already
ensured that the query will form a valid URL (all
reserved characters have been escaped). If true, this
method will escape the query and any URL parameters
provided.
Returns:
True if the entry was deleted.
- FetchOAuthRequestToken(self, scopes=None, extra_parameters=None, request_url='https://www.google.com/accounts/OAuthGetRequestToken', oauth_callback=None)
- Fetches and sets the OAuth request token and returns it.
Args:
scopes: string or list of string base URL(s) of the service(s) to be
accessed. If None, then this method tries to determine the
scope(s) from the current service.
extra_parameters: dict (optional) key-value pairs as any additional
parameters to be included in the URL and signature while making a
request for fetching an OAuth request token. All the OAuth parameters
are added by default. But if provided through this argument, any
default parameters will be overwritten. For e.g. a default parameter
oauth_version 1.0 can be overwritten if
extra_parameters = {'oauth_version': '2.0'}
request_url: Request token URL. The default is
'https://www.google.com/accounts/OAuthGetRequestToken'.
oauth_callback: str (optional) If set, it is assume the client is using
the OAuth v1.0a protocol where the callback url is sent in the
request token step. If the oauth_callback is also set in
extra_params, this value will override that one.
Returns:
The fetched request token as a gdata.auth.OAuthToken object.
Raises:
FetchingOAuthRequestTokenFailed if the server responded to the request
with an error.
- GenerateAuthSubURL(self, next, scope, secure=False, session=True, domain='default')
- Generate a URL at which the user will login and be redirected back.
Users enter their credentials on a Google login page and a token is sent
to the URL specified in next. See documentation for AuthSub login at:
http://code.google.com/apis/accounts/docs/AuthSub.html
Args:
next: string The URL user will be sent to after logging in.
scope: string or list of strings. The URLs of the services to be
accessed.
secure: boolean (optional) Determines whether or not the issued token
is a secure token.
session: boolean (optional) Determines whether or not the issued token
can be upgraded to a session token.
- GenerateOAuthAuthorizationURL(self, request_token=None, callback_url=None, extra_params=None, include_scopes_in_callback=False, scopes_param_prefix='oauth_token_scope', request_url='https://www.google.com/accounts/OAuthAuthorizeToken')
- Generates URL at which user will login to authorize the request token.
Args:
request_token: gdata.auth.OAuthToken (optional) OAuth request token.
If not specified, then the current token will be used if it is of
type <gdata.auth.OAuthToken>, else it is found by looking in the
token_store by looking for a token for the current scope.
callback_url: string (optional) The URL user will be sent to after
logging in and granting access.
extra_params: dict (optional) Additional parameters to be sent.
include_scopes_in_callback: Boolean (default=False) if set to True, and
if 'callback_url' is present, the 'callback_url' will be modified to
include the scope(s) from the request token as a URL parameter. The
key for the 'callback' URL's scope parameter will be
OAUTH_SCOPE_URL_PARAM_NAME. The benefit of including the scope URL as
a parameter to the 'callback' URL, is that the page which receives
the OAuth token will be able to tell which URLs the token grants
access to.
scopes_param_prefix: string (default='oauth_token_scope') The URL
parameter key which maps to the list of valid scopes for the token.
This URL parameter will be included in the callback URL along with
the scopes of the token as value if include_scopes_in_callback=True.
request_url: Authorization URL. The default is
'https://www.google.com/accounts/OAuthAuthorizeToken'.
Returns:
A string URL at which the user is required to login.
Raises:
NonOAuthToken if the user's request token is not an OAuth token or if a
request token was not available.
- Get(self, uri, extra_headers=None, redirects_remaining=4, encoding='UTF-8', converter=None)
- Query the GData API with the given URI
The uri is the portion of the URI after the server value
(ex: www.google.com).
To perform a query against Google Base, set the server to
'base.google.com' and set the uri to '/base/feeds/...', where ... is
your query. For example, to find snippets for all digital cameras uri
should be set to: '/base/feeds/snippets?bq=digital+camera'
Args:
uri: string The query in the form of a URI. Example:
'/base/feeds/snippets?bq=digital+camera'.
extra_headers: dictionary (optional) Extra HTTP headers to be included
in the GET request. These headers are in addition to
those stored in the client's additional_headers property.
The client automatically sets the Content-Type and
Authorization headers.
redirects_remaining: int (optional) Tracks the number of additional
redirects this method will allow. If the service object receives
a redirect and remaining is 0, it will not follow the redirect.
This was added to avoid infinite redirect loops.
encoding: string (optional) The character encoding for the server's
response. Default is UTF-8
converter: func (optional) A function which will transform
the server's results before it is returned. Example: use
GDataFeedFromString to parse the server response as if it
were a GDataFeed.
Returns:
If there is no ResultsTransformer specified in the call, a GDataFeed
or GDataEntry depending on which is sent from the server. If the
response is niether a feed or entry and there is no ResultsTransformer,
return a string. If there is a ResultsTransformer, the returned value
will be that of the ResultsTransformer function.
- GetAuthSubToken(self)
- Returns the AuthSub token as a string.
If the token is an gdta.auth.AuthSubToken, the Authorization Label
("AuthSub token") is removed.
This method examines the current_token to see if it is an AuthSubToken
or SecureAuthSubToken. If not, it searches the token_store for a token
which matches the current scope.
The current scope is determined by the service name string member.
Returns:
If the current_token is set to an AuthSubToken/SecureAuthSubToken,
return the token string. If there is no current_token, a token string
for a token which matches the service object's default scope is returned.
If there are no tokens valid for the scope, returns None.
- GetClientLoginToken(self)
- Returns the token string for the current token or a token matching the
service scope.
If the current_token is a ClientLoginToken, the token string for
the current token is returned. If the current_token is not set, this method
searches for a token in the token_store which is valid for the service
object's current scope.
The current scope is determined by the service name string member.
The token string is the end of the Authorization header, it doesn not
include the ClientLogin label.
- GetEntry(self, uri, extra_headers=None)
- Query the GData API with the given URI and receive an Entry.
See also documentation for gdata.service.Get
Args:
uri: string The query in the form of a URI. Example:
'/base/feeds/snippets?bq=digital+camera'.
extra_headers: dictionary (optional) Extra HTTP headers to be included
in the GET request. These headers are in addition to
those stored in the client's additional_headers property.
The client automatically sets the Content-Type and
Authorization headers.
Returns:
A GDataEntry built from the XML in the server's response.
- GetFeed(self, uri, extra_headers=None, converter=<function GDataFeedFromString at 0x7ffea893c488>)
- Query the GData API with the given URI and receive a Feed.
See also documentation for gdata.service.Get
Args:
uri: string The query in the form of a URI. Example:
'/base/feeds/snippets?bq=digital+camera'.
extra_headers: dictionary (optional) Extra HTTP headers to be included
in the GET request. These headers are in addition to
those stored in the client's additional_headers property.
The client automatically sets the Content-Type and
Authorization headers.
Returns:
A GDataFeed built from the XML in the server's response.
- GetMedia(self, uri, extra_headers=None)
- Returns a MediaSource containing media and its metadata from the given
URI string.
- GetNext(self, feed)
- Requests the next 'page' of results in the feed.
This method uses the feed's next link to request an additional feed
and uses the class of the feed to convert the results of the GET request.
Args:
feed: atom.Feed or a subclass. The feed should contain a next link and
the type of the feed will be applied to the results from the
server. The new feed which is returned will be of the same class
as this feed which was passed in.
Returns:
A new feed representing the next set of results in the server's feed.
The type of this feed will match that of the feed argument.
- GetOAuthInputParameters(self)
- Post(self, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4, media_source=None, converter=None)
- Insert or update data into a GData service at the given URI.
Args:
data: string, ElementTree._Element, atom.Entry, or gdata.GDataEntry The
XML to be sent to the uri.
uri: string The location (feed) to which the data should be inserted.
Example: '/base/feeds/items'.
extra_headers: dict (optional) HTTP headers which are to be included.
The client automatically sets the Content-Type,
Authorization, and Content-Length headers.
url_params: dict (optional) Additional URL parameters to be included
in the URI. These are translated into query arguments
in the form '&dict_key=value&...'.
Example: {'max-results': '250'} becomes &max-results=250
escape_params: boolean (optional) If false, the calling code has already
ensured that the query will form a valid URL (all
reserved characters have been escaped). If true, this
method will escape the query and any URL parameters
provided.
media_source: MediaSource (optional) Container for the media to be sent
along with the entry, if provided.
converter: func (optional) A function which will be executed on the
server's response. Often this is a function like
GDataEntryFromString which will parse the body of the server's
response and return a GDataEntry.
Returns:
If the post succeeded, this method will return a GDataFeed, GDataEntry,
or the results of running converter on the server's result body (if
converter was specified).
- PostOrPut(self, verb, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4, media_source=None, converter=None)
- Insert data into a GData service at the given URI.
Args:
verb: string, either 'POST' or 'PUT'
data: string, ElementTree._Element, atom.Entry, or gdata.GDataEntry The
XML to be sent to the uri.
uri: string The location (feed) to which the data should be inserted.
Example: '/base/feeds/items'.
extra_headers: dict (optional) HTTP headers which are to be included.
The client automatically sets the Content-Type,
Authorization, and Content-Length headers.
url_params: dict (optional) Additional URL parameters to be included
in the URI. These are translated into query arguments
in the form '&dict_key=value&...'.
Example: {'max-results': '250'} becomes &max-results=250
escape_params: boolean (optional) If false, the calling code has already
ensured that the query will form a valid URL (all
reserved characters have been escaped). If true, this
method will escape the query and any URL parameters
provided.
media_source: MediaSource (optional) Container for the media to be sent
along with the entry, if provided.
converter: func (optional) A function which will be executed on the
server's response. Often this is a function like
GDataEntryFromString which will parse the body of the server's
response and return a GDataEntry.
Returns:
If the post succeeded, this method will return a GDataFeed, GDataEntry,
or the results of running converter on the server's result body (if
converter was specified).
- ProgrammaticLogin(self, captcha_token=None, captcha_response=None)
- Authenticates the user and sets the GData Auth token.
Login retreives a temporary auth token which must be used with all
requests to GData services. The auth token is stored in the GData client
object.
Login is also used to respond to a captcha challenge. If the user's login
attempt failed with a CaptchaRequired error, the user can respond by
calling Login with the captcha token and the answer to the challenge.
Args:
captcha_token: string (optional) The identifier for the captcha challenge
which was presented to the user.
captcha_response: string (optional) The user's answer to the captch
challenge.
Raises:
CaptchaRequired if the login service will require a captcha response
BadAuthentication if the login service rejected the username or password
Error if the login service responded with a 403 different from the above
- Put(self, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=3, media_source=None, converter=None)
- Updates an entry at the given URI.
Args:
data: string, ElementTree._Element, or xml_wrapper.ElementWrapper The
XML containing the updated data.
uri: string A URI indicating entry to which the update will be applied.
Example: '/base/feeds/items/ITEM-ID'
extra_headers: dict (optional) HTTP headers which are to be included.
The client automatically sets the Content-Type,
Authorization, and Content-Length headers.
url_params: dict (optional) Additional URL parameters to be included
in the URI. These are translated into query arguments
in the form '&dict_key=value&...'.
Example: {'max-results': '250'} becomes &max-results=250
escape_params: boolean (optional) If false, the calling code has already
ensured that the query will form a valid URL (all
reserved characters have been escaped). If true, this
method will escape the query and any URL parameters
provided.
converter: func (optional) A function which will be executed on the
server's response. Often this is a function like
GDataEntryFromString which will parse the body of the server's
response and return a GDataEntry.
Returns:
If the put succeeded, this method will return a GDataFeed, GDataEntry,
or the results of running converter on the server's result body (if
converter was specified).
- RevokeAuthSubToken(self)
- Revokes an existing AuthSub token.
Raises:
NonAuthSubToken if the user's auth token is not an AuthSub token
- RevokeOAuthToken(self, request_url='https://www.google.com/accounts/AuthSubRevokeToken')
- Revokes an existing OAuth token.
request_url: Token revoke URL. The default is
'https://www.google.com/accounts/AuthSubRevokeToken'.
Raises:
NonOAuthToken if the user's auth token is not an OAuth token.
RevokingOAuthTokenFailed if request for revoking an OAuth token failed.
- SetAuthSubToken(self, token, scopes=None, rsa_key=None)
- Sets the token sent in requests to an AuthSub token.
Sets the current_token and attempts to add the token to the token_store.
Only use this method if you have received a token from the AuthSub
service. The auth token is set automatically when UpgradeToSessionToken()
is used. See documentation for Google AuthSub here:
http://code.google.com/apis/accounts/AuthForWebApps.html
Args:
token: gdata.auth.AuthSubToken or gdata.auth.SecureAuthSubToken or string
The token returned by the AuthSub service. If the token is an
AuthSubToken or SecureAuthSubToken, the scope information stored in
the token is used. If the token is a string, the scopes parameter is
used to determine the valid scopes.
scopes: list of URLs for which the token is valid. This is only used
if the token parameter is a string.
rsa_key: string (optional) Private key required for RSA_SHA1 signature
method. This parameter is necessary if the token is a string
representing a secure token.
- SetClientLoginToken(self, token, scopes=None)
- Sets the token sent in requests to a ClientLogin token.
This method sets the current_token to a new ClientLoginToken and it
also attempts to add the ClientLoginToken to the token_store.
Only use this method if you have received a token from the ClientLogin
service. The auth_token is set automatically when ProgrammaticLogin()
is used. See documentation for Google ClientLogin here:
http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
Args:
token: string or instance of a ClientLoginToken.
- SetOAuthInputParameters(self, signature_method, consumer_key, consumer_secret=None, rsa_key=None, two_legged_oauth=False, requestor_id=None)
- Sets parameters required for using OAuth authentication mechanism.
NOTE: Though consumer_secret and rsa_key are optional, either of the two
is required depending on the value of the signature_method.
Args:
signature_method: class which provides implementation for strategy class
oauth.oauth.OAuthSignatureMethod. Signature method to be used for
signing each request. Valid implementations are provided as the
constants defined by gdata.auth.OAuthSignatureMethod. Currently
they are gdata.auth.OAuthSignatureMethod.RSA_SHA1 and
gdata.auth.OAuthSignatureMethod.HMAC_SHA1
consumer_key: string Domain identifying third_party web application.
consumer_secret: string (optional) Secret generated during registration.
Required only for HMAC_SHA1 signature method.
rsa_key: string (optional) Private key required for RSA_SHA1 signature
method.
two_legged_oauth: boolean (optional) Enables two-legged OAuth process.
requestor_id: string (optional) User email adress to make requests on
their behalf. This parameter should only be set when two_legged_oauth
is True.
- SetOAuthToken(self, oauth_token)
- Attempts to set the current token and add it to the token store.
The oauth_token can be any OAuth token i.e. unauthorized request token,
authorized request token or access token.
This method also attempts to add the token to the token store.
Use this method any time you want the current token to point to the
oauth_token passed. For e.g. call this method with the request token
you receive from FetchOAuthRequestToken.
Args:
request_token: gdata.auth.OAuthToken OAuth request token.
- UpgradeToOAuthAccessToken(self, authorized_request_token=None, request_url='https://www.google.com/accounts/OAuthGetAccessToken', oauth_version='1.0', oauth_verifier=None)
- Upgrades the authorized request token to an access token and returns it
Args:
authorized_request_token: gdata.auth.OAuthToken (optional) OAuth request
token. If not specified, then the current token will be used if it is
of type <gdata.auth.OAuthToken>, else it is found by looking in the
token_store by looking for a token for the current scope.
request_url: Access token URL. The default is
'https://www.google.com/accounts/OAuthGetAccessToken'.
oauth_version: str (default='1.0') oauth_version parameter. All other
'oauth_' parameters are added by default. This parameter too, is
added by default but here you can override it's value.
oauth_verifier: str (optional) If present, it is assumed that the client
will use the OAuth v1.0a protocol which includes passing the
oauth_verifier (as returned by the SP) in the access token step.
Returns:
Access token
Raises:
NonOAuthToken if the user's authorized request token is not an OAuth
token or if an authorized request token was not available.
TokenUpgradeFailed if the server responded to the request with an
error.
- UpgradeToSessionToken(self, token=None)
- Upgrades a single use AuthSub token to a session token.
Args:
token: A gdata.auth.AuthSubToken or gdata.auth.SecureAuthSubToken
(optional) which is good for a single use but can be upgraded
to a session token. If no token is passed in, the token
is found by looking in the token_store by looking for a token
for the current scope.
Raises:
NonAuthSubToken if the user's auth token is not an AuthSub token
TokenUpgradeFailed if the server responded to the request with an
error.
- upgrade_to_session_token(self, token)
- Upgrades a single use AuthSub token to a session token.
Args:
token: A gdata.auth.AuthSubToken or gdata.auth.SecureAuthSubToken
which is good for a single use but can be upgraded to a
session token.
Returns:
The upgraded token as a gdata.auth.AuthSubToken object.
Raises:
TokenUpgradeFailed if the server responded to the request with an
error.
Data descriptors inherited from gdata.service.GDataService:
- captcha_token
- Get the captcha token for a login request.
- captcha_url
- Get the captcha URL for a login request.
- source
- The source is the name of the application making the request.
It should be in the form company_id-app_name-app_version
Data and other attributes inherited from gdata.service.GDataService:
- auth_token = None
- handler = None
- tokens = None
Methods inherited from atom.service.AtomService:
- UseBasicAuth(self, username, password, for_proxy=False)
- Sets an Authenticaiton: Basic HTTP header containing plaintext.
Deprecated, use use_basic_auth instead.
The username and password are base64 encoded and added to an HTTP header
which will be included in each request. Note that your username and
password are sent in plaintext.
Args:
username: str
password: str
- request(*args, **kwargs)
- # The deprecated_function wraps the actual call to f.
- use_basic_auth(self, username, password, scopes=None)
Data descriptors inherited from atom.service.AtomService:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- debug
- If True, HTTP debug information is printed.
- override_token
Data and other attributes inherited from atom.service.AtomService:
- auto_set_current_token = True
- auto_store_tokens = True
- current_token = None
- port = 80
- ssl = False
|
class YouTubeUserQuery(YouTubeVideoQuery) |
| |
Subclasses YouTubeVideoQuery to perform user-specific queries.
Attributes are set dynamically via properties. Properties correspond to
the standard Google Data API query parameters with YouTube Data API
extensions. |
| |
- Method resolution order:
- YouTubeUserQuery
- YouTubeVideoQuery
- gdata.service.Query
- __builtin__.dict
- __builtin__.object
Methods defined here:
- __init__(self, username=None, feed_type=None, subscription_id=None, text_query=None, params=None, categories=None)
Data descriptors inherited from YouTubeVideoQuery:
- format
- The format query parameter
- location
- The location query parameter
- lr
- The lr (language restriction) query parameter
- orderby
- The orderby query parameter
- racy
- The racy query parameter
- restriction
- The restriction query parameter
- time
- The time query parameter
- vq
- The video query (vq) query parameter
Methods inherited from gdata.service.Query:
- ToUri(self)
- __str__(self)
Data descriptors inherited from gdata.service.Query:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- alt
- The feed query's alt parameter
- author
- The feed query's author parameter
- max_results
- The feed query's max-results parameter
- published_max
- The feed query's published-max parameter
- published_min
- The feed query's published-min parameter
- start_index
- The feed query's start-index parameter
- text_query
- The feed query's q parameter
- updated_max
- The feed query's updated-max parameter
- updated_min
- The feed query's updated-min parameter
Methods inherited from __builtin__.dict:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __contains__(...)
- D.__contains__(k) -> True if D has a key k, else False
- __delitem__(...)
- x.__delitem__(y) <==> del x[y]
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __repr__(...)
- x.__repr__() <==> repr(x)
- __setitem__(...)
- x.__setitem__(i, y) <==> x[i]=y
- __sizeof__(...)
- D.__sizeof__() -> size of D in memory, in bytes
- clear(...)
- D.clear() -> None. Remove all items from D.
- copy(...)
- D.copy() -> a shallow copy of D
- get(...)
- D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- has_key(...)
- D.has_key(k) -> True if D has a key k, else False
- items(...)
- D.items() -> list of D's (key, value) pairs, as 2-tuples
- iteritems(...)
- D.iteritems() -> an iterator over the (key, value) items of D
- iterkeys(...)
- D.iterkeys() -> an iterator over the keys of D
- itervalues(...)
- D.itervalues() -> an iterator over the values of D
- keys(...)
- D.keys() -> list of D's keys
- pop(...)
- D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
- D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
- setdefault(...)
- D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
- D.update(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k]
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]
- values(...)
- D.values() -> list of D's values
Data and other attributes inherited from __builtin__.dict:
- __hash__ = None
- __new__ = <built-in method __new__ of type object at 0x7569a0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- fromkeys = <built-in method fromkeys of type object at 0xd3d490>
- dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.
|
class YouTubeVideoQuery(gdata.service.Query) |
| |
Subclasses gdata.service.Query to represent a YouTube Data API query.
Attributes are set dynamically via properties. Properties correspond to
the standard Google Data API query parameters with YouTube Data API
extensions. Please refer to the API documentation for details.
Attributes:
vq: The vq parameter, which is only supported for video feeds, specifies a
search query term. Refer to API documentation for further details.
orderby: The orderby parameter, which is only supported for video feeds,
specifies the value that will be used to sort videos in the search
result set. Valid values for this parameter are relevance, published,
viewCount and rating.
time: The time parameter, which is only available for the top_rated,
top_favorites, most_viewed, most_discussed, most_linked and
most_responded standard feeds, restricts the search to videos uploaded
within the specified time. Valid values for this parameter are today
(1 day), this_week (7 days), this_month (1 month) and all_time.
The default value for this parameter is all_time.
format: The format parameter specifies that videos must be available in a
particular video format. Refer to the API documentation for details.
racy: The racy parameter allows a search result set to include restricted
content as well as standard content. Valid values for this parameter
are include and exclude. By default, restricted content is excluded.
lr: The lr parameter restricts the search to videos that have a title,
description or keywords in a specific language. Valid values for the lr
parameter are ISO 639-1 two-letter language codes.
restriction: The restriction parameter identifies the IP address that
should be used to filter videos that can only be played in specific
countries.
location: A string of geo coordinates. Note that this is not used when the
search is performed but rather to filter the returned videos for ones
that match to the location entered. |
| |
- Method resolution order:
- YouTubeVideoQuery
- gdata.service.Query
- __builtin__.dict
- __builtin__.object
Methods defined here:
- __init__(self, video_id=None, feed_type=None, text_query=None, params=None, categories=None)
Data descriptors defined here:
- format
- The format query parameter
- location
- The location query parameter
- lr
- The lr (language restriction) query parameter
- orderby
- The orderby query parameter
- racy
- The racy query parameter
- restriction
- The restriction query parameter
- time
- The time query parameter
- vq
- The video query (vq) query parameter
Methods inherited from gdata.service.Query:
- ToUri(self)
- __str__(self)
Data descriptors inherited from gdata.service.Query:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- alt
- The feed query's alt parameter
- author
- The feed query's author parameter
- max_results
- The feed query's max-results parameter
- published_max
- The feed query's published-max parameter
- published_min
- The feed query's published-min parameter
- start_index
- The feed query's start-index parameter
- text_query
- The feed query's q parameter
- updated_max
- The feed query's updated-max parameter
- updated_min
- The feed query's updated-min parameter
Methods inherited from __builtin__.dict:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __contains__(...)
- D.__contains__(k) -> True if D has a key k, else False
- __delitem__(...)
- x.__delitem__(y) <==> del x[y]
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __repr__(...)
- x.__repr__() <==> repr(x)
- __setitem__(...)
- x.__setitem__(i, y) <==> x[i]=y
- __sizeof__(...)
- D.__sizeof__() -> size of D in memory, in bytes
- clear(...)
- D.clear() -> None. Remove all items from D.
- copy(...)
- D.copy() -> a shallow copy of D
- get(...)
- D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- has_key(...)
- D.has_key(k) -> True if D has a key k, else False
- items(...)
- D.items() -> list of D's (key, value) pairs, as 2-tuples
- iteritems(...)
- D.iteritems() -> an iterator over the (key, value) items of D
- iterkeys(...)
- D.iterkeys() -> an iterator over the keys of D
- itervalues(...)
- D.itervalues() -> an iterator over the values of D
- keys(...)
- D.keys() -> list of D's keys
- pop(...)
- D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
- D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
- setdefault(...)
- D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
- D.update(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k]
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]
- values(...)
- D.values() -> list of D's values
Data and other attributes inherited from __builtin__.dict:
- __hash__ = None
- __new__ = <built-in method __new__ of type object at 0x7569a0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- fromkeys = <built-in method fromkeys of type object at 0xd3f4c0>
- dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.
| |


--- layout: post title: Wild kyrgyzstan date: '2007-06-11T03:28:00.001Z' author: tknv tags: - kyrgyzstan modified_time: '2009-07-09T19:24:05.040Z' blogger_id: tag:blogger.com,1999:blog-11459759.post-5153176187708306841 blogger_orig_url: http://phichyudebow.blogspot.com/2007/06/oh.html --- hoho It works well


Thank you for purchasing my code. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Thanks so much!
Apex is built with Laravel version 5.5. This instruction assumes that you are familiar with Laravel 5.5 installation.
This project follows standard php coding style and uses webpack for asset compilation.
Make sure your server meets the following requirements:
Follow the steps to correctly setup apex.
1. Upload Source Code
You should configure your web server's document / web root to be the public directory for the content from zip file.
2. Directory Permissions
Directories within the storage and the bootstrap/cache directories should be writable by your web server or Apex will not run.
We can give group ownership of our Apex directory structure to the web group by typing:
sudo chown -R :www-data /var/www/apex sudo chmod -R 775 /var/www/apex/storage sudo chmod -R 775 /var/www/apex/bootstrap/cache
DB_CONNECTION=mysql DB_HOST=<IP_ADDRESS> DB_PORT=3306 DB_DATABASE=deployer DB_USERNAME=deployer DB_PASSWORD=secret
APP_URL=http://www.example.com
MAIL_DRIVER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null
php artisan apex:install
Email<EMAIL_ADDRESS>Password: password
After inital login, head over to settings and fill the form to get started.
Note: It is important to fill the settings before sending emails.


{% if request.form['hotel_name'] != '' and ikkyu_search_result is not none %}
search result
extracted hotel information
{% if 0 < ikkyu_search_result[0] %}
| extracted from |
key |
value |
| ikyu.com |
name |
[ {{ ikkyu_info[0] }} ]
|
| address |
|
| tel |
|
| check-in |
|
| check-out |
|
| hotel facilities |
|
{% for facility_index, facility_name in [(1, "room_service"), (2, "park"), (3, "bar"),
(4, "restaurant"), (5, "fitness"), (6, "esthetic"), (7, "pet")] %}
| {{ facility_index }}. {{ facility_name }} |
|
{% endfor %}
| jalan.net |
name |
[ {{ jalan_info[0] }} ]
|
| room facilities |
|
{% for facility_index, facility_name in [(1, "internet")] %}
| {{ facility_index }}. {{ facility_name }} |
|
{% endfor %}
{% endif %}
{% endif %}


|
Please see the below list of recent exceptions and/ or issues observed in the white spaces audit logs. |
|||||
| {ScanTime} (UTC) | Last 24 Hours | Error/ Critical | |||
|
|||||
|
Note: Please note that the above list is only the top 50 exceptions/ issues observed. For full list, please view from audit log viewer. |


Preparation time
less than 30 mins
Cooking time
1 to 2 hours
Serves
Serves 4 as a main, 6-8 as a tapa
Brown butter adds a delicious nutty flavor to lamb served with chilli-flecked squash and black cabbage.
Preheat the oven to 200C/400F/Gas 6.
Place the lamb portions in a bowl and drizzle over some olive and season with salt and pepper. Leave to marinade while the squash is cooking.
Place the squash pieces on a baking tray. Drizzle over a little olive oil and add the chilli, garlic, 50g/1¾oz of the butter and a good amount of seasoning. Mix the squash with your hands ensuring it’s fully coated.
Place the tray in the oven and cook until the squash starts to caramelise, then turn the heat down to 160C/325F/Gas 3 and continue to cook until the squash becomes tender and soft. You should turn the squash twice during this process to ensure even colouring, and so that the squash doesn’t stick.
When the squash is ready, drizzle it with the honey and set aside.
Heat a barbecue or grill pan to maximum heat. Place the lamb on the grill or barbecue and cook for 3-4 minutes on each side, or until nicely charred and the meat still has a spring when pushed with a finger. The meat should be rosy pink inside. Leave the meat to rest for at least five minutes.
Blanch the cavolo nero in a pan of salted boiling water, drain well and toss with some seasoning and extra virgin olive oil.
Place a small saucepan on a high heat and add the remaining butter. Cook the butter until it turns a nut-brown colour and then immediately add the capers, lemon juice and zest and the anchovies. Season with salt and pepper and then turn off the heat.
To serve, slice the lamb into 12 pieces, divide onto serving plates with the squash and cabbage and then spoon over the butter sauce.


Life at Lake Mburo National Park
by Ruth NasejjeAbout 20% of Lake Mburo National park’s surface is covered with water. What welcomes you here are the quality lodges.
.
About 20% of Lake Mburo National park’s surface is covered with water. What welcomes you here are the quality lodges.
.


{{ object.name }}
- Description
- {{ object.description }}
- Consequence
- {{ object.consequence }}
Trigger Types
| Name | Description | Comparators | |
|---|---|---|---|
| {{ item.name }} Delete | {{ item.description }} | {{ item.comparators }} | |
| There are currently no Trigger Types assosiated with {{ object.name }} |
Custom Fields
| Name | Description | Type | |
|---|---|---|---|
| {{ item.name }} Delete | {{ item.description }} | {{ item.type }} | |
| There are currently no Custom Fields assosiated with {{ object.name }} |


| GEOS SDK TechDocs
|
| The Spool Library
| 2 Simple Printing Example
By including a PrintControl object, an application gains access to the powers of the GEOS printing system. Below are several of the features built into GEOS:
-
Single Imaging Model
You'll use the same commands to describe print jobs as you did for screen drawings. These commands work for all supported printers. Thus, anything you can draw can be printed, and the application doesn't have to worry about what model of printer is being used.
-
Background Printing
Background printing allows users to continue working while their documents print. This is an example of multitasking at work. A process known as the Spooler spawns a separate thread for each active printer. Since each printer's thread priority is low, printing will take place in the background, interfering little with the user's interactions. If you want printing to take place in the foreground, your application can boost the priority of a printer thread.
-
Standard UI Components
The PrintControl is a full-featured control object and it provides a UI mechanism for finding out what a user wants to print. For user choices which depend on the printer (for example, some printers have no low-quality mode), the PrintControl will take printer abilities into consideration.
-
Control Over Scheduling
The Spooler normally handles jobs in FIFO (first in, first out) order. Geodes can exercise a great deal of control over the Spooler's scheduling of jobs. Any scheduling options the user might request using the Printer Control Panel, the application can request using spool routines.
-
Managing the Printer Yourself
If you can't or won't use standard GEOS commands to describe a print job, you can use Raw Mode to send a packet of commands in the printer's own language. For example, you could send escape codes or commands from a page description language. Since this is a standard printing mode, you still benefit from all the usual spool scheduling features.
-
Management of Multiple Printers
The user may have multiple printing devices hooked up and installed at one time. The system handles this situation intelligently: the Spooler maintains a separate queue for each serial or parallel port. Thus, if two printers are installed on two different ports, both may print at once. If two or more printers are installed on the same port then they share a queue. Thus, jobs for one printer won't try to print at the same time as those for another on the same port. To make sure the job prints to the correct printer, the Spooler will put up a dialog box advising the user to put the correct device on line.
| GEOS SDK TechDocs
|
| The Spool Library
| 2 Simple Printing Example


the book is about the development of calculating machines by “philosophers-inventors” (e.g. pascal, leibniz, and babbage). this is particularly interesting for me in regards to the history of craftsmanship and the relationship between the inventor and the artisan.
there are two models to invention: the deterministic, cumulative one (bottom up), and the individual, heroic one (top-down). the third way is that of techne, skilled making, between imitation and originality, the social and the individual, and no absolute split between design and production (agile development!)
the interesting phrase of handy mind and mindful hand (cf. roberts, shaffer, dean, 2017)
the artisanal knowledge involved in making calculating machines are:
artisanal labor has both mimetic and creative aspects. and the financial compensation should take both into account
there was difficulty between leibniz and olliver to accurately communicate theoretically before the age of standardized written and pictorial comunication practices in engineering.
diferent styles of technical drawings and description imply and accompany different conceptions and organizations of intellect and labor. more specified regulate production, less specified imply the need for the discretion and competence of the producers.
leibniz recognized that philosophers had to rely on the “confused” (implicit, tacit) knowledge of artisans; which he also relates to artists (knowing a beautiful painting)
craftsmanship of risk vs. craftsmanship of certainty (pye, 1968 the nature and art of workmanship)


Welcome!
My favorite site is
Bright MLS
Also a big fan of
Pinterest
And I'm being a brownnoser, here, but I have to love
GitHub


This research project was conducted under my supervision at Rensselaer Polytechnic Institute (RPI), My students worked on this project under my guidlines and mentoring are: Karan Bhanot, Dominic Schroeder, Isaac Llewellyn, Nicholas Luczak. This research project was a part of the Xinformatcs course that I taught during Spring 2020 at Rensselaer Polytechnic Institute.
Outcome of this project was published as a conference paper in ACM ICMHI ( International Conference on Medical and Health Informatics) in May, 2020 in Kyoto, Japan.
Mosquitoes are responsible for transfer of many vector-borne diseases including Malaria, Zika and Dengue. These amount to 17% of the total infectious diseases across the globe, leading to a death toll approximately 700,000 annually. Dengue is a preventable viral infection transmitted by Aedes mosquitoes. However, over the past 50 years, the number of dengue cases has increased by a whopping 30-fold. Every year an approximately 500,000 people are admitted with severe dengue, with an estimated 40,000 deaths. In several countries in south American continent and Asia, dengue is one of the leading causes of death. It is mainly found in tropical and sub-tropical regions, particularly surrounding urban and semi-urban areas. Historically, there has been an intensive increase in the number of dengue cases from 2000-2010 and, if adequately explored, essential information can be retrieved. Our work involves the development of the Dengue Spread Information System (DSIS), a geographic-health information system designed to highlight the spread of dengue cases in Iquitos, Peru, and San Juan, Puerto Rico from 1990 to 2013. The application is aimed at citizens, travelers, policymakers and researchers to analyze and interpret the change in risk factors leading to dengue outbreaks and develop essential early warning applications and policies to counter future dengue outbreaks. .
Most of the global dengue data is not publicly accessible over the internet. Hence, we decided to center the application around two cities whose dengue data was readily available. As a pilot study, we explored the two cities: Iquitos, Peru, and San Juan, Puerto Rico. After research, we concluded there were very few dengue information systems that provided a geographic view of the reported number of dengue cases and the causing risk factors influencing them in these two cities.
A heat map shown below describes how various risk factors are correlated with the number of dengue cases. The factors that correlated the most with the number of dengue cases include minimum temperature, average temperature, dew point temperature and specific humidity.
Displaying "Risk Factors" Information on a Marker on the Geographic Map.
Figure shown below shows the number of dengue cases in Iquitos, Peru and San Juan, Puerto Rico from Year 2000 July to April 2013
Additional details about this research project can be found in the published research paper.


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import uk.gov.hmrc.thirdpartydeveloperfrontend.domain.models.views.{BackButtonWithJavaScript, NoBackButton} @import include._ @import uk.gov.hmrc.thirdpartydeveloperfrontend.domain.models.developers.DeveloperSession @import uk.gov.hmrc.thirdpartydeveloperfrontend.domain.models.applications.Application @import uk.gov.hmrc.thirdpartydeveloperfrontend.domain.models.flows.IpAllowlistFlow @import uk.gov.hmrc.thirdpartydeveloperfrontend.domain.models.controllers.Crumb @import uk.gov.hmrc.thirdpartydeveloperfrontend.controllers.routes @this(devMain: DevMainWithFormErrors) @(app: Application, ipAllowlistFlow: IpAllowlistFlow, form: Form[uk.gov.hmrc.thirdpartydeveloperfrontend.controllers.AddCidrBlockForm])( implicit request: play.api.mvc.Request[Any], loggedIn: DeveloperSession, messages: Messages, applicationConfig: ApplicationConfig ) @breadcrumbs = @{ if(app.ipAllowlist.allowlist.isEmpty) { Seq.empty } else { Seq( Crumb("Add an IP address"), Crumb.ipAllowlist(app), Crumb.application(app), Crumb.viewAllApplications ) } } @backButton = @{ if(app.ipAllowlist.allowlist.isEmpty) { BackButtonWithJavaScript } else { NoBackButton } } @devMain( form, title = "Add an IP address to your allow list", userFullName = loggedIn.loggedInName, back = backButton, developerSession = Some(loggedIn), breadcrumbs = breadcrumbs ) {
We allow IP address ranges containing an IP address and a netmask:
<IP Address>/<netmask>
Which looks like:
<IP_ADDRESS>/24
The netmask identifies how large the network is:
Use /32 if you are unsure about netmasks but know the IP addresses your traffic comes from.
The smallest netmask we allow is /24.


Bee Gardens
Do you want to help bees and have a beautiful landscape? I can help you install a bee garden that will provide and abundance of flowers and attract bees from Spring to Fall. You can choose to go with all native species or use some non-natives that are guaranteed to feed bees and have a lush, colorful landscape. Email me for more information.


About
Covenant
Rate up
Mystic
Moonlight
reset
About
Epic Seven Simulator by Zack
Assets and data from
EpicSevenDB.com


|
This is standard font.
|
|
This should be a different font.
|
|
This should be a different font.
|
|
This should be a different font.
|
|
This references a missing font.
|
|
This references an incorrect font path.
|
|
This references a null font path.
|
|
This references font style.
|
|
This references an external font
|
|
This references a font from Google Fonts
|


About Me
I am from Cottonwood Heights, Utah and am studying HR at BYU. I love to play soccer and to be with friends and family.
I'm excited to graduate this semester and begin my journey as a B2B salesperson. A career in sales has always excited me!
Please check out the rest of my website to learn more!
Me playing soccer
Soccer Interview
The Dearden Fam
Friends
Cool Story About Me
If you want to learn more about me, I recommend reading this article that tells a story about my dad and me.


- VAISHALI GANGWAR.
| Website created byVAISHALI GANGWAR |
PENCIL
A3 SIZE
POSTER COLORS
FULL CHART SIZE
PEN
A4 SIZE
ACRYLIC COLORS


Yall is a small javascript library (2.47KB) that uses intersection observer to lazy load images (or start events on class added) and with the option to use a callback function on every intersection.
From the mdn documentation: "The Intersection Observer API provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport.", currently from the information from caniuse, it has a global support of 87.85% and all modern web browsers now support it.
Lazy loading images is a best practice to request the assets only when they are indeed to be used, google developers talk about it.
No, in that case it will load all images like lazyload is not present (use the minfied version that is transpilled using babeljs).
At this moment there is no browser supporting it out of the box, but it also checks for that and make everything ready for it, but if you have other effects based on class change and callbacks you will need to refactor this.
Since everytime an element is "intersected" a class is added you can use css animations or use a callback function that will receive the element being intersected.
You just need to load yall.js and create an instance and make it run - run again if you change the DOM. Elements just need the class "yall_lazy" - you can define your classname, and images need to not have src/srcset and have instead data-src/data-srcset attributes.
When an element is intersected the default class yall_loaded is added and the callback function is called.

Text that will translate when the class yall_loaded is added.

A quick example with a callback function that will put output to the browser console the element src after it has been intersected:

The only method available after a instance is created is the .run() method that scans elements with the "yall_lazy" class that have not yet the class "yall_loaded".
The options available when you create an instance are:
let options = { //elems to search target : "classname", defaults to "yall_lazy" //class to add after being loaded classToLoad : "classname after intersect", defaults to "yall_loaded"; //intersectObserver threshold threshold : [0,1], defaults to 0; //root root : element, defaults to null; //rootMargin rootMargin : intersectObserver rootMargin, defaults to "0px 0px 600px 0px"; //callback callback : "function", defaults to null; //activate to ignore the attribute loading="lazy" in supported browsers useLoading : bool, defaults to false; }
Short answer: sure it can. Long answer: I just made this into a library because I only needed a quick working solution with a minimal of options, you can make a pull request or just ask, otherwise you have other options available for a more robust approach.
Just and image lazy loaded
Just and image lazy loaded
img.slowloading.yall_lazy { opacity: 0; transition: all 4s ease-in-out; } img.slowloading.yall_loaded { opacity: 1; }
Translating the element
.card.yall_lazy { transition: all 3s ease-in-out; transform: translateX(-50vw); opacity: 0; } .card.yall_loaded { transform: translateX(0px); opacity: 1; } }
rootMargin like rootMargin:"0px 0px -100px 500px"" to allow offscreen (left) elements
Just check the console :)
Just and image lazy loaded


Payment for example
Some fields are missing!
Card #
CVC #
Amount
First Name
Last Name
City
State
Choose...
Option1
Option2
Option3
Postal Code
We accept:
Message
Add any notes here.


{% extends 'mainpage.html' %} {% load static %} {% load url from grandchallenge_tags %} {% block pageName %}All Challenges{% endblock %} {% block pagecontent %}
Add an external challenge Edit external challenges
{% endif %}Here is an overview of all challenges that have been organized within the area of medical image analysis that we are aware of. If you know any study that would fit in this overview, or want to advertise your challenge, please send an email to<EMAIL_ADDRESS>and we will add the challenge to the list on this page.


Installation¶
You can install Akumuli on Ubuntu 14.04 using this repository: https://packagecloud.io/Lazin/Akumuli.
Alternatively, you can use this Docker repository.
Building from source¶
Ubuntu / Debian¶
Prerequisites¶
Automatic¶
- Run
prerequisites.sh
. It will try to do the best thing.
Manual¶
In case automatic script didn’t work:
Boost:
sudo apt-get install libboost-all-dev
log4cxx:
sudo apt-get install log4cxx
orsudo apt-get install liblog4cxx-dev
on Ubuntu 16.04jemalloc:
sudo apt-get install libjemalloc-dev
microhttpd:
sudo apt-get install libmicrohttpd-dev
APR:
sudo apt-get install libapr1-dev libaprutil1-dev libaprutil1-dbd-sqlite3
SQLite:
sudo apt-get install libsqlite3-dev
Cmake:
sudo apt-get install cmake
Building¶
cmake .
make -j4
Centos 7 / RHEL7 / Fedora¶
Automatic¶
- Run
prerequisites.sh
. It will try to do the best thing.
Manual¶
In case automatic script didn’t work:
Boost:
sudo yum install boost boost-devel
log4cxx:
sudo yum install log4cxx log4cxx-devel
jemalloc:
sudo yum install jemalloc-devel
microhttpd:
sudo yum install libmicrohttpd-devel
APR:
sudo yum install apr-devel apr-util-devel apr-util-sqlite
SQLite
sudo yum install sqlite sqlite-devel
Cmake:
sudo yum install cmake
Building¶
cmake .
make -j4
make
Centos 6 / RHEL6¶
Prequisites¶
- Same as for RHEL7, but we need to manually install log4cxx, as there isn’t a package in the repos:
wget http://www.pirbot.com/mirrors/apache/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz
tar -xzvf apache-log4cxx-0.10.0.tar.gz
cd apache-log4cxx-0.10.0
- Add
#include <cstring>
to:src/main/cpp/inputstreamreader.cpp
,src/main/cpp/socketoutputstream.cpp
andsrc/examples/cpp/console.cpp
- Add
#include <cstdio>
to:src/examples/cpp/console.cpp
./configure --prefix=/usr --libdir=/usr/lib64
make -j4
sudo make install
- Go on as for RHEL7
First steps¶
Configuration¶
You should create configuration file first. This can be done using command:
> akumulid --init
OK configuration file created at: "/home/username/.akumulid"
Now you can edit configuration file ~/.akumulid
. This configuration file contains default settings and comments. Two main configuration parameters are path
and nvolumes
. First should contain path to directory when database files should be stored. By default akumuli stores files in ~/.akumuli
directory. You can change this to whatever you like (I’m using path=/tmp
to run tests most often). Second parameter nvolumes
should contain number of volumes that akumuli can use to store data. Each volume’s size is 4Gb so choose this value wisely.
Database creation¶
Now we can create database itself! Run this command:
> akumulid --create
OK database created, path: /home/username/.akumuli
You can check that database files is actually created by running ~/.akumuli
. This directory shouldn’t be empty. (NOTE: you can delete all this files by running the following command: akumulid --delete
)
Configuring Akumuli¶
Let’s return to configuration file (~/.akumulid
). You can read parameter’s descriptions in configuration file. The most important parameters are:
path
- tells Akumuli where database volumes should be stored (default value is ~/.akumuli)nvolumes
- number of volumes that should be created (this parameter is only used when you runakumulid --create
command). Ifnvolumes
is set to 0 the storage will be expanded on demand without deleting old data.volume_size
- size of the individual volume (this parameter is only used when you runakumulid --create
command)HTTP.port
- port used by HTTP serverTCP.port
- port used by TCP serverTCP.pool_size
- number of threads that should be used to process data (should be less then number of CPUs, if you set this value to 0 the system will try to chose optimal size on start)UDP.port
- port used by UDP serverUDP.pool_size
- number of threads that should be used to process data (should be less then the number of CPUs)- Log4cpp configuration
Running the server¶
To run akumulid
as a server - just run it without parameters:
> akumulid
OK UDP server started, port: 8383
OK TCP server started, port: 8282
OK HTTP server started, port: 8181
Now you can write data through TCP or UDP and read data using HTTP.


Lively
Favorites
Favorite Bands:
Top Tracks
Most Played Track!
This song has been played:
×
A Close Second.
This song has been played:
×
Modal body..
A Distant Third...
This song has been played:
×
Modal body..
×
Similar Artists
Check us out!
Check us out!
Check us out!


There are two ways to define a comonad:
I. Provide definitions for fmap, extract, and duplicate
satisfying these laws:
extract . duplicate == id
fmap extract . duplicate == id
duplicate . duplicate == fmap duplicate . duplicate
II. Provide definitions for extract and extend
satisfying these laws:
extend extract == id
extract . extend f == f
extend f . extend g == extend (f . extend g)
(fmap cannot be defaulted, but a comonad which defines
extend may simply set fmap equal to liftW.)
A comonad providing definitions for extend and duplicate,
must also satisfy these laws:
extend f == fmap f . duplicate
duplicate == extend id
fmap f == extend (f . duplicate)
(The first two are the defaults for extend and duplicate,
and the third is the definition of liftW.)
|


The DBC experience to me is that of passion and collaboration. Shereef made it very clear that in order to succeed in DBC, you have to work together and you have to want to be there. This kind of commitment required is pretty intimidating, but I feel like I'm up for the challenge. I get the general sense that the people who work for DBC are there because they truly believe in DBC's formula and are willing to go all out to make that happen. The least I can do is reciprocate those intentions.
I'll admit that my mindset was exactly like the consumer mindset that Shereef was talking about. I expected to put in x amount of hours and money to get y results. But now that I'm aware of the fact that there is an alternate way of thinking I can make that change for the better. Immersion has always been the best teacher for me, and this program is exactly that times ten. I just hope I can keep up with everyone, as I'm definitely one of those people who feel like they are outclassed by everyone else. That just means I have to try even harder and not be afraid to ask for help.