repo_name stringlengths 5 113 | combined_content stringlengths 88 120M | file_paths listlengths 2 11.1k |
|---|---|---|
0-k-1/TodoMVC2 | from django.db import models
#from django.contrib.auth.models import User
class Todo(models.Model):
title = models.CharField(max_length=50)
completed = models.BooleanField(default=False)
--- FILE SEPARATOR ---
# from django.urls import path
from django.conf.urls import url
from App.views import todoMVC_vi... | [
"/App/models.py",
"/App/urls.py",
"/App/views.py"
] |
0000duck/vrep | #!python3
# -*- coding:utf-8 -*-
import matplotlib.pyplot as plt
import math
import heapq
import time
try:
import vrep
except:
print ('--------------------------------------------------------------')
print ('"vrep.py" could not be imported. This means very probably that')
print ('either "vrep.py" or the... | [
"/entity.py",
"/mission_path_planning_main.py",
"/old_code/5有视觉横向调试.py",
"/repeat.py"
] |
000Justin000/agnav | import os
import sys
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import math, copy, time
import pandas as pd
from transformers import AutoTokenizer
import matplotlib.pyplot as plt
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequen... | [
"/main.py",
"/playground.py",
"/utils.py"
] |
007Saikat/idil_demo | from django import forms
from django.contrib.auth.models import User
from .models import UserDetail
class UserForm(forms.ModelForm):
password=forms.CharField(widget=forms.PasswordInput(attrs={'placeholder':'Enter Password*','class':"form-control"}))
username=forms.CharField(widget=forms.TextInput(attrs={'place... | [
"/idil/basic_app/forms.py",
"/idil/basic_app/migrations/0003_auto_20200817_2347.py",
"/idil/basic_app/migrations/0006_auto_20200819_2225.py",
"/idil/basic_app/models.py",
"/idil/basic_app/urls.py",
"/idil/basic_app/views.py",
"/idil/user_admin/admin.py",
"/idil/user_admin/migrations/0001_initial.py",
... |
00MB/stock-simulation |
line = "\n" + "_" * 50 + "\n"
#globals = {"start" : start, "quit" : quit, "help" : help, "about" : about}
--- FILE SEPARATOR ---
#Python stock market simulator
from globals import *
from bs4 import BeautifulSoup
import requests
def set():
global portfolio
global funds
fileread = open("data.txt", "r"... | [
"/globals.py",
"/stock.py"
] |
00arun00/PyRate | def readGz(f):
import gzip
for l in gzip.open(f):
yield eval(l)
def amazon_purchase_review():
'''
Loads the amazon purchase review data
'''
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split as tts
f_name=('Data/assignment1/train.jso... | [
"/data_loader.py",
"/eval_metrics.py",
"/models.py",
"/pyrate.py"
] |
00ba/LIST | '''
Created on Sep 8, 2016
'''
class Cell:
def __init__(self):
self.cell = []
def get_car(self):
result = self.cell.pop(0)
return result
def set_car(self, n):
self.cell.insert(0, n)
def get_cdr(self):
result = self.cell.pop()
return result
def ... | [
"/list.py",
"/main.py",
"/test_list.py"
] |
00fatal00-dev/rpg-python | import pygame,sys
from player import Player
screen_size = (800, 600)
screen = pygame.display.set_mode(screen_size)
pygame.display.set_caption("Game")
running = True
#Initiating player
player = Player(0, 0, 32, 32, (255, 0, 0), .075, 0, 0)
while running:
player.x += player.move_x
player.y += pl... | [
"/main.py",
"/player.py"
] |
00mjk/GitManager | #!/usr/bin/env python
import sys
from GitManager import main
if __name__ == '__main__':
code = main.main(sys.argv)
sys.exit(code)
--- FILE SEPARATOR ---
from typing import List
import typing
from ..utils import format
from ..repo import description
class Command(object):
""" Flag indicating if this... | [
"/GitManager/__main__.py",
"/GitManager/commands/__init__.py",
"/GitManager/commands/clone.py",
"/GitManager/commands/fetch.py",
"/GitManager/commands/gc.py",
"/GitManager/commands/lister.py",
"/GitManager/commands/pull.py",
"/GitManager/commands/push.py",
"/GitManager/commands/reconfigure.py",
"/... |
00mjk/NMP | import torch
from torch.utils.data import Dataset
from torch.utils.data import DataLoader
import random
import numpy as np
import os
import pickle
import ipdb
from utils import read_roidb, box_id, get_box_feats
class VrdPredDataset(Dataset):
"""docstring for VrdPred"""
def __init__(self, mode = 'train', feat_... | [
"/DataLoader.py",
"/eval_metrics.py",
"/modules.py",
"/preprocess/ass_fun.py",
"/preprocess/extract_vgg_feature.py",
"/preprocess/process.py",
"/preprocess/vgg.py",
"/train_vg.py",
"/utils.py"
] |
00mjk/django-binder | import re
import warnings
from collections import defaultdict
from datetime import date, datetime, time
from contextlib import suppress
from django.db import models
from django.contrib.postgres.fields import CITextField, ArrayField, JSONField
from django.db.models import signals
from django.core.exceptions import Vali... | [
"/binder/models.py",
"/tests/test_file_uploads.py",
"/tests/test_postgres_fields.py",
"/tests/testapp/models/zoo.py"
] |
00mjk/maro | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from .action_shaper import CIMActionShaper
from .agent_manager import DQNAgentManager, create_dqn_agents
from .experience_shaper import TruncatedExperienceShaper
from .state_shaper import CIMStateShaper
__all__ = [
"CIMActionShaper",
"DQ... | [
"/examples/cim/dqn/components/__init__.py",
"/examples/cim/dqn/components/agent.py",
"/examples/cim/dqn/components/agent_manager.py",
"/examples/cim/dqn/components/config.py",
"/examples/cim/dqn/dist_actor.py",
"/examples/cim/dqn/dist_learner.py",
"/examples/cim/dqn/single_process_launcher.py",
"/exam... |
00mjk/pretalx-youtube | from django.apps import AppConfig
from django.utils.translation import gettext_lazy
class PluginApp(AppConfig):
name = "pretalx_youtube"
verbose_name = "YouTube integration"
class PretalxPluginMeta:
name = gettext_lazy("YouTube integration")
author = "Toshaan Bharvani"
description... | [
"/pretalx_youtube/apps.py",
"/pretalx_youtube/forms.py",
"/pretalx_youtube/recording.py",
"/pretalx_youtube/signals.py",
"/pretalx_youtube/urls.py",
"/pretalx_youtube/views.py"
] |
00mjk/qe-qhipster | import os
import subprocess
from zquantum.core.interfaces.backend import QuantumSimulator
from zquantum.core.circuit import save_circuit
from zquantum.core.measurement import (
load_wavefunction,
load_expectation_values,
sample_from_wavefunction,
Measurements,
)
from .utils import save_symbolic_operato... | [
"/src/python/qeqhipster/simulator.py",
"/src/python/qeqhipster/simulator_test.py",
"/src/python/qeqhipster/utils.py"
] |
00mjk/quantum-espresso-wrapper | import numpy as np
from osp.core.namespaces import QE
from osp.core.utils import pretty_print
from osp.wrappers.quantumespresso.qe_session import qeSession
# Creates simulation
sim = QE.Simulation()
k = QE.K_POINTS(vector6 = (7, 7, 7, 0, 0, 0), unit = "")
# Creates a cell, the element Silicon, a pseudopotential, two ... | [
"/examples/Si_simple.py",
"/examples/pw_short_example.py",
"/examples/pw_short_example_osp.py",
"/osp/wrappers/quantumespresso/qe_engine.py",
"/osp/wrappers/quantumespresso/qe_session.py",
"/osp/wrappers/quantumespresso/qe_utils.py",
"/setup.py"
] |
00ricardo/Experimental-Methods-in-Computer-Science-Project | #!/usr/bin/env python3
# Synopsis
# ./gen_workload.py num_procs mean_io_bursts mean_iat min_CPU max_CPU min_IO max_IO
# Description
# Generate workload for CPU scheduler simulation.
# Interarrival times follow an exponential distribution with mean lambda.
# CPU and I/O bursts
#
# Workload format: one ... | [
"/gen_workload.py",
"/run_tests.py",
"/simulator.py"
] |
01-2/lotte_error_deposit | import pandas as pd
import datetime
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lotte_error_deposit.settings")
import django
django.setup()
from parsed_total_data.models import TotalData, SeasonData
'''
SO(Strike Outs/500) & DP(Double Plays/1000) : http://www.statiz.co.kr/stat.php?re=0&lr=5
HR... | [
"/crawl_total_stats.py",
"/dispDeposit/apps.py",
"/dispDeposit/views.py",
"/parsed_total_data/admin.py",
"/parsed_total_data/apps.py",
"/parsed_total_data/migrations/0001_initial.py",
"/parsed_total_data/migrations/0002_auto_20191125_1404.py",
"/parsed_total_data/migrations/0003_totaldata_totalmoney.p... |
010404/SS-pytorch-mine | import os
import cv2
import argparse
import Augmentor
#文件路径
parser = argparse.ArgumentParser()
parser.add_argument('--Images', type=str, default='D:/untitled/.idea/SS_torch/Augmentor_img', help='true picture')
parser.add_argument('--final', type=str, default='D:/untitled/.idea/SS_torch/Augmentor_img/output... | [
"/data more.py",
"/maketxt.py",
"/mobilenet_.py",
"/predict_.py",
"/segnet_.py",
"/training.py",
"/validation.py"
] |
01662024622/teacher_ratting_aggregation | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import math
import os
import time
from datetime import datetime
from sqlalchemy import create_engine, text
from sqlalchemy.orm import sessionmaker
from teacher_rate import TeacherRate
start_time = None
# config_time = int(os.environ["CONFIG_TIME_1578790800"])
config_time... | [
"/main.py",
"/teacher_rate.py",
"/test.py"
] |
02GAURAVTRIPATHI/GroceryBag | from django.contrib import admin
from .models import ListModel
# Register your models here.
admin.site.register(ListModel)
--- FILE SEPARATOR ---
# Generated by Django 3.1.3 on 2021-07-25 15:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('testapp'... | [
"/templateproject1/testapp/admin.py",
"/templateproject1/testapp/migrations/0002_listmodel_created_at.py",
"/templateproject1/testapp/models.py",
"/templateproject1/testapp/views.py"
] |
02bx/Flerken | #!/usr/bin/python
# -*-coding:utf-8-*-
__author__ = 'Yao Zhang & Zhiyang Zeng'
__copyright__ = "Copyright 2019, Apache License 2.0"
import sys
import os
sys.path.append('../flerken/control')
from smart_detect import smart_detect
LINUX_SAMPLE_PATH = 'samples/linux.txt'
WIN_SAMPLE_PATH = 'samples/win.txt'
OUTPUT_PAT... | [
"/coverage/coverage_test.py",
"/flerken/__init__.py",
"/flerken/config/global_config.py",
"/flerken/control/plugins/custom_meta_chars_plugin.py",
"/flerken/control/plugins/linux_generic_detect_plugin.py",
"/flerken/control/plugins/linux_generic_filter_plugin.py",
"/flerken/control/plugins/linux_graphic_... |
03pie/TF2_stduy | #!/usr/bin/python3.7
# -*- coding: utf-8 -*-
# Copyright (C) 2021 03pie, Inc. All Rights Reserved
#
# @Time : 2021/5/8 14:34
# @Author : 03pie
# @Email : 1139004179@qq.com
# @File : cnn_Model.py
# @Software: PyCharm
# @Description :
import tensorflow as tf
from tensorflow.keras.models import Model
from tensor... | [
"/cnn_Model.py",
"/train.py"
] |
044cretorr1/lab1 |
def get_bank():
"""отримує данні по банкам
Returns:
bank_list : список банків
"""
from_file = [
"110;ІНКО",
"120;АЖІО",
"130;Градобанк",
"140;Відродження",
"150;Укрінбанк",
]
# накопичувач рядків
bank_list = []
for line in from_file:
line_lis... | [
"/data_service.py",
"/main.py",
"/process_data.py"
] |
051mym/django_heroku_example | from django import forms
from myapp.models import Dreamreal
class LoginForm(forms.Form):
username = forms.CharField(max_length = 100,widget=forms.TextInput(attrs={'placeholder': 'Username'}))
password = forms.CharField(widget = forms.PasswordInput())
class ProfileForm(forms.Form):
name = forms.CharField(max_... | [
"/myapp/forms.py",
"/myapp/migrations/0003_remove_dreamreal_online.py",
"/myapp/models.py",
"/myapp/urls.py",
"/myapp/views.py"
] |
06opoTeHb/VKTelegramPhonesFinder | import sqlite3
class DatabaseWorker:
def __init__(self):
self.db = sqlite3.connect('DB_name.db')
self.cursor = self.db.cursor()
def addUser(self, user: dict):
query = "INSERT INTO vk_users (id"
values = [user['id']]
if 'mobile_phone' in user.keys():
query +=... | [
"/Workers/DatabaseWorker.py",
"/Workers/TelegramWorker.py",
"/Workers/VKUsersWorker.py",
"/index.py"
] |
06opoTeHb/onion_eye | import os
from flask import Flask
from celery import Celery
import redis
from .config import Config
celery = Celery(
__name__,
broker=Config.BROKER_URL,
backend=Config.RESULT_BACKEND
)
def create_app():
app = Flask(__name__)
app.config.from_object(Config)
Config.init_app(app)
# ensu... | [
"/onion_eye/__init__.py",
"/onion_eye/api/views.py",
"/onion_eye/celery_worker.py",
"/onion_eye/config.py",
"/onion_eye/tasks.py",
"/onion_eye/utils.py",
"/onion_eye/web/views.py"
] |
07Abhinavkapoor/Twitter-Bot | import tweepy
import config
import time
import tbot
class TwitterBot:
"""
To create and run a twitter bot.
Methods:
authorize - To verify the user.
get_last_mention_id - To get the last mention id, which is already seen.
write_last_mention_id - To update the last seen mention id.
activate... | [
"/app.py",
"/tbot.py"
] |
07spider70/analyze_jupy | re_how_m_times = 'was login %d times in last %d days'
input_l='Date in english format: '
name_l='Input name: '
days_l = 'Number of days: '
--- FILE SEPARATOR ---
re_how_m_times = 'bol/a prihlaseny/a %d krat za poslednych %d dni'
input_l='Datum v en formate: '
name_l = 'Zadaj meno: '
days_l = 'Pocet dni: '
--- FI... | [
"/lang_set_en.py",
"/lang_set_sk.py",
"/lib.py",
"/main_app.py"
] |
085astatine/togetter | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import togetter
if __name__ == '__main__':
print('TogetterSample')
# logger setting
logger = logging.getLogger('TogetterSample')
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
handler.formatter = logging.Formatte... | [
"/get_sample.py",
"/togetter/__init__.py",
"/togetter/togetter.py",
"/togetter/togetter_page.py",
"/togetter/togetter_page_parser.py",
"/togetter/togetter_user_page.py",
"/togetter/tweet.py",
"/togetter/webpage.py",
"/togetter/xml_tools.py"
] |
0890866/karelapple | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-16 18:43
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... | [
"/apple/migrations/0001_initial.py",
"/apple/migrations/0002_auto_20170116_1949.py",
"/apple/models.py",
"/apple/urls.py",
"/apple/views.py",
"/website/urls.py"
] |
08haganh/crystal_interactions_finder_hh | '''
File to store Atom class
Attributes
- symbol; string; 'C', 'N'
- type; string; C.ar
- coordinates; np.array; array([1,0,0])
- vdw_radius; float
- mass; float
- label; string
- bonds; list; list of bond objects
- neighbour; list; list of atom objects
- interaction_dict; dictionary; dictionary of interaction types t... | [
"/PYTHON/Atom.py",
"/PYTHON/Bond.py",
"/PYTHON/Crystal.py",
"/PYTHON/Geometry.py",
"/PYTHON/Interaction.py",
"/PYTHON/Molecule.py",
"/PYTHON/Viz.py",
"/PYTHON/io.py",
"/PYTHON/utils.py",
"/example_script.py"
] |
091labs/access-control | from flask import Flask
from flask_login import LoginManager
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config.from_object('config')
db = SQLAlchemy(app)
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'login'
login_manager.login_message_category = 'warnin... | [
"/access/__init__.py",
"/access/constants.py",
"/access/forms.py",
"/access/models.py",
"/access/views.py",
"/adduser.py",
"/config.py",
"/daemon.py",
"/db_create.py",
"/ds1307_autoconfigure.py",
"/removeuser.py",
"/run_flask.py",
"/userlist.py"
] |
097karimi/face-recognition-opencv-python | import cv2 as cv
class FaceDetector:
"""The class can detect human face in the pictures or videos and save them
as a picture in a folder which name is 'imagesdb'."""
def __init__(self, xml_file, idnum):
self.detector = cv.CascadeClassifier(cv.data.haarcascades + xml_file)
self.id_... | [
"/detection/detection.py",
"/main.py",
"/prediction/prediction.py",
"/training/training.py"
] |
0996736Ilias/L1_P1 | from component import Component
from screen import Screen
class App(Component):
# Globals
# ==========================================================
# Whether development mode should be enabled.
# Development mode add debugging tools
devMode = False
# All registered module obje... | [
"/app.py",
"/game_screen.py",
"/module.py",
"/modules.py",
"/score.py",
"/start_screen.py"
] |
09981152473/tsetmc_state | MAIN_URL = "http://www.tsetmc.ir/Loader.aspx?ParTree=15"
--- FILE SEPARATOR ---
import requests as rq
from bs4 import BeautifulSoup
from tsetmc_state.constants import MAIN_URL
class market:
def state():
html_data=rq.get(MAIN_URL, timeout=5).text
soup = BeautifulSoup(html_data, 'html.par... | [
"/tsetmc_state/constants.py",
"/tsetmc_state/market_state.py"
] |
09ubberboy90/WadThePlanet | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from planet.models import Planet, PlanetUser, SolarSystem, Comment
#from planet.forms import CustomUserCreationForm
# Register your models here.
admin.site.register(PlanetUser)
admin.site.register(Planet)
admin.site.register(SolarSystem)
... | [
"/planet/admin.py",
"/planet/forms.py",
"/planet/models.py",
"/planet/templatetags/wdp_tags.py",
"/planet/tests.py",
"/planet/urls.py",
"/planet/views.py",
"/planet/webhose_search.py",
"/populate_planet.py"
] |
0CBH0/Gocollection | # -*- coding:utf-8 -*-
import pandas, re, csv
class GoNode:
Level = 0
Relation= ''
ID = ''
Description = ''
def __init__(self, lv=0, rel='', id='', desc=''):
self.Level = lv
self.Relation = rel
self.ID = id
self.Description = desc
class GoTerm:
term = ''
par= []
son = []
def __ini... | [
"/DAGConstruct.py",
"/Gocollection/items.py",
"/Gocollection/pipelines.py",
"/Gocollection/spiders/basic.py",
"/Gocollection/spiders/test.py"
] |
0Cristofer/forca_bot | #Contem todo o gerenciamento do banco de dados
#Imports
from operator import itemgetter, attrgetter, methodcaller
from google.appengine.ext import ndb
#BD que grava as palavras
class Chats(ndb.Model):
chats = ndb.StringProperty(repeated=True)
def checkChat(chat_id):
c = ndb.Key(Chats, 'chats').get()
if n... | [
"/bds.py",
"/game.py",
"/main.py",
"/preGame.py"
] |
0FuzzingQ/PScanner | # -*- coding: utf-8 -*-
import threading
def get_host(target_list):
host_scan_thread = []
if len(target_list) < 4:
for target in target_list:
t = Thread(target = scan_host, args =(target,))
host_scan_thread.append(t)
t.start()
else:
infest = ... | [
"/core/host.py",
"/core/port.py",
"/lib/param.py",
"/main.py"
] |
0HJ0/Keynesian-beauty-contest | import random as rd
import numpy as np
class Agent:
def __init__(self, maxNum, agentNum, agentIndex):
self.name='Parent'
def getAns(self, Answers:list, Rewards:list):
return 0
class randomAgent(Agent):
def __init__(self, maxNum, agentNum, agentIndex):
self.name='Random'
... | [
"/Agents.py",
"/DQNAgent.py",
"/LSTMAgent.py",
"/NNAgent.py",
"/drawgraph(execute in same dir).py",
"/drawgraph(execute in same dir, for survival of fittest).py",
"/env.py",
"/main.py",
"/makeNewPop.py"
] |
0Hughman0/ezlock | __version__ = '0.1.3'
from .lock import Lock, LockError
--- FILE SEPARATOR ---
from pathlib import Path
import os
import time
import atexit
class LockError(Exception):
pass
class Lock:
def __init__(self, path='.lock', release_on_exit=False):
"""
Lock object that keeps tra... | [
"/ezlock/__init__.py",
"/ezlock/lock.py",
"/tests/checklock.py",
"/tests/dolock.py",
"/tests/test_ezlock.py"
] |
0Hughman0/unitee | import pytest
from unitee import SI
def test_construct():
m1 = SI.m2
m2 = SI('m2')
m3 = SI('1 m2')
m4 = 1 * SI('m2')
assert m1 == m2 == m3 == m4
def test_parsing():
assert SI.parse_name('km') == ('k', 'm')
assert SI.parse_name('C') == ('', 'C')
assert SI.parse_name('GC') == ... | [
"/tests.py",
"/unitee/__init__.py",
"/unitee/unitee.py"
] |
0LL13/kleine-rechenschule | from django import forms
from django.core.exceptions import ValidationError
class AnswerForm(forms.Form):
answer_1 = forms.IntegerField(label='answer', required=False)
answer_2 = forms.IntegerField(label='answer', required=False)
answer_3 = forms.IntegerField(label='answer', required=False)
answer_4 =... | [
"/krs/forms.py",
"/krs/tests.py",
"/krs/urls.py",
"/krs/views.py"
] |
0Lilymoon0/CS-1.2-Frequency-Counter | from LinkedList import LinkedList
class HashTable:
def __init__(self, size):
self.size = size
self.arr = self.create_arr(size)
def create_arr(self, size):
temp = []
for i in range(size):
temp.append(LinkedList())
return temp
def hash_func(self, key):
key_length = len(... | [
"/HashTable.py",
"/LinkedList.py"
] |
0Monster0/Python | # -*- coding: utf-8 -*-
# @Time : 2018/4/6 14:00
# @File : Demo.py
from Algorithm.Sort.generateArrayHelper import generateArray
class SortAlgorithm(object):
def __init__(self, lists):
self.lists = lists
def selection_sort(self):
for j in range(len(self.lists)):
# 寻找最小值
... | [
"/Algorithm/Demo.py",
"/Algorithm/Search/BinarySearch.py",
"/Algorithm/Search/SequentialSearch.py",
"/Algorithm/Sort/BubbleSort.py",
"/Algorithm/Sort/HeapSort.py",
"/Algorithm/Sort/InsertSort.py",
"/Algorithm/Sort/MergeSort.py",
"/Algorithm/Sort/QuickSort.py",
"/Algorithm/Sort/RadixSort.py",
"/Alg... |
0Ndev/django-basic-form | from django.shortcuts import render
from basicapp import forms
# Create your views here.
def index(req):
return render(req, 'index.html')
def form_name_view(req):
form = forms.FormBasic()
if req.method == 'POST':
form = forms.FormBasic(req.POST)
if form.is_valid():
print("... | [
"/basicapp/views.py",
"/user_form/views.py"
] |
0Sunray0/stepik_final_task | from .base_page import BasePage
from .locators import BasketPageLocators
class BasketPage(BasePage):
def should_be_empty_basket(self):
assert self.is_not_element_present(*BasketPageLocators.PRODUCT_IN_THE_BASKET), \
"The product is in the basket, but the cart must be empty"
def should_be_... | [
"/pages/basket_page.py",
"/pages/locators.py",
"/pages/login_page.py",
"/pages/product_page.py"
] |
0Zeta/RockPaperScissors | import operator
import numpy as np
import pandas as pd
import cmath
from collections import namedtuple
from rpskaggle.helpers import Policy, one_hot, EQUAL_PROBS
class AntiGeometryPolicy(Policy):
"""
a counter to the popular Geometry bot
written by @robga
adapted from https://www.kaggle.com/robga/bea... | [
"/rpskaggle/agents/anti_geo.py",
"/rpskaggle/agents/geometry_agent.py",
"/rpskaggle/agents/greenberg_policy.py",
"/rpskaggle/agents/multi_armed_bandit.py",
"/rpskaggle/agents/naive_agent.py",
"/rpskaggle/agents/neural_policy_ensemble.py",
"/rpskaggle/agents/rpscontest_bots.py",
"/rpskaggle/agents/seed... |
0andme/Python-Shooting-Game | import pygame
from Dic import *
from Values import *
def BackGround(ongame, Gameover):
if not Gameover:
if ongame: # 게임 진행 중
bg = []
bg.append(pygame.image.load(img_Dic+'bg.jpg'))
bg.append( pygame.image.load(img_Dic+'bg.jpg'))
else : # 게임 대기 화면
bg ... | [
"/Background.py",
"/Dic.py",
"/Gun.py",
"/Healkit.py",
"/Heart.py",
"/Jelly.py",
"/Player.py",
"/Sound.py",
"/System.py",
"/Values.py",
"/main.py"
] |
0atman/THE-GRID | #!/usr/bin/env python
import argparse
import json
import requests
import tortilla
import click
from pygments.lexers import HaskellLexer
from prompt_toolkit import prompt
from prompt_toolkit.styles import style_from_dict
from prompt_toolkit.token import Token
from prompt_toolkit.layout.lexers import PygmentsLexer
from... | [
"/cli.py",
"/command.py",
"/old/design.py",
"/old/grid.py",
"/old/help_system.py",
"/old/player.py",
"/old/repl.py",
"/player.py",
"/spiral.py",
"/stord.py",
"/test.py",
"/ui.py",
"/web.py",
"/world.py"
] |
0b11stan/certificator | import os
import OpenSSL.crypto
from OpenSSL.crypto import FILETYPE_PEM
def get_pending_cert(cert_id):
csr_file = open("certificates/pending/{}.csr".format(cert_id), "r")
file_content = csr_file.read()
return OpenSSL.crypto.load_certificate_request(FILETYPE_PEM, file_content)
def issue_cert(cert_id):
... | [
"/cert_utils.py",
"/main.py",
"/user.py",
"/utils.py"
] |
0bruhburger0/bot_wow | import discord, config, asyncio, system, math
from discord.ext import commands
from operator import itemgetter
from db import history_customer, history_executor, ended, update8, update9, not_conf, active_orders_customer, active_orders_executor, get_order_id, get_order, get_executor, get_customer, update, cerate_executo... | [
"/main.py",
"/system.py"
] |
0bruhburger0/job_bot | from django.contrib import admin
from .models import Resume, Vacancy, Questions
@admin.register(Resume)
class ResumeAdmin(admin.ModelAdmin):
list_display = ('tg_id', 'position', 'contacts', 'money', 'experience', 'education', 'skills',
'info', 'portfolio_url', 'status')
@admin.register(Vacan... | [
"/main/admin.py",
"/main/management/commands/bot.py",
"/main/management/commands/bot_general.py",
"/main/management/commands/buttons.py",
"/main/management/commands/config.py",
"/main/management/commands/testing.py",
"/main/migrations/0001_initial.py",
"/main/migrations/0002_auto_20200515_1112.py",
... |
0dminnimda/Physical_simulation | import numpy as np
import time
import cv2 as cv
from functools import reduce
import random as ra
def add_vec(v, w):
return [vi + wi for vi, wi in zip(v, w)]
def sum_vec(*vecs):
return reduce(add_vec, vecs)
def ve_l(a):
return np.linalg.norm(a)
def v_vec(r,m,step):
k = ve_l(r)**3/m
r[0]=r[0]/k*s... | [
"/oop_phy.py",
"/oop_phy_pyg_values.py",
"/oop_phy_pygame.py",
"/physical_simulation.py",
"/модуль1 (2).py",
"/модуль1.py"
] |
0dminnimda/Vector_class | from vect_class import Vector
import pygame as pg
from pygame.locals import *
from pygame_draw import pyg_draw
from math import ceil, floor, sin, cos, pi, tau, tan
pd = pyg_draw(1)
w, h = pd.cen()
clo = pd.clock
arr = []
v = Vector([200, 0], [w, h])
v1 = Vector([0, 300], v.e)#[w, h])
a = v.copy()#.inv(0, ret=1)
a1 =... | [
"/vec_vis.py",
"/vect_class.py"
] |
0dminnimda/brawlpython | # -*- coding: utf-8 -*-
__version__ = "2.6.0"
__name__ = "brawlpython"
from .api import API
from .clients import AsyncClient, SyncClient
__all__ = (
"AsyncClient",
"SyncClient",
"API")
--- FILE SEPARATOR ---
# -*- coding: utf-8 -*-
from .api_toolkit import make_headers
from .typedefs import STRDICT
... | [
"/brawlpython/__init__.py",
"/brawlpython/api.py",
"/brawlpython/api_toolkit.py",
"/brawlpython/base_classes.py",
"/brawlpython/cache_utils.py",
"/brawlpython/clients.py",
"/brawlpython/exceptions.py",
"/brawlpython/sessions.py",
"/brawlpython/typedefs.py",
"/examples/async_client.py",
"/example... |
0dminnimda/translation_comparator | import cython
def test():
p: cython.int[1000] = [0] * 1000
p[0] = 100
--- FILE SEPARATOR ---
from pathlib import Path
from translation_comparator import show_via_vscode
from translation_comparator.cython import settings
from translation_comparator.cython.with_cython import cythonize_and_compare
# we use... | [
"/examples/cython/array.py",
"/examples/cython/run_cython_comparison.py",
"/setup.py",
"/translation_comparator/__init__.py",
"/translation_comparator/comparison_helpers.py",
"/translation_comparator/cython/__init__.py",
"/translation_comparator/cython/annotated_html_parser.py",
"/translation_comparat... |
0ffkilter/Welp | from welp import welp
if __name__ == '__main__':
welp.run(debug=True)
--- FILE SEPARATOR ---
from flask import Flask
welp = Flask(__name__)
welp.config.from_object('welp.config.Config')
from welp import views
--- FILE SEPARATOR ---
from flask.ext.wtf import Form
from wtforms import TextField, PasswordField,... | [
"/run.py",
"/welp/__init__.py",
"/welp/forms.py",
"/welp/templates/forms.py",
"/welp/views.py"
] |
0fftheground/fan-fault_lab | from model._globals import Config
import logging
import os
import sys
config = Config('config.yaml')
def make_dirs(_id):
'''Create directories for storing data in repo (using datetime ID) if they don't already exist'''
paths = ['result', 'result/%s' % _id, 'result/%s/models' % _id]
for p in paths:
... | [
"/model/helpers.py",
"/model/modeling.py",
"/run.py",
"/utils/__init__.py",
"/utils/preprocessing/__init__.py",
"/utils/preprocessing/preprocessor.py"
] |
0gravity000/Python_Django_sample | from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse_lazy
from ..models import Diary
class LoggedInTestCase(TestCase):
"""各テストクラスで共通の事前準備処理をオーバーライドした独自TestCaseクラス"""
def setUp(self):
"""テストメソッド実行前の事前設定"""
# テストユーザーのパスワード
sel... | [
"/Chapter11/private_diary/diary/tests/test_views.py",
"/Chapter13/private_diary/private_diary/urls.py",
"/Chapter8/private_diary/diary/forms.py",
"/Chapter8/private_diary/diary/views.py"
] |
0grre/GSS-Project | class Author:
def __init__(self, name, mail, phone, avatar, link=None):
self.name = name
self.mail = mail
self.phone = phone
self.avatar = avatar
self.link = link
def get_author(self):
return [self.name, self.mail, self.phone, self.avatar, self.link]
--- FILE ... | [
"/Class/Author.py",
"/Class/Index.py",
"/generator.py",
"/utils/func.py",
"/utils/html_block.py"
] |
0k/kids.common | # -*- coding: utf-8 -*-
# Package placeholder
from __future__ import print_function
import itertools
from .inspect import get_valued_prototype, call_with_valued_prototype
def multi(margs):
"""Demultiply execution of a function along given argument.
This offers support on specified argument of multiple val... | [
"/src/kids/common/decorator.py",
"/src/kids/common/exc.py",
"/src/kids/common/inspect.py"
] |
0kai/OpenData | # encoding: utf-8
from opendatatools import hedgefund
if __name__ == '__main__':
hedgefund.set_proxies({"https" : "https://127.0.0.1:1080"})
# 登录
user_info, msg = hedgefund.login('18612562791', 'a123456')
# 加载数据
#hedgefund.load_data()
# 获取私募基金列表
#df, msg = hedgefund.get_fund_list()
... | [
"/example/hedgefund_demo.py",
"/opendatatools/hedgefund/__init__.py",
"/opendatatools/hedgefund/hedgefund_interface.py",
"/opendatatools/realestate/realestate_interface.py"
] |
0l9h/Calculator-with-PyQt | class AvoidBugs():
def delFirstZero(self):
if str(self.line)[0] == '0' and len(str(self.line)) > 1:
self.line = self.line[1:] # if number starts with '0' and != 0, delete first this zero
def killExcessiveElement(self):
if len(self.values_list) == 3: # deletes ex... | [
"/debug.py",
"/interface.py",
"/logic.py",
"/operations.py"
] |
0lEV/btc_wallet_management | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^balance$', views.check_balance, name='balance'),
url(r'^newaddress$', views.get_new_address, name='new_address'),
url(r'^addresses$', views.get_addresses, name='addresses'),
url(r'^ac... | [
"/wallets/urls.py",
"/wallets/utils.py",
"/wallets/views.py"
] |
0lddriv3r/djangobbs_nmb | import pymysql
pymysql.version_info=(1,3,13,"final",0)
pymysql.install_as_MySQLdb
--- FILE SEPARATOR ---
from django.contrib import admin
from .models import Thread, User, Black, Comment, Category
# Register your models here.
class UserAdmin(admin.ModelAdmin):
list_display = ('username', 'password', 'email', ... | [
"/devproject/__init__.py",
"/devproject/admin.py",
"/devproject/apps.py",
"/devproject/forms.py",
"/devproject/migrations/0001_initial.py",
"/devproject/migrations/0002_thread_lastthreadid.py",
"/devproject/migrations/0003_auto_20190406_1956.py",
"/devproject/migrations/0003_remove_thread_lastthreadid... |
0lidaxiang/drugManager | from rest_framework import serializers
from drug.models import Drug
from django.utils import timezone
# from jike.files.serializers import ModuleFileSerializer
# import logging
# logger = logging.getLogger('main')
class DrugSerializer(serializers.ModelSerializer):
# createTime = serializers.CharField(write_on... | [
"/api/serializers.py",
"/api/urls.py",
"/drug/filters.py",
"/drug/models.py",
"/drug/urls.py",
"/drug/views.py",
"/drugManager/urls.py"
] |
0lut/blg453e-hw1 |
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt5agg import \
FigureCanvasQTAgg as FigureCanvas
from PyQt5.QtWidgets import (QAction, QDesktopWidget, QFileDialog, QMainWindow,
QSizePolicy)
import utils
from hist_match import calculate_hist, match_histogram
class G... | [
"/gui.py",
"/hist_match.py",
"/utils.py"
] |
0mars/esengine | extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon'
]
source_suffix = '.rst'
master_doc = 'index'
project = 'ESEngine'
copyright = '2015, catholabs.com'
author = 'CathoLabs'
version = 'latest'
release = 'latest'
html_theme = 'sphinx_rtd_theme'
--- FILE SEPARATOR ---
__version__ = '0.1.0'
from ese... | [
"/docs/conf.py",
"/esengine/__init__.py",
"/esengine/bases/document.py",
"/esengine/bases/field.py",
"/esengine/bases/metaclass.py",
"/esengine/bases/py3.py",
"/esengine/bases/result.py",
"/esengine/document.py",
"/esengine/embedded_document.py",
"/esengine/exceptions.py",
"/esengine/fields.py",... |
0mco/shadowsocksR | def getKeys(key_list):
return key_list
#return key_list + ['plan'] # append the column name 'plan'
def isTurnOn(row):
return True
#return row['plan'] == 'B' # then judge here
--- FILE SEPARATOR ---
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 clowwindy
#
# Licensed under th... | [
"/misc/switchrule.py",
"/shadowsocks/bin/client.py",
"/shadowsocks/core/command.py",
"/shadowsocks/core/network.py",
"/shadowsocks/core/service.py",
"/shadowsocks/lib/config.py",
"/shadowsocks/lib/shell.py",
"/shadowsocks/lib/ssrlink.py",
"/shadowsocks/plugins/speedtest.py",
"/shadowsocks/plugins/... |
0meou0/Web_Application | # -*- coding: utf-8 -*-
from tornado.web import RequestHandler, Finish
import re
import jieba
import os
from pyltp import Segmentor, SentenceSplitter, NamedEntityRecognizer, Parser, Postagger
from typing import List, Dict
import difflib
import math
from itertools import product, count
from string import punctuation
f... | [
"/app/__init__.py",
"/app/project1.py",
"/app/project2.py",
"/run.py"
] |
0mk1/simple-aws-watchdog | import logging
import time
from datetime import datetime, timedelta
from .config import DynamoDBConfig
from .notifications import SNS
from .utils import check_and_heal_service
__all__ = ['aws_watchdog']
logger = logging.getLogger(__name__)
def aws_watchdog(config_id):
"""AWS watchdog function. Health check f... | [
"/aws_watchdog/__init__.py",
"/aws_watchdog/config.py",
"/aws_watchdog/notifications.py",
"/aws_watchdog/utils.py",
"/setup.py"
] |
0ooops/RecipeFinder | from flask import Flask, render_template, redirect, url_for, request
import datetime
import json
import csv
import io
import re
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def get_recipe():
if request.method == 'POST':
# Check if both files exist
try:
file_ing = re... | [
"/recipes/main.py",
"/tests/test.py"
] |
0ps/VulScanner | from django.apps import AppConfig
class PwdmodelConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'PwdModel'
--- FILE SEPARATOR ---
from django.db import models
# Create your models here.
class Pwd(models.Model):
system = models.CharField(max_length=100, default="")
u... | [
"/PwdModel/apps.py",
"/PwdModel/models.py",
"/ScanTaskModel/migrations/0012_scantask_group.py",
"/ServiceScanModel/migrations/0007_auto_20210728_1525.py",
"/ServiceScanModel/migrations/0009_alter_servicescan_isvpn.py",
"/VulnScanModel/migrations/0009_vulnscan_cookies.py",
"/vulscan_Project/json.py",
"... |
0r3k1/youtube_downloader | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import wx, time, threading, os, yt, webbrowser
import wx.adv
from wx.lib.scrolledpanel import ScrolledPanel
from utilidades import children, _opt, exist_dir, back_dir, get_query
from option import optionFrame
from sqlite_3 import sqlite_3
from panel import panel
... | [
"/main.py",
"/option.py",
"/panel.py",
"/sqlite_3.py",
"/utilidades.py",
"/yt.py"
] |
0scarlau/mosaic | from flask import Flask, render_template, request
from src.utils.image import TargetImage, TileImages, MosaicImage
import os
import time
app = Flask(__name__, static_folder='')
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 0
@app.route('/')
@app.route('/home')
def mosaic_main():
tile_folders = os.listdir(os.path.join... | [
"/mosaic_app.py",
"/src/config/config.py",
"/src/mosaic.py",
"/src/utils/image.py",
"/src/utils/processor.py"
] |
0sn/nr_storylines | from django.contrib import admin
from models import Storyline
class StorylineAdmin(admin.ModelAdmin):
list_display = ('title','total','first','last')
prepopulated_fields = {'slug': ('title',),}
filter_vertical = ('comics',)
def total(self, obj):
"""
Returns number of comics as... | [
"/admin.py",
"/models.py",
"/templatetags/storyline.py",
"/urls.py"
] |
0student0/project_blog | from django.db import models
from django.urls import reverse
class Post(models.Model):
title = models.CharField(max_length=200)
slug = models.SlugField(max_length=100, unique=True)
image = models.ImageField(upload_to='blog/')
text = models.TextField()
draft = models.BooleanField("Черновик", default=False)
creat... | [
"/blog/models.py",
"/blog/views.py"
] |
0sunny/pyp-c4-a1-b4-g3-t1 | """The file to test the package pyp_database."""
import logic as l
import pyp_database as pdb
print pdb.show_databases()
#db = pdb.use('testdb.db')
#print pdb.show_tables()
tb = l.Table('test', ('a','b','c'))
#db = l.Database('testdb')
#db.create_table('new', ('a','b','c'))
#db.new.insert((1,2,3))
#print db.new... | [
"/db_usage.py",
"/exceptions.py",
"/logic.py",
"/pyp_database.py"
] |
0swin/Spammr-Bot | import tweepy
import telebot
from config import *
telegram = telebot.TeleBot(tgToken)
auth = tweepy.OAuthHandler(twConsumerKey, twConsumerSecret)
auth.secure = True
auth.set_access_token(twAccessToken, twAccessTokenSecret)
twitter = tweepy.API(auth)
registeredUser = True
# SCRIPT
def listener(messages):
global r... | [
"/SpammerBot.py",
"/config.py",
"/telebot/__init__.py",
"/telebot/apihelper.py",
"/telebot/types.py"
] |
0therGuys/about-time | # coding=utf-8
from __future__ import absolute_import, division, unicode_literals
import sys
from .core import about_time
from .human import duration_human, throughput_human
VERSION = (3, 1, 1)
__author__ = 'Rogério Sampaio de Almeida'
__email__ = 'rsalmei@gmail.com'
__version__ = '.'.join(map(str, VERSION))
__all... | [
"/about_time/__init__.py",
"/about_time/core.py",
"/about_time/human.py",
"/tests/test_about_time.py"
] |
0uMuMu0/DAE-For-TianChi | # coding=utf-8
import os
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import input_data_dae
from tensorflow.python.saved_model import builder as saved_model_builder
from tensorflow.python.client import device_lib
flags = tf.flags
logging = tf.logging
flags.DEFINE_integer('max_epoch', ... | [
"/DAE17_15_32.py",
"/DAE_test.py",
"/convert_images_16.py",
"/fc_classifier.py",
"/fc_classifier_16.py",
"/fc_classifier_distributed.py",
"/input_data_dae.py",
"/produce_data.py",
"/produce_images_by_dae.py",
"/regression.py",
"/visualTiff.py"
] |
0verwritten/text-editor | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWi... | [
"/design.py",
"/main.py"
] |
0x15F9/Maze-Solver-GA- | import pygame
from pygame.sprite import Sprite
class Actor(Sprite):
def __init__(self, screen, settings, pos, image_path="assets/alive.bmp"):
super().__init__()
self.screen = screen
self.settings = settings
self.image = pygame.image.load(image_path)
self.rect = sel... | [
"/actor.py",
"/archive/minautor1.py",
"/archive/theseus1.py",
"/functions.py",
"/ga.py",
"/main.py",
"/maze.py",
"/minautor.py",
"/path.py",
"/settings.py",
"/test.py",
"/theseus.py"
] |
0x15F9/Weasel-Program-GA | import string
from random import choice, randint, random, uniform
class WeaselProgram:
def __init__(self, target="HelloWorld", population_size=25, mutation_ratio=0.1):
self.target = target
self.population_size = population_size
self.mutation_ratio = mutation_ratio
self.p... | [
"/ga.py",
"/main.py",
"/test.py"
] |
0x199/cuthbert-bot | import datetime
import traceback
import typing
import cogs.utils.logging as logging
import discord
import humanize
import pytimeparse
from discord.ext import commands
class ModActions(commands.Cog):
"""This cog handles all the possible moderator actions.
- Kick
- Ban
- Unban
- Mute
- Unmute
... | [
"/cogs/commands/modactions.py",
"/cogs/utils/logging.py",
"/cogs/utils/tasks.py",
"/main.py"
] |
0x22E09/sqlmap-client | #!/usr/bin/env python
#-*- coding: utf-8 -*-
class Conf(object):
def __init__(self, data):
self.string = data['string']
self.notString = data['notString']
self.titles = data['titles']
self.regexp = data['regexp']
self.textOnly = data['textOnly']
self.optimize = data[... | [
"/report.py",
"/sqlmapcli.py"
] |
0x237/Bejeweled3Bot | '''
pymouse是PyUserInput模块的一部分。
需要pip安装pywin32,以及pyhook。
pyhook需要去https://www.lfd.uci.edu/~gohlke/pythonlibs/下载whl文件来安装。
'''
from pymouse import PyMouse
from PIL import ImageGrab
import win32gui
import time
import tensorflow as tf
import numpy as np
class Bejewedled3(object):
'''
宝石迷阵类
wnd 窗口句柄
box 游戏... | [
"/Bejewedled3.py",
"/jewscnn/color/createdata.py",
"/jewscnn/color/jewscapture.py",
"/jewscnn/level/jewscnn.py",
"/play.py",
"/test.py"
] |
0x252/rsa-check | #!/bin/python3
from rsa.rsa import RSA as rsa
import sys
def main():
if len(sys.argv) < 2:
print("%s msg" % sys.argv[0])
return False
r = rsa()
crypted=r.crypt_message(sys.argv[1])
print("Crypted")
print(crypted)
decrypted=r.decrypt_message(crypted)
print("Decrypted")
print(decrypted)
pr... | [
"/main.py",
"/rsa/rsa.py"
] |
0x38/Voice-recognition | import numpy as np
def dynamic_time_warping(x, y):
"""
Measures the similarity between time series
:param x: first time series
:param y: second time series
:return: measure of similarity
"""
# create local distance matrix
distance_matrix = np.zeros((len(x), len(y)));
for i in range... | [
"/DTW.py",
"/MFCC.py",
"/calculate_distances.py",
"/voice_verification.py"
] |
0x64746b/Insekta | import re
from genshi.builder import tag
from genshi import Markup
from creoleparser import Parser, create_dialect, creole11_base
from django.utils.translation import ugettext as _
from pygments import highlight
from pygments.lexers import get_lexer_by_name
from pygments.formatters import HtmlFormatter
from pygments.ut... | [
"/insekta/scenario/creole.py",
"/insekta/scenario/management/commands/loadscenario.py",
"/insekta/scenario/management/commands/vmd.py",
"/insekta/scenario/models.py",
"/insekta/scenario/views.py",
"/insekta/urls.py"
] |
0x6B7563696E676C696172/genestealer | #!/usr/bin/env python3
import argparse
import pathlib
import re
from blue_you import exploit
from ipaddress import ip_address, ip_network
from pprint import pprint
from scanner import scanner
from shocker import shockshell
from subprocess import check_output
# SMB ports are 139 & 445, so look for 3 digit open ports
s... | [
"/main.py",
"/scanner.py",
"/shocker.py"
] |
0x7067/imagevision-bot | #!/usr/bin/env python3
import time
import logging
import telebot
from mscomputervision import _mskey
from mscomputervision import msProcessRequest
from translator import *
TOKEN = "" # YOUR BotFather token here
logger = telebot.logger
telebot.logger.setLevel(logging.DEBUG) # Outputs debug messages to console.
bot ... | [
"/bot.py",
"/mscomputervision.py",
"/translator.py"
] |
0x70DA/TicTacToe | from player import HumanPlayer, ComputerPlayer
class TicTacToe:
def __init__(self):
# create empty board
self.board = [' ' for _ in range(9)]
self.winner = None
@staticmethod
def print_board_nums():
"""Print a numbered board at the beginning of the game."""
for row... | [
"/game.py",
"/main.py",
"/player.py"
] |
0x90/dexsim | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from time import clock
import click
from dexsim.sim import DexSim
@click.command(context_settings=dict(help_option_names=["-h", "--help"]))
@click.option('-i', '--include-pattern',
help='Only optimize methods and classes matching the pattern, e.g.... | [
"/dexsim/cli.py",
"/dexsim/driver.py",
"/dexsim/oracle.py",
"/dexsim/plugins/b_templet_plus.py",
"/dexsim/plugins/c_string_fun_plus.py",
"/dexsim/settings.py",
"/dexsim/sim.py",
"/dexsim/utils.py",
"/setup.py"
] |
0xAlan/Fantasy-football-receiving | #Please create folder "playerfiles". There will be many csv files created
#Also, please make sure beautifulsoup is installed
import pandas as pd
import numpy as np
import statistics
import re
import requests
from bs4 import BeautifulSoup
from fields import *
from playerlist import *
playerdata = playerLi... | [
"/FFreceiving.py",
"/fields.py",
"/playerlist.py"
] |
0xBADEAFFE/DJ-VJ | """
Runs a simple behavioral test.
As the user, I wish to be able to load the program,
view the splash screen and then have the main screen
with the options to Create or Load Show available to select.
"""
import time
import djvj.gui as gui
if __name__ == '__main__':
print("Start Test")
gui.IntroScreen()
t... | [
"/create_screen_behavior.py",
"/djvj/Averager.py",
"/djvj/Bugger.py",
"/djvj/audio_listener.py",
"/djvj/gui.py",
"/djvj/interpreter.py",
"/djvj/moment.py",
"/djvj/pitch.py",
"/djvj/show.py",
"/djvj/tempo.py",
"/djvj/video_player.py",
"/main.py",
"/test/test_freq_to_note.py",
"/test/test_in... |
0xDeeCee/ocr-document-scanner | from PIL import Image
import pytesseract
import re
def aadhar(file):
text = pytesseract.image_to_string(Image.open(file))
gender = None
uid = None
#get gender
for line in text.split('\n'):
words = line.split()
for word in words:
if(re.search('(Female|Male|emale|male|ale... | [
"/aadharExtract.py",
"/app.py",
"/panCardExtract.py",
"/utils.py",
"/voterIdExtract.py"
] |
0xDeus/code-generator | """Code Generator base module.
"""
import base64
import io
import shutil
import tarfile
import zipfile
from pathlib import Path
from jinja2 import Environment, FileSystemLoader
class CodeGenerator:
def __init__(self, templates_dir: str = "./templates", dist_dir: str = "./dist"):
self.templates_dir = Path... | [
"/app/codegen.py",
"/app/streamlit_app.py",
"/app/utils.py",
"/templates/_base/_argparse.py",
"/templates/_base/_events.py",
"/templates/_base/_handlers.py",
"/templates/_base/_sidebar.py",
"/templates/gan/_sidebar.py",
"/templates/gan/config.py",
"/templates/gan/datasets.py",
"/templates/gan/ma... |
0xDigest/simplecache | from simplecache import SimpleCacheEntry
from simplecache.helper import save
import glob
import urllib.parse
import os
import brotli
import gzip
import zlib
cache_dir = os.path.expanduser('~/.cache/google-chrome/Default/Cache/*_0')
out_dir = 'cache'
if not os.path.exists(out_dir):
os.mkdir(out_dir)
for entry_fil... | [
"/example.py",
"/setup.py",
"/simplecache/__init__.py",
"/simplecache/helper.py"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.