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
tagging/tag_net.py
zhuzhutingru123/Semantics-AssistedVideoCaptioning
55
16300
# -*- coding: utf-8 -*- # Author: <NAME> # Date: 2019-4-28 import tensorflow as tf from tensorflow import placeholder, glorot_normal_initializer, zeros_initializer from tensorflow.nn import dropout import numpy as np n_z = 3584 n_y = 300 MSVD_PATH = None MSRVTT_PATH = None MSVD_GT_PATH = None MSRVTT_GT_PATH = None ma...
2.125
2
example/keraslogistic/cloudmesh_ai/logistic_regression.py
cloudmesh-community/fa19-516-174
0
16301
<filename>example/keraslogistic/cloudmesh_ai/logistic_regression.py import pandas as pd from cloudmesh import mongo from flask import request from flask_pymongo import PyMongo from sklearn.feature_selection import SelectKBest, chi2 from sklearn.linear_model import LogisticRegression from sklearn.metrics import accuracy...
2.4375
2
Scripts/plot_ObservationsPrediction_RawHiatus_OHClevels-lag-EDA_v2.py
zmlabe/predictGMSTrate
2
16302
""" Explore raw composites based on indices from predicted testing data and showing all the difference OHC levels for OBSERVATIONS Author : <NAME> Date : 21 September 2021 Version : 2 (mostly for testing) """ ### Import packages import sys import matplotlib.pyplot as plt import numpy as np import calc_Ut...
2.3125
2
osnexus_flocker_driver/osnexusdriver.py
OSNEXUS/flocker-driver
2
16303
<reponame>OSNEXUS/flocker-driver # Copyright 2016 OSNEXUS Corporation """ 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 la...
2.0625
2
rescan-script.py
fivepiece/electrum-personal-server
0
16304
<reponame>fivepiece/electrum-personal-server<gh_stars>0 #! /usr/bin/python3 from configparser import ConfigParser, NoSectionError, NoOptionError from electrumpersonalserver.jsonrpc import JsonRpc, JsonRpcError from datetime import datetime import server def search_for_block_height_of_date(datestr, rpc): target_ti...
2.375
2
tests/application/register/test_views.py
AlexKouzy/ethnicity-facts-and-figures-publisher
1
16305
<filename>tests/application/register/test_views.py<gh_stars>1-10 from bs4 import BeautifulSoup from flask import url_for from application.utils import generate_token from application.auth.models import TypeOfUser from tests.models import UserFactory def test_confirm_account_rejects_easy_password(app, test_app_clie...
2.40625
2
setup.py
OriHoch/ckan-cloud-operator
0
16306
from setuptools import setup, find_packages from os import path from time import time here = path.abspath(path.dirname(__file__)) if path.exists("VERSION.txt"): # this file can be written by CI tools (e.g. Travis) with open("VERSION.txt") as version_file: version = version_file.read().strip().strip("v...
1.820313
2
extension/magic/activate.py
ianpreston/oh-my-py
3
16307
import os import os.path def activate(ipython, venv): """ Shortcut to run execfile() on `venv`/bin/activate_this.py """ venv = os.path.abspath(venv) venv_activate = os.path.join(venv, 'bin', 'activate_this.py') if not os.path.exists(venv_activate): print('Not a virtualenv: {}'.format(...
2.609375
3
storage/__init__.py
daqbroker/daqbrokerServer
0
16308
<filename>storage/__init__.py import base64 import os import threading from pathlib import Path #from sqlitedict import SqliteDict from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, scoped_session from daqbrokerServer.web.utils import hash_password from daqbrokerServer.storage.server_schema...
2.328125
2
tempest/api/queuing/test_queues.py
NetApp/tempest
0
16309
<reponame>NetApp/tempest # Copyright (c) 2014 Rackspace, Inc. # # 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 applicab...
1.804688
2
checkin/tests.py
MAKENTNU/web
10
16310
from django.test import TestCase from django_hosts import reverse from util.test_utils import Get, assert_requesting_paths_succeeds class UrlTests(TestCase): def test_all_get_request_paths_succeed(self): path_predicates = [ Get(reverse('skills_present_list'), public=True), Get(re...
2.296875
2
tests/gdata_tests/live_client_test.py
lqc/google-data-api
0
16311
<gh_stars>0 #!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # 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...
2.0625
2
apps/work_order/admin.py
joewen85/devops_study
0
16312
from django.contrib import admin # Register your models here. from .models import WorkOrder admin.site.register(WorkOrder)
1.242188
1
src/season/framework/status.py
season-framework/season-flask-wiz
6
16313
class status(Exception): def __init__(self, code=200, response=None): super().__init__("season.core.CLASS.RESPONSE.STATUS") self.code = code self.response = response def get_response(self): return self.response, self.code
2.4375
2
updates.py
knowledgetechnologyuhh/hipss
0
16314
import torch import numpy as np import torch.nn.functional as F from torch.nn.utils.clip_grad import clip_grad_norm_ from mpi_utils.mpi_utils import sync_grads def update_entropy(alpha, log_alpha, target_entropy, log_pi, alpha_optim, cfg): if cfg.automatic_entropy_tuning: alpha_loss = -(log_alpha * (log_p...
2.171875
2
spaghetti/network.py
gegen07/spaghetti
182
16315
<gh_stars>100-1000 from collections import defaultdict, OrderedDict from itertools import islice import copy, os, pickle, warnings import esda import numpy from .analysis import GlobalAutoK from . import util from libpysal import cg, examples, weights from libpysal.common import requires try: from libpysal impor...
2.015625
2
tests/resources/mlflow-test-plugin/mlflow_test_plugin/default_experiment_provider.py
Sohamkayal4103/mlflow
1
16316
from mlflow.tracking.default_experiment.abstract_context import DefaultExperimentProvider class PluginDefaultExperimentProvider(DefaultExperimentProvider): """DefaultExperimentProvider provided through plugin system""" def in_context(self): return False def get_experiment_id(self): retur...
1.671875
2
ac_loss_plot.py
atul799/CarND-Semantic-Segmentation
0
16317
# -*- coding: utf-8 -*- """ plot acc loss @author: atpandey """ #%% import matplotlib.pyplot as plt #%% ff='./to_laptop/trg_file.txt' with open(ff,'r') as trgf: listidx=[] listloss=[] listacc=[] ctr=0 for line in trgf: if(ctr>0): ll=line.split(',') listidx.append...
2.90625
3
VA_multiples/src/main.py
brown9804/Modelos_Probabilisticos-
0
16318
##--------------------------------Main file------------------------------------ ## ## Copyright (C) 2020 by <NAME> (<EMAIL>) ## June, 2020 ## <EMAIL> ##----------------------------------------------------------------------------- # Variables aleatorias múltiples # Se consideran dos bases de datos las ...
2.640625
3
official/mnist/mnist.py
TuKJet/models
3,326
16319
<filename>official/mnist/mnist.py<gh_stars>1000+ # Copyright 2017 The TensorFlow Authors. 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/...
2.984375
3
pep_92.py
sayantan3/project-euler
0
16320
#!/usr/bin/env python3 def calculate(): ans = sum(1 for i in range(1, 10000000) if get_terminal(i) == 89) return str(ans) TERMINALS = (1, 89) def get_terminal(n): while n not in TERMINALS: n = square_digit_sum(n) return n def square_digit_sum(n): result = 0 ...
3.71875
4
Visualization/ConstrainedOpt.py
zhijieW94/SAGNet
25
16321
from PyQt5.QtCore import * class ConstrainedOpt(QThread): signal_update_voxels = pyqtSignal(str) def __init__(self, model,index): QThread.__init__(self) self.model = model['model'] # self.model = model self.name = model['name'] self.index = index def run(self): # ...
2.609375
3
Common/EDACommon.py
MlGroupsWJ/Customer-Satisfication
0
16322
# -*- coding:UTF-8 -*- import pandas as pd from minepy import MINE import seaborn as sns import matplotlib.pyplot as plt from sklearn.ensemble import ExtraTreesClassifier import xgboost as xgb import operator from sklearn.utils import shuffle from Common.ModelCommon import ModelCV from sklearn import svm import numpy a...
2.75
3
redbull/doc_html.py
theSage21/redbull
10
16323
<filename>redbull/doc_html.py def gen_doc_html(version, api_list): doc_html = f''' <!DOCTYPE html> <html> <head><meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style type="text/css"> body{{margin:40px auto; max-width:650px; line-...
2.640625
3
spekev2_verification_testsuite/test_drm_system_specific_system_id_elements.py
amphied/speke-reference-server
0
16324
<gh_stars>0 import xml.etree.ElementTree as ET import pytest from .helpers import utils @pytest.fixture(scope="session") def playready_pssh_cpd_response(spekev2_url): test_request_data = utils.read_xml_file_contents("test_case_1_p_v_1_a_1", utils.PRESETS_PLAYREADY) response = utils.speke_v2_request(spekev2_ur...
2.03125
2
lgtv_rs232/commands/power.py
davo22/lgtv_rs232
0
16325
from enum import Enum class Power(Enum): OFF = 0 ON = 1 def map_to_state(data: int): return Power(data) class PowerCommands(object): _command = "ka" def __init__(self, send_command): self._send_command = send_command async def get_state(self): return map_to_state(await se...
3.125
3
aioruuvitag/scanner_windows.py
hulttis/ruuvigw
7
16326
# -*- coding: utf-8 -*- """ Perform Bluetooth LE Scan. Based on https://github.com/hbldh/bleak/blob/master/bleak/backends/dotnet/discovery.py by Created by hbldh <<EMAIL>> """ import logging logger = logging.getLogger('bleak_scanner') import asyncio import queue from bleak.backends.device import BLEDevice # Import ...
2.234375
2
GUI/app.py
YJWang94108/Real-Time-Textural-Analysis-System-with-Autonomous-Underwater-Vehicles
1
16327
<gh_stars>1-10 import tkinter as tk from PIL import Image, ImageTk import numpy as np import os import time class MyAPP(): def __init__(self): self.window = tk.Tk() self.window.title('Classification Results') self.window.geometry('1000x800') self.window.attributes('-topmost',1) ...
2.828125
3
lib/surface/api_gateway/__init__.py
google-cloud-sdk-unofficial/google-cloud-sdk
2
16328
<reponame>google-cloud-sdk-unofficial/google-cloud-sdk # -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. 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:...
1.617188
2
028_dict.py
MikePolyakov/python_book
0
16329
countries = {'Russia' : 'Europe', 'Germany' : 'Europe', 'Australia' : 'Australia'} sqrs = {} sqrs[1] = 1 sqrs[2] = 4 sqrs[10] = 100 print(sqrs) myDict = dict([['key1', 'value1'], ('key2', 'value2')]) print(myDict) phones = {'police' : 102, 'ambulance' : 103, 'firefighters' : 101} print(phones['police']) phones = {'...
3.78125
4
solutions/10. Regular Expression Matching.py
JacopoPan/leetcode-top100-liked-questions
0
16330
<reponame>JacopoPan/leetcode-top100-liked-questions """ Runtime: 47 ms, faster than 89.57% of Python3 online submissions for Regular Expression Matching. Memory Usage: 15.2 MB, less than 6.45% of Python3 online submissions for Regular Expression Matching. """ from typing import List from typing import Optional class S...
3.59375
4
Mundo2/Desafio019.py
Marcoakira/Desafios_Python_do_Curso_Guanabara
0
16331
#Desafio019 ( aplicação randomica para determinar que aluno vai no quadro. import random al01 = str('joao'),('maria'),('pédro'),('paula') print(random.choice(al01))
3.484375
3
jdll-tutorial/ansible/library/book.py
Spredzy/jdll-ansible
0
16332
<gh_stars>0 #!/usr/bin/python from ansible.module_utils.basic import * from jdll import API ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'version': '1.0'} DOCUMENTATION = ''' --- module: book author: "<NAME> (@Spredzy)" version_added: "2.3" short_des...
2.265625
2
main.py
CyberPunk-Josh/Lab-app
0
16333
<reponame>CyberPunk-Josh/Lab-app<filename>main.py from menu_design import * from PySide6.QtWidgets import QApplication, QMainWindow from PySide6.QtCore import Qt, QEasingCurve # Local files from reologicalOne.reological import RModel from reologicalTwo.reologicalDB import RModelDB from density.density import Density ...
2.140625
2
create_table_from_word/table_columns.py
yongli82/CodeGenerator
0
16334
<gh_stars>0 #!/usr/bin/env python # -*- coding:utf-8 -*- import os import sys reload(sys) sys.setdefaultencoding('utf-8') import ExcelUtil from jinja2 import Template import re def get_table_list(): column_headers = ExcelUtil.generate_columns('A', 'F') data_grid = ExcelUtil.read_excel_with_head(u"财务账务表.xlsx...
2.015625
2
web/detector/dog_detector.py
PaulNWms/dog-project
0
16335
<filename>web/detector/dog_detector.py from keras.preprocessing import image import keras.applications.resnet50 as resnet50 import numpy as np app = None def initialize_dog_detector(the_app): global app app = the_app app.config['RESNET_50_MODEL'] = resnet50.ResNet50(weights='imagenet') def path_to_tens...
2.640625
3
camp_real_engine/plugins/regexp.py
vassik/camp-realize
0
16336
<filename>camp_real_engine/plugins/regexp.py import re from camp_real_engine.abstract.abc_subst_realizer import ABC_subst_realizer from camp_real_engine.model.realization import RegExpFileSubstNode from camp_real_engine.dao.daos import FileContentCommiter from camp_real_engine.abstract.abc_real_data_model import ABCSu...
2.09375
2
mouse_burrows/scripts/show_info.py
david-zwicker/cv-mouse-burrows
1
16337
<filename>mouse_burrows/scripts/show_info.py<gh_stars>1-10 #!/usr/bin/env python2 ''' Created on Sep 21, 2016 @author: <NAME> <<EMAIL>> ''' from __future__ import division import argparse import sys import os # add the root of the video-analysis project to the path script_path = os.path.split(os.path.realpath(__fil...
3.015625
3
google/cloud/networkmanagement/v1beta1/networkmanagement-v1beta1-py/google/cloud/networkmanagement_v1beta1/services/reachability_service/async_client.py
googleapis/googleapis-gen
7
16338
# -*- coding: utf-8 -*- # Copyright 2020 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 applicable law or...
1.515625
2
todo/urls.py
fidele000/Ftodo-RestAPI-Django
0
16339
<reponame>fidele000/Ftodo-RestAPI-Django<filename>todo/urls.py from django.urls import path from rest_framework import viewsets from rest_framework import routers from . import views from django.urls import include from rest_framework.routers import DefaultRouter router=DefaultRouter() router.register('hello-viewset',...
2.046875
2
toontown/estate/DistributedPlantBaseAI.py
TheFamiliarScoot/open-toontown
99
16340
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI class DistributedPlantBaseAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPlantBaseAI')
1.40625
1
test.py
justin-th/linux-pasword-protect
0
16341
import os print(os.curdir)
1.09375
1
setup.py
samuel-spak/thermostate
6
16342
from setuptools import setup from pathlib import Path from typing import Dict HERE = Path(__file__).parent version: Dict[str, str] = {} version_file = HERE / "src" / "thermostate" / "_version.py" exec(version_file.read_text(), version) setup(version=version["__version__"], package_dir={"": "src"})
1.71875
2
fps2c__ - Copy.py
GeorgeLoo/FPS
1
16343
''' _ _._ _..._ .-', _.._(`)) '-. ` ' /-._.-' ',/ ) \ '. / _ _ | \ | a a / | \ .-. ; '-('' ).-' ,' ; '-; | .' \ \ / | 7 .__ _...
2
2
exercises/networking_v2/roles/ansible-network.network-engine/lib/network_engine/plugins/template/__init__.py
rcalvaga/linklight
1
16344
# (c) 2018, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. # from __future__ import (absolute_import, division, p...
2.0625
2
test/try_closures.py
RemuLang/sijuiacion-lang
21
16345
from Redy.Opt import feature, constexpr import timeit class Closure(tuple): def __call__(self, a): c, f = self return f(c, a) def f1(x): def g(y): return x + y return g def fc(c, y): return c + y @feature(constexpr) def f2(x): return constexpr[Closure]((x, constexpr[...
2.78125
3
python/testData/refactoring/move/docstringTypes/before/src/b.py
jnthn/intellij-community
2
16346
<filename>python/testData/refactoring/move/docstringTypes/before/src/b.py<gh_stars>1-10 def f(x): '''Does nothing. :type x: a.C ''' pass
1.382813
1
datapack/validate.py
emorgan00/EasyDatapacks
35
16347
# this should accept a command as a string, and raturn a string detailing the issue # if <command> is not a valid vanilla minecraft command. None otherwise. def check(command): return None
2.40625
2
Python/Tutorial - 2/strings.py
JC2295/FCC_Tutorial_Projects
0
16348
<reponame>JC2295/FCC_Tutorial_Projects print("One") print("Two") print("Three")
1.15625
1
frontend/Two_Dim_System.py
Pugavkomm/NS-analyst
0
16349
"""AI is creating summary for """ from frontend import main_window from PyQt5 import QtWidgets from frontend import input_system from PyQt5.QtWidgets import QInputDialog, qApp from qt_material import apply_stylesheet style_sheets = ['dark_amber.xml', 'dark_blue.xml', 'dark_cyan.xml', ...
2.359375
2
get_board_array.py
SuperStormer/minesweeper-bot
0
16350
import mss import numpy as np from PIL import Image from config import BOARD_HEIGHT, BOARD_WIDTH CELL_SIZE = 22 BOARD_X = 14 BOARD_Y = 111 COLOR_CODES = { (0, 0, 255): 1, (0, 123, 0): 2, (255, 0, 0): 3, (0, 0, 123): 4, (123, 0, 0): 5, (0, 123, 123): 6, (0, 0, 0): 7, (123, 123, 123): 8, (189, 189, 189): 0 #uno...
2.84375
3
Challenges/13/tests/test_stack_and_queue_brackets.py
makkahwi/data-structures-and-algorithms
0
16351
<reponame>makkahwi/data-structures-and-algorithms import pytest from stack_and_queue_brackets.stack_and_queue_brackets import validate_brackets def test_a_valid(): actual = validate_brackets("[text]") expected = True assert actual == expected def test_another_valid(): actual = validate_brackets("(1)...
3.453125
3
tts/symbols.py
entn-at/tn2-wg
38
16352
<gh_stars>10-100 """ from https://github.com/keithito/tacotron """ _pad = '_' #_punctuation = '!\'(),.:;? ' _punctuation = '!",.:;? ' _special = '-' #_letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' _letters = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя" symbols = [_pad...
1.539063
2
tests/fixtures/pkg1/pkg2/pkg3/pkg4/pkg5/__init__.py
shashankrnr32/pytkdocs
21
16353
"""Hello from the abyss."""
1.015625
1
test/test_tdodbc.py
Teradata/PyTd
133
16354
# The MIT License (MIT) # # Copyright (c) 2015 by Teradata # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modif...
1.796875
2
submissions/abc035/a.py
m-star18/atcoder
1
16355
<reponame>m-star18/atcoder<filename>submissions/abc035/a.py import sys input = sys.stdin.readline w, h = map(int, input().split()) if w / h == 4 / 3: ans = '4:3' else: ans = '16:9' print(ans)
2.375
2
setup.py
JosiahBradley/mod2win
0
16356
<filename>setup.py import setuptools long_description = "" with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( author='<NAME>', author_email='<EMAIL>', name="mod2win", url="https://github.com/JosiahBradley/mod2win", version="0.0.1", entry_points={ 'con...
1.726563
2
release/stubs.min/Autodesk/Revit/UI/Plumbing.py
htlcnn/ironpython-stubs
182
16357
<reponame>htlcnn/ironpython-stubs # encoding: utf-8 # module Autodesk.Revit.UI.Plumbing calls itself Plumbing # from RevitAPIUI,Version=172.16.58.3,Culture=neutral,PublicKeyToken=null # by generator 1.145 # no doc # no imports # no functions # classes class IPipeFittingAndAccessoryPressureDropUIServer(IExte...
2.0625
2
src/base/apps.py
jhernandez18p/mobyapp
0
16358
from django.apps import AppConfig from django.db.models.signals import post_migrate from django.utils.translation import gettext_lazy as _ class SitesConfig(AppConfig): name = 'src.base' verbose_name = _("Modulo de Frontend")
1.328125
1
migrations/versions/010_Add_uploader_link_to_upload.py
LCBRU/lbrc_upload
0
16359
from sqlalchemy import MetaData, Table, Index, Column, Integer meta = MetaData() def upgrade(migrate_engine): meta = MetaData(bind=migrate_engine) upload = Table("upload", meta, autoload=True) uploader_id = Column("uploader_id", Integer) uploader_id.create(upload) idx_upload_uploader_id = Index...
2.3125
2
redbot/resource/active_check/base.py
Malvoz/redbot
0
16360
#!/usr/bin/env python """ Subrequests to do things like range requests, content negotiation checks, and validation. This is the base class for all subrequests. """ from abc import ABCMeta, abstractmethod from configparser import SectionProxy from typing import List, Tuple, Type, Union, TYPE_CHECKING from redbot.res...
2.515625
3
demo/demo14.py
LXG-Shadow/SongRecogn
22
16361
<reponame>LXG-Shadow/SongRecogn import getopt a = "asdf asdf" option,args = getopt.getopt(a,"","") print(option,type(args))
2.15625
2
eyap/utils/ghtools/__init__.py
emin63/eyap
0
16362
"""Additional GitHub specific tools. """
1.023438
1
page_api.py
tomkludy/md_to_conf
0
16363
<gh_stars>0 """ # -------------------------------------------------------------------------------------------------- # Page APIs # -------------------------------------------------------------------------------------------------- """ import os import tempfile import re import json import collections import mimetypes i...
2.375
2
testing/tests/data_handling/test_predict.py
JSKenyon/QuartiCal
0
16364
<reponame>JSKenyon/QuartiCal from copy import deepcopy import pytest from quartical.data_handling.predict import (parse_sky_models, daskify_sky_model_dict, get_support_tables) import dask.array as da import numpy as np from numpy....
1.820313
2
HACKERRANK_Numpy/concatenated.py
StefaniaSferragatta/ADM2020-HW1
0
16365
import numpy N,M,P = map(int,input().split()) p_cols1 =numpy.array([input().split() for _ in range(N)],int) p_cols1.shape = (N,P) p_cols2 =numpy.array([input().split() for _ in range(M)],int) p_cols2.shape = (M,P) concatenated = numpy.concatenate((p_cols1, p_cols2), axis = 0) print(concatenated)
3.09375
3
Discord Status Changer.py
vragonx/DiscordStatusChanger
0
16366
<reponame>vragonx/DiscordStatusChanger from colorama import Fore, init, Style import requests import random import ctypes import time import os ctypes.windll.kernel32.SetConsoleTitleW('Discord Status Changer') init(convert=True, autoreset=True) SuccessCounter = 0 ErrorCounter = 0 os.system('cls') print(F...
2.25
2
hw1/feature_summary.py
doochi/gct634-ai613-2021
9
16367
# GCT634 (2018) HW1 # # Mar-18-2018: initial version # # <NAME> # import sys import os import numpy as np import matplotlib.pyplot as plt data_path = './dataset/' mfcc_path = './mfcc/' MFCC_DIM = 20 def mean_mfcc(dataset='train'): f = open(data_path + dataset + '_list.txt','r') if dataset == 'train'...
2.375
2
package/kedro_viz/services/layers.py
pascalwhoop/kedro-viz
246
16368
<reponame>pascalwhoop/kedro-viz # Copyright 2021 QuantumBlack Visual Analytics Limited # # 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 # # T...
1.3125
1
fixed_width_gen.py
pradnyaalc/fixed_width_file_generation
0
16369
<filename>fixed_width_gen.py #!/usr/bin/python # importing libraries import json from copy import deepcopy from decimal import Decimal import time class FixedWidth: def get_config(self, config_file): """ reads the json specification file and returns a dictionary :param conf...
2.953125
3
52digest.py
Ferdandez/homework
0
16370
<reponame>Ferdandez/homework #!/usr/bin/env python3 # 52digest.py import re import sys # Write a program that performs an EcoRI digest on the SARS-COV2 genome # The program should have 2 arguments # 1. The genome file # 2. The restriction pattern # The output should be the sizes of the restriction fragments ori...
3.765625
4
yt_dlp/extractor/willow.py
mrBliss/yt-dlp
80
16371
# coding: utf-8 from ..utils import ExtractorError from .common import InfoExtractor class WillowIE(InfoExtractor): _VALID_URL = r'https?://(www\.)?willow\.tv/videos/(?P<id>[0-9a-z-_]+)' _GEO_COUNTRIES = ['US'] _TESTS = [{ 'url': 'http://willow.tv/videos/d5winning-moment-eng-vs-ind-streaming-onli...
2.328125
2
vesicashapi/vesicash.py
vesicash/vesicash-python-sdk
0
16372
<gh_stars>0 """ Entry point defined here """
1.03125
1
src/dissregarded/NetArivalsDeparturesHoures.py
sebastian-konicz/WRM
1
16373
<gh_stars>1-10 import folium from folium.plugins import MarkerCluster import pandas as pd import datetime from pathlib import Path # pd.options.display.max_columns = 50 def main(dir): # Loading Data Set print("Loading dataset") RentalData = pd.read_csv(dir + r'\data\processed\RentalData2015.csv') # C...
2.96875
3
bin/lineage_parser.py
brianlee99/UVP
0
16374
<gh_stars>0 #! /usr/bin/python import sys """ This script accepts the final annotation file and the lineage marker SNPs file """ """ and infers the lineage and possible sublineage classification of the isolate """ """ it requires a sample ID name (string) and an output file name(string) """ """ Author: <NAME> CPTR ...
2.609375
3
rdr_service/offline/metrics_export.py
all-of-us/raw-data-repository
39
16375
<gh_stars>10-100 from rdr_service import clock, config from rdr_service.code_constants import EHR_CONSENT_QUESTION_CODE, PPI_SYSTEM, RACE_QUESTION_CODE, UNMAPPED from rdr_service.dao.code_dao import CodeDao from rdr_service.dao.database_utils import get_sql_and_params_for_array, replace_isodate from rdr_service.dao.hpo...
1.640625
2
fundata/dota2/player/player_detail.py
mengyuanhumy/fundata
0
16376
<filename>fundata/dota2/player/player_detail.py<gh_stars>0 # -*- coding: utf-8 -*- from ...client import get_api_client def get_player_detail_stats(player_id): """玩家常规统计数据 参数player_id,玩家ID, int 返回dict格式 """ if get_player_data_status(player_id)==2: client=get_api_client() uri="/fundata-dota2-free/v2/player/"...
2.671875
3
ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/YARN/package/scripts/resourcemanager.py
panfeiyy/ambari
16
16377
""" 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, Version 2.0 (the "License"); you may not use this ...
1.632813
2
src/core/command.py
cfmcdonald-78/Hexcrawler
0
16378
<gh_stars>0 ''' Created on Jul 19, 2012 @author: Chris ''' class Command(object): def validate(self, game): pass def execute(self, game): pass
2.4375
2
gui/trimGui.py
lhalb/gfmanager
1
16379
<gh_stars>1-10 from PyQt5 import QtGui, QtWidgets import seaborn as sns from gui import trimming as tri from gui import boxes as BOX import matplotlib.image as mpimg from math import floor, ceil class TrimDialog(QtWidgets.QDialog, tri.Ui_Dialog): def __init__(self, data=None): super(TrimDialog, self)._...
1.960938
2
__init__.py
hankangkangjim/djlog
0
16380
<reponame>hankangkangjim/djlog # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings def _defaultdict(_dict, key): if key not in _dict: _dict[key] = {} return _dict[key] def update_logging(log_config): if not isinstance(log_config, dict)...
1.882813
2
manilaclient/tests/unit/common/test_httpclient.py
mail2nsrajesh/python-manilaclient
0
16381
# 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 writing, software # distributed under the Li...
2.296875
2
intro_to_algos_2020_mit/ps3/tests.py
venu-gopal-myneni/assignments
1
16382
<gh_stars>1-10 import unittest from count_anagram_substrings import count_anagram_substrings tests = ( ( ( 'esleastealaslatet', ('tesla',), ), (3,), ), ( ( 'lrldrrrllddrrlllrddd', ('ldl', 'rld'), ), (1, 3), ...
3.15625
3
sim2real-policies/sim2real_policies/sys_id/universal_policy_online_system_identification/osi_class.py
eugval/sim2real_dynamics_simulation
16
16383
<reponame>eugval/sim2real_dynamics_simulation """ System Identification (SI) https://arxiv.org/abs/1702.02453 Examples of two types: 1. Off-line SI: in sim2real_policies.sys_id.common.utils 2. On-line SI """ from sim2real_policies.sys_id.common.operations import * from sim2real_policies.sys_id.common.utils import * f...
2.90625
3
rasp_camera.py
BrianDau/doorbell_dash
11
16384
import picamera from time import sleep IMG_WIDTH = 800 IMG_HEIGHT = 600 IMAGE_DIR = "/home/pi/Desktop/" IMG = "snap.jpg" def vid(): camera = picamera.PiCamera() camera.vflip = True camera.hflip = True camera.brightness = 60 #camera.resolution = (IMG_WIDTH, IMG_HEIGHT) camera.start_prev...
2.9375
3
catalogue_flask/model.py
ScottWales/catalogue-flask
0
16385
#!/usr/bin/env python # Copyright 2017 ARC Centre of Excellence for Climate Systems Science # author: <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 at # # http://www.apa...
2.375
2
userbot/core/vcbot/controls.py
Rewtio/Mikoo-Userbot
4
16386
<reponame>Rewtio/Mikoo-Userbot # Mikoo - UserBot # Copyright (c) 2022 Mikoo-Userbot # Credits: @divarvian || https://github.com/divarvian # # This file is a part of < https://github.com/divarvian/Mikoo-Userbot/ > # t.me/MikooUserbot & t.me/MikooUserbot from pytgcalls.types.input_stream import AudioPiped, AudioVideoPi...
2.046875
2
src/jaeger/jaeger.py
Novartis/JAEGER
9
16387
""" Copyright 2021 Novartis Institutes for BioMedical Research Inc. 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...
1.65625
2
test/test_vlan_group.py
nrfta/python-netbox-client
0
16388
<filename>test/test_vlan_group.py # coding: utf-8 """ NetBox API API to access NetBox # noqa: E501 OpenAPI spec version: 2.8 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import netbox_client from netbox_client.mo...
2.28125
2
build/lib/more/scikit_helper/common.py
ngupta23/more
6
16389
<reponame>ngupta23/more # For Time Logging import time from contextlib import contextmanager import logging @contextmanager # Timing Function def time_usage(name=""): """ log the time usage in a code block """ # print ("In time_usage runID = {}".format(runID)) start = time.time() yield end...
2.953125
3
preprocess/rename.py
pprp/faster-rcnn.Supernova
15
16390
<reponame>pprp/faster-rcnn.Supernova<gh_stars>10-100 import os import shutil path = './ALL/' outpath = "./rename/" outb = "./b/" outc = "./c/" for f in os.listdir(path): print(f) name,ext = os.path.splitext(f) a,ext2 = name.split('_') if ext2.endswith('b'): print(outb+f) shutil.copy(pat...
2.203125
2
FALL/core/port_scanner.py
DevanshRaghav75/FALL
1
16391
<gh_stars>1-10 import socket import threading import concurrent.futures from colorama import Fore, Style def port_scanner(): print_lock = threading.Lock() print('') ip = input(Fore.CYAN + "[PORT_SCANNER]" + Style.RESET_ALL + "[>] Target: ") port_range = input(Fore.CYAN + "[PORT_SCANNER]" + Style.RESET...
2.890625
3
ui/main_window.py
Iorveth/min_surfaces_modelling
0
16392
<filename>ui/main_window.py # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'untitled.ui' # # Created by: PyQt5 UI code generator 5.12.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self,...
1.929688
2
pyecharts/charts/scatter.py
chfw/pyecharts
16
16393
<gh_stars>10-100 #!/usr/bin/env python # coding=utf-8 from pyecharts.chart import Chart from pyecharts.option import get_all_options class Scatter(Chart): """ <<< 散点图 >>> 直角坐标系上的散点图可以用来展现数据的 x,y 之间的关系,如果数据项有多个维度, 可以用颜色来表现,利用 geo 组件。 """ def __init__(self, title="", subtitle="", **kwargs): ...
2.828125
3
alice.py
Tigven/benedict
1
16394
<gh_stars>1-10 import json class AliceRequest(object): def __init__(self, request_dict): self._request_dict = request_dict @property def version(self): return self._request_dict['version'] @property def session(self): return self._request_dict['session'] @property ...
2.625
3
pythonSEC/Utils/useapi.py
hpcc-systems/EDGAR-SEC-Filings
1
16395
<gh_stars>1-10 import yfinance as yf import pandas as pd import Utils from Utils import scrape_utils def qtrlabels(tick,date,comp='plain'): stock = yf.Ticker(tick.upper()) hist = stock.history(interval="1d",start=scrape_utils.dashdate(scrape_utils.fixdate(date)),end=scrape_utils.qenddate(date)) stkchg = hist.il...
2.53125
3
src/pymor/reductors/parabolic.py
JuliaBru/pymor
0
16396
<reponame>JuliaBru/pymor # This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2016 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) import numpy as np from pymor.core.interfaces import ImmutableInterface ...
2.421875
2
frappe/core/doctype/scheduled_job_type/test_scheduled_job_type.py
ektai/erp2Dodock
0
16397
<reponame>ektai/erp2Dodock<gh_stars>0 # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from frappe.utils import get_datetime from frappe.core.doctype.scheduled_job_type.scheduled_job_type import s...
1.929688
2
projects/2_bike_share_data/menu_text.py
ssi112/programming-data-science-python
1
16398
# menu_text.py # # simple python menu # https://stackoverflow.com/questions/19964603/creating-a-menu-in-python # city_menu = { '1': 'Chicago', '2': 'New York', '3': 'Washington', 'x': 'Exit'} month_menu = {'0': 'All', '1': 'January', '2': 'February...
4.375
4
src/books/api.py
lukecyx/lms
0
16399
from src.books.models import Book from src.books.schema import BookOut from ninja import Router router = Router() @router.get("/", response=list[BookOut]) def get_books(request): return Book.objects.all()
1.921875
2