id
stringlengths
2
8
text
stringlengths
16
264k
dataset_id
stringclasses
1 value
11240007
""" test_strange_headers.py Copyright 2012 <NAME> This file is part of w3af, http://w3af.org/ . w3af 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 version 2 of the License. w3af is distributed in the hope tha...
StarcoderdataPython
6494978
# + import theforce.cl as cline from theforce.calculator.active import FilterDeltas from theforce.util.aseutil import init_velocities, make_cell_upper_triangular from ase.md.npt import NPT from ase.md.langevin import Langevin from ase.io import read from ase import units import numpy as np import os def md(atoms, dyn...
StarcoderdataPython
341370
import doctest import unittest import luigi.task import luigi from datetime import datetime, timedelta class DummyTask(luigi.Task): param = luigi.Parameter() bool_param = luigi.BooleanParameter() int_param = luigi.IntParameter() float_param = luigi.FloatParameter() date_param = luigi.DateParamet...
StarcoderdataPython
1710432
for x in range(65,70): for y in range(65,x+1): print(chr(y),end='') print() """ # p[attern A AB ABC ABCD ABCDE """
StarcoderdataPython
8102178
<gh_stars>0 import sys sys.stdin = open('11048.txt') from collections import deque N,M = map(int, input().split()) miro = [[0 for _ in range(M+1)]]+[[0]+list(map(int, input().split())) for _ in range(N)] dx = [1,0,1] dy = [0,1,1] candy = [[0 for _ in range(M+1)] for _ in range(N+1)] for i in range(1,N+1): fo...
StarcoderdataPython
3481808
<gh_stars>10-100 import os import sys import time import subprocess import concurrent.futures from tempfile import mkstemp from luastyle.indenter import IndentRule, IndentOptions class BytecodeException(Exception): def __init__(self, message): # Call the base class constructor with the parameters it nee...
StarcoderdataPython
9650851
<reponame>jia-yi-chen/multimodal-deep-learning import numpy as np import random import torch import torch.nn as nn from torch.autograd import Function from torch.nn.utils.rnn import pad_sequence, pack_padded_sequence, pad_packed_sequence from transformers import BertModel, BertConfig from utils import to_gpu from uti...
StarcoderdataPython
4813475
""" Generates a Celery config object from environment variables. """ import importlib import os import yaml _PREFIX = "NEW_CELERY_" _PLEN = len(_PREFIX) class InvalidCeleryConfig(ValueError): """Raised when the given input environment variables are ambiguous or wrong.""" def _load_key(environment_key: str): ...
StarcoderdataPython
1840141
<reponame>ksbg/sparklanes<filename>tests/__main__.py from unittest import TestSuite, TextTestRunner, makeSuite from .test_lane import TestLane from .test_spark import TestSpark from .test_submit import TestSparkSubmit suite = TestSuite() suite.addTest(makeSuite(TestLane)) suite.addTest(makeSuite(TestSparkSubmit)) sui...
StarcoderdataPython
3471301
<reponame>ikikara/TI_Project-Compression_Of_Files import deflate #COMPRESSÃO level = 6 with open("D:\Pycharm\Codecs\egg.bmp" , 'rb') as f: data = bytearray(f.read()) dados = deflate.gzip_compress(data, level) with open("D:\Pycharm\Codecs\eggDeflate.dat" , 'wb') as f: f.write(bytearray(dados)) #DESCOMPRES...
StarcoderdataPython
9785897
''' MarkDown format generator ''' class MarkDown: 'convert raw text to markdown syntax' def __init__(self): self.escape_table = {"\\": "\\\\", "`": "\`", "*": "\*", "_": "\_", "{": "\{", "}": "\}", "[": ...
StarcoderdataPython
3355929
import pytest from labfunctions import types from labfunctions.client.labstate import LabState from .factories import ( DockerfileImageFactory, ProjectDataFactory, WorkflowDataWebFactory, ) def test_client_labstate_LabState(): pd = ProjectDataFactory() wd = WorkflowDataWebFactory() wd2 = Wor...
StarcoderdataPython
6659104
import hashlib import lxml.html import os import pickle import requests import sys _ascii = ('01234567890123456789012345678901 ' '!"#$%&\'()*+,-./0123456789:;<=>?@' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`' 'abcdefghijklmnopqrstuvwxyz{|}~') class MoxaHTTP_2_2: def __init__(self, addr, ve...
StarcoderdataPython
3260365
# Copyright (c) 2021 <NAME> import sys gversum = 0 def decode(s, npkg=-1): global gversum i = 0 while len(s) - i >= 6 and npkg != 0: version = int(s[i:i+3],2) gversum += version typeid = int(s[i+3:i+6],2) i += 6 if npkg > 0: npkg -= 1 #print(ve...
StarcoderdataPython
1674234
import graphene from quiz.models import Category from quiz.types import CategoryType class GetAllCategories: all_categories = graphene.List(CategoryType, id=graphene.ID()) def resolve_all_categories(root, info): return Category.objects.all()
StarcoderdataPython
4900917
import sys import os import time import pandas as pd def get_latest_file(path, sub_dir='raw_data'): # get the late file from the specifiled path for root, dirs, files in os.walk(path): for local_dir in dirs: if local_dir == sub_dir: raw_data_path = os.path.join(root, local...
StarcoderdataPython
3414724
<reponame>fmiguelgarcia/conanRecipies from conans import ConanFile from conans.tools import download, unzip import os import shutil class BoostQtConan(ConanFile): name = "Boost" version = "1.64.0" description = "Boost (HEADERS Only) provides free peer-reviewed portable C++ source libraries" url = "http...
StarcoderdataPython
1875079
<reponame>Deonstudios/GDM # -*- coding: utf-8 -*- from django.contrib import admin from django.forms.models import BaseInlineFormSet from django.db import models from planing_tool.models import * from django.contrib.gis.db import models as geomodels from libs.widgets import LatLongWidget class CountryAdmin(admin.Mode...
StarcoderdataPython
379280
<gh_stars>0 # -*- coding: utf-8 -*- """Prerequisites from the system's package manager.""" import logging import shutil from spet.lib.utilities import execute from spet.lib.utilities import prettify def zypper(packages): """Install zypper packages. Args: packages (list): Zypper packages to install....
StarcoderdataPython
8157506
# course_2_assessment_1 """ The textfile, travel_plans.txt, contains the summer travel plans for someone with some commentary. Find the total number of characters in the file and save to the variable num. """ fileref = open("travel_plans.txt", "r") num = 0 for i in fileref: num += len(i) print(num) fileref.close()...
StarcoderdataPython
3413700
<reponame>Markopolo141/Thesis_code #Experiment: Bernoulli and Uniform #--------------------------------- # # computes the average error for mean estimation in the # bernoulli and uniform stratified data case using different methods # with a sample budget between 1 and 20, outputs data to csv file #do imports from r...
StarcoderdataPython
356573
#!/usr/bin/env python import sys import os import logging logging.basicConfig( filename=os.path.join(os.path.dirname(__file__), 'example.log'), level=logging.DEBUG, format='%(asctime)s %(levelname)s %(name)s %(pathname)s:%(lineno)d %(message)s', ) try: import settings # Assumed to be in the same d...
StarcoderdataPython
1799042
import multiprocessing import os import random from typing import Any import numpy as np import torch import torch.nn as nn __all__ = ["loss_fn", "set_seed", "AverageMeter", "optimal_num_of_loader_workers"] def loss_fn(preds: Any, labels: Any) -> Any: start_preds, end_preds = preds start_labels, end_labels ...
StarcoderdataPython
6401524
<gh_stars>0 #!/usr/bin/env python import rospy import cv2 from sensor_msgs.msg import CameraInfo rospy.init_node('camers_info', anonymous=True) pub = rospy.Publisher('/camera_rect/camera_info', CameraInfo, queue_size=10) rate = rospy.Rate(60) while not rospy.is_shutdown(): q=CameraInfo() q.header.frame_id='u...
StarcoderdataPython
1838673
from stackformation.aws.stacks import (BaseStack, SoloStack) from troposphere import ec2 from troposphere import ( # noqa FindInMap, GetAtt, Join, Parameter, Output, Ref, Select, Tags, Template, GetAZs, Export ) class EIP(object): def __init__(self, name): self.name = name self....
StarcoderdataPython
5044164
import unittest import matplotlib.animation as animation import matplotlib.pyplot as plt import numpy as np from pydrake.systems.analysis import Simulator from pydrake.systems.framework import ( Context, DiagramBuilder, PortDataType, VectorSystem) from pydrake.systems.primitives import SignalLogger from pydrake.s...
StarcoderdataPython
6666326
<reponame>LaudateCorpus1/inverse-compositional-STN import numpy as np import scipy.linalg import os,time import tensorflow as tf import warp # load MNIST data def loadMNIST(fname): if not os.path.exists(fname): # download and preprocess MNIST dataset from tensorflow.examples.tutorials.mnist import input_data m...
StarcoderdataPython
12802531
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="pyzeebe", version="2.3.1", author="<NAME>", author_email="<EMAIL>", description="Zeebe client api", long_description=long_description, long_description_content_type="text/markdown"...
StarcoderdataPython
6673894
<gh_stars>0 # Hacked By Ry2uko ;} import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np df = pd.read_csv('medical_examination.csv') def is_overweight(row): height_in_meters = row['height'] / 100 bmi = row['weight'] / height_in_meters**2 if bmi > 25: return 1 ret...
StarcoderdataPython
265036
# Generated by Django 3.1.7 on 2021-02-22 11:52 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
StarcoderdataPython
8067800
n = int(input('Digite um número inteiro para ver sua tabuada:')) print('='*12) print('{} x 01 = {}\n' '{} x 02 = {}\n' '{} x 03 = {}\n' '{} x 04 = {}\n' '{} x 05 = {}\n' '{} x 06 = {}\n' '{} x 07 = {}\n' '{} x 08 = {}\n' '{} x 09 = {}\n' '{} x 10 = {}\n' ''.fo...
StarcoderdataPython
12807817
from flask_admin.contrib.sqla.fields import QuerySelectField from flask_ckeditor import CKEditor, CKEditorField from admin.opencode import MxImageUploadField from model.models import * from model.netModels import * import os.path as op import os from jinja2 import Markup from model.adminModels import Common_Ad...
StarcoderdataPython
12809852
import logging import re import sys import functools from django.utils import six try: unicode = unicode except NameError: unicode = str logger = logging.getLogger(__name__) URL_PARAM_RE = re.compile('(?P<k>[^(=|&)]+)=(?P<v>[^&]+)(&|$)') URL_PARAM_NO_VALUE_RE = re.compile('(?P<k>[^(&|?)]+)(&|$)') def import...
StarcoderdataPython
9687108
<filename>car-segment/ensemble.py from common import * from submit import * from dataset.carvana_cars import * from net.tool import * def run_vote(): prediction_files=[ '/root/share/project/kaggle-carvana-cars/results/xx5-UNet512_2/submit/probs.8.npy', '/root/share/project/kaggle-carvana-cars/resu...
StarcoderdataPython
1895476
def apply(df): print('Do something here!') return df
StarcoderdataPython
8063232
#<NAME> #Codewars : @Kunalpod #Problem name: Complete The Pattern #14 #Problem level: 6 kyu def pattern(*args): n = args[0] y = 1 if len(args)==1 else args[1] s= "" if n<1: return s if y<=1: y = 1 for i in range(y): x = 1 if i==0 else 2 for j in range(x, n): s ...
StarcoderdataPython
1667076
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase from uw_upass import get_upass_url, get_upass_status from uw_upass.models import UPassStatus from restclients_core.exceptions import DataFailureException from uw_upass.util import fdao_upass_override ...
StarcoderdataPython
372265
<gh_stars>1-10 import os from pyproj import Transformer from vyperdatum.pipeline import * from vyperdatum.core import VyperCore vc = VyperCore() # run this once so that the path to the grids is added in pyproj def test_get_regional_pipeline_upperlower(): pipe = get_regional_pipeline('Ellipse', 'TSS', 'CAORbla...
StarcoderdataPython
8068128
<filename>api/views/story.py import django_filters from django.contrib.auth.models import User, Group from rest_framework import viewsets from rest_framework.response import Response from rest_framework.permissions import IsAuthenticated, IsAdminUser from rest_framework import filters from api.pagination import LargeRe...
StarcoderdataPython
90758
# -*- coding: utf-8 -*- # Imports #================================================== import json, keras, gensim, codecs import tensorflow as tf import numpy as np import keras.preprocessing.text as kpt from keras.callbacks import Callback from keras.layers import Dropout, Input, Dense, Embedding, LSTM, Bidirectional ...
StarcoderdataPython
5059564
<reponame>bsmithgall/cookiecutter-kindergarten<filename>{{ cookiecutter.app_name }}/{{ cookiecutter.app_name }}_backend/{{ cookiecutter.app_name }}/blueprints/web.py #!/usr/bin/env python # -*- coding: utf-8 -*- import os from flask import Blueprint, render_template __location__ = os.path.realpath( os.path.join(o...
StarcoderdataPython
5146137
<reponame>droid4control/python-mbus from ctypes import Structure, c_ubyte, c_size_t, c_long, POINTER # TODO: is this correct? c_time_t = c_long class MBusDataInformationBlock(Structure): _fields_ = [ ('dif', c_ubyte), ('dife', c_ubyte*10), ('ndife', c_size_...
StarcoderdataPython
9779689
<filename>datetime.py # import datetime # x = datetime.datetime.now() x = 'sss' print(x) # Return the year and name of weekday: #print(x.year) #print(x.strftime("%A")) # Create a date object: #x = datetime.datetime(2019, 02, 15) # Display the name of the month: #print(x.strftime("%B")) # more detail: https://www....
StarcoderdataPython
11329212
<filename>tests/test_popjwt.py import json from Cryptodome.PublicKey import RSA from jwkest.jwe import JWE from jwkest.jwk import KEYS from jwkest.jwk import RSAKey from oic.extension.popjwt import PJWT from oic.extension.popjwt import PopJWT __author__ = "roland" RSA_PRIVATE_KEY = """-----<KEY>""" def _eq(l1, l2...
StarcoderdataPython
1773829
from app import app as application # chamado manualmente com: $ flask run if __name__ == "__main__": import os application.run(host='0.0.0.0', port=os.getenv('SERVER_PORT'))
StarcoderdataPython
1692457
from .core import pre_compute from ..dispatch import dispatch from ..expr import Expr from odo.backends.json import JSON, JSONLines from odo import into from collections import Iterator from odo.utils import records_to_tuples @dispatch(Expr, JSON) def pre_compute(expr, data, **kwargs): seq = into(list, data, **kw...
StarcoderdataPython
6599088
<gh_stars>1000+ # coding: utf-8 """Test url tools. """ from __future__ import unicode_literals import platform import unittest from fs._url_tools import url_quote class TestBase(unittest.TestCase): def test_quote(self): test_fixtures = [ # test_snippet, expected ["foo/bar/egg/foo...
StarcoderdataPython
6497001
#!/usr/bin/python """ Site24x7 Okta Logs Plugin """ from datetime import datetime, timedelta import json import os import sys import time import traceback import glob import socket PYTHON_MAJOR_VERSION = sys.version_info[0] if PYTHON_MAJOR_VERSION == 3: import urllib import urllib.request as urlconnection ...
StarcoderdataPython
9655908
import fplcoin wallet_prefix = "" def publicKeyToAddress(compressedPublicKey): ''' Generate address from public key ''' h = fplcoin.hasher(compressedPublicKey).digest() return wallet_prefix + "c" + fplcoin.encoder.b58encode(h) def createNewWallet(): ''' Create wallet and save in db ''' privateKey, publicKey ...
StarcoderdataPython
1745945
<reponame>PotatoHD404/hs-log-fireplace from hsreplay.document import HSReplayDocument import json import os from io import BytesIO from hslog.export import EntityTreeExporter def get_file_paths(path): for root, _, files in os.walk(path): for filename in files: yield os.path.join(root, filename...
StarcoderdataPython
6642447
arq = open('alice.txt') #Abre o arquivo texto = arq.read() #Lendo todo arquivo texto = texto.lower() #Deixa tudo em minusculo import string for c in string.punctuation: # replace de todos os caracteres especiais por branco texto = texto.replace(c, ' ') texto = texto.split() dic = {} for ...
StarcoderdataPython
6532098
<reponame>aidotse/Team-Haste<gh_stars>0 import pandas as pd import os data = pd.read_csv("/mnt/hdd1/users/hakan/ai_haste/exp_stats/full_dataset.csv") data = data.drop("Unnamed: 0", 1) # data["well"] = pd.Series(data["C1"].apply(lambda x: os.path.splitext(x)[0].split("_")[3])) # grouped = data.groupby("magnification...
StarcoderdataPython
1616159
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains custom Dcc callback classes """ from __future__ import print_function, division, absolute_import from tpDcc import dcc from tpDcc.libs.python import decorators from tpDcc.abstract import callback as abstract_callback class _MetaCallback(type)...
StarcoderdataPython
6402764
<gh_stars>0 import unittest from colony.client import ColonyClient from colony.sandboxes import SandboxesManager class TestSandboxes(unittest.TestCase): def setUp(self) -> None: self.client_with_account = ColonyClient(account="my_account", space="my_space") self.sandboxes = SandboxesMana...
StarcoderdataPython
347337
<filename>vff/field.py # Copyright 2011 Terena. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright notice, # this list of ...
StarcoderdataPython
374180
__author__ = "<NAME> <<EMAIL>>" __date__ = "$May 18, 2015 16:46:39 EDT$" from ._version import get_versions __version__ = get_versions()['version'] del get_versions
StarcoderdataPython
3488650
<filename>core/utils/validators.py from django.core.validators import RegexValidator, ValidationError from django.utils.translation import ugettext_lazy as _ class DefaultValidator(object): char_only = RegexValidator(r'^[a-zA-Z-\s]*$', 'Only alphabetic characters are allowed.') def validate_phonenumber(value): ...
StarcoderdataPython
344994
def sum_of_intervals(intervals):
StarcoderdataPython
1942352
<reponame>HiroakiMikami/gpt-code-clippy<gh_stars>0 import json # import torch # import pandas as pd # import apps.eval.reident # from apps_utils.generate_gpt_codes import generate_prompt # from apps_utils.test_one_solution import eval_and_save_problems # from datasets import load_dataset, load_metric from fastcore.sc...
StarcoderdataPython
1689026
from ..pipeline import pipe, ppipe, p import ray examples = [ {'headline': 'Web ads for junk food could be banned in the UK', 'source': 'Guardian', 'nwords':11}, {'headline': 'The Olympics will be delayed', 'source': 'Guardian', 'nwords':5}, {'headline': 'Wirecard collapses after fraud scandal', 'source': ...
StarcoderdataPython
1683567
<reponame>ekhtiar/Python_for_Informatics_Solutions<filename>Ex_3/Ex_3_2.py #!/usr/bin/env python #adjust your shebang line #Rewrite your pay program using try and except so that your program #handles non-numeric input gracefully by printing a message and exiting the #program. The following shows two executions of the ...
StarcoderdataPython
4923979
<reponame>skad00sh/gsudmlab-mvtsdata_toolkit import os from os import path, makedirs import pandas as pd import numpy as np _summary_keywords: dict = {"params_col": 'Feature-Name', "null_col": "Null-Count", "count_col": "Val-Count", "labe...
StarcoderdataPython
1877363
<gh_stars>10-100 from os import mkdir from os.path import join, exists import datatable as dt from rs_datasets.data_loader import download_dataset from rs_datasets.generic_dataset import Dataset, safe class Epinions(Dataset): def __init__(self, path: str = None): """ :param path: folder which is...
StarcoderdataPython
3269499
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # Copyright (c) 2021 # # See the LICENSE file for details # see the AUTHORS file for authors # ---------------------------------------------------------------------- #-------------------- # System wide imports # ----------...
StarcoderdataPython
6640410
# Generated by Django 3.0.7 on 2020-07-05 00:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0011_person_person'), ] operations = [ migrations.AlterField( model_name='person', name='gender', ...
StarcoderdataPython
6622121
<reponame>maksonlee/multitest_transport # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
StarcoderdataPython
9688347
<reponame>lmregus/Portfolio<filename>python/coding_bat/count_code/count_code.py ######################### # # # Developer: <NAME> # # # ######################### def count_code(str): count = 0 for i in range(len(str)-3): if str[i:i+2] == 'co' and str[i+3] ==...
StarcoderdataPython
9605770
<reponame>Peng-zju/R3Net # coding: utf-8 import os datasets_root = '/usr/data/msd' # For each dataset, I put images and masks together msd_train_path = os.path.join(datasets_root, 'train') msd_test_path = os.path.join(datasets_root, 'test') cd
StarcoderdataPython
3361710
class ScribblerWrapper(object): def __init__(self, scribbler): self.scribbler = scribbler self.data = getattr(self.scribbler, "data", True) self.mc = getattr(self.scribbler, "mc", True) def __repr__(self): return repr(self.scribbler) def __getattr__(self, attr): if ...
StarcoderdataPython
8107317
import socket from struct import pack, unpack from threading import Lock from .Message import Message from .MessageSerializer import MessageSerializer, JsonSerializer __all__ = ["SocketManager"] class SocketManager: def __init__(self, **kwargs): self.socket = kwargs.get("socket", None) self.addr...
StarcoderdataPython
4961257
<reponame>lovaulonze/matplotlib-img-scatter import matplotlib import matplotlib.pyplot as plt import img_scatter import numpy a = numpy.linspace(-3.14*3, 3.14*3, 50) b = numpy.sin(a) c = numpy.cos(a) matplotlib.style.use("science") fig = plt.figure(figsize=(6, 4)) ax = fig.add_subplot(111) ax.scatter_img(x=a, y=b, s...
StarcoderdataPython
8165662
# 2. Write a Python program to calculate sum of first 10 numbers using a while loop. def sum_of_n_natural_numbers(num): if (num == 0): return num else: return (num * (num + 1) / 2) number = int(input("Please Enter any Number: ")) total_value = sum_of_n_natural_numbers(number) print("Sum of...
StarcoderdataPython
1720012
""" This file contains the main functionality of the software and is used to achieve two primary goals and is divided into two sections 1. Approximate the walker density as a function of time using Monte Carlo simulations 2. Determine the steady state solution of a random walk on a network using the methodolog...
StarcoderdataPython
9660360
<filename>gcp_netblocks/gcp_netblocks.py #!/usr/bin/env python3 ################################################################# # Google Cloud Netblock resolver - prints all subnets # # dependencies: # pip3 install dnspython ################################################################# import dns.resolver def ...
StarcoderdataPython
9700392
<filename>capture_raw_logger/advance_logger.py from typing import Optional, Dict, Union from aiologger import Logger import json import aiofiles import collections import time import os import asyncio import base64 import sys sys.path.insert(0, "../") from network_monitor.filters import get_protocol, present_protoco...
StarcoderdataPython
9776976
<reponame>murlokito/playground __title__ = "simulation" __author__ = "murlux" __copyright__ = "Copyright 2019, " + __author__ __credits__ = (__author__, ) __license__ = "MIT" __email__ = "<EMAIL>" import pandas as pd import numpy as np from datetime import datetime as dt from dateutil.parser import parse from typing i...
StarcoderdataPython
11357344
<filename>hata/discord/guild/preinstanced.py __all__ = ( 'AuditLogEvent', 'ContentFilterLevel', 'GuildFeature', 'MFA', 'MessageNotificationLevel', 'NsfwLevel', 'VerificationLevel', 'VerificationScreenStepType', 'VoiceRegion', ) import warnings from ...backend.export import export f...
StarcoderdataPython
1855617
<reponame>sayand0122/Hokage_bot<filename>cogs/music.py import discord from discord.ext import commands from discord import FFmpegPCMAudio import asyncio from async_timeout import timeout import itertools from youtube_dl import YoutubeDL from validator_collection import checkers import pafy class Audio(): """Crea...
StarcoderdataPython
1834581
# Preppin' Data 2021 Week 07 import pandas as pd # Load data shopping_list = pd.read_excel('unprepped_data\\PD 2021 Wk 7 Input - Shopping List and Ingredients.xlsx', engine='openpyxl', sheet_name = 'Shopping List') keywords = pd.read_excel('unprepped_data\\PD 2021 Wk 7 Input - Shopping List and Ingredients.xlsx', engi...
StarcoderdataPython
204873
<reponame>willdickson/puzzleboxes<gh_stars>0 #!/usr/bin/env python from __future__ import print_function import cv2 import rospy from blob_finder import BlobFinder from puzzleboxes_base import PuzzleBoxesBase from puzzleboxes_base import TrackedObject from puzzleboxes_base import ObjectPosition from puzzleboxes.msg ...
StarcoderdataPython
9628206
from setuptools import setup setup( name='vectormatrixlib', version='0.1.0', description='Linear Algebra Matrix Tool', author='<NAME>', author_email='<EMAIL>', url='https://github.com/andrewking1597/vector-matrix', packages=['vectormatrixlib'] )
StarcoderdataPython
3250473
from pylama.main import check_path, parse_options def lint(): options = parse_options(["../"]) errors = check_path(options, rootdir=".") if errors: raise BaseException(*errors)
StarcoderdataPython
6646044
<gh_stars>10-100 #!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Ver...
StarcoderdataPython
6496228
<filename>tests/context.py<gh_stars>0 """Shared context information for all tests.""" import sys import os from typing import ClassVar, Optional import unittest import keyper sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) # pylint: disable=wrong-import-position import libtvdb # p...
StarcoderdataPython
6590708
'''OpenGL extension ARB.shading_language_100 This module customises the behaviour of the OpenGL.raw.GL.ARB.shading_language_100 to provide a more Python-friendly API Overview (from the spec) This extension string indicates that the OpenGL Shading Language is supported. The Shading Language is defined b...
StarcoderdataPython
8083754
# Code generated by `typeddictgen`. DO NOT EDIT. """V1NodeStatusDict generated type.""" from typing import TypedDict, Dict, List from kubernetes_typed.client import ( V1AttachedVolumeDict, V1ContainerImageDict, V1NodeAddressDict, V1NodeConditionDict, V1NodeConfigStatusDict, V1NodeDaemonEndpoint...
StarcoderdataPython
6537388
<reponame>mcauser/deshipu-micropython-is31fl3731<filename>is31fl3731.py import math import time _MODE_REGISTER = const(0x00) _FRAME_REGISTER = const(0x01) _AUTOPLAY1_REGISTER = const(0x02) _AUTOPLAY2_REGISTER = const(0x03) _BLINK_REGISTER = const(0x05) _AUDIOSYNC_REGISTER = const(0x06) _BREATH1_REGISTER = const(0x08)...
StarcoderdataPython
8067558
from asmdot import * # pylint: disable=W0614 @handle_command_line() class HaskellEmitter(Emitter): is_first_statement: bool = False @property def language(self): return 'haskell' @property def filename(self): return f'src/Asm/Internal/{self.arch.capitalize()}.hs' @property ...
StarcoderdataPython
4929800
<reponame>jimgreen/Viscid<filename>viscid/amr_field.py """For fields that consist of a list of fields + an AMRSkeleton Note: An AMRField is NOT a subclass of Field, but it is a giant wrapper around a lot of Field functionality. """ from __future__ import print_function import numpy as np import viscid # from...
StarcoderdataPython
6474856
<reponame>Worteks/OrangeAssassin """ CREATE TABLE `awl` ( `username` varchar(255) NOT NULL DEFAULT '', `email` varchar(200) NOT NULL DEFAULT '', `ip` varchar(40) NOT NULL DEFAULT '', `count` int(11) NOT NULL DEFAULT '0', `totscore` float NOT NULL DEFAULT '0', `signedby` varchar(255) NOT NULL DEFAULT '', ...
StarcoderdataPython
3283370
import FWCore.ParameterSet.Config as cms process = cms.Process("READ") process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring("file:overlap.root")) process.tst = cms.EDAnalyzer("RunLumiEventChecker", eventSequence = cms.untracked.VEventID( cms.EventID(1,0,0), ...
StarcoderdataPython
3564492
<gh_stars>0 __author__ = 'bneron' import os import sys import glob import time from lxml import etree from abc import ABCMeta, abstractmethod class Node(metaclass=ABCMeta): def __init__(self, name, job=None): self.name = name self.parent = None self.children = {} self._job = jo...
StarcoderdataPython
5043317
""" Segmentation Continuation Graph Components Wrapper Script - Takes a graph of continuation edges as input - Makes an id mapping that merges the connected continuations using global ids """ import synaptor as s import argparse parser = argparse.ArgumentParser() # Inputs & Outputs parser.add_argument("proc_url") p...
StarcoderdataPython
9794737
<filename>apps/deployment/urls.py # @Time : 2019/2/27 14:42 # @Author : xufqing from django.urls import path,include from deployment.views import project, deploy, applog from rest_framework import routers router = routers.SimpleRouter() router.register(r'projects', project.ProjectViewSet, basename="projects") rout...
StarcoderdataPython
199820
# -*- coding: utf-8 -*- """ Provide authentication using Django Web Framework :depends: - Django Web Framework Django authentication depends on the presence of the django framework in the ``PYTHONPATH``, the Django project's ``settings.py`` file being in the ``PYTHONPATH`` and accessible via the ``DJANGO_SETTINGS_M...
StarcoderdataPython
195223
# -*- coding: utf-8 -*- # Copyright (c) 2020-2021 <NAME>. # All rights reserved. # Licensed under BSD-3-Clause-Clear. See LICENSE file for details. from django.conf import settings from django.urls import path from . import views app_name = 'Handleiding' urlpatterns = [ path('', views.HandleidingVie...
StarcoderdataPython
255624
# -*- coding: utf-8 -*- # @author: zhangping import json import datetime as dt from urllib import request from urllib import parse from sqlalchemy import create_engine, Column, String from sqlalchemy.types import VARCHAR, Date, TIMESTAMP, Integer, Float, DECIMAL from sqlalchemy.ext.declarative import declarative_base...
StarcoderdataPython
3415483
""" @file @brief Implements a base class which defines a pair of transforms applied around a predictor to modify the target as well. """ from sklearn.base import TransformerMixin, BaseEstimator class BaseReciprocalTransformer(BaseEstimator, TransformerMixin): """ Base for transform which transforms the featur...
StarcoderdataPython
100083
<filename>reopening-tiers/scrape.py """ Download the status of each county according to California's tier-based reopening framework. Source: https://covid19.ca.gov/safer-economy/ """ import pytz import pathlib import pandas as pd from datetime import datetime # Pathing THIS_DIR = pathlib.Path(__file__).parent.absolut...
StarcoderdataPython
8117192
"""Module to define qp distributions that inherit from scipy distributions Notes ----- In the qp distribtuions the last axis in the input array shapes is reserved for pdf parameters. This is because qp deals with numerical representations of distributions, where some of the input parameters consist of arrays of valu...
StarcoderdataPython