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
networks/isonetwork.py
andrewcpotter/holopy
1
12774451
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Oct 11 14:03:30 2020 @author: acpotter """ #%% -- IMPORTS -- import sys sys.path.append("..") # import one subdirectory up in files # external packages import numpy as np import qiskit as qk import networkx as nx #import tenpy # custom things #import...
2.171875
2
audream_first/test.py
Lavabar/audream
0
12774452
from tkinter import Tk, Entry, Button import threading flag = True master = Tk() e = Entry(master) e.pack() e.focus_set() def enterName(): print(e.get()) def stop(): global flag flag = False def exitApp(): master.destroy() def cycle(): def callback(): global flag a = 0 flag...
3.65625
4
app/core/helpers.py
jcPOLO/polonet
0
12774453
import ipaddress import os import errno import logging import sys from typing import List, Union import csv, io, json dir_path = os.path.dirname(os.path.realpath(__file__)) def is_ip(string: str) -> bool: try: ipaddress.ip_address(string) return True except ValueError: return False ...
2.484375
2
Code/transformer.py
JohnlNguyen/Comment2Code
0
12774454
<reponame>JohnlNguyen/Comment2Code import numpy as np import tensorflow as tf import util from pdb import set_trace class AttentionLayer(tf.keras.layers.Layer): def __init__(self, attention_dim, num_heads=None, hidden_dim=None): super(AttentionLayer, self).__init__() if hidden_dim == None: hidden_dim = atten...
2.8125
3
tests/pools/config.py
bolshoytoster/chia-blockchain
6
12774455
<gh_stars>1-10 job_timeout = 45
0.980469
1
schedule_lib/schedule.py
allankellynet/mimas
0
12774456
#----------------------------------------------------- # Mimas: conference submission and review system # (c) <NAME> 2016-2020 http://www.allankelly.net # Licensed under MIT License, see LICENSE file # ----------------------------------------------------- # schedule.py # # System imports import datetime # Google impo...
2.375
2
scripts/soccer.py
jkurdys/ThinkBayes2
1,337
12774457
<gh_stars>1000+ """This file contains code for use with "Think Bayes", by <NAME>, available from greenteapress.com Copyright 2014 <NAME> License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import numpy import thinkbayes2 import thinkplot class Soccer(thinkbay...
3.140625
3
inverted.py
rafaelscnunes/COS738-IMIR-VSM
0
12774458
<gh_stars>0 #!/Library/Frameworks/Python.framework/Versions/3.6/bin/Python3.6 # -*- coding: utf-8 -*- """ Created: 2017-07-05 @title: IMIR-VSM (In Memory Information Retrieval - Vector Space Model) @module: inverted.py @author: <NAME> - <EMAIL> """ # Gerador de Lista Invertida - A função desse módulo é criar as listas...
2.0625
2
stat_key_browser/tagger.py
Isilon/isilon_stat_browser
10
12774459
""" Provide access to the tag definitions and utilities. Reads and parses into a dict the json tag def file. Provides access to this dict. Takes a key_dict and applies tags per the tag definations. """ import logging import json import os import re import sys import stat_key_browser KEY_TAG_DEFS_FILENAME = 'key_tags....
3.234375
3
10_movie_search/program.py
CarlosJimeno/Python-JumpStart-by-Building-10-apps
0
12774460
import movie_service import requests.exceptions def print_header(): print("------------------------------------------------") print(" MOVIE SEARCH APP") print("------------------------------------------------") def run_search_loop(): exit_cmds = ['x', 'exit', 'quit', 'q'] search_ter...
3.3125
3
PyPoll/main-PyPoll.py
designergal3002/Python-Challenge
0
12774461
<gh_stars>0 import os import csv candidates = [] num_votes = 0 vote_counts = [] # Determine path for the CSV file to access poll_path = os.path.join('..', '..', 'Resources', 'election_data.csv') # Read the CSV file with open(poll_path,newline="") as csvfile: csvreader = csv.reader(csvfile) # Remove the he...
3.578125
4
alembic/versions/2019102221_add_shared_file_system_column__75d4288ae265.py
kl-chou/codalab-worksheets
236
12774462
<filename>alembic/versions/2019102221_add_shared_file_system_column__75d4288ae265.py """Add shared-file-system column to workers Revision ID: 75d4288ae265 Revises: <PASSWORD> Create Date: 2019-10-22 21:05:26.580918 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision ...
1.296875
1
buildwatch/main.py
InvictrixRom/updater_server
0
12774463
<reponame>InvictrixRom/updater_server import inotify.adapters import time import hashlib import json import re import os import zipfile import datetime def load_json(): with open('/root/builds.json') as json_data: global builds builds = json.load(json_data) def save_json(): with open('/root/bu...
2.1875
2
odk2stata/gui/worker.py
PMA-2020/odk2stata
2
12774464
import os.path import threading import wx from ..dofile.do_file_collection import DoFileCollection EVT_COMPLETE_ID = wx.NewId() def evt_complete(win, func): win.Connect(-1, -1, EVT_COMPLETE_ID, func) class CompleteEvent(wx.PyEvent): def __init__(self, message, success): super().__init__() ...
2.390625
2
pubgate/utils/user.py
UndeadBeast/pubgate
0
12774465
import asyncio from pubgate.crypto.key import get_key from pubgate.utils.networking import deliver class UserUtils: @property def key(self): return get_key(self.uri) @property def following(self): return f"{self.uri}/following" @property def followers(self): return f"{self.uri}/fol...
2.15625
2
tests/img_metadata_lib/test_image.py
Austin-Schmidli/Image-Metadata-API
0
12774466
import pytest from tests.tools.tools import load_test_images from img_metadata_lib.image import fetch_image from img_metadata_lib.image import extract_metadata @pytest.fixture(params=load_test_images()) def image(request): return request.param def test_extract_metadata_returns_dict(image): assert isinstanc...
2.0625
2
v2x_solution/road/models.py
Michaelwwgo/V2X_Project
1
12774467
from django.db import models from django.utils.encoding import python_2_unicode_compatible from v2x_solution.users import models as user_models @python_2_unicode_compatible class TimeStampedModel(models.Model): created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=Tru...
2.453125
2
tests/linalg_symmetrize.py
aroig/nnutil2
0
12774468
#!/usr/bin/env python # -*- coding: utf-8 -*- # # nnutil2 - Tensorflow utilities for training neural networks # Copyright (c) 2019, <NAME> <<EMAIL>> # # This file is part of 'nnutil2'. # # This file may be modified and distributed under the terms of the 3-clause BSD # license. See the LICENSE file for details. import ...
2.65625
3
diversos/dicionario.py
lcarlin/guppe
1
12774469
<reponame>lcarlin/guppe<gh_stars>1-10 dicionario_sites = {"Diego": "diegomariano.com"} print(dicionario_sites['Diego']) dicionario_sites = {"Diego": "diegomariano.com", "Google": "google.com", "Udemy": "udemy.com", "<NAME>" : "luizcarlin.com.br"} print ("-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=") for chave in diciona...
3.671875
4
confme/core/env_overwrite.py
iwanbolzern/ConfMe
21
12774470
import os from pydantic.main import ModelMetaclass from confme.utils.dict_util import flatten, InfiniteDict from confme.utils.typing import get_schema def env_overwrite(config_cls: ModelMetaclass): # extract possible parameters config_dict = get_schema(config_cls) parameters, _ = flatten(config_dict) ...
2.5
2
pRestore/worker.py
snaiperskaya96/pRestore
0
12774471
import subprocess from threading import Thread import file_handler class Worker(Thread): def __init__(self, directory, parent): Thread.__init__(self) self.daemon = True self.directory = directory self.parent = parent self.done = False def run(self): process = ...
2.8125
3
code_files/Diabetes_app.py
zuz201/Diabetes
0
12774472
<reponame>zuz201/Diabetes # -*- coding: utf-8 -*- import pandas as pd import streamlit as st from PIL import Image import streamlit.components.v1 as components import pickle from joblib import load import codecs import matplotlib.pyplot as plt import seaborn as sns #The best model loaded with open("C:/Users/zuzan/Do...
2.96875
3
SentiWordNetforsentiment.py
dienhuynhphong/RAM-W
1
12774473
#!/usr/bin/python # -*- coding: utf-8 -*- from bs4 import BeautifulSoup from nltk.corpus import stopwords import codes def ReadFileSentiWordNet(filename): senti_word = [] senti_pos = [] senti_neg = [] file = codes.open(filename,'r','utf-8') full_data = file.read().splitlines() for...
2.84375
3
scripts/extract_reads_from_fastq.py
rlorigro/overlap_analysis
0
12774474
from modules.Fastx import * from subprocess import run import argparse import struct import mmap import sys import os def load_query_ids(query_ids_path): ids = list() with open(query_ids_path, 'r') as file: for line in file: if line == '\n': continue ids.appen...
2.640625
3
src/test/sharestore_lib/admin/ttypes.py
daimashusheng/SHAREdis
0
12774475
<reponame>daimashusheng/SHAREdis # # Autogenerated by Thrift Compiler (0.11.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolExce...
1.84375
2
main.py
SwapiTeamsStudios/AutomodBot
0
12774476
import discord from discord.ext import commands import json import datetime import re with open('Percorso specificato (usate il \)', 'r') as settings: options = json.load(settings) client = commands.Bot(command_prefix="!") @client.event async def on_ready(): print(f"SwapiTeams Automoderatio...
2.34375
2
balena/logs.py
amirfuhrmann/balena-sdk-python
0
12774477
<gh_stars>0 from functools import wraps import json try: # Python 3 imports from urllib.parse import urljoin except ImportError: # Python 2 imports from urlparse import urljoin from collections import defaultdict from threading import Thread from twisted.internet import reactor, ssl from twisted.internet.def...
2.25
2
bin/ek.py
alfa-bravo/ekstrakto
0
12774478
<reponame>alfa-bravo/ekstrakto #!/usr/bin/env python3 import sys sys.path.append('../ekstrakto') from ekstrakto.cli import entrypoint entrypoint()
1.09375
1
dict/util.py
meyersbs/phonetta-cli
0
12774479
################################################################################# # @PROJECT: PhonTA - Phonetic Transcription Assistant # # @VERSION: # # @AUTHOR: <NAME> # # @EMAIL: <EMAIL> # # @LICENSE: MIT # ###############################################################################...
2.15625
2
sotaai/rl/rllib_wrapper.py
stateoftheartai/sotaai
23
12774480
# -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> # Copyright: Stateoftheart AI PBC 2021. '''RLlib's library wrapper.''' SOURCE_METADATA = { 'name': 'rllib', 'original_name': 'RLlib', 'url': 'https://docs.ray.io/en/master/rllib.html' } MODELS = { 'discrete': [ 'A2C', 'A3C', 'ARS', 'BC', 'ES',...
1.78125
2
unit_tests/tests_viewer_wrappers.py
inpho/vsm
31
12774481
<reponame>inpho/vsm<filename>unit_tests/tests_viewer_wrappers.py import unittest2 as unittest import numpy as np from vsm.viewer.wrappers import * from vsm.viewer.labeleddata import * class TestViewerWrappers(unittest.TestCase): # TODO: Rewrite these to be independent of LDA pass # def setUp(self): ...
2.203125
2
generators/_init-python/templates/__init__.tmpl.py
phovea/generator-phovea
1
12774482
############################################################################### # Caleydo - Visualization for Molecular Biology - http://caleydo.org # Copyright (c) The Caleydo Team. All rights reserved. # Licensed under the new BSD license, available at http://caleydo.org/license ######################################...
1.921875
2
users/permissions.py
pantaLuc/Attendance-check-app-backend
0
12774483
<reponame>pantaLuc/Attendance-check-app-backend<gh_stars>0 from rest_framework import permissions from .serializers import UsersSerializer class ViewPermission(permissions.BasePermission): def has_permission(self, request, view): data = UsersSerializer(request.data).data # donner le droit de voi...
2.421875
2
wordweaver/tests/test_foma_access_shell.py
roedoejet/wordweaver-legacy
4
12774484
# -*- coding: utf-8 -*- """ Test Access to Fomabin """ from unittest import TestCase import os from wordweaver.data import data_dir from wordweaver.fst.utils.foma_access import foma_access from wordweaver.log import logger class TestFoma_access_shell(TestCase): path_to_foma = None foma_shell = None foma...
2.59375
3
settings.py
vchong/ibart
3
12774485
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import logging as log import yaml import os def get_settings_yml_file(): yml_file = None config_file = "configs/settings.yaml" try: with open(config_file, 'r') as yml: yml_file = yaml.load(yml, Loader=yaml.SafeLoader) except KeyError:...
2.453125
2
src/sagemaker/jumpstart/notebook_utils.py
guoqiaoli1992/sagemaker-python-sdk
0
12774486
<filename>src/sagemaker/jumpstart/notebook_utils.py # Copyright Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon....
1.828125
2
startapp.py
eboyce452/django_conf
0
12774487
from importlib import import_module import os import re from django.core.management.base import CommandError from django.core.management.templates import TemplateCommand class Command(TemplateCommand): help = ( "Creates a Django app directory structure for the given app name in " "the current dir...
2.21875
2
139. Word Break.py
SreenathMopuri/LeetcodeProblemSolutionsInPython
0
12774488
#139. Word Break """ Leetcode link: https://leetcode.com/problems/word-break/ Solution: for each prefix, if prefix is in dict and wordbreak(remaining str)=True, then return True, cache result of wordbreak; """ Python ------ class Solution: def wordBreak(self, s: str, wordDict: List[str]) -> bool: dp = [Fal...
3.46875
3
dora/services/serializers.py
francoisromain/dora-back
1
12774489
import logging from django.core.exceptions import ValidationError from django.core.files.storage import default_storage from rest_framework import serializers from rest_framework.relations import PrimaryKeyRelatedField from dora.structures.models import Structure, StructureMember from .models import ( AccessCond...
2.140625
2
raspirobot.py
AndrewNatoli/AN-PonderBot
0
12774490
""" Contains logic for bump switches, sonar and motor control """ __author__ = 'andrew' import os import threading import config from rrb2 import * from time import sleep from enum import Enum from random import randint bacon = True class RaspiRobot(threading.Thread): class Incidents(Enum): nothing ...
3.1875
3
dynamic_programming/longest_common_subsequence/test.py
Shawn-Ng/algorithms-test
0
12774491
# Recursive, O(2^n) def LCS(X, Y, m, n): if m == 0 or n == 0: return 0 elif X[m - 1] == Y[n - 1]: return 1 + LCS(X, Y, m - 1, n - 1) else: return max(LCS(X, Y, m - 1, n), LCS(X, Y, m, n - 1)) X = "AGGTAB" Y = "GXTXAYB" print("Length of LCS is ", LCS(X, Y, len(X), len(Y))) # Overl...
3.515625
4
day-6/main.py
a18antsv/Python-Two-Week-Challenge
0
12774492
<filename>day-6/main.py import os import requests from bs4 import BeautifulSoup from babel.numbers import format_currency def get_countries(): countries = [] url = "https://www.iban.com/currency-codes" request = requests.get(url) soup = BeautifulSoup(request.text, "html.parser") table = soup.find("table") ...
3.71875
4
qtoggleserver/mppsolar/commands/qpigs.py
qtoggle/qtoggleserver-mppsolar
1
12774493
<reponame>qtoggle/qtoggleserver-mppsolar from .base import Command class QPIGS(Command): REQUEST_FMT = 'QPIGS' RESPONSE_FMT = ( '{grid_voltage:f} ' '{grid_frequency:f} ' '{ac_output_voltage:f} ' '{ac_output_frequency:f} ' '{ac_output_apparent_power:f} ' '{ac_o...
2.25
2
stadistic_basic/calculoz.py
nathramk/stadistic_basic
0
12774494
class CalculoZ(): def calcular_z(self, n1, n2, x, y, ux, uy, ox, oy): arriba = (x-y)-(ux-uy) abajo = (((ox)**2/(n1))+((oy)**2/(n2)))**0.5 z = arriba/abajo return z
3.0625
3
setup.py
kororo/docker-template
2
12774495
<filename>setup.py import os from setuptools import setup pkg = 'docker-template' def get_requirements(r: str): try: # for pip >= 10 from pip._internal.req import parse_requirements except ImportError: # for pip <= 9.0.3 from pip.req import parse_requirements # parse_requirements() re...
1.859375
2
setup.py
chrisbrake/docser
0
12774496
import versioneer from setuptools import setup with open('README.rst', 'r') as fh: long_description = fh.read() with open('requirements.txt') as fh: requirements = fh.readlines() setup( name='docser', packages=['docser'], version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), ...
1.367188
1
skill/tests.py
ngr/sm_00
0
12774497
<reponame>ngr/sm_00 from django.test import TestCase from django.utils import timezone from django.db import connection #from django.core.urlresolvers import reverse import datetime from random import random, randrange from skill.models import Skill, SkillTrained from slave.models import Slave, SlaveManager, RaceDefa...
2.875
3
sundial2.py
WillBickerstaff/sundial
1
12774498
import sys, itertools, textwrap, os ltrs, minlen, wd = (sys.argv[1].lower(), int(sys.argv[2]), set()) dictwords = set(l.lower().strip() for l in open('/usr/share/dict/words') if l.strip() >= minlen and ltrs[0] in l.lower() and "'" not in l) for i in range(minlen, len(ltrs) + 1): wd = wd | set(dictwords & set(''.join(l)...
2.9375
3
Integration/Deployer/deployer.py
gaurav-kc/IOT_Platform
3
12774499
import flask import threading import requests import json import sshclient import deployer_helper from flask import request from pathlib import Path def req_handler(app,port): @app.route('/deployment/dodeploy', methods=['POST']) def dodeploy(): try : req = request.get_json() print(req) ip = req["serverip"...
2.25
2
examples/unpack.py
ubirch/ubirch-protocol-python
3
12774500
import binascii import sys from uuid import UUID import msgpack signed = 0x02 chained = 0x03 usage = " usage:\n" \ " python3 unpack.py [ <binary-file-name> | <UPP(hex)> | <UPP(base64)> ]" if len(sys.argv) < 2: print(usage) sys.exit(1) upp = b'' arg = sys.argv[1] # try to get UPP from binary file t...
2.953125
3
elram/repository/commands.py
Bgeninatti/elram
0
12774501
import logging from elram.config import load_config from elram.repository.models import User, database, Event, Attendance, Account, Transaction CONFIG = load_config() logger = logging.getLogger('main') def populate_db(data): models_mapping = { 'users': User, 'accounts': Account, } for m...
2.46875
2
IDSRunmodeVerify.py
PhilSchroeder/IDSDeathBlossom
19
12774502
# -*- coding: utf-8 -*- #************************************************************* # Copyright (c) 2003-2012, <NAME> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # # * Redistribu...
1.070313
1
plate_alpr/plate_ocr.py
alisson-moura/plate_control
1
12774503
from openalpr import Alpr import re import os class Plate: def __init__(self): self.alpr = Alpr("eu","/etc/openalpr/conf", "/usr/share/openalpr/runtime_data") if not self.alpr.is_loaded(): print("Erro ao carregar o ALPR..") sys.exit(1) self.alpr.set_top_n(10)...
2.671875
3
swarmlib/abc/bees/onlooker_bee.py
alxfmpl/swarmlib
221
12774504
<filename>swarmlib/abc/bees/onlooker_bee.py # ------------------------------------------------------------------------------------------------------ # Copyright (c) <NAME>. All rights reserved. # Licensed under the BSD 3-Clause License. See LICENSE.txt in the project root for license information. # ------------------...
2.703125
3
django_teams/models.py
SumedhWalujkar/django_teams
0
12774505
# This is where the models go! from django.db import models from django.urls import reverse from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericForeignKey # Using the user: user = models.ForeignKey(settings.AUTH_USER_MODEL) C...
2.109375
2
tests/test_09_0_openpyxl.py
simkimsia/ug-read-write-excel-using-python
1
12774506
from openpyxl.styles import colors, Font from examples.c09_0_font_styles.openpyxl import index from openpyxl import Workbook from base_test_cases import ExcelTest class TestOpenPyXLFontStyles(ExcelTest): def test_font_color(self): wb = Workbook() ws = wb.active a1 = ws['A1'] a1_fo...
2.796875
3
examples/qm7/qm7b_tf_model.py
ozgurozkan123/deepchem
14
12774507
""" Script that trains Tensorflow singletask models on QM7 dataset. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import deepchem as dc import numpy as np from qm7_datasets import load_qm7b_from_mat np.random.seed(123) qm7_tasks, datasets, ...
2.375
2
main.py
dtmcdona/DMAutomate
0
12774508
<reponame>dtmcdona/DMAutomate<gh_stars>0 import macrofilecontroller import macromenuview class App: def __init__(self): self.action = "display" self.running = True self.currentfile = "dm_macro.py" def run_app(self): view = macromenuview.MacroView() controller = macrofil...
3.28125
3
Example/1-example-pi-pulse.py
smartmzl/Quanlse
0
12774509
<reponame>smartmzl/Quanlse #!/usr/bin/python3 # -*- coding: utf8 -*- # Copyright (c) 2021 Baidu, Inc. 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....
2.625
3
girderformindlogger/models/aes_encrypt.py
jj105/mindlogger-app-backend
0
12774510
<gh_stars>0 # -*- coding: utf-8 -*- import copy import datetime import json import os import six import cherrypy from bson.objectid import ObjectId from girderformindlogger.constants import AccessType from girderformindlogger.exceptions import ValidationException, GirderException from girderformindlogger.models.model_...
2.359375
2
tests/test_dong_code.py
nhlsm/PyDataGoKr
2
12774511
import unittest from data_go_kr.utils.dong_code import * class Test0(unittest.TestCase): """ Test that the result sum of all numbers """ @classmethod def setUpClass(cls): # debug LOG_FORMAT = '%(pathname)s:%(lineno)03d - %(message)s' # LOG_LEVEL = logging.DEBUG # DEBUG(10...
3.078125
3
generalexam/plotting/skeleton_line_plotting.py
thunderhoser/GeneralExam
4
12774512
<reponame>thunderhoser/GeneralExam<filename>generalexam/plotting/skeleton_line_plotting.py """Plotting methods for skeleton lines. A "skeleton line" is a polyline description of a polygon. For more details, see skeleton_lines.py. """ import numpy import matplotlib matplotlib.use('agg') from generalexam.ge_utils impo...
2.609375
3
tests/test_database.py
reline/nolanbot
1
12774513
<reponame>reline/nolanbot<filename>tests/test_database.py import unittest from database import Database class TestDatabase(unittest.TestCase): def test_smoke(self): database = Database() database.fetch_all_cars() database.query_cars("miata") if __name__ == '__main__': unittest.main()
1.953125
2
datablox_framework/datablox_framework/fileserver_wsgi.py
mpi-sws-rse/datablox
0
12774514
<gh_stars>0 """this is a version of the fileserver that works with wsgi (eg. gunicorn)""" import os import os.path import urllib import urlparse import sys import logging from random import choice, randint import string import fcntl logger = logging.getLogger("gunicorn.error") DEBUG=True # if we're debugging stuff,...
2.25
2
tests/test_tapioca_asana.py
henriquebastos/tapioca-asana
7
12774515
# coding: utf-8 import unittest from tapioca_asana import Asana class TestTapiocaAsana(unittest.TestCase): def setUp(self): self.wrapper = Asana() if __name__ == '__main__': unittest.main()
1.8125
2
python/iviz/Widgets/HistogramWidget.py
eddy-ilg/iviz
0
12774516
#!/usr/bin/env python3 import sys from PyQt5.QtWidgets import QVBoxLayout,QWidget from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar import matplotlib.pyplot as plt import random import numpy as np ...
2.546875
3
src/hri/src/greetVisitors.py
APMMonteiro/european_robotic_league
0
12774517
#!/usr/bin/python import spacy import json import numpy as np import rospy from std_msgs.msg import String from spacy.matcher import PhraseMatcher from spacy.matcher import Matcher from spacy.tokens import Span from spacy.lang.en import English class Greet_Visitors: def __init__(self): rospy.init_node('Gr...
2.578125
3
main.py
Deeryeen/unitypackage-exporter
0
12774518
# This script is to extract any files inside of a .unitypackage file. # Please make sure you only use this on .unitypackage files you own. # This will create a folder with the exact same name as the input file. # Have fun! # Used for creating the temp folder name. from hashlib import md5 # Uncompressing .unityasset fil...
3.484375
3
donkeycar/parts/crossvalidator.py
paasovaara/donkey
5
12774519
#!/usr/bin/env python3 """ Cross validator Usage: crossvalidator.py (--model=<model>) [--tub=<tub1,tub2,..tubn>] [--type=(linear|categorical)] [--output=<csv-filename>] Options: -h --help Show this screen. --tub TUBPATHS List of paths to tubs. Comma separated. Use quotes to use wildcards. ie "~/...
3.078125
3
utils/__init__.py
utplanets/deepmars2
2
12774520
<gh_stars>1-10 from dotenv import find_dotenv, load_dotenv import sys import os def getenv(name): val = os.getenv(name) return val def load_env(): load_dotenv(find_dotenv()) return
1.851563
2
learning/modules/map_to_map/map_batch_select.py
esteng/guiding-multi-step
0
12774521
<filename>learning/modules/map_to_map/map_batch_select.py import torch import numpy as np import torch.nn as nn class MapBatchSelect(nn.Module): """ Given a batch of B maps and poses, and a boolean mask of length B, return a batch of P maps and poses, where P is the number of True in the boolean mask. ...
2.84375
3
ooobuild/lo/bridge/bridge.py
Amourspirit/ooo_uno_tmpl
0
12774522
# 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/licenses/LICENSE-2.0 # # Unless required by applicab...
1.65625
2
core/recc/algorithm/search.py
bogonets/answer
3
12774523
<filename>core/recc/algorithm/search.py # -*- coding: utf-8 -*- from typing import Any def any_none(*args: Any) -> bool: for arg in args: if arg is None: return True return False def any_not_none(*args: Any) -> bool: for arg in args: if arg is not None: return Tr...
2.921875
3
scripts/P1_Files/start/TicTacToe-Flask.py
wesleybeckner/general_applications_of_neural_networks
0
12774524
<gh_stars>0 from flask import Flask, render_template_string, request, make_response from TicTacToe import * TEXT = """ <!doctype html> <html> <head><title>Tic Tac Toe</title></head> <body> <h1>Tic Tac Toe</h1> <h2>{{msg}}</h2> <form action="" method="POST"> <table> {% for j in...
3.09375
3
anomaly_detection/c3d.py
Kim-Ha-Jeong/Capstone_flask
3
12774525
<reponame>Kim-Ha-Jeong/Capstone_flask # -*- coding: utf-8 -*- import h5py import cv2 import keras.backend as K import numpy as np from keras.layers.convolutional import Conv3D, MaxPooling3D, ZeroPadding3D from keras.layers.core import Dense, Dropout, Flatten from keras.models import Model from keras.models import Sequ...
2.40625
2
models/InitialBlock.py
JJavierga/ENet-Real-Time-Semantic-Segmentation
268
12774526
################################################### # Copyright (c) 2019 # # Authors: @iArunava <<EMAIL>> # # @AvivSham <<EMAIL>> # # # # License: BSD License 3.0 # # ...
2.90625
3
app/apps/product/migrations/0001_initial.py
tonyguesswho/jumga
0
12774527
# Generated by Django 3.1.4 on 2021-01-05 20:37 from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ ('seller', '0003_auto_20210105_2035'), ] operations = [ migrations.CreateMode...
1.78125
2
programmers-lecture/1.intro/2.get_sum_of_first_and_last_elements.py
khh180cm/algorithm
0
12774528
<filename>programmers-lecture/1.intro/2.get_sum_of_first_and_last_elements.py """ 입력으로 주어지는 리스트의 첫 원소와 마지막 원소의 합을 리턴 """ def solution(x): assert isinstance(x, list) and x and all(isinstance(i, int) for i in x), 'Value error!!!' first_element = x[0] last_element = x[-1] return first_element + last_ele...
4.09375
4
source/hellogithub.py
yy7576/Hello-github
0
12774529
<reponame>yy7576/Hello-github<filename>source/hellogithub.py<gh_stars>0 #!/usr/bin/python #Filename: hellogithub.py print('Hello World')
1.21875
1
scripts/add_new_plugin.py
d066y/detectem
0
12774530
import os import click ROOT_DIRECTORY = os.path.abspath( os.path.join(os.path.dirname(__file__), os.pardir) ) PLUGIN_DIRECTORY = os.path.join(ROOT_DIRECTORY, 'detectem/plugins') PLUGIN_DIRECTORIES = [ d for d in os.listdir(PLUGIN_DIRECTORY) if os.path.isdir(os.path.join(PLUGIN_DIRECTORY, d)) and d != '__p...
2.46875
2
my_packages/DepthProjection/DepthProjectionModule.py
PlanNoa/video_super_resolution
6
12774531
import torch import torch.nn as nn from utils.tools import transpose1323 from my_packages.DepthProjection.models.HG_model import HGModel class DepthProjectionModule(nn.Module): def __init__(self): super(DepthProjectionModule, self).__init__() self.model = HGModel("my_packages/DepthProjection/pretr...
2.421875
2
data/results/centralities/pagerank/networkX_pagerank_performance.py
cassinius/graphinius
17
12774532
<reponame>cassinius/graphinius import networkx as nx from networkx import pagerank, pagerank_numpy, pagerank_scipy import time import json output_folder = 'comparison_selected' ''' Unweighted graphs ''' print("========================================") print("========== UNWEIGHTED GRAPHS ===========") print("=======...
2.609375
3
tests/test_utilities.py
ryankanno/nyc-restaurant-inspections-api
1
12774533
<filename>tests/test_utilities.py<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- from nose.tools import ok_ from nyc_inspections.utilities import empty_dict import unittest class TestUtilities(unittest.TestCase): def test_empty_dict(self): d1 = {"foo": 1} ok_(len(d1) == 1) e...
2.671875
3
code/extracting_from_payslip.py
BastinFlorian/BoondManager-Auto-Holidays-Validation
0
12774534
<reponame>BastinFlorian/BoondManager-Auto-Holidays-Validation '''Functions extracting the number of CP and RTT per employee Extracting from pdf -- pdf2xt(path) Selecting needed values and dealing with specific cases -- extraction_rtt_conges(test) Creating a df with the selected informations per employee -- out(data) ...
2.9375
3
apps/landfill/tests/test_ratings.py
muffinresearch/addons-server
1
12774535
<filename>apps/landfill/tests/test_ratings.py<gh_stars>1-10 # -*- coding: utf-8 -*- from nose.tools import eq_ import amo import amo.tests from addons.models import Addon, Review from landfill.ratings import generate_ratings class RatingsTests(amo.tests.TestCase): def setUp(self): super(RatingsTests, se...
1.9375
2
plot_rts.py
terraregina/BalancingControl
0
12774536
<gh_stars>0 # %% from misc import calc_dkl, extract_params_from_ttl import pickle as pickle import numpy as np import matplotlib.pyplot as plt from numpy.linalg import multi_dot import itertools as itertools from misc import run_action_selection, test_vals, params_dict from misc import load_data, load_data_from_ttl, s...
1.78125
2
tests/unit/injection/inject_unit_test.py
mt3o/injectable
71
12774537
<reponame>mt3o/injectable from unittest.mock import MagicMock import pytest from pytest import fixture from pytest_mock import MockFixture from injectable import inject, Injectable, inject_multiple from injectable.errors import InjectionError from injectable.constants import DEFAULT_NAMESPACE from injectable.injectio...
2.34375
2
setup.py
michi7x7/pm-mos-model
1
12774538
<reponame>michi7x7/pm-mos-model from setuptools import setup import distutils.cmd from distutils.command.build_py import build_py # don't import CryMOS! build_cpp = {'__file__': 'CryMOS/cpp/build.py'} with open('CryMOS/cpp/build.py') as f: exec(f.read(), build_cpp) ver_file = {'__file__': 'CryMOS/version.py'} wit...
1.867188
2
app/main/views.py
Abzed/post-blog
0
12774539
<gh_stars>0 from flask import render_template,request,redirect,url_for,abort,flash from . import main # from ..request import get_quotes from .forms import BlogForm,BioForm, CommentForm from ..models import Blog,User, Comment from flask_login import login_required,current_user from .. import db,photos from ..request im...
2.421875
2
SDKs/Aspose.Imaging-Cloud-SDK-for-Python/tests/test_ImagingApi.py
naeem244/Aspose.Imaging-for-Cloud
0
12774540
<reponame>naeem244/Aspose.Imaging-for-Cloud import unittest import os.path import json import inspect import requests import asposeimagingcloud from asposeimagingcloud.ImagingApi import ImagingApi from asposeimagingcloud.ImagingApi import ApiException from asposeimagingcloud.models import ImagingResponse fro...
2.421875
2
EquationModels/TaylorVortex.py
mroberto166/PinnsSub
12
12774541
from ImportFile import * pi = math.pi T = 10 a = [4, 0] extrema_values = torch.tensor([[0, 1], [-8, 8], [-8, 8]]) def compute_res(network, x_f_train, space_dimensions, solid, computing_error=False): x_f_train.requires_grad = True u = (network(x_...
2.359375
2
tests/test_event_listener.py
ppd0705/supervisor-gateway
1
12774542
<reponame>ppd0705/supervisor-gateway<gh_stars>1-10 import asyncio import os import pytest from pytest_mock import MockerFixture from supervisor_gateway.event_listener import listener from supervisor_gateway.event_listener import open_connection @pytest.mark.asyncio async def test_listener(mocker: MockerFixture): ...
2.0625
2
commands/nitrotype/verify.py
adl212/Lacan-NTSport-Source-Code
1
12774543
<gh_stars>1-10 '''Verify your account ownership after registering!''' from discord.ext import commands from packages.utils import Embed, ImproperType from packages.nitrotype import Racer, cars import requests import os import json import random, copy from mongoclient import DBClient from nitrotype import verify, verify...
2.65625
3
src/view/pair_plots.py
sand-ci/ps-dash
0
12774544
import urllib.parse as urlparse from urllib.parse import parse_qs import utils.helpers as hp import pandas as pd import model.queries as qrs import view.templates as tmpl import numpy as np import plotly.graph_objects as go import plotly as py import plotly.express as px from plotly.offline import download_plotlyjs, i...
2.203125
2
Solutions/0012.intToRoman.py
lyhshang/LeetCode-Solutions
0
12774545
class Solution: def intToRoman(self, num: int) -> str: res = "" s = ['I', 'V', 'X', 'L', 'C', 'D', 'M'] index = 0 while num > 0: x = num % 10 if x < 5: if x == 4: temp = s[index] + s[index + 1] else: ...
3.203125
3
md5_util.py
weiwei11/wind
0
12774546
<reponame>weiwei11/wind<filename>md5_util.py # Author: weiwei import os import glob from hashlib import md5 def generate_str_md5(s: str, encoding='utf-8'): """ Generate md5 str for str object :param s: str :param encoding: str encoding, default is 'utf-8' :return: md5 of str >>> s = 'abcdefg...
3.015625
3
python/app.py
Software-Engineering-Group-4-Maamy/chat-bot
1
12774547
from tkinter import * from chatbot import Botler BG_COLOR = "#272727" TEXT_COLOR = "#FAFAFA" FONT = "Helvetica 14" FONT_BOLD = "Helvetica 13 bold" class ChatApplication: """Runs application """ def __init__(self): """Generates window GUI an initializes Chatbot""" self._init_window() ...
3.65625
4
derobertis_project_logo/project_logo.py
nickderobertis/derobertis-project-logo
0
12774548
<gh_stars>0 import os from derobertis_project_logo.logo import Logo class ProjectLogo: def __init__(self, name: str, logo: Logo): self.name = name self.logo = logo def rst(self, images_folder: str, width: float = 700): image_path = os.path.join(images_folder, f'{self.name}.svg') ...
2.5625
3
Coursera/Python_IT_Google/T01/testtest.py
brianshen1990/KeepLearning
4
12774549
<reponame>brianshen1990/KeepLearning #!/usr/bin/env python3 import os import sys import subprocess BASEPATH = "/home/student-04-59327def21d0" with open(sys.argv[1]) as f: for item in f.readlines(): old_file = item.strip() new_file = old_file.replace("jane", "jdoe") # print(BASEPATH + old_file + "," + B...
3
3
ui/pypesvds/controllers/index.py
onfire73/pypeskg
117
12774550
import logging from pylons import request, response, session, tmpl_context as c from pylons.controllers.util import abort # added for auth from authkit.authorize.pylons_adaptors import authorize from authkit.permissions import RemoteUser, ValidAuthKitUser, UserIn from pypesvds.lib.base import BaseController, render ...
2.125
2