hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6db5c79371243a32af183f73744db734c3cd20b9 | 1,380 | py | Python | ETL/Data_Operations/data_operations.py | rohanharode/DRAW-Drug-Review-Analysis-Work | 89d8df82e1f0b67129727f16c32c038d64af35e2 | [
"MIT"
] | null | null | null | ETL/Data_Operations/data_operations.py | rohanharode/DRAW-Drug-Review-Analysis-Work | 89d8df82e1f0b67129727f16c32c038d64af35e2 | [
"MIT"
] | 2 | 2020-11-08T22:03:32.000Z | 2021-06-27T09:22:31.000Z | ETL/Data_Operations/data_operations.py | rohanharode/Drug-Review-Analysis-Work | 89d8df82e1f0b67129727f16c32c038d64af35e2 | [
"MIT"
] | 1 | 2021-07-08T10:50:36.000Z | 2021-07-08T10:50:36.000Z | from ETL.Data_Preprocessing.data_cleaning_and_filtering import cleaning_and_filtering
from ETL.Data_Transformation.drug_conditions_grouped import group_conditions
from ETL.Data_Transformation.jaccard_similarity import apply_jaccard_similarity
from ETL.Data_Transformation.drug_conditions_fuzzy_matching import fuzzy_matc... | 37.297297 | 87 | 0.826087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 403 | 0.292029 |
6db6887534c339671321ea2ad6c3cae9fe067123 | 2,345 | py | Python | setup.py | Ezbob/dgDynamic | 394de1c138c1517c4cdfead879c43db189752d92 | [
"MIT"
] | null | null | null | setup.py | Ezbob/dgDynamic | 394de1c138c1517c4cdfead879c43db189752d92 | [
"MIT"
] | null | null | null | setup.py | Ezbob/dgDynamic | 394de1c138c1517c4cdfead879c43db189752d92 | [
"MIT"
] | null | null | null | from setuptools import setup
from setuptools.command.install import install
import os
import sys
import atexit
if __name__ == '__main__':
package_name = 'dgdynamic'
excludes = [
'__pycache__',
'StochKit'
]
extras = [
'default_config.ini',
'spim.ocaml',
'stochkit... | 33.028169 | 99 | 0.612367 | 891 | 0.379795 | 0 | 0 | 0 | 0 | 0 | 0 | 389 | 0.165814 |
6db73ff6f5328cc7f6a179960f5ceb876377c833 | 5,543 | py | Python | Robotics/src/otonomsesli.py | ahmetakif/Voice-Controlled-Raspberry-Pi-Robot | 00dcc15dfbb7441d6403fb0467b2144e8750cc0c | [
"Apache-2.0"
] | 5 | 2019-08-21T08:08:27.000Z | 2021-06-14T06:56:50.000Z | Robotics/src/otonomsesli.py | ahmetakif/Voice-Controlled-Raspberry-Pi-Robot | 00dcc15dfbb7441d6403fb0467b2144e8750cc0c | [
"Apache-2.0"
] | null | null | null | Robotics/src/otonomsesli.py | ahmetakif/Voice-Controlled-Raspberry-Pi-Robot | 00dcc15dfbb7441d6403fb0467b2144e8750cc0c | [
"Apache-2.0"
] | 2 | 2019-08-21T08:16:58.000Z | 2021-04-07T11:56:11.000Z | import os
import RPi.GPIO as gpio
import time
from mesafe import distance
motorhizi = 1
aci2 = aci3 = aci4 = 6
aci = 5.5
in4 = 26
in3 = 4
in2 = 12
in1 = 8
solled = 9
sagled = 11
gpio.setwarnings(False)
def init():
gpio.setwarnings(False)
gpio.setmode(gpio.BCM)
gpio.setup(22,gpio.OUT)
gpio.setup(27... | 20.378676 | 115 | 0.541043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 244 | 0.044012 |
6db755c6b9c7ae3c58a95da2aa5e9301523ca9e8 | 632 | py | Python | src/models/discord_users.py | KirtusJ/BirdBot | 4440364caefa6ec9acf1bc7cf38605b1d90de20e | [
"MIT"
] | null | null | null | src/models/discord_users.py | KirtusJ/BirdBot | 4440364caefa6ec9acf1bc7cf38605b1d90de20e | [
"MIT"
] | null | null | null | src/models/discord_users.py | KirtusJ/BirdBot | 4440364caefa6ec9acf1bc7cf38605b1d90de20e | [
"MIT"
] | null | null | null | from sqlalchemy.sql import func
from sqlalchemy import Column, BigInteger, String, DateTime, Boolean
from .model import database
class DiscordUser(database.Base):
__tablename__='discord_users'
id = Column(BigInteger, primary_key=True, unique=True, nullable=False, autoincrement=False)
created = Column(DateTime(time... | 39.5 | 92 | 0.783228 | 501 | 0.792722 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.042722 |
6db800ff348f905ec48118d311341bb879f2f4fd | 2,036 | py | Python | algorithms/timer.py | terratenff/vrp-gen-alg | 3910ff7977a84b03e14c4f500909bcb86e6dd608 | [
"MIT"
] | null | null | null | algorithms/timer.py | terratenff/vrp-gen-alg | 3910ff7977a84b03e14c4f500909bcb86e6dd608 | [
"MIT"
] | null | null | null | algorithms/timer.py | terratenff/vrp-gen-alg | 3910ff7977a84b03e14c4f500909bcb86e6dd608 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
timer.py:
Implementation of a CPU timer that is used as a part of stopping criteria.
"""
import time
def _time():
"""
Convenience function that returns current process time as milliseconds.
"""
return time.process_time() * 1000
class Timer:
"""
Captures CPU time ... | 22.130435 | 81 | 0.562868 | 1,758 | 0.863458 | 0 | 0 | 0 | 0 | 0 | 0 | 900 | 0.442043 |
6db82d6e06cc11fb7b83d45d0342ef4c6c52a44f | 6,093 | py | Python | experiments/livecell/validate_model.py | JonasHell/torch-em | 2e008e0cd2f0ea6681581374fce4f9f47b986d55 | [
"MIT"
] | 13 | 2021-03-09T21:31:09.000Z | 2022-03-21T05:24:26.000Z | experiments/livecell/validate_model.py | JonasHell/torch-em | 2e008e0cd2f0ea6681581374fce4f9f47b986d55 | [
"MIT"
] | 16 | 2021-03-02T23:19:34.000Z | 2022-03-25T19:43:41.000Z | experiments/livecell/validate_model.py | JonasHell/torch-em | 2e008e0cd2f0ea6681581374fce4f9f47b986d55 | [
"MIT"
] | 4 | 2021-05-18T08:29:33.000Z | 2022-02-11T12:16:20.000Z | import argparse
import os
from glob import glob
from pathlib import Path
import imageio
import h5py
import pandas as pd
from bioimageio.core import load_resource_description
from bioimageio.core.prediction import predict_with_padding
from bioimageio.core.prediction_pipeline import create_prediction_pipeline
from elf.... | 42.02069 | 115 | 0.683243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,204 | 0.197604 |
6dba80a9622a3df8b603c41e7552e6d4c8ed3c02 | 23 | py | Python | tests/res/foo.py | lepture/werkzeug | 627ac8370bc5aa3a04ba365b4ebcd32b6a859863 | [
"BSD-3-Clause"
] | 1 | 2019-04-14T19:58:21.000Z | 2019-04-14T19:58:21.000Z | tests/res/foo.py | lepture/werkzeug | 627ac8370bc5aa3a04ba365b4ebcd32b6a859863 | [
"BSD-3-Clause"
] | null | null | null | tests/res/foo.py | lepture/werkzeug | 627ac8370bc5aa3a04ba365b4ebcd32b6a859863 | [
"BSD-3-Clause"
] | null | null | null | from .bar import value
| 11.5 | 22 | 0.782609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6dbe230462ef91543db856cb4ff084f41755ca26 | 1,320 | py | Python | src/wa_kat/db/downloader.py | WebArchivCZ/WA-KAT | 719f7607222f5a4d917c535b2da6371184222101 | [
"MIT"
] | 3 | 2017-03-23T12:59:21.000Z | 2017-11-22T08:23:14.000Z | src/wa_kat/db/downloader.py | WebArchivCZ/WA-KAT | 719f7607222f5a4d917c535b2da6371184222101 | [
"MIT"
] | 89 | 2015-06-28T22:10:28.000Z | 2017-01-30T16:06:05.000Z | src/wa_kat/db/downloader.py | WebarchivCZ/WA-KAT | 719f7607222f5a4d917c535b2da6371184222101 | [
"MIT"
] | 1 | 2015-12-17T02:56:59.000Z | 2015-12-17T02:56:59.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Interpreter version: python 2.7
#
# Imports =====================================================================
import requests
from ..settings import USER_AGENT
from ..settings import REQUEST_TIMEOUT
# Functions & classes =========================================... | 25.882353 | 79 | 0.537879 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 494 | 0.374242 |
6dbfcff192ece7ab414ec98a8d97692a952d7bdd | 7,506 | py | Python | main.py | qmn/pershing | ec3cc87d9bfb7ca0cf1da1449d695c36df548309 | [
"BSD-2-Clause"
] | 16 | 2017-05-20T05:30:59.000Z | 2022-02-08T05:41:52.000Z | main.py | qmn/pershing | ec3cc87d9bfb7ca0cf1da1449d695c36df548309 | [
"BSD-2-Clause"
] | null | null | null | main.py | qmn/pershing | ec3cc87d9bfb7ca0cf1da1449d695c36df548309 | [
"BSD-2-Clause"
] | 3 | 2016-09-18T15:55:37.000Z | 2020-12-27T15:36:09.000Z | #!/usr/bin/env python2.7
from __future__ import print_function
import json
import sys
import numpy as np
import os.path
import time
from math import ceil
import argparse
import nbt
from util import blif, cell, cell_library
from placer import placer
from router import router, extractor, minetime
from vis import png
... | 37.158416 | 214 | 0.641886 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,134 | 0.284306 |
6dc096d4b45dd4acd7b5d28912a696afdc093628 | 296 | py | Python | logtest.py | jonathanstrong/log-viewer | 83374de21ce807709217e3fffa87b75265b3edd6 | [
"MIT"
] | 1 | 2017-03-09T01:18:06.000Z | 2017-03-09T01:18:06.000Z | logtest.py | jonathanstrong/log-viewer | 83374de21ce807709217e3fffa87b75265b3edd6 | [
"MIT"
] | null | null | null | logtest.py | jonathanstrong/log-viewer | 83374de21ce807709217e3fffa87b75265b3edd6 | [
"MIT"
] | null | null | null | import logging
import logging.handlers
import time
logger = logging.getLogger(__name__)
handler = logging.handlers.SocketHandler('localhost', 9033)
stream = logging.StreamHandler()
logger.addHandler(handler)
logger.addHandler(stream)
while True:
logger.warning('ping')
time.sleep(.001)
| 22.769231 | 59 | 0.780405 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.057432 |
6dc161a661b51dac6f78e1e2949123e1dfec52e8 | 5,032 | py | Python | text-builder.py | guskma/text-builder | e9de6178ef5ce71a6f022b7932d40a906200578e | [
"MIT"
] | null | null | null | text-builder.py | guskma/text-builder | e9de6178ef5ce71a6f022b7932d40a906200578e | [
"MIT"
] | null | null | null | text-builder.py | guskma/text-builder | e9de6178ef5ce71a6f022b7932d40a906200578e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from argparse import ArgumentParser
from collections import OrderedDict
import jinja2
import csv
import sys
import os.path
import re
def store_keyval(src_dict, key, val):
if key is None:
return val
if type(src_dict) is... | 29.775148 | 103 | 0.584261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 933 | 0.185413 |
6dc1f2e93753dd6196949aaa91494539baeb31b1 | 2,077 | py | Python | hard_grasp.py | bionicdl-sustech/AmphibiousManipulation | 397c7dfef6b4dda178a567c36aabfe0f4b05b821 | [
"MIT"
] | null | null | null | hard_grasp.py | bionicdl-sustech/AmphibiousManipulation | 397c7dfef6b4dda178a567c36aabfe0f4b05b821 | [
"MIT"
] | null | null | null | hard_grasp.py | bionicdl-sustech/AmphibiousManipulation | 397c7dfef6b4dda178a567c36aabfe0f4b05b821 | [
"MIT"
] | null | null | null | import yaml
import os
import sys
import time
import numpy as np
import cv2 as cv
from franka.FrankaController import FrankaController
def read_cfg(path):
with open(path, 'r') as stream:
out = yaml.safe_load(stream)
return out
if __name__ == '__main__':
ROOT = os.path.dirname(os.path.abspath(__f... | 25.9625 | 132 | 0.629273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 384 | 0.184882 |
6dc61ebe0b329b523bc43f68e083bb96cc389b67 | 2,913 | py | Python | src/server/api.py | Irsutoro/sesame | 142959a6e4c814c72f480b0252a028d8586b77da | [
"MIT"
] | null | null | null | src/server/api.py | Irsutoro/sesame | 142959a6e4c814c72f480b0252a028d8586b77da | [
"MIT"
] | null | null | null | src/server/api.py | Irsutoro/sesame | 142959a6e4c814c72f480b0252a028d8586b77da | [
"MIT"
] | null | null | null | import cherrypy
import sesame
from database import create_database
DATABASE = create_database({'System':'sqlite', 'Database':'testy.db'})
SERVER = None
def validate_password(realm, login, password):
#TODO autoryzacja JWT
return SERVER.authorize_user(login, password)
CHERRYPY_CONFIG = {
'server.socket_hos... | 30.663158 | 124 | 0.6701 | 1,606 | 0.551322 | 0 | 0 | 1,657 | 0.568829 | 0 | 0 | 951 | 0.326468 |
6dc710027aba9309fc1e58e6facfd13ec0253ff6 | 731 | py | Python | Domain_Knowledge_based/stanfordNER.py | Mount428/Hate-Speech-Detection | f8644844dda954ebd169aeec54cb4c7361d88a09 | [
"MIT"
] | null | null | null | Domain_Knowledge_based/stanfordNER.py | Mount428/Hate-Speech-Detection | f8644844dda954ebd169aeec54cb4c7361d88a09 | [
"MIT"
] | null | null | null | Domain_Knowledge_based/stanfordNER.py | Mount428/Hate-Speech-Detection | f8644844dda954ebd169aeec54cb4c7361d88a09 | [
"MIT"
] | null | null | null | from nltk.tag import StanfordNERTagger
import pandas as pd
from sklearn.metrics import f1_score, confusion_matrix
from loader import Load
train, test = Load('c')
ner = StanfordNERTagger('./stanford-ner-2018-10-16/classifiers/english.all.3class.distsim.crf.ser.gz', './stanford-ner-2018-10-16/stanford-ner.jar')
data ... | 22.84375 | 148 | 0.641587 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.320109 |
6dc79c5bcc11f79748762758e10ea27d0fe9f70f | 41,355 | py | Python | pyrif/FuXi/Rete/Network.py | mpetyx/pyrif | 2f7ba863030d7337bb39ad502d1e09e26ac950d2 | [
"MIT"
] | null | null | null | pyrif/FuXi/Rete/Network.py | mpetyx/pyrif | 2f7ba863030d7337bb39ad502d1e09e26ac950d2 | [
"MIT"
] | null | null | null | pyrif/FuXi/Rete/Network.py | mpetyx/pyrif | 2f7ba863030d7337bb39ad502d1e09e26ac950d2 | [
"MIT"
] | null | null | null | """
====================================================================================
A Rete Network Building and 'Evaluation' Implementation for RDFLib Graphs of
Notation 3 rules.
The DLP implementation uses this network to automatically building RETE
decision trees for OWL forms of DLP
Uses Python hashing mechan... | 44.182692 | 132 | 0.58363 | 36,268 | 0.876992 | 7,012 | 0.169556 | 0 | 0 | 0 | 0 | 9,552 | 0.230976 |
6dc7ac77f93802122ddb1e47bec4538126c006a2 | 500 | py | Python | gcpy/functions/HTTPFunction.py | MaximBazarov/gcpy | 92c1d31a8133e19a5d2b27dc8f2e0b7e8fe1d609 | [
"MIT"
] | 1 | 2020-07-29T11:20:35.000Z | 2020-07-29T11:20:35.000Z | gcpy/functions/HTTPFunction.py | MaximBazarov/gcpy | 92c1d31a8133e19a5d2b27dc8f2e0b7e8fe1d609 | [
"MIT"
] | null | null | null | gcpy/functions/HTTPFunction.py | MaximBazarov/gcpy | 92c1d31a8133e19a5d2b27dc8f2e0b7e8fe1d609 | [
"MIT"
] | null | null | null | from gcpy.functions.CloudFunction import CloudFunctionTrigger, CloudFunction
from gcpy.utils.binary import binary_decode
class HTTPTrigger(CloudFunctionTrigger):
pass
class HTTPFunction(CloudFunction):
name = 'function_public_name'
trigger = HTTPTrigger()
def handle(self, request):
print('H... | 22.727273 | 76 | 0.7 | 373 | 0.746 | 0 | 0 | 145 | 0.29 | 0 | 0 | 35 | 0.07 |
6dcbed133eb3a7b3cdb7874d0063d3eca6ce4f69 | 792 | py | Python | flask_sqlalchemy/app.py | andreeaionescu/graphql-example | ceeff3888ea87312d4df138093d7f6fcaa1ae973 | [
"MIT"
] | null | null | null | flask_sqlalchemy/app.py | andreeaionescu/graphql-example | ceeff3888ea87312d4df138093d7f6fcaa1ae973 | [
"MIT"
] | null | null | null | flask_sqlalchemy/app.py | andreeaionescu/graphql-example | ceeff3888ea87312d4df138093d7f6fcaa1ae973 | [
"MIT"
] | null | null | null | '''
Unlike a RESTful API, there is only a single URL from which GraphQL is accessed.
We are going to use Flask to create a server that expose the GraphQL schema under /graphql and a interface for querying
it easily: GraphiQL (also under /graphql when accessed by a browser).
'''
from flask import Flask
from flask_graph... | 26.4 | 119 | 0.744949 | 0 | 0 | 0 | 0 | 86 | 0.108586 | 0 | 0 | 343 | 0.433081 |
6dcd1f0147fa6de6eaa3f0bce8b1c9dccea62eb4 | 1,305 | py | Python | The HackerRank Interview Preparation Kit/6 - Greedy Algorithms/Reverse Shuffle Merge.py | sohammanjrekar/HackerRank | 1f5010133a1ac1e765e855a086053c97d9e958be | [
"MIT"
] | null | null | null | The HackerRank Interview Preparation Kit/6 - Greedy Algorithms/Reverse Shuffle Merge.py | sohammanjrekar/HackerRank | 1f5010133a1ac1e765e855a086053c97d9e958be | [
"MIT"
] | null | null | null | The HackerRank Interview Preparation Kit/6 - Greedy Algorithms/Reverse Shuffle Merge.py | sohammanjrekar/HackerRank | 1f5010133a1ac1e765e855a086053c97d9e958be | [
"MIT"
] | null | null | null | #
# Complete the 'reverseShuffleMerge' function below.
#
# The function is expected to return a STRING.
# The function accepts STRING s as parameter.
#
import os
from collections import defaultdict
def frequency(s):
result = defaultdict(int)
for char in s:
result[char] += 1
retur... | 24.166667 | 73 | 0.596169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 207 | 0.158621 |
6dcf6d8a2796f5c3d07f258930f33ef3e7528467 | 4,021 | py | Python | src/skansensor/datacollector.py | fadykuzman/Rodeo-App | 2972b371ed38fad4f93e6afcb699b51cec865510 | [
"BSD-3-Clause"
] | null | null | null | src/skansensor/datacollector.py | fadykuzman/Rodeo-App | 2972b371ed38fad4f93e6afcb699b51cec865510 | [
"BSD-3-Clause"
] | null | null | null | src/skansensor/datacollector.py | fadykuzman/Rodeo-App | 2972b371ed38fad4f93e6afcb699b51cec865510 | [
"BSD-3-Clause"
] | null | null | null | """
This class searches for data in a hierarchy of folders and sorts
them in a list.
Attributes to the data are:
path: path to the raw data file
type: whether from Picarro, DropSense sensors.
data: the data set after reading with the modules:
read_dropsense
... | 36.225225 | 92 | 0.437453 | 3,424 | 0.851529 | 0 | 0 | 0 | 0 | 0 | 0 | 1,976 | 0.49142 |
6dd2944b2ee1fbe92298d2147e16828378aa049e | 2,794 | py | Python | sonypyapi.py | Johannes-Vitt/sonypiapi | 74c347d8bdb05fe8955dd4478ecfdc19cfd4ec03 | [
"MIT"
] | 2 | 2017-05-12T11:23:48.000Z | 2021-06-12T09:38:24.000Z | sonypyapi.py | Johannes-Vitt/sonypiapi | 74c347d8bdb05fe8955dd4478ecfdc19cfd4ec03 | [
"MIT"
] | null | null | null | sonypyapi.py | Johannes-Vitt/sonypiapi | 74c347d8bdb05fe8955dd4478ecfdc19cfd4ec03 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import json
import urllib2
import collections
url = "http://192.168.122.1:8080/sony/"
camera_url = url+"camera"
avContent_url = url+"avContent"
def create_params_dict(method,params=[],id_=1,version="1.0"):
params = collections.OrderedDict([
("method", method),
("p... | 29.410526 | 89 | 0.586256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 808 | 0.289191 |
6dd2c58e17cfa913515f063e288c4ff6d601590c | 875 | py | Python | pybuildtool/core/context.py | dozymoe/PyBuildTool | d938a8d6335b801e102159e82a6e0002dfaa1b1a | [
"MIT"
] | 5 | 2017-02-10T07:54:49.000Z | 2017-07-11T09:14:26.000Z | pybuildtool/core/context.py | dozymoe/PyBuildTool | d938a8d6335b801e102159e82a6e0002dfaa1b1a | [
"MIT"
] | null | null | null | pybuildtool/core/context.py | dozymoe/PyBuildTool | d938a8d6335b801e102159e82a6e0002dfaa1b1a | [
"MIT"
] | 1 | 2017-05-21T20:35:10.000Z | 2017-05-21T20:35:10.000Z | import os
from waflib import Context, Errors # pylint:disable=import-error
class WatchContext(Context.Context):
cmd = 'watch'
fun = 'watch'
variant = ''
def __init__(self, **kw):
super().__init__(**kw)
self.top_dir = kw.get('top_dir', Context.top_dir)
self.out_dir = kw.get('ou... | 31.25 | 76 | 0.637714 | 798 | 0.912 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.142857 |
6dd3236b3617415b5e5c4905e33da2de283601a4 | 3,151 | py | Python | FindJenkins.py | realsanjay/DomainRecon_old | 936f66404c1a4163b119afc06dca03e588c0756e | [
"MIT"
] | 100 | 2018-04-06T13:50:57.000Z | 2018-10-01T14:33:46.000Z | FindJenkins.py | realsanjay/DomainRecon_old | 936f66404c1a4163b119afc06dca03e588c0756e | [
"MIT"
] | 3 | 2018-12-06T04:54:24.000Z | 2021-02-25T14:59:21.000Z | FindJenkins.py | realsanjay/DomainRecon_old | 936f66404c1a4163b119afc06dca03e588c0756e | [
"MIT"
] | 16 | 2018-10-09T13:50:14.000Z | 2021-09-01T06:53:34.000Z | import sys
import re
import requests
import requests.cookies
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
from time import sleep
from GlobalVariables import *
class FindJenkins(object):
def __init__(self):
super(FindJenkin... | 53.40678 | 369 | 0.679467 | 2,897 | 0.919391 | 0 | 0 | 0 | 0 | 0 | 0 | 1,432 | 0.454459 |
6dd35f03ff9bc671f79e8585b1d7db025e32de94 | 115 | py | Python | tests/conftest.py | techjacker/sitemapgenerator | 512d6ea6f36ac661d3e0b1275a055c381b0ce455 | [
"MIT"
] | null | null | null | tests/conftest.py | techjacker/sitemapgenerator | 512d6ea6f36ac661d3e0b1275a055c381b0ce455 | [
"MIT"
] | null | null | null | tests/conftest.py | techjacker/sitemapgenerator | 512d6ea6f36ac661d3e0b1275a055c381b0ce455 | [
"MIT"
] | null | null | null | import pytest
from pytest_httpbin.plugin import httpbin_ca_bundle
pytest.fixture(autouse=True)(httpbin_ca_bundle)
| 23 | 51 | 0.869565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6dd36722d7bc153d838406ca8e22b682264cbef0 | 187 | py | Python | freedom/tests/post_test.py | smbdsbrain/wind_of_freedom | b1b19205175db8c824ab5f4b2e8a8e4e2c5d6873 | [
"WTFPL"
] | null | null | null | freedom/tests/post_test.py | smbdsbrain/wind_of_freedom | b1b19205175db8c824ab5f4b2e8a8e4e2c5d6873 | [
"WTFPL"
] | null | null | null | freedom/tests/post_test.py | smbdsbrain/wind_of_freedom | b1b19205175db8c824ab5f4b2e8a8e4e2c5d6873 | [
"WTFPL"
] | null | null | null | from unittest import mock
async def test_post(anonym_client, mocker):
mocker.patch('aioga.GA')
r = await anonym_client.get('v1/wind')
assert r.status == 200, await r.text()
| 23.375 | 43 | 0.695187 | 0 | 0 | 0 | 0 | 0 | 0 | 158 | 0.84492 | 19 | 0.101604 |
6dd57794c6789b5f5554c5238dd5b5fff9f2b1a6 | 138 | py | Python | Exercise 10/exercise_code/util/__init__.py | CornellLenard/Deep-Learning-Course-Exercises | db32f2b9ab93a50580e93e9dd83be1db7c4c4a19 | [
"MIT"
] | null | null | null | Exercise 10/exercise_code/util/__init__.py | CornellLenard/Deep-Learning-Course-Exercises | db32f2b9ab93a50580e93e9dd83be1db7c4c4a19 | [
"MIT"
] | null | null | null | Exercise 10/exercise_code/util/__init__.py | CornellLenard/Deep-Learning-Course-Exercises | db32f2b9ab93a50580e93e9dd83be1db7c4c4a19 | [
"MIT"
] | null | null | null | """Util functions"""
from .vis_utils import visualizer
from .save_model import save_model
from .Util import checkParams, checkSize, test
| 23 | 46 | 0.797101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.144928 |
6dd5f7a4941e24796fe51eb9276d1b79188a16ea | 15,499 | py | Python | au/fixtures/dataset.py | pwais/au2018 | edd224e5fb649b9f0095ffad39b94f72f73e4853 | [
"Apache-2.0"
] | null | null | null | au/fixtures/dataset.py | pwais/au2018 | edd224e5fb649b9f0095ffad39b94f72f73e4853 | [
"Apache-2.0"
] | 3 | 2019-01-05T22:43:37.000Z | 2019-01-26T05:45:01.000Z | au/fixtures/dataset.py | pwais/au2018 | edd224e5fb649b9f0095ffad39b94f72f73e4853 | [
"Apache-2.0"
] | 1 | 2020-05-03T21:10:03.000Z | 2020-05-03T21:10:03.000Z | import io
import os
from collections import OrderedDict
import imageio
import numpy as np
from au import conf
from au.util import create_log
from au import util
##
## Images
##
class ImageRow(object):
"""For expected usage, see `test_imagerow_demo`"""
# NB: While pyspark uses cloudpickle for *user code*, it... | 28.595941 | 160 | 0.623653 | 13,325 | 0.859733 | 915 | 0.059036 | 6,783 | 0.437641 | 0 | 0 | 5,586 | 0.36041 |
6dd85933e9edf9c201a35fe12dd563f0c97ddb8b | 417 | py | Python | Python Fundamentals/Regular Expressions/More Exercises/Task05.py | DonikaChervenkova/SoftUni | bff579c037ec48f39ed193b34bc3502a32e90732 | [
"MIT"
] | 1 | 2022-03-16T10:23:04.000Z | 2022-03-16T10:23:04.000Z | Python Fundamentals/Regular Expressions/More Exercise/Task05.py | IvanTodorovBG/SoftUni | 7b667f6905d9f695ab1484efbb02b6715f6d569e | [
"MIT"
] | null | null | null | Python Fundamentals/Regular Expressions/More Exercise/Task05.py | IvanTodorovBG/SoftUni | 7b667f6905d9f695ab1484efbb02b6715f6d569e | [
"MIT"
] | 1 | 2021-12-04T12:30:57.000Z | 2021-12-04T12:30:57.000Z | import re
title_regex = r'<title>([^<>]*)<\/title>'
info = input()
title = re.findall(title_regex, info)
title = ''.join(title)
print(f"Title: {title}")
body_regex = r'<body>.*<\/body>'
body = re.findall(body_regex, info)
body = ''.join(body)
content_regex = r">([^><]*)<"
content = re.findall(content_regex, bod... | 17.375 | 41 | 0.630695 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.263789 |
6dda593a7a7bdfb7cf3bae36d8a8315e4135dc5a | 230 | py | Python | OMS/helpers/idgenerator.py | RumaisaHabib/orphan-management-system | 4671f40fb2a979e54dec4d12cc522829c2aa739e | [
"MIT"
] | 1 | 2021-12-24T18:14:35.000Z | 2021-12-24T18:14:35.000Z | OMS/helpers/idgenerator.py | RumaisaHabib/orphan-management-system | 4671f40fb2a979e54dec4d12cc522829c2aa739e | [
"MIT"
] | null | null | null | OMS/helpers/idgenerator.py | RumaisaHabib/orphan-management-system | 4671f40fb2a979e54dec4d12cc522829c2aa739e | [
"MIT"
] | null | null | null | import random
def randomStr():
l = [x for x in range(9)]
l += [chr(x) for x in range(65, 65+26)]
string = ""
for x in range(32):
string += str(l[random.randint(0, len(l) - 1)])
return string
| 19.166667 | 63 | 0.521739 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0.008696 |
6ddb9acc38ebe942d14b28143c5d4ded77045159 | 320 | py | Python | code_references/graph.py | nathanShepherd/Intelligent-Interface | 4ab8a223ef6dfaed7cf5ebf61b24ec355d00b593 | [
"MIT"
] | 3 | 2018-03-26T21:08:45.000Z | 2018-11-16T21:16:57.000Z | code_references/graph.py | nathanShepherd/Intelligent-Interface | 4ab8a223ef6dfaed7cf5ebf61b24ec355d00b593 | [
"MIT"
] | null | null | null | code_references/graph.py | nathanShepherd/Intelligent-Interface | 4ab8a223ef6dfaed7cf5ebf61b24ec355d00b593 | [
"MIT"
] | 2 | 2018-03-26T21:08:51.000Z | 2020-05-06T09:22:52.000Z | # Testing various methods to graph with matplotlib
# Developed by Nathan Shepherd
import numpy as np
import matplotlib.pyplot as plt
n = 100
y = [round(np.random.normal(scale=n/10)) for _ in range(n)]
x = [i for i in range(-n, n)]
_y = []
for i in range(-n, n):
_y.append(y.count(i))
plt.plot(x, _y)
plt.show()
| 18.823529 | 59 | 0.671875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.25 |
6ddc0994a3a96b2f0830b2f0c227911b21552e3f | 1,741 | py | Python | scripts/taxonomy_frequency.py | STRIDES-Codes/Exploring-the-Microbiome- | bd29c8c74d8f40a58b63db28815acb4081f20d6b | [
"MIT"
] | null | null | null | scripts/taxonomy_frequency.py | STRIDES-Codes/Exploring-the-Microbiome- | bd29c8c74d8f40a58b63db28815acb4081f20d6b | [
"MIT"
] | null | null | null | scripts/taxonomy_frequency.py | STRIDES-Codes/Exploring-the-Microbiome- | bd29c8c74d8f40a58b63db28815acb4081f20d6b | [
"MIT"
] | 2 | 2021-06-05T07:40:20.000Z | 2021-06-05T08:02:58.000Z | import sys
from Bio import Entrez
from collections import Counter
import pandas as pd
###########################################
def get_tax_id(species):
species = species.replace(" ", "+").strip()
search = Entrez.esearch(term = species, db = "taxonomy", retmode = "xml")
record = Entrez.read(search)
re... | 31.654545 | 118 | 0.564618 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 477 | 0.27398 |
6dddd5e456a7ccaaa8659db73eee87ff70f0dccb | 91 | py | Python | 02-array-seq/2_13.py | 393562632/example-code | 4a5da5726408284aed9e01f93a25a0d8dd348fb5 | [
"MIT"
] | null | null | null | 02-array-seq/2_13.py | 393562632/example-code | 4a5da5726408284aed9e01f93a25a0d8dd348fb5 | [
"MIT"
] | null | null | null | 02-array-seq/2_13.py | 393562632/example-code | 4a5da5726408284aed9e01f93a25a0d8dd348fb5 | [
"MIT"
] | null | null | null | weird_board = [['_'] * 3] *3
print(weird_board)
weird_board[0][2] = 'X'
print(weird_board) | 18.2 | 28 | 0.659341 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.065934 |
6dddfed29dba919369dee25697fc63339866499f | 12,754 | py | Python | gipf/GipfLogic.py | callix2/alphaZero-gipf | fd8dac7606611126d2d14beca0333b53bd5ee995 | [
"MIT"
] | null | null | null | gipf/GipfLogic.py | callix2/alphaZero-gipf | fd8dac7606611126d2d14beca0333b53bd5ee995 | [
"MIT"
] | null | null | null | gipf/GipfLogic.py | callix2/alphaZero-gipf | fd8dac7606611126d2d14beca0333b53bd5ee995 | [
"MIT"
] | null | null | null | '''
Author: Eric P. Nichols
Date: Feb 8, 2008.
Board class.
Board data:
1=white, -1=black, 0=empty
first dim is column , 2nd is row:
pieces[1][7] is the square in column 2,
at the opposite end of the board in row 8.
Squares are stored and manipulated as (x,y) tuples.
x is the column, y is the row.
'''
imp... | 36.130312 | 148 | 0.509644 | 12,421 | 0.973356 | 0 | 0 | 294 | 0.023039 | 0 | 0 | 4,306 | 0.337434 |
6dde1212ba406b7fb0a629963b918fa2448f2579 | 2,533 | py | Python | pcwg/reporting/colour.py | lcameron05/PCWG | 8ae8ea7d644aa5bec0d1651101d83d8f17994f4b | [
"MIT"
] | 14 | 2015-01-15T12:40:51.000Z | 2019-06-14T16:10:08.000Z | pcwg/reporting/colour.py | lzhiwen3090/PCWG | 795e3ea267c7b87187dce04721c91a9d9c7999a7 | [
"MIT"
] | 121 | 2015-01-06T11:31:25.000Z | 2018-05-29T21:13:23.000Z | pcwg/reporting/colour.py | lzhiwen3090/PCWG | 795e3ea267c7b87187dce04721c91a9d9c7999a7 | [
"MIT"
] | 26 | 2015-01-15T12:41:09.000Z | 2019-04-11T14:45:32.000Z | import xlwt
class ColourGradient:
def __init__(self, minimum, maximum, interval, book):
self.levels = {}
self.minimum = minimum
self.maximum = maximum
dataRange = maximum - minimum
steps = int(dataRange / interval) + 1
if (steps >= 4):
... | 32.474359 | 107 | 0.446901 | 2,519 | 0.994473 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.024477 |
6dde7cdccad8c45c7dc62586357016b68fc1ea28 | 2,044 | py | Python | mwlib/serve.py | h4ck3rm1k3/mwlib | 11475c6ad7480e35a4a59f276c47f6a5203435cc | [
"Unlicense"
] | 1 | 2019-04-27T20:14:53.000Z | 2019-04-27T20:14:53.000Z | mwlib/serve.py | h4ck3rm1k3/mwlib | 11475c6ad7480e35a4a59f276c47f6a5203435cc | [
"Unlicense"
] | null | null | null | mwlib/serve.py | h4ck3rm1k3/mwlib | 11475c6ad7480e35a4a59f276c47f6a5203435cc | [
"Unlicense"
] | null | null | null | #! /usr/bin/env python
"""WSGI server interface to mw-render and mw-zip/mw-post"""
import sys, os, time, re, shutil, StringIO
from hashlib import md5
from mwlib import myjson as json
from mwlib import log, _version
from mwlib.metabook import calc_checksum
log = log.Log('mwlib.serve')
collection_id_rex = re.compile(... | 28.788732 | 114 | 0.629159 | 0 | 0 | 279 | 0.136497 | 0 | 0 | 0 | 0 | 646 | 0.316047 |
6ddf22f66b957c8246b1badd12845d6735c4bf0d | 118 | py | Python | src/passport/use_cases/__init__.py | clayman-micro/passport | 37aeb548560458cd4ba9bf9db551e360ad219b9c | [
"MIT"
] | null | null | null | src/passport/use_cases/__init__.py | clayman-micro/passport | 37aeb548560458cd4ba9bf9db551e360ad219b9c | [
"MIT"
] | 5 | 2020-09-15T15:03:33.000Z | 2021-11-26T08:35:10.000Z | src/passport/use_cases/__init__.py | clayman74/passport | 37aeb548560458cd4ba9bf9db551e360ad219b9c | [
"MIT"
] | null | null | null | from aiohttp import web
class UseCase:
def __init__(self, app: web.Application) -> None:
self.app = app
| 16.857143 | 53 | 0.661017 | 91 | 0.771186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6ddf36ca544a3c8ccbf3d16260d57ec9db94a87c | 2,021 | py | Python | amap_distance_matrix/schemas/amap.py | Euraxluo/distance_matrix | 680e3147c263ea5f1abb26998aeb0b1985442a4b | [
"MIT"
] | 1 | 2022-03-15T06:47:36.000Z | 2022-03-15T06:47:36.000Z | amap_distance_matrix/schemas/amap.py | Euraxluo/distance_matrix | 680e3147c263ea5f1abb26998aeb0b1985442a4b | [
"MIT"
] | null | null | null | amap_distance_matrix/schemas/amap.py | Euraxluo/distance_matrix | 680e3147c263ea5f1abb26998aeb0b1985442a4b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Time: 2022-03-01 15:43
# Copyright (c) 2022
# author: Euraxluo
from typing import *
from amap_distance_matrix.helper import haversine,format_loc
class AMapDefaultResultRouteStep(object):
def __init__(self, start: str, end: str):
self.polyline: str
self.instruction = "到达途... | 29.720588 | 94 | 0.573973 | 1,871 | 0.910462 | 0 | 0 | 0 | 0 | 0 | 0 | 244 | 0.118735 |
6ddf53b03344bb1f12510f5ef0a187bb6b91724f | 1,589 | py | Python | linear_regression.py | michael-golfi/comp551_assignment1 | a4eb73bae4280d5934165ee8b8400dd1c24e9758 | [
"MIT"
] | null | null | null | linear_regression.py | michael-golfi/comp551_assignment1 | a4eb73bae4280d5934165ee8b8400dd1c24e9758 | [
"MIT"
] | null | null | null | linear_regression.py | michael-golfi/comp551_assignment1 | a4eb73bae4280d5934165ee8b8400dd1c24e9758 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import math
import csv
import datetime
AGE = "Age Category"
SEX = "Sex"
TIME = "Time"
OUTPUT_BASE = "output/"
COLS_X = [AGE, SEX, TIME, "TotalRaces"]
COLS_Y = [TIME]
#training data
TRAIN_X = "output/Y2X_train.csv"
TRAIN_Y = "output/Y2Y_train.csv"... | 17.086022 | 84 | 0.69163 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 306 | 0.192574 |
6de0dc175dbe4c23766558e81ec6b605bc401de8 | 185 | py | Python | problem_332/problem_332.py | oltionzefi/daily-coding-problem | 4fe3ec53e1f3c7d299849671fdfead462d548cd3 | [
"MIT"
] | null | null | null | problem_332/problem_332.py | oltionzefi/daily-coding-problem | 4fe3ec53e1f3c7d299849671fdfead462d548cd3 | [
"MIT"
] | null | null | null | problem_332/problem_332.py | oltionzefi/daily-coding-problem | 4fe3ec53e1f3c7d299849671fdfead462d548cd3 | [
"MIT"
] | null | null | null | def positive_integer_pairs(m, n):
results = list()
for a in range(m // 2 + 1 ):
b = m - a
if a ^ b == n:
results.append((a, b))
return results
| 18.5 | 34 | 0.475676 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6de2331479d616c60c982b16b354a172879db20e | 393 | py | Python | at_learner_core/at_learner_core/models/init_model.py | hieuvecto/CASIA-SURF_CeFA | 71dfd846ce968b3ed26974392a6e0c9b40aa12ae | [
"MIT"
] | 133 | 2020-03-03T03:58:04.000Z | 2022-03-28T21:42:36.000Z | at_learner_core/at_learner_core/models/init_model.py | lucaslu1987/CASIA-SURF_CeFA | 205d3d976523ed0c15d1e709ed7f21d50d7cf19b | [
"MIT"
] | 24 | 2020-03-13T09:30:09.000Z | 2022-03-22T07:47:15.000Z | at_learner_core/at_learner_core/models/init_model.py | lucaslu1987/CASIA-SURF_CeFA | 205d3d976523ed0c15d1e709ed7f21d50d7cf19b | [
"MIT"
] | 29 | 2020-03-10T06:46:45.000Z | 2022-01-29T15:35:21.000Z | from .wrappers import SimpleClassifierWrapper
def get_wrapper(config, wrapper_func=None):
if wrapper_func is not None:
wrapper = wrapper_func(config)
elif config.wrapper_config.wrapper_name == 'SimpleClassifierWrapper':
wrapper = SimpleClassifierWrapper(config.wrapper_config)
else:
... | 32.75 | 73 | 0.750636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.152672 |
6de2eb54f1f884015cd25862ba629bbde92b8312 | 11,739 | py | Python | register.py | khvmaths/Register_UM_Crawl | 2741bfe9267e9ad068b438b27141cfc664f140f2 | [
"MIT"
] | null | null | null | register.py | khvmaths/Register_UM_Crawl | 2741bfe9267e9ad068b438b27141cfc664f140f2 | [
"MIT"
] | null | null | null | register.py | khvmaths/Register_UM_Crawl | 2741bfe9267e9ad068b438b27141cfc664f140f2 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
from urllib.request import Request,urlopen
from urllib.error import HTTPError
from PyQt5 import QtCore, QtGui, QtWidgets, Qt
import sys
import threading
import datetime
import win32con
import os
import struct
import time
import pyttsx3
from win32api import *
from win32gui imp... | 43.639405 | 164 | 0.597155 | 10,961 | 0.933725 | 0 | 0 | 0 | 0 | 0 | 0 | 1,265 | 0.10776 |
6de329be760fa541cce9f8961d309f42264a1df3 | 1,604 | py | Python | tests/utils.py | ofek/hatch-containers | dd57acc812db8e62994f2b00160a05292d5f35c1 | [
"MIT"
] | 3 | 2021-12-29T06:44:41.000Z | 2022-02-28T09:27:20.000Z | tests/utils.py | ofek/hatch-containers | dd57acc812db8e62994f2b00160a05292d5f35c1 | [
"MIT"
] | null | null | null | tests/utils.py | ofek/hatch-containers | dd57acc812db8e62994f2b00160a05292d5f35c1 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021-present Ofek Lev <[email protected]>
#
# SPDX-License-Identifier: MIT
import subprocess
from textwrap import dedent as _dedent
import tomli
import tomli_w
def dedent(text):
return _dedent(text[1:])
def check_container_output(container_name, command):
return subprocess.check_output... | 30.846154 | 119 | 0.667082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 332 | 0.206983 |
6de4785de957dcd93698e538204a1309d3d31d03 | 881 | py | Python | Question Set 3 - (Functions)/Version 1/main.py | Randula98/Python-For-Beginners | e41a6014be882f01c6ccdcbe2167e2b581646eee | [
"MIT"
] | 6 | 2021-12-14T17:52:11.000Z | 2021-12-19T20:22:44.000Z | Question Set 3 - (Functions)/Version 1/main.py | GIHAA/Python-For-Beginners | e41a6014be882f01c6ccdcbe2167e2b581646eee | [
"MIT"
] | null | null | null | Question Set 3 - (Functions)/Version 1/main.py | GIHAA/Python-For-Beginners | e41a6014be882f01c6ccdcbe2167e2b581646eee | [
"MIT"
] | 2 | 2021-12-19T18:50:30.000Z | 2022-01-01T23:05:18.000Z |
#define calcIncrement function
def calcIncrement(salary , noOfYearsWorked):
if(noOfYearsWorked > 2):
increment = (salary * 10 / 100)
else:
increment = 0
return increment
#define calcTotalSalary function
def calcTotalSalary(salary , increment):
total = salary + increment
return tot... | 26.69697 | 71 | 0.732123 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 391 | 0.443814 |
6de4cb3c7c7e948bd05ee2500418fd79816b080a | 438 | py | Python | rubin_sim/maf/mafContrib/LSSObsStrategy/__init__.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | rubin_sim/maf/mafContrib/LSSObsStrategy/__init__.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | rubin_sim/maf/mafContrib/LSSObsStrategy/__init__.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | from .newDitherStackers import *
from .newDitherStackers import *
from .maskingAlgorithmGeneralized import *
from .saveBundleData_npzFormat import *
from .numObsMetric import *
from .galaxyCountsMetric_extended import *
from .galaxyCounts_withPixelCalibration import *
from .artificialStructureCalculation import *
from ... | 33.692308 | 48 | 0.835616 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6de56b62032d39a0f8c492c5d736fc6926aeb427 | 2,576 | py | Python | setup.py | vomaufgang/publish | 6e610c055118f9761d49962a12d9095cf2936386 | [
"MIT"
] | 1 | 2019-08-19T01:45:29.000Z | 2019-08-19T01:45:29.000Z | setup.py | vomaufgang/publish | 6e610c055118f9761d49962a12d9095cf2936386 | [
"MIT"
] | 11 | 2019-08-18T09:31:10.000Z | 2021-01-27T19:02:53.000Z | setup.py | vomaufgang/publish | 6e610c055118f9761d49962a12d9095cf2936386 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# anited. publish - Python package with cli to turn markdown files into ebooks
# Copyright (c) 2014 Christopher Knörndel
#
# Distributed under the MIT License
# (license terms are at http://opensource.org/licenses/MIT).
"""Setup script for easy_install and pip."""
impo... | 28 | 78 | 0.65295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,155 | 0.448022 |
6de715d666507e3f3849eece5131f4cb5a8c80e7 | 1,187 | py | Python | main.py | brunofornazari/tcc | 57990d68ca196b4da7791faab717d67cfe5497d3 | [
"Unlicense"
] | null | null | null | main.py | brunofornazari/tcc | 57990d68ca196b4da7791faab717d67cfe5497d3 | [
"Unlicense"
] | null | null | null | main.py | brunofornazari/tcc | 57990d68ca196b4da7791faab717d67cfe5497d3 | [
"Unlicense"
] | null | null | null | """
main.py
Main.py é responsável por iniciar o processo o programa completamente, através de duas threads, uma para manter o
servidor de aplicação via flask para poder receber requisições e comunicar com o cliente, seus processos estão
detalhados em server.py e outra thread para manter o fluxo da aplicação, baseado n... | 40.931034 | 117 | 0.795282 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 958 | 0.788477 |
6de7ad1350d5b902468a609df5d16498912264b6 | 1,347 | py | Python | examples/DGL/alagnn.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | 1 | 2020-07-29T08:00:32.000Z | 2020-07-29T08:00:32.000Z | examples/DGL/alagnn.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | null | null | null | examples/DGL/alagnn.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import random
import math
import torch
import dgl
import graphgallery
from graphgallery.datasets import Planetoid
print("GraphGallery version: ", graphgallery.__version__)
print("PyTorch version: ", torch.__version__)
print("DGL version: ", dgl.__version__)
'''
Load Datasets
- co... | 32.071429 | 83 | 0.76095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 499 | 0.370453 |
6de7d2a8bf2473e87c45ac2498b9443dac0b4f4e | 125 | py | Python | packit_service/service/api/errors.py | majamassarini/packit-service | 12baf67799412c8fa56e2a821cd9d584e2437141 | [
"MIT"
] | 20 | 2019-05-24T12:33:05.000Z | 2020-07-28T06:03:57.000Z | packit_service/service/api/errors.py | majamassarini/packit-service | 12baf67799412c8fa56e2a821cd9d584e2437141 | [
"MIT"
] | 735 | 2019-05-15T11:52:36.000Z | 2020-08-02T23:21:44.000Z | packit_service/service/api/errors.py | majamassarini/packit-service | 12baf67799412c8fa56e2a821cd9d584e2437141 | [
"MIT"
] | 28 | 2019-05-16T13:32:03.000Z | 2020-07-29T10:23:54.000Z | # Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
class ValidationFailed(Exception):
pass
| 17.857143 | 47 | 0.776 | 43 | 0.344 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.616 |
6dea6c9087b914af198d695841147682ba1f18e7 | 1,453 | py | Python | garden_test/setup.py | jad-b/garden | 44169c57fdaa08e0edd751d7459da99334e97323 | [
"MIT"
] | null | null | null | garden_test/setup.py | jad-b/garden | 44169c57fdaa08e0edd751d7459da99334e97323 | [
"MIT"
] | null | null | null | garden_test/setup.py | jad-b/garden | 44169c57fdaa08e0edd751d7459da99334e97323 | [
"MIT"
] | null | null | null | import subprocess
import os
from setuptools import setup, find_packages
def readme():
with open('README.md') as _file:
return _file.read()
def requirements():
reqs_file = 'reqs.txt'
if os.path.isfile(reqs_file):
with open('reqs.txt') as reqs:
return [line.strip() for line in ... | 26.907407 | 70 | 0.618032 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 477 | 0.328286 |
6dea9c8146d56fa2b4a9cdd2da0bad21ab08f14c | 1,078 | py | Python | test/solutions/test_checkout.py | DPNT-Sourcecode/CHK-mxxq01 | 85be1ef3e87a6490d1490b64596de25d7e3cb60e | [
"Apache-2.0"
] | null | null | null | test/solutions/test_checkout.py | DPNT-Sourcecode/CHK-mxxq01 | 85be1ef3e87a6490d1490b64596de25d7e3cb60e | [
"Apache-2.0"
] | null | null | null | test/solutions/test_checkout.py | DPNT-Sourcecode/CHK-mxxq01 | 85be1ef3e87a6490d1490b64596de25d7e3cb60e | [
"Apache-2.0"
] | null | null | null | import unittest
from lib.solutions.checkout import checkout
class TestSum(unittest.TestCase):
def test_checkout(self):
self.assertEqual(checkout("ABC"), 50+30+20)
self.assertEqual(checkout("ABCCCD"), 50+30+20*3+15)
self.assertEqual(checkout("AAA"), 130)
self.assertEqual(checkout("... | 35.933333 | 59 | 0.646568 | 966 | 0.896104 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.115028 |
6deb927562ea3e9179ad55bccae3b4caee1a3331 | 338 | py | Python | libs/imagemetadata.py | epinux/labelImg | a4002eb771f9c82b703a3fcd0b554e0030bf24e7 | [
"MIT"
] | null | null | null | libs/imagemetadata.py | epinux/labelImg | a4002eb771f9c82b703a3fcd0b554e0030bf24e7 | [
"MIT"
] | null | null | null | libs/imagemetadata.py | epinux/labelImg | a4002eb771f9c82b703a3fcd0b554e0030bf24e7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from libs.imagemetadata_ui import Ui_imagemetadata
class ImageMetadata(QWidget, Ui_imagemetadata):
def __init__(self, parent=None):
super(ImageMetadata, self).__init__(parent)
s... | 18.777778 | 51 | 0.745562 | 163 | 0.482249 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.06213 |
6debe89876c11c370db73006de84c2358493d8ef | 19,992 | py | Python | test/coco_save.py | ZCDu/CenternessNet | 03f5d01999a4e1595eaceef9f62b4450ed017843 | [
"MIT"
] | null | null | null | test/coco_save.py | ZCDu/CenternessNet | 03f5d01999a4e1595eaceef9f62b4450ed017843 | [
"MIT"
] | null | null | null | test/coco_save.py | ZCDu/CenternessNet | 03f5d01999a4e1595eaceef9f62b4450ed017843 | [
"MIT"
] | null | null | null | import os
import cv2
import pdb
import json
import copy
import numpy as np
import torch
from PIL import Image, ImageDraw, ImageFont
import matplotlib.pyplot as plt
import matplotlib
import math
from tqdm import tqdm
from config import system_configs
from utils import crop_image, normalize_
from external.nms import so... | 42.626866 | 89 | 0.456633 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,612 | 0.180672 |
6dec0625c10c417a63b087f29b4b429210299d04 | 752 | py | Python | lcd/interrupts/interrupt2.py | BornToDebug/homeStruction | 354e03c05cb363d8397d0e2d7afeb78a029266f9 | [
"Apache-2.0"
] | 6 | 2016-08-31T16:46:54.000Z | 2017-09-15T19:34:30.000Z | lcd/interrupts/interrupt2.py | BornToDebug/homeStruction | 354e03c05cb363d8397d0e2d7afeb78a029266f9 | [
"Apache-2.0"
] | 4 | 2016-09-02T09:18:41.000Z | 2016-09-02T09:24:08.000Z | lcd/interrupts/interrupt2.py | BornToDebug/homeStruction | 354e03c05cb363d8397d0e2d7afeb78a029266f9 | [
"Apache-2.0"
] | null | null | null | import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(24, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
#now we'll define the threaded callback function
#this will run in another threadwhen our event is detected
def my_callback(channel):
print "Rising edge detected on po... | 30.08 | 76 | 0.772606 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 348 | 0.462766 |
6dee89b3a35ae4ccdd9553002d458259723951b4 | 31,184 | py | Python | Apps/polls/Views/CourseArrangement.py | shadowofgost/WebEngineering | 693af827e3458806cdace959262cf393d29f6504 | [
"Apache-2.0"
] | 1 | 2021-04-05T05:40:17.000Z | 2021-04-05T05:40:17.000Z | Apps/polls/Views/CourseArrangement.py | shadowofgost/WebEngineering | 693af827e3458806cdace959262cf393d29f6504 | [
"Apache-2.0"
] | null | null | null | Apps/polls/Views/CourseArrangement.py | shadowofgost/WebEngineering | 693af827e3458806cdace959262cf393d29f6504 | [
"Apache-2.0"
] | null | null | null |
from django.http import HttpResponse
from django.db.models import Q
from drf_yasg.utils import swagger_auto_schema
from drf_yasg.openapi import Parameter, Schema, Response, TYPE_INTEGER, TYPE_OBJECT, TYPE_STRING, IN_QUERY
from json import dumps
from .. import models
from .Public import responses_success, responses_fa... | 38.594059 | 455 | 0.536942 | 33,228 | 0.982147 | 0 | 0 | 18,741 | 0.553943 | 0 | 0 | 10,356 | 0.306101 |
6def8fbc025a4ae631780ed754a16d15160b7b0b | 6,514 | py | Python | knx_stack/client/knxnet_ip_discovery.py | majamassarini/knx-stack | 11a9baac6b7600649b5fbca43c93b200b23676b4 | [
"MIT"
] | 2 | 2021-07-28T07:42:28.000Z | 2022-01-25T18:56:05.000Z | knx_stack/client/knxnet_ip_discovery.py | majamassarini/knx-stack | 11a9baac6b7600649b5fbca43c93b200b23676b4 | [
"MIT"
] | 6 | 2021-07-25T21:36:01.000Z | 2022-02-20T21:11:31.000Z | knx_stack/client/knxnet_ip_discovery.py | majamassarini/knx-stack | 11a9baac6b7600649b5fbca43c93b200b23676b4 | [
"MIT"
] | null | null | null | import struct
import socket
import asyncio
import logging
import knx_stack
class Request(asyncio.DatagramProtocol):
def __init__(self, local_addr: str, local_port: int):
"""
A KNXnet IP Discovery request service
:param local_addr: discovery request instance host ip address
:param... | 34.648936 | 120 | 0.642462 | 4,776 | 0.73319 | 0 | 0 | 0 | 0 | 961 | 0.147528 | 2,577 | 0.395609 |
6defac8f1015dd7e947197dcda96dec8473101d6 | 199 | py | Python | autodisc/representations/static/pytorchnnrepresentation/models/__init__.py | flowersteam/holmes | e38fb8417ec56cfde8142eddd0f751e319e35d8c | [
"MIT"
] | 6 | 2020-12-19T00:16:16.000Z | 2022-01-28T14:59:21.000Z | autodisc/representations/static/pytorchnnrepresentation/models/__init__.py | Evolutionary-Intelligence/holmes | e38fb8417ec56cfde8142eddd0f751e319e35d8c | [
"MIT"
] | null | null | null | autodisc/representations/static/pytorchnnrepresentation/models/__init__.py | Evolutionary-Intelligence/holmes | e38fb8417ec56cfde8142eddd0f751e319e35d8c | [
"MIT"
] | 1 | 2021-05-24T14:58:26.000Z | 2021-05-24T14:58:26.000Z | from autodisc.representations.static.pytorchnnrepresentation.models.encoders import EncoderBurgess
from autodisc.representations.static.pytorchnnrepresentation.models.decoders import DecoderBurgess
| 49.75 | 98 | 0.904523 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6defdfc013df6a621f25fd5ffba934ad58dd3acd | 3,312 | py | Python | lights.py | team-7108/computer-vision-tutorials | cfb7e455b5d8bba8779c440907344d9763573f57 | [
"MIT"
] | 3 | 2018-09-12T02:56:46.000Z | 2020-11-13T13:48:44.000Z | lights.py | team-7108/computer-vision-tutorials | cfb7e455b5d8bba8779c440907344d9763573f57 | [
"MIT"
] | null | null | null | lights.py | team-7108/computer-vision-tutorials | cfb7e455b5d8bba8779c440907344d9763573f57 | [
"MIT"
] | 1 | 2020-11-13T13:48:45.000Z | 2020-11-13T13:48:45.000Z | # Import OpenCV module
import cv2
# Import numpy for array operations
import numpy as np
image = cv2.imread('images/five_cubes.jpeg')
# Show the image
cv2.imshow('Image',image)
# Resize the image if it is too big, also helps to speed up the processing
image = cv2.resize(image, (600, 600))
cv2.imshow('Resized Image'... | 35.234043 | 128 | 0.679348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,106 | 0.333937 |
6df0403cfe638d0fa7c9fc0942bb17cdd38113df | 569 | py | Python | exastics/publish_github_api_releases.py | exastro-suite/exastics | de6193159943319333abc2688f543e7424810823 | [
"Apache-2.0"
] | null | null | null | exastics/publish_github_api_releases.py | exastro-suite/exastics | de6193159943319333abc2688f543e7424810823 | [
"Apache-2.0"
] | 1 | 2020-10-25T08:30:59.000Z | 2020-10-25T08:30:59.000Z | exastics/publish_github_api_releases.py | exastro-suite/exastics | de6193159943319333abc2688f543e7424810823 | [
"Apache-2.0"
] | 8 | 2020-10-09T13:11:08.000Z | 2021-11-04T06:26:27.000Z | import exastics.collect
import pathlib
import sys
import urllib.parse
if __name__ == '__main__':
github_account = sys.argv[1]
github_repository = sys.argv[2]
url_parts = (
'https',
'api.github.com',
urllib.parse.quote(f'/repos/{github_account}/{github_repository}/releases'),
... | 21.074074 | 84 | 0.630931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 151 | 0.265378 |
6df0ee5285eb665d18e287fcf75e62d896c148dd | 1,471 | py | Python | cohesity_management_sdk/models/rpo_schedule.py | sachinthakare-cohesity/management-sdk-python | c95f67b7d387d5bab8392be43190e598280ae7b5 | [
"MIT"
] | null | null | null | cohesity_management_sdk/models/rpo_schedule.py | sachinthakare-cohesity/management-sdk-python | c95f67b7d387d5bab8392be43190e598280ae7b5 | [
"MIT"
] | null | null | null | cohesity_management_sdk/models/rpo_schedule.py | sachinthakare-cohesity/management-sdk-python | c95f67b7d387d5bab8392be43190e598280ae7b5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
class RPOSchedule(object):
"""Implementation of the 'RPO Schedule.' model.
Specifies an RPO Schedule.
Attributes:
rpo_inteval_minutes (long|int): If this field is set, then at any
point, a recovery point should be available not ... | 26.745455 | 81 | 0.633583 | 1,411 | 0.959211 | 0 | 0 | 721 | 0.490143 | 0 | 0 | 997 | 0.67777 |
6df1040ee952e6ce1e567165568234bfbe1f725c | 5,834 | py | Python | Gh compilation files/text.py | ibois-epfl/Manis-timber-plate-joinery-solver | fecdb1dfe23348de261f034f85baf24ac396e8cc | [
"MIT"
] | 3 | 2021-10-19T11:55:59.000Z | 2022-02-04T15:29:04.000Z | Gh compilation files/text.py | ibois-epfl/Manis-timber-plate-joinery-solver | fecdb1dfe23348de261f034f85baf24ac396e8cc | [
"MIT"
] | null | null | null | Gh compilation files/text.py | ibois-epfl/Manis-timber-plate-joinery-solver | fecdb1dfe23348de261f034f85baf24ac396e8cc | [
"MIT"
] | null | null | null | """Export a text file."""
from ghpythonlib.componentbase import dotnetcompiledcomponent as component
import Grasshopper, GhPython
import System
import os
import datetime
__author__ = "Nicolas Rogeau"
__laboratory__ = "IBOIS, Laboratory for Timber Construction"
__university__ = "EPFL, Ecole Polytechnique Fe... | 38.130719 | 343 | 0.594961 | 5,407 | 0.926808 | 0 | 0 | 0 | 0 | 0 | 0 | 1,315 | 0.225403 |
6df14879b950933abacc38dea90c26ad6c6515c2 | 97 | py | Python | component_tests/tests/features/steps/__init__.py | Cobalt0s/sommelier | d64943a5d7be4ecdf08aa18e9f184b757e408425 | [
"MIT"
] | null | null | null | component_tests/tests/features/steps/__init__.py | Cobalt0s/sommelier | d64943a5d7be4ecdf08aa18e9f184b757e408425 | [
"MIT"
] | null | null | null | component_tests/tests/features/steps/__init__.py | Cobalt0s/sommelier | d64943a5d7be4ecdf08aa18e9f184b757e408425 | [
"MIT"
] | null | null | null | from sommelier.steps.response_processing import *
from sommelier.steps.event_processing import *
| 32.333333 | 49 | 0.85567 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6df14ec0665b31a613e368f74d43196adfd0df56 | 877 | py | Python | setup.py | anthonytw/dutyroll | 489dd452ba614a2214756eba0831b33111187225 | [
"MIT"
] | 2 | 2019-01-22T20:44:03.000Z | 2019-11-30T07:59:32.000Z | setup.py | anthonytw/dutyroll | 489dd452ba614a2214756eba0831b33111187225 | [
"MIT"
] | null | null | null | setup.py | anthonytw/dutyroll | 489dd452ba614a2214756eba0831b33111187225 | [
"MIT"
] | null | null | null | import sys
from packaging.version import LegacyVersion
from skbuild.exceptions import SKBuildError
from skbuild.cmaker import get_cmake_version
from skbuild import setup
setup_requires = []
# Require pytest-runner only when running tests.
if any(arg in sys.argv for arg in ('pytest', 'test')):
setup_requires.append(... | 28.290323 | 85 | 0.733181 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 315 | 0.359179 |
6df1e73647be403745ebe4c69e672889f9a73f91 | 162 | py | Python | obdlive/obd/urls.py | hoke-t/OBDLive | 524fb53fad5924b8371d2fce8d7a482bd8112362 | [
"MIT"
] | 8 | 2018-12-15T16:41:21.000Z | 2021-10-03T21:19:11.000Z | obdlive/obd/urls.py | hoke-t/OBDLive | 524fb53fad5924b8371d2fce8d7a482bd8112362 | [
"MIT"
] | null | null | null | obdlive/obd/urls.py | hoke-t/OBDLive | 524fb53fad5924b8371d2fce8d7a482bd8112362 | [
"MIT"
] | 1 | 2020-07-27T18:15:58.000Z | 2020-07-27T18:15:58.000Z | from django.urls import path
from . import views
urlpatterns = [
path('', views.dashboard, name='dashboard'),
path('dtcs/', views.dtcs, name='dtcs'),
]
| 18 | 48 | 0.654321 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.160494 |
6df2b3c71a785d6478f03f2023bb542307a17b8f | 1,195 | py | Python | crits/locations/forms.py | dutrow/crits | 6b357daa5c3060cf622d3a3b0c7b41a9ca69c049 | [
"MIT"
] | 738 | 2015-01-02T12:39:55.000Z | 2022-03-23T11:05:51.000Z | crits/locations/forms.py | deadbits/crits | 154097a1892e9d3960d6faaed4bd2e912a196a47 | [
"MIT"
] | 605 | 2015-01-01T01:03:39.000Z | 2021-11-17T18:51:07.000Z | crits/locations/forms.py | deadbits/crits | 154097a1892e9d3960d6faaed4bd2e912a196a47 | [
"MIT"
] | 316 | 2015-01-07T12:35:01.000Z | 2022-03-30T04:44:30.000Z | from django import forms
from crits.locations.location import Location
from crits.core.handlers import get_item_names
class AddLocationForm(forms.Form):
"""
Django form for adding a location to a TLO.
The list of names comes from :func:`get_item_names`.
"""
error_css_class = 'error'
required... | 34.142857 | 73 | 0.650209 | 1,074 | 0.898745 | 0 | 0 | 0 | 0 | 0 | 0 | 250 | 0.209205 |
6df4ba8add8eb7e8c911008f72f03e4dab32f5ab | 3,641 | py | Python | utils/utils_preprocess_v3.py | microsoft/normalized_trend_filtering | eb73f124243dfc3dc610abba35a3ad1a6303a227 | [
"MIT"
] | 2 | 2021-09-06T14:04:17.000Z | 2021-11-09T11:55:10.000Z | utils/utils_preprocess_v3.py | microsoft/normalized_trend_filtering | eb73f124243dfc3dc610abba35a3ad1a6303a227 | [
"MIT"
] | null | null | null | utils/utils_preprocess_v3.py | microsoft/normalized_trend_filtering | eb73f124243dfc3dc610abba35a3ad1a6303a227 | [
"MIT"
] | 1 | 2021-11-10T11:44:36.000Z | 2021-11-10T11:44:36.000Z | import pandas as pd
import numpy as np
import sys
import os
import itertools
import pandas as pd
import os
from tqdm import tqdm_notebook, tnrange
import numpy as np
import networkx as nx
import seaborn as sns
import matplotlib.pyplot as plt
from scipy.optimize import minimize
import scipy
from sklearn import linear_... | 31.119658 | 109 | 0.762703 | 853 | 0.234276 | 0 | 0 | 0 | 0 | 0 | 0 | 701 | 0.19253 |
6df5916ec657908f3c7be4eae54758a97075100c | 791 | py | Python | server.py | marwano/remoterobot | 80409bde8e20de2b9fe97a8f214295aa5290decd | [
"BSD-3-Clause"
] | 1 | 2019-05-26T10:41:07.000Z | 2019-05-26T10:41:07.000Z | server.py | marwano/remoterobot | 80409bde8e20de2b9fe97a8f214295aa5290decd | [
"BSD-3-Clause"
] | 1 | 2018-02-28T23:47:23.000Z | 2018-02-28T23:47:23.000Z | server.py | marwano/remoterobot | 80409bde8e20de2b9fe97a8f214295aa5290decd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import tornado.ioloop
import tornado.web
import json
import logging
from uf.wrapper.swift_api import SwiftAPI
class MainHandler(tornado.web.RequestHandler):
def initialize(self, swift):
self.swift = swift
def post(self):
data = json.loads(self.request.body.decode())
... | 25.516129 | 77 | 0.667509 | 360 | 0.45512 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.096081 |
6df62870aa4daf08157f0c702682542e2f8979fe | 2,765 | py | Python | open/core/betterself/serializers/daily_productivity_log_serializers.py | lawrendran/open | d136f694bafab647722c78be6f39ec79d589f774 | [
"MIT"
] | 105 | 2019-06-01T08:34:47.000Z | 2022-03-15T11:48:36.000Z | open/core/betterself/serializers/daily_productivity_log_serializers.py | lawrendran/open | d136f694bafab647722c78be6f39ec79d589f774 | [
"MIT"
] | 111 | 2019-06-04T15:34:14.000Z | 2022-03-12T21:03:20.000Z | open/core/betterself/serializers/daily_productivity_log_serializers.py | lawrendran/open | d136f694bafab647722c78be6f39ec79d589f774 | [
"MIT"
] | 26 | 2019-09-04T06:06:12.000Z | 2022-01-03T03:40:11.000Z | from rest_framework.exceptions import ValidationError
from rest_framework.fields import DateField, ChoiceField, CharField
from open.core.betterself.constants import (
BETTERSELF_LOG_INPUT_SOURCES,
WEB_INPUT_SOURCE,
)
from open.core.betterself.models.daily_productivity_log import DailyProductivityLog
from open.... | 31.420455 | 88 | 0.654973 | 2,146 | 0.77613 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.208318 |
6df6536077ead8b5315b04728d254740d08d1ea8 | 5,423 | py | Python | twitch_bot.py | VDK45/Arkanoid_audio_command_for_twitch | 178a30fe85d3db5b4da127ee3de0c60dc8b0873d | [
"MIT"
] | null | null | null | twitch_bot.py | VDK45/Arkanoid_audio_command_for_twitch | 178a30fe85d3db5b4da127ee3de0c60dc8b0873d | [
"MIT"
] | null | null | null | twitch_bot.py | VDK45/Arkanoid_audio_command_for_twitch | 178a30fe85d3db5b4da127ee3de0c60dc8b0873d | [
"MIT"
] | null | null | null | import random
import cfg
import utils
import socket
import re
import time
from time import sleep
import sys
try:
file_c = open('chanel.txt', 'r', encoding='utf-8')
CHANEL = file_c.read()
print(f'chanel = {CHANEL}')
file_c.close()
except IOError as err:
print('Please enter your CHANEL!')
print(... | 32.088757 | 116 | 0.491425 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,414 | 0.25214 |
6df6c6b55d592803eb12aa9541c59df303c76397 | 155 | py | Python | app/core/urls.py | kmnkit/web-todo | e06e42f5b68b2b9473fad820857634a9c5c0dadf | [
"MIT"
] | null | null | null | app/core/urls.py | kmnkit/web-todo | e06e42f5b68b2b9473fad820857634a9c5c0dadf | [
"MIT"
] | null | null | null | app/core/urls.py | kmnkit/web-todo | e06e42f5b68b2b9473fad820857634a9c5c0dadf | [
"MIT"
] | null | null | null | from django.urls import path
from teams.views import TeamListView
app_name = "core"
urlpatterns = [
path("", TeamListView.as_view(), name="home"),
]
| 17.222222 | 50 | 0.709677 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.090323 |
6df927163bf069ad2144fb5439fa950c5da79469 | 1,409 | py | Python | Sources/Mavsdk/proto/pb_plugins/setup.py | obe711/MAVSDK-Swift | 3ed35bbb57754824f8235f9acf828c73cc10b72b | [
"BSD-3-Clause"
] | null | null | null | Sources/Mavsdk/proto/pb_plugins/setup.py | obe711/MAVSDK-Swift | 3ed35bbb57754824f8235f9acf828c73cc10b72b | [
"BSD-3-Clause"
] | null | null | null | Sources/Mavsdk/proto/pb_plugins/setup.py | obe711/MAVSDK-Swift | 3ed35bbb57754824f8235f9acf828c73cc10b72b | [
"BSD-3-Clause"
] | null | null | null | import os
import subprocess
import sys
from distutils.command.build import build
from distutils.spawn import find_executable
from setuptools import setup
def parse_requirements(filename):
"""
Helper which parses requirement_?.*.txt files
:param filename: relative path, e.g. `./requirements.txt`
:retu... | 27.627451 | 65 | 0.66785 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 672 | 0.476934 |
6df9c4e9ea68c87b17ca398c46b4ce7c864d776d | 109 | py | Python | src/osms/tts_modules/synthesizer/data/__init__.py | adasegroup/OSM---one-shot-multispeaker | 90c1bbea4db1d49667fcfecb51676ee3281f9458 | [
"MIT"
] | 12 | 2021-05-31T21:09:23.000Z | 2022-01-30T03:48:10.000Z | src/osms/tts_modules/synthesizer/data/__init__.py | adasegroup/OSM---one-shot-multispeaker | 90c1bbea4db1d49667fcfecb51676ee3281f9458 | [
"MIT"
] | null | null | null | src/osms/tts_modules/synthesizer/data/__init__.py | adasegroup/OSM---one-shot-multispeaker | 90c1bbea4db1d49667fcfecb51676ee3281f9458 | [
"MIT"
] | 6 | 2021-05-13T20:28:19.000Z | 2021-09-28T10:24:31.000Z | from .preprocess import SynthesizerPreprocessor
from .dataset import SynthesizerDataset, collate_synthesizer
| 36.333333 | 60 | 0.889908 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6df9c88395294e4e4698984383fb2662d33b928e | 2,617 | py | Python | qtum_bridge/R8Blockchain/ethereumblockchain.py | Robin8Put/pmes | 338bec94162098f05b75bad035417317e1252fd2 | [
"Apache-2.0"
] | 5 | 2018-07-31T07:37:09.000Z | 2019-05-27T04:40:38.000Z | eth_bridge/R8Blockchain/ethereumblockchain.py | Robin8Put/pmes | 338bec94162098f05b75bad035417317e1252fd2 | [
"Apache-2.0"
] | 4 | 2018-08-01T11:11:54.000Z | 2022-03-11T23:20:53.000Z | qtum_bridge/R8Blockchain/ethereumblockchain.py | Robin8Put/pmes | 338bec94162098f05b75bad035417317e1252fd2 | [
"Apache-2.0"
] | 5 | 2018-06-09T07:42:04.000Z | 2018-12-28T21:15:52.000Z | from web3 import Web3, IPCProvider, HTTPProvider
from web3.middleware import geth_poa_middleware
from R8Blockchain.blockchain_handler import BlockchainHandler
from hashlib import sha256
import codecs
from web3.contract import ConciseContract
class EthereumBlockchain(BlockchainHandler):
def __init__(self, eth_rpc)... | 30.788235 | 104 | 0.704241 | 2,004 | 0.765762 | 0 | 0 | 212 | 0.081009 | 0 | 0 | 83 | 0.031716 |
6dfaa0aa70efb8bfb33be6b88963dc80e3e7eb1f | 73 | py | Python | vis/test.py | Nathansong/OpenPCDdet-annotated | 2ca2239f3cd5cba8308b1be0744d541be4ff5093 | [
"Apache-2.0"
] | 4 | 2022-02-22T01:18:25.000Z | 2022-03-28T13:30:11.000Z | vis/test.py | Nathansong/OpenPCDdet-annotated | 2ca2239f3cd5cba8308b1be0744d541be4ff5093 | [
"Apache-2.0"
] | 1 | 2022-03-02T03:42:52.000Z | 2022-03-02T03:42:52.000Z | vis/test.py | Nathansong/OpenPCDdet-annotated | 2ca2239f3cd5cba8308b1be0744d541be4ff5093 | [
"Apache-2.0"
] | null | null | null |
path = "/home/nathan/OpenPCDet/data/kitti/training/velodyne/000000.bin" | 24.333333 | 71 | 0.780822 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.876712 |
6dfb865d03b79b2e933642d474e469577e44cc93 | 690 | py | Python | count.py | sunray97/countrows_excel | 7a95e0f6901051942615c6c16d15fee8e6fd4ded | [
"MIT"
] | null | null | null | count.py | sunray97/countrows_excel | 7a95e0f6901051942615c6c16d15fee8e6fd4ded | [
"MIT"
] | null | null | null | count.py | sunray97/countrows_excel | 7a95e0f6901051942615c6c16d15fee8e6fd4ded | [
"MIT"
] | null | null | null | import xlrd
import os
import sys
# rootdir = 'D:/工作/code/electric/'
rootdir = sys.argv[1]
xlrd.Book.encoding = "gbk"
sumnum=0
filenum = 0
list = os.listdir(rootdir) #列出文件夹下所有的目录与文件
for i in range(0,len(list)):
path = os.path.join(rootdir,list[i])
if os.path.isfile(path):
print('正在处理:'+path)
data... | 28.75 | 90 | 0.571014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.339096 |
6dfbe53d06b44a62a35e17a43905a5b258b2a411 | 1,442 | py | Python | 0_mesh2html/preprocess_segments.py | ygCoconut/volume2stl | bd95fc39620afd21ce08c8c805ac213583d9daaa | [
"MIT"
] | null | null | null | 0_mesh2html/preprocess_segments.py | ygCoconut/volume2stl | bd95fc39620afd21ce08c8c805ac213583d9daaa | [
"MIT"
] | null | null | null | 0_mesh2html/preprocess_segments.py | ygCoconut/volume2stl | bd95fc39620afd21ce08c8c805ac213583d9daaa | [
"MIT"
] | null | null | null | '''
0 Preprocess segments:
-
- specify segments you want to process
- dilate slightly the segments
- create mask for dilation.
- np.unique(my_masked_id) --> select only part with biggest uc
- eliminates ouliers too disconnected/far from main structure
'''
import numpy as np
import h5py
from scipy.ndimage import binar... | 27.730769 | 78 | 0.640777 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 615 | 0.426491 |
6dfdee78a36f76a22a8222a5f71ca90b9c824b58 | 2,665 | py | Python | branch/runner.py | sahibsin/Pruning | acc1db31c19c8b23599950cec4fe6399513ed306 | [
"MIT"
] | null | null | null | branch/runner.py | sahibsin/Pruning | acc1db31c19c8b23599950cec4fe6399513ed306 | [
"MIT"
] | null | null | null | branch/runner.py | sahibsin/Pruning | acc1db31c19c8b23599950cec4fe6399513ed306 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
from dataclasses import dataclass
import sys
from cli import arg_utils
from foundations.runner import Runner
from branch impor... | 36.013514 | 119 | 0.643152 | 2,317 | 0.869418 | 0 | 0 | 2,289 | 0.858912 | 0 | 0 | 705 | 0.26454 |
6dff005711decae58a77ac5da887759206c11424 | 946 | py | Python | wulinfeng/L3/WordDic/AQICity.py | qsyPython/Python_play_now | 278b6d5d30082f8f93b26902c854737c4919405a | [
"MIT"
] | 2 | 2018-03-29T08:26:17.000Z | 2019-06-17T10:56:19.000Z | wulinfeng/L3/WordDic/AQICity.py | qsyPython/Python_play_now | 278b6d5d30082f8f93b26902c854737c4919405a | [
"MIT"
] | 1 | 2022-03-22T20:26:08.000Z | 2022-03-22T20:26:08.000Z | wulinfeng/L3/WordDic/AQICity.py | qsyPython/Python_play_now | 278b6d5d30082f8f93b26902c854737c4919405a | [
"MIT"
] | 1 | 2019-02-18T10:44:20.000Z | 2019-02-18T10:44:20.000Z | import requests # 导入requests 库
from bs4 import BeautifulSoup
import urllib.error
import re
class AQICityClass(object):
def cityAQI(self,url,cityName,header={}):
try:
urlName = url + cityName + '.html'
r = requests.get(urlName, header)
except urllib.error.URLError... | 32.62069 | 64 | 0.524313 | 924 | 0.90411 | 0 | 0 | 0 | 0 | 0 | 0 | 200 | 0.195695 |
6dff00eda6e7e13b33088c5ae46ed97a3a4cc3ce | 1,464 | py | Python | setup.py | hiradyazdan/nginx-amplify-agent-health-check | 7aa0fa2aba082491b1b47c2b6189a9266245f647 | [
"MIT"
] | 2 | 2018-05-23T17:34:28.000Z | 2018-07-09T21:55:53.000Z | setup.py | hiradyazdan/nginx-amplify-agent-health-check | 7aa0fa2aba082491b1b47c2b6189a9266245f647 | [
"MIT"
] | null | null | null | setup.py | hiradyazdan/nginx-amplify-agent-health-check | 7aa0fa2aba082491b1b47c2b6189a9266245f647 | [
"MIT"
] | null | null | null | from setuptools import setup
classifiers = [
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX'
] + [
('Programming Language :: Python :: %s' % x)
for x in '2.7'.split()
]
test_requirements = [
'pytest',
'pytest-cov',
'coveralls',
... | 24 | 84 | 0.623634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 704 | 0.480874 |
6dff3f59a4fe7a48fffadc9f63e01aeba249b8e0 | 580 | py | Python | koodous/exceptions.py | Koodous/python-sdk | 987a8d48d1fb1ba599375dc55cb2d283a8cd34c8 | [
"Apache-2.0"
] | 19 | 2016-11-24T06:13:20.000Z | 2021-07-02T05:06:38.000Z | koodous/exceptions.py | Koodous/python-sdk | 987a8d48d1fb1ba599375dc55cb2d283a8cd34c8 | [
"Apache-2.0"
] | 18 | 2015-12-05T14:09:24.000Z | 2021-06-07T11:55:53.000Z | koodous/exceptions.py | Koodous/python-sdk | 987a8d48d1fb1ba599375dc55cb2d283a8cd34c8 | [
"Apache-2.0"
] | 10 | 2015-12-04T20:01:53.000Z | 2020-12-02T07:30:03.000Z | class ApiException(Exception):
"""Koodous API base class."""
class ApiUnauthorizedException(ApiException):
"""Exception when is made a request without the correct token or insufficient privileges."""
class FeedException(ApiException):
"""Base class for the feed exceptions."""
class FeedPackageExceptio... | 25.217391 | 96 | 0.743103 | 564 | 0.972414 | 0 | 0 | 0 | 0 | 0 | 0 | 300 | 0.517241 |
6dff73cffaed94db5cb5e75fb80b3961ad0f9146 | 1,005 | py | Python | pybatfish/datamodel/aspath.py | li-ch/pybatfish | d406f87a2bdd8d3beb92dc1baa9a5c8d63391879 | [
"Apache-2.0"
] | 1 | 2019-05-09T13:00:39.000Z | 2019-05-09T13:00:39.000Z | pybatfish/datamodel/aspath.py | li-ch/pybatfish | d406f87a2bdd8d3beb92dc1baa9a5c8d63391879 | [
"Apache-2.0"
] | null | null | null | pybatfish/datamodel/aspath.py | li-ch/pybatfish | d406f87a2bdd8d3beb92dc1baa9a5c8d63391879 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Batfish Open Source Project
#
# 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 requi... | 35.892857 | 76 | 0.664677 | 372 | 0.370149 | 0 | 0 | 0 | 0 | 0 | 0 | 662 | 0.658706 |
6dffaf2548225e608c4b2975db6390a9dca03d10 | 2,849 | py | Python | sherlock_scripts/pythonhops/sherlock_combine_restarts.py | apoletayev/anomalous_ion_conduction | badb91e971e4a5263a433cfa9fcbf914d53ed2a1 | [
"MIT"
] | 2 | 2021-05-20T03:49:51.000Z | 2021-06-21T08:41:10.000Z | sherlock_scripts/pythonhops/sherlock_combine_restarts.py | apoletayev/anomalous_ion_conduction | badb91e971e4a5263a433cfa9fcbf914d53ed2a1 | [
"MIT"
] | null | null | null | sherlock_scripts/pythonhops/sherlock_combine_restarts.py | apoletayev/anomalous_ion_conduction | badb91e971e4a5263a433cfa9fcbf914d53ed2a1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 3 01:41:52 2020
Combines LAMMPS output files coming from a series of restarts with a * wildcard.
This works on expanded (mode scalar) fixes from LAMMPS where each line is a time.
The overlapping values of times due to restarts are averaged, but th... | 32.011236 | 119 | 0.562654 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,644 | 0.577045 |
a30096d1e64ea75464caa5c47e07ed034748bbc2 | 3,680 | py | Python | src/imephu/utils.py | saltastroops/imephu | 0c302a73d01fe3ad018e7adf4b91e0beaecc6709 | [
"MIT"
] | null | null | null | src/imephu/utils.py | saltastroops/imephu | 0c302a73d01fe3ad018e7adf4b91e0beaecc6709 | [
"MIT"
] | 3 | 2022-02-02T20:51:05.000Z | 2022-02-03T21:13:27.000Z | src/imephu/utils.py | saltastroops/imephu | 0c302a73d01fe3ad018e7adf4b91e0beaecc6709 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from datetime import datetime
from typing import List, Optional
from astropy.coordinates import SkyCoord
@dataclass
class MagnitudeRange:
"""A magnitude range.
Attributes
----------
bandpass: `str`
The bandpass for which the magnitudes are given.
min_mag... | 31.186441 | 88 | 0.664402 | 1,182 | 0.321196 | 0 | 0 | 1,204 | 0.327174 | 0 | 0 | 1,767 | 0.480163 |
a3009f5a1a8c11a46a1920015fba53e4cf3ae345 | 1,875 | py | Python | app.py | zorro1992/task-app-devops | 48312e53ce5711ce0d9508b481e73f78df411dd2 | [
"MIT"
] | 1 | 2021-08-19T11:54:08.000Z | 2021-08-19T11:54:08.000Z | app.py | zorro1992/task-app-devops | 48312e53ce5711ce0d9508b481e73f78df411dd2 | [
"MIT"
] | null | null | null | app.py | zorro1992/task-app-devops | 48312e53ce5711ce0d9508b481e73f78df411dd2 | [
"MIT"
] | null | null | null | """
app
"""
from flask import Flask, render_template, request, redirect, url_for
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
# /// = relative path, //// = absolute path
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///db.sqlite'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(... | 25 | 68 | 0.6544 | 318 | 0.1696 | 0 | 0 | 1,024 | 0.546133 | 0 | 0 | 566 | 0.301867 |
a304245df7598c6937f92e93f9b38b346d5b4c9a | 2,009 | py | Python | app/models/version.py | akashtalole/python-flask-restful-api | 475d8fd7be1724183716a197aac4257f8fbbeac4 | [
"MIT"
] | 3 | 2019-09-05T05:28:49.000Z | 2020-06-10T09:03:37.000Z | app/models/version.py | akashtalole/python-flask-restful-api | 475d8fd7be1724183716a197aac4257f8fbbeac4 | [
"MIT"
] | null | null | null | app/models/version.py | akashtalole/python-flask-restful-api | 475d8fd7be1724183716a197aac4257f8fbbeac4 | [
"MIT"
] | null | null | null | from sqlalchemy.orm import backref
from app.models import db
class Version(db.Model):
"""Version model class"""
__tablename__ = 'versions'
id = db.Column(db.Integer, primary_key=True)
event_id = db.Column(db.Integer, db.ForeignKey('events.id', ondelete='CASCADE'))
events = db.relationship("Event"... | 35.245614 | 84 | 0.60677 | 1,944 | 0.967646 | 0 | 0 | 553 | 0.275261 | 0 | 0 | 247 | 0.122947 |
a304b175c7cbd222a910af9551f6a774a35e4ab2 | 4,642 | py | Python | pydatajson/catalog_readme.py | datosgobar/pydatajson | f26e3d5928ce9d455485e03fa63a8d8741588b7a | [
"MIT"
] | 13 | 2017-05-17T13:33:43.000Z | 2021-08-10T18:42:59.000Z | pydatajson/catalog_readme.py | datosgobar/pydatajson | f26e3d5928ce9d455485e03fa63a8d8741588b7a | [
"MIT"
] | 296 | 2016-11-29T14:01:09.000Z | 2020-10-27T22:42:26.000Z | pydatajson/catalog_readme.py | datosgobar/pydatajson | f26e3d5928ce9d455485e03fa63a8d8741588b7a | [
"MIT"
] | 11 | 2017-07-06T17:02:31.000Z | 2021-07-19T14:46:51.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import with_statement
import io
import logging
import os
from six import string_types
from pydatajson.helpers import traverse_dict
from pydatajson.indicators import generate_ca... | 40.365217 | 79 | 0.667816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,944 | 0.417526 |
a304eeaa7c9f4ed5704a6d6deba75d5ddfdbb3d1 | 346 | py | Python | code-tk/scrollbar.py | shilpasayura/bk | 2b0a1aa9300da80e201264bcf80226b3c5ff4ad6 | [
"MIT"
] | 4 | 2018-09-08T10:30:27.000Z | 2021-07-23T07:59:24.000Z | code-tk/scrollbar.py | shilpasayura/bk | 2b0a1aa9300da80e201264bcf80226b3c5ff4ad6 | [
"MIT"
] | null | null | null | code-tk/scrollbar.py | shilpasayura/bk | 2b0a1aa9300da80e201264bcf80226b3c5ff4ad6 | [
"MIT"
] | 6 | 2018-09-07T05:54:17.000Z | 2021-07-23T07:59:25.000Z | from tkinter import *
import tkinter
root = Tk()
scrollbar = Scrollbar(root)
scrollbar.pack( side = RIGHT, fill=Y )
mylist = Listbox(root, yscrollcommand = scrollbar.set )
for line in range(100):
mylist.insert(END, "Line number : " + str(line))
mylist.pack( side = LEFT, fill = BOTH )
scrollbar.config( command = m... | 21.625 | 55 | 0.705202 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.046243 |
a305196df6eec0820f9171fbedc0fc320734bad3 | 8,354 | py | Python | pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/sisf/get.py | patrickboertje/genielibs | 61c37aacf3dd0f499944555e4ff940f92f53dacb | [
"Apache-2.0"
] | 1 | 2022-01-16T10:00:24.000Z | 2022-01-16T10:00:24.000Z | pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/sisf/get.py | patrickboertje/genielibs | 61c37aacf3dd0f499944555e4ff940f92f53dacb | [
"Apache-2.0"
] | null | null | null | pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/sisf/get.py | patrickboertje/genielibs | 61c37aacf3dd0f499944555e4ff940f92f53dacb | [
"Apache-2.0"
] | null | null | null | """Common get functions for sisf"""
# Python
import logging
import re
# Genie
from genie.metaparser.util.exceptions import SchemaEmptyParserError
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
def get_device_tracking_policy_name_configurations(device, policy):
""" Get device-tracking policy conf... | 30.268116 | 169 | 0.556739 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,378 | 0.52406 |
a3052e2c0e4e4d32b495f5d940bc6dff09090dc4 | 1,742 | py | Python | Solutions/2021/13.py | Azurealistic/Winter | 4ef5d1fde10f9ba769c33597e1269f161068f18b | [
"Unlicense"
] | 1 | 2021-12-18T20:02:57.000Z | 2021-12-18T20:02:57.000Z | Solutions/2021/13.py | Azurealistic/Winter | 4ef5d1fde10f9ba769c33597e1269f161068f18b | [
"Unlicense"
] | null | null | null | Solutions/2021/13.py | Azurealistic/Winter | 4ef5d1fde10f9ba769c33597e1269f161068f18b | [
"Unlicense"
] | null | null | null | # Advent of Code 2021 - Day: 13
# Imports (Always imports data based on the folder and file name)
from aocd import data, submit
def solve(data):
# Parse input
# Split the input into two lists, based on where the empty line is
# Find the index of the line that is '', and use that to split the list
# Return the two ... | 29.525424 | 150 | 0.647532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 672 | 0.38488 |
a3053ef8acac68ff1083564fcebe2d53409309ba | 13,598 | py | Python | hax/test/test_work_planner.py | ajaykumarptl/cortx-hare | 6eada402c3f90f2f56743efb959ea308b9e171e5 | [
"Apache-2.0"
] | 16 | 2020-09-25T09:34:07.000Z | 2022-03-29T17:26:39.000Z | hax/test/test_work_planner.py | ajaykumarptl/cortx-hare | 6eada402c3f90f2f56743efb959ea308b9e171e5 | [
"Apache-2.0"
] | 536 | 2020-09-24T14:59:10.000Z | 2022-03-31T15:44:52.000Z | hax/test/test_work_planner.py | ajaykumarptl/cortx-hare | 6eada402c3f90f2f56743efb959ea308b9e171e5 | [
"Apache-2.0"
] | 108 | 2020-09-24T15:09:29.000Z | 2022-03-25T10:13:19.000Z | # Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates
#
# 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 appl... | 33.492611 | 78 | 0.538241 | 11,838 | 0.870569 | 0 | 0 | 678 | 0.04986 | 0 | 0 | 2,636 | 0.193852 |
a3056d3c0122f76cea061b47c7cebd71302eec5c | 248 | py | Python | packages/standard.py | jurikolo/la-intro-to-python | d15299662f71d7defe6ca178a8344e3c4d605654 | [
"Apache-2.0"
] | null | null | null | packages/standard.py | jurikolo/la-intro-to-python | d15299662f71d7defe6ca178a8344e3c4d605654 | [
"Apache-2.0"
] | null | null | null | packages/standard.py | jurikolo/la-intro-to-python | d15299662f71d7defe6ca178a8344e3c4d605654 | [
"Apache-2.0"
] | null | null | null | print("Modules documentation: https://docs.python.org/3/tutorial/modules.html")
print("Standard modules list: https://docs.python.org/3/py-modindex.html")
import math
print(math.pi)
from math import pi
print(pi)
from math import pi as p
print(p) | 22.545455 | 79 | 0.762097 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 139 | 0.560484 |
a308348c02f7d05a6bdcec5e102eab0f328f25f9 | 1,329 | py | Python | biosimulators_utils/archive/utils.py | virtualcell/Biosimulators_utils | 1b34e1e0a9ace706d245e9d515d0fae1e55a248d | [
"MIT"
] | 2 | 2021-06-02T13:26:34.000Z | 2021-12-27T23:12:47.000Z | biosimulators_utils/archive/utils.py | virtualcell/Biosimulators_utils | 1b34e1e0a9ace706d245e9d515d0fae1e55a248d | [
"MIT"
] | 102 | 2020-12-06T19:47:43.000Z | 2022-03-31T12:56:17.000Z | biosimulators_utils/archive/utils.py | virtualcell/Biosimulators_utils | 1b34e1e0a9ace706d245e9d515d0fae1e55a248d | [
"MIT"
] | 4 | 2021-01-27T19:56:34.000Z | 2022-02-03T21:08:20.000Z | """ Utilities for creating archives
:Author: Jonathan Karr <[email protected]>
:Date: 2020-12-06
:Copyright: 2020, Center for Reproducible Biomedical Modeling
:License: MIT
"""
from .data_model import Archive, ArchiveFile
import glob
import os
__all__ = ['build_archive_from_paths']
def build_archive_from_paths(path_pa... | 32.414634 | 116 | 0.645598 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 636 | 0.478555 |
096461150c75c546d91d335a2584ba96fe70e040 | 845 | py | Python | v1/Commit.py | gzc/gitstats | d6e41c4f7ad5c3d754ef872fa9e615b88df0ccb8 | [
"MIT"
] | 26 | 2017-06-11T05:44:25.000Z | 2021-02-20T12:21:22.000Z | v1/Commit.py | gzc/gitstats | d6e41c4f7ad5c3d754ef872fa9e615b88df0ccb8 | [
"MIT"
] | 1 | 2020-04-22T15:48:19.000Z | 2020-04-22T15:52:51.000Z | v1/Commit.py | gzc/gitstats | d6e41c4f7ad5c3d754ef872fa9e615b88df0ccb8 | [
"MIT"
] | 1 | 2020-10-20T04:46:11.000Z | 2020-10-20T04:46:11.000Z | """
This class represents the info of one commit
"""
from Change import *;
class Commit:
def __init__(self, hash, author, authorEmail, date, commitMessage):
self.hash = hash;
self.author = author;
self.authorEmail = authorEmail
self.date = date;
self.commitMessage = commit... | 31.296296 | 79 | 0.622485 | 767 | 0.907692 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.246154 |
0966490b7f876064ed7777de569aec9aeed5aa61 | 3,758 | py | Python | htdocs/plotting/auto/scripts100/p172.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | htdocs/plotting/auto/scripts100/p172.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | htdocs/plotting/auto/scripts100/p172.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | """YTD precip"""
import calendar
import datetime
from pandas.io.sql import read_sql
from pyiem.util import get_autoplot_context, get_dbconn
from pyiem.plot.use_agg import plt
from pyiem.network import Table as NetworkTable
def get_description():
""" Return a dict describing how to call this plotter """
desc ... | 37.207921 | 78 | 0.575838 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,335 | 0.355242 |
096771220ae65d76d59e3b33fcd89cf0b500185d | 21,536 | py | Python | python/istio_api/networking/v1beta1/gateway_pb2.py | luckyxiaoqiang/api | f296986a5b6512d8d5da7b3f16f01f5733f5f32a | [
"Apache-2.0"
] | 1 | 2021-07-19T14:51:15.000Z | 2021-07-19T14:51:15.000Z | python/istio_api/networking/v1beta1/gateway_pb2.py | luckyxiaoqiang/api | f296986a5b6512d8d5da7b3f16f01f5733f5f32a | [
"Apache-2.0"
] | 11 | 2019-10-15T23:03:57.000Z | 2020-06-14T16:10:12.000Z | python/istio_api/networking/v1beta1/gateway_pb2.py | luckyxiaoqiang/api | f296986a5b6512d8d5da7b3f16f01f5733f5f32a | [
"Apache-2.0"
] | 7 | 2019-07-04T14:23:54.000Z | 2020-04-27T08:52:51.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: networking/v1beta1/gateway.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from ... | 46.413793 | 2,637 | 0.751997 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,543 | 0.303817 |
096a5172854a6f7ee1cbbe59f19ac4a86d87ac0c | 1,684 | py | Python | Steganalysis-CNN/dataload.py | 1129ljc/video-interpolation-detection | eb2931269b2ac19af28de750f0b719fb0d66aaef | [
"Apache-2.0"
] | 2 | 2022-03-29T06:46:21.000Z | 2022-03-30T09:13:10.000Z | Steganalysis-CNN/dataload.py | 1129ljc/video-interpolation-detection | eb2931269b2ac19af28de750f0b719fb0d66aaef | [
"Apache-2.0"
] | null | null | null | Steganalysis-CNN/dataload.py | 1129ljc/video-interpolation-detection | eb2931269b2ac19af28de750f0b719fb0d66aaef | [
"Apache-2.0"
] | null | null | null | '''
@Time : 2021/9/3 9:42
@Author : ljc
@FileName: dataload.py
@Software: PyCharm
'''
import os
import json
import cv2
import numpy as np
import torch
from PIL import Image
from torchvision import transforms
from torch.utils.data import DataLoader
from torch.utils.data import Dataset
transform = transforms.Compo... | 30.618182 | 92 | 0.647862 | 1,201 | 0.713183 | 0 | 0 | 0 | 0 | 0 | 0 | 301 | 0.178741 |
096a75b1219f50f0c996c46826203e3429895949 | 15,833 | py | Python | model.py | lei-wang-github/unet | 1dcf41a2956b58358f14e00c0df4daf366d272b8 | [
"MIT"
] | null | null | null | model.py | lei-wang-github/unet | 1dcf41a2956b58358f14e00c0df4daf366d272b8 | [
"MIT"
] | null | null | null | model.py | lei-wang-github/unet | 1dcf41a2956b58358f14e00c0df4daf366d272b8 | [
"MIT"
] | null | null | null | import numpy as np
import os
import skimage.io as io
import skimage.transform as trans
import numpy as np
from tensorflow.keras.models import *
from tensorflow.keras.layers import *
from tensorflow.keras.optimizers import *
from tensorflow.keras.callbacks import ModelCheckpoint, LearningRateScheduler
from keras import... | 68.541126 | 169 | 0.718373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,670 | 0.168635 |
096b3b878c08f6ba21432355cfef1328654cf1dc | 23,998 | py | Python | run.py | kampta/PatchVAE | 816f4b49fd8b836641d7e1068c1e802ae0453742 | [
"MIT"
] | 9 | 2020-10-29T11:56:53.000Z | 2021-11-21T14:34:38.000Z | run.py | kampta/PatchVAE | 816f4b49fd8b836641d7e1068c1e802ae0453742 | [
"MIT"
] | null | null | null | run.py | kampta/PatchVAE | 816f4b49fd8b836641d7e1068c1e802ae0453742 | [
"MIT"
] | 2 | 2020-10-29T03:40:31.000Z | 2021-01-31T20:04:49.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" run.py
Code to run the PatchVAE on different datasets
Usage:
# Run with default arguments on mnist
python run.py
Basic VAE borrowed from
https://github.com/pytorch/examples/tree/master/vae
"""
__author__ = "Kamal Gupta"
__email__ = "[email protected]"
__version__ = ... | 40.063439 | 121 | 0.580548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,769 | 0.198725 |
096bb429411e96f2d66472cdc1c72183b691a5bc | 3,521 | py | Python | backend/routes/todolist.py | BurnySc2/sanic-react-typescript-template | 02b1722c9230018402e4c5ffbb11204a0343e73b | [
"MIT"
] | 1 | 2020-12-20T16:09:46.000Z | 2020-12-20T16:09:46.000Z | backend/routes/todolist.py | BurnySc2/sanic-react-typescript-template | 02b1722c9230018402e4c5ffbb11204a0343e73b | [
"MIT"
] | null | null | null | backend/routes/todolist.py | BurnySc2/sanic-react-typescript-template | 02b1722c9230018402e4c5ffbb11204a0343e73b | [
"MIT"
] | null | null | null | import os
import sqlite3
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, List, Optional
from fastapi import Request
from fastapi.routing import APIRouter
from loguru import logger
ENV = os.environ.copy()
USE_MONGO_DB: bool = ENV.get('USE_MONGO_DB', 'True') == 'True'
USE_POSTGRES_DB... | 32.302752 | 90 | 0.672536 | 37 | 0.010508 | 0 | 0 | 2,163 | 0.614314 | 1,917 | 0.544448 | 1,436 | 0.407839 |
096bb8869bace9e3c4b6964fc661952242355ebd | 11,602 | py | Python | membership/management/commands/csvbills.py | guaq/sikteeri | 9a80790666edaa058e9cb42cb9e78626cfc0e565 | [
"MIT"
] | null | null | null | membership/management/commands/csvbills.py | guaq/sikteeri | 9a80790666edaa058e9cb42cb9e78626cfc0e565 | [
"MIT"
] | null | null | null | membership/management/commands/csvbills.py | guaq/sikteeri | 9a80790666edaa058e9cb42cb9e78626cfc0e565 | [
"MIT"
] | null | null | null | # encoding: UTF-8
from __future__ import with_statement
import logging
import codecs
import csv
import os
from datetime import datetime, timedelta
from decimal import Decimal
from django.db.models import Q, Sum
from django.core.management.base import BaseCommand
from django.core.exceptions import ObjectDoesNotExist
... | 38.039344 | 104 | 0.589036 | 6,736 | 0.57964 | 0 | 0 | 0 | 0 | 0 | 0 | 3,512 | 0.302212 |
096c49cec3a4f594f36896910c20f3ffbf6d0451 | 1,962 | py | Python | apps/site/api/serializers/dataset_serializer.py | LocalGround/localground | aa5a956afe7a84a7763a3b23d62a9fd925831cd7 | [
"Apache-2.0"
] | 9 | 2015-05-29T22:22:20.000Z | 2022-02-01T20:39:00.000Z | apps/site/api/serializers/dataset_serializer.py | LocalGround/localground | aa5a956afe7a84a7763a3b23d62a9fd925831cd7 | [
"Apache-2.0"
] | 143 | 2015-01-22T15:03:40.000Z | 2020-06-27T01:55:29.000Z | apps/site/api/serializers/dataset_serializer.py | LocalGround/localground | aa5a956afe7a84a7763a3b23d62a9fd925831cd7 | [
"Apache-2.0"
] | 5 | 2015-03-16T20:51:49.000Z | 2017-02-07T20:48:49.000Z | from localground.apps.site.api.serializers.base_serializer import \
BaseSerializer, NamedSerializerMixin, ProjectSerializerMixin
from localground.apps.site.api.serializers.field_serializer import \
FieldSerializer
from django.conf import settings
from rest_framework import serializers
from localground.apps.site... | 37.730769 | 87 | 0.690622 | 1,621 | 0.826198 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.159531 |
096c52364e36a63ef84c11f7cd157e7b506deae2 | 1,447 | py | Python | example/0_Basic_usage_of_the_library/python_pyppeteer/7_PageClass_Cookie.py | RecluseXU/learning_spider | 45fa790ed7970be57a21b40817cc66856de3d99b | [
"MIT"
] | 38 | 2020-08-30T11:41:53.000Z | 2022-03-23T04:30:26.000Z | example/0_Basic_usage_of_the_library/python_pyppeteer/7_PageClass_Cookie.py | AndersonHJB/learning_spider | b855b7808fb5268e9564180cf73ba5b1fb133f58 | [
"MIT"
] | 2 | 2021-08-20T16:34:12.000Z | 2021-10-08T11:06:41.000Z | example/0_Basic_usage_of_the_library/python_pyppeteer/7_PageClass_Cookie.py | AndersonHJB/learning_spider | b855b7808fb5268e9564180cf73ba5b1fb133f58 | [
"MIT"
] | 10 | 2020-11-24T09:15:42.000Z | 2022-02-25T06:05:16.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : 7_PageClass_Cookie.py
@Time : 2020-8-23 01:33:25
@Author : Recluse Xu
@Version : 1.0
@Contact : [email protected]
@Desc : 页面类 Page Class
官方文档:https://miyakogi.github.io/pyppeteer/reference.html#pyppeteer.page.Page.target
Page类提供了与标签交互的... | 23.721311 | 87 | 0.601935 | 0 | 0 | 0 | 0 | 0 | 0 | 1,069 | 0.665215 | 1,117 | 0.695084 |