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
factory_boss/generator.py
mariushelf/factory_boss
1
12776051
<reponame>mariushelf/factory_boss<filename>factory_boss/generator.py from graphlib import TopologicalSorter from typing import Dict, List from factory_boss.entity import Entity from factory_boss.instance import Instance, InstanceValue from factory_boss.reference_resolver import ReferenceResolver from factory_boss.rela...
2.53125
3
xendbg/xen/vcpu.py
nspin/pyxendbg
0
12776052
<reponame>nspin/pyxendbg from xendbg.xen._bindings import ffi, lib class VCPU: def __init__(self, domain, vcpu_id): self.domain = domain self.vcpu_id = vcpu_id def get_context(self): return self.domain.xen.xenctrl.vcpu_getcontext(self.domain.domid, self.vcpu_id) def set_context(s...
1.945313
2
creational/monostate/logic/__init__.py
Kozak24/Patterns
0
12776053
<gh_stars>0 from .character import Character, Archetype
1.070313
1
spoopy/refactored/classification/feature/feature_predictor.py
rodrigobressan/PADify
12
12776054
<gh_stars>10-100 import pickle from typing import List, Tuple import numpy as np import os from sklearn.metrics import accuracy_score from refactored.classification.classifier import BaseClassifier from refactored.feature_extraction.cnn_model import CnnModel from refactored.io_utils import save_txt from refactored.pr...
2.03125
2
Wasteland/__init__.py
Tonysun1/Explore-Z-Wasteland
1
12776055
<reponame>Tonysun1/Explore-Z-Wasteland import app.intro if __name__ == '__main__': app.intro.init()
1.046875
1
src/sage/modular/overconvergent/__init__.py
bopopescu/sage
3
12776056
from __future__ import absolute_import pass from . import all
1.054688
1
qcarsim/constructors.py
QUT-Motorsport/QUTMS_VehicleSim
2
12776057
from qcarsim import * def dummy_output(number): doubled_value = dummy_calc(number) return p_tag(doubled_value)
1.796875
2
Test.py
OdinManiac/test_repo
0
12776058
print("ololo")
1.078125
1
python/validAnagram.py
guozengxin/myleetcode
0
12776059
<reponame>guozengxin/myleetcode # https://leetcode.com/problems/valid-anagram/ class Solution(object): def isAnagram(self, s, t): """ :type s: str :type t: str :rtype: bool """ if len(s) != len(t): return False chars = {} for c in s: ...
3.53125
4
agent.py
jackdolgin/FHDMM
11
12776060
<reponame>jackdolgin/FHDMM import sys import numpy as np from pandas import DataFrame import pandas as pd from utils import softmax pd.options.display.float_format = '{:.2f}'.format class ContextualBandit(object): def __init__(self): # Contexts and their probabilities of winning self.contexts = {'...
2.828125
3
Competitie/views_rayon_teams.py
RamonvdW/nhb-apps
1
12776061
<filename>Competitie/views_rayon_teams.py # -*- coding: utf-8 -*- # Copyright (c) 2019-2021 <NAME>. # All rights reserved. # Licensed under BSD-3-Clause-Clear. See LICENSE file for details. from django.http import Http404 from django.urls import reverse from django.views.generic import TemplateView from django.cor...
2.0625
2
src/__init__.py
bwu62/subshift
1
12776062
<gh_stars>1-10 from .subshift import Subtitle import glob def listSrts(): return glob.glob("./*.srt")
1.867188
2
examples/test_franka.py
zhuyifengzju/pybullet-planning
1
12776063
#!/usr/bin/env python from __future__ import print_function import pybullet as p from pybullet_tools.utils import add_data_path, connect, dump_body, load_model, disconnect, wait_for_user, \ get_movable_joints, get_sample_fn, set_joint_positions, get_joint_name, LockRenderer, link_from_name, get_link_pose, \ ...
2.03125
2
setup.py
jonathantumulak/docker-push-ssh
70
12776064
<filename>setup.py<gh_stars>10-100 import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="docker-push-ssh", version="0.1.8", author="<NAME>", author_email="", description="Push local docker images to your remote servers via ssh without the has...
1.726563
2
predict/module/tvm_kernel/lite/python/at_ops/config_tool.py
unseenme/mindspore
7
12776065
<reponame>unseenme/mindspore<filename>predict/module/tvm_kernel/lite/python/at_ops/config_tool.py<gh_stars>1-10 # Copyright 2019 Huawei Technologies Co., Ltd # # 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 ...
1.726563
2
accelbyte_py_sdk/api/platform/models/fulfillment_history_info.py
AccelByte/accelbyte-python-sdk
0
12776066
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py # justice-platform-service (4.10.0) # pylint: disabl...
1.835938
2
djgumroad/products/views.py
hiroto0222/gumroad-clone
0
12776067
from django.http.response import JsonResponse from django.shortcuts import redirect, render from django.views import generic from .models import Product from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse from .forms import ProductModelForm import stripe from django.conf import set...
2.046875
2
app/core/console/database/migration.py
tomkiel/falafel
1
12776068
<filename>app/core/console/database/migration.py from app.core.console.http import route, controller from textwrap import dedent from os import listdir, remove from fnmatch import fnmatch from sqlalchemy import create_engine, \ MetaData, \ orm, \ exc, \ inspect, \ Table, \ insert, \ Column, ...
2.546875
3
plotting/plot_distance_benchmark.py
MartinTschechne/ASL-hdbscan
1
12776069
<filename>plotting/plot_distance_benchmark.py import argparse import matplotlib.pyplot as plt import pandas as pd import seaborn as sns sns.set() def main(): """Plotting script for distance function benchmarking.""" parser = argparse.ArgumentParser( add_help=True, formatter_class=argparse.Arg...
3.09375
3
upython_esp32/device/boot.py
elecun/TimboBlockEditor
0
12776070
<gh_stars>0 # This file is executed on every boot (including wake-boot from deepsleep) #import esp #esp.osdebug(None) #import webrepl #webrepl.start() try: import usocket as socket except: import socket import time import esp esp.osdebug(None) import gc gc.collect() #connect to network via wifi ssid = 'U...
2.03125
2
corrector_module/opmon_corrector/document_manager.py
nordic-institute/X-Road-Metrics
2
12776071
""" Document Manager - Corrector Module """ # The MIT License # Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS) # Copyright (c) 2017-2020 Estonian Information System Authority (RIA) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and a...
1.710938
2
peerdrive/client/extract-public.image.py
DavidAlphaFox/chef-server
0
12776072
<reponame>DavidAlphaFox/chef-server #!/usr/bin/env python # vim: set fileencoding=utf-8 : # # PeerDrive # Copyright (C) 2011 <NAME> <<EMAIL> DOT k<EMAIL> AT freenet DOT de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # ...
2
2
newjunk.py
projecthexa/hexa
7
12776073
<reponame>projecthexa/hexa __author__ = 'guru' import binascii dataSting = '0005010203041122334400b9' def checkSum(dataString,write): totalSum = 0 for i in range(0,22): if( i%2 == 0): totalSum += int(dataString[i:i+2],16) checkSum = dataString[22:24] tempString = hex(totalSum)[::-1] ...
2.84375
3
cleverhans/experimental/certification/optimization.py
anant90/cleverhans
0
12776074
"""Code for setting up the optimization problem for certification.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os import numpy as np from scipy.sparse.linalg import eigs, LinearOperator import tensorflow as tf from tensorflow.contr...
2.75
3
Python/Uri 1011 - Esfera.py
Gui25Reis/URI
0
12776075
raio = int(input('Raio: ')) format(r,'.2f') pi = 3.14159 volume = (4/3)*pi*raio**3 print("Volume = ", format(volume,'.3f')) #Para o URI: R = float(input()) format(R,'.2f') pi = 3.14159 v = (4/3)*pi*R**3 print("VOLUME = "+format(v,'.3f'))
3.9375
4
oops_fhir/r4/code_system/explanation_of_benefit_status.py
Mikuana/oops_fhir
0
12776076
from pathlib import Path from fhir.resources.codesystem import CodeSystem from oops_fhir.utils import CodeSystemConcept __all__ = ["ExplanationOfBenefitStatus"] _resource = CodeSystem.parse_file(Path(__file__).with_suffix(".json")) class ExplanationOfBenefitStatus: """ ExplanationOfBenefitStatus A c...
2.515625
3
loader.py
Flaiers/Youtube
2
12776077
from aiogram.contrib.fsm_storage.memory import MemoryStorage from aiogram import Bot, Dispatcher from config import TOKEN import logging # уровень логов logging.basicConfig(level=logging.INFO) # место хранения данных FSM storage = MemoryStorage() # инициализация бота bot = Bot(token=TOKEN, parse_...
2
2
flask_boilerplate/admin/__init__.py
wellls/flask_boilerplate
0
12776078
# -*- coding:utf-8 -*- # __author__ = '<NAME>' # 管理后台入口文件 from flask import Blueprint admin = Blueprint('admin', __name__, template_folder='./templates', static_folder='./static') theme = 'default' from . import views
1.34375
1
tools/binfiles/hex2bin.py
poojabitripple/TvRQ
0
12776079
<reponame>poojabitripple/TvRQ<filename>tools/binfiles/hex2bin.py #!/usr/bin/env python from __future__ import print_function import sys orig = sys.stdin.read() v = 0 isfirst = True for x in orig: if x.isspace(): continue offs = "0123456789abcdef".find(x.lower()) if offs == -1: sys.stderr...
2.453125
2
utils.py
sweemeng/devkami_dev_survey_streamlit
1
12776080
from collections import Counter import matplotlib.pyplot as plt import numpy as np import pandas as pd def get_count_except(counter, exception): keys = [] results = [] for key in counter: if key == exception: continue keys.append(key) results.append(counter[key]) re...
2.9375
3
src/login/urls.py
gucunskidj/exam-registration
0
12776081
<filename>src/login/urls.py<gh_stars>0 from django.urls import path from . import views #from django.contrib.auth import views as auth_views IND urlpatterns = [ path('', views.loginPage, name='login'), path('prijavi_ispite/', views.prijavi_ispite, name='prijavi_ispite'), path('prijavljeni_ispiti/', view...
1.851563
2
examples/basic-example.py
deephyper/metalgpy
0
12776082
<reponame>deephyper/metalgpy from numpy.random.mtrand import sample import metalgpy as mpy # the @mpy.meta decorator transform an original python code # into a meta-program. f is now symbolizing the original python code @mpy.meta def f(x): return x**2 # program is a symbol representing the call to f (original py...
3.46875
3
backend/puzzle/serializers/comment.py
mductran/puzzle
0
12776083
<gh_stars>0 from rest_framework import serializers from puzzle.models import Comment from puzzle.models import Account class CommentSerializer(serializers.ModelSerializer): author_name = serializers.CharField(source="author.user.username", read_only=True) class Meta: model = Comment field...
2.15625
2
src/adresses/api.py
marquesds/zipnator
0
12776084
<reponame>marquesds/zipnator import logging from django.conf import settings from django.http import Http404 from adresses import InvalidZipcodeException from adresses.models import Address from adresses.helpers import validate_zipcode from restless.dj import DjangoResource from restless.preparers import FieldsPreparer...
2.109375
2
env/lib/python3.6/site-packages/pytests/test_filters.py
rogerscristo/BotFWD
0
12776085
<gh_stars>0 #!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # <NAME> <<EMAIL>> # # This program 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 Softwar...
2.3125
2
ooobuild/lo/chart/chart_document.py
Amourspirit/ooo_uno_tmpl
0
12776086
<filename>ooobuild/lo/chart/chart_document.py # coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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/licens...
1.382813
1
openstack_health/tests/test_status.py
MountakBernotas/https-github.com-openstack-openstack-health
0
12776087
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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...
2.03125
2
torsionfit/qmscan/generate_dihedral.py
ChayaSt/torsionfit
14
12776088
<reponame>ChayaSt/torsionfit<filename>torsionfit/qmscan/generate_dihedral.py __author__ = '<NAME>' from pymol import stored, cmd import os import errno def torsion_drive(atom1, atom2, atom3, atom4, interval, selection, path, mol_name,): """ This function generates input pdbs of dihedral angles selected of in...
2.640625
3
GidData/GidData.py
Aerobautics/google-images-download
0
12776089
<reponame>Aerobautics/google-images-download #!/usr/bin/env python3 # Written by <NAME> (Aerobautics) November 2019 """XML data processing for GID. """ from tkinter import * from xml.dom.minidom import parse from xml.dom.minidom import getDOMImplementation import sys import os import errno import xml.dom.minidom sys.pa...
2.65625
3
Pygame/JonathanGame/analogclock.py
youaresherlock/PythonPractice
0
12776090
<gh_stars>0 import sys, random, math, pygame from pygame import locals # main program begins pygame.init() screen = pygame.display.set_mode((600, 500)) pygame.display.set_caption("Circle Demo") screen.fill((0, 0, 100)) pos_x = 300 pos_y = 250 radius = 200 angle = 360 color = 240, 240, 240 # repeating loop while Tru...
3.765625
4
tests/test_c_nms_onnx_ex.py
hozmi/box_utils
0
12776091
"""Test NMS. Run the examples described in `ONNX docs`_. .. _ONNX docs: https://github.com/onnx/onnx/blob/main/docs/Operators.md#NonMaxSuppression """ # import pytest import numpy as np import box_utils._c.box_nms as box_nms def test_nms_suppress_by_iou(): """Test NMS - suppress by IoU.""" # -- boxes =...
2.453125
2
Codes/gracekoo/interview_8.py
ghoslation/algorithm
256
12776092
# -*- coding: utf-8 -*- # @Time: 2020/7/16 11:38 # @Author: GraceKoo # @File: interview_8.py # @Desc: https://www.nowcoder.com/practice/8c82a5b80378478f9484d87d1c5f12a4?tpId=13&rp=1&ru=%2Fta%2Fcoding-interviews&qr # u=%2Fta%2Fcoding-interviews%2Fquestion-ranking class Solution: def climbStairs(self, n: int) -> in...
3.59375
4
src/compiler/gen_comb.py
luinaudt/deparser
7
12776093
from collections import OrderedDict def genListCombinaison(P4Graph): """ Generate a set of tuples from graph. Each tuple represents possible active headers at the same time """ combinaison = [] return combinaison def genListHeaders(P4Graph): """ Generate the dictionnary of headers. P4Gra...
2.921875
3
tests/test_rut_chile.py
merfrei/rut-chile
0
12776094
import pytest from rut_chile import rut_chile class TestIsValidRutTests: @pytest.mark.parametrize("test_input, expected_value", [ (None, ValueError), ("", ValueError), (" ", ValueError), ("k", ValueError), ("1", ValueError), ("*", ValueError), ("1-", ValueE...
2.578125
3
tests/components/slack/__init__.py
tbarbette/core
22,481
12776095
<reponame>tbarbette/core """Slack notification tests."""
0.871094
1
datasets.py
skyoung/ROAM
37
12776096
# ------------------------------------------------------------------ # PyTorch implementation of # "ROAM: Recurrently Optimizing Tracking Model", CVPR, 2020 # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> (<EMAIL>) # ------------------------------------------------------------------ imp...
2.296875
2
athenet/tests/stress_test.py
heurezjusz/Athena
2
12776097
"""Stress testing athenet.algorithm.derest.derivative functions. """ import numpy as np import theano import theano.tensor as T import unittest from math import e from athenet.algorithm.numlike import TheanoInterval from athenet.algorithm.derest.derivative import * from athenet.algorithm.derest.activation import * fro...
2.390625
2
openrave/docs/source/tutorials/openravepy_examples/create_customsensor.py
jdsika/TUM_HOly
2
12776098
"""Creates a custom kinematics body with two links and one joint """ from openravepy import * from numpy import eye, array, zeros env = Environment() # create openrave environment env.SetViewer('qtcoin') # attach viewer (optional) with env: robot=RaveCreateRobot(env,'') robot.SetName('camera') linkinfo=Ki...
2.765625
3
codes/scripts/audio/generate_quantized_mels.py
neonbjb/DL-Art-School
12
12776099
<reponame>neonbjb/DL-Art-School import os import os.path as osp import logging import random import argparse import torchvision import utils import utils.options as option import utils.util as util from models.waveglow.denoiser import Denoiser from trainer.ExtensibleTrainer import ExtensibleTrainer from data import c...
1.867188
2
src/petronia/defimpl/platform/windows/input/keymap.py
groboclown/petronia
19
12776100
<reponame>groboclown/petronia<filename>src/petronia/defimpl/platform/windows/input/keymap.py<gh_stars>10-100 """ Handlers for Windows VirtualKey (VK) codes and key names. """ from typing import Sequence, List, Dict, Set def vk_to_names(vk: int) -> Sequence[str]: maps: List[str] = [] for vk_str, code in STR_...
2.4375
2
label_2_json_V3.py
zmyml/parking_labeler
0
12776101
# 检查label是否包含最后时间加1秒,若没有则加一行数据 # 图像列表也加在函数中 # 单个生成一个标签 # 给出一个旧标签的位置(全路径),生成一张新标签 import os import numpy as np import json from create_v3_012 import create_json_record # from create_v2 import create_json_record # path_txt_for_check = r'Y:\dataset\inroad_parking_videos\pics\2019_08_12\DDT2G1907ZMY00008SY_label.txt' # p...
2.703125
3
refman/__init__.py
adriancaruana/refman
0
12776102
<gh_stars>0 from .refman import RefMan __version__ = "0.0.1"
1.09375
1
others/write_result_keras.py
prise-3d/Thesis-SampleAnalysis
0
12776103
# main imports import numpy as np import pandas as pd import json import os, sys, argparse, subprocess # model imports from keras.models import model_from_json from sklearn.model_selection import train_test_split from sklearn.preprocessing import MinMaxScaler from joblib import dump, load # image processing imports f...
2.296875
2
nlp/chatbot/test.py
zhangyong2/tensorflow_nlp
1
12776104
# -*- coding: utf-8 -*- import tensorflow as tf from nlp.chatbot.dataset import data_utils from nltk.translate.bleu_score import sentence_bleu from tqdm import tqdm import os,sys import numpy as np from nlp.chatbot import model as s2s_model def test_bleu(count, args): print('准备数据') bucket_dbs = data_utils.re...
2.328125
2
bluebottle/projects/migrations/0037_longer_place_20170914_1129.py
terrameijar/bluebottle
10
12776105
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-09-14 09:29 from __future__ import unicode_literals import bluebottle.utils.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0036_merge_20170831_1449'), ] operations...
1.570313
2
cartography/record.py
tingled/synthetic-cartography
0
12776106
import numpy as np import pyaudio from pyaudio import PyAudio from queue import Queue import struct from time import sleep def get_steinberg_device_idx(pa: PyAudio) -> int: """ looks up the steinberg device index """ for i in range(pa.get_device_count()): name = pa.get_device_info_by_index(i)...
2.578125
3
LeetCode/python3/47.py
ZintrulCre/LeetCode_Archiver
279
12776107
<reponame>ZintrulCre/LeetCode_Archiver<gh_stars>100-1000 class Solution: def permuteUnique(self, nums: List[int]) -> List[List[int]]: def BackTrack(m, per: list): if m == n: if per not in permutation: permutation.append(per) return per ...
3.125
3
plugin/src/test/resources/refactoring/extractmethod/ClassContext.before.py
consulo/consulo-python
0
12776108
class PyCharm: <selection>print("Hello Pycharm!")</selection>
1.421875
1
plotter/delegation_demand.py
kit-tm/fdeval
1
12776109
import matplotlib.pyplot as plt import numpy as np import matplotlib.dates as mdates from datetime import datetime import matplotlib.patches as patches from matplotlib.backends.backend_pdf import PdfPages import math import operator def putval(x1, x2, demand_per_tick, result): """ Helper function to calculate ...
2.9375
3
pwa_store_backend/pwas/migrations/0016_auto_20210814_1636.py
nathanhfoster/pwa-store-backend
0
12776110
# Generated by Django 3.1.13 on 2021-08-14 16:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pwas', '0015_auto_20210814_1622'), ] operations = [ migrations.RemoveField( model_name='pwa', name='tags', ...
1.445313
1
test/integration/streams/test_stream.py
RSNirwan/my_utils
0
12776111
<reponame>RSNirwan/my_utils<filename>test/integration/streams/test_stream.py from typing import Any from dataclasses import dataclass import pytest from my_utils.streams.stream import Stream @dataclass class Inp: start: int # required end: int # required value: Any # optional @pytest.fixture def in...
2.453125
2
setup.py
bliof/csvtotable
0
12776112
#!/usr/bin/env python from setuptools import setup _version = "2.1.1" setup(name="csvtotable", version=_version, description="Simple commandline utility to convert CSV files" "to searchable and sortable HTML table.", author="<NAME>", author_email="<EMAIL>", url="https://github.com...
1.898438
2
lib/nets/utils.py
HungWei-Andy/tf-mask-rcnn
2
12776113
import tensorflow as tf from nets.network import Network import numpy as np # !! The default data format used here is NHWC !! # TODO: scope def conv_bn(X, inChannel, outChannel, kernel, istrain, stride=1, name=None): out = tf.layers.conv2d(X, outChannel, kernel, stride, 'same', use_bias=False, name=name) out =...
2.6875
3
python/nluflows/mapping/bp/__init__.py
jiportilla/ontology
0
12776114
from .service_catalog_mapper import ServiceCatalogMapper
1.15625
1
train_DCNN.py
taka4abe/JACC_CV
1
12776115
# -*- coding: utf-8 -*- # This is the part of the codes used for the article entitled "A Deep Learning # Approach for Assessment of Regional Wall Motion Abnormality from # Echocardiographic Images" for JACC CV imaging. # # Before using this code, please prepare image data at "./data_folder" dir. # # ./data_folder/trai...
2.375
2
heron/common/tests/python/pex_loader/pex_loader_unittest.py
takeratta/heron
1
12776116
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2016 Twitter. All rights reserved. # # 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...
2.21875
2
pdxpixel/apps/search/views.py
nicorellius/pdxpixel
1
12776117
from watson.views import BaseListView class SearchView(BaseListView): template_name = 'search/default.html'
1.328125
1
review/models.py
hossainchisty/Multi-Vendor-eCommerce
16
12776118
from cloudinary.models import CloudinaryField from customers.models import Customer from django.db import models from django.utils.translation import gettext as _ from model.common_fields import BaseModel from product.models import Product class Review(BaseModel): """ Review model for products """ ...
2.25
2
pollirio/modules/channel.py
dpaleino/pollirio
0
12776119
# -*- coding: utf-8 -*- from pollirio.modules import expose from pollirio import choose_dest from pollirio import conf @expose('mass') def mass(bot, ievent, msg=None): if ievent.channel == conf.nickname: return modes = bot.userlist[ievent.channel.lower()][ievent.nick] if '~' in modes or \ '&...
2.171875
2
test.py
deemozyc/zycs_WiFi_location
2
12776120
# coding:utf-8 from sklearn import svm from sklearn.svm import SVC import csv import matplotlib import matplotlib.pyplot as plt from base import * def print_base(): #输出采集点地图 tst_coord = get_csv('db/02/tst01crd.csv') tst_coord = coord_zip(tst_coord) fig,ax = plt.subplots() plt.axis([2, 16, 14, 32]) plt.scatter(...
2.65625
3
hosts/league_setup.py
nathanbraun/fantasy-developer-kit
6
12776121
import hosts.fleaflicker as site from hosts.db import overwrite_league from pandas import DataFrame import sqlite3 from utilities import DB_PATH LEAGUE_ID = 34958 TEAM_ID = 217960 LEAGUE_NAME = "Family League" HOST = 'fleaflicker' SCORING = {'qb': 'pass6', 'skill': 'ppr', 'dst': 'high'} # open up our database connec...
2.75
3
TWLight/users/migrations/0024_userprofile_lang.py
saloniig/TWLight
67
12776122
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("users", "0023_auto_20170820_1623")] operations = [ migrations.AddField( model_name="userprofile", name="lang", field=models.CharField( ...
1.765625
2
tests/test_property.py
frmdstryr/atom
1
12776123
<gh_stars>1-10 #------------------------------------------------------------------------------ # Copyright (c) 2013-2018, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-----------------------------...
2.5625
3
tests/test_tyco107.py
atollk/flake8-typing-collections
2
12776124
<filename>tests/test_tyco107.py from tests.util import BaseTest class Test_TYCO107(BaseTest): @classmethod def flags(cls): return ["--tyco_generic_alt"] def test_pass_1(self): code = """ import typing def foo(x: typing.AbstractSet): ... """ resu...
2.671875
3
models/DUP_Net.py
KaidongLi/pytorch-LatticePointClassifier
0
12776125
import os import numpy as np import torch import torch.nn as nn from .pu_net import PUNet class SORDefense(nn.Module): """Statistical outlier removal as defense. """ def __init__(self, k=2, alpha=1.1): """SOR defense. Args: k (int, optional): kNN. Defaults to 2. ...
2.84375
3
ex068.py
nascimentobrenda24/PythonExercises
1
12776126
# Faça um programa que jogue par ou ímpar com o computador. O jogo só será interrompido quando o jogador perder, # mostrando o total de vitórias consecutivas que ele conquistou no final do jogo. print(20 * '\033[1;33m=*', 'JOGO PAR & ÍMPAR', '=*' * 20) print('\033[1;34m~~' * 20, 'MANUAL DE INSTRUÇÕES DO GAME:', '~~' ...
4.03125
4
Trakttv.bundle/Contents/Libraries/Shared/oem/media/show/__init__.py
disrupted/Trakttv.bundle
1,346
12776127
<reponame>disrupted/Trakttv.bundle from oem.media.show.identifier import EpisodeIdentifier # NOQA from oem.media.show.mapper import ShowMapper # NOQA from oem.media.show.match import EpisodeMatch # NOQA
1.046875
1
panon/plasmoid/contents/scripts/panon/backend/get_pa_devices.py
ByteDream/dead-projects
0
12776128
from soundcard import pulseaudio as sc import json l = [] for mic in sc.all_microphones(exclude_monitors=False): l.append({'id': mic.id, 'name': mic.name}) s = json.dumps(l) print(s)
2.703125
3
src/pretix/control/forms/organizer.py
abrock/pretix
1
12776129
<gh_stars>1-10 from django import forms from django.utils.translation import ugettext_lazy as _ from pretix.base.forms import VersionedModelForm from pretix.base.models import Organizer class OrganizerForm(VersionedModelForm): error_messages = { 'duplicate_slug': _("This slug is already in use. Please ch...
1.976563
2
src/controllers/google_controller.py
qooba/heygoogle-with-rasa
1
12776130
import os import json import logging from services.security import Security from services.agent import AgentFactory from controllers.controller import routes, Controller from rasa.core.channels.channel import UserMessage logger = logging.getLogger(__name__) class GoogleController(Controller): def __init__(self, s...
2.328125
2
upload.py
markraemer/limesurvey-factorial-vignette
1
12776131
<filename>upload.py import base64 from limesurveyrc2api.limesurvey import LimeSurvey url = "https://livinginsmarthomes.limequery.com/admin/remotecontrol" username = "" password = "" surveyID = "" # Open a session. api = LimeSurvey(url=url, username=username) api.open(password=password) # Get a list of surveys the a...
2.859375
3
SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Weights/Correlations/FLOPS/operating_items.py
Vinicius-Tanigawa/Undergraduate-Research-Project
0
12776132
## @ingroup Methods-Weights-Correlations-FLOPS # operating_items.py # # Created: May 2020, <NAME> # Modified: # ---------------------------------------------------------------------- # Imports # ---------------------------------------------------------------------- from SUAVE.Core import Units, Data import numpy as ...
2.578125
3
lessons 21/HomeWork/task7.py
zainllw0w/skillbox
0
12776133
<reponame>zainllw0w/skillbox def f(*args): summ = 0 for i in args: if isinstance(i, list): for s in i: summ += f(s) elif isinstance(i, tuple): for s in i: summ += s else: summ += i return summ a = [[1, 2, ...
3.3125
3
doc/img_normalization_test.py
Oizys18/IMG_CAPTION
0
12776134
<reponame>Oizys18/IMG_CAPTION import numpy as np import tensorflow as tf from PIL import Image import matplotlib.pyplot as plt import os def get_data_file(base_dir): data_path = os.path.join(base_dir, 'datasets', 'test_datasets.npy') data = np.load(data_path) img_paths = data[:50, :1] captions = data[:...
3.078125
3
src/ui/setup_progress_screen.py
AndreWohnsland/CocktailBerry
1
12776135
<reponame>AndreWohnsland/CocktailBerry from PyQt5.QtCore import Qt from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QMainWindow from src.ui_elements.progressbarwindow import Ui_Progressbarwindow from src.tabs.maker import interrupt_cocktail from src.display_controller import DP_CONTROLLER from src.dialog_han...
2.140625
2
worker/routes/region_blacklist.py
thomasmckay/quay-config-worker
0
12776136
import logging import json from flask import request from data.database import Repository, User from data import model from decorators import task_resources logger = logging.getLogger(__name__) @task_resources def process(resources): response = [] changed = True for resource in resources: p_na...
2.4375
2
project_admin/urls.py
gedankenstuecke/qcycle-upload
0
12776137
from django.conf.urls import url from . import views app_name = 'project-admin' urlpatterns = [ url(r'^$', views.home, name='home'), url(r'^consent-records/?$', views.consent_records, name='consent-records'), url(r'^config-general-settings/?$', views.config_general_settings, name='config-...
1.648438
2
TP_04/ejercicio_4/script_1/constants.py
AgustinNormand/recuperacion-de-informacion
0
12776138
<reponame>AgustinNormand/recuperacion-de-informacion EMPTY_WORDS_PATH = "./palabrasvacias.txt" # "palabrasvacias.txt" # "emptywords.txt" # None DIRPATH = "/home/agustin/Desktop/Recuperacion/colecciones/RI-tknz-data/" # "/home/agustin/Desktop/Recuperacion/colecciones/RI-tknz-data/" # "/home/agustin/Desktop/Recuperacion...
2
2
src/proto_net/scripts/train/run_train_all.py
okason97/handshape-recognition
3
12776139
<reponame>okason97/handshape-recognition import configparser from train_setup import train configs = { 'lsa16': { 'data.train_way': [5], 'data.test_way': [5], # done (1, 1, 1, 1) in previous experiments 'data.support_query': [(5, 5, 5, 5)], 'data.train_size': [0.33, 0.5, 0....
1.890625
2
src/data/raw_unpack.py
caheredia/california_housing_prices
0
12776140
<gh_stars>0 import os import tarfile from src.data.helpers import DATA_DIR import pandas as pd def unpack_tar_file(file: str = "cal_housing.tgz"): """ Unpack zipped file into present directory. """ file = os.path.join(DATA_DIR, "raw", file) with tarfile.open(file) as tar: tar.extractall(pa...
3.25
3
georgebot/georgebot.py
zenoftrading/georgebot
2
12776141
import sys import source as src import database as db def main(argv): config_filename = argv[1] config = src.read_config(config_filename) websocket = src.authentication(config['exchange']) try: src.run(websocket,config) except Exception as e: print("Bot error: {}".format(e)) finally: src.terminate(websock...
2.578125
3
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/ihooks.py
bidhata/EquationGroupLeaks
9
12776142
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: ihooks.py """Import hook support. Consistent use of this module will make it possible to change the different mechanisms involved in loading modules...
2.4375
2
dags/poc_dag.py
jdpinedaj/poc_airflow
0
12776143
####################### ##! 1. Importing modules ####################### from datetime import datetime, timedelta from airflow import DAG from airflow.operators.dummy_operator import DummyOperator from airflow.providers.google.cloud.operators.bigquery import BigQueryCheckOperator, BigQueryExecuteQueryOperator from air...
2.4375
2
tests/test_override_threading.py
wordlesstruth/stomp.py
0
12776144
import logging import time from concurrent.futures import ThreadPoolExecutor import pytest import stomp from stomp.listener import TestListener from .testutils import * executor = ThreadPoolExecutor() def create_thread(fc): f = executor.submit(fc) print("Created future %s on executor %s" % (f, executor)) ...
2.1875
2
niaaml_gui/widgets/optimization_widget.py
zStupan/NiaAML-GUI
2
12776145
from PyQt5.QtWidgets import QComboBox, QLineEdit, QLabel, QHBoxLayout, QVBoxLayout, QGridLayout, QTabWidget, QFileDialog, QCheckBox, QPushButton from PyQt5 import QtGui from PyQt5.QtGui import QIcon from PyQt5 import QtCore from niapy.util.factory import _algorithm_options from niaaml_gui.widgets.list_widget_custom imp...
1.664063
2
code/generate_mask_weights.py
bhuvi3/data590_capstone_project
4
12776146
import os import numpy as np import tensorflow as tf def save_weights_resnet152_10channel(): # Initialize configuration required_input_shape = (7, 7, 10, 64) output_file_prefix = "resnet152_10channel" # Initialize a model of choice model_pretrained_conv = tf.keras.applications.ResNet152(weights=...
2.71875
3
eflow/_hidden/helper_functions/visualize_multidimensional_multi_threading.py
EricCacciavillani/eFlow
1
12776147
<filename>eflow/_hidden/helper_functions/visualize_multidimensional_multi_threading.py # Math utils import os from multiprocessing import Pool as ThreadPool from functools import partial import math import numpy as np import multiprocessing as mp from collections import ChainMap def find_all_dist_with_target(matrix, ...
2.859375
3
testserver/blueprints/__init__.py
IfengAutomation/AutomationTestServer
0
12776148
<reponame>IfengAutomation/AutomationTestServer from . import api, casemanager, users __all__ = [api, casemanager, users]
1.070313
1
esbo_etc/classes/optical_component/CosmicBackground.py
LukasK13/ESBO-ETC
0
12776149
from .AOpticalComponent import AOpticalComponent from ..IRadiant import IRadiant import astropy.units as u from astropy.modeling.models import BlackBody from ..Entry import Entry from typing import Union class CosmicBackground(AOpticalComponent): """ This class models the spectral radiance of the cosmic backg...
2.90625
3
sentinel_possesor.py
yohaimagen/gamma_sentinel
8
12776150
#! /home/yohai/anaconda2/bin/python import sys,os,re,time,glob,string,getopt, argparse import numpy as np ############################################################ #print messeges to standart error and log file # ############################################################ def message(mes): # messege...
2.65625
3