index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
85,846 | bhenry337/CS362-InClass3 | refs/heads/main | /test_calc.py | import unittest
import calc
class TestCase(unittest.TestCase):
def test_sum(self):
self.assertEqual(calc.add(2,3),5)
def test_diff(self):
self.assertEqual(calc.diff(5,3), 2)
def test_multiply(self):
self.assertEqual(calc.mult(5,5), 25)
def test_div(self):
self.assertEqual(calc.div(6,3), 2)
| {"/test_calc.py": ["/calc.py"]} |
85,847 | bhenry337/CS362-InClass3 | refs/heads/main | /calc.py | def add(a, b):
return a + b
def diff(a,b):
return a - b
def mult(a,b):
return a * b
def div(a,b):
return a / b | {"/test_calc.py": ["/calc.py"]} |
85,848 | a-vilmin/sammy_picks | refs/heads/master | /player.py | class Player():
def __init__(self, player_entry):
parsed = player_entry.strip().split(',')
self.pos = parsed[0][1:-1]
self.name = parsed[1].replace("\"", "")
self.price = int(parsed[2])
self.matchup = parsed[3]
self.avg = 0
self.team = parsed[5]
def __lt... | {"/league.py": ["/player.py"], "/main.py": ["/league.py", "/evolution.py"]} |
85,849 | a-vilmin/sammy_picks | refs/heads/master | /evolution.py | from random import choice, sample, random, randint
import tqdm
LINEUP_SIZE = 10
def choose_cand(players, pos):
if pos == 'OF':
cand = sample(players, 3)
elif pos == "SP":
cand = sample(players, 2)
else:
cand = [choice(players)]
return cand
def create_single_lineup(league):
... | {"/league.py": ["/player.py"], "/main.py": ["/league.py", "/evolution.py"]} |
85,850 | a-vilmin/sammy_picks | refs/heads/master | /league.py | import player
from collections import defaultdict
class League():
def __init__(self, players_csv, expected_hitters, expected_pitchers):
self.players = defaultdict(list)
with open(players_csv, 'r') as f:
for line in f.readlines()[1:]:
curr = player.Player(line)
... | {"/league.py": ["/player.py"], "/main.py": ["/league.py", "/evolution.py"]} |
85,851 | a-vilmin/sammy_picks | refs/heads/master | /test.py | #!/usr/bin/python
'''
Simplest OpenOpt KSP example;
requires FuncDesigner installed.
For some solvers limitations on time, cputime, "enough" value,
basic GUI features are available.
See http://openopt.org/KSP for more details
'''
from openopt import *
from numpy import sin, cos
N = 150
items = [
{
... | {"/league.py": ["/player.py"], "/main.py": ["/league.py", "/evolution.py"]} |
85,852 | a-vilmin/sammy_picks | refs/heads/master | /main.py | from sys import argv
import league
import evolution
def main():
players = league.League(argv[1], argv[2], argv[3])
evolution.run(players)
if __name__ == '__main__':
main()
| {"/league.py": ["/player.py"], "/main.py": ["/league.py", "/evolution.py"]} |
85,883 | MarianaMontoyaN/flyControl | refs/heads/master | /index.py | #-*- utf-8 -*-
'''
Written in Python 3.7
Developed by: MARIANA MONTOYA NARANJO
'''
from tkinter import ttk
from tkinter import *
from tkinter import messagebox
from package import Package
from flight import Flight
from database import database
from dollar_today import dollar_today_scrap
from price_ticket import calcu... | {"/index.py": ["/package.py", "/flight.py", "/dollar_today.py", "/price_ticket.py"], "/database/database.py": ["/package.py"], "/flight.py": ["/package.py"], "/unitTesting.py": ["/dollar_today.py", "/price_ticket.py", "/package.py", "/flight.py"]} |
85,884 | MarianaMontoyaN/flyControl | refs/heads/master | /database/database.py | import sqlite3
from package import Package
import random
'''
Function that creates the database and tables if they don't exist
Outputs:
* exists: boolean value that indicates if the tables exist or not
'''
def create_db():
conexion = sqlite3.connect("vuelos.db")
cursor = conexion.cursor()
exists = Fal... | {"/index.py": ["/package.py", "/flight.py", "/dollar_today.py", "/price_ticket.py"], "/database/database.py": ["/package.py"], "/flight.py": ["/package.py"], "/unitTesting.py": ["/dollar_today.py", "/price_ticket.py", "/package.py", "/flight.py"]} |
85,885 | MarianaMontoyaN/flyControl | refs/heads/master | /package.py | '''
Written in Python 3.7
Class that models each packet of a flight's cargo
INPUTS:
* Weight: int value
* Value dollar: float value
'''
class Package:
def __init__(self, weight, dollar_today):
self.weight = weight
self.dollar_today = dollar_today
self.price_pesos=0
self... | {"/index.py": ["/package.py", "/flight.py", "/dollar_today.py", "/price_ticket.py"], "/database/database.py": ["/package.py"], "/flight.py": ["/package.py"], "/unitTesting.py": ["/dollar_today.py", "/price_ticket.py", "/package.py", "/flight.py"]} |
85,886 | MarianaMontoyaN/flyControl | refs/heads/master | /flight.py | '''
Written in Python 3.7
Class that models each flight
INPUTS:
* name_flight: string value
'''
from database import database
from package import Package
class Flight:
def __init__(self, name_flight):
self._MAXIMUM_LOAD = 18000
self.name_flight = name_flight
self.list_packages = d... | {"/index.py": ["/package.py", "/flight.py", "/dollar_today.py", "/price_ticket.py"], "/database/database.py": ["/package.py"], "/flight.py": ["/package.py"], "/unitTesting.py": ["/dollar_today.py", "/price_ticket.py", "/package.py", "/flight.py"]} |
85,887 | MarianaMontoyaN/flyControl | refs/heads/master | /dollar_today.py | '''
Written in Python 3.7 using Selenium
Function that scrapes the web to update the value of the dollar
Returns a float value
'''
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
def dollar_today_scrap():
options = Options()
options.add_argument('--headless')
driver... | {"/index.py": ["/package.py", "/flight.py", "/dollar_today.py", "/price_ticket.py"], "/database/database.py": ["/package.py"], "/flight.py": ["/package.py"], "/unitTesting.py": ["/dollar_today.py", "/price_ticket.py", "/package.py", "/flight.py"]} |
85,888 | MarianaMontoyaN/flyControl | refs/heads/master | /price_ticket.py | '''
Written in Python 3.7
Function that calculates the price of an air ticket depending on the distance traveled and the days of stay
Inputs:
* Days: int value
* Distance : float value
Outputs:
* The price of the ticket: float value
* If a discount was applied or not: boolean value
'''
def calcula... | {"/index.py": ["/package.py", "/flight.py", "/dollar_today.py", "/price_ticket.py"], "/database/database.py": ["/package.py"], "/flight.py": ["/package.py"], "/unitTesting.py": ["/dollar_today.py", "/price_ticket.py", "/package.py", "/flight.py"]} |
85,889 | MarianaMontoyaN/flyControl | refs/heads/master | /unitTesting.py |
'''
UNIT TESTING
Devoloped By: Mariana Montoya Naranjo
Written in Python 3.7 using unittest unit testing framework
'''
import unittest
from pyunitreport import HTMLTestRunner
from dollar_today import dollar_today_scrap
from price_ticket import calculate_price
from package import Package
from flight imp... | {"/index.py": ["/package.py", "/flight.py", "/dollar_today.py", "/price_ticket.py"], "/database/database.py": ["/package.py"], "/flight.py": ["/package.py"], "/unitTesting.py": ["/dollar_today.py", "/price_ticket.py", "/package.py", "/flight.py"]} |
85,903 | carnal0wnage/machotools | refs/heads/master | /machotools/tests/test_dependency.py | import shutil
import tempfile
import os.path as op
from macholib import mach_o
from .. import dependency
from .common import DYLIB_DIRECTORY, FILES_TO_DEPENDENCY_NAMES
from .common import BaseMachOCommandTestCase
class TestDependencies(BaseMachOCommandTestCase):
def test_simple_read(self):
for f, depen... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,904 | carnal0wnage/machotools | refs/heads/master | /machotools/tests/common.py | import contextlib
import shutil
import tempfile
import unittest
import os.path as op
import macholib
DYLIB_DIRECTORY = op.join(op.dirname(__file__), "data")
FOO_DYLIB = op.join(DYLIB_DIRECTORY, "foo.dylib")
FILES_TO_INSTALL_NAME = {
FOO_DYLIB: "foo.dylib",
op.join(DYLIB_DIRECTORY, "foo2.dylib"): "yoyo.dylib... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,905 | carnal0wnage/machotools | refs/heads/master | /machotools/misc.py | # Copyright (c) 2013 by Enthought, Ltd.
# All rights reserved.
import sys
import macholib.MachO
from macholib import mach_o
from .utils import rstrip_null_bytes, safe_update
from .common import _change_command_data_inplace, _find_lc_dylib_command
def install_name(filename):
"""Returns the install name of a mach... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,906 | carnal0wnage/machotools | refs/heads/master | /machotools/errors.py | class MachoError(Exception):
pass
| {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,907 | carnal0wnage/machotools | refs/heads/master | /machotools/tests/test_detect.py | import unittest
from machotools.detect import is_macho, is_dylib, is_executable, is_bundle
from machotools.tests.common import FOO_DYLIB, SIMPLE_MAIN, SIMPLE_BUNDLE, NO_MACHO_FILE
class TestDetect(unittest.TestCase):
def test_dylib(self):
self.assertTrue(is_dylib(FOO_DYLIB))
self.assertFalse(is_b... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,908 | carnal0wnage/machotools | refs/heads/master | /machotools/__init__.py | # Copyright (c) 2013 by Enthought, Ltd.
# All rights reserved.
from machotools.macho_rewriter import BundleRewriter, DylibRewriter, \
ExecutableRewriter, rewriter_factory
__all__ = [
"BundleRewriter", "DylibRewriter", "ExecutableRewriter",
"rewriter_factory",
"__version__",
]
from .__version import __... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,909 | carnal0wnage/machotools | refs/heads/master | /machotools/dependency.py | import re
import macholib
from macholib import mach_o
from .common import _change_command_data_inplace, _find_lc_dylib_command
from .utils import convert_to_string, safe_update
def _find_specific_lc_load_dylib(header, dependency_pattern):
for index, (load_command, dylib_command, data) in \
_find_lc_... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,910 | carnal0wnage/machotools | refs/heads/master | /machotools/common.py | from macholib import mach_o
from .utils import macho_path_as_data
def _change_command_data_inplace(header, index, old_command, new_data):
# We change the command 'in-place' to ensure the new dylib command is as
# close as possible as the old one (same version, timestamp, etc...)
(old_load_command, old_dyl... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,911 | carnal0wnage/machotools | refs/heads/master | /machotools/tests/test_rpath.py | import shutil
import tempfile
import unittest
import os.path as op
from ..rpath import add_rpaths, list_rpaths
from machotools.tests.common import DYLIB_DIRECTORY, FILES_TO_RPATHS
class TestRpath(unittest.TestCase):
def _save_temp_copy(self, filename):
temp_fp = tempfile.NamedTemporaryFile()
wit... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,912 | carnal0wnage/machotools | refs/heads/master | /machotools/utils.py | # Copyright (c) 2013 by Enthought, Ltd.
# All rights reserved.
import os
import shutil
import stat
import sys
import uuid
from macholib.util import fsencoding
def macho_path_as_data(filename, pad_to=4):
""" Encode a path as data for a MachO header.
Namely, this will encode the text according to the filesyste... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,913 | carnal0wnage/machotools | refs/heads/master | /machotools/tests/test_install_name.py | import shutil
import tempfile
import unittest
import os.path as op
from macholib import mach_o
from .. import dependency, misc
from .common import DYLIB_DIRECTORY, FILES_TO_INSTALL_NAME
from .common import BaseMachOCommandTestCase
class TestInstallName(BaseMachOCommandTestCase):
def test_simple_read(self):
... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,914 | carnal0wnage/machotools | refs/heads/master | /machotools/detect.py | from macholib.MachO import MachO
def detect_macho_type(path):
"""
Returns None if not a mach-o.
"""
try:
p = MachO(path)
except ValueError as e:
# Grrr, why isn't macholib raising proper exceptions...
assert str(e).startswith("Unknown Mach-O")
return None
else:
... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,915 | carnal0wnage/machotools | refs/heads/master | /machotools/macho_rewriter.py | import re
import macholib
from .errors import MachoError
from .dependency import _list_dependencies_macho, _change_command_data_inplace, \
_find_lc_dylib_command
from .detect import detect_macho_type
from .misc import _install_name_macho, _change_id_dylib_command
from .rpath import _add_rpath_to_header, _list... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,916 | carnal0wnage/machotools | refs/heads/master | /machotools/tests/test_macho_rewriter.py | import shutil
import unittest
import os.path as op
from .. import dependency, misc
from ..macho_rewriter import DylibRewriter, ExecutableRewriter, \
_MachoRewriter, rewriter_factory
from ..rpath import list_rpaths
from ..tests.common import FILES_TO_DEPENDENCY_NAMES, FILES_TO_RPATHS, \
FILES_TO_INSTALL_NAME, ... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,917 | carnal0wnage/machotools | refs/heads/master | /machotools/__main__.py | # Copyright (c) 2013 by Enthought, Ltd.
# All rights reserved.
import sys
import argparse
from .macho_rewriter import rewriter_factory
def list_rpaths_command(namespace):
rewriter = rewriter_factory(namespace.macho)
for rpath in rewriter.rpaths:
print(rpath)
def list_install_names(namespace):
re... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,918 | carnal0wnage/machotools | refs/heads/master | /setup.py | import os.path as op
from setuptools import setup
VERSION = "0.2.0.dev1"
if __name__ == "__main__":
with open(op.join("machotools", "__version.py"), "wt") as fp:
fp.write("__version__ = '{0}'".format(VERSION))
setup(name="machotools",
version=VERSION,
author="David Cournapeau",
... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,919 | carnal0wnage/machotools | refs/heads/master | /machotools/rpath.py | # Copyright (c) 2013 by Enthought, Ltd.
# All rights reserved.
import macholib.MachO
import macholib.mach_o
from macholib.ptypes import sizeof
from .utils import convert_to_string, macho_path_as_data, safe_update
def list_rpaths(filename):
"""Get the list of rpaths defined in the given mach-o binary.
The re... | {"/machotools/tests/test_dependency.py": ["/machotools/__init__.py", "/machotools/tests/common.py"], "/machotools/misc.py": ["/machotools/utils.py", "/machotools/common.py"], "/machotools/tests/test_detect.py": ["/machotools/detect.py", "/machotools/tests/common.py"], "/machotools/__init__.py": ["/machotools/macho_rewr... |
85,930 | Puilolive-Production/Applicaiton | refs/heads/main | /face/face_recognition_windows.py | from deepface import DeepFace
import cv2
import time
import os
import eel
import numpy as np
from PIL import Image, ImageDraw
from IPython.display import display
import pandas as pd
from pathlib import Path
import config
# Get a reference to webcam #0 (the default one)
video_capture = cv2.VideoCapture(0)
@eel.expose
... | {"/face/face_recognition_windows.py": ["/config.py"], "/brain.py": ["/config.py", "/face/face_recognition_windows.py"]} |
85,931 | Puilolive-Production/Applicaiton | refs/heads/main | /brain.py | import eel
import sys
import os
import json
sys.path.append('..')
sys.path.append(os.getcwd())
import config
import face.face_recognition_windows
config.init()
# Some temps
usrname_temp = ""
usrAge_temp = 0
usrHeight_temp = 0.0
usrCurrentWeight_temp = 0.0
usrGender_temp = ""
usrSMM_temp = 0.0
# Loading JSON file
w... | {"/face/face_recognition_windows.py": ["/config.py"], "/brain.py": ["/config.py", "/face/face_recognition_windows.py"]} |
85,932 | Puilolive-Production/Applicaiton | refs/heads/main | /config.py | def init():
loged_in_usrname = "" | {"/face/face_recognition_windows.py": ["/config.py"], "/brain.py": ["/config.py", "/face/face_recognition_windows.py"]} |
85,933 | Puilolive-Production/Applicaiton | refs/heads/main | /path_true.py | import sys
import os
sys.path.append(os.getcwd())
print(os.getcwd())
print(os.path.isdir(os.getcwd()))
print(os.path.isfile("user_infos.json")) | {"/face/face_recognition_windows.py": ["/config.py"], "/brain.py": ["/config.py", "/face/face_recognition_windows.py"]} |
85,934 | Puilolive-Production/Applicaiton | refs/heads/main | /test.py | import os
import json
with open(os.getcwd()+r"\user_infos.json", 'r') as f:
data = json.loads(f.read()) #data becomes a dictionary
print(data["Testing"]["usrAge"]) | {"/face/face_recognition_windows.py": ["/config.py"], "/brain.py": ["/config.py", "/face/face_recognition_windows.py"]} |
85,935 | Puilolive-Production/Applicaiton | refs/heads/main | /face/path_true.py | import os.path
from os import path
print(os.getcwd() + r"\face\known_pics")
print(path.isdir(os.getcwd() + r"\face\known_face"))
print(path.isdir(r"unknown_face"))
print(os.path.isfile("G:\\Shared drives\\Puilolive Production\\Applicaiton\\face\\known_pics\\representations_vgg_face.pkl"))
print(os.getcwd()) | {"/face/face_recognition_windows.py": ["/config.py"], "/brain.py": ["/config.py", "/face/face_recognition_windows.py"]} |
85,936 | Puilolive-Production/Applicaiton | refs/heads/main | /test/cv2_test.py | import cv2
cam = cv2.VideoCapture(0)
retval, frame = cam.read()
if retval != True:
raise ValueError("Can't read frame")
cv2.imwrite('img2.png', frame)
cv2.imshow("img1", frame) | {"/face/face_recognition_windows.py": ["/config.py"], "/brain.py": ["/config.py", "/face/face_recognition_windows.py"]} |
85,937 | nizardeen/Django_projects | refs/heads/master | /BookmarkManager/bookmarkapp/urls.py | from django.urls import path
from django.conf.urls import url
from bookmarkapp import views
urlpatterns = [
# Api for create
url('create',views.create,name='create'),
# Api for browse
url(r'^browse/$',views.browse,name='browse'),
]
| {"/BookmarkManager/bookmarkapp/views.py": ["/BookmarkManager/bookmarkapp/models.py"]} |
85,938 | nizardeen/Django_projects | refs/heads/master | /BookmarkManager/bookmarkapp/views.py | from django.views.decorators.csrf import csrf_exempt
# Create your views here.
from datetime import datetime
import traceback
from django.http import JsonResponse
from .models import Bookmark,Customer
from django.db.models.expressions import RawSQL
# Api for creating the bookmark
@csrf_exempt
def create(request):
... | {"/BookmarkManager/bookmarkapp/views.py": ["/BookmarkManager/bookmarkapp/models.py"]} |
85,939 | nizardeen/Django_projects | refs/heads/master | /BookmarkManager/bookmarkapp/models.py | from django.db import models
class Customer(models.Model):
Latitude = models.FloatField(null=True,blank=True)
Longitude = models.FloatField(null=True,blank=True)
class Bookmark(models.Model):
Customer = models.ManyToManyField(Customer)
Title = models.CharField(max_length=250,blank=True,null=True)
Url = models.C... | {"/BookmarkManager/bookmarkapp/views.py": ["/BookmarkManager/bookmarkapp/models.py"]} |
85,940 | lan17/memcev | refs/heads/master | /src/memcev/__init__.py | from .memcev import Client | {"/src/memcev/__init__.py": ["/src/memcev/memcev.py"]} |
85,941 | lan17/memcev | refs/heads/master | /src/memcev/memcev.py | from Queue import Queue, Empty
from collections import deque
import threading
import re
from functools import partial
import _memcev
class Client(_memcev._MemcevClient):
"""
A libev-based memcached client that manages a fixed-size pool
"""
# 5 seconds is a long time for a memcached call
timeout =... | {"/src/memcev/__init__.py": ["/src/memcev/memcev.py"]} |
85,942 | lan17/memcev | refs/heads/master | /setup.py | from distutils.core import setup, Extension
module1 = Extension('_memcev', sources = ['src/_memcevmodule.c'],
libraries=['ev'],
include_dirs=['/usr/include', '/usr/local/include', '/opt/local/include'],
library_dirs=['/usr/lib', '/usr/local/lib', '/opt/local/... | {"/src/memcev/__init__.py": ["/src/memcev/memcev.py"]} |
85,943 | lan17/memcev | refs/heads/master | /src/memcev/tests/tests.py | #!/usr/bin/env python2.7
import time
import unittest
from memcev import Client
class TestMemcev(unittest.TestCase):
def setUp(self):
try:
self.client = Client('localhost', 11211)
except:
print "tests need memcached running on localhost:11211"
raise
def tea... | {"/src/memcev/__init__.py": ["/src/memcev/memcev.py"]} |
85,944 | Bawerlacher/Plotting_Agent | refs/heads/main | /params_serialize.py | import json
import numpy as np
import os
from tqdm import tqdm
from collections import OrderedDict
import plotter
def serialize_split_1(params, pad_none=False):
# params: dict
param_strs_list = []
for k in plotter.SLOTS_NAT_ORDER:
if k in params:
v = params[k]
elif pad_none:
v = None
else:
continue
... | {"/params_serialize.py": ["/plotter.py"]} |
85,945 | Bawerlacher/Plotting_Agent | refs/heads/main | /plotter.py | import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import json
import os
from tqdm import tqdm
import pickle
from collections import OrderedDict
import argparse
from matplotlib.ticker import MaxNLocator
'''
Param name design: natural n... | {"/params_serialize.py": ["/plotter.py"]} |
85,961 | npmcdn-to-unpkg-bot/oculus | refs/heads/master | /oculus.py | from flask import Flask, request, redirect, url_for, render_template, flash, g
from flask_login import LoginManager, login_required, login_user, logout_user, current_user
from sqlalchemy import func
from utils import *
app = Flask(__name__)
app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT'
login_manager = LoginManager... | {"/oculus.py": ["/utils.py"], "/utils.py": ["/models.py"]} |
85,962 | npmcdn-to-unpkg-bot/oculus | refs/heads/master | /utils.py | from models import User, Isps, Service_metric_ratings, Service_catergory, Service_metric, Services, Ratings
from database import db
def dropdown():
isp_query = db.session.query(Isps)
isp_entries = [dict
(isp_id=isp.isp_id, isp_name=isp.isp_name, isp_description=isp.isp_description) for isp ... | {"/oculus.py": ["/utils.py"], "/utils.py": ["/models.py"]} |
85,963 | npmcdn-to-unpkg-bot/oculus | refs/heads/master | /models.py | from database import db
from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
class User(db.Model):
__tablename__ = "users"
user_id = db.Column('user_id', db.Integer, primary_key=True)
email = db.Column('email', db.String(50), unique=True, index=True)
... | {"/oculus.py": ["/utils.py"], "/utils.py": ["/models.py"]} |
85,964 | elizaveta-p/snake_game | refs/heads/master | /snake_class.py | import os
import sqlite3
import pygame
import sys
import random
import time
ANGLED_PARTS = {'top_right': None,
'top_left': None,
'bottom_right': None,
'bottom_left': None}
BODY = {'vertical': None, 'horizontal': None}
HEAD = {'top': None, 'right': None, 'bottom': None,... | {"/main.py": ["/snake_class.py", "/game_class.py", "/food_class.py"], "/game_class.py": ["/snake_class.py", "/food_class.py"]} |
85,965 | elizaveta-p/snake_game | refs/heads/master | /main.py | import os
import sqlite3
import pygame
import sys
import random
import time
from snake_class import Snake
from game_class import Game
from food_class import Food
with open('data/snake_doc.txt', 'r') as file:
data = [line.rstrip('\n') for line in file.readlines()]
filled_with_snake = []
for row in range(... | {"/main.py": ["/snake_class.py", "/game_class.py", "/food_class.py"], "/game_class.py": ["/snake_class.py", "/food_class.py"]} |
85,966 | elizaveta-p/snake_game | refs/heads/master | /game_class.py | import os
import pygame
import sys
import random
from snake_class import Snake
from food_class import Food
BACKGROUND_MUSIC = ['data/background_music.mp3', 'data/background_music_old.mp3']
def load_image(name, colorkey=None):
fullname = os.path.join('data', name)
if not os.path.isfile(fullname):
p... | {"/main.py": ["/snake_class.py", "/game_class.py", "/food_class.py"], "/game_class.py": ["/snake_class.py", "/food_class.py"]} |
85,967 | elizaveta-p/snake_game | refs/heads/master | /food_class.py | import os
import sqlite3
import pygame
import sys
import random
import time
def load_image(name, colorkey=None):
fullname = os.path.join('data', name)
if not os.path.isfile(fullname):
sys.exit()
image = pygame.image.load(fullname)
if colorkey is not None:
image = image.convert()
... | {"/main.py": ["/snake_class.py", "/game_class.py", "/food_class.py"], "/game_class.py": ["/snake_class.py", "/food_class.py"]} |
86,132 | anaisfaucillon/ISN-PROJECT | refs/heads/master | /constantes.py | nombre_sprite_cote = 25
taille_sprite = 20
largeur = 1200
longeur = 800
titre_fenetre = "Menu"
# IMAGE ISSU DU SITE https://openclassrooms.com/fr/courses/1399541-interface-graphique-pygame-pour-python/1399813-premieres-fenetres
image_icone = "image\evo.png"
image_niveau = "image\evo.png"
# IMAGE ISSU DU S... | {"/programme_v4.py": ["/constantes.py"]} |
86,133 | anaisfaucillon/ISN-PROJECT | refs/heads/master | /programme_v4.py | #import sys
import pygame
from pygame.locals import *
from constantes import *
from sys import *
pygame.init()
# Copyright (c) -------------------------------
# Les sons proviennent de https://themushroomkingdom.net/wav.shtml
# Les images proviennent de
# https://openclassrooms.com/fr/courses/1399541-i... | {"/programme_v4.py": ["/constantes.py"]} |
86,149 | rjaglal/Trading_file_manipulation | refs/heads/master | /statistical_analysis_of_time_series.py | import pandas as pd
import matplotlib as plt
from trading_file_manipulation import *
# Computes the mean, median, and standard deviation for a dataframe containing stock data
def mean_median_standard_deviation():
dates = pd.date_range('2013-01-01', '2015-12-31')
symbols = ['SPY', 'XOM', 'GOOG', 'GLD']
df ... | {"/statistical_analysis_of_time_series.py": ["/trading_file_manipulation.py"], "/incomplete_data.py": ["/trading_file_manipulation.py"], "/histograms_and_scatter_plots.py": ["/trading_file_manipulation.py", "/statistical_analysis_of_time_series.py"], "/sharpe_ratio_and_portfolio_performance.py": ["/trading_file_manipul... |
86,150 | rjaglal/Trading_file_manipulation | refs/heads/master | /incomplete_data.py | from trading_file_manipulation import *
import matplotlib as plt
import pandas as pd
# Fills in missing gaps in stock prices for all symbols in a
# dataframe.
def fill_in_missing_data():
dates = pd.date_range('2012-01-01', '2017-05-7')
symbols = ['SPY', 'AAPL']
df = get_data(symbols, dates)
plot_data(... | {"/statistical_analysis_of_time_series.py": ["/trading_file_manipulation.py"], "/incomplete_data.py": ["/trading_file_manipulation.py"], "/histograms_and_scatter_plots.py": ["/trading_file_manipulation.py", "/statistical_analysis_of_time_series.py"], "/sharpe_ratio_and_portfolio_performance.py": ["/trading_file_manipul... |
86,151 | rjaglal/Trading_file_manipulation | refs/heads/master | /histograms_and_scatter_plots.py | import pandas as pd
import matplotlib as plt
from trading_file_manipulation import *
from statistical_analysis_of_time_series import *
import numpy as np
# Slope of a scatter plot is where you have a stock daily return
# scatter plotted against the market(that is the SPY).
# Beta is another name for the slope of the ... | {"/statistical_analysis_of_time_series.py": ["/trading_file_manipulation.py"], "/incomplete_data.py": ["/trading_file_manipulation.py"], "/histograms_and_scatter_plots.py": ["/trading_file_manipulation.py", "/statistical_analysis_of_time_series.py"], "/sharpe_ratio_and_portfolio_performance.py": ["/trading_file_manipul... |
86,152 | rjaglal/Trading_file_manipulation | refs/heads/master | /NumPy_Usage.py | import numpy as np
def arithmetic_operations():
a = np.array([(2, 3, 4, 5, 1),
(8, 3, 9, 7, 0)])
print("Original Array A:\n", a)
# Multiply the array by 2
print("Multiply array by 2:\n", 2 * a)
# Divide the array by 2
print("Divide array by 2:\n", a / 2)
b = np.array([(... | {"/statistical_analysis_of_time_series.py": ["/trading_file_manipulation.py"], "/incomplete_data.py": ["/trading_file_manipulation.py"], "/histograms_and_scatter_plots.py": ["/trading_file_manipulation.py", "/statistical_analysis_of_time_series.py"], "/sharpe_ratio_and_portfolio_performance.py": ["/trading_file_manipul... |
86,153 | rjaglal/Trading_file_manipulation | refs/heads/master | /sharpe_ratio_and_portfolio_performance.py | import numpy as np
import pandas as pd
import matplotlib as plt
from trading_file_manipulation import *
import scipy.optimize as spo
def allocations_df_function(norm_df, allocation_list):
num_of_columns_in_df = norm_df.shape[1]
number_of_allocations = len(allocation_list)
if num_of_columns_in_df == numb... | {"/statistical_analysis_of_time_series.py": ["/trading_file_manipulation.py"], "/incomplete_data.py": ["/trading_file_manipulation.py"], "/histograms_and_scatter_plots.py": ["/trading_file_manipulation.py", "/statistical_analysis_of_time_series.py"], "/sharpe_ratio_and_portfolio_performance.py": ["/trading_file_manipul... |
86,154 | rjaglal/Trading_file_manipulation | refs/heads/master | /data_collector_api.py | import requests
import pprint
import json
import sys
import time
import os
import sqlite3
db_file = "C:/Users/ravi/Documents/sqlite_db/stock_data.db"
btce_ticker_columns = '(updated INTERGER PRIMARY KEY, ' \
'high REAL, ' \
'low REAL,' \
'avg REAL,' \
... | {"/statistical_analysis_of_time_series.py": ["/trading_file_manipulation.py"], "/incomplete_data.py": ["/trading_file_manipulation.py"], "/histograms_and_scatter_plots.py": ["/trading_file_manipulation.py", "/statistical_analysis_of_time_series.py"], "/sharpe_ratio_and_portfolio_performance.py": ["/trading_file_manipul... |
86,155 | rjaglal/Trading_file_manipulation | refs/heads/master | /trading_file_manipulation.py | import pandas as pd
import matplotlib.pyplot as plt
import os
# Example function for plotting and prints a dataframe with
# standard index 0..n
def read_csv():
df = pd.read_csv("data_files/comtrade.csv")
print(df[['Reporter', 'Trade Value (US$)']][100:131])
df[['Reporter', 'Trade Value (US$)']][100:131].p... | {"/statistical_analysis_of_time_series.py": ["/trading_file_manipulation.py"], "/incomplete_data.py": ["/trading_file_manipulation.py"], "/histograms_and_scatter_plots.py": ["/trading_file_manipulation.py", "/statistical_analysis_of_time_series.py"], "/sharpe_ratio_and_portfolio_performance.py": ["/trading_file_manipul... |
86,156 | lubintan/LUBINANCE-lubinance | refs/heads/master | /lubitrage.py | from interactData import *
from datetime import timedelta
depth = 2
targetPercent = 1.005
pollInterval = 0.3
microInterval = 0.1
counterLimit = 12
def cumulative_qty_for_selling(client,pair,price):
limit = '5'
orders = get_order_book(client, pair, limit=limit)
depthIndex = depth - 5
bids = orders... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,157 | lubintan/LUBINANCE-lubinance | refs/heads/master | /testInfo.py | from datetime import datetime
BTCUSDT = {}
BCHABCUSDT = {}
BNBUSDT = {}
EOSUSDT = {}
ETHUSDT = {}
LTCUSDT = {}
XLMUSDT = {}
ZECUSDT = {}
allData = [BTCUSDT,BNBUSDT,EOSUSDT,ETHUSDT,LTCUSDT,XLMUSDT,ZECUSDT]
folder = 'datasets/'
BTCUSDT['datasets'] = [folder + 'BTCUSDT_1m_1 Dec, 2016-17 Apr, 2019.csv',
... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,158 | lubintan/LUBINANCE-lubinance | refs/heads/master | /lubinance3SIM.py | from interactData import *
from analyzerFunctions import *
import random
profitPercent = 0.008
pollingInterval = 20
dropPercent = 0.96
feePercent = 0.0015
bolliDelay = 35 * 60 # 35 mins
buyBreakPercent = 1.003
buyBarrierFactor = 0.8
buyMargin = 0.9975
sellingMargin = 1.008
belowBolliPercent = 0.9995
gap = 0.9975
... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,159 | lubintan/LUBINANCE-lubinance | refs/heads/master | /lubinance3B.py | from interactData import *
from analyzerFunctions import *
import random
TRADE_INTERVAL = Client.KLINE_INTERVAL_15MINUTE
TRADE_WINDOW = '105 minutes ago UTC'
profitPercent = 0.01
subprofitPercent = 0.006
pollingInterval = 90
dropPercent = 0.985
feePercent = 0.001
bolliDelay = 35 * 60 # 35 mins
buyBreakPercent = 1.0... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,160 | lubintan/LUBINANCE-lubinance | refs/heads/master | /lubinance3BSIM.py | from interactData import *
from analyzerFunctions import *
import random
from plotly.graph_objs import Scatter, Ohlc, Figure, Layout, Candlestick
import plotly
profitPercent = 0.01
subprofitPercent = 0.006
pollingInterval = 20
dropPercent = 0.985
feePercent = 0.001
bolliDelay = 35 * 60 # 35 mins
buyBreakPercent = 1.... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,161 | lubintan/LUBINANCE-lubinance | refs/heads/master | /analyzer.py | from analyzerFunctions import *
from testInfo import *
import csv,sys
def mainPriceGateZZGate(dataFile,begin,end,fileName='test'):
with open(
"{}.csv".format(
fileName
),
mode='w+' # set file write mode
) as f:
writer = csv.writer... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,162 | lubintan/LUBINANCE-lubinance | refs/heads/master | /analyzerFunctions.py | from math import pi
from datetime import datetime
from datetime import timedelta
import pandas as pd
import numpy as np
import time, sys
import logging
TITLE = 'minor-grey, intermediate-blue, major-black'
def printer(inputDict, file):
pd = {}
pd['Date'] = ''
pd['Current Price'] = ''
pd['assets']... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,163 | lubintan/LUBINANCE-lubinance | refs/heads/master | /visualization/visual.py | from getData import *
import pandas as pd
from plotly.graph_objs import Scatter,Candlestick,Figure,Layout
import numpy as np
from analyzerFunctions import *
import plotly
def visual():
data = pd.read_csv('log_data/NEO_270619_01_25_04.csv')
data['Date'] = pd.to_datetime(data['Date'])
# startDate = data.il... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,164 | lubintan/LUBINANCE-lubinance | refs/heads/master | /lubinance3.py | from interactData import *
from analyzerFunctions import *
profitPercent = 0.008
pollingInterval = 20
dropPercent = 0.96
feePercent = 0.0015
bolliDelay = 35 * 60 # 35 mins
buyBreakPercent = 1.003
buyBarrierFactor = 0.8
buyMargin = 0.9975
sellingMargin = 1.008
belowBolliPercent = 0.9995
gap = 0.9975
sellStopPercent... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,165 | lubintan/LUBINANCE-lubinance | refs/heads/master | /lubinance.py | from interactData import *
from analyzerFunctions import *
def lubinance(coin='BTC', buyMargin = 0.9975,sellingMargin=1.007,pollingInterval = 20):
client = Client(apiK, sK)
assets = getUSDTFromBasket(coin+'.txt')
btcAssets = 0
txFee = 0.002 # 0.22%
# bolliBreak = False
bolliDate = datet... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,166 | lubintan/LUBINANCE-lubinance | refs/heads/master | /interactData.py | import pytz,time
from datetime import datetime
from binance.client import Client
from binance.exceptions import *
import pandas as pd
import numpy as np
import decimal
# sK =
# apiK =
# All previous keys have previously been invalidated.
# Request new key from dashboard and paste above. Take care to not upload to g... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,167 | lubintan/LUBINANCE-lubinance | refs/heads/master | /getData.py | import dateparser
import pytz,time
from datetime import datetime
from binance.client import Client
import csv
def date_to_milliseconds(date_str):
"""Convert UTC date to milliseconds
If using offset strings add "UTC" to date string e.g. "now UTC", "11 hours ago UTC"
See dateparse docs for formats http://da... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,168 | lubintan/LUBINANCE-lubinance | refs/heads/master | /lubinance2.py | from interactData import *
from analyzerFunctions import *
def lubinance(coin='BTC', startUSDT = '',buyMargin = 0.9975,sellingMargin=1.008,pollingInterval = 20):
client = Client(apiK, sK)
pair = coin + 'USDT'
#region:check for outstanding orders
print()
openOrders = get_open_orders(client, pa... | {"/lubitrage.py": ["/interactData.py"], "/lubinance3SIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3B.py": ["/interactData.py", "/analyzerFunctions.py"], "/lubinance3BSIM.py": ["/interactData.py", "/analyzerFunctions.py"], "/analyzer.py": ["/analyzerFunctions.py", "/testInfo.py"], "/visualization/vi... |
86,191 | edward0rtiz/team67-ptp | refs/heads/main | /lib/data/postgresql/process_db.py | """
File to call any data from a RDS instance of postsgresql
to the application
"""
import pandas as pd
import numpy as np
import re
import io
from sqlalchemy import create_engine
host = "xxxxxxxxxxx.us-east-1.rds.amazonaws.com"
port = 5432
user = "xxxxxx"
passc = "xxxxxx"
db = "xxxxxx"
# connDB = create_engine(f"po... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,192 | edward0rtiz/team67-ptp | refs/heads/main | /lib/clustering_analysis_2.py | # Basics Requirements
import pathlib
import os
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objects as go
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output, State, ClientsideFunction
from dash.exceptions import PreventUpdate
fro... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,193 | edward0rtiz/team67-ptp | refs/heads/main | /index.py | # Basics Requirements
import pathlib
import os
import dash
from dash.dependencies import Input, Output, State, ClientsideFunction
from dash.exceptions import PreventUpdate
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objects as go
# Dash Bootstrap Components
import dash_bo... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,194 | edward0rtiz/team67-ptp | refs/heads/main | /lib/recommender_system.py | import pandas as pd
import numpy as np
import os
import dash
from dash.dependencies import Input, Output, State, ClientsideFunction
from dash.exceptions import PreventUpdate
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
from app import app
from .data.data... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,195 | edward0rtiz/team67-ptp | refs/heads/main | /app.py | #######################################################
# Main APP definition.
#
# Dash Bootstrap Components used for main theme and better
# organization.
#######################################################
import dash
import dash_bootstrap_components as dbc
# from flask_caching import Cache
app = dash.Dash(
... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,196 | edward0rtiz/team67-ptp | refs/heads/main | /lib/clustering_analysis.py | # Basics Requirements
import pathlib
import os
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objects as go
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output, State, ClientsideFunction
from dash.exceptions import PreventUpdate
#fr... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,197 | edward0rtiz/team67-ptp | refs/heads/main | /lib/descriptive_analytics.py | # Basics Requirements
import pathlib
import os
import dash
from dash.dependencies import Input, Output, State, ClientsideFunction
from dash.exceptions import PreventUpdate
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objects as go
import pandas as pd
import dash_bootstrap_c... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,198 | edward0rtiz/team67-ptp | refs/heads/main | /lib/data/dataframes_ftr.py | """
File to import csv file in data dir and convert into dataframe
"""
import pandas as pd
import numpy as np
import feather
# from app import cache
# Import payer_id and merchant_id for recommendation system
#filename1 = "data/bdsita.feather"
# @cache.memoize(timeout=120)
def get_db(filename):
df_x = feather.rea... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,199 | edward0rtiz/team67-ptp | refs/heads/main | /lib/data/dataframes.py | """
File to import csv file in data dir and convert into dataframe
"""
import pandas as pd
# from app import cache
filename1 = "data/transaction_merchant.csv"
filename2 = "data/similarities.csv"
filename3 = "data/cluster_test.csv"
filename4 = "data/cluster_cat_names.csv"
df_x = pd.read_csv(filename1)
df_x.rename(
... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,200 | edward0rtiz/team67-ptp | refs/heads/main | /lib/menu.py | # Basics Requirements
import pathlib
import os
import dash
from dash.dependencies import Input, Output, State, ClientsideFunction
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
from datetime import datetime as dt
from app import app
# Gloabl variables
PT... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,201 | edward0rtiz/team67-ptp | refs/heads/main | /lib/data/preprocess_ftr.py | import pandas as pd
import feather
import os
preprocess_mf = __import__("preprocessor").preprocess_mf
preprocess_sf = __import__("preprocessor").preprocess_sf
preprocess_mf3 = __import__("preprocessor").preprocess_mf3
preprocess_var = __import__("preprocessor").preprocess_var
preprocess_mul = __import__("preprocessor"... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,202 | edward0rtiz/team67-ptp | refs/heads/main | /lib/data/preprocessor.py | import pandas as pd
import numpy as np
from IPython.display import Image
import io
import os
import feather
def preprocess_var(bd, var):
"""
Preprocessor a single variable to csv
Args:
bd: Database to preprocess
var: column to extract
"""
filepath_sv = f"team67-ptp/data/{var}.csv"
... | {"/lib/clustering_analysis_2.py": ["/app.py"], "/index.py": ["/app.py"], "/lib/recommender_system.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/clustering_analysis.py": ["/app.py", "/lib/data/dataframes.py"], "/lib/menu.py": ["/app.py"]} |
86,203 | Jennyli-xin/multi-label-classification | refs/heads/master | /backbone/resnext.py | # -*- coding: utf-8 -*-
"""
File resnext.py
@author: ZhengYuwei
"""
from tensorflow import keras
def _conv_bn(**conv_params):
""" 返回设定结构的网络函数(convolution -> batch normalization)
:param conv_params: 包含参数:
filters: 整数,输出的channel数
kernel_size: 卷积核大小,(width, height)
strides: 步长,(width, hei... | {"/utils/generate_txt/generate_txt.py": ["/utils/generate_txt/file_tools.py", "/utils/generate_txt/license_plate_elements.py"]} |
86,204 | Jennyli-xin/multi-label-classification | refs/heads/master | /utils/generate_txt/generate_txt.py | # -*- coding: utf-8 -*-
"""
File file_tools.py
@author:ZhengYuwei
"""
import os
import random
import datetime
import cv2
from utils.generate_txt.file_tools import FileTools
from utils.generate_txt.license_plate_elements import LicensePlateElements
# 所有车牌号图片的根目录
plate_images_root_dir = '/home/data_159/data1/license_pla... | {"/utils/generate_txt/generate_txt.py": ["/utils/generate_txt/file_tools.py", "/utils/generate_txt/license_plate_elements.py"]} |
86,205 | Jennyli-xin/multi-label-classification | refs/heads/master | /backbone/resnet18_v2.py | # -*- coding: utf-8 -*-
"""
File resnet18_v2.py
@author:ZhengYuwei
"""
from tensorflow import keras
def _bn_relu(input_x):
""" 预激活 """
bn = keras.layers.BatchNormalization(axis=ResNet18_v2.CHANNEL_AXIS, momentum=ResNet18_v2.BATCH_NORM_DECAY,
gamma_regularizer=keras.reg... | {"/utils/generate_txt/generate_txt.py": ["/utils/generate_txt/file_tools.py", "/utils/generate_txt/license_plate_elements.py"]} |
86,206 | Jennyli-xin/multi-label-classification | refs/heads/master | /backbone/NA/slimmable_resnet18.py | # -*- coding: utf-8 -*-
"""
File slimmable_resnet18.py
@author:ZhengYuwei
注意:
1. resnet v1中,conv层都是有bias的,resnext则没有,resnet v2部分有部分没有;(但,个人感觉可以全部都不要)
2. resnet v2 使用 pre-activation,resnet和resnext不用;(有没有pre-activation其实差不多,inception加强多一些)
3. 18和34层用2层 3x3 conv层的block,50及以上的用3层(1,3,1)conv层、具有bottleneck(4倍差距)的block
"""
fr... | {"/utils/generate_txt/generate_txt.py": ["/utils/generate_txt/file_tools.py", "/utils/generate_txt/license_plate_elements.py"]} |
86,207 | Jennyli-xin/multi-label-classification | refs/heads/master | /utils/__init__.py | # -*- coding: utf-8 -*-
"""
File __init__.py
@author: ZhengYuwei
功能:
generate_txt:用于根据图片及图片名字(以'_'分割,最后为车牌号),生成标签文件;
check_label_file.py:校验标签文件中,图片路径所指的图片是否存在、可读、且不为空;
draw_tools.py: 绘制混淆图
logger_callback.py:训练logger的回调类;
""" | {"/utils/generate_txt/generate_txt.py": ["/utils/generate_txt/file_tools.py", "/utils/generate_txt/license_plate_elements.py"]} |
86,208 | Jennyli-xin/multi-label-classification | refs/heads/master | /utils/generate_txt/license_plate_elements.py | # -*- coding: utf-8 -*-
"""
File license_plate_elements.py
@author:ZhengYuwei
功能:
定义车牌相关的元素,包括车牌中的字符和车牌类型
一般车牌字符一共7位,新能源车牌8位,故增加一个标志位,表示车牌位数
plate_type_enum为车牌类型,is_exist_plate_enum标记是否存在车牌
"""
class LicensePlateElements(object):
""" 定义车牌相关的元素(车牌字符和车牌类型),以及获取元素的方法
一般车牌字符一共7位,新能源车牌8位,故增加一个标志位,表示车牌位数
plate_... | {"/utils/generate_txt/generate_txt.py": ["/utils/generate_txt/file_tools.py", "/utils/generate_txt/license_plate_elements.py"]} |
86,209 | Jennyli-xin/multi-label-classification | refs/heads/master | /backbone/NA/mobilenet_v2.py | # -*- coding: utf-8 -*-
"""
File mobilenet_v2.py
@author: ZhengYuwei
""" | {"/utils/generate_txt/generate_txt.py": ["/utils/generate_txt/file_tools.py", "/utils/generate_txt/license_plate_elements.py"]} |
86,210 | Jennyli-xin/multi-label-classification | refs/heads/master | /utils/generate_txt/file_tools.py | # -*- coding: utf-8 -*-
"""
File file_tools.py
@author:ZhengYuwei
功能: 文件搜索、复制等工具类
"""
import os
import shutil
import sys
import getopt
class FileTools(object):
""" 文件处理工具类 """
@staticmethod
def mkdir(new_dir):
""" 建立文件夹路径 """
if not os.path.exists(new_dir):
os.makedirs(new... | {"/utils/generate_txt/generate_txt.py": ["/utils/generate_txt/file_tools.py", "/utils/generate_txt/license_plate_elements.py"]} |
86,211 | Jennyli-xin/multi-label-classification | refs/heads/master | /utils/generate_txt/__init__.py | # -*- coding: utf-8 -*-
"""
File __init__.py
@author: ZhengYuwei
""" | {"/utils/generate_txt/generate_txt.py": ["/utils/generate_txt/file_tools.py", "/utils/generate_txt/license_plate_elements.py"]} |
86,212 | ethanwang27/Proxy-Pool | refs/heads/master | /utils/proxy_validators.py | # -*-coding:utf-8-*-
"""
@Author: ethan
@Email: ethanwang279@gmail.com
@Datetime: 2020/8/22 12:54
@File: proxy_validators.py
@Project: Proxy-Pool
@Description: None
"""
import requests
import re
validators = []
def validator(func):
validators.append(func)
return func
@validator
def format_validator(proxy... | {"/handler/proxyHandler.py": ["/helper/proxyHelper.py", "/helper/mongoDbHelper.py"], "/handler/fetcherHandler.py": ["/handler/proxyHandler.py", "/fetcher/proxyFecther.py", "/config.py"], "/falsk_api/proxy_pool_interface.py": ["/handler/proxyHandler.py", "/helper/proxyHelper.py"], "/handler/proxyCheckerHandler.py": ["/h... |
86,213 | ethanwang27/Proxy-Pool | refs/heads/master | /handler/proxyHandler.py | # -*-coding:utf-8-*-
"""
@Author: ethan
@Email: ethanwang279@gmail.com
@Datetime: 2020/8/22 14:00
@File: proxyHandler.py
@Project: Proxy-Pool
@Description: None
"""
from helper.proxyHelper import Proxy
from helper.mongoDbHelper import MongodbHelper
class ProxyHandler(object):
def __init__(self):
super(... | {"/handler/proxyHandler.py": ["/helper/proxyHelper.py", "/helper/mongoDbHelper.py"], "/handler/fetcherHandler.py": ["/handler/proxyHandler.py", "/fetcher/proxyFecther.py", "/config.py"], "/falsk_api/proxy_pool_interface.py": ["/handler/proxyHandler.py", "/helper/proxyHelper.py"], "/handler/proxyCheckerHandler.py": ["/h... |
86,214 | ethanwang27/Proxy-Pool | refs/heads/master | /config.py | # -*-coding:utf-8-*-
"""
@Author: ethan
@Email: ethanwang279@gmail.com
@Datetime: 2020/8/22 14:04
@File: config.py
@Project: Proxy-Pool
@Description: None
"""
# mongoDB 连接
DB_HOST = "localhost"
DB_PORT = 27017
DB_NAME = "proxy_pool"
DB_COLLECTION = "proxy_pool"
MAX_FAIL_COUNT = 3
PROXY_FETCHER_LIST = ['get_kuaidai... | {"/handler/proxyHandler.py": ["/helper/proxyHelper.py", "/helper/mongoDbHelper.py"], "/handler/fetcherHandler.py": ["/handler/proxyHandler.py", "/fetcher/proxyFecther.py", "/config.py"], "/falsk_api/proxy_pool_interface.py": ["/handler/proxyHandler.py", "/helper/proxyHelper.py"], "/handler/proxyCheckerHandler.py": ["/h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.