Did I find the right examples for you? yes no

All Samples(136)  |  Call(0)  |  Derive(0)  |  Import(136)
int(x=0) -> int or long
int(x, base=10) -> int or long

Convert a number or string to an integer, or return 0 if no arguments
are given.  If x is floating point, the conversion truncates towards zero.
If x is outside the integer range, the function returns a long instead.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base.  The
literal can be preceded by '+' or '-' and be surrounded by whitespace.(more...)

src/d/j/django-debug-toolbar-mongo-HEAD/example/views.py   django-debug-toolbar-mongo(Download)
    db.test.find({'name': 'test'}).skip(1).count(with_limit_and_skip=True)
    list(db.test.find({'name': 'test'}).sort('name'))
    sort_fields = [('name', pymongo.DESCENDING), ('date', pymongo.ASCENDING)]
    list(db.test.find({'name': 'test'}).sort(sort_fields))
    list(db.test.find({

src/p/y/pymongo-mr-HEAD/examples/googlebot.py   pymongo-mr(Download)
            query['created_at']['$gt']  = self.query['created_at']['$gt'] + delta * i
            query['created_at']['$lte'] = self.query['created_at']['$gt'] + delta * (i + 1)
            queries.append((query, [("created_at", pymongo.ASCENDING)]))
        del queries[-1][0]['created_at']['$lte']
 

src/b/i/billy-1.8.0/billy/bin/commands/ensure_indexes.py   billy(Download)
    def handle(self, args):
        all_indexes = {
            'popularity_counts': [
                [('type', pymongo.ASCENDING), ('date', pymongo.ASCENDING),
                 ('obj_id', pymongo.ASCENDING)],
            ],
            'committees': [
                [('_all_ids', pymongo.ASCENDING)],
                [(settings.LEVEL_FIELD, pymongo.ASCENDING),

src/p/y/pynab-HEAD/scripts/ensure_indexes.py   pynab(Download)
 
    # categories
    db.categories.ensure_index('name', pymongo.ASCENDING)
    db.categories.ensure_index('parent_id', pymongo.ASCENDING)
 
    # regexes
    db.regexes.ensure_index([
        ('ordinal', pymongo.ASCENDING),
        ('group_name', pymongo.ASCENDING)
 
    # groups
    db.groups.ensure_index('name', pymongo.ASCENDING)
 
    # users

src/m/o/mongokit-0.9.1.1/mongokit/document.py   mongokit(Download)
                                    raise ValueError(
                                        "Error in indexes: can't find %s in structure" % value[0])
                                if not value[1] in [pymongo.DESCENDING, pymongo.ASCENDING, pymongo.OFF, pymongo.ALL,
                                                    pymongo.GEO2D, pymongo.GEOHAYSTACK, pymongo.GEOSPHERE,
                                                    pymongo.HASHED, "text"]:
                                            raise ValueError(
                                                "Error in indexes: can't find %s in structure" % field)
                                        if not direction in [pymongo.DESCENDING, pymongo.ASCENDING, pymongo.OFF,
                                                             pymongo.ALL, pymongo.GEO2D, pymongo.GEOHAYSTACK,
                                                             pymongo.GEOSPHERE, "text"]:

src/m/o/mongokit-HEAD/mongokit/document.py   mongokit(Download)
                                    raise ValueError(
                                        "Error in indexes: can't find %s in structure" % value[0])
                                if not value[1] in [pymongo.DESCENDING, pymongo.ASCENDING, pymongo.OFF, pymongo.ALL,
                                                    pymongo.GEO2D, pymongo.GEOHAYSTACK, pymongo.GEOSPHERE,
                                                    pymongo.HASHED, "text"]:
                                            raise ValueError(
                                                "Error in indexes: can't find %s in structure" % field)
                                        if not direction in [pymongo.DESCENDING, pymongo.ASCENDING, pymongo.OFF,
                                                             pymongo.ALL, pymongo.GEO2D, pymongo.GEOHAYSTACK,
                                                             pymongo.GEOSPHERE, "text"]:

src/m/o/monque-0.4.0/monque/queue.py   monque(Download)
    def init_tasks_collection(self,collection_name):
        collection = self.db[collection_name]
 
        collection.ensure_index([('name',pymongo.ASCENDING)])
        collection.ensure_index([('status',pymongo.ASCENDING),
                                 ('queue',pymongo.ASCENDING)])
        collection.ensure_index([('constraints.priority',pymongo.DESCENDING)])
        collection.ensure_index([('worker.name',pymongo.ASCENDING)])
 
        # This index ensures results expire:
        collection.ensure_index([('completed_at',pymongo.ASCENDING)],
                                expireAfterSeconds=results_ttl)
 

src/m/o/mongokit-0.9.1.1/mongokit/__init__.py   mongokit(Download)
from connection import Connection, MongoClient, MongoReplicaSetClient, ReplicaSetConnection
from master_slave_connection import MasterSlaveConnection
from pymongo import (
    ASCENDING as INDEX_ASCENDING,
    DESCENDING as INDEX_DESCENDING,

src/m/o/mongokit-HEAD/mongokit/__init__.py   mongokit(Download)
from connection import Connection, MongoClient, MongoReplicaSetClient, ReplicaSetConnection
from master_slave_connection import MasterSlaveConnection
from pymongo import (
    ASCENDING as INDEX_ASCENDING,
    DESCENDING as INDEX_DESCENDING,

src/m/o/mongokit-py3-0.9.1.1/mongokit/__init__.py   mongokit-py3(Download)
from .connection import Connection, MongoClient, MongoReplicaSetClient, ReplicaSetConnection
from .master_slave_connection import MasterSlaveConnection
from pymongo import (
    ASCENDING as INDEX_ASCENDING,
    DESCENDING as INDEX_DESCENDING,

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next