repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
peterbe/django-fancy-cache
https://github.com/peterbe/django-fancy-cache/blob/66fc6cb5d6914ef689b72950eb404f39836e8506/fancy_cache/management/__init__.py
fancy_cache/management/__init__.py
python
BSD-3-Clause
66fc6cb5d6914ef689b72950eb404f39836e8506
2026-01-05T07:09:45.763132Z
false
peterbe/django-fancy-cache
https://github.com/peterbe/django-fancy-cache/blob/66fc6cb5d6914ef689b72950eb404f39836e8506/fancy_cache/management/commands/fancy-urls.py
fancy_cache/management/commands/fancy-urls.py
from __future__ import print_function import os _this_wo_ext = os.path.basename(__file__).rsplit(".", 1)[0] __doc__ = """ If you enable `FANCY_REMEMBER_ALL_URLS` then every URL take is turned into a cache key for cache_page() to remember is recorded. You can use this to do statistics or to do invalidation by URL. To...
python
BSD-3-Clause
66fc6cb5d6914ef689b72950eb404f39836e8506
2026-01-05T07:09:45.763132Z
false
peterbe/django-fancy-cache
https://github.com/peterbe/django-fancy-cache/blob/66fc6cb5d6914ef689b72950eb404f39836e8506/fancy_cache/management/commands/__init__.py
fancy_cache/management/commands/__init__.py
python
BSD-3-Clause
66fc6cb5d6914ef689b72950eb404f39836e8506
2026-01-05T07:09:45.763132Z
false
mportesi/sorting_algo_visualizer
https://github.com/mportesi/sorting_algo_visualizer/blob/cec97d04f684e8679329407389701140fa4d83ac/sorting_algo_visualizer.py
sorting_algo_visualizer.py
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation import os import argparse ##### IMPLEMENTED ALGO ##### #BUBBLE #QUICK #HEAP #INSERTION #SELECTION #COCKTAIL #SHELL #STOOGE #COMB #ODDEVEN #TIM #DUALPIVOTQUICK #BITONIC def bubblesort(A): swaps = [] for i in range(len(A...
python
MIT
cec97d04f684e8679329407389701140fa4d83ac
2026-01-05T07:09:41.536869Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/manage.py
manage.py
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "csp.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/local_settings_default.py
local_settings_default.py
DEBUG = True COMPRESS_OFFLINE = False COMPRESS_ENABLED = False REGISTRATION_ALLOWED = True CELERY_RESULT_BACKEND = 'redis://localhost:6379' BROKER_URL = 'redis://localhost:6379' CELERY_TIMEZONE = 'America/Los_Angeles' SITE_HOST = 'https://localhost:8000' DATABASES = { "default": { "ENGINE": "django.db....
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/tasks.py
crowdsourcing/tasks.py
from __future__ import division import json from collections import OrderedDict from datetime import timedelta from decimal import Decimal, ROUND_UP import numpy as np from django.conf import settings from django.contrib.auth.models import User from django.db import connection, transaction from django.db.models impor...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/crypto.py
crowdsourcing/crypto.py
import base64 from Crypto import Random from Crypto.Cipher import AES from django.conf import settings from hashids import Hashids def to_hash(pk): id_hash = Hashids(salt=settings.SECRET_KEY, min_length=12) return id_hash.encode(pk) def to_pk(hash_string): id_hash = Hashids(salt=settings.SECRET_KEY, min...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/views.py
crowdsourcing/views.py
import base64 import hmac import urllib from urlparse import parse_qs from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponseBadRequest, HttpResponseRedirect from django.shortcuts import render from django.utils.decorators import method_decorator ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/constants.py
crowdsourcing/constants.py
TASK_ACCEPTED = 'CREATED' TASK_SUBMITTED = 'SUBMITTED' TASK_APPROVED = 'APPROVED' TASK_RETURNED = 'RETURNED' TASK_REJECTED = 'REJECTED' TASK_EXPIRED = 'EXPIRED' TASK_SKIPPED = 'SKIPPED' ACTION_GROUP_ADD = 'GROUP_ADD' ACTION_GROUP_REMOVE = 'GROUP_REMOVE' ACTION_UPDATE_PROFILE = 'UPDATE_PROFILE'
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/payment.py
crowdsourcing/payment.py
from __future__ import division import hashlib import math import time import stripe from django.conf import settings from django.utils import timezone from rest_framework import serializers from crowdsourcing.exceptions import daemo_error from crowdsourcing.models import StripeAccount, StripeCustomer, StripeTransfe...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/models.py
crowdsourcing/models.py
import json import os import pandas as pd from django.conf import settings from django.contrib.auth.models import User from django.contrib.postgres.fields import ArrayField, JSONField from django.db import models from django.utils import timezone from crowdsourcing.utils import get_delimiter, get_worker_cache class...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
true
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/emails.py
crowdsourcing/emails.py
from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string def send_mail(email_from, email_to, subject, text_content, html_content, reply_to=None): mail = EmailMultiAlternatives( subject=subject, body=text_content, ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/exceptions.py
crowdsourcing/exceptions.py
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from rest_framework import status from rest_framework.exceptions import APIException class InsufficientFunds(APIException): status_code = status.HTTP_402_PAYMENT_REQUIRED default_detail = _('Insufficient funds.') ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/redis.py
crowdsourcing/redis.py
from ws4redis.publisher import redis_connection_pool, StrictRedis class RedisProvider(object): def __init__(self, **kwargs): self._connection = StrictRedis(connection_pool=redis_connection_pool) def set(self, key, value, expire=None): return self._connection.set(name=key, value=value) de...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/utils.py
crowdsourcing/utils.py
import ast import datetime import hashlib import random import re import string from django.conf import settings from django.http import HttpResponse from django.template import Template from django.template.base import VariableNode from django.utils import timezone from django.utils.http import urlencode from oauth2_...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/discourse.py
crowdsourcing/discourse.py
# Adapted from https://github.com/tindie/pydiscourse import logging import requests from django.conf import settings from requests.exceptions import HTTPError log = logging.getLogger('pydiscourse.client') NOTIFICATION_WATCHING = 3 NOTIFICATION_TRACKING = 2 NOTIFICATION_NORMAL = 1 NOTIFICATION_MUTED = 0 class Disc...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/__init__.py
crowdsourcing/__init__.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/viewsets/file.py
crowdsourcing/viewsets/file.py
import StringIO import json import zipfile from collections import OrderedDict from django.http import HttpResponse from django.db.models import Q import pandas as pd from rest_framework import status, mixins, serializers from rest_framework.decorators import list_route from rest_framework.permissions import IsAuthenti...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/viewsets/rating.py
crowdsourcing/viewsets/rating.py
from django.db import transaction from django.db.models import Q from rest_framework import status, viewsets, serializers from rest_framework.decorators import list_route from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from crowdsourcing.models import Rating, TaskWor...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/viewsets/payment.py
crowdsourcing/viewsets/payment.py
from django.db import transaction from rest_framework import mixins from rest_framework import status from rest_framework import viewsets, serializers from rest_framework.decorators import list_route from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from crowdsourcing....
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/viewsets/task.py
crowdsourcing/viewsets/task.py
import datetime import json from decimal import Decimal, ROUND_UP import trueskill from django.conf import settings from django.db import connection from django.shortcuts import get_object_or_404 from django.utils.decorators import method_decorator from django.utils.timezone import utc from django.views.decorators.csr...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
true
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/viewsets/template.py
crowdsourcing/viewsets/template.py
from django.db import transaction from rest_framework import mixins from rest_framework import viewsets, status, serializers from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from crowdsourcing.serializers.template imp...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/viewsets/qualification.py
crowdsourcing/viewsets/qualification.py
from django.db import transaction from rest_framework import status, viewsets from rest_framework.decorators import list_route from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework import serializers from crowdsourcing import constants from crowdsourcing...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/viewsets/user.py
crowdsourcing/viewsets/user.py
from datetime import datetime from datetime import timedelta from django.conf import settings from django.contrib.auth.models import User from django.db import transaction from django.db.models import Q, Count from django.shortcuts import get_object_or_404 from django.utils import timezone from rest_framework import m...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/viewsets/message.py
crowdsourcing/viewsets/message.py
import ast import json from django.db.models import Q from django.utils import timezone from rest_framework import status, viewsets, mixins, serializers from rest_framework.decorators import list_route, detail_route from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response fro...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/viewsets/__init__.py
crowdsourcing/viewsets/__init__.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/viewsets/project.py
crowdsourcing/viewsets/project.py
import json import math from decimal import Decimal, ROUND_UP from itertools import groupby from textwrap import dedent import numpy as np from django.conf import settings from crowdsourcing.discourse import DiscourseClient from django.db import connection from django.db.models import F from django.http import HttpRes...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
true
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/file.py
crowdsourcing/serializers/file.py
from __future__ import division from rest_framework import serializers from crowdsourcing.models import BatchFile from crowdsourcing.serializers.dynamic import DynamicFieldsModelSerializer from crowdsourcing.utils import get_delimiter import pandas as pd class BatchFileSerializer(DynamicFieldsModelSerializer): si...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/rating.py
crowdsourcing/serializers/rating.py
from crowdsourcing import models from rest_framework import serializers from crowdsourcing.serializers.dynamic import DynamicFieldsModelSerializer class RatingSerializer(DynamicFieldsModelSerializer): alias = serializers.ReadOnlyField() task_count = serializers.ReadOnlyField() class Meta: model =...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/payment.py
crowdsourcing/serializers/payment.py
from rest_framework import serializers from crowdsourcing.models import FinancialAccount, StripeCharge, StripeTransfer from crowdsourcing.serializers.dynamic import DynamicFieldsModelSerializer class FinancialAccountSerializer(DynamicFieldsModelSerializer): type_detail = serializers.SerializerMethodField(read_on...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/task.py
crowdsourcing/serializers/task.py
from __future__ import division import ast from operator import itemgetter from django.db import transaction from django.db.models import Q from django.utils import timezone from rest_framework import serializers from rest_framework.exceptions import ValidationError from crowdsourcing import models from crowdsourcin...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/template.py
crowdsourcing/serializers/template.py
import copy from rest_framework import serializers from rest_framework.exceptions import ValidationError from crowdsourcing import models from crowdsourcing.serializers.dynamic import DynamicFieldsModelSerializer from crowdsourcing.utils import create_copy class TemplateItemSerializer(DynamicFieldsModelSerializer):...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/qualification.py
crowdsourcing/serializers/qualification.py
from rest_framework import serializers from crowdsourcing import constants from crowdsourcing.serializers.dynamic import DynamicFieldsModelSerializer from crowdsourcing.models import Qualification, QualificationItem, WorkerAccessControlEntry, \ RequesterAccessControlGroup from crowdsourcing.tasks import update_wor...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/dynamic.py
crowdsourcing/serializers/dynamic.py
from rest_framework import serializers class DynamicFieldsModelSerializer(serializers.ModelSerializer): """ A ModelSerializer that takes an additional `fields` argument that controls which fields should be displayed. """ def __init__(self, *args, **kwargs): # Don't pass the 'fields' arg u...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/user.py
crowdsourcing/serializers/user.py
import hashlib import random import re import uuid from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from rest_framework import status from rest_framework.exceptions import AuthenticationFailed, ValidationError from rest_framework...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/message.py
crowdsourcing/serializers/message.py
from django.contrib.auth.models import User from django.db.models import Q from django.utils import timezone from rest_framework import serializers from crowdsourcing import models from crowdsourcing.models import Conversation, Message, ConversationRecipient, MessageRecipient from crowdsourcing.redis import RedisProvi...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/utils.py
crowdsourcing/serializers/utils.py
from rest_framework import serializers from crowdsourcing import models from crowdsourcing.serializers.dynamic import DynamicFieldsModelSerializer class RegionSerializer(DynamicFieldsModelSerializer): class Meta: model = models.Region fields = '__all__' class CountrySerializer(DynamicFieldsMode...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/__init__.py
crowdsourcing/serializers/__init__.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/serializers/project.py
crowdsourcing/serializers/project.py
import copy from decimal import Decimal import numpy as np from django.db import transaction from django.db.models import Q, F from django.utils import timezone from rest_framework import serializers from rest_framework.exceptions import ValidationError from crowdsourcing import models from crowdsourcing.crypto impor...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/middleware/__init__.py
crowdsourcing/middleware/__init__.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/middleware/requirement.py
crowdsourcing/middleware/requirement.py
from django.http import JsonResponse from crowdsourcing.utils import get_worker_cache class RequirementMiddleware(): def __init__(self, get_response=None): self.get_response = get_response @staticmethod def process_view(request, view_func, view_args, view_kwargs): allowed_paths = ['/api/...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/middleware/active.py
crowdsourcing/middleware/active.py
from django.utils import timezone class CustomActiveViewMiddleware(): def process_view(self, request, callback, callback_args, callback_kwargs): if not request.user.is_anonymous() and request.path == '/': userprofile = request.user.profile userprofile.last_active = timezone.now() ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/validators/task.py
crowdsourcing/validators/task.py
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from rest_framework.exceptions import ValidationError from crowdsourcing.models import TemplateItem import re class ItemValidator(object): message = _('Value \'{value}\' is not valid.') def __init__(self): ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/validators/utils.py
crowdsourcing/validators/utils.py
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from rest_framework.exceptions import ValidationError class EqualityValidator(object): message = _('The fields {field_names} must be equal.') missing_message = _('This field is required.') def __init__(self, f...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/validators/__init__.py
crowdsourcing/validators/__init__.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/validators/project.py
crowdsourcing/validators/project.py
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from rest_framework.exceptions import ValidationError from crowdsourcing import models from crowdsourcing.exceptions import InsufficientFunds # from crowdsourcing.models import FinancialAccount class ProjectValidator(obj...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/permissions/rating.py
crowdsourcing/permissions/rating.py
from rest_framework import permissions class IsRatingOwner(permissions.BasePermission): def has_object_permission(self, request, view, obj): return obj.origin == request.user
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/permissions/util.py
crowdsourcing/permissions/util.py
from rest_framework import permissions from django.conf import settings class IsOwnerOrReadOnly(permissions.BasePermission): def has_object_permission(self, request, view, obj): if request.method in permissions.SAFE_METHODS: return True return obj.owner == request.user class IsSandbo...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/permissions/payment.py
crowdsourcing/permissions/payment.py
from rest_framework import permissions class IsOwner(permissions.BasePermission): def has_object_permission(self, request, view, obj): if obj.customer is None: return False return obj.customer.owner == request.user
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/permissions/task.py
crowdsourcing/permissions/task.py
from django.conf import settings from django.db import connection from rest_framework import permissions from rest_framework.exceptions import PermissionDenied from crowdsourcing.models import Project, WorkerAccessControlEntry from crowdsourcing.models import TaskWorker, Task class HasExceededReservedLimit(permissio...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/permissions/qualification.py
crowdsourcing/permissions/qualification.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/permissions/user.py
crowdsourcing/permissions/user.py
from rest_framework import permissions from csp import settings from rest_framework.exceptions import PermissionDenied class IsWorker(permissions.BasePermission): def has_permission(self, request, view): return request.user.profile.is_worker class IsRequester(permissions.BasePermission): def has_obj...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/permissions/__init__.py
crowdsourcing/permissions/__init__.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/permissions/project.py
crowdsourcing/permissions/project.py
from rest_framework import permissions class IsProjectOwnerOrCollaborator(permissions.BasePermission): def has_object_permission(self, request, view, obj): if obj.owner == request.user or request.user.is_superuser: return True return False class ProjectChangesAllowed(permissions.Base...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0006_auto_20170811_2356.py
crowdsourcing/migrations/0006_auto_20170811_2356.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-11 23:56 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0005_taskworkersession'), ] operations = [ migrations.AddF...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0007_auto_20170817_2207.py
crowdsourcing/migrations/0007_auto_20170817_2207.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-17 22:07 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0006_auto_20170811_2356'), ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0011_auto_20171107_2048.py
crowdsourcing/migrations/0011_auto_20171107_2048.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-11-07 20:48 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0010_merge_20171030_1751'), ] operati...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0013_auto_20171212_0049.py
crowdsourcing/migrations/0013_auto_20171212_0049.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-12-12 00:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0012_projectpreview'), ] operations = [ migrations.AlterFi...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0000_get_worker_ratings_fn.py
crowdsourcing/migrations/0000_get_worker_ratings_fn.py
# -*- coding: utf-8 -*- from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0000_get_requester_ratings_fn'), ] operations = [ migrations.RunSQL(''' CREATE OR REPLACE FUNCTION get_worker_ratings(IN worker_profile_id INTEGE...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0004_auto_20170731_2150.py
crowdsourcing/migrations/0004_auto_20170731_2150.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-31 21:50 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0003_taskworker_attempt'), ] operations = [ migrations.Alt...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0002_merge_20170726_2311.py
crowdsourcing/migrations/0002_merge_20170726_2311.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 23:11 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0001_merge_20170726_2309'), ('crowdsourcing', '0000_update_topic_id_data'),...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0001_initial.py
crowdsourcing/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 23:00 from __future__ import unicode_literals import datetime from django.conf import settings import django.contrib.postgres.fields import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
true
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0008_taskworker_auto_approved.py
crowdsourcing/migrations/0008_taskworker_auto_approved.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-10-09 17:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0007_auto_20170817_2207'), ] operations = [ migrations.Add...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0000_worker_qualifications.py
crowdsourcing/migrations/0000_worker_qualifications.py
# -*- coding: utf-8 -*- from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0001_initial'), ] operations = [ migrations.RunSQL(''' CREATE OR REPLACE FUNCTION is_worker_qualified(expressions IN JSON, worker_data IN JSON) ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0012_projectpreview.py
crowdsourcing/migrations/0012_projectpreview.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-11-16 23:00 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0009_templateitem_predecessor.py
crowdsourcing/migrations/0009_templateitem_predecessor.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-10-18 23:24 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0008_taskworker_auto_approved'), ] ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0000_get_requester_ratings_fn.py
crowdsourcing/migrations/0000_get_requester_ratings_fn.py
# -*- coding: utf-8 -*- from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0000_get_min_ratings_fn'), ] operations = [ migrations.RunSQL(''' CREATE OR REPLACE FUNCTION get_requester_ratings(IN worker_profile_id INTEGER) ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0000_get_min_ratings_fn.py
crowdsourcing/migrations/0000_get_min_ratings_fn.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-20 19:18 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0001_initial'), ] operations = [ migrations.RunSQL(''' CREAT...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0000_update_topic_id_data.py
crowdsourcing/migrations/0000_update_topic_id_data.py
from __future__ import unicode_literals from django.conf import settings from django.db import migrations from crowdsourcing.discourse import DiscourseClient from crowdsourcing.utils import get_trailing_number def update_topic_id_data(apps, schema_editor): # We can't import the Project model directly as it may ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0001_merge_20170726_2309.py
crowdsourcing/migrations/0001_merge_20170726_2309.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 23:09 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0000_worker_qualifications'), ('crowdsourcing', '0000_get_worker_ratings_fn...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0009_project_enable_boomerang.py
crowdsourcing/migrations/0009_project_enable_boomerang.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-10-26 23:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0008_taskworker_auto_approved'), ] operations = [ migratio...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0010_merge_20171030_1751.py
crowdsourcing/migrations/0010_merge_20171030_1751.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-10-30 17:51 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0009_templateitem_predecessor'), ('crowdsourcing', '0009_project_enable_boo...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/__init__.py
crowdsourcing/migrations/__init__.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0005_taskworkersession.py
crowdsourcing/migrations/0005_taskworkersession.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-02 19:58 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0004_auto_20170731_2150'), ] oper...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/0003_taskworker_attempt.py
crowdsourcing/migrations/0003_taskworker_attempt.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-28 20:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0002_merge_20170726_2311'), ] operations = [ migrations.Ad...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/oauth2_provider/0002_auto_20170725_2054.py
crowdsourcing/migrations/oauth2_provider/0002_auto_20170725_2054.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-25 20:54 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/oauth2_provider/0001_initial.py
crowdsourcing/migrations/oauth2_provider/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import oauth2_provider.validators import oauth2_provider.generators from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.A...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/migrations/oauth2_provider/__init__.py
crowdsourcing/migrations/oauth2_provider/__init__.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/backends/__init__.py
crowdsourcing/backends/__init__.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/crowdsourcing/backends/sendgrid_backend.py
crowdsourcing/backends/sendgrid_backend.py
from email.mime.base import MIMEBase from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.message import sanitize_address, EmailMultiAlternatives import sendgrid class SendGridBackend(BaseEmailBacke...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/tasks.py
mturk/tasks.py
from django.conf import settings from django.contrib.auth.models import User from django.db import connection from django.db.models import Q from pandas import * from crowdsourcing.crypto import AESUtil from crowdsourcing.models import Project, TaskWorker, Task, Rating from csp.celery import app as celery_app from csp...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/views.py
mturk/views.py
from django.shortcuts import render from django.views.decorators.clickjacking import xframe_options_exempt @xframe_options_exempt def mturk_index(request, *args, **kwargs): return render(request, 'mturk/index.html')
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/permissions.py
mturk/permissions.py
import string from rest_framework import permissions class IsValidHITAssignment(permissions.BasePermission): def has_object_permission(self, request, view, obj): if obj.task_worker.worker.username == 'mturk.' + string.lower(request.data.get('worker_id', 'INVALID')) and \ obj.assignment_id...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/models.py
mturk/models.py
from __future__ import unicode_literals from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField, ArrayField from django.db import models from crowdsourcing.models import Task, TaskWorker class Timed(models.Model): created_at = models.DateTimeField(auto_now_add=True, auto...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/viewsets.py
mturk/viewsets.py
import json from django.db import transaction from django.shortcuts import get_object_or_404 from hashids import Hashids from rest_framework import mixins, status from rest_framework.decorators import detail_route, list_route from rest_framework.response import Response from rest_framework.viewsets import GenericViewS...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/serializers.py
mturk/serializers.py
from rest_framework import serializers from rest_framework.exceptions import ValidationError from crowdsourcing.serializers.dynamic import DynamicFieldsModelSerializer from mturk.models import MTurkAccount from mturk.interface import MTurkProvider from crowdsourcing.crypto import AESUtil from csp.settings import AWS_DA...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/interface.py
mturk/interface.py
import datetime import json from decimal import Decimal from boto.mturk.connection import MTurkConnection, MTurkRequestError from boto.mturk.price import Price from boto.mturk.qualification import (NumberHitsApprovedRequirement, PercentAssignmentsApprovedRequirement, ...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/utils.py
mturk/utils.py
import string from boto.mturk.qualification import Requirement, LocaleRequirement from django.contrib.auth.hashers import make_password from django.contrib.auth.models import User from crowdsourcing.models import UserProfile, TaskWorker, Task from crowdsourcing.utils import generate_random_id, get_model_or_none def...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/__init__.py
mturk/__init__.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/tests.py
mturk/tests.py
# Create your tests here.
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/apps.py
mturk/apps.py
from django.apps import AppConfig class MturkConfig(AppConfig): name = 'mturk'
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/migrations/0001_initial.py
mturk/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 23:00 from __future__ import unicode_literals from django.conf import settings import django.contrib.postgres.fields import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/mturk/migrations/__init__.py
mturk/migrations/__init__.py
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/csp/utils.py
csp/utils.py
from django.core.exceptions import PermissionDenied from oauth2_provider.oauth2_backends import get_oauthlib_core from django.conf import settings from django.utils.functional import SimpleLazyObject from django.contrib.auth import get_user try: # django >= 1.8 && python >= 2.7 # https://docs.djangoproject.com...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/csp/websockets.py
csp/websockets.py
""" WSGI config for csp project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from ws4redis.uwsgi_runserver import uWSGIWebsocketServer os.environ.setdefault("DJANGO_S...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/csp/settings.py
csp/settings.py
""" Django settings for csp project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths insi...
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/csp/__init__.py
csp/__init__.py
from __future__ import absolute_import from .celery import app as celery_app
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/csp/celery.py
csp/celery.py
from __future__ import absolute_import import os from celery import Celery os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'csp.settings') app = Celery('csp') app.config_from_object('django.conf:settings') app.autodiscover_tasks(['crowdsourcing', 'mturk'])
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false
crowdresearch/daemo
https://github.com/crowdresearch/daemo/blob/36e3b70d4e2c06b4853e9209a4916f8301ed6464/csp/webserver.py
csp/webserver.py
""" WSGI config for csp project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from dj_static import Cling os.environ....
python
MIT
36e3b70d4e2c06b4853e9209a4916f8301ed6464
2026-01-05T07:09:36.946315Z
false