max_stars_repo_path
stringlengths
3
269
max_stars_repo_name
stringlengths
4
119
max_stars_count
int64
0
191k
id
stringlengths
1
7
content
stringlengths
6
1.05M
score
float64
0.23
5.13
int_score
int64
0
5
iris_sdk/models/portin.py
NumberAI/python-bandwidth-iris
2
28800
<gh_stars>1-10 #!/usr/bin/env python from __future__ import division, absolute_import, print_function from future.builtins import super from iris_sdk.models.activation_status import ActivationStatus from iris_sdk.models.base_resource import BaseResource from iris_sdk.models.data.portin import PortInData from iris_sdk...
1.773438
2
lib/common_lib.py
JakubWS/imap-mailbox-backup-tool
0
28801
<filename>lib/common_lib.py from __future__ import unicode_literals from encodings import utf_8 import imaplib, datetime, time, re, requests, yaml, os, email, glob, shutil, mailbox, smtplib, ssl, hashlib from zipfile import ZipFile from email.header import decode_header from os.path import exists as file_exists from o...
2.3125
2
test/helpers/pylint/findWarnings.py
drewrisinger/pyGSTi
1
28802
from .helpers import get_pylint_output, write_output from ..automation_tools import read_json def find_warnings(): print('Generating warnings in all of pygsti. This takes around 30 seconds') config = read_json('config/pylint_config.json') blacklist = config['blacklisted-warnings'] command...
2.296875
2
orangecontrib/esrf/syned/widgets/extension/ow_ebs.py
oasys-esrf-kit/OASYS1-ESRF-Extensions
0
28803
<reponame>oasys-esrf-kit/OASYS1-ESRF-Extensions import os, sys import numpy import scipy.constants as codata from syned.storage_ring.magnetic_structures.undulator import Undulator from syned.storage_ring.magnetic_structures import insertion_device from PyQt5.QtGui import QPalette, QColor, QFont from PyQt5.QtWidgets...
1.703125
2
test_project/test_app/urls.py
ninemoreminutes/django-trails
2
28804
<reponame>ninemoreminutes/django-trails<filename>test_project/test_app/urls.py<gh_stars>1-10 # Django from django.urls import re_path # Test App from .views import index urlpatterns = [ re_path(r'^$', index, name='index'), ]
1.59375
2
bin/analysis/ipa/constraints/node.py
ncbray/pystream
6
28805
<gh_stars>1-10 # Copyright 2011 <NAME> # # 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 applicable law or agreed to in...
2.03125
2
levels/7/initialize_db.py
industrydive/stripe-ctf-2-vm
36
28806
#!/usr/bin/env python import sys from datetime import datetime from random import SystemRandom import bcrypt import sqlite3 import client import db import settings conn = db.DB(settings.database) conn.debug = True c = conn.cursor db.rewrite_entropy_file(settings.entropy_file) rand = SystemRandom() def rand_choice...
2.328125
2
jp.atcoder/abc251/abc251_a/31673235.py
kagemeka/atcoder-submissions
1
28807
<reponame>kagemeka/atcoder-submissions<filename>jp.atcoder/abc251/abc251_a/31673235.py<gh_stars>1-10 def main() -> None: s = input() print(s * (6 // len(s))) if __name__ == "__main__": main()
1.585938
2
day3/classwork/1.py
LencoDigitexer/AI
0
28808
''' Вводится последовательность из N чисел. Найти произведение и количество положительных среди них чисел ''' proizvedenie = 1 a = input().split(" ") for i in range(0, len(a)): proizvedenie *= int(a[i]) print("Произведение " + str(proizvedenie)) print("Кол-во чисел " + str(len(a)))
3.90625
4
Codes/Liam/001_two_sum.py
liuxiaohui1221/algorithm
256
28809
<reponame>liuxiaohui1221/algorithm # 执行用时 : 348 ms # 内存消耗 : 13 MB # 方案:哈希表 class Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ # 创建哈希表{value:idx} record = {} # 遍数组 for idx...
3.359375
3
ckanext/doi/lib/metadata.py
NINAnor/ckanext-doi
16
28810
#!/usr/bin/env python3 # encoding: utf-8 # # This file is part of ckanext-doi # Created by the Natural History Museum in London, UK import logging from ckan.lib.helpers import lang as ckan_lang from ckan.model import Package from ckan.plugins import PluginImplementations, toolkit from ckanext.doi.interfaces import I...
2.03125
2
oo/carros.py
AdnirJunior/pythonbirds
0
28811
<filename>oo/carros.py """Voce deve criar uma classe carro que vai assumir dois atributos compostos por duas classes: 1) Motor 2) Direcao O motor terá a responsabilidade de controlar a velocidade. Ele Oferece os seguintes atributos: 1) Atribuo de dado velocidade 2) Método acelerar, que deverá incrementar 1 unidade 3...
3.765625
4
src/icon/exception.py
goldworm-icon/gw-iconsdk
2
28812
<gh_stars>1-10 # -*- coding: utf-8 -*- from enum import IntEnum, unique from typing import Optional, Any class SDKException(Exception): @unique class Code(IntEnum): OK = 0 KEY_STORE_ERROR = 1 ADDRESS_ERROR = 2 BALANCE_ERROR = 3 DATA_TYPE_ERROR = 4 JSON_RPC_ERRO...
2.59375
3
test/test_add_movie.py
Dananas732/php4dvd_lyzlov
0
28813
# -*- coding: utf-8 -*- from model.movie import Movie from model.user import User from fixture.selenium_fixture import app def test_add_movie(app): app.session.login(User.Admin()) old_list = app.movie.get_movie_list() app.movie.add_movie(Movie(film_name='name', film_year='2016')) new_list = app.movie....
2.34375
2
main.py
dashdeckers/Wildfire-Control-Python
2
28814
# Argument handling import argparse parser = argparse.ArgumentParser() parser.add_argument("-r", "--run", action="store_true", help="Start the learning process") parser.add_argument("-m", "--memories", type=int, default=100, help="Number of runs of demonstration data to...
2.65625
3
util/job_launching/procman.py
LauXy/accel-sim-framework
88
28815
<reponame>LauXy/accel-sim-framework #!/usr/bin/env python # 2020 (c) <NAME>, Purdue University # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # Redistributions of source code must retain the above copyright notice, this...
1.367188
1
nabu/processing/tfreaders/numpy_float_array_as_tfrecord_reader.py
Darleen2019/Nabu-MSSS
18
28816
<reponame>Darleen2019/Nabu-MSSS '''@file numpy_float_array_as_tfrecord_reader.py contains the NumpyFloatArrayAsTfrecordReader class''' import os import numpy as np import tensorflow as tf import tfreader import pdb class NumpyFloatArrayAsTfrecordReader(tfreader.TfReader): '''reader for numpy float arrays''' ...
2.453125
2
apps/telegram_bot/bot/filters.py
alena-kono/bot-valley
0
28817
<reponame>alena-kono/bot-valley import telegram from telegram.ext.filters import MessageFilter from apps.telegram_bot.preferences import global_preferences class CryptoCurrencyFilter(MessageFilter): """A custom MessageFilter that filters telegram text messages by the condition of entering the list of BUTTONS...
2.96875
3
functest/func_py_custom_renderer.py
mitsuba-rei/lightmetrica-v3
0
28818
<reponame>mitsuba-rei/lightmetrica-v3 # --- # jupyter: # jupytext: # formats: ipynb,py:light # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.2.1 # kernelspec: # display_name: Python 3 # language: python # name: py...
2.1875
2
Ingest/Reddit.py
andersonpaac/Credd
0
28819
<filename>Ingest/Reddit.py import json import praw from Analysis.Common import Constants def get_reddit_instance(config_json_fname: str = Constants.CONFIG_FNAME): """ Given path to a file containing the credentials for reddit API's client_id, secret, user agent. This will return the praw instance. :pa...
2.8125
3
web crawler functions/get_next_target.py
akshaynagpal/python_web_crawler
1
28820
def get_next_target(page): start_link = page.find('<a href=') if start_link == -1: return None,0 else: start_quote = page.find('"', start_link) end_quote = page.find('"', start_quote + 1) url = page[start_quote + 1:end_quote] return url, end_quote
2.765625
3
botwinick_math/maths/aggregate.py
dbotwinick/python-botwinick-math
0
28821
# author: <NAME>, <NAME> # title: occasionally trivial support functions for aggregating data for python 2/3 [only numpy as dependency] # NOTE: these functions are generally tested meant for 1D although they may apply or be easily extended to nd # license: 3-clause BSD import numpy as np flat_max = np.max flat_min = ...
3.265625
3
leetcode-algorithms/107. Binary Tree Level Order Traversal II/107.binary-tree-level-order-traversal-ii.py
cnyy7/LeetCode_EY
0
28822
<reponame>cnyy7/LeetCode_EY<filename>leetcode-algorithms/107. Binary Tree Level Order Traversal II/107.binary-tree-level-order-traversal-ii.py # # @lc app=leetcode id=107 lang=python3 # # [107] Binary Tree Level Order Traversal II # # https://leetcode.com/problems/binary-tree-level-order-traversal-ii/description/ # # a...
3.9375
4
openrave/python/examples/tutorial_iklookat.py
jdsika/TUM_HOly
2
28823
<filename>openrave/python/examples/tutorial_iklookat.py #!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2011 <NAME> (<EMAIL>) # # 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 ...
2.71875
3
notebooks/calcs/rating.py
pcejrowski/iwi
0
28824
<filename>notebooks/calcs/rating.py import metrics def rate(artToCatSim, label, membershipData, categoryTree, artNamesDict, catNamesDict): # countBefore1 = artToCatSim.count_nonzero() # for article in membershipData: # id_and_categories = article.split('\t') # articleId = int(id_and_categories...
2.375
2
tests/test_socfaker_application.py
priamai/soc-faker
122
28825
def test_socfaker_application_status(socfaker_fixture): assert socfaker_fixture.application.status in ['Active', 'Inactive', 'Legacy'] def test_socfaker_application_account_status(socfaker_fixture): assert socfaker_fixture.application.account_status in ['Enabled', 'Disabled'] def test_socfaker_name(socfaker_f...
1.945313
2
test.py
OSSome01/ekalavya
2
28826
#!/usr/bin/env python from __future__ import print_function import roslib roslib.load_manifest('begineer_tutorial') import sys import rospy import cv2 import numpy as np from std_msgs.msg import String from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError class image_converter: def __init_...
2.875
3
configs/retinanet/retinanet_r50_fpn_1x_bdd100k.py
XDong18/mmdetection
0
28827
<reponame>XDong18/mmdetection<filename>configs/retinanet/retinanet_r50_fpn_1x_bdd100k.py _base_ = [ '../_base_/models/retinanet_r50_fpn.py', '../_base_/datasets/bdd100k_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] # optimizer optimizer = dict(type='SGD', lr=0.01, mo...
1.59375
2
questions/max-number-of-k-sum-pairs/Solution.py
marcus-aurelianus/leetcode-solutions
141
28828
""" You are given an integer array nums and an integer k. In one operation, you can pick two numbers from the array whose sum equals k and remove them from the array. Return the maximum number of operations you can perform on the array.   Example 1: Input: nums = [1,2,3,4], k = 5 Output: 2 Explanation: Starting with ...
3.828125
4
tests/core/service_test.py
dnephin/Tron
0
28829
<reponame>dnephin/Tron<filename>tests/core/service_test.py import mock from testify import setup, assert_equal, TestCase, run from testify.assertions import assert_not_equal from tests.assertions import assert_mock_calls from tests.testingutils import autospec_method from tron.core import service, serviceinstance from...
2.125
2
constants.py
mattdeitke/allenact-1
1
28830
import os from pathlib import Path ABS_PATH_OF_TOP_LEVEL_DIR = os.path.abspath(os.path.dirname(Path(__file__)))
2
2
Implementation/eshopee.py
AchuthaVVyas/259902_Ltts_StepIN-
0
28831
<reponame>AchuthaVVyas/259902_Ltts_StepIN- import tkinter as tk from tkinter.font import Font from tkinter import * from tkinter import messagebox from models.Store import Store from models.ShoppingCart import ShoppingCart import datetime def viewStore(): global storeWindow storeLabelFrame = LabelFrame(store...
2.890625
3
atomate/vasp/database.py
Zhuoying/atomate
0
28832
<gh_stars>0 """ This module defines the database classes. """ import json import zlib from typing import Any import gridfs from bson import ObjectId from maggma.stores.aws import S3Store from monty.dev import deprecated from monty.json import MontyEncoder from pymatgen.electronic_structure.bandstructure import ( ...
2.203125
2
ergoservice/dashboard/models.py
damirmedakovic/ergoapp
0
28833
from django.db import models # Create your models here. class Case(models.Model): name = models.CharField(max_length =100) email = models.EmailField(max_length=100, unique=True) message = models.CharField(max_length=500, blank=True) created_at = models.DateTimeField(auto_now_add=True)
2.421875
2
BaseFeaturizer.py
dsbrown1331/HardRLWithYoutube
34
28834
<filename>BaseFeaturizer.py from abc import ABCMeta, abstractmethod # Required to create an abstract class import numpy as np from scipy import spatial # For nearest neighbour lookup import tensorflow as tf class BaseFeaturizer(metaclass=ABCMeta): """Interface for featurizers Featurizers take images that are ...
3.046875
3
101-200/101-110/106-binaryTreeFromInPostOrder/binaryTreeFromInPostOrder.py
xuychen/Leetcode
0
28835
# Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class Solution(object): def buildTree(self, inorder, postorder): """ :type preorder: List[int] :type inorder: List[int] :rt...
3.875
4
csv2ofx/mappings/starling.py
mibanescu/csv2ofx
153
28836
<reponame>mibanescu/csv2ofx from __future__ import ( absolute_import, division, print_function, unicode_literals) from operator import itemgetter def fixdate(ds): dmy = ds.split('/') # BUG (!?): don't understand but stolen from ubs-ch-fr.py return '.'.join((dmy[1], dmy[0], dmy[2])) mapping = { '...
2.40625
2
logtf_analyser/tests/test_convert_id3_to_id64.py
cob16/logtf_analyzer
0
28837
<filename>logtf_analyser/tests/test_convert_id3_to_id64.py from unittest import TestCase from parameterized import parameterized from logtf_analyser.utils import convert_id3_to_id64 class TestConvert_id3_to_id64(TestCase): def test_convert_id3_to_id64(self): id64 = convert_id3_to_id64("[U:1:22202]") ...
2.796875
3
aiida_lsmo/workchains/cp2k_binding_energy.py
mbercx/aiida-lsmo
2
28838
<reponame>mbercx/aiida-lsmo<filename>aiida_lsmo/workchains/cp2k_binding_energy.py # -*- coding: utf-8 -*- """Binding energy workchain""" from copy import deepcopy from aiida.common import AttributeDict from aiida.engine import append_, while_, WorkChain, ToContext from aiida.engine import calcfunction from aiida.orm ...
1.78125
2
apps/blog/editer_user.py
jhjguxin/blogserver
3
28839
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.utils.translation import ugettext as _ from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestCont...
2.15625
2
exercises/ja/solution_01_03_02.py
tuanducdesign/spacy-course
2
28840
# spaCyをインポートし、日本語のnlpオブジェクトを作成 import spacy nlp = spacy.blank("ja") # テキストを処理 doc = nlp("私はツリーカンガルーとイッカクが好きです。") # 「ツリーカンガルー」のスライスを選択 tree_kangaroos = doc[2:4] print(tree_kangaroos.text) # 「ツリーカンガルーとイッカク」のスライスを選択 tree_kangaroos_and_narwhals = doc[2:6] print(tree_kangaroos_and_narwhals.text)
3.015625
3
Source/Tools/BindTool/writer.py
ssinai1/rbfx
441
28841
<filename>Source/Tools/BindTool/writer.py<gh_stars>100-1000 class InterfaceWriter(object): def __init__(self, output_path): self._output_path_template = output_path + '/_{key}_{subsystem}.i' self._fp = { 'pre': {}, 'post': {}, } def _write(self, key, subsystem, ...
2.46875
2
setix/backends/b_numpy.py
dustymugs/python-setix
3
28842
import numpy import numbers import math import struct from six.moves import zip from .. import SetIntersectionIndexBase, SearchResults, EmptySearchResults def _check_numpy (): missing = [] for fn in ("zeros", "empty", "digitize", "resize", "concatenate", "unique", "bincount", "argsort"): if not getatt...
2.28125
2
gitzer/director/migrations/0001_initial.py
IgnisDa/Gitzer
2
28843
<reponame>IgnisDa/Gitzer # Generated by Django 3.1.5 on 2021-01-16 08:15 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Repository', fields=[ ...
1.835938
2
model_based/svms/test_model_compression.py
vohoaiviet/tag-image-retrieval
50
28844
import sys import os import time from basic.common import ROOT_PATH,checkToSkip,makedirsforfile from basic.util import readImageSet from simpleknn.bigfile import BigFile, StreamFile from basic.annotationtable import readConcepts,readAnnotationsFrom from basic.metric import getScorer if __name__ == "__main__": t...
2.078125
2
tonnikala/languages/python/generator.py
tetframework/Tonnikala
13
28845
<reponame>tetframework/Tonnikala import ast from ast import * from collections.abc import Iterable from .astalyzer import FreeVarFinder from ..base import LanguageNode, ComplexNode, BaseGenerator from ...helpers import StringWithLocation from ...runtime.debug import TemplateSyntaxError import sys try: # pragma: no...
1.796875
2
training_data.py
zestdoc/echoAI
0
28846
# Format of training prompt defaultPrompt = """I am a Cardiologist. My patient asked me what this means: Input: Normal left ventricular size and systolic function. EF > 55 %. Normal right ventricular size and systolic function. Normal valve structure and function Output: Normal pumping function of the left and right ...
2.078125
2
db/src/scrape/programs.py
tomquirk/uq-api
8
28847
""" Programs scraper """ import re import src.scrape.util.helpers as helpers import src.settings as settings from src.logger import get_logger _LOG = get_logger("programs_scraper") def programs(): """ Scrapes list of programs :return: List, of program codes """ _LOG.debug("scraping list of progra...
3.140625
3
wagtail_review/forms.py
jacobtoppm/wagtail-review
44
28848
<reponame>jacobtoppm/wagtail-review from django import forms from django.conf import settings from django.core.exceptions import ImproperlyConfigured, ValidationError from django.forms.formsets import DELETION_FIELD_NAME from django.utils.module_loading import import_string from django.utils.translation import ugettext...
2.0625
2
metrics.py
giacoballoccu/Explanation-Quality-CPGPR
0
28849
import numpy as np from myutils import * from easydict import EasyDict as edict def dcg_at_k(r, k, method=1): r = np.asfarray(r)[:k] if r.size: if method == 0: return r[0] + np.sum(r[1:] / np.log2(np.arange(2, r.size + 1))) elif method == 1: return np.sum(r / np.log2(np....
2.28125
2
config/setting.py
SihongHo/Vehicles-Dispatch-Simulator
19
28850
import numpy as np #Simulater Setting #------------------------------ MINUTES=60000000000 TIMESTEP = np.timedelta64(10*MINUTES) PICKUPTIMEWINDOW = np.timedelta64(10*MINUTES) #It can enable the neighbor car search system to determine the search range according to the set search distance and the size of the grid. #It u...
2.78125
3
samples/heksekraft.py
clayboone/ursina
1
28851
<gh_stars>1-10 from ursina import * from copy import copy class MinecraftClone(Entity): def __init__(self): super().__init__() c = Cylinder(6, height=1, start=-.5) verts = c.vertices tris = c.triangles vertices = list() triangles = list() colors = list() ...
2.28125
2
gemini/bin/gemini_python.py
codes1gn/gemini
0
28852
<gh_stars>0 import sys import traceback import copy import importlib from gemini.gemini_compiler import * from gemini.utils import * def main(argv=sys.argv[1:]): print('gemini compiler entry point') filename = copy.deepcopy(argv[0]) arguments = copy.deepcopy(argv[1:]) compiler = GeminiCompiler() ...
2.21875
2
modules/quiet-scan-threaded.py
ChristopherBilg/cse-545-PCTF-team-31
0
28853
<reponame>ChristopherBilg/cse-545-PCTF-team-31 #!/usr/bin/env python3 import subprocess import sys, getopt, os import threading import argparse cwd = os.getcwd() path = cwd + "/port_scanner_files/" ip_list_file = path + "input/IP_list.txt" nmap_output_file = path + "temp_output/nmap_output" #the scorchedearth option ...
2.578125
3
veselin-angelov-ekatte/create_database.py
veselin-angelov/training-projects
0
28854
from helpers import create_connection, execute_query connection = create_connection( "postgres", "postgres", "admin", "127.0.0.1", "5432" ) create_database_query = "CREATE DATABASE ekatte" execute_query(connection, create_database_query) connection = create_connection( "ekatte", "postgres", "admin", "127.0.0...
2.828125
3
src/isaw.events/setup.py
isawnyu/isaw.web
0
28855
# -*- coding: utf-8 -*- """ This module contains the tool of Events """ import os from setuptools import setup, find_packages def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() version = '0.2' long_description = ( read('README.txt') + '\n' + 'Change history\n' ...
1.476563
1
api/model.py
thomashusken/img-class
0
28856
<filename>api/model.py<gh_stars>0 from torchvision import models import json import numpy as np import torch from collections import OrderedDict from operator import itemgetter import os def return_top_5(processed_image): # inception = models.inception_v3(pretrained=True) inception = models.inception_v3() ...
2.1875
2
2015/day-09/day9.py
smolsbs/aoc
1
28857
<reponame>smolsbs/aoc #!/usr/bin/env python3 from collections import defaultdict from itertools import permutations def main(): places = defaultdict(lambda: {}) with open('input', 'r') as fp: for line in fp.read().split('\n'): a = line.split(' ') places[a[0]][a[2]] = int(a[4]) ...
3.375
3
tests/test_generator.py
reesmanp/typedpy
0
28858
<filename>tests/test_generator.py import pickle from pytest import raises from typedpy import Structure, serialize from typedpy.fields import Generator class Foo(Structure): g: Generator def test_generator_wrong_type(): with raises(TypeError): Foo(g=[]) def test_generator(): foo = Foo(g=(i f...
2.4375
2
stateflow/stateclass.py
frolenkov-nikita/django-stateflow
0
28859
<filename>stateflow/stateclass.py """ Workflow based on Python classes """ class StateMetaclass(type): def __init__(cls, name, bases, dict): super(StateMetaclass, cls).__init__(name, bases, dict) abstract = dict.pop('abstract', False) if not abstract: cls.forward_transitions = ...
2.6875
3
src/app/admin/__init__.py
schwetzen/liblr
0
28860
from django.contrib import admin from app.models import * from app.admin.tip import ReadingTipAdmin from app.admin.user import UserAdmin # Register your models here. admin.site.register(User, UserAdmin) admin.site.register(ReadingTip, ReadingTipAdmin)
1.359375
1
handler.py
jocafneto/Insurance-All-Cross-Sell
0
28861
<reponame>jocafneto/Insurance-All-Cross-Sell from crypt import methods import os import pickle import pandas as pd import lightgbm from flask import Flask, request, Response from healthinsurance.HealthInsurance import HealthInsurance # loading model model = pickle.load( open( 'model/LGBM_Model.pkl', 'rb' ) ) # initia...
2.625
3
python_scripts/video_pipeline.py
MichlF/scikit-learn-mooc
1
28862
# %% [markdown] # # How to define a scikit-learn pipeline and visualize it # %% [markdown] # The goal of keeping this notebook is to: # - make it available for users that want to reproduce it locally # - archive the script in the event we want to rerecord this video with an # update in the UI of scikit-learn in a f...
3.671875
4
generator_configuration.py
mariaangelapellegrino/virtual_assistant_generator
2
28863
from nltk.corpus import wordnet as wn import json from pyinflect import getAllInflections, getInflection import re import inflect import urllib.parse from SPARQLWrapper import SPARQLWrapper, JSON from urllib.parse import quote from py_thesaurus import Thesaurus import sys, getopt WN_NOUN = 'n' WN_VERB = 'v' WN_ADJECTI...
2.890625
3
strictdoc/backend/sdoc/grammar/grammar.py
BenGardiner/strictdoc
0
28864
STRICTDOC_GRAMMAR = r""" Document[noskipws]: '[DOCUMENT]' '\n' // NAME: is deprecated. Both documents and sections now have TITLE:. (('NAME: ' name = /.*$/ '\n') | ('TITLE: ' title = /.*$/ '\n')?) (config = DocumentConfig)? ('\n' grammar = DocumentGrammar)? free_texts *= SpaceThenFreeText section_contents...
1.78125
2
app/extensions/api/__init__.py
ssfdust/full-stack-flask-smorest
33
28865
# Copyright 2019 RedLotus <<EMAIL>> # Author: RedLotus <<EMAIL>> # # 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 applic...
1.921875
2
bot.py
donmbelembe/dino-auto-play
0
28866
# https://www.youtube.com/watch?v=bf_UOFFaHiY # http://www.trex-game.skipser.com/ from PIL import ImageGrab, ImageOps import pyautogui import time from numpy import * class Cordinates(): replayBtn = (962, 530) dinosaur = (664, 536) # dinaosaur standing # dinosaur = (686, 548) # dinosaur down #730= x co...
2.921875
3
cybox/objects/win_event_object.py
Mattlk13/python-cybox
40
28867
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. from mixbox import entities from mixbox import fields import cybox.bindings.win_event_object as win_event_binding from cybox.objects.win_handle_object import WinHandle from cybox.common import ObjectProperties, Str...
2.125
2
cfgov/cfgov/settings/production.py
cyVR/aur
0
28868
<filename>cfgov/cfgov/settings/production.py from .base import * # Sends an email to developers in the ADMIN_EMAILS list if Debug=False for errors LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'mail_admins': { 'level': 'ERROR', 'filters': [], ...
1.75
2
Lab5/try.py
HelloYeew/helloyeew-lab-computer-programming-
1
28869
<reponame>HelloYeew/helloyeew-lab-computer-programming- import tkinter as tk root = tk.Tk() def motion(event): x, y = event.x, event.y print('{}, {}'.format(x, y)) root.bind('<Motion>', motion) root.mainloop()
3.1875
3
deprecated/nexus_server/nexus_db.py
utarsuno/quasar_source
7
28870
# coding=utf-8 """This module, nexus_db.py, defines a basic started database for the Nexus Server.""" import pika import json import time from scripts.docker.wait_for_rabbit_host import WaitForRabbitMQHost from libraries.database_abstraction.sql.sqlite import sqlite_db from libraries.database_abstraction.sql.sqlite i...
2.09375
2
tdcsm/cli.py
tdcoa/usage
0
28871
<filename>tdcsm/cli.py #! /usr/bin/env python "tdcsm command-line interface" import argparse from pathlib import Path from typing import Any, Sequence, Callable, List, Optional from logging import getLogger from .tdgui import coa as tdgui from .tdcoa import tdcoa from .model import load_filesets, load_srcsys, dump_sr...
2.265625
2
cogs/Musica.py
Borgotto/discord_bot
0
28872
import itertools import asyncio from async_timeout import timeout from functools import partial from youtube_dl import YoutubeDL from discord.ext import commands from discord import Embed, FFmpegPCMAudio, HTTPException, PCMVolumeTransformer, Color ytdlopts = { 'format': 'bestaudio/best', 'extractaudio': True, ...
2.46875
2
kipy/fileobjs/sch/sheet.py
Arie001/klonor-kicad
2
28873
<reponame>Arie001/klonor-kicad<gh_stars>1-10 ''' Classes based on SchItem for parsing and rendering $Sheet sub-sheets inside a .sch file. ''' from .schitem import SchItem class Sheet(SchItem): keyword = '$Sheet' _by_keyword = {} def render(self, linelist): linelist.append(self.keyword) sel...
2.6875
3
PyBullet_experiments/experiments/plot_return.py
AnonymousLaBER/LaBER
3
28874
#!/usr/bin/env python import os import pickle import json import argparse from collections import defaultdict import tensorflow as tf import numpy as np import matplotlib.pyplot as plt parser = argparse.ArgumentParser() parser.add_argument('path', help="Tf path to event files from which to extract variables") parse...
2.609375
3
helper/policy.py
icesiv/webstaurantstore
0
28875
<reponame>icesiv/webstaurantstore from rotating_proxies.policy import BanDetectionPolicy class MyPolicy(BanDetectionPolicy): def response_is_ban(self, request, response): # use default rules, but also consider HTTP 200 responses # a ban if there is 'captcha' word in response body. ban = sup...
2.34375
2
training/scripts/trainer/src/convert/convert.py
TommyTeaVee/training
2,442
28876
<reponame>TommyTeaVee/training<filename>training/scripts/trainer/src/convert/convert.py<gh_stars>1000+ import os import argparse import numpy as np import tensorflow as tf from tensorflow.python.platform import gfile from tensorflow.python.framework import dtypes from tensorflow.python.tools import strip_unused_lib ...
2.46875
2
packages/Python/lldbsuite/test/lang/swift/private_decl_name/TestSwiftPrivateDeclName.py
enterstudio/swift-lldb
2
28877
# TestSwiftPrivateDeclName.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org...
1.953125
2
tests/test_input_laplace_time_ebcs.py
Gkdnz/SfePy
0
28878
input_name = '../examples/diffusion/laplace_time_ebcs.py' output_name_trunk = 'test_laplace_time_ebcs' from tests_basic import TestInputEvolutionary class Test(TestInputEvolutionary): pass
0.960938
1
boto3_exceptions/iot1click-devices.py
siteshen/boto3_exceptions
2
28879
<reponame>siteshen/boto3_exceptions<filename>boto3_exceptions/iot1click-devices.py import boto3 exceptions = boto3.client('iot1click-devices').exceptions ForbiddenException = exceptions.ForbiddenException InternalFailureException = exceptions.InternalFailureException InvalidRequestException = exceptions.InvalidReques...
1.695313
2
IMfunctions.py
KartoffelCheetah/personal-website-001
0
28880
<gh_stars>0 #!/usr/bin/env python3.5 #-*- coding:utf-8 -*- """Functions handling images.""" import subprocess import os # supported ImageMagic Formats? def getDateTimeOriginal(filePath) : """If image has DateTimeOriginal then returns it as a string. If it's missing or there isn't EXIF at all then returns empty s...
3.0625
3
plugins/modules/oci_resource_manager_template.py
slmjy/oci-ansible-collection
108
28881
<reponame>slmjy/oci-ansible-collection<gh_stars>100-1000 #!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/g...
1.625
2
test.py
alexanderAustin/PythonGame
0
28882
# This was built from the tutorial https://www.raywenderlich.com/24252/beginning-game-programming-for-teens-with-python import pygame, math, random from pygame.locals import * import pyganim # 2 - Initialize the game pygame.init() width, height = 640, 480 screen=pygame.display.set_mode((width, height)) pygame.display...
3.6875
4
Python diye Programming sekha 1st/List to string.py
mitul3737/My-Python-Programming-journey-from-Beginning-to-Data-Sciene-Machine-Learning-AI-Deep-Learning
1
28883
<reponame>mitul3737/My-Python-Programming-journey-from-Beginning-to-Data-Sciene-Machine-Learning-AI-Deep-Learning<gh_stars>1-10 li=["a","b","d"] print(li) str="".join(li)#adding the lists value together print(str) str=" ".join(li)#adding the lists value together along with a space print(str) str=",".join(li)#adding ...
3.375
3
src/classes/demo.py
daninarvaezr/SeleniumInmofianza
1
28884
import os file=open("C:/Users/michael.duran\OneDrive - <NAME>/Documents/Audisoft/Thomas/Inmofianza/TeamQA/SeleniumInmofianza/src/classes/datos.txt","w") file.write("Primera línea" + os.linesep) file.write("Segunda línea") file.close()
2.46875
2
src/egyptian_data_generator/finance.py
mahmoudahmedd/Egyptian-Data-Generator
9
28885
<gh_stars>1-10 from egyptian_data_generator.helpers import Helpers class Finance: def americanexpressCreditCardNumber(self): return self.generateCreditCardNumber("americanexpress") def discoverCreditCardNumber(self): return self.generate("discover") def mastercardCred...
3.109375
3
modulo_exclusao/limpa_tableWidget_tela_pedido.py
kallif003/Sistema-Delivery
0
28886
def limpar(*args): telaPrincipal = args[0] cursor = args[1] banco10 = args[2] sql_limpa_tableWidget = args[3] telaPrincipal.valorTotal.setText("Valor Total:") telaPrincipal.tableWidget_cadastro.clear() telaPrincipal.desconto.clear() telaPrincipal.acrescimo.clear() sql_limpa_tableW...
2.28125
2
src/app.py
borjlp/the-real-devops-challenge
0
28887
<gh_stars>0 from os import environ import logging from bson.objectid import ObjectId from bson.errors import InvalidId from flask import Flask, jsonify, abort from flask_pymongo import PyMongo from typing import List, Dict from pymongo import MongoClient, errors from mongoflask import MongoJSONEncoder, find_restaurant...
2.515625
3
.ycm_extra_conf.py
baileyforrest/calico
0
28888
import subprocess def Settings( **kwargs ): flags = [ '-x', 'c++', '-Wall', '-Wextra', '-Wno-unused-parameter', '-std=c++14', '-I', '.', '-I', 'third_party/googletest/googletest/include', '-I', 'third_party/abseil-cpp', '-I', 'third_party/libbcf', '-pthread', ] ...
2.1875
2
python/lookout/__init__.py
meyskens/lookout-sdk
5
28889
<reponame>meyskens/lookout-sdk """Lookout - Assisted Code Review""" import pkg_resources pkg_resources.declare_namespace(__name__)
0.992188
1
Examples/Example_2.py
jmwerner/iPython_Parser
3
28890
<filename>Examples/Example_2.py # can I have a comment here? import re a = 538734 print(re.search('a', "helalo") != None) print(re.search('a', "hallo") != None) a = 30 * 25 for i in range(0,5): print(i) ''' This is a sigma $\sigma$ symbol in markdown and a forall $\forall$ symbol too! Here's some mathemati...
3.734375
4
test/test_phones.py
tnurtdinov-st/python_traning
0
28891
<gh_stars>0 import re from random import randrange def test_phones_on_homepage(app): contact_from_homepage = app.contact.get_contact_list()[0] contact_from_editpage = app.contact.get_contact_info_from_edit_page(0) assert contact_from_homepage.all_phones_from_homepage == merge_phones_like_on_homepage(contac...
2.46875
2
data_analysis/data_analysis.py
marcoscale98/emojinet
0
28892
<gh_stars>0 import argparse import logging import sys import json import plotly.offline import plotly.graph_objs as go sys.path.append(sys.path[0] + "/..") from utils.fileprovider import FileProvider from preprocessing.reader import EvalitaDatasetReader from nltk.tokenize import TweetTokenizer logging.getLogger().se...
2.4375
2
examples/pytorch/rgcn/entity_classify.py
shengwenLeong/dgl
2
28893
""" Modeling Relational Data with Graph Convolutional Networks Paper: https://arxiv.org/abs/1703.06103 Code: https://github.com/tkipf/relational-gcn Difference compared to tkipf/relation-gcn * l2norm applied to all weights * remove nodes that won't be touched """ import argparse import numpy as np import time import ...
2.671875
3
setup.py
DanielIzquierdo/osisoftpy
10
28894
<filename>setup.py #!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import re from glob import glob from io import open from os.path import basename from os.path import splitext import setuptools from os import path # Single sourcing the ve...
1.992188
2
tests/test.py
JostMigenda/hop-SNalert-app
0
28895
import subprocess from hop import Stream from hop.auth import Auth from hop import auth from hop.io import StartPosition from hop.models import GCNCircular import argparse import random import threading import time from functools import wraps import datetime import numpy import uuid from dotenv import load_dotenv impor...
2
2
iotkit/led.py
dhrg/iot-edison
0
28896
<reponame>dhrg/iot-edison<gh_stars>0 import mraa # For accessing the GPIO import time # For sleeping between blinks global led def init_led(pin): global led led = mraa.Gpio(pin) # Get the LED pin object led.dir(mraa.DIR_OUT) # Set the direction as output led.write(0) def write_le...
3.421875
3
Assignments/Exam Preparation/Python Advanced Exam - 27 June 2020/03. List Manipulator.py
KaloyankerR/python-fundamentals-repository
0
28897
from collections import deque def list_manipulator(numbers, *args): numbers = deque(numbers) action = args[0] direction = args[1] if action == 'add': parameters = [int(x) for x in args[2:]] if direction == 'beginning': [numbers.appendleft(x) for x in parameters[::-1]] ...
3.890625
4
mayan/apps/documents/tests/test_links.py
bonitobonita24/Mayan-EDMS
343
28898
from django.urls import reverse from ..links.document_file_links import ( link_document_file_delete, link_document_file_download_quick ) from ..links.favorite_links import ( link_document_favorites_add, link_document_favorites_remove ) from ..links.trashed_document_links import link_document_restore from ..mod...
1.96875
2
cogs/anime.py
TheLastNever/discord_bot
0
28899
<gh_stars>0 import discord from discord.ext import commands class anime(commands.Cog): def __init__(self, bot): self.bot = bot self._last_member = None def setup(bot): bot.add_cog(anime(bot))
2.390625
2