Did I find the right examples for you? yes no

All Samples(138)  |  Call(0)  |  Derive(0)  |  Import(138)
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/d/d/ddd-flask-example-HEAD/blogex/service/mongo/post_repository.py   ddd-flask-example(Download)
import datetime
from pymongo import DESCENDING
 
from models import Post
from service.mongo import mongo_repository_base
    def get_for_user(self, user):
        username = get_from_obj_or_direct(user, "username")
 
        posts = self.c().find({"author" : username }).sort("post_date", DESCENDING)
        converted = (self.convert_to_model(p) for p in posts)

src/m/o/mongo-exem-HEAD/src-ora/ch04-4-django-pymongo-sample-view.py   mongo-exem(Download)
from django.shortcuts import render_to_response
from pymongo.connection import Connection
from pymongo import DESCENDING
import gridfs
 

src/p/y/pyramid_royal-HEAD/example/model/base.py   pyramid_royal(Download)
import mongokit
 
from bson.objectid import ObjectId
from pymongo import DESCENDING
 

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/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,

src/m/o/mongodb-d4-HEAD/libs/mongokit/document.py   mongodb-d4(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]:
                                    raise BadIndexError(
                                      "index direction must be INDEX_DESCENDING, INDEX_ASCENDING, INDEX_OFF, INDEX_ALL or INDEX_GEO2D. Got %s" % value[1])
                                            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]:
                                            raise BadIndexError(
                                              "index direction must be INDEX_DESCENDING, INDEX_ASCENDING, INDEX_OFF, INDEX_ALL or INDEX_GEO2D. Got %s" % direction)

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