seq_id stringlengths 4 11 | text stringlengths 113 2.92M | repo_name stringlengths 4 125 ⌀ | sub_path stringlengths 3 214 | file_name stringlengths 3 160 | file_ext stringclasses 18
values | file_size_in_byte int64 113 2.92M | program_lang stringclasses 1
value | lang stringclasses 93
values | doc_type stringclasses 1
value | stars int64 0 179k ⌀ | dataset stringclasses 3
values | pt stringclasses 78
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
23725065666 | from .base_classes import OAIBase
class OAISodis(OAIBase):
verb = "listIdentifiers"
baseUrl = "https://sodis.de/cp/oai_pmh/oai.php"
metadataPrefix = "oai_lom-de"
set = "oer_mebis_activated"
name = "oai_sodis_spider"
friendlyName = "FWU Sodis Contentpool"
url = "https://fwu.de/"
versio... | openeduhub/oeh-search-etl | converter/spiders/oai_sodis_spider.py | oai_sodis_spider.py | py | 1,772 | python | en | code | 7 | github-code | 13 |
1984719884 | import question1
import question4
import question5
import tools
matrice1 = [
[12, 20, 6, 5, 8],
[5, 12, 6, 8, 5],
[8, 5, 11, 5, 6],
[6, 8, 6, 11, 5],
[5, 6, 8, 7, 7]
]
def test_question1(matrice):
m, x = question1.solve1(matrice)
tools.affiche_sol(matrice1, m, x)
def test_temps_question... | BlackH57/ROIA-LU3IN034-Projet | test.py | test.py | py | 1,239 | python | en | code | 0 | github-code | 13 |
35553003730 | import cartopy.crs as ccrs
import cartopy.feature as cfeature
import matplotlib
import matplotlib.pyplot as plt
import xarray as xr
font = {"family": "normal", "weight": "normal", "size": 16}
matplotlib.rc("font", **font)
## Lendo o dataset criado no ex01.py (sempre verifique o nome do arquivo!)
ds = xr.o... | jgmsantos/Livro-Python | outras_aplicacoes_python/ex02.py | ex02.py | py | 947 | python | en | code | 16 | github-code | 13 |
1644211610 | # Cajita Chicarica
# NeoTrellis to select colors of NeoPixel strip
# NeoTrellis connected to Feather M4
# NeoPixel 136 strip connected to pin D5
# My version
import time
import board
from board import SCL, SDA
import busio
import neopixel
from adafruit_neotrellis.neotrellis import NeoTrellis
from digitalio import Digi... | karihigh/cajita | elefante.py | elefante.py | py | 6,608 | python | en | code | 0 | github-code | 13 |
11457377258 | from src.common.utility import *
from src.config.pip_conf import *
import os
class RewriteCmd():
def __init__(self, args):
self.rewrite_config = args.yes
def confirmation_prompt(self):
yes_list = ["yes", "y"]
prompt = "Are you sure want to continue rewrite the pip configuration: (yes/... | UmfintechWtc/mppm | mppm/src/command/rewrite.py | rewrite.py | py | 681 | python | en | code | 0 | github-code | 13 |
69794279058 | # @Time : 2018/7/6 15:57
# @Author : cap
# @FileName: mnist_estimator.py
# @Software: PyCharm Community Edition
# @introduction:
import argparse
import os
import tensorflow as tf
class Model(object):
""""""
def __init__(self, data_format):
if data_format == 'channels_first':
self._inp... | zhnin/mytensorflow | examples/mnist/mnist_estimator.py | mnist_estimator.py | py | 9,884 | python | en | code | 2 | github-code | 13 |
73602440337 | """
This is the main driver code to showcase everything
in this project. This includes:
* Using insurance calculations to determine pricing
* Determining a best scheduling algorithm
* Simulating business growth with Monte-Carlo
"""
# Change these constants to change experiment behavior
NUM_SCHEDULING_EXPER... | tylerTaerak/PrintingMoney | src/main.py | main.py | py | 5,888 | python | en | code | 0 | github-code | 13 |
16476043093 | from setuptools import setup, find_packages
LONG_DESCRIPTION = """
chat robot framework
""".strip()
SHORT_DESCRIPTION = """
chat robot framework""".strip()
DEPENDENCIES = [
'pymilvus==0.2.13',
'flask-cors',
'flask',
'flask_restful',
'HiveNetLib>=0.8.3',
'PyMySQL',
'peewee',
'bert-ser... | snakeclub/chat_robot | setup.py | setup.py | py | 1,569 | python | en | code | 1 | github-code | 13 |
73283790739 | import operator
import random
from dataclasses import dataclass
import time
from typing import Callable, Tuple, TypeVar, Generic, Sequence, Iterable
import numpy as np
from evaluator import calculate_mask_different_table, chairs_np
from seating_plan import SeatingPlan
T = TypeVar('T')
def metric(plan: SeatingPlan):... | basioli-k/Opt-Seating | searcher.py | searcher.py | py | 3,011 | python | en | code | 0 | github-code | 13 |
7516790962 | import time
import numpy as np
import torch
from rebar import arrdict, recording
from pavlov import runs, storage
from logging import getLogger
from . import arena
log = getLogger(__name__)
def combine_actions(decisions, masks):
actions = torch.cat([d.actions for d in decisions.values()])
for mask, decision i... | andyljones/boardlaw | boardlaw/analysis.py | analysis.py | py | 3,895 | python | en | code | 29 | github-code | 13 |
9777491085 |
import os
def main():
os.chdir('Lyrics')
for directory_name, subdirectories, filenames in os.walk('.'):
print("Directory:", directory_name)
print("\tcontains subdirectories:", subdirectories)
print("\tand files:", filenames)
print("(Current working directory is: {})".format... | Ch4insawPanda/CP1404_Practical | prac_09/cleanup_files.py | cleanup_files.py | py | 1,669 | python | en | code | 0 | github-code | 13 |
23728393385 | import cv2
import time
import numpy as np
import matplotlib.pyplot as plt
if __name__ == '__main__':
MODE = "MPI"
if MODE == "COCO":
protoFile = "pose/coco/pose_deploy_linevec.prototxt"
weightsFile = "pose/coco/pose_iter_440000.caffemodel"
nPoints = 18
POSE_PAIRS = [[1, 0], ... | escc1122/fps_test | main.py | main.py | py | 4,031 | python | en | code | 0 | github-code | 13 |
71847286099 | # coding: utf-8
import math
import string
import slemp
class Page():
#--------------------------
# Paging class - JS callback version
#--------------------------
__PREV = 'Prev'
__NEXT = 'Next'
__START = 'First'
__END = 'Last'
__COUNT_START = 'From'
__COUNT_END = '... | heartshare/slemp | class/core/page.py | page.py | py | 7,687 | python | en | code | 0 | github-code | 13 |
5414534440 | import cv2
from V7 import run_swarm
from V8 import run_Hill
from V9 import run_genetic
from V10 import run_Differential
import numpy as np
from skimage.metrics import structural_similarity as ssim
from os import listdir
from os.path import isfile, join
onlyfiles = [f for f in listdir('./inputs') if isfile(join('./in... | kakuking/Image_Deblurring_AI | main.py | main.py | py | 2,304 | python | en | code | 0 | github-code | 13 |
70195569618 | # Score categories.
# Change the values as you see fit.
YACHT = 50
ONES = 1
TWOS = 2
THREES = 3
FOURS = 4
FIVES = 5
SIXES = 6
FULL_HOUSE = 7
FOUR_OF_A_KIND = 8
LITTLE_STRAIGHT = 30
BIG_STRAIGHT = 31
CHOICE = 0
def score(dice, category):
if category == YACHT:
if all(x == dice[0] for x in dice):
... | benni347/exercism | python/yacht/yacht.py | yacht.py | py | 2,616 | python | en | code | 0 | github-code | 13 |
2105949920 | import os.path
import pandas as pd
# Scikit-learn机器学习库
from sklearn.preprocessing import LabelEncoder
import matplotlib.pyplot as plt
import datetime
if __name__ == '__main__':
"""数据源"""
src_dir = r'./dataset'
train_ds = os.path.join(src_dir, 'train.csv')
test_ds = os.path.join(src_dir, 'tes... | steamedobun/Machine-Learning-Code | class1/big_mart_data.py | big_mart_data.py | py | 6,778 | python | en | code | 2 | github-code | 13 |
3446734887 | import time
#import is a library is called
print("my name is Abdullahi.\nI use python to write it.\nwelcome to use it")
quiz = input("do you want to play?").lower()
# lower is all letter has small letter
quiz1 = "yes"
# The quiz is a variable and is a job
if quiz == quiz1:
print("let start game")
else:
print(... | abdullahi-7/Quiz_game | Quiz.py | Quiz.py | py | 2,360 | python | en | code | 1 | github-code | 13 |
12749981521 | '''
FusionLibrary API Logical Interconnect Groups
'''
import json
from robot.libraries.BuiltIn import BuiltIn
from RoboGalaxyLibrary.utilitylib import logging as logger
from FusionLibrary.api.networking.interconnect_types import InterconnectTypes
class LogicalInterconnectGroup(object):
"""
Logical Int... | richa92/Jenkin_Regression_Testing | robo4.2/4.2/lib/python2.7/site-packages/FusionLibrary/api/networking/logical_interconnect_groups.py | logical_interconnect_groups.py | py | 45,220 | python | en | code | 0 | github-code | 13 |
6395518264 | from classes import Bridge, Bridges, Node, Arc, Way
def n_choose_k(list: list[Bridge], n: int) -> list[list]:
""" Return all the combinations of n briges in the list l
that must not exist for a particular n configuration.
Args:
l (list): list to take elements from.
n (int): number of eleme... | comejv/uni-projects | INF402/rules.py | rules.py | py | 4,560 | python | en | code | 2 | github-code | 13 |
15124253446 | import boto3
import json
from foompus_utilities import *
dynamodb = boto3.client('dynamodb', region_name="eu-central-1")
def lambda_handler(event, context):
if event['queryStringParameters'] is None:
entity_type = 'USER'
else:
validated, message = validate(event['queryStringPar... | TayyibYasar/ITUGurme-backend | Aws/Best_List.py | Best_List.py | py | 1,814 | python | en | code | 0 | github-code | 13 |
41488023552 | """
This is used to control the whole news recommend system operation
"""
from ContentEngine import ContentEngine
import datetime
import pandas as pd
import numpy as np
import jieba.analyse
from sklearn.metrics.pairwise import cosine_similarity
import json
with open("./setting.json",'r') as load_f:
loa... | jasonzhouu/rss_spider | scripts/TopControl.py | TopControl.py | py | 4,535 | python | en | code | 0 | github-code | 13 |
10067785018 | import numpy as np
import pandas as pd
import scanpy as sc
#import scanpy.api as sc
def row_normal(data, factor=1e6):
#行表示基因,列表示细胞,设为(m,m)
#axis=1表示按行求和,即按基因求和
row_sum = np.sum(data, axis=1)
#增加一个维度,为(m,1)
row_sum = np.expand_dims(row_sum, 1)
#对应相除
div = np.divide(data, row_su... | MemorialAndUnique/MyRepository | load_data.py | load_data.py | py | 3,234 | python | en | code | 0 | github-code | 13 |
17025177007 | from django.contrib.auth.models import AbstractUser
from django.db import models
class CustomUser(AbstractUser):
"""Кастомная модель пользователя."""
username = models.CharField("Имя пользователя", max_length=150)
first_name = models.CharField("Имя", max_length=150)
last_name = models.CharField("Фамил... | AlexandrBuvaev/foodgram-project-react | foodgram_back/users/models.py | models.py | py | 1,578 | python | en | code | 0 | github-code | 13 |
5130107104 | T = int(input())
divs = [2, 3, 5, 7, 11]
for test_case in range(1, T + 1) :
N = int(input())
cnts = [0] * 5
for i in range(5) :
while N % divs[i] == 0 :
cnts[i] += 1
N //= divs[i]
print(f"#{test_case}", *cnts) | jeongminllee/ProgrammersCodeTest | SWEA/D2/1945. 간단한 소인수분해/간단한 소인수분해.py | 간단한 소인수분해.py | py | 286 | python | en | code | 0 | github-code | 13 |
74564879378 | #!/usr/bin/env python
"""
_DQMHarvest_t_
"""
from __future__ import print_function
import os
import threading
import unittest
from Utils.PythonVersion import PY3
from WMCore.DAOFactory import DAOFactory
from WMCore.Database.CMSCouch import CouchServer, Document
from WMCore.WMSpec.StdSpecs.DQMHarvest import DQMHarve... | dmwm/WMCore | test/python/WMCore_t/WMSpec_t/StdSpecs_t/DQMHarvest_t.py | DQMHarvest_t.py | py | 9,246 | python | en | code | 44 | github-code | 13 |
2869840090 | import jsonlines as jl
from typing import List, Dict, AnyStr, Union
from moqa.common import config
import os
from moqa.retrieval import Searcher, Retriever
import logging
from tqdm import tqdm
logging.basicConfig(
format=f"%(asctime)s:%(filename)s:%(lineno)d:%(levelname)s: %(message)s",
filename=config.log_fil... | SlavkaMichal/multiopenQA | moqa/datasets/preprocess_MKQA.py | preprocess_MKQA.py | py | 7,228 | python | en | code | 0 | github-code | 13 |
40992503841 | #!/usr/bin/python
from __future__ import division,print_function
import sys,random,os
sys.dont_write_bytecode=True
__author__ = 'ANIKETDHURI'
# usage:
# python employee
#----------------------------------------------
class Employee:
'Employee Class'
eCount = 0
def __init__(self,name,age):
""... | wddlz/fss16iad | code/3/EmployeeClass/employee.py | employee.py | py | 1,574 | python | en | code | 1 | github-code | 13 |
6274909228 | # -*- coding: utf-8 -*-
"""
Module parallel_programmeren_project_olivier.lijst_van_atomen
=================================================================
A module
"""
import numpy as np
#import scipy.constants as sc
import f2py_lijstvanatomen.lijstvanatomen as fortran
import f2py_rngfortran.rngfortran as rng
fro... | OlivierPuimege/Parallel-Programmeren-project-Olivier | parallel_programmeren_project_olivier/lijst_van_atomen.py | lijst_van_atomen.py | py | 4,833 | python | nl | code | 0 | github-code | 13 |
23472496290 | from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError
class SaleOffhire(models.Model):
_name = 'sale.offhire'
_description = "Sale Offhire"
_rec_name = 'description'
@api.depends('so_line_id', 'so_id.order_line')
def _check_so_line(self):
for rec i... | taliform/demo-peaksun-accounting | tf_peec_sales/models/sale_offhire.py | sale_offhire.py | py | 3,800 | python | en | code | 0 | github-code | 13 |
22167671336 | from aiohttp import web
import logging
logging.basicConfig(level=logging.DEBUG)
def index():
logging.info("进入的请求")
return web.Response(body='<h1>首页</h1>'.encode('UTF-8'), content_type='text/html')
def init():
app = web.Application()
app.add_routes([web.get('/', index)])
web.run_app(app, host="... | HelloJavaWorld123/python | web/App.py | App.py | py | 410 | python | en | code | 0 | github-code | 13 |
1065347820 | ##% This file is part of scikit-from-matlab.
##%
##% scikit-from-matlab is free software: you can redistribute it and/or modify
##% it under the terms of the GNU General Public License as published by
##% the Free Software Foundation, either version 3 of the License, or
##% (at your option) any later version.
##%
##%... | ajaiantilal/scikit-from-matlab | scikit_train_predict_supervised.py | scikit_train_predict_supervised.py | py | 12,640 | python | en | code | 4 | github-code | 13 |
3046868881 | import sys
from core import config, webconfig, init
from core import athana
init.full_init()
### init all web components
webconfig.initContexts()
### scheduler thread
import core.schedules
try:
core.schedules.startThread()
except:
msg = "Error starting scheduler thread: %s %s" % (str(sys.exc_info()[0]), str... | hibozzy/mediatum | start.py | start.py | py | 960 | python | en | code | null | github-code | 13 |
21675441682 | import sys
from bisect import bisect_left
input = sys.stdin.readline
N = int(input())
T = [*map(int, input().split())]
DP = [-sys.maxsize]
for i in range(N):
if DP[-1] < T[i]:
DP.append(T[i])
else:
idx = bisect_left(DP, T[i])
DP[idx] = T[i]
print(len(DP)-1)
| SangHyunGil/Algorithm | Baekjoon/baekjoon_14002(dp)py.py | baekjoon_14002(dp)py.py | py | 295 | python | en | code | 0 | github-code | 13 |
36325840735 | import tensorflow as tf
from PlatformNlp.modules.utils import get_shape_list, create_initializer
from PlatformNlp.modules.batch_norm import batch_normalization
from PlatformNlp.modules.drop_out import dropout
from PlatformNlp.modules.cosine_score import get_cosine_score
def dssm_layer(query_ids, doc_ids, hidden_sizes... | jd-aig/aves2_algorithm_components | src/nlp/PlatformNlp/modules/dssm_layer.py | dssm_layer.py | py | 1,565 | python | en | code | 2 | github-code | 13 |
5441493622 | """
Simple CNN model for the CIFAR-10 Dataset
@author: Adam Santos
"""
import numpy
from keras.constraints import maxnorm
from keras.models import Sequential
from keras.layers import Dense, Conv2D, MaxPooling2D, Flatten, Dropout
import tensorflow as tf
from tensorflow.keras.datasets import cifar10
# physical_devices ... | Addrick/DL4ARP | Models/cifar10_modelfn.py | cifar10_modelfn.py | py | 4,313 | python | en | code | 1 | github-code | 13 |
70166208339 | import tempfile
import os
from framework.argparse.action import TmpDirectoryAction
def add_jobs_option(parser):
j_help = "parallel jobs (default=4)"
parser.add_argument("-j", "--jobs", type=int, default=4, help=j_help)
def add_json_option(parser):
j_help = "print output in json format (default=False)"
... | jarret/bitcoin_helpers | framework/argparse/option.py | option.py | py | 812 | python | en | code | 0 | github-code | 13 |
70766965778 | import os
import sys
sys.path.insert(0, '/mnt/zfsusers/mcmaster/.virtualenvs/clumps/lib/python2.7/site-packages')
import yt
from yt.data_objects.level_sets.api import Clump, find_clumps
from ramses import SimTypes, RamsesData
GALAXY_CENTRE = [0.706731, 0.333133, 0.339857]
CUBE_PADDING = 0.001
CLOUD_DENSITY_THRESHOL... | adammcmaster/galaxy-sim | clump_finder.py | clump_finder.py | py | 6,380 | python | en | code | 0 | github-code | 13 |
29824568138 | import json
import logging
import matplotlib.pyplot as plt
import networkx as nx
import pandas as pd
from scipy.cluster import hierarchy
from scipy.stats import kendalltau
from itertools import combinations
from config import main_edge_file, node_file, disruption_edge_files, kendalltau_matrix_output
# To show all row... | raheelwaqar/qmul-dissertation | main.py | main.py | py | 12,152 | python | en | code | 1 | github-code | 13 |
71170721617 | import os
import sys
import torch
import datasets
import transformers
from typing import Any, Dict, Optional, Tuple
from transformers import HfArgumentParser, Seq2SeqTrainingArguments
from glmtuner.extras.logging import get_logger
from glmtuner.hparams import (
ModelArguments,
DataArguments,
FinetuningArgu... | hiyouga/ChatGLM-Efficient-Tuning | src/glmtuner/tuner/core/parser.py | parser.py | py | 5,664 | python | en | code | 3,293 | github-code | 13 |
71424345937 | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
AUTHOR = u'coder'
SITENAME = u'istatml'
SITEURL = ''
PATH = 'content'
TIMEZONE = 'Asia/Shanghai'
DEFAULT_LANG = u'en'
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANS... | csdnlzh/istatml | pelicanconf.py | pelicanconf.py | py | 974 | python | en | code | 0 | github-code | 13 |
12946684889 | import keyword
import string
str1 = 'abcdefghijkl'
def get_str():
STR = input('输如入字符串')
return STR
def pan_zifu(zifu):
# print('123')
if zifu[0] in string.ascii_letters + '_':
return zifu
else:
return 0
def pan_guanjian(zifu):
return keyword.iskeyword(zifu)
if __name__ == '__... | HLQ1102/MyPython | base-python/py04/hafa.py | hafa.py | py | 631 | python | fa | code | 0 | github-code | 13 |
13737571788 | # NAme
# Having fun with LOOPS
#Learn how to resize our programs
#ASking the user for values
# is requesting via console for something the default is a string
# type casting
begin =7
lines= int(begin)
for line in range(lines):
for number in range(begin-line,0,-1):
print(number, end=' ')
print()
| GreenhillTeacher/GameDesign2020 | learningInput.py | learningInput.py | py | 312 | python | en | code | 0 | github-code | 13 |
39218311752 | import numpy as np
from scipy.stats import chi2
class PokerTest:
def __init__(self, acceptance_lvl=0.05):
self.acceptance_lvl = acceptance_lvl
self.Oi=[0,0,0,0,0,0,0] #Observed freq
self.prob = [0.30240, 0.50400, 0.10800, 0.07200, 0.00900, 0.00450, 0.00010] #Theorical prob for every hand
... | juanSe756/Pseudorandom_Test | PokerTest.py | PokerTest.py | py | 4,326 | python | en | code | 1 | github-code | 13 |
14646673535 | from sqlalchemy import Column, ForeignKey, Identity, Integer, Table
from . import metadata
RefundNextActionDisplayDetailsJson = Table(
"refund_next_action_display_detailsjson",
metadata,
Column("email_sent", EmailSent, ForeignKey("EmailSent")),
Column("expires_at", Integer, comment="The expiry timesta... | offscale/stripe-sql | stripe_openapi/refund_next_action_display_details.py | refund_next_action_display_details.py | py | 454 | python | en | code | 1 | github-code | 13 |
34014724543 | """Tests for Bundle.
"""
import pytest
import datreant.core as dtr
def do_stuff(cont):
return cont.name + cont.uuid
def return_nothing(cont):
b = cont.name + cont.uuid
class CollectionsTests:
"""Mixin tests for collections"""
pass
class TestView:
"""Tests for Views"""
@pytest.fixture... | kain88-de/datreant.core | src/datreant/core/tests/test_collections.py | test_collections.py | py | 30,817 | python | en | code | null | github-code | 13 |
31637851495 | from database_connection import get_database_connection
class DeviceRepository:
"""This class is responsible for saving new devices into database and fetching saved devices.
Attributes:
_connection: database connection.
"""
def __init__(self, ):
self._connection = get_database_con... | attesan/ot-harjoitustyo | src/repository/device_repository.py | device_repository.py | py | 4,861 | python | en | code | 0 | github-code | 13 |
71168240339 | from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options as ChromeOptions
from selenium.webdriver.firefox.options import O... | EnggQasim/PIAIC_Batch36_Quarter2 | Selenium Automation/selenium_automation_google_search_query.py | selenium_automation_google_search_query.py | py | 3,239 | python | en | code | 13 | github-code | 13 |
39792462562 | # Message field constants
CORRELATION_ID_KEY = 'broker_correlation_id'
RAW_MESSAGE_KEY = 'raw_msg'
PHYSICAL_DEVICE_UID_KEY = 'p_uid'
LOGICAL_DEVICE_UID_KEY = 'l_uid'
TIMESTAMP_KEY = 'timestamp'
TIMESERIES_KEY = 'timeseries'
LAST_MSG = 'last_msg'
# Source names
TTN = 'ttn'
GREENBRAIN = 'greenbrain'
WOMBAT = 'wombat'
YD... | DPIclimate/broker | src/python/BrokerConstants.py | BrokerConstants.py | py | 670 | python | en | code | 2 | github-code | 13 |
10669309476 | import sys
import firebase_admin
from firebase_admin import credentials
from firebase_admin import messaging
from firebase_admin import exceptions
# Firebase class allows Python to communicate with the Google's Firebase service
# to send notifications
# https://firebase.google.com/docs/cloud-messaging/send-message
# ... | Krystian95/Context-Aware-Systems---Backend | backend/Firebase.py | Firebase.py | py | 3,769 | python | en | code | 0 | github-code | 13 |
15743545242 | import sys
from collections import deque
input = sys.stdin.readline
DELTAS = [(1, 0), (-1, 0), (0, -1), (0, 1)]
def bfs():
dq = deque([(0, 0, 1)])
visited = [[[0] * 2 for i in range(m)] for i in range(n)]
visited[0][0][1] = 1
while dq:
x, y, w = dq.popleft()
if x == n - 1 and y == m - 1... | ssooynn/algorithm_python | 백준/2206.py | 2206.py | py | 943 | python | en | code | 0 | github-code | 13 |
3183219603 | import pymongo
import config
MONGODB_URI = config.mongo_url
client = pymongo.MongoClient(MONGODB_URI, connectTimeoutMS=30000)
db = client.get_database("test_bot")
dolg_col = db.user_records
user_col = db.users
music_col = db.music
user_access = db.music_access
#postgres_url = "postgres://yrorprmbhfdotx:3a... | Kinahem/debt_bot | db.py | db.py | py | 447 | python | en | code | 0 | github-code | 13 |
12416493959 | # basic data types
a = 7 # integer
b = 3.4 # float
print(type(a*b))
# c = input('type something ') # everything entered by users will be a string
# d = int(float(c)) # safe bit of type casting
# print (type(d))
e = True # or False for boolean
f = "is it coffee yet" # all strings are immutable collections ... | onionmccabbage/pythonFeb2023 | basics.py | basics.py | py | 915 | python | en | code | 0 | github-code | 13 |
9431102370 | pins = {
'RAIN': 16,
'WINDSPEED': 26,
'HX711_DT': 5,
'HX711_SCK': 6,
'MULTIBUS_INNEN': 3,
'MULTIBUS_INNEN2': 4,
'MULTIBUS_AUSSEN': 1
}
# BUS3: (DON'T USE BUS2)
# SDA : 14
# SCL : 15
#
# BUS4:
# SDA : 23
# SCL : 24
#
# BUS1: STANDARD I²C BUS
# SDA : 2
# SCL : 3
#
# YOU NEED TO C... | beealive-hoes/bienenstock | src/sensors/GPIOPINS.py | GPIOPINS.py | py | 411 | python | en | code | 1 | github-code | 13 |
37841938290 | from logging import Logger
import numpy as np
from src.domain.objects.flag_cube import FlagCube
from .navigation_environment_error import NavigationEnvironmentDataError
from .real_world_environment import RealWorldEnvironment
from ..objects.obstacle import Obstacle
from ..path_calculator.grid import Grid
class Navi... | Jouramie/design-3 | src/domain/environments/navigation_environment.py | navigation_environment.py | py | 6,040 | python | en | code | 0 | github-code | 13 |
73292072016 | from oslo_log import log as logging
LOG = logging.getLogger(__name__)
def check_dict_equals(dict1, dict2):
""" Recursively checks whether two dicts are equal. """
LOG.debug("Comparing dicts:\n%s\n%s", dict1, dict2)
if (type(dict1), type(dict2)) != (dict, dict):
LOG.debug("Bad types:\n%s\n%s", d... | cloudbase/coriolis-openstack-utils | coriolis_openstack_utils/utils.py | utils.py | py | 789 | python | en | code | 0 | github-code | 13 |
27313412686 | from tqdm import tqdm
import shutil
import pandas as pd
import os
import torch
from torch.optim import Adam, SGD, lr_scheduler
import torch.nn as nn
from torch.autograd import Variable
import torchvision
import torchvision.transforms as transforms
import torchvision.models as models
class TrainingFlow():
def __... | NTHU-2017-ML/DeViSE_Extension | devise/utils/training_flow.py | training_flow.py | py | 9,663 | python | en | code | 1 | github-code | 13 |
18563501728 | n = input('괄호의 자료를 입력하세요:')
def makit(n):
if n[0] == ')':
return False
num1=0
num2=0
for i in range(len(n)):
if n[i]=='(':
num1+=1
elif n[i]==')':
num2+=1
if num1==num2:
return True
else:
return False
if makit(n): # 괄... | sun1h/python.solve.problem.100_coding.dojang | 096.괄호 검사기 만들기.py | 096.괄호 검사기 만들기.py | py | 414 | python | ko | code | 0 | github-code | 13 |
27959190409 | from django.shortcuts import get_object_or_404, render,redirect
from django.core.paginator import Paginator
from django.conf import settings
from django.db.models import Count
from django.contrib.contenttypes.models import ContentType
from django.urls import reverse
from .models import Blog, BlogType
from read_statisti... | h56983577/Coffee-Shop | blog/views.py | views.py | py | 5,616 | python | en | code | 6 | github-code | 13 |
26575607552 | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def longestUnivaluePath(self, root: TreeNode) -> int:
self.result = 0
def helper(root):
... | ujas09/Leetcode | 687.py | 687.py | py | 847 | python | en | code | 0 | github-code | 13 |
28113198208 | import cv2
import numpy as np
img = cv2.imread("../tree_lot.png")
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
kernel_size = 5
blur_gray = cv2.GaussianBlur(gray, (kernel_size, kernel_size), 0)
low_threshold = 50
high_threshold = 150
edges = cv2.Canny(blur_gray, low_threshold, high_threshold)
rho = 1 # distance res... | olgarose/ParkingLot | parking_lot/experiments/stack_overflow_lines/answer_lines.py | answer_lines.py | py | 1,203 | python | en | code | 162 | github-code | 13 |
22217578899 | #DrawSevenSegDisplay.py
import turtle,datetime,time
def drawLine(draw):
turtle.penup()
turtle.fd(5)
turtle.pendown() if draw else turtle.penup()
turtle.fd(30)
turtle.penup()
turtle.fd(5)
turtle.right(90)
def drawSeg(d,numlist):
drawLine(True) if d in numlist else drawLine(False)
def draw... | jry586/vscPython | DrawSevenSegDisplay.py | DrawSevenSegDisplay.py | py | 2,644 | python | en | code | 0 | github-code | 13 |
10271033356 | import numpy as np
import sympy as sp
import gzip
import os
import pickle
import collections
import itertools
import math
import functools
import util
def enum_qp_degrees(max_degree):
p_degrees_cache = {}
def enum_p_degrees(d_rest):
if d_rest == 0:
return [[]]
elif d_rest in p_degr... | dselsam/nnsos | python/enum_sos.py | enum_sos.py | py | 3,309 | python | en | code | 1 | github-code | 13 |
31092098911 | import json, uuid
from hashlib import sha256
class Transacao:
ID = '' # gerado automaticamente
tipo = '' # tipo de transação, pode ser criar_endereco ou transferir_saldo
tipo_endereco = '' # tipo do endereço criado, no caso de transação criar_endereco
# podem ser eleitor, candidato o... | rammyres/rdve_coleta | modelos/transacao.py | transacao.py | py | 4,375 | python | pt | code | 0 | github-code | 13 |
7535080082 | import numpy as np
from matplotlib import pyplot as plt
def plot(data, weights):
OWlist = []
OHlist = []
UWlist = []
UHlist = []
for i in data:
if i[3] == 1:
OHlist.append(i[1])
OWlist.append(i[2])
else:
UHlist.append(i[1])
... | SeaLeafon/MyCode | single_percentron_BMI.py | single_percentron_BMI.py | py | 2,442 | python | en | code | 0 | github-code | 13 |
70725684818 | from django import forms
from django.contrib.auth import get_user_model
from django.forms.widgets import DateInput, DateTimeInput
from django.utils import timezone
from crispy_forms.helper import FormHelper
from .models import Absence, Invitation, Meeting
from . import services
UserModel = get_user_model()
class ... | alexmon1989/appeals | backend/apps/meetings/forms.py | forms.py | py | 3,612 | python | uk | code | 0 | github-code | 13 |
44518728001 | from malaya.text.normalization import _is_number_regex
from malaya.text.function import (
check_ratio_numbers,
check_ratio_punct,
is_emoji,
is_laugh,
is_mengeluh,
PUNCTUATION,
)
from malaya.dictionary import is_malay, is_english
from typing import List
import logging
logger = logging.getLogger(... | shafiq97/stemmer | env/lib/python3.11/site-packages/malaya/model/rules.py | rules.py | py | 3,632 | python | en | code | 0 | github-code | 13 |
38870952059 | from application import app, db,login_manager
from flask import render_template, request, json, Response, redirect, flash, url_for,session
from application.models import User, Course, Enrollment
from application.forms import LoginForm, RegisterForm
from flask_login import login_user,logout_user
@app.route("/")
@app.ro... | kiran2509/simplewebapp | application/routes.py | routes.py | py | 4,943 | python | en | code | 0 | github-code | 13 |
9522314894 | #OVERLAP SAVE METHOD
print('Nidhi Sura\t60001198008\n\nOverlap Save Method\n')
#Taking inputs
n = int(input('\nEnter the no. of terms in x(n)\t'))
x = []
print('\nEnter the terms of x(n), separated by an "enter"')
for _ in range(n):
x.append(int(input()))
m = int(input('\nEnter the no. of terms in h(n... | NidhiSura/DSP-basics | overlapsave.py | overlapsave.py | py | 2,291 | python | en | code | 0 | github-code | 13 |
3406726429 | """Command-line utilities for experiments subsystem."""
import argparse
import datetime
import collections
import yaml
import dateutil.tz
from jacquard.utils import is_recursive
from jacquard.buckets import NotEnoughBucketsException, close, release
from jacquard.storage import retrying
from jacquard.commands import ... | prophile/jacquard | jacquard/experiments/commands.py | commands.py | py | 13,324 | python | en | code | 7 | github-code | 13 |
29524678869 | from csv import DictReader,DictWriter
with open('Files/csv_file3.csv','r',newline='') as rf:
dict_read=DictReader(rf)
with open('Files/csv_file4.csv','w',newline='') as wf:
dict_write=DictWriter(wf,fieldnames=['fname','lname','city'])
dict_write.writeheader() #csv file a header lekha hoi
... | milton9220/Python-basic-to-advance-tutorial-source-code | Files/read_csv_to_write_another_csv.py | read_csv_to_write_another_csv.py | py | 553 | python | en | code | 0 | github-code | 13 |
25593109370 | class Solution:
def myAtoi(self, s: str) -> int:
num = 0
i = 0
# Step 1 -> remove leading whitespaces
while i < len(s) and s[i] == ' ':
i += 1
# Step 2 -> sign check
positive = 0
negative = 0
if i < len(s) - 1: # i< n-1 handles c... | avantika0111/Striver-SDE-Sheet-Challenge-2023 | Strings/ImplementATOI.py | ImplementATOI.py | py | 2,054 | python | en | code | 0 | github-code | 13 |
1704168834 | from rest_framework.exceptions import ValidationError
class DogNameValidator:
def __init__(self, field):
self.field = field
def __call__(self, value, *args, **kwargs):
valid_words = ['продам', 'крипта', 'ставки']
tmp_value = dict(value).get(self.field).lower()
for word in val... | GamaRayL/dogs-api | main/validators.py | validators.py | py | 472 | python | en | code | 0 | github-code | 13 |
41115652141 | import os
import struct
import uuid
import logging
from collections import namedtuple
from datetime import timedelta, datetime
from mogul.media import localize
_ = localize()
from mogul.media import MediaHandler
from mogul.media.element import Element
from mogul.media.id3 import ID3v1TagHandler, ID3v2TagHandler
from... | sffjunkie/media | src/media/asf.py | asf.py | py | 22,426 | python | en | code | 0 | github-code | 13 |
32626525831 | #from Python
import time
import csv
import os
import math
import numpy as np
import sys
from shutil import copyfile
import shutil
#from Pytorch
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from torchvision import datasets
from torchvision imp... | LeiGitHub1024/lowlight | senior/DSLR/test.py | test.py | py | 3,461 | python | en | code | 0 | github-code | 13 |
20365928159 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import selenium.webdriver as webdriver
import time
import logging
from multiprocessing import Pool
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from pyv... | qwerty200696/HDHome_crawler | hdh_try_5.py | hdh_try_5.py | py | 6,375 | python | en | code | 9 | github-code | 13 |
8854129845 | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 19 13:37:35 2021
@author: dhtmd
"""
import pandas as pd
import matplotlib.pylab as plt
from matplotlib import rc
import numpy as np
rc("font", family="Malgun Gothic")
CCTV_Seoul = pd.read_csv("CCTV_in_Seoul.csv", encoding="utf-8")
CCTV_Seoul.rename(columns={CCTV_Seoul.c... | LucestDail/python.DataAnalysis | 20210219/cctvex2.py | cctvex2.py | py | 1,476 | python | en | code | 0 | github-code | 13 |
3927004705 | import socket
import threading
"""
multiclients sycnronyze server - like Apache
"""
def handle(c):
while True:
data = c.recv(1024)
if not data:
c.close()
break
print('Data: ', data)
c.sendall(data)
s = socket.socket()
s.bind(('localhost', 5000))
s.listen(... | ikonstantinov/python_everything | b_may11/sync_server/server.py | server.py | py | 518 | python | en | code | 0 | github-code | 13 |
18074249912 | #Fibonacci Series
n = int(input("Enter a Number: "))
n1 = 0
n2 = 1
count = 0
if n == 0:
print("Enter a positive Number!")
elif n == 1:
print(n1)
else:
print("Fibonacci Series:")
while count < n:
print(n1)
nth = n1 + n2
# new values
n1 = n2
n2 = nth
count += 1 | akshitagit/Python | Maths/fibonacci.py | fibonacci.py | py | 317 | python | en | code | 116 | github-code | 13 |
31943155730 | from typing import List
"""
方法一:单调栈
为了找到长度为 k 的最大数,需要从两个数组中分别选出最大的子序列,这两个子序列
的长度之和为 k,然后将这两个子序列合并得到最大数。两个子序列的长度最小为 0,
最大不能超过 k 且不能超过对应的数组长度。
令数组 nums1 的长度为 m,数组 nums2 的长度为 n,则需要从数组 nums1 中选出
长度为 x 的子序列,以及从数组 nums2 中选出长度为 y 的子序列,其中 x+y = k,
且满足 0 ≤ x ≤ m 和 0 ≤ y ≤ n。需要遍历所有可能的 x 和 y 的值,对于每一组
x 和 y 的值,得到最大数。在整个过程中维护可以通过拼... | wylu/leetcodecn | src/python/p300top399/321.拼接最大数.py | 321.拼接最大数.py | py | 3,663 | python | zh | code | 3 | github-code | 13 |
72722330897 | import json
import unittest
from app.test import create_starter_data, auth_header, app, db
from app.main.models.models import Item, Source
class TestItemsEndpoints(unittest.TestCase):
"""This class contains tests for endpoints that start with '/items'."""
def setUp(self):
"""Define test variables an... | knolist/knolist | app/test/test_items.py | test_items.py | py | 8,952 | python | en | code | 1 | github-code | 13 |
20346885843 | from __future__ import annotations
from typing import TYPE_CHECKING
from sdc11073.provider.operations import ExecuteResult
from .nomenclature import NomenclatureCodes
from .providerbase import OperationClassGetter, ProviderRole
if TYPE_CHECKING:
from sdc11073.mdib.descriptorcontainers import AbstractDescriptorP... | Draegerwerk/sdc11073 | src/sdc11073/roles/clockprovider.py | clockprovider.py | py | 10,995 | python | en | code | 27 | github-code | 13 |
5091720911 | # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from recipe.searchers import RecipeMapping
from ...models import Recipes
class Command(BaseCommand):
help = 'Search recipes.'
args = "<string to search>"
option_list = BaseCommand.option_list
def handle(self, *args, **option... | khoaanh2212/nextChef | backend_project/backend/recipe/management/commands/es_search_recipes.py | es_search_recipes.py | py | 1,026 | python | en | code | 0 | github-code | 13 |
17976331415 | import torch.nn as nn
import torch
device= torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
# Cite the convLSTM model on https://github.com/ndrplz/ConvLSTM_pytorch
class eConvLSTMppCell(nn.Module):
def __init__(self, input_dim, hidden_dim, kernel_size, bias,res_rate,reduce=1,server_num = 4):
... | LintureGrant/eConvLSTM | model/eConvLSTMpp.py | eConvLSTMpp.py | py | 7,064 | python | en | code | 1 | github-code | 13 |
3634647440 | # Print Half Pyramid using loops
num_rows = int(input("Enter Number: "))
k = (num_rows * 2)-2
for i in range(0,num_rows):
# Spaces
for j in range(0,k):
print(' ',end='')
k = k-2
# Astriks
for j in range(0,i+1):
print("*",end=' ')
print("") | ashish-kumar-hit/python-qt | python/python-basics-100/Loops 2.4.py | Loops 2.4.py | py | 279 | python | en | code | 0 | github-code | 13 |
3447106021 | from Functions.Coloring import yellow, red, magenta
from MyObjects import engine, Base, factory
from MyObjects import Button, Message, SPButton, Setting
from sqlalchemy.orm import joinedload
def init():
# Generate database schema
Base.metadata.create_all(engine)
# Create session
session = factory()
... | hossein73z/clip_sync_telegram_bot | Functions/DatabaseCRUD.py | DatabaseCRUD.py | py | 2,649 | python | en | code | 0 | github-code | 13 |
17085489494 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.CrowdRuleInfo import CrowdRuleInfo
class AlipayMarketingCampaignRuleRulelistQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayMarketingCampa... | alipay/alipay-sdk-python-all | alipay/aop/api/response/AlipayMarketingCampaignRuleRulelistQueryResponse.py | AlipayMarketingCampaignRuleRulelistQueryResponse.py | py | 1,075 | python | en | code | 241 | github-code | 13 |
17248958103 | #busconfig.py
import datetime
from datetime import time
#Set times to schedule App
timeStart = time(7,00)
timeEnd = time(23,00)
#Set Bus Stop 36298792 is North St David Street
busStop='36298792'
#Add your API key
Key="QWERTYUIOP1234567890"
#Switch app on ("Y") or off ("N")
busAppOn = "Y"
| GregorBoyd/getting-bus-times | busconfig.py | busconfig.py | py | 294 | python | en | code | 2 | github-code | 13 |
24592160266 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This script uses a fuzzy logic control system to model the growth rate of seagrass
based on two environmental variables: nutrient level and current velocity.
The script also includes a 1D Cellular Automata model to simulate the seagrass growth over time.
"""
__appname_... | AnqiW222/CMEE_MSc_Project | code/DizzyModel.py | DizzyModel.py | py | 3,281 | python | en | code | 0 | github-code | 13 |
73523823377 | import math
prob = 0.95
res = prob ** 100 - prob ** 89
# prev = prob ** 90
# res = prev
# for i in range(90, 101):
# prev = prev * prob
# res += prev
# print(res)
res = 0
for i in range(90, 101):
res += math.comb(100, i) * (prob ** i) / math.factorial(100)
print(res)
# print(math.comb(100, 90) / m... | eqfy/fl-experiments | prob.py | prob.py | py | 340 | python | en | code | 1 | github-code | 13 |
17043996244 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.BusinessInfoRequest import BusinessInfoRequest
from alipay.aop.api.domain.NotifyEventParam import NotifyEventParam
class AlipayOpenIotvspBusinessNotifyModel(object):
def __in... | alipay/alipay-sdk-python-all | alipay/aop/api/domain/AlipayOpenIotvspBusinessNotifyModel.py | AlipayOpenIotvspBusinessNotifyModel.py | py | 5,274 | python | en | code | 241 | github-code | 13 |
16892882608 | import networkx as nx
from networkx.drawing.nx_agraph import graphviz_layout
import numpy as np
import sys
sys.path.append('..')
from scripts.convert_graphs import nx2gt
def load_dendrogram(path: str) -> nx.Graph:
"""
Load dendrogram from a give file. The file should follow this structure:
# Tree struct... | robertjankowski/attacks-on-hierarchical-networks | scripts/hrg.py | hrg.py | py | 5,297 | python | en | code | 0 | github-code | 13 |
46767565414 | #TIC-TAC
board=['_','_','_','_','_','_','_','_','_',]
pp1=[]
pp2=[]
def rules():
print("Positions:\t 1 | 2 | 3")
print("\t\t____|___|____")
print("\t\t 4 | 5 | 6")
print("\t\t____|___|____")
print("\t\t 7 | 8 | 9")
print("\t\t | | ")
def check(pos):
#Checking Weather the requested... | harsh725/Python-Games | Tic-Tac/Tic_tac.py | Tic_tac.py | py | 3,118 | python | en | code | 0 | github-code | 13 |
14776737727 | import collections
from itertools import chain
import numpy as np
import tensorflow._api.v2.compat.v1 as tf
tf.disable_v2_behavior()
import pandas as pd
from flask import Flask, jsonify, request, render_template
from flask_pymongo import PyMongo
# from libs.recommendation import get_from_db
# from libs.recommendation ... | GeulReadyEditor/ai_train | get_train_insert.py | get_train_insert.py | py | 12,822 | python | en | code | 0 | github-code | 13 |
57493509 | import copy
import pytest
from scriptworker.exceptions import ScriptWorkerTaskException, TaskVerificationError
from shipitscript.task import _get_scope, get_ship_it_instance_config_from_scope, get_task_action, validate_task_schema
@pytest.mark.parametrize(
"scopes,sufix,raises",
(
(("project:releng:... | mozilla-releng/scriptworker-scripts | shipitscript/tests/test_task.py | test_task.py | py | 4,318 | python | en | code | 13 | github-code | 13 |
37458648153 | from django.shortcuts import render
from django.http import HttpResponse
import sys
sys.path.append("..")
import LicenseModel.models as LM
# Create your views here.
def index(request):
search_text = ''
if request.POST: # receive search text from search box
search_text = request.POST['search-text']
... | JiananHe/LicenseAnalysis | LicenseAnalysis/Introduction/views.py | views.py | py | 924 | python | en | code | 1 | github-code | 13 |
30204587130 | import streamlit as st
import pandas as pd
import numpy as np
import altair as alt
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
s = pd.read_csv("social_media_usage.... | Andre-Estrada/ml_app | app.py | app.py | py | 4,185 | python | en | code | 0 | github-code | 13 |
20619614100 | from utils import *
output_data_frame = pd.DataFrame()
data1 = pd.read_excel('附件表/附件1-商家历史出货量表.xlsx', engine = 'openpyxl')
data6 = pd.read_excel('附件表/附件6-促销期间商家出货量表.xlsx', engine = 'openpyxl')
data1 = data1.sort_values(by=['seller_no', 'product_no', 'warehouse_no', 'date'])
data1['qty'].interpolate(method='linear', ... | Andd54/Mathor_Cup_Project | Question3.py | Question3.py | py | 4,507 | python | en | code | 0 | github-code | 13 |
37861941123 | # -*- coding: utf-8 -*-
from __future__ import division
from PyAstronomy.funcFit import OneDFit
import numpy as np
from PyAstronomy.modelSuite.XTran import _ZList
class LimBrightTrans(_ZList, OneDFit):
"""
Planetary transit light-curves for spherical shell model.
This class implements a model calculating... | sczesla/PyAstronomy | src/modelSuite/XTran/limBrightTrans.py | limBrightTrans.py | py | 6,682 | python | en | code | 134 | github-code | 13 |
39298280078 | # Support Python 2 and 3
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import print_function
def python_def_from_tag( tag ):
"""Make a legal function name from an element tag"""
short = force_to_short( tag )
short = short.replace(':','_8_')
short = sho... | sonofeft/ODPSlides | odpslides/namespace.py | namespace.py | py | 5,120 | python | en | code | 0 | github-code | 13 |
70460143377 | from captcha.fields import CaptchaField
from django.forms import ValidationError
from tutors.models import Tutor
from tmsutil.constants import YEAR_CHOICES
from tmsutil.forms import TmsModelForm
class TutorForm(TmsModelForm):
_year_choices = [val[0] for val in YEAR_CHOICES]
captcha = CaptchaField()
class ... | akhaku/lcstutoring | tutoringapp/tutors/forms.py | forms.py | py | 2,149 | python | en | code | 1 | github-code | 13 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.