index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
46,082
khast3x/koadic
refs/heads/master
/core/implant.py
import core.plugin class Implant(core.plugin.Plugin): def __init__(self, shell): super(Implant, self).__init__(shell) self.options.register("ZOMBIE", "ALL", "the zombie to target")
{"/modules/implant/util/upload_file.py": ["/core/implant.py"], "/modules/implant/gather/windows_key.py": ["/core/implant.py"], "/modules/stager/vbscript.py": ["/core/payload.py"], "/modules/implant/fun/voice.py": ["/core/implant.py"], "/modules/implant/pivot/exec_wmic.py": ["/core/implant.py"], "/modules/implant/inject...
46,083
khast3x/koadic
refs/heads/master
/core/extant.py
import threading import time import core.session ''' Periodically checks if sessions are alive ''' class Extant(object): def __init__(self, shell): self.shell = shell self.check_alive_timer = None self.check() def check(self): if self.check_alive_timer is not None: ...
{"/modules/implant/util/upload_file.py": ["/core/implant.py"], "/modules/implant/gather/windows_key.py": ["/core/implant.py"], "/modules/stager/vbscript.py": ["/core/payload.py"], "/modules/implant/fun/voice.py": ["/core/implant.py"], "/modules/implant/pivot/exec_wmic.py": ["/core/implant.py"], "/modules/implant/inject...
46,084
khast3x/koadic
refs/heads/master
/modules/implant/util/download_file.py
import core.job import core.implant import uuid import time import os class DownloadFileImplant(core.implant.Implant): NAME = "Download File" DESCRIPTION = "Downloads a remote file off the target system." AUTHORS = ["RiskSense, Inc."] def load(self): self.options.register("LPATH", "/tmp/", "l...
{"/modules/implant/util/upload_file.py": ["/core/implant.py"], "/modules/implant/gather/windows_key.py": ["/core/implant.py"], "/modules/stager/vbscript.py": ["/core/payload.py"], "/modules/implant/fun/voice.py": ["/core/implant.py"], "/modules/implant/pivot/exec_wmic.py": ["/core/implant.py"], "/modules/implant/inject...
46,085
khast3x/koadic
refs/heads/master
/modules/implant/gather/hashdump_dc.py
import core.implant import uuid class HashDumpDCImplant(core.implant.Implant): NAME = "Domain Hash Dump" DESCRIPTION = "Dumps the NTDS.DIT off the target domain controller." AUTHORS = ["zerosum0x0", "Aleph-Naught-"] def load(self): self.options.register("LPATH", "/tmp/", "local file save path...
{"/modules/implant/util/upload_file.py": ["/core/implant.py"], "/modules/implant/gather/windows_key.py": ["/core/implant.py"], "/modules/stager/vbscript.py": ["/core/payload.py"], "/modules/implant/fun/voice.py": ["/core/implant.py"], "/modules/implant/pivot/exec_wmic.py": ["/core/implant.py"], "/modules/implant/inject...
46,086
khast3x/koadic
refs/heads/master
/data/bin/mimishim/server.py
#!/usr/bin/env python from http.server import BaseHTTPRequestHandler, HTTPServer from emu.powerkatz32 import x32 from emu.powerkatz64 import x64 import base64 # HTTPRequestHandler class class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): # GET def do_GET(self): # Send response status code ...
{"/modules/implant/util/upload_file.py": ["/core/implant.py"], "/modules/implant/gather/windows_key.py": ["/core/implant.py"], "/modules/stager/vbscript.py": ["/core/payload.py"], "/modules/implant/fun/voice.py": ["/core/implant.py"], "/modules/implant/pivot/exec_wmic.py": ["/core/implant.py"], "/modules/implant/inject...
46,087
khast3x/koadic
refs/heads/master
/core/sounds.py
sounds = { #'ON': 'data/bin/sounds/on.mp3', 'SUCCESS': ['data/bin/sounds/wicked_sick.mp3', 'data/bin/sounds/holyshit.mp3'], #'FAIL': 'data/bin/sounds/fail.mp3', 'STAGED': 'data/bin/sounds/pwned.mp3', 'KILL': 'data/bin/sounds/killing_spree.mp3', 'STAGER': 'data/bin/sounds/firstblood.mp3' }
{"/modules/implant/util/upload_file.py": ["/core/implant.py"], "/modules/implant/gather/windows_key.py": ["/core/implant.py"], "/modules/stager/vbscript.py": ["/core/payload.py"], "/modules/implant/fun/voice.py": ["/core/implant.py"], "/modules/implant/pivot/exec_wmic.py": ["/core/implant.py"], "/modules/implant/inject...
46,088
khast3x/koadic
refs/heads/master
/modules/implant/manage/exec_cmd.py
import core.job import core.implant import uuid class ExecCmdJob(core.job.Job): def done(self): self.display() def display(self): self.shell.print_plain("Result for `%s`:" % self.options.get('CMD').replace('\\"', '"').replace("\\\\", "\\")) self.shell.print_plain(self.data) class Exec...
{"/modules/implant/util/upload_file.py": ["/core/implant.py"], "/modules/implant/gather/windows_key.py": ["/core/implant.py"], "/modules/stager/vbscript.py": ["/core/payload.py"], "/modules/implant/fun/voice.py": ["/core/implant.py"], "/modules/implant/pivot/exec_wmic.py": ["/core/implant.py"], "/modules/implant/inject...
46,089
khast3x/koadic
refs/heads/master
/modules/implant/pivot/exec_psexec.py
import core.job import core.implant import uuid import os.path class PsExecLiveJob(core.job.Job): def done(self): self.display() def display(self): pass #self.shell.print_plain("Result for `%s`:" % self.options.get('CMD')) #self.shell.print_plain(self.data) class PsExecLiveIm...
{"/modules/implant/util/upload_file.py": ["/core/implant.py"], "/modules/implant/gather/windows_key.py": ["/core/implant.py"], "/modules/stager/vbscript.py": ["/core/payload.py"], "/modules/implant/fun/voice.py": ["/core/implant.py"], "/modules/implant/pivot/exec_wmic.py": ["/core/implant.py"], "/modules/implant/inject...
46,101
akshat2412/naive-bayes-classifier-
refs/heads/master
/minor/minor/serializers.py
from rest_framework import serializers from classifier.models import Files class FileSerializer(serializers.ModelSerializer): # id = serializers.IntegerField(read_only=True) name = serializers.SerializerMethodField() category = serializers.SerializerMethodField() image_name= serializers.CharField(max_l...
{"/input_document.py": ["/code_for_classification.py"], "/minor/minor/views.py": ["/minor/minor/forms.py", "/input_document.py"], "/minor/classifier/admin.py": ["/minor/classifier/models.py"]}
46,102
akshat2412/naive-bayes-classifier-
refs/heads/master
/minor/classifier/migrations/0005_auto_20171023_1654.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('classifier', '0004_auto_20171023_1630'), ] operations = [ migrations.RenameField( model_name='files', ...
{"/input_document.py": ["/code_for_classification.py"], "/minor/minor/views.py": ["/minor/minor/forms.py", "/input_document.py"], "/minor/classifier/admin.py": ["/minor/classifier/models.py"]}
46,103
akshat2412/naive-bayes-classifier-
refs/heads/master
/minor/classifier/Thumbnail.py
from wand.image import Image from wand.display import display from wand.color import Color def createAndStoreThumbnail(**kwargs): # fileDirectory = "/home/akshat/Desktop/" # inFileName="test_doc_2.pdf" # outFileName="myOutputfile.jpg" imageFromPdf = Image(filename=kwargs["fileLocation"]+kwargs["fileName...
{"/input_document.py": ["/code_for_classification.py"], "/minor/minor/views.py": ["/minor/minor/forms.py", "/input_document.py"], "/minor/classifier/admin.py": ["/minor/classifier/models.py"]}
46,104
akshat2412/naive-bayes-classifier-
refs/heads/master
/code_for_training.py
import MySQLdb from sys import argv #take the name of the file containing the training data from command line # script,filename=argv target = open('/home/akshat/Desktop/trainset.txt','r') lines = target.readlines() class_prob = {} count_docs = {} vocab = [] i=1 print "Calculating P(class)" for line in iter(lines): ...
{"/input_document.py": ["/code_for_classification.py"], "/minor/minor/views.py": ["/minor/minor/forms.py", "/input_document.py"], "/minor/classifier/admin.py": ["/minor/classifier/models.py"]}
46,105
akshat2412/naive-bayes-classifier-
refs/heads/master
/input_document.py
from nltk import word_tokenize #punctuation not accurate from nltk.tokenize import RegexpTokenizer from nltk.stem import SnowballStemmer from nltk.stem.wordnet import WordNetLemmatizer from nltk.stem import PorterStemmer from nltk.corpus import stopwords import string from sys import argv def prelim(filename): ### I...
{"/input_document.py": ["/code_for_classification.py"], "/minor/minor/views.py": ["/minor/minor/forms.py", "/input_document.py"], "/minor/classifier/admin.py": ["/minor/classifier/models.py"]}
46,106
akshat2412/naive-bayes-classifier-
refs/heads/master
/converttoone.py
from nltk import word_tokenize #punctuation not accurate from nltk.tokenize import RegexpTokenizer from nltk.stem import SnowballStemmer from nltk.stem.wordnet import WordNetLemmatizer from nltk.corpus import stopwords import string from sys import argv import os fo=open("/home/akshat/Desktop/trainset.txt","w") ### ...
{"/input_document.py": ["/code_for_classification.py"], "/minor/minor/views.py": ["/minor/minor/forms.py", "/input_document.py"], "/minor/classifier/admin.py": ["/minor/classifier/models.py"]}
46,107
akshat2412/naive-bayes-classifier-
refs/heads/master
/minor/minor/views.py
from django.http import HttpResponse, JsonResponse from django.template import Template, Context from django.views.generic.base import TemplateView from classifier.models import * from django.shortcuts import render from Thumbnail import createAndStoreThumbnail from .forms import FileForm from django.core import serial...
{"/input_document.py": ["/code_for_classification.py"], "/minor/minor/views.py": ["/minor/minor/forms.py", "/input_document.py"], "/minor/classifier/admin.py": ["/minor/classifier/models.py"]}
46,108
akshat2412/naive-bayes-classifier-
refs/heads/master
/code_for_classification.py
from sys import argv from math import log import pymysql cursor = "" class_prob={} prob={} def global_variables(): global class_prob global prob global cursor db = pymysql.connect("localhost","root","root","naive" ) cursor = db.cursor() sql = "select * from probability_class" cursor.execute(sql) resultSet=cur...
{"/input_document.py": ["/code_for_classification.py"], "/minor/minor/views.py": ["/minor/minor/forms.py", "/input_document.py"], "/minor/classifier/admin.py": ["/minor/classifier/models.py"]}
46,109
akshat2412/naive-bayes-classifier-
refs/heads/master
/minor/classifier/admin.py
from django.contrib import admin from .models import Files, Categories # Register your models here. admin.site.register(Files) admin.site.register(Categories)
{"/input_document.py": ["/code_for_classification.py"], "/minor/minor/views.py": ["/minor/minor/forms.py", "/input_document.py"], "/minor/classifier/admin.py": ["/minor/classifier/models.py"]}
46,110
akshat2412/naive-bayes-classifier-
refs/heads/master
/minor/classifier/models.py
from django.db import models from taggit.managers import TaggableManager from Thumbnail import createAndStoreThumbnail import os # Create your models here. class Files(models.Model): name = models.CharField(max_length=50) categories = TaggableManager() file_info = models.FileField(upload_to='uploads/') ...
{"/input_document.py": ["/code_for_classification.py"], "/minor/minor/views.py": ["/minor/minor/forms.py", "/input_document.py"], "/minor/classifier/admin.py": ["/minor/classifier/models.py"]}
46,111
akshat2412/naive-bayes-classifier-
refs/heads/master
/minor/minor/forms.py
from django import forms from classifier.models import Files class FileForm(forms.ModelForm): class Meta: model=Files fields = { "file_info", }
{"/input_document.py": ["/code_for_classification.py"], "/minor/minor/views.py": ["/minor/minor/forms.py", "/input_document.py"], "/minor/classifier/admin.py": ["/minor/classifier/models.py"]}
46,113
HTXIntelligentStretcher/RPII2C
refs/heads/main
/weight_sensor.py
import i2c.i2c_reader as i2c_reader import rpi_mqtt.libmqtt as libmqtt import json import time import struct def periodicallyRead(topic, slave_addr, register): failures=0 sucess=0 while True: try: weightt = i2c_reader.read_from_rpi_to_esp32(slave_addr, register) weight = struct.unpack('>f', w...
{"/weight_sensor.py": ["/i2c/i2c_reader.py", "/rpi_mqtt/libmqtt.py"], "/power_steer.py": ["/i2c/i2c_sender.py", "/rpi_mqtt/libmqtt.py"]}
46,114
HTXIntelligentStretcher/RPII2C
refs/heads/main
/i2c/i2c_reader.py
from Adafruit_PureIO.smbus import SMBus # pip install adafruit-blinka from Raspberry_Pi_Master_for_ESP32_I2C_SLAVE.packer import Packer from Raspberry_Pi_Master_for_ESP32_I2C_SLAVE.unpacker import Unpacker import time def read_from_rpi_to_esp32(addr, register): # change 1 of SMBus(1) to bus number on your RPI pr...
{"/weight_sensor.py": ["/i2c/i2c_reader.py", "/rpi_mqtt/libmqtt.py"], "/power_steer.py": ["/i2c/i2c_sender.py", "/rpi_mqtt/libmqtt.py"]}
46,115
HTXIntelligentStretcher/RPII2C
refs/heads/main
/rpi_mqtt/libmqtt.py
import paho.mqtt.client as mqtt #import the client1 import json def initMQTT(name): json_data = json.load(open("/home/pi/RPII2C/config.json",))["mqtt_server_details"] broker_address = json_data["ip"] client = mqtt.Client(name) #create new instance client.connect(broker_address) #connect to broker return clie...
{"/weight_sensor.py": ["/i2c/i2c_reader.py", "/rpi_mqtt/libmqtt.py"], "/power_steer.py": ["/i2c/i2c_sender.py", "/rpi_mqtt/libmqtt.py"]}
46,116
HTXIntelligentStretcher/RPII2C
refs/heads/main
/test.py
a = [] def test(a): for _ in a: yield _ print(list(test(a)))
{"/weight_sensor.py": ["/i2c/i2c_reader.py", "/rpi_mqtt/libmqtt.py"], "/power_steer.py": ["/i2c/i2c_sender.py", "/rpi_mqtt/libmqtt.py"]}
46,117
HTXIntelligentStretcher/RPII2C
refs/heads/main
/power_steer.py
import i2c.i2c_sender as i2c_sender import rpi_mqtt.libmqtt as libmqtt import paho.mqtt.subscribe as subscribe import json import time def on_message(client, userdata, message): try: print("onmessage", message.payload.decode("utf-8")) mapped_cmds = list(i2c_sender.map_to_cmds(userdata, message.payload...
{"/weight_sensor.py": ["/i2c/i2c_reader.py", "/rpi_mqtt/libmqtt.py"], "/power_steer.py": ["/i2c/i2c_sender.py", "/rpi_mqtt/libmqtt.py"]}
46,118
HTXIntelligentStretcher/RPII2C
refs/heads/main
/i2c/i2c_sender.py
from time import sleep from Adafruit_PureIO.smbus import SMBus from Raspberry_Pi_Master_for_ESP32_I2C_SLAVE.unpacker import Unpacker from Raspberry_Pi_Master_for_ESP32_I2C_SLAVE.packer import Packer from adafruit_extended_bus import ExtendedI2C as I2C import math import json def sendBytes(addr, registerCode, bytess): ...
{"/weight_sensor.py": ["/i2c/i2c_reader.py", "/rpi_mqtt/libmqtt.py"], "/power_steer.py": ["/i2c/i2c_sender.py", "/rpi_mqtt/libmqtt.py"]}
46,125
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/views/league_helper.py
from league.models.transactions import Trades, TradePart,\ TradePlayer, TradePick, TradeMoney def collect_trades(year, team=None): if team is None: trade = Trades.objects.filter(year=year) else: trade = Trades.objects.filter(year=year, team=team) trades = [] for t in trade: ...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,126
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/models/__init__.py
from .players import Player, Contract, HitterCardStats,\ PitcherCardStats from .teams import Ballpark, Franchise, Team, Payroll from .transactions import Arbitration, DraftPick, Trades, TradePart,\ TradePlayer, TradePick, TradeMoney, AvailableDraftPick, AvailableFreeAgent,\ FreeAgentBid
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,127
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/models/teams.py
from django.contrib.auth import get_user_model from django.db import models User = get_user_model() class Ballpark(models.Model): id = models.CharField(primary_key=True, max_length=10) name = models.CharField(max_length=75) location = models.CharField(max_length = 50) year = models.IntegerField() ...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,128
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/strat/context_processor.py
def current_user(request): user = None if request.user.is_authenticated: user = request.user return {'user': user}
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,129
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/views/players.py
from django.shortcuts import render, get_object_or_404 from django.utils import timezone from django.views import generic, View from league.models.players import Player, HitterCardStats, PitcherCardStats from .player_helper import collect_player_position, collect_team class IndexView(generic.ListView): template_...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,130
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/views/home.py
from django.views import generic class IndexView(generic.ListView): template_name = 'league/home_page.html' def get_queryset(self): """ Gives an empty queryset to allow loading of the home page. """ return None
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,131
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/migrations/0002_auto_20171221_1517.py
# Generated by Django 2.0 on 2017-12-21 23:17 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('league', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='roster', ...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,132
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/factories/team_factories.py
import factory from factory.django import DjangoModelFactory from league.models import Team, Ballpark, Franchise class BallparkFactory(DjangoModelFactory): class Meta: model = Ballpark id = factory.Sequence(lambda n: "%003d" % n) name = factory.Sequence(lambda n: "Default Ballpark Name %003d" % ...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,133
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/migrations/0001_initial.py
# Generated by Django 2.0 on 2017-12-21 14:48 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] opera...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,134
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/views/tests/test_teams.py
from django.test import TestCase, RequestFactory from factories.team_factories import TeamFactory from league.models import Team from league.views.teams import TeamIndex class TestTeamIndex(TestCase): def setUp(self): for i in range(3): TeamFactory() def test_get(self): """ ...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,135
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/forms/teams.py
from django import forms renewable_choices = ( ('keep', 'Keep'), ('ltc', 'Long Term Contract'), ('rel', 'Release'), ) guarenteed_choices = ( ('keep', 'Keep'), ('rel', 'Release'), ) class RenewableArbitration(forms.Form): def __init__(self, *args, **kwargs): renewable = kwargs.pop('r...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,136
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/views/teams.py
from django.contrib.auth.mixins import UserPassesTestMixin from django.shortcuts import render from django.utils import timezone from django.views import View from league.forms.teams import RenewableArbitration, GuarenteedArbitration from league.models.teams import Team from league.views.team_helper import collect_tea...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,137
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/views/team_helper.py
from django.db.models import Q from league.models.players import Contract, HitterCardStats, PitcherCardStats from league.models.teams import Payroll, Team from league.models.transactions import Arbitration, DraftPick """ A possible team_dict keys and where they are generated: id, team abbreviation (str), generated in...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,138
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/views/player_helper.py
from league.models.transactions import AvailableFreeAgent, AvailableDraftPick from league.models.players import HitterCardStats, \ Contract from league.models.players import HitterCardStats, \ Contract from league.models.transactions import AvailableFreeAgent, AvailableDraftPick def collect_team(player, year)...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,139
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/views/league.py
from django.shortcuts import render, get_list_or_404 from django.utils import timezone from django.views import View from league.models.teams import Team from league.models.transactions import DraftPick, AvailableFreeAgent, AvailableDraftPick from .league_helper import collect_trades, collect_trade class LeagueDraft...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,140
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/urls.py
from django.urls import path from .views import players, teams, league app_name = 'league' urlpatterns = [ path('players/', players.IndexView.as_view(), name='player_index'), path('players/<str:player_id>/', players.PlayerDetail.as_view(), name='player_detail'), # path('players/<str:player_id>/contract', ...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,141
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/models/transactions.py
from decimal import * from django.contrib.auth import get_user_model as User from django.db import models from django.utils import timezone from .players import Player, Contract from .teams import Franchise class Arbitration(models.Model): player = models.ForeignKey(Player, on_delete=models.PROTECT) year = ...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,142
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/admin.py
from django.contrib import admin from import_export.admin import ImportExportModelAdmin from .models import Player, Franchise, Team, \ Ballpark, Payroll, Contract, Arbitration, \ DraftPick, Trades, TradePlayer, TradePick, TradeMoney, \ AvailableDraftPick, AvailableFreeAgent, FreeAgentBid, \ HitterCardS...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,143
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/testvalue.py
teams = """ <table border="1"> <tr> <th colspan="2">Team</th> <th>Owner</th> <th>Ballpark</th> <th>Division</th> </tr> <tr> <td> <img src="/static/league/2017T0000.jpg" alt="Default Team Location 000 Default Team Name 000 Logo" /> ...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,144
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/homepage/views.py
from django.shortcuts import render from django.views import View class Index(View): user = False def get(self, request): user = None if request.user.is_authenticated: user = request.user context = { 'user': user, } return render(request, 'home...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,145
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/league/models/players.py
from django.db import models class Player(models.Model): id = models.CharField(primary_key=True, max_length=20) first_name = models.CharField(max_length=40) last_name = models.CharField(max_length=40) player_type = models.CharField(max_length=2) active = models.BooleanField(default=True) bats ...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,146
Jasper-C/django-strat
refs/heads/master
/django_strat/strat/database_loading/player_qualifying_season.py
import csv import requests from bs4 import BeautifulSoup as bs def load_file(): with open('available_players.csv') as csvfile: file = csv.reader(csvfile) players = [] for row in file: players.append(row) return players def save_file(save_info): with open('players.csv...
{"/django_strat/strat/league/models/__init__.py": ["/django_strat/strat/league/models/players.py", "/django_strat/strat/league/models/teams.py", "/django_strat/strat/league/models/transactions.py"], "/django_strat/strat/league/views/players.py": ["/django_strat/strat/league/views/player_helper.py"], "/django_strat/stra...
46,152
MoHassn/fyyur
refs/heads/main
/migrations/versions/35e55bec1eca_.py
"""empty message Revision ID: 35e55bec1eca Revises: d0f6ef056fa4 Create Date: 2021-07-19 02:39:47.777843 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '35e55bec1eca' down_revision = 'd0f6ef056fa4' branch_labels = None depends_on = None def upgrade(): # ...
{"/app.py": ["/past.py", "/models.py"]}
46,153
MoHassn/fyyur
refs/heads/main
/past.py
import datetime, dateutil # I came out with this approach after tens of searches on google and stackoverflow # this answer helped me to compare the two differnt formates https://stackoverflow.com/a/41624199/11998654 def past(date_time): return dateutil.parser.parse(date_time).replace(tzinfo=datetime.timezone.utc) < ...
{"/app.py": ["/past.py", "/models.py"]}
46,154
MoHassn/fyyur
refs/heads/main
/app.py
#----------------------------------------------------------------------------# # Imports #----------------------------------------------------------------------------# import json import dateutil.parser import babel from flask import Flask, render_template, request, Response, flash, redirect, url_for from flask_moment...
{"/app.py": ["/past.py", "/models.py"]}
46,155
MoHassn/fyyur
refs/heads/main
/models.py
#----------------------------------------------------------------------------# # Models. #----------------------------------------------------------------------------# from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() # I intended to make genres many to many relationship # but I found it will result in chage...
{"/app.py": ["/past.py", "/models.py"]}
46,156
Brackie/thinkbayes
refs/heads/master
/cookie.py
from thinkbayes import Pmf pmf = Pmf("The vanilla cookie came from Jar 1") pmf.set('Jar 1', 0.5) pmf.set('Jar 2', 0.5) pmf.mult('Jar 1', 0.75) pmf.mult('Jar 2', 0.5) pmf.normalize() pmf.table()
{"/cookie.py": ["/thinkbayes.py"], "/intro.py": ["/thinkbayes.py"], "/train2.py": ["/thinkbayes.py"], "/train.py": ["/thinkbayes.py"], "/montyhall.py": ["/thinkbayes.py"], "/elvistwin.py": ["/thinkbayes.py"], "/d_n_d.py": ["/thinkbayes.py"], "/train3.py": ["/thinkbayes.py"], "/m_n_m.py": ["/thinkbayes.py"]}
46,157
Brackie/thinkbayes
refs/heads/master
/intro.py
from thinkbayes import Pmf pmf = Pmf() for i in [1, 2, 3, 4, 5, 6]: pmf.set(i, 1/6.0) pmf.table()
{"/cookie.py": ["/thinkbayes.py"], "/intro.py": ["/thinkbayes.py"], "/train2.py": ["/thinkbayes.py"], "/train.py": ["/thinkbayes.py"], "/montyhall.py": ["/thinkbayes.py"], "/elvistwin.py": ["/thinkbayes.py"], "/d_n_d.py": ["/thinkbayes.py"], "/train3.py": ["/thinkbayes.py"], "/m_n_m.py": ["/thinkbayes.py"]}
46,158
Brackie/thinkbayes
refs/heads/master
/train2.py
from thinkbayes import Suite import matplotlib.pyplot as plt class Train2(Suite): def __init__(self, hyp, hypos, alpha=1.0): Suite.__init__(self, hyp, None) self.hypos = hypos for hypo in hypos: self.set(hypo, hypo ** (-alpha)) self.normalize() def likelihood(self...
{"/cookie.py": ["/thinkbayes.py"], "/intro.py": ["/thinkbayes.py"], "/train2.py": ["/thinkbayes.py"], "/train.py": ["/thinkbayes.py"], "/montyhall.py": ["/thinkbayes.py"], "/elvistwin.py": ["/thinkbayes.py"], "/d_n_d.py": ["/thinkbayes.py"], "/train3.py": ["/thinkbayes.py"], "/m_n_m.py": ["/thinkbayes.py"]}
46,159
Brackie/thinkbayes
refs/heads/master
/thinkbayes.py
from numpy import array class Pmf: """ Class to represent a distribution of Mutually Exclusive and Collectively comprehensive variables with total probability H - Hypotheses D - Data Prior P(H) - is the initial probability of an hypotheses without seeing the data Likelihood P(D|H) - is the...
{"/cookie.py": ["/thinkbayes.py"], "/intro.py": ["/thinkbayes.py"], "/train2.py": ["/thinkbayes.py"], "/train.py": ["/thinkbayes.py"], "/montyhall.py": ["/thinkbayes.py"], "/elvistwin.py": ["/thinkbayes.py"], "/d_n_d.py": ["/thinkbayes.py"], "/train3.py": ["/thinkbayes.py"], "/m_n_m.py": ["/thinkbayes.py"]}
46,160
Brackie/thinkbayes
refs/heads/master
/train.py
from thinkbayes import Suite import matplotlib.pyplot as plt class Train(Suite): def likelihood(self, hypo, data): if hypo < data: return 0.0 return 1/hypo priors = [range(1, 501), range(1, 1001), range(1, 2001)] for color, prior in zip(["r-", "g-", "b-"], priors): print("With...
{"/cookie.py": ["/thinkbayes.py"], "/intro.py": ["/thinkbayes.py"], "/train2.py": ["/thinkbayes.py"], "/train.py": ["/thinkbayes.py"], "/montyhall.py": ["/thinkbayes.py"], "/elvistwin.py": ["/thinkbayes.py"], "/d_n_d.py": ["/thinkbayes.py"], "/train3.py": ["/thinkbayes.py"], "/m_n_m.py": ["/thinkbayes.py"]}
46,161
Brackie/thinkbayes
refs/heads/master
/montyhall.py
from thinkbayes import Pmf pmf = Pmf("After contestant chooses door A, Monty opens door B and their is no car") # Setting the priors pmf.set('Door 1', 1/3) pmf.set('Door 2', 1/3) pmf.set('Door 3', 1/3) # Finding probabilities based on the priors and likelihoods pmf.mult("Door 1", 1/2) pmf.mult('Door 2', 0) pmf.mul...
{"/cookie.py": ["/thinkbayes.py"], "/intro.py": ["/thinkbayes.py"], "/train2.py": ["/thinkbayes.py"], "/train.py": ["/thinkbayes.py"], "/montyhall.py": ["/thinkbayes.py"], "/elvistwin.py": ["/thinkbayes.py"], "/d_n_d.py": ["/thinkbayes.py"], "/train3.py": ["/thinkbayes.py"], "/m_n_m.py": ["/thinkbayes.py"]}
46,162
Brackie/thinkbayes
refs/heads/master
/elvistwin.py
from thinkbayes import Pmf pmf = Pmf("Elvis was an identical twin") # Setting priors on all pmf.set("A", 0.08) pmf.set("B", 0.92) # Finding probabilities based on the priors and likelihoods pmf.mult("A", 1) pmf.mult("B", 1/2) # Normalizing the data using Bayes theorem pmf.normalize() # Display the posteriors pmf....
{"/cookie.py": ["/thinkbayes.py"], "/intro.py": ["/thinkbayes.py"], "/train2.py": ["/thinkbayes.py"], "/train.py": ["/thinkbayes.py"], "/montyhall.py": ["/thinkbayes.py"], "/elvistwin.py": ["/thinkbayes.py"], "/d_n_d.py": ["/thinkbayes.py"], "/train3.py": ["/thinkbayes.py"], "/m_n_m.py": ["/thinkbayes.py"]}
46,163
Brackie/thinkbayes
refs/heads/master
/d_n_d.py
from thinkbayes import Suite class DND(Suite): def likelihood(self, hypo, data): if hypo < data: return 0.0 return 1/hypo hypos = [4, 6, 8, 12, 20] dnd = DND("What is the probability of picking a particular die if we roll a six", hypos) dnd.update(6) dnd.table() for roll in [7, ...
{"/cookie.py": ["/thinkbayes.py"], "/intro.py": ["/thinkbayes.py"], "/train2.py": ["/thinkbayes.py"], "/train.py": ["/thinkbayes.py"], "/montyhall.py": ["/thinkbayes.py"], "/elvistwin.py": ["/thinkbayes.py"], "/d_n_d.py": ["/thinkbayes.py"], "/train3.py": ["/thinkbayes.py"], "/m_n_m.py": ["/thinkbayes.py"]}
46,164
Brackie/thinkbayes
refs/heads/master
/train3.py
from thinkbayes import Suite import matplotlib.pyplot as plt class Train3(Suite): def __init__(self, hyp, hypos, alpha=1.0): Suite.__init__(self, hyp, None) self.hypos = hypos for hypo in hypos: self.set(hypo, 1/len(hypos)) def likelihood(self, hypo, data): if hyp...
{"/cookie.py": ["/thinkbayes.py"], "/intro.py": ["/thinkbayes.py"], "/train2.py": ["/thinkbayes.py"], "/train.py": ["/thinkbayes.py"], "/montyhall.py": ["/thinkbayes.py"], "/elvistwin.py": ["/thinkbayes.py"], "/d_n_d.py": ["/thinkbayes.py"], "/train3.py": ["/thinkbayes.py"], "/m_n_m.py": ["/thinkbayes.py"]}
46,165
Brackie/thinkbayes
refs/heads/master
/m_n_m.py
from thinkbayes import Pmf pmf = Pmf("The yellow M n M came from the 1994 bag") # A is the probability bag 1 is from 1994 and bag 2 is from 1996 # B is the probability bag 1 is from 1996 and bag 2 is from 1994 # Setting the priors pmf.set("A", 1/2) pmf.set("B", 1/2) # Our data says the probability of the yellow is...
{"/cookie.py": ["/thinkbayes.py"], "/intro.py": ["/thinkbayes.py"], "/train2.py": ["/thinkbayes.py"], "/train.py": ["/thinkbayes.py"], "/montyhall.py": ["/thinkbayes.py"], "/elvistwin.py": ["/thinkbayes.py"], "/d_n_d.py": ["/thinkbayes.py"], "/train3.py": ["/thinkbayes.py"], "/m_n_m.py": ["/thinkbayes.py"]}
46,180
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_core/test.py
import json from flake8.api.legacy import get_style_guide from rest_framework.test import APITestCase from django.conf import settings from yak.settings import yak_settings from django.test import TestCase import sys class APITestCaseWithAssertions(APITestCase): """ Taken from Tastypie's tests to improve rea...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,181
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_core/serializers.py
from django.contrib.contenttypes.models import ContentType from rest_framework import serializers class YAKModelSerializer(serializers.ModelSerializer): def __init__(self, *args, **kwargs): super(YAKModelSerializer, self).__init__(*args, **kwargs) self.fields['content_type'] = serializers.Seriali...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,182
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_auth/backends/yak_twitter.py
from django.conf import settings from django.contrib.auth import get_user_model from social_core.backends.twitter import TwitterOAuth from twython import Twython from yak.rest_social_auth.backends.base import ExtraDataAbstractMixin, ExtraActionsAbstractMixin import re User = get_user_model() class Twitter(ExtraActio...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,183
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_auth/backends/yak_instagram.py
from instagram import InstagramAPI, helper from social_core.backends.instagram import InstagramOAuth2 from yak.rest_social_auth.backends.base import ExtraDataAbstractMixin, ExtraActionsAbstractMixin class Instagram(ExtraActionsAbstractMixin, ExtraDataAbstractMixin, InstagramOAuth2): @staticmethod def save_ext...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,184
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_auth/backends/yak_soundcloud.py
import requests from social_core.backends.soundcloud import SoundcloudOAuth2 from yak.rest_social_auth.backends.base import ExtraDataAbstractMixin, ExtraActionsAbstractMixin class Soundcloud(ExtraActionsAbstractMixin, ExtraDataAbstractMixin, SoundcloudOAuth2): @staticmethod def save_extra_data(response, user)...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,185
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_notifications/migrations/0001_initial.py
# -*- coding: utf-8 -*- from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Notification', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, au...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,186
jaydenwindle/YAK-server
refs/heads/master
/test_project/settings.py
""" Django settings for test project for YAK-server For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ import os # Build paths inside the project like this: os.path.j...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,187
jaydenwindle/YAK-server
refs/heads/master
/test_project/test_app/tests/test_social.py
from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from rest_framework.reverse import reverse from test_project.test_app.models import Post from test_project.test_app.tests.factories import UserFactory, PostFactory, CommentFactory ...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,188
jaydenwindle/YAK-server
refs/heads/master
/test_project/test_app/tests/factories.py
import factory import datetime from test_project.test_app.models import Post from django.utils.timezone import now from oauth2_provider.models import AccessToken, Application from django.contrib.auth import get_user_model from yak.rest_social_network.models import Comment User = get_user_model() class UserFactory(f...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,189
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_notifications/migrations/0006_notification_deep_link.py
# Generated by Django 2.0 on 2018-03-14 16:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rest_notifications', '0005_auto_20180209_1859'), ] operations = [ migrations.AddField( model_name='notification', name...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,190
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_auth/serializers.py
from django.contrib.auth import get_user_model from rest_framework import serializers from yak.rest_user.serializers import LoginSerializer, AuthSerializerMixin User = get_user_model() class SocialSignUpSerializer(AuthSerializerMixin, LoginSerializer): fullname = serializers.CharField(read_only=True) usernam...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,191
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_auth/pipeline.py
from social_django.models import UserSocialAuth from urllib import request, error from django.core.files import File # from yak.rest_core.utils import retry_cloudfiles def social_auth_user(strategy, uid, user=None, *args, **kwargs): """ Allows user to create a new account and associate a social account, e...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,192
jaydenwindle/YAK-server
refs/heads/master
/yak/settings.py
""" Modeled after Django REST Framework settings This module provides the `api_setting` object, that is used to access YAK settings, checking for user settings first, then falling back to the defaults. """ from django.conf import settings from django.utils import six from rest_framework.settings import APISettings, i...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,193
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_auth/utils.py
from celery.task import task from django.conf import settings from social_core.backends.utils import get_backend @task def post_social_media(user_social_auth, social_obj): backend = get_backend(settings.AUTHENTICATION_BACKENDS, user_social_auth.provider) backend.post(user_social_auth, social_obj)
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,194
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_network/urls.py
from django.conf.urls import url, include from yak.rest_social_network import views from rest_framework import routers router = routers.DefaultRouter() # These views will normally be overwritten by notification-related views to account for notifications # They can still be used as-is by registering with the main pro...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,195
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_user/serializers.py
import base64 from django.contrib.auth import get_user_model from django.contrib.auth.hashers import make_password from django.core.validators import RegexValidator import oauth2_provider from rest_framework import serializers from rest_framework.validators import UniqueValidator from yak.rest_core.serializers import Y...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,196
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_notifications/migrations/0003_auto_20141220_0023.py
# -*- coding: utf-8 -*- from django.db import models, migrations def default_notification_types(apps, schema_editor): NotificationType = apps.get_model("rest_notifications", "NotificationType") NotificationType.objects.create(name="Comment", slug="comment", description="Someone commented on one of your post...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,197
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_auth/backends/base.py
import abc class ExtraDataAbstractMixin(object, metaclass=abc.ABCMeta): """ Ensure that backends define these methods. Used in pipeline to save extra data on the user model. """ @abc.abstractmethod def save_extra_data(response, user): return @abc.abstractmethod def get_profile_im...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,198
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_auth/backends/yak_facebook.py
from django.contrib.auth import get_user_model import facebook from social_core.backends.facebook import FacebookOAuth2 from yak.rest_social_auth.backends.base import ExtraDataAbstractMixin, ExtraActionsAbstractMixin from yak.settings import yak_settings User = get_user_model() class Facebook(ExtraActionsAbstractMix...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,199
jaydenwindle/YAK-server
refs/heads/master
/test_project/test_app/api/serializers.py
from django.contrib.auth import get_user_model from rest_framework import serializers from test_project.test_app.models import Post from yak.rest_core.serializers import YAKModelSerializer from yak.rest_social_network.serializers import LikedMixin, FollowedMixin from yak.rest_user.serializers import AuthSerializerMixin...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,200
jaydenwindle/YAK-server
refs/heads/master
/test_project/test_app/tests/test_notifications.py
from unittest import mock from unittest.mock import patch from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.core import mail from rest_framework.reverse import reverse from test_project import settings from test_project.test_app.models import Post, Art...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,201
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_auth/views.py
import base64 from django.conf import settings from django.contrib.auth import get_user_model from rest_framework import status, generics from rest_framework.decorators import detail_route from rest_framework.exceptions import AuthenticationFailed from rest_framework.permissions import IsAuthenticated from rest_framewo...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,202
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_notifications/serializers.py
from rest_framework import serializers from yak.rest_notifications.models import NotificationSetting, Notification, PushwooshToken, NotificationType from yak.rest_user.serializers import UserSerializer from yak.settings import yak_settings class PushwooshTokenSerializer(serializers.ModelSerializer): user = UserSe...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,203
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_auth/urls.py
from django.conf.urls import url from yak.rest_social_auth import views urlpatterns = [ url(r'^social_sign_up/$', views.SocialSignUp.as_view(), name="social_sign_up"), url(r'^social_friends/$', views.SocialFriends.as_view(), name="social_friends"), ]
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,204
jaydenwindle/YAK-server
refs/heads/master
/test_project/test_app/tests/test_user.py
import base64 from django.contrib.auth import get_user_model from django.contrib.auth.tokens import default_token_generator from django.core import mail from django.core.files.images import get_image_dimensions from rest_framework.reverse import reverse from django.utils.encoding import force_bytes from django.utils.ht...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,205
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_network/views.py
import rest_framework from rest_framework.response import Response from rest_framework import viewsets, status, generics from rest_framework.decorators import detail_route, list_route from yak.rest_core.utils import get_package_version from yak.rest_social_network.models import Tag, Comment, Follow, Flag, Share, Like f...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,206
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_network/migrations/0001_initial.py
# -*- coding: utf-8 -*- from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0001_initial'), ] operations = [ migrations.CreateModel( name='Comment', fields=[ ('id', models.AutoField(v...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,207
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_notifications/views.py
from rest_framework import mixins, generics, status from rest_framework.exceptions import AuthenticationFailed from rest_framework.response import Response from rest_framework.viewsets import GenericViewSet from pypushwoosh import client, constants from pypushwoosh.command import RegisterDeviceCommand from yak.rest_cor...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,208
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_user/urls.py
from django.conf.urls import url, include from yak.rest_user import views from rest_framework import routers router = routers.DefaultRouter() router.register(r'users', views.UserViewSet, base_name='users') urlpatterns = [ url(r'^', include(router.urls)), url(r'^sign_up/$', views.SignUp.as_view(), name="sign...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,209
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_auth/backends/yak_tumblr.py
from social_core.backends.tumblr import TumblrOAuth from yak.rest_social_auth.backends.base import ExtraDataAbstractMixin, ExtraActionsAbstractMixin class Tumblr(ExtraActionsAbstractMixin, ExtraDataAbstractMixin, TumblrOAuth): @staticmethod def save_extra_data(response, user): return @staticmetho...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,210
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_user/utils.py
from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.tokens import default_token_generator from django.contrib.sites.shortcuts import get_current_site from django.template import loader from django.utils.encoding import force_bytes from django.utils.http import urlsaf...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,211
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_user/views.py
import base64 from django.contrib.auth import get_user_model, authenticate from django.contrib.auth.tokens import default_token_generator from django.utils.http import urlsafe_base64_decode from rest_framework import viewsets, generics, status, views from rest_framework.authentication import BasicAuthentication from re...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,212
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_user/models.py
from django.core import validators from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, UserManager class AbstractYeti(AbstractBaseUser, PermissionsMixin): username = models...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,213
jaydenwindle/YAK-server
refs/heads/master
/test_project/test_app/tests/test_permissions.py
from rest_framework.reverse import reverse from test_project.test_app.models import Post from test_project.test_app.tests.factories import UserFactory from yak.rest_core.test import SchemaTestCase class PermissionsTests(SchemaTestCase): def test_only_authed_user_can_create_post(self): """ For defa...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,214
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_social_network/utils.py
from django.core.exceptions import ImproperlyConfigured from django.apps import apps from django.conf import settings def get_social_model(): """ Returns the social model that is active in this project. """ try: return apps.get_model(settings.SOCIAL_MODEL) except ValueError: raise ...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,215
jaydenwindle/YAK-server
refs/heads/master
/test_project/test_app/api/views.py
from rest_framework import viewsets from test_project.test_app.models import Post, Article from yak.rest_social_auth.views import SocialShareMixin from yak.rest_social_network.views import SocialUserViewSet from test_project.test_app.api.serializers import ProjectUserSerializer, PostSerializer, ArticleSerializer clas...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,216
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_core/permissions.py
from rest_framework import permissions from django.contrib.auth import get_user_model User = get_user_model() class IsOwner(permissions.IsAuthenticated): """ Only the object's owner can view or edit Assumes the model instance has a `user` attribute. """ def has_object_permission(self, request, v...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,217
jaydenwindle/YAK-server
refs/heads/master
/test_project/test_app/models.py
from django.contrib.contenttypes.fields import GenericRelation from django.contrib.sites.models import Site from django.db import models from django.db.models.signals import post_save from django.utils.baseconv import base62 from yak.rest_core.models import resize_model_photos, CoreModel from yak.rest_notifications.mod...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...
46,218
jaydenwindle/YAK-server
refs/heads/master
/yak/rest_notifications/migrations/0005_auto_20180209_1859.py
# Generated by Django 2.0 on 2018-02-09 18:59 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('rest_notifications', '0004_notification_template_override'), ] operations = [ migrations.AlterModelOptions( name='notificationsetting', ...
{"/yak/rest_core/test.py": ["/yak/settings.py"], "/yak/rest_social_auth/backends/yak_twitter.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_instagram.py": ["/yak/rest_social_auth/backends/base.py"], "/yak/rest_social_auth/backends/yak_soundcloud.py": ["/yak/rest_social_auth/backend...