index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
14,980 | roypel/BaMMI | refs/heads/master | /BaMMI/saver/__main__.py | import sys
import click
from .Saver import Saver
from ..utils.Constants import mongodb_url
from ..utils.CLITemplate import log, main
@main.command()
@click.option('-d', '--database', default=mongodb_url, type=str)
@click.argument('topic-name', type=str)
@click.argument('raw-data-path', type=click.Path(exists=True))
d... | {"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py... |
14,981 | roypel/BaMMI | refs/heads/master | /BaMMI/utils/drivers/db_drivers/MongoDriver.py | from pymongo import MongoClient, ASCENDING, UpdateOne
class MongoDriver:
def __init__(self, url, db_name="bammi_data", table_name="users_and_snapshots"):
self.client = MongoClient(url)
self.db = self.client[db_name]
self.table_name = self.db[table_name]
def insert_single_data_unit(se... | {"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py... |
14,982 | roypel/BaMMI | refs/heads/master | /BaMMI/server/Server.py | from ..utils.APIServer import FlaskWrapper
from ..server.Receiver import Receiver, publish_to_message_queue
def run_server(host='127.0.0.1', port=8000, publish=publish_to_message_queue):
url_prefix = '/uploads'
app = FlaskWrapper('server')
receiver = Receiver(publish)
app.add_endpoint(f'{url_prefix}/c... | {"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py... |
14,983 | roypel/BaMMI | refs/heads/master | /BaMMI/server/Receiver.py | import json
from flask import jsonify, request
from google.protobuf.json_format import MessageToDict
import numpy as np
from ..utils import UtilFunctions
from ..utils.BaMMI_pb2 import Snapshot, User
from ..utils.Constants import rabbit_mq_url
from ..utils.PubSuber import PubSuber
def publish_to_message_queue(user_dat... | {"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py... |
14,984 | roypel/BaMMI | refs/heads/master | /BaMMI/client/ProtoDriver.py | import gzip
import struct
from ..utils.BaMMI_pb2 import User, Snapshot
class ProtoDriver:
def __init__(self, file_path):
self.f = gzip.open(file_path, 'rb')
self.user = None
def close(self):
if self.f:
self.f.close()
self.f = None
def get_user_data(self):
... | {"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py... |
14,985 | roypel/BaMMI | refs/heads/master | /setup.py | from setuptools import setup, find_packages
setup(
name='BaMMI',
version='0.1.9',
author='Roy Peleg',
description='Basic Mind-Machine Interface.',
packages=find_packages(where='BaMMI'),
package_dir={"": "BaMMI"},
install_requires=[
'Click==7.0',
'codecov==2.0.16',
'... | {"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py... |
14,986 | roypel/BaMMI | refs/heads/master | /BaMMI/utils/Constants.py |
storage_folder = 'BaMMI/storage'
mongodb_url = "mongodb://BaMMI:1337@mongo:27017"
rabbit_mq_url = 'rabbitmq://rabbitmq:5672/'
| {"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py... |
14,987 | roypel/BaMMI | refs/heads/master | /BaMMI/client/__main__.py | import sys
import click
from .client import upload_sample as upload
from ..utils.CLITemplate import log, main
@main.command()
@click.option('-h', '--host', default='127.0.0.1', type=str)
@click.option('-p', '--port', default=8000, type=int)
@click.argument('path', default='snapshot.mind.gz', type=click.Path(exists=Tr... | {"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py... |
14,988 | roypel/BaMMI | refs/heads/master | /BaMMI/parsers/__main__.py | import sys
import click
from . import ParserHandler
from ..utils.CLITemplate import log, main
parser_handler = ParserHandler.ParserHandler()
@main.command()
@click.argument('parser_name', type=str)
@click.argument('raw_data_path', type=click.Path(exists=True))
def parse(parser_name, raw_data_path):
log(parser_h... | {"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py... |
14,992 | EduardaMarques/AgendaContatoApp | refs/heads/master | /model/Agenda.py | from model.Contato import Contato
class Agenda ():
def __init__(self, propietario):
self.propietario = propietario
self.contatos = []
def contarContatos(self):
return len(self.contatos)
def incluirContato(self,contato):
self.contatos.append(contato)
def... | {"/model/Agenda.py": ["/model/Contato.py"], "/App.py": ["/model/Agenda.py", "/model/Contato.py"]} |
14,993 | EduardaMarques/AgendaContatoApp | refs/heads/master | /AGENDA/ClassPessoa.py | Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> class Pessoa():
def __init__(self, nome, nascimento, email):
self.nome = nome
self.nascimento = nascimento
self.email = email
| {"/model/Agenda.py": ["/model/Contato.py"], "/App.py": ["/model/Agenda.py", "/model/Contato.py"]} |
14,994 | EduardaMarques/AgendaContatoApp | refs/heads/master | /App.py | # encoding: utf-8
from model.Agenda import Agenda
from model.Contato import Contato
from model.Pessoa import Pessoa
from model.Telefone import Telefone
import json
import datetime
from datetime import date
def CriarAgenda():
while(True):
try:
print(">---Criar Nova Agenda---<")
... | {"/model/Agenda.py": ["/model/Contato.py"], "/App.py": ["/model/Agenda.py", "/model/Contato.py"]} |
14,995 | EduardaMarques/AgendaContatoApp | refs/heads/master | /model/Contato.py |
class Contato():
def __init__(self, pessoa, telefones = []):
self.criacao = str(datetime.date.today())
self.pessoa = pessoa
self.telefone = telefones
def listarTelefones(self):
return self.telefones
| {"/model/Agenda.py": ["/model/Contato.py"], "/App.py": ["/model/Agenda.py", "/model/Contato.py"]} |
15,010 | kuzmich/blogosphere | refs/heads/master | /blog/views.py | from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from .models import Post
@login_required
def personal_feed(request):
user = request.user
posts = Post.objects.filter(blog__in=user.subscriptions.all()).exclude(read_by=user).order_by('-created')
return render(re... | {"/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/blog/tests.py": ["/blog/models.py"]} |
15,011 | kuzmich/blogosphere | refs/heads/master | /blog/models.py | # -*- coding: utf-8 -*-
from django.db import models
from django.db.models.signals import m2m_changed, post_save
from django.dispatch import receiver
class Blog(models.Model):
user = models.ForeignKey('auth.User', verbose_name='пользователь')
name = models.CharField('название', max_length=150)
subscribers... | {"/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/blog/tests.py": ["/blog/models.py"]} |
15,012 | kuzmich/blogosphere | refs/heads/master | /blog/admin.py | from django.contrib import admin
from .models import *
class BlogAdmin(admin.ModelAdmin):
list_display = ['name', 'user']
class PostAdmin(admin.ModelAdmin):
list_display = ['blog', 'title', 'text', 'created']
list_filter = ['blog__user']
admin.site.register(Blog, BlogAdmin)
admin.site.register(Post, Po... | {"/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/blog/tests.py": ["/blog/models.py"]} |
15,013 | kuzmich/blogosphere | refs/heads/master | /blog/tests.py | # -*- coding: utf-8 -*-
from django.test import TestCase
from .models import *
class BlogTestCase(TestCase):
def setUp(self):
from django.contrib.auth.models import User
self.john = User.objects.create(username='john', email='john@lennon.com')
self.george = User.objects.create(username='g... | {"/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/blog/tests.py": ["/blog/models.py"]} |
15,024 | ezik/git_hub_api_tests | refs/heads/master | /config.py | class Config:
def __init__(self):
self.url = {
"base": "https://api.github.com/repos",
"ursus_repo": "/ursusrepublic/django_test",
"ezik_repo": "/ezik/selenium_python_training"
}
self.auth = {
"username": "username",
"passwo... | {"/conftest.py": ["/config.py"]} |
15,025 | ezik/git_hub_api_tests | refs/heads/master | /test_create_pull_request.py | import requests
from requests.auth import HTTPBasicAuth
import random
import re
def test_create_pull_req(app_config):
"""This test is intended to create pull request. As precondition user has to:
- Prepare branch basing on existing branches in repo
- Prepare commit in new branch
- Create pull request ... | {"/conftest.py": ["/config.py"]} |
15,026 | ezik/git_hub_api_tests | refs/heads/master | /conftest.py | from pytest import fixture
from config import Config
@fixture(scope='session', autouse=True)
def app_config():
config = Config()
return config
| {"/conftest.py": ["/config.py"]} |
15,027 | ezik/git_hub_api_tests | refs/heads/master | /test_get_requests.py | import requests
def test_get_open_pull_reqs(app_config):
base_url = app_config.url["base"]
repo = app_config.url["ursus_repo"]
r = requests.get(base_url + repo + "/pulls?state=open")
assert len(r.json()) == 2
assert r.json()[0]["url"] == base_url + repo + "/pulls/5"
assert r.json()[0]["state... | {"/conftest.py": ["/config.py"]} |
15,028 | ezik/git_hub_api_tests | refs/heads/master | /test_create_an_issue.py | import requests
from requests.auth import HTTPBasicAuth
def test_create_new_issue(app_config):
base_url = app_config.url["base"]
repo = app_config.url["ursus_repo"]
username = app_config.auth["username"]
password = app_config.auth["password"]
r = requests.post(base_url + repo + "/issues",
... | {"/conftest.py": ["/config.py"]} |
15,256 | TrinaDutta95/BotResponse_sentiment | refs/heads/master | /setting.py | import nltk
nltk.download()
#nltk.download('nps_chat')
#posts = nltk.corpus.nps_chat.xml_posts()[:10000]
| {"/web_flask.py": ["/bot_response.py"]} |
15,257 | TrinaDutta95/BotResponse_sentiment | refs/heads/master | /web_flask.py | import bot_response as br
from flask import Flask, request
from flask import jsonify
app = Flask(__name__)
@app.route("/", methods=["GET"])
def generate_response():
text = request.args.get("user_res")
print(text)
bot_res = br.sentence_processing(text)
return jsonify(additional_line=bot_res)
if __na... | {"/web_flask.py": ["/bot_response.py"]} |
15,258 | TrinaDutta95/BotResponse_sentiment | refs/heads/master | /bot_response.py | import string
from collections import Counter
import nltk
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
from nltk.sentiment.vader import SentimentIntensityAnalyzer
import random
# import matplotlib.pyplot as plt
# reading text from a file and converting them to lower case with removal of ... | {"/web_flask.py": ["/bot_response.py"]} |
15,273 | grubberr/dog_and_cats | refs/heads/master | /utils.py |
import sys
import datetime
from models import date_format
def get_birthday_or_exit(birthday):
try:
return datetime.datetime.strptime(birthday, date_format)
except ValueError:
print("incorrect birthday: %s" % birthday)
sys.exit(1)
| {"/utils.py": ["/models.py"], "/users.py": ["/models.py", "/utils.py"], "/pets.py": ["/models.py", "/utils.py"]} |
15,274 | grubberr/dog_and_cats | refs/heads/master | /users.py | #!/Users/ant/dog_and_cats/env/bin/python3
import sys
import argparse
import datetime
from mongoengine.errors import ValidationError
from models import User, date_format, Pet, Cat, Dog
from utils import get_birthday_or_exit
def main(args):
if args.subparser == 'add':
birthday = get_birthday_or_exit(args.... | {"/utils.py": ["/models.py"], "/users.py": ["/models.py", "/utils.py"], "/pets.py": ["/models.py", "/utils.py"]} |
15,275 | grubberr/dog_and_cats | refs/heads/master | /pets.py | #!/Users/ant/dog_and_cats/env/bin/python3
import sys
import argparse
import datetime
from mongoengine.errors import ValidationError
from models import User, Pet, Dog, Cat, date_format
from utils import get_birthday_or_exit
def main(args):
if args.subparser == 'add':
birthday = get_birthday_or_exit(args.... | {"/utils.py": ["/models.py"], "/users.py": ["/models.py", "/utils.py"], "/pets.py": ["/models.py", "/utils.py"]} |
15,276 | grubberr/dog_and_cats | refs/heads/master | /models.py | #!/Users/ant/dog_and_cats/env/bin/python3
from mongoengine import *
connect('mydb')
date_format = '%m/%d/%Y'
class User(Document):
first_name = StringField(required=True)
last_name = StringField(required=True)
birthday = DateTimeField(required=True)
def __str__(self):
return "pk = %s, first_... | {"/utils.py": ["/models.py"], "/users.py": ["/models.py", "/utils.py"], "/pets.py": ["/models.py", "/utils.py"]} |
15,281 | StackSentinel/stacksentinel-python | refs/heads/master | /tests/test_client.py | """
Tests for Stack Sentinel client.
"""
import json
from StackSentinel import StackSentinelMiddleware, StackSentinelClient, StackSentinelError
import unittest
import sys
class TestStackSentinel(unittest.TestCase):
def setUp(self):
pass
def test_serialize_object(self):
class RegularClass(obje... | {"/tests/test_client.py": ["/StackSentinel/__init__.py"]} |
15,282 | StackSentinel/stacksentinel-python | refs/heads/master | /StackSentinel/__init__.py | """
StackSentinel Python Client
===========================
Use this client to integrate StackSentinel (www.stacksentinel.com) into your Python projects. You can also use
platform-specific StackSentinel clients, such as the stacksentinel-flask client:
>>> import StackSentinel
>>> stack_sentinel_client = StackSentinel.... | {"/tests/test_client.py": ["/StackSentinel/__init__.py"]} |
15,283 | StackSentinel/stacksentinel-python | refs/heads/master | /setup.py | from setuptools import setup, find_packages
version = '1.2'
url = 'https://github.com/StackSentinel/stacksentinel-python'
setup(
name='stacksentinel',
description='Stack Sentinel client and WSGI middleware',
keywords='stack sentinel stacksentinel exception tracking api',
version=version,
author="J... | {"/tests/test_client.py": ["/StackSentinel/__init__.py"]} |
15,286 | andreyhitoshi1997/AC-Desenvolvimento-Sistemas | refs/heads/master | /resources/vendedor.py | from flask.helpers import make_response
from flask_restful import Resource, reqparse
from flask import render_template,request
from models.vendedor import VendedorModel
from werkzeug.security import safe_str_cmp
import traceback
import os
atributos = reqparse.RequestParser()
atributos.add_argument('nome_vendedor', typ... | {"/resources/vendedor.py": ["/models/vendedor.py"], "/resources/produtos.py": ["/models/produtos.py"], "/resources/entregador.py": ["/models/entregador.py"], "/app.py": ["/models/entregador.py", "/models/vendedor.py", "/models/usuario.py", "/resources/vendedor.py", "/resources/usuario.py", "/resources/entregador.py", "... |
15,287 | andreyhitoshi1997/AC-Desenvolvimento-Sistemas | refs/heads/master | /resources/produtos.py | from flask_restful import Resource, reqparse
from flask import render_template,request
from models.produtos import ProdutosModel
from flask.helpers import make_response
from werkzeug.security import safe_str_cmp
import random
import sqlite3
import os
# import traceback
atributos = reqparse.RequestParser()
atributos.a... | {"/resources/vendedor.py": ["/models/vendedor.py"], "/resources/produtos.py": ["/models/produtos.py"], "/resources/entregador.py": ["/models/entregador.py"], "/app.py": ["/models/entregador.py", "/models/vendedor.py", "/models/usuario.py", "/resources/vendedor.py", "/resources/usuario.py", "/resources/entregador.py", "... |
15,288 | andreyhitoshi1997/AC-Desenvolvimento-Sistemas | refs/heads/master | /resources/entregador.py | from flask_restful import Resource, reqparse
from flask import render_template
from models.entregador import EntregadorModel
from flask.helpers import make_response
from werkzeug.security import safe_str_cmp
import traceback
atributos = reqparse.RequestParser()
atributos.add_argument('nome_entregador', type=str, requ... | {"/resources/vendedor.py": ["/models/vendedor.py"], "/resources/produtos.py": ["/models/produtos.py"], "/resources/entregador.py": ["/models/entregador.py"], "/app.py": ["/models/entregador.py", "/models/vendedor.py", "/models/usuario.py", "/resources/vendedor.py", "/resources/usuario.py", "/resources/entregador.py", "... |
15,289 | andreyhitoshi1997/AC-Desenvolvimento-Sistemas | refs/heads/master | /models/usuario.py | from operator import imod
from flask.helpers import url_for
from sql_alchemy import banco
from flask import request
from requests import post
import mailgun
domain = mailgun.MAILGUN_DOMAIN
api_key = mailgun.MAILGUN_API_KEY
from_title = mailgun.FROM_TITLE
from_email = mailgun.FROM_EMAIL
class UsuarioModel(banco.Model... | {"/resources/vendedor.py": ["/models/vendedor.py"], "/resources/produtos.py": ["/models/produtos.py"], "/resources/entregador.py": ["/models/entregador.py"], "/app.py": ["/models/entregador.py", "/models/vendedor.py", "/models/usuario.py", "/resources/vendedor.py", "/resources/usuario.py", "/resources/entregador.py", "... |
15,290 | andreyhitoshi1997/AC-Desenvolvimento-Sistemas | refs/heads/master | /models/vendedor.py | from sql_alchemy import banco
from flask import url_for
from flask import request
from requests import post
import mailgun
domain = mailgun.MAILGUN_DOMAIN
site_key = mailgun.MAILGUN_API_KEY
from_title = mailgun.FROM_TITLE
from_email = mailgun.FROM_EMAIL
class VendedorModel(banco.Model):
__tablename__ = 'vendedor... | {"/resources/vendedor.py": ["/models/vendedor.py"], "/resources/produtos.py": ["/models/produtos.py"], "/resources/entregador.py": ["/models/entregador.py"], "/app.py": ["/models/entregador.py", "/models/vendedor.py", "/models/usuario.py", "/resources/vendedor.py", "/resources/usuario.py", "/resources/entregador.py", "... |
15,291 | andreyhitoshi1997/AC-Desenvolvimento-Sistemas | refs/heads/master | /app.py | from werkzeug.exceptions import PreconditionRequired
from models.entregador import EntregadorModel
from models.vendedor import VendedorModel
from flask import Flask, render_template, request, flash, redirect, url_for, send_from_directory
from flask_restful import Api
from models.usuario import UsuarioModel
from resourc... | {"/resources/vendedor.py": ["/models/vendedor.py"], "/resources/produtos.py": ["/models/produtos.py"], "/resources/entregador.py": ["/models/entregador.py"], "/app.py": ["/models/entregador.py", "/models/vendedor.py", "/models/usuario.py", "/resources/vendedor.py", "/resources/usuario.py", "/resources/entregador.py", "... |
15,292 | andreyhitoshi1997/AC-Desenvolvimento-Sistemas | refs/heads/master | /models/produtos.py | from sql_alchemy import banco
import random
class ProdutosModel(banco.Model):
__tablename__ = 'produto'
id_produto = banco.Column(banco.Integer, primary_key=True)
nome_produto = banco.Column(banco.String(50), nullable=False)
codigo_produto = banco.Column(banco.String(8), unique=True, nullable=False)
... | {"/resources/vendedor.py": ["/models/vendedor.py"], "/resources/produtos.py": ["/models/produtos.py"], "/resources/entregador.py": ["/models/entregador.py"], "/app.py": ["/models/entregador.py", "/models/vendedor.py", "/models/usuario.py", "/resources/vendedor.py", "/resources/usuario.py", "/resources/entregador.py", "... |
15,293 | andreyhitoshi1997/AC-Desenvolvimento-Sistemas | refs/heads/master | /models/entregador.py | from sql_alchemy import banco
from flask import request
from requests import post
from flask.helpers import url_for
import mailgun
domain = mailgun.MAILGUN_DOMAIN
api_key = mailgun.MAILGUN_API_KEY
title = mailgun.FROM_TITLE
email = mailgun.FROM_EMAIL
class EntregadorModel(banco.Model):
__tablename__ = 'entregado... | {"/resources/vendedor.py": ["/models/vendedor.py"], "/resources/produtos.py": ["/models/produtos.py"], "/resources/entregador.py": ["/models/entregador.py"], "/app.py": ["/models/entregador.py", "/models/vendedor.py", "/models/usuario.py", "/resources/vendedor.py", "/resources/usuario.py", "/resources/entregador.py", "... |
15,294 | andreyhitoshi1997/AC-Desenvolvimento-Sistemas | refs/heads/master | /resources/usuario.py | from flask_restful import Resource, reqparse
from flask import render_template
from models.usuario import UsuarioModel
from flask.helpers import make_response
from werkzeug.security import safe_str_cmp
import traceback
atributos = reqparse.RequestParser()
atributos.add_argument('nome_usuario', type=str, required=True... | {"/resources/vendedor.py": ["/models/vendedor.py"], "/resources/produtos.py": ["/models/produtos.py"], "/resources/entregador.py": ["/models/entregador.py"], "/app.py": ["/models/entregador.py", "/models/vendedor.py", "/models/usuario.py", "/resources/vendedor.py", "/resources/usuario.py", "/resources/entregador.py", "... |
15,295 | jeanson-JinSheng/Pytorch-ENet-Nice | refs/heads/master | /train.py | import torch
import torch.nn as nn
from utils import *
from models.ENet import ENet
from models.ENet_encoder import ENet_encoder
import sys
from tqdm import tqdm
def train(FLAGS):
# Defining the hyperparameters
device = FLAGS.cuda
batch_size = FLAGS.batch_size
epochs = FLAGS.epochs
lr = FLAGS.lea... | {"/train.py": ["/utils.py"], "/init.py": ["/train.py"]} |
15,296 | jeanson-JinSheng/Pytorch-ENet-Nice | refs/heads/master | /datasets/Cityscapes/makepairs.py | import os
import sys
import cv2
import numpy as np
def makepairs():
train = open("train_cityscapes.txt", 'w')
val = open("val_cityscapes.txt", 'w')
dataname = ["train/", "val/"]
for i in range(2):
imagedirs = os.listdir("leftImg8bit/" + dataname[i])
dir_num = len(imagedirs)
for j in... | {"/train.py": ["/utils.py"], "/init.py": ["/train.py"]} |
15,297 | jeanson-JinSheng/Pytorch-ENet-Nice | refs/heads/master | /utils.py | import numpy as np
import cv2
import matplotlib.pyplot as plt
import sys
import os
from PIL import Image
import torch
def create_class_mask(img, color_map, is_normalized_img=True, is_normalized_map=False, show_masks=False):
"""
Function to create C matrices from the segmented image, where each of the C matrice... | {"/train.py": ["/utils.py"], "/init.py": ["/train.py"]} |
15,298 | jeanson-JinSheng/Pytorch-ENet-Nice | refs/heads/master | /init.py | import numpy as np
import argparse
from train import *
from test import *
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-m',
type=str,
default='./datasets/CamVid/ckpt-camvid-enet.pth',
help='The path t... | {"/train.py": ["/utils.py"], "/init.py": ["/train.py"]} |
15,299 | jaspringer/pymzlib | refs/heads/master | /filters.py | """
Filter.py
Author: Thomas McGrew
License:
MIT license.
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... | {"/mzconvert.py": ["/mzlib.py"], "/mzplot.py": ["/mzlib.py", "/filters.py"], "/test.py": ["/mzlib.py"]} |
15,300 | jaspringer/pymzlib | refs/heads/master | /mzconvert.py | #!/usr/bin/env python
"""
Copyright: 2010 Thomas McGrew
License: X11 license.
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 u... | {"/mzconvert.py": ["/mzlib.py"], "/mzplot.py": ["/mzlib.py", "/filters.py"], "/test.py": ["/mzlib.py"]} |
15,301 | jaspringer/pymzlib | refs/heads/master | /mzlib.py | """
Copyright: 2010 Thomas McGrew
License: MIT license.
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, mer... | {"/mzconvert.py": ["/mzlib.py"], "/mzplot.py": ["/mzlib.py", "/filters.py"], "/test.py": ["/mzlib.py"]} |
15,302 | jaspringer/pymzlib | refs/heads/master | /mzplot_cgi.py | #!/usr/bin/env python
"""
Copyright: 2010 Thomas McGrew
License: MIT license.
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... | {"/mzconvert.py": ["/mzlib.py"], "/mzplot.py": ["/mzlib.py", "/filters.py"], "/test.py": ["/mzlib.py"]} |
15,303 | jaspringer/pymzlib | refs/heads/master | /mzplot.py | #!/usr/bin/env python
"""
Copyright: 2010 Thomas McGrew
License: MIT license.
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 ... | {"/mzconvert.py": ["/mzlib.py"], "/mzplot.py": ["/mzlib.py", "/filters.py"], "/test.py": ["/mzlib.py"]} |
15,304 | jaspringer/pymzlib | refs/heads/master | /test.py | #!/usr/bin/env python2
from mzlib import *
mzXML2 = RawData( "testData/tiny1.mzXML2.0.mzXML" )
mzXML3 = RawData( "testData/tiny1.mzXML3.0.mzXML" )
mzData = RawData( "testData/tiny1.mzData1.05.xml" )
json = RawData( "testData/tiny1.json" )
jsonGz = RawData( "testData/tiny1.json.gz" )
if __name__ == "__main__":
pri... | {"/mzconvert.py": ["/mzlib.py"], "/mzplot.py": ["/mzlib.py", "/filters.py"], "/test.py": ["/mzlib.py"]} |
15,333 | karthikvg/Twitter_Sentiment_Analysis | refs/heads/master | /helpers.py | def get_message(temp):
start = temp.find("text")+8
temp1 = temp[start:]
end = temp1.find(",")
return temp[start:start+end-1]
def write_to_a_file(filename, data):
with open(filename,"w", encoding='utf-8') as writer:
for x in data:
writer.write(str(x)+'\n') | {"/stream_tweets.py": ["/credits.py", "/helpers.py"]} |
15,334 | karthikvg/Twitter_Sentiment_Analysis | refs/heads/master | /credits.py | CONSUMER_KEY="1k92yCTO1Ihj0R5FujNNJmUbS"
CONSUMER_SECRET="hZtKpRq547ZifpRE56IWzsclsiYtF9QTHy8UkCtAG89kx5rvfT"
ACCESS_TOKEN="1039355503044845569-kmHjNNPvoeN6n5IszPLTRZa9zmuvSV"
ACCESS_SECRET="2wV2K6R7zgMM4QS30Pj4QhPZrkkVZXAsD0e457WO9e4D6"
| {"/stream_tweets.py": ["/credits.py", "/helpers.py"]} |
15,335 | karthikvg/Twitter_Sentiment_Analysis | refs/heads/master | /stream_tweets.py | from tweepy import API
from tweepy import Cursor
from tweepy.streaming import StreamListener
from tweepy import Stream
from tweepy import OAuthHandler
from textblob import TextBlob
import re
import numpy as np
import pandas as pd
import credits
import matplotlib.pyplot as plt
import helpers
class TwitterClient:
... | {"/stream_tweets.py": ["/credits.py", "/helpers.py"]} |
15,336 | Wise-Economy/plantix | refs/heads/master | /depth_first_search.py | from typing import Text as String
from PlantixCommunityService import PlantixCommunityService
def depth_first_search_recursive(reachable_nodes: set, start: String) -> set:
"""
Run the depth first search algorithm to identify all
the reachable nodes in a graph from the given start "expert" node.
This... | {"/depth_first_search.py": ["/PlantixCommunityService.py"], "/helper.py": ["/PlantixCommunityService.py"], "/PlantixCommunityService.py": ["/plant_expert.py"], "/tests/unit_test.py": ["/plant_expert.py", "/tests/plantix_test_helper.py", "/helper.py", "/depth_first_search.py"], "/plantix.py": ["/depth_first_search.py", ... |
15,337 | Wise-Economy/plantix | refs/heads/master | /helper.py | from PlantixCommunityService import PlantixCommunityService
def generate_plant_experts_topic_count_dict(experts: set) -> dict:
"""
This function returns dict with plant topics covered and the number of experts
per topic among the given set of experts.
:param network: Dict of network of plant experts ... | {"/depth_first_search.py": ["/PlantixCommunityService.py"], "/helper.py": ["/PlantixCommunityService.py"], "/PlantixCommunityService.py": ["/plant_expert.py"], "/tests/unit_test.py": ["/plant_expert.py", "/tests/plantix_test_helper.py", "/helper.py", "/depth_first_search.py"], "/plantix.py": ["/depth_first_search.py", ... |
15,338 | Wise-Economy/plantix | refs/heads/master | /plant_expert.py | from dataclasses import dataclass
from typing import Text as String, List
@dataclass
class PlantExpert(object):
"""
Represents a plantix community expert.
Each expert has a unique id, a list of plants
they can give advice on and a list of other
expert uid-s they follow.
"""
uid: String
... | {"/depth_first_search.py": ["/PlantixCommunityService.py"], "/helper.py": ["/PlantixCommunityService.py"], "/PlantixCommunityService.py": ["/plant_expert.py"], "/tests/unit_test.py": ["/plant_expert.py", "/tests/plantix_test_helper.py", "/helper.py", "/depth_first_search.py"], "/plantix.py": ["/depth_first_search.py", ... |
15,339 | Wise-Economy/plantix | refs/heads/master | /PlantixCommunityService.py | import os
import json
from typing import Any as Json
from plant_expert import PlantExpert
class PlantixCommunityService(object):
"""Simulates the Plantix Community API in-memory and in-process.
"""
COMMUNITY_CACHE = json.load(open(
os.path.join(os.path.dirname(__file__), "community.json")
))
... | {"/depth_first_search.py": ["/PlantixCommunityService.py"], "/helper.py": ["/PlantixCommunityService.py"], "/PlantixCommunityService.py": ["/plant_expert.py"], "/tests/unit_test.py": ["/plant_expert.py", "/tests/plantix_test_helper.py", "/helper.py", "/depth_first_search.py"], "/plantix.py": ["/depth_first_search.py", ... |
15,340 | Wise-Economy/plantix | refs/heads/master | /tests/unit_test.py | import unittest
import json
import os
from plant_expert import PlantExpert
from tests.plantix_test_helper import PlantixApiClientForTesting
from helper import generate_plant_experts_topic_count_dict
from depth_first_search import depth_first_search_iterative
class PlantixApiClientUnitTest(unittest.TestCase):
de... | {"/depth_first_search.py": ["/PlantixCommunityService.py"], "/helper.py": ["/PlantixCommunityService.py"], "/PlantixCommunityService.py": ["/plant_expert.py"], "/tests/unit_test.py": ["/plant_expert.py", "/tests/plantix_test_helper.py", "/helper.py", "/depth_first_search.py"], "/plantix.py": ["/depth_first_search.py", ... |
15,341 | Wise-Economy/plantix | refs/heads/master | /plantix.py | import os
import json
from typing import Text as String, Dict
from depth_first_search import depth_first_search_iterative
from helper import generate_plant_experts_topic_count_dict
from plant_expert import PlantExpert
class PlantixApiClient(object):
"""
SDK for our Plantix Community API.
"""
def fe... | {"/depth_first_search.py": ["/PlantixCommunityService.py"], "/helper.py": ["/PlantixCommunityService.py"], "/PlantixCommunityService.py": ["/plant_expert.py"], "/tests/unit_test.py": ["/plant_expert.py", "/tests/plantix_test_helper.py", "/helper.py", "/depth_first_search.py"], "/plantix.py": ["/depth_first_search.py", ... |
15,342 | Wise-Economy/plantix | refs/heads/master | /tests/test_payload_generator.py | import json
import random
import string
def generate_payload(n: int, clique: bool):
possible_plant_topics = [id_generator() for i in range(10)]
for node in range(n):
pass
def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for _ in range(si... | {"/depth_first_search.py": ["/PlantixCommunityService.py"], "/helper.py": ["/PlantixCommunityService.py"], "/PlantixCommunityService.py": ["/plant_expert.py"], "/tests/unit_test.py": ["/plant_expert.py", "/tests/plantix_test_helper.py", "/helper.py", "/depth_first_search.py"], "/plantix.py": ["/depth_first_search.py", ... |
15,343 | Wise-Economy/plantix | refs/heads/master | /tests/integration_test.py | from plantix import PlantixApiClient
from plant_expert import PlantExpert
import os
from tests.plantix_test_helper import PlantixApiClientForTesting
import unittest
class PlantixApiClientIntegrationTest(unittest.TestCase):
def _initiate_plantix_api_client(self):
self.file_path = os.path.join(os.path.dirn... | {"/depth_first_search.py": ["/PlantixCommunityService.py"], "/helper.py": ["/PlantixCommunityService.py"], "/PlantixCommunityService.py": ["/plant_expert.py"], "/tests/unit_test.py": ["/plant_expert.py", "/tests/plantix_test_helper.py", "/helper.py", "/depth_first_search.py"], "/plantix.py": ["/depth_first_search.py", ... |
15,344 | Wise-Economy/plantix | refs/heads/master | /tests/plantix_test_helper.py | from plantix import PlantixApiClient
import json
class PlantixApiClientForTesting(PlantixApiClient):
def __init__(self, file_path=None):
if file_path is not None:
self.COMMUNITY_SERVICE = json.load(open(file_path))
| {"/depth_first_search.py": ["/PlantixCommunityService.py"], "/helper.py": ["/PlantixCommunityService.py"], "/PlantixCommunityService.py": ["/plant_expert.py"], "/tests/unit_test.py": ["/plant_expert.py", "/tests/plantix_test_helper.py", "/helper.py", "/depth_first_search.py"], "/plantix.py": ["/depth_first_search.py", ... |
15,345 | erobakiewicz/e_learning_Djagno3 | refs/heads/master | /courses/fields.py | from django.core.exceptions import ObjectDoesNotExist
from django.db import models
"""
custom django model field OrederField. it has optional for_fields param which is ordering
by overriding pre_save method:
1. checking if value already exist
2. Build queryset to retrive all obj of model
3. if there are any names in ... | {"/courses/views.py": ["/courses/forms.py", "/students/forms.py"]} |
15,346 | erobakiewicz/e_learning_Djagno3 | refs/heads/master | /chat/consumers.py | import json
from channels.generic.websocket import AsyncWebsocketConsumer
from django.utils import timezone
class ChatConsumer(AsyncWebsocketConsumer):
"""
Consumer to connect, disconnect and receive messages text as jsons
by the key and then echo it via self.send().
ChatConsumer is using asyncwebsoc... | {"/courses/views.py": ["/courses/forms.py", "/students/forms.py"]} |
15,347 | erobakiewicz/e_learning_Djagno3 | refs/heads/master | /courses/forms.py | from django.forms import inlineformset_factory
from courses.models import Course, Module
"""
Formset to validate all forms
fields: fields included in all forms
extra: number of extra empty forms to display
can_delete: if True Django will display checkbox input to mark objects to delete
"""
ModuleFormSet = inlineforms... | {"/courses/views.py": ["/courses/forms.py", "/students/forms.py"]} |
15,348 | erobakiewicz/e_learning_Djagno3 | refs/heads/master | /e_learning_Django3/settings.py | """
Django settings for e_learning_Django3 project.
Generated by 'django-admin startproject' using Django 3.1.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
im... | {"/courses/views.py": ["/courses/forms.py", "/students/forms.py"]} |
15,349 | erobakiewicz/e_learning_Djagno3 | refs/heads/master | /students/forms.py | from django import forms
from courses.models import Course
"""
This form is not to be displayed, it's function for "enroll" button in
course detail view.
"""
class CourseEnrollForm(forms.Form):
course = forms.ModelChoiceField(queryset=Course.objects.all(),
widget=forms.Hidde... | {"/courses/views.py": ["/courses/forms.py", "/students/forms.py"]} |
15,350 | erobakiewicz/e_learning_Djagno3 | refs/heads/master | /courses/templatetags/course.py | from django import template
register = template.Library()
# model_name template custom filter to apply in templates "|model_name"
@register.filter
def model_name(obj):
try:
return obj._meta.model_name
except AttributeError:
return None
| {"/courses/views.py": ["/courses/forms.py", "/students/forms.py"]} |
15,351 | erobakiewicz/e_learning_Djagno3 | refs/heads/master | /courses/migrations/0006_auto_20201206_1337.py | # Generated by Django 3.1.4 on 2020-12-06 13:37
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('courses', '0005_course_student'),
]
operations = [
migrations.RenameField(
model_name='course',
old_name='student',
... | {"/courses/views.py": ["/courses/forms.py", "/students/forms.py"]} |
15,352 | erobakiewicz/e_learning_Djagno3 | refs/heads/master | /courses/api/views.py | from django.shortcuts import get_object_or_404
from rest_framework import generics, viewsets
from rest_framework.authentication import BasicAuthentication
from rest_framework.decorators import action
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.... | {"/courses/views.py": ["/courses/forms.py", "/students/forms.py"]} |
15,353 | erobakiewicz/e_learning_Djagno3 | refs/heads/master | /courses/migrations/0004_auto_20201206_1231.py | # Generated by Django 3.1.4 on 2020-12-06 12:31
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('courses', '0003_auto_20201205_1951'),
]
operations = [
migrations.AlterField(
model_name='module... | {"/courses/views.py": ["/courses/forms.py", "/students/forms.py"]} |
15,354 | erobakiewicz/e_learning_Djagno3 | refs/heads/master | /courses/views.py | from braces.views import CsrfExemptMixin, JsonRequestResponseMixin
from django.apps import apps
from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
from django.core.cache import cache
from django.db.models import Count
from django.forms import modelform_factory
from django.shortcuts impor... | {"/courses/views.py": ["/courses/forms.py", "/students/forms.py"]} |
15,355 | alexalevtmp/stepik575FinalProject | refs/heads/master | /pages/login_page.py | from .base_page import BasePage
from .locators import LoginPageLocators
class LoginPage(BasePage):
def should_be_login_page(self):
self.should_be_login_url()
self.should_be_login_form()
self.should_be_register_form()
def should_be_login_url(self):
# реализуйте прове... | {"/test_main_page.py": ["/pages/login_page.py"], "/test_product_page.py": ["/pages/product_page.py"]} |
15,356 | alexalevtmp/stepik575FinalProject | refs/heads/master | /test_main_page.py | from .pages.main_page import MainPage
from .pages.login_page import LoginPage
# link for 4.3-2
# link = "http://selenium1py.pythonanywhere.com/catalogue/the-shellcoders-handbook_209?promo=midsummer"
# link for 4.3-3
link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/?promo=newYear2019"
# li... | {"/test_main_page.py": ["/pages/login_page.py"], "/test_product_page.py": ["/pages/product_page.py"]} |
15,357 | alexalevtmp/stepik575FinalProject | refs/heads/master | /test_product_page.py | from .pages.product_page import ProductPage
from .pages.locators import ProductPageLocators # ADD_TO_CART
# locators.py
# class ProductPageLocators(object):
# ADD_TO_CART = (By.CSS_SELECTOR, "btn-add-to-basket")
# def test_guest_can_go_to_login_page(browser):
# page = MainPage(browser, link) # инициализиру... | {"/test_main_page.py": ["/pages/login_page.py"], "/test_product_page.py": ["/pages/product_page.py"]} |
15,358 | alexalevtmp/stepik575FinalProject | refs/heads/master | /pages/product_page.py | from .base_page import BasePage
from .locators import ProductPageLocators
# from .locators import MainPageLocators
class ProductPage(BasePage):
def add_to_cart(self):
login_link = self.browser.find_element(*ProductPageLocators.ADD_TO_CART)
login_link.click()
self.solve_quiz_and_get_code()... | {"/test_main_page.py": ["/pages/login_page.py"], "/test_product_page.py": ["/pages/product_page.py"]} |
15,365 | waliamehak/LearnML | refs/heads/main | /admin_classifier/apps.py | from django.apps import AppConfig
class AdminClassifierConfig(AppConfig):
name = 'admin_classifier'
| {"/user_classifier/views.py": ["/admin_classifier/views.py"]} |
15,366 | waliamehak/LearnML | refs/heads/main | /user_classifier/apps.py | from django.apps import AppConfig
class UserClassifierConfig(AppConfig):
name = 'user_classifier'
| {"/user_classifier/views.py": ["/admin_classifier/views.py"]} |
15,367 | waliamehak/LearnML | refs/heads/main | /LearnML Files/Temp Files/prac.py | # Importing the libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Importing the dataset
dataset = pd.read_csv("50_Startups.csv")
X = dataset.iloc[:, :-1].values
y = dataset.iloc[:, -1].values
# Feature scaling
from sklearn.preprocessing import StandardScaler
sc_X = StandardScaler()
X ... | {"/user_classifier/views.py": ["/admin_classifier/views.py"]} |
15,368 | waliamehak/LearnML | refs/heads/main | /admin_classifier/urls.py | from django.urls import path
from . import views
urlpatterns = [
path('', views.Home.as_view(), name='admin_home'),
path('classification', views.Classification.as_view(), name='admin_classification'),
path('regression', views.Regression.as_view(), name='admin_regression'),
path('clustering', views.Clus... | {"/user_classifier/views.py": ["/admin_classifier/views.py"]} |
15,369 | waliamehak/LearnML | refs/heads/main | /admin_classifier/views.py | # Django Imports
from django.shortcuts import render
from django.views import View
# Internal Imports
from . import mongodb as mdb
# Python Package Imports
import pickle
import pandas as pd
from io import StringIO
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score
from bson.... | {"/user_classifier/views.py": ["/admin_classifier/views.py"]} |
15,370 | waliamehak/LearnML | refs/heads/main | /user_classifier/views.py | # Django Imports
from django.shortcuts import render, redirect
from django.contrib import messages
from django.utils.decorators import method_decorator
from django.contrib.auth.models import Group
from django.views import View
# Internal Imports
from . import mongodb as mdb
from .forms import CreateUserForm
from admin... | {"/user_classifier/views.py": ["/admin_classifier/views.py"]} |
15,371 | waliamehak/LearnML | refs/heads/main | /user_classifier/urls.py | from django.urls import path
from . import views
urlpatterns = [
path('', views.Home.as_view(), name='learner_home'),
path('classification', views.Classification.as_view(), name='learner_classification'),
path('regression', views.Regression.as_view(), name='learner_regression'),
path('clustering', view... | {"/user_classifier/views.py": ["/admin_classifier/views.py"]} |
15,372 | waliamehak/LearnML | refs/heads/main | /admin_classifier/forms.py | from django import forms
weights_choices = [('uniform', 'uniform'),
('distance', 'distance')]
algorithm_choices = [('auto', 'auto'),
('ball_tree', 'ball_tree'),
('kd_tree', 'kd_tree'),
('brute', 'brute')]
class InputForm(forms.Form):
... | {"/user_classifier/views.py": ["/admin_classifier/views.py"]} |
15,373 | waliamehak/LearnML | refs/heads/main | /LearnML Files/Temp Files/p2.py | from pymongo import MongoClient
client = MongoClient("mongodb+srv://user_1:USER_1@cluster0.0oqke.mongodb.net/<dbname>?retryWrites=true&w=majority")
db = client.get_database('learnml_db')
db_data = db.algorithms
mongo_data = {"update_message_list": ["Welcome To Learn ML"]}
db_data.update_one({'name': 'OP'}, {'$set': m... | {"/user_classifier/views.py": ["/admin_classifier/views.py"]} |
15,374 | waliamehak/LearnML | refs/heads/main | /admin_classifier/mongodb.py | from pymongo import MongoClient
def access():
client = MongoClient("mongodb+srv://user_1:USER_1@cluster0.0oqke.mongodb.net/<dbname>?retryWrites=true&w=majority")
db = client.get_database('learnml_db')
db_data = db.algorithms
return db_data
def update(db_data, algo_name, update_data, success_message,... | {"/user_classifier/views.py": ["/admin_classifier/views.py"]} |
15,375 | gormlabenz/chat-textblob | refs/heads/master | /app/events.py | from app import *
@sio.event
def connect(sid, environ):
print("connect ", sid)
@sio.event
def clientToServer(sid, data):
print("message ", data['text'])
response = chatbot.chat(data['text'])
sio.emit("serverToClient", response)
print("response ", response)
@sio.event
def disconnect(sid):
pr... | {"/app/events.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py"], "/app/__init__.py": ["/app/chatbot.py"]} |
15,376 | gormlabenz/chat-textblob | refs/heads/master | /run.py | from app import app
import eventlet
if __name__ == "__main__":
eventlet.wsgi.server(eventlet.listen(("", 5000)), app) | {"/app/events.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py"], "/app/__init__.py": ["/app/chatbot.py"]} |
15,377 | gormlabenz/chat-textblob | refs/heads/master | /app/__init__.py | import socketio
from app.chatbot import Chatbot
sio = socketio.Server(cors_allowed_origins="http://localhost:8080")
app = socketio.WSGIApp(sio)
chatbot = Chatbot('app/intents.json')
from app import events | {"/app/events.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py"], "/app/__init__.py": ["/app/chatbot.py"]} |
15,378 | gormlabenz/chat-textblob | refs/heads/master | /app/chatbot.py | from textblob.classifiers import NaiveBayesClassifier
import json
import random
from pathlib import Path
import pprint
class Chatbot:
def __init__(self, intents):
"""
The Chatbot class. Insert a json file in a specific format. The Chatbot will be trained
to find a pattern in a given text s... | {"/app/events.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py"], "/app/__init__.py": ["/app/chatbot.py"]} |
15,396 | cu-swe4s-fall-2019/version-control-jfgugel | refs/heads/master | /math_lib.py | def div(a, b):
if b==0:
print ("Can't divide by 0")
return 1
else:
return a/b
def add(a, b):
return a+b
| {"/calculate.py": ["/math_lib.py"]} |
15,397 | cu-swe4s-fall-2019/version-control-jfgugel | refs/heads/master | /calculate.py | import math_lib as mathfunctions
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='take input from terminal')
parser.add_argument('first_value', type=int, help='first integer to be added')
parser.add_argument('second_value', type=int, help='second integ... | {"/calculate.py": ["/math_lib.py"]} |
15,413 | pklaus/urqmd-analysis | refs/heads/master | /plot_urqmd_pandas.py | #!/usr/bin/env python
""" UrQMD File Reader """
import argparse
import logging
import pandas as pd
import math
import matplotlib.pyplot as plt
import numpy as np
def main():
parser = argparse.ArgumentParser(description='Read a config file.')
parser.add_argument('hdf5_file', metavar='HDF5_FILE', help="The HD... | {"/plot_urqmd.py": ["/read_urqmd.py"]} |
15,414 | pklaus/urqmd-analysis | refs/heads/master | /plot_urqmd.py | #!/usr/bin/env python
""" UrQMD File Reader """
from read_urqmd import F14_Reader
import argparse
import pickle
import logging
import pandas as pd
import math
import matplotlib.pyplot as plt
import numpy as np
class Particle(object):
def __init__(self, properties):
self._properties = properties
... | {"/plot_urqmd.py": ["/read_urqmd.py"]} |
15,415 | pklaus/urqmd-analysis | refs/heads/master | /read_urqmd.py | #!/usr/bin/env python
""" UrQMD File Reader """
import argparse
import pickle
import logging
class F14_Reader(object):
def __init__(self, data_file):
self.data_file = data_file
def get_events(self):
new_event = False
event = None
for line in self.data_file:
part... | {"/plot_urqmd.py": ["/read_urqmd.py"]} |
15,416 | pklaus/urqmd-analysis | refs/heads/master | /read_urqmd_pandas.py | #!/usr/bin/env python
""" UrQMD File Reader """
import pandas as pd
import numpy as np
import tables
import argparse
import logging
import warnings
import multiprocessing
import time
import queue
class F14_Reader(object):
def __init__(self, data_file, add_event_columns=False, renumber_event_ids=True):
... | {"/plot_urqmd.py": ["/read_urqmd.py"]} |
15,437 | NikitaZagor/PyPennet | refs/heads/master | /PyPennet/gui/baseFrame.py | from tkinter import Frame, Button, Menu, StringVar
from tkinter import BOTH, END, LEFT, RIGHT, RAISED, SUNKEN, TOP, X
from PyPennet.gui.baseEntry import BaseEntry
import PyPennet.utility.util as my_util
class BaseFrame:
def __init__(self, num, onClose, onExecution, parent=None):
self.parent = parent... | {"/PyPennet/gui/baseFrame.py": ["/PyPennet/gui/baseEntry.py", "/PyPennet/utility/util.py"], "/PyPennet/mainWindow.py": ["/PyPennet/gui/listwindow.py", "/PyPennet/gui/gridparams.py", "/PyPennet/gui/baseFrame.py", "/PyPennet/gui/showresult.py", "/PyPennet/gui/about_dlg.py"], "/PyPennet/gui/baseEntry.py": ["/PyPennet/util... |
15,438 | NikitaZagor/PyPennet | refs/heads/master | /PyPennet/gui/prev_perult.py | from tkinter import Toplevel, Frame, Button, Listbox, Scrollbar
from tkinter import SINGLE, END, LEFT, RIGHT, RAISED, RIDGE, TOP, BOTH, X, Y, SUNKEN
class PrevResult(Toplevel):
def __init__(self, grids, selected, parent=None):
Toplevel.__init__(self, parent)
self.parent = parent
self... | {"/PyPennet/gui/baseFrame.py": ["/PyPennet/gui/baseEntry.py", "/PyPennet/utility/util.py"], "/PyPennet/mainWindow.py": ["/PyPennet/gui/listwindow.py", "/PyPennet/gui/gridparams.py", "/PyPennet/gui/baseFrame.py", "/PyPennet/gui/showresult.py", "/PyPennet/gui/about_dlg.py"], "/PyPennet/gui/baseEntry.py": ["/PyPennet/util... |
15,439 | NikitaZagor/PyPennet | refs/heads/master | /PyPennet/mainWindow.py | from tkinter import Tk, Frame, Button, Menu, Toplevel
from tkinter import BOTH, RIGHT, LEFT, RAISED, RIDGE, TOP, X
from tkinter import messagebox
from tkinter import filedialog
from tkinter import messagebox as mb
import pickle
import webbrowser
from PyPennet.gui.listwindow import ListWindow
from PyPennet.gui.g... | {"/PyPennet/gui/baseFrame.py": ["/PyPennet/gui/baseEntry.py", "/PyPennet/utility/util.py"], "/PyPennet/mainWindow.py": ["/PyPennet/gui/listwindow.py", "/PyPennet/gui/gridparams.py", "/PyPennet/gui/baseFrame.py", "/PyPennet/gui/showresult.py", "/PyPennet/gui/about_dlg.py"], "/PyPennet/gui/baseEntry.py": ["/PyPennet/util... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.