Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(10)  |  Derive(0)  |  Import(0)

src/a/d/adhawk-HEAD/adhawk/libs/db_script/management/commands/find_near_neighbors.py   adhawk(Download)
            for i in range(l):
                od,s = comp_list[i]
                m2 = Media.objects.get(id=od)
                mnn = MediaNearNeighbor(media=m,neighbor=m2,rank=i+1)
                mnn.save()

src/a/d/adhawk-HEAD/adhawk/apps/knowledge_base/views.py   adhawk(Download)
def ad_profile(request, path):
    client,version = set_client(request)
    media = Media.objects.get(slug=path)
    funder_family = media.media_profile.funder.funder_family
    try:
def top_ad_select(request,path):
    client,version = set_client(request)
    if client in ['android','ios']:
        media = Media.objects.get(slug=path)
        response_data = make_media_response_dict(media)
def near_neighbors(request,path):
    client,version = set_client(request)
    media = Media.objects.get(slug=path)
    near_neighbors = media.near_neighbors.all()
    c = RequestContext(request,{
def near_neighbor_select(request,path):
    client,version = set_client(request)
    if client in ['android','ios'] and version != "1.0":
        media = Media.objects.get(slug=path)
        response_data = make_media_response_dict(media)

src/a/d/adhawk-HEAD/adhawk/libs/db_script/management/commands/rank_top_ads.py   adhawk(Download)
        top_ten = tar.get_top(10)
        for k,v in top_ten:
            media_object = Media.objects.get(pk=k)
            ad_object = media_object.ad
            ad_object.top_ad = True

src/a/d/adhawk-HEAD/adhawk/libs/db_script/management/commands/populate_sfm.py   adhawk(Download)
            media_id = int(fn.split('_')[1])
            try:
                media_object = Media.objects.get(id=media_id)
            except Media.DoesNotExist:
                print '%s has no media object!'%(fn,)

src/a/d/adhawk-HEAD/adhawk/libs/db_script/stats_uploader.py   adhawk(Download)
    def upload(self):
        log.info("uploading stats")
        for pk,min_rmse in self.d.items():
            m = Media.objects.get(pk=pk)
            m.rmse = min_rmse

src/a/d/adhawk-HEAD/adhawk/libs/db_script/fingerprint_ingester.py   adhawk(Download)
    def get_media(self):
        return Media.objects.get(pk=self.pk)
    def get_pk(self):
        return int(self.video_fname.split('_')[1])
    def get_video_fname(self):

src/a/d/adhawk-HEAD/adhawk/apps/adhawk_api/views.py   adhawk(Download)
                result=result)
        fpquery.save()
        media = Media.objects.get(pk=result)
        response_data = make_media_response_dict(media)
        return HttpResponse(json.dumps(response_data),