code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
from django.db import models
from django.contrib.auth.models import User
import nltk
import textutil
import datetime
# make email addresses be 75 characters like usernames
User._meta.get_field_by_name('username')[0].max_length=75
class Receiver(models.Model):
user = models.ForeignKey(User, unique=True)
... | Python |
from django.http import HttpResponse
from django.contrib.auth import authenticate, login
from django.contrib.auth.decorators import login_required
@login_required
def logged_in(request):
return HttpResponse('<span id="success">You are logged in</span>.')
| Python |
from django.http import HttpResponse
from django.utils import simplejson
from django.contrib.auth.models import User
from models import *
from django.contrib.auth.decorators import login_required
@login_required
def recommendation_list(request):
posts = Post.objects.filter(sharedpost__sharedpostreceiver__receiver__... | Python |
from django.contrib.syndication.feeds import Feed, FeedDoesNotExist
from django.core.exceptions import ObjectDoesNotExist
from models import Sharer, SharedPost, Receiver, SharedPostReceiver
class PostFeed(Feed):
def title(self, obj):
return "FeedMe: Items Shared with %s" % obj.user.email
def l... | Python |
from django.shortcuts import render_to_response
from models import *
import codecs, sys
# set stdout to Unicode so we can write Unicode strings to stdout
# todo: create some sort of startup script which calls this
sys.stdout = codecs.getwriter('utf8')(sys.stdout)
def study(request):
return render_to_response('stu... | Python |
from django.shortcuts import render_to_response
from models import *
import codecs, sys
# set stdout to Unicode so we can write Unicode strings to stdout
# todo: create some sort of startup script which calls this
sys.stdout = codecs.getwriter('utf8')(sys.stdout)
def bar(request):
return render_to_response('bar.h... | Python |
from django import template
from django.template.defaultfilters import stringfilter
register = template.Library()
@register.filter(name='removehttp')
@stringfilter
def removehttp(value):
if value.startswith('http://'):
return value.partition('http://')[2]
elif value.startswith('https://'):
ret... | Python |
from django import template
from django.template.defaultfilters import stringfilter
from server.feedme import textutil
register = template.Library()
@register.filter(name='clean_html')
@stringfilter
def clean_html(value):
return textutil.clean_html(value)
| Python |
from models import *
import codecs, sys
from django.http import HttpResponseRedirect
from django.http import Http404
# set stdout to Unicode so we can write Unicode strings to stdout
# todo: create some sort of startup script which calls this
sys.stdout = codecs.getwriter('utf8')(sys.stdout)
def clickthrough(request,... | Python |
from models import *
import codecs, sys
from django.http import HttpResponse
from django.core import serializers
from django.contrib.auth.decorators import login_required
from django.db import transaction
# set stdout to Unicode so we can write Unicode strings to stdout
# todo: create some sort of startup script which... | Python |
from django.http import HttpResponse
from django.utils import simplejson
from django.contrib.auth.models import User
from models import *
from django.contrib.auth.decorators import login_required
from recommend import create_user_json
@login_required
def seen_it(request):
feed_objects = get_feed_objects(request.PO... | Python |
from django.shortcuts import render_to_response
from django.core.mail import EmailMultiAlternatives
from django.template import Context, loader
from django.contrib.auth.decorators import login_required
from models import *
import codecs, sys
from django.conf import settings
# set stdout to Unicode so we can write Unic... | Python |
from server.feedme.models import *
from django.contrib import admin
# user gets registered by models.py because of the ForeignKey relation
# admin.site.register(User)
admin.site.register(Sharer)
admin.site.register(Receiver)
admin.site.register(Feed)
admin.site.register(Post)
admin.site.register(SharedPost)
admin.site... | Python |
from django.http import HttpResponse
from django.core import serializers
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.core.mail import EmailMultiAlternatives
from django.utils import html
from django.template import Context, loader
from models import ... | Python |
from django.shortcuts import render_to_response
import random
from django.contrib.auth.models import User
from django.core.mail import EmailMultiAlternatives
from models import *
from django.conf import settings
def get_settings_url(request):
if not 'email' in request.POST:
return get_email_template("Enter an e... | Python |
# Create your views here.
| Python |
from django.forms import ModelForm, CheckboxSelectMultiple
from server.feedme.models import *
from django.contrib.auth.decorators import login_required
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.forms.models import modelformset_factory, inlineformset_factory
... | Python |
from django.http import HttpResponse
from django.utils import simplejson
from django.contrib.auth.models import User
from models import *
def check_logged_in_jsonp(request):
response = check_logged_in_impl(request)
response = "%s(%s);" % (request.REQUEST['callback'], response)
return HttpResponse(response, \
... | Python |
from django.http import HttpResponse
from django.utils import simplejson
from django.contrib.auth.models import User
from models import *
from django.contrib.auth.decorators import login_required
from django.db import IntegrityError
from django.db import transaction
from django.forms.fields import email_re
import math... | Python |
from django.shortcuts import render_to_response
import versionutils
def tutorial(request):
return render_to_response('tutorial_index.html')
def firefox(request):
return render_to_response('tutorial_firefox.html')
def greasemonkey(request):
return render_to_response('tutorial_greasemonkey.html')
def feedme(reques... | Python |
import nltk
from HTMLParser import HTMLParseError
def clean_html(str):
try:
return nltk.clean_html(str)
except HTMLParseError:
return ""
| Python |
#!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ... | Python |
from django.core.management import setup_environ
import settings
setup_environ(settings)
import datetime
import participant_info
from django.db import transaction
from server.feedme.models import *
@transaction.commit_manually
def create_participants():
participants = zip(participant_info.people, participant_info.gr... | Python |
from django.conf.urls.defaults import *
from feedme.feeds import *
import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
feeds = {
'posts': PostFeed,
'shares': ShareFeed
}
urlpatterns = patterns('',
# Example:
# (r'^server/', includ... | Python |
from django.core.management import setup_environ
import settings
setup_environ(settings)
import datetime
import participant_info
from django.db import transaction
from server.feedme.models import *
import traceback
@transaction.commit_manually
def switch_participants():
try:
emails = participant_info.people
... | Python |
# Django settings for server project.
import os.path
from private_settings import *
ADMINS = (
('FeedMe Team', 'feedme@lists.csail.mit.edu'),
)
MANAGERS = ADMINS
# Database info is in private_settings.py
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_t... | Python |
"""
Forms and validation code for user registration.
"""
# Necessary for our logic that says that receivers can sign up to become
# sharers
from feedme.models import Sharer
from django.contrib.auth.models import User
from django import forms
from django.utils.translation import ugettext_lazy as _
from registration.... | Python |
import datetime
import random
import re
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.db import models
from django.db import transaction
from django.template.loader import render_to_string
from django.utils.hashcompat import sha_co... | Python |
"""
Unit tests for django-registration.
These tests assume that you've completed all the prerequisites for
getting django-registration running in the default setup, to wit:
1. You have ``registration`` in your ``INSTALLED_APPS`` setting.
2. You have created all of the templates mentioned in this
application's doc... | Python |
from django.dispatch import Signal
# A new user has registered.
user_registered = Signal(providing_args=["user"])
# A user has activated his or her account.
user_activated = Signal(providing_args=["user"])
| Python |
"""
URLConf for Django user registration and authentication.
If the default behavior of the registration views is acceptable to
you, simply use a line like this in your root URLConf to set up the
default URLs for registration::
(r'^accounts/', include('registration.urls')),
This will also automatically set up th... | Python |
from django.contrib import admin
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'activation_key_expired')
search_fields = ('user__username', 'user__first_name')
admin.site.register(RegistrationProfile, RegistrationAdmin)
| Python |
"""
A management command which deletes expired accounts (e.g.,
accounts which signed up but never activated) from the database.
Calls ``RegistrationProfile.objects.delete_expired_users()``, which
contains the actual logic for determining which accounts are deleted.
"""
from django.core.management.base import NoArgsC... | Python |
"""
Views which allow users to create and activate accounts.
"""
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from registration.forms import Regist... | Python |
from urllib import urlencode
import httplib
DEFAULT_VER = "v1"
POSTRANK_URL = "api.postrank.com"
RAW = 0
PROCESSED = 1
class PostRank(object):
def __init__(self, version=DEFAULT_VER):
"""
Create a new PostRank object.
'version' version of the api to use. Maps to the api url.
... | Python |
from django.core.management import setup_environ
import settings
setup_environ(settings)
from server.feedme.models import *
from datetime import datetime, timedelta
split_delta = timedelta(seconds = 5)
def split_sharedposts():
"""Finds and splits all sharedposts with multiple receivers over a large period of time
... | Python |
from django.core.management import setup_environ
import settings
setup_environ(settings)
from server.feedme.models import *
import datetime
import sys
from copy import deepcopy
import numpy
from django.db.models import F
from datetime import datetime, timedelta
import participant_info
def summarize_user(study_particip... | Python |
from django.core.management import setup_environ
import settings
setup_environ(settings)
from server.feedme.models import *
import datetime
import sys
import numpy
from django.db.models import F
from datetime import timedelta
# We don't want to show up in statistics
admins = ['msbernst@mit.edu', 'marcua@csail.mit.edu'... | Python |
# Per reviewer's request, calculate the % of shares that were
# to someone using FeedMe
from django.core.management import setup_environ
import settings
setup_environ(settings)
from server.feedme.models import *
import datetime
import sys
import numpy
from django.db.models import F
from datetime import timedelta
from s... | Python |
from django.core.management import setup_environ
import settings
setup_environ(settings)
from django.contrib.auth.models import User
from server.feedme.models import *
from django.core.mail import EmailMultiAlternatives
from django.template import Context, loader
import sys, codecs
from django.db import transaction
fro... | Python |
from django.core.management import setup_environ
import settings
setup_environ(settings)
from server.feedme.models import *
from server.feedme.recommend import n_best_friends
from server.feedme.share import create_shared_post, send_post
from server.term_vector import update_receivers
# sharer for testing
USER_SHARER =... | Python |
from django.core.management import setup_environ
import settings
setup_environ(settings)
from server.feedme.models import *
import datetime
import sys
import numpy
import participant_info
from django.db import transaction
@transaction.commit_on_success
def close_participants(study_participants):
"""Sets now to be ... | Python |
import commands
gsl_inc = commands.getoutput('gsl-config --prefix')+"/include"
gsl_libdir = commands.getoutput('gsl-config --prefix')+"/lib"
boost_inc = '/home/ke/usr/include'
boost_libdir = '/home/ke/usr/lib'
DefaultEnvironment(CPPPATH=["#", "#lib", "#classify", "#svmstruct", "#click", "#lowrank", boost_inc, gsl_in... | Python |
#!/usr/bin/env python
import os, random
ran = random.Random()
#select n queries from query log
n = 100
line_number = int(os.popen('wc -l query_dist').read().split(' ')[0])
#print 'total number:', line_number
segment_size = line_number / n
#print 'segment size:', segment_size
def randomGet(list):
#random select a... | Python |
#!/usr/bin/env python
import os, gzip
with_clt = True
map = {}
for file in os.listdir('.'):
if file.endswith('.gz'):
print 'starts with file:', file
for line in gzip.open(file):
linebreak = line.split('\t')
if with_clt or linebreak[-1] == '\n':
query = lineb... | Python |
#!/usr/bin/env python
import os, gzip
with_clt = True
map = {}
for file in os.listdir('.'):
if file.endswith('.gz'):
print 'starts with file:', file
for line in gzip.open(file):
linebreak = line.split('\t')
if with_clt or linebreak[-1] == '\n':
query = lineb... | Python |
#!/usr/bin/env python
import os, random
ran = random.Random()
#select n queries from query log
n = 100
line_number = int(os.popen('wc -l query_dist').read().split(' ')[0])
#print 'total number:', line_number
segment_size = line_number / n
#print 'segment size:', segment_size
def randomGet(list):
#random select a... | Python |
#parse kv file, returns [ (K, V), ...]
def parseKVList(f):
lines = [x.strip() for x in open(f) if x.strip() != '']
return [x.split('\t') for x in lines]
import threading
class CommandThread(threading.Thread):
def __init__(self, commandline, outfile):
threading.Thread.__init__(self)
self.commandline = commandline... | Python |
# -*- Python -*-
# Copyright 2008 Deutsches Forschungszentrum fuer Kuenstliche Intelligenz
# or its licensors, as applicable.
#
# You may not use this file except under the terms of the accompanying license.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in co... | Python |
#!/usr/bin/python
# Copyright 2007 Deutsches Forschungszentrum fuer Kuenstliche Intelligenz
# or its licensors, as applicable.
#
# You may not use this file except under the terms of the accompanying license.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in c... | Python |
#!/usr/bin/python
import glob, os, string as s
print """# Copyright 2008 Deutsches Forschungszentrum fuer Kuenstliche Intelligenz
# or its licensors, as applicable.
#
# You may not use this file except under the terms of the accompanying license.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you... | Python |
#!/usr/bin/python
# Copyright 2008 Deutsches Forschungszentrum fuer Kuenstliche Intelligenz
# or its licensors, as applicable.
#
# You may not use this file except under the terms of the accompanying license.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in co... | Python |
#!/usr/bin/python2.5
# Copyright 2009-2010 by Ka-Ping Yee
#
# 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 ... | Python |
#!/usr/bin/env python
#
# Copyright 2008 Google Inc.
# Copyright 2010 Joe LaPenna
#
# 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
#
# Un... | Python |
# Copyright 2010 Google Inc.
#
# 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 writi... | Python |
# Copyright 2010 Google Inc.
#
# 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 writi... | Python |
"""
The MIT License
Copyright (c) 2007 Leah Culver
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publis... | Python |
#!/usr/bin/env python
# Copyright 2009 Joe LaPenna
# Copyright 2009 Google
"""
An appengine OAuthClient based on the oauth-python reference implementation.
"""
import oauth
from google.appengine.api import urlfetch
from google.appengine.ext import db
class OAuthClient(oauth.OAuthClient):
"""A worker to attemp... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
#!/usr/bin/env python
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
# Copyright 2012, Google Inc.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fol... | Python |
#!/usr/bin/env python
# This file is part of Elsim
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Elsim is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either ver... | Python |
"""
Implementation of Charikar similarity hashes in Python.
Most useful for creating 'fingerprints' of documents or metadata
so you can quickly find duplicates or cluster items.
Part of python-hashes by sangelone. See README and LICENSE.
"""
from hashtype import hashtype
class simhash(hashtype):
def create_hash... | Python |
# This file is part of Elsim
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Elsim is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, ... | Python |
# This file is part of Elsim
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Elsim is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, ... | Python |
#!/usr/bin/env python
# This file is part of Elsim.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Elsim is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either ve... | Python |
#!/usr/bin/env python
import sys
PATH_INSTALL = "./libelsign"
sys.path.append(PATH_INSTALL)
from libelsign import libelsign
#from libelsign import libelsign2 as libelsign
SIGNS = [
[ "Sign1", "a",
[ [ 4.4915299415588379, 4.9674844741821289,
4.9468302726745605, 0.0 ],... | Python |
# This file is part of Elsim.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Elsim is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License,... | Python |
#!/usr/bin/env python
# This file is part of Elsim
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Elsim is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either ver... | Python |
#!/usr/bin/env python
# This file is part of Elsim
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Elsim is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either ver... | Python |
# This file is part of Elsim
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Elsim is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, ... | Python |
#!/usr/bin/env python
# This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation,... | Python |
#!/usr/bin/env python
# This file is part of Elsim.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Elsim is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either ve... | Python |
#!/usr/bin/env python
# This file is part of Elsim.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, eith... | Python |
#!/usr/bin/env python
# This file is part of Androguard.
#
# Copyright (C) 2010, Geoffroy Gueguen <geoffroy.gueguen@gmail.com>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software ... | Python |
#!/usr/bin/env python
# This file is part of Androguard.
#
# Copyright (C) 2010, Geoffroy Gueguen <geoffroy.gueguen@gmail.com>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software ... | Python |
#!/usr/bin/env python
# This file is part of Androguard.
#
# Copyright (C) 2010, Geoffroy Gueguen <geoffroy.gueguen@gmail.com>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software ... | Python |
#!/usr/bin/env python
# This file is part of Androguard.
#
# Copyright (C) 2010, Geoffroy Gueguen <geoffroy.gueguen@gmail.com>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software ... | Python |
# This file is part of Androguard.
#
# Copyright (C) 2011, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of th... | Python |
# This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of th... | Python |
# This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of th... | Python |
# Radare !
from r2 import r_bin
from r2 import r_asm
from r2 import r_anal
from r2 import r_core
from miasm.arch.arm_arch import arm_mn
from miasm.core.bin_stream import bin_stream
from miasm.core import asmbloc
class ARM2 :
def __init__(self) :
b = r_bin.RBin ()
b.load("./apks/exploits/617efb2... | Python |
# This file is part of Androguard.
#
# Copyright (C) 2012 Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the... | Python |
# This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of th... | Python |
DVM_PERMISSIONS_BY_PERMISSION = {
"BIND_DEVICE_ADMIN" : {
"Landroid/app/admin/DeviceAdminReceiver;" : [
("C", "ACTION_DEVICE_ADMIN_ENABLED", "Ljava/lang/String;"),
],
"Landroid/app/admin/DevicePolicyManager;" : [
("F", "getRemoveWarning", "(Landroid/content/ComponentName; Landroid/os/RemoteCallback;)"),
("F", ... | Python |
# This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of th... | Python |
# This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of th... | Python |
# This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of th... | Python |
Subsets and Splits
SQL Console for ajibawa-2023/Python-Code-Large
Provides a useful breakdown of language distribution in the training data, showing which languages have the most samples and helping identify potential imbalances across different language groups.