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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
406a21613d9b1dbc55f543cfe42bc9ef9b68a79c | 1,749 | py | Python | tests/bugs/core_2678_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2022-02-05T11:37:13.000Z | 2022-02-05T11:37:13.000Z | tests/bugs/core_2678_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-09-03T11:47:00.000Z | 2021-09-03T12:42:10.000Z | tests/bugs/core_2678_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-06-30T14:14:16.000Z | 2021-06-30T14:14:16.000Z | #coding:utf-8
#
# id: bugs.core_2678
# title: Full outer join cannot use available indices (very slow execution)
# decription:
# tracker_id: CORE-2678
# min_versions: ['3.0']
# versions: 3.0
# qmid: None
import pytest
from firebird.qa import db_factory, isql_act, Action
# version: 3.... | 23.958904 | 109 | 0.619211 | 0 | 0 | 0 | 0 | 183 | 0.104631 | 0 | 0 | 1,290 | 0.737564 |
406ae0237fa650007fb4d1f31a942b053762212b | 962 | py | Python | application/model/entity/category.py | UniversidadeDeVassouras/labproghiper-2020.1-MatheusTelles-p1 | d0d81fc82d031f7add9e38add765aad0c404ee35 | [
"Apache-2.0"
] | 1 | 2020-07-15T14:23:30.000Z | 2020-07-15T14:23:30.000Z | application/model/entity/category.py | UniversidadeDeVassouras/labproghiper-2020.1-MatheusTelles-p1 | d0d81fc82d031f7add9e38add765aad0c404ee35 | [
"Apache-2.0"
] | null | null | null | application/model/entity/category.py | UniversidadeDeVassouras/labproghiper-2020.1-MatheusTelles-p1 | d0d81fc82d031f7add9e38add765aad0c404ee35 | [
"Apache-2.0"
] | null | null | null | from flask import current_app
class Category:
def __init__(self, id, name, description, thumb):
self._id = id
self._name = name
self._description = description
def setId(self, id):
self._id = id
def getId(self):
return self._id
def setName(self, name):
... | 24.666667 | 60 | 0.613306 | 931 | 0.967775 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.008316 |
406b1ddec2cc13a47e3515d6e9a2b41aa445fd1b | 76 | py | Python | cookietemple/create/templates/cli/cli_python/{{ cookiecutter.project_slug_no_hyphen }}/tests/__init__.py | e2jk/cookietemple | 86af5622cdabe9ae446048536571898716939f29 | [
"Apache-2.0"
] | 117 | 2020-11-23T02:07:23.000Z | 2022-03-21T16:14:53.000Z | cookietemple/create/templates/cli/cli_python/{{ cookiecutter.project_slug_no_hyphen }}/tests/__init__.py | e2jk/cookietemple | 86af5622cdabe9ae446048536571898716939f29 | [
"Apache-2.0"
] | 226 | 2020-10-19T19:58:13.000Z | 2022-03-27T18:54:30.000Z | cookietemple/create/templates/cli/cli_python/{{ cookiecutter.project_slug_no_hyphen }}/tests/__init__.py | e2jk/cookietemple | 86af5622cdabe9ae446048536571898716939f29 | [
"Apache-2.0"
] | 9 | 2020-11-24T12:45:10.000Z | 2022-03-13T15:58:23.000Z | """Test suite for the {{ cookiecutter.project_slug_no_hyphen }} package."""
| 38 | 75 | 0.736842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.986842 |
406bcb88801f876f8613c7d8e41183ccf8efc7dd | 153 | py | Python | bricks/ev3dev/modules/pybricks/robotics.py | ZPhilo/pybricks-micropython | bf3072b6f7dd87b60e50d7c2130ca3c393a5709f | [
"MIT"
] | 115 | 2020-06-15T16:43:14.000Z | 2022-03-21T21:11:57.000Z | bricks/ev3dev/modules/pybricks/robotics.py | ZPhilo/pybricks-micropython | bf3072b6f7dd87b60e50d7c2130ca3c393a5709f | [
"MIT"
] | 83 | 2020-06-17T17:19:29.000Z | 2022-03-08T18:50:35.000Z | bricks/ev3dev/modules/pybricks/robotics.py | BertLindeman/pybricks-micropython | 8f22a99551100e66ddf08d014d9f442f22b33b4d | [
"MIT"
] | 40 | 2020-06-15T18:36:39.000Z | 2022-03-28T13:22:43.000Z | # SPDX-License-Identifier: MIT
# Copyright (c) 2018-2020 The Pybricks Authors
"""Pybricks robotics module."""
from _pybricks.robotics import DriveBase
| 21.857143 | 46 | 0.771242 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.699346 |
406bff6901669314a484753b5d5e8d18397cb7b2 | 3,693 | py | Python | flask-app/web_app/storage_manager/storage_manager.py | PetrMokrov/back_end_project | 4dd58d61e637d10872fe58a154dc89f6d0829d94 | [
"MIT"
] | null | null | null | flask-app/web_app/storage_manager/storage_manager.py | PetrMokrov/back_end_project | 4dd58d61e637d10872fe58a154dc89f6d0829d94 | [
"MIT"
] | null | null | null | flask-app/web_app/storage_manager/storage_manager.py | PetrMokrov/back_end_project | 4dd58d61e637d10872fe58a154dc89f6d0829d94 | [
"MIT"
] | 1 | 2019-04-02T12:30:13.000Z | 2019-04-02T12:30:13.000Z | #!/usr/bin/env python
import psycopg2
import time
from ..models import User
class StorageManager:
def __init__(self):
self.conn = None
self._connect()
self._create_table()
def _connect(self):
while True:
try:
self.conn = psycopg2.connect(
... | 33.572727 | 107 | 0.479285 | 3,614 | 0.978608 | 0 | 0 | 0 | 0 | 0 | 0 | 1,072 | 0.290279 |
406c19e470ed1397c6d2535e8a38599b7798d3a3 | 2,906 | py | Python | custom/ahex.py | piyush1104/ColorHelper | 7321cc2642f82c701e3c9c1ff1ebdad3a8ff19dc | [
"MIT"
] | null | null | null | custom/ahex.py | piyush1104/ColorHelper | 7321cc2642f82c701e3c9c1ff1ebdad3a8ff19dc | [
"MIT"
] | null | null | null | custom/ahex.py | piyush1104/ColorHelper | 7321cc2642f82c701e3c9c1ff1ebdad3a8ff19dc | [
"MIT"
] | null | null | null | """Custon color that looks for colors of format `#RRGGBBAA` as `#AARRGGBB`."""
from coloraide.css.colors import Color, SRGB
from coloraide.colors import _parse as parse
from coloraide import util
import copy
import re
class ASRGB(SRGB):
"""SRGB that looks for alpha first in hex format."""
MATCH = re.compile(... | 33.022727 | 100 | 0.547144 | 2,682 | 0.922918 | 0 | 0 | 1,214 | 0.417756 | 0 | 0 | 509 | 0.175155 |
406c1c0028a84aba8bcd01a2421dbf11b583f400 | 2,115 | py | Python | source_code/terrain.py | Wiolarz/Console_PY_dungeon | cbf3b9a68251b9ce620aac1f4ca36361160186ea | [
"Apache-2.0"
] | null | null | null | source_code/terrain.py | Wiolarz/Console_PY_dungeon | cbf3b9a68251b9ce620aac1f4ca36361160186ea | [
"Apache-2.0"
] | 2 | 2021-11-29T16:26:03.000Z | 2021-11-29T16:27:14.000Z | source_code/terrain.py | Wiolarz/Console_PY_dungeon | cbf3b9a68251b9ce620aac1f4ca36361160186ea | [
"Apache-2.0"
] | null | null | null | import random
import jobs
import balance
from economy import roman_numbers
class Earth:
def __init__(self):
self.current_day = 1
self.main_quest = None
self.amount_location = 7 # max 8
self.locations = []
#
self.location_names = []
def new_quest(self):
... | 27.467532 | 113 | 0.613239 | 1,214 | 0.573995 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.147991 |
406d45c5b1e3edd5a8eec1e610e28a22eb3881b2 | 2,190 | py | Python | entrepreneurial_property/models/scientificpark.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | 1 | 2019-05-26T22:24:01.000Z | 2019-05-26T22:24:01.000Z | entrepreneurial_property/models/scientificpark.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | 6 | 2019-01-22T14:53:43.000Z | 2020-09-22T16:20:28.000Z | entrepreneurial_property/models/scientificpark.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | null | null | null | from django.db import models
from .media import Water
from .media import Electricity
from .media import Gas
from .media import WasteWater
from .media import Telecommunication
from .generic import Attachment
from .generic import Photo
from .generic import Location as EstateLocation
from cigeo.models import GenericNote ... | 20.660377 | 57 | 0.696347 | 1,826 | 0.83379 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.073059 |
406e0a83e413ef1e4bba7c5add21f6292e7188e7 | 2,328 | py | Python | pusion/input_output/file_input_output.py | IPVS-AS/pusion | 58ef24b602f611192430f6005ecf5305f878f412 | [
"MIT"
] | 5 | 2021-07-24T16:05:12.000Z | 2022-01-21T15:06:03.000Z | pusion/input_output/file_input_output.py | IPVS-AS/pusion | 58ef24b602f611192430f6005ecf5305f878f412 | [
"MIT"
] | null | null | null | pusion/input_output/file_input_output.py | IPVS-AS/pusion | 58ef24b602f611192430f6005ecf5305f878f412 | [
"MIT"
] | 2 | 2021-07-24T16:05:14.000Z | 2022-03-25T21:24:40.000Z | import json
import ntpath
import shutil
from pathlib import Path
import pickle5
def load_pickle_files_as_data(file_paths):
"""
Load pickle files containing decision outputs as an data array.
:param file_paths: A List of file paths to the individual pickle files.
:return: A data array.
"""
da... | 32.333333 | 97 | 0.681701 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,200 | 0.515464 |
407208de4a5ad6967ea27d59e0496b7b2dfa6fe5 | 747 | py | Python | meiduo_mall/meiduo_mall/apps/meiduo_admin/views/spus.py | aGrass0825/meiduo_project | 78c560c1e9a3205d4958ddbe798cd0ab2be41830 | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/meiduo_admin/views/spus.py | aGrass0825/meiduo_project | 78c560c1e9a3205d4958ddbe798cd0ab2be41830 | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/meiduo_admin/views/spus.py | aGrass0825/meiduo_project | 78c560c1e9a3205d4958ddbe798cd0ab2be41830 | [
"MIT"
] | null | null | null | from rest_framework.generics import ListAPIView
from rest_framework.permissions import IsAdminUser
from goods.models import SPU, SPUSpecification
from meiduo_admin.serializers.spus import SPUSimpleSerializer, SPUSpecSerializer
class SPUSimpleView(ListAPIView):
permission_classes = [IsAdminUser]
queryset = S... | 24.096774 | 80 | 0.749665 | 540 | 0.657734 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.208283 |
4072139f6fa73549f4c92cc0b2aa6d9bd1e96911 | 1,172 | py | Python | Scientific Computing with Python/Probability Calculator/prob_calculator.py | Fradxyz/FCCProjects | f337ebdfb86605107e0b85d9e83e88ec7ed60778 | [
"MIT"
] | null | null | null | Scientific Computing with Python/Probability Calculator/prob_calculator.py | Fradxyz/FCCProjects | f337ebdfb86605107e0b85d9e83e88ec7ed60778 | [
"MIT"
] | null | null | null | Scientific Computing with Python/Probability Calculator/prob_calculator.py | Fradxyz/FCCProjects | f337ebdfb86605107e0b85d9e83e88ec7ed60778 | [
"MIT"
] | null | null | null | # Hacked by Ry2uko :D
import copy
import random
# Consider using the modules imported above.
class Hat:
def __init__(self, **balls):
self.contents = []
for color in balls:
for n in range(0,balls[color]):
self.contents.append(color)
def draw(self, num):
drawn... | 26.044444 | 70 | 0.551195 | 564 | 0.481229 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.073379 |
40738ad4ddc2dca3384f1a7a4b98ec684eed9a5c | 1,611 | py | Python | src/frames/add_quantity_frame.py | GolovPavel/ValueConverter | 8492f100667af49fe4bf06eaf0de660513424252 | [
"MIT"
] | 1 | 2020-09-22T17:10:21.000Z | 2020-09-22T17:10:21.000Z | src/frames/add_quantity_frame.py | GolovPavel/ValueConverter | 8492f100667af49fe4bf06eaf0de660513424252 | [
"MIT"
] | 1 | 2020-03-06T21:18:10.000Z | 2020-03-06T21:18:10.000Z | src/frames/add_quantity_frame.py | GolovPavel/ValueConverter | 8492f100667af49fe4bf06eaf0de660513424252 | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter.messagebox import showerror
from constants.frames import MAIN_FRAME_NAME
from util import add_new_quantity
class AddQuantityFrame(tk.Frame):
def __init__(self, root, controller):
tk.Frame.__init__(self, root)
self.controller = controller
self.main_label... | 33.5625 | 116 | 0.666667 | 1,632 | 0.918402 | 0 | 0 | 0 | 0 | 0 | 0 | 401 | 0.225661 |
4073fadf1987f151aaa0076f63a670fabd02b58e | 226 | py | Python | setup.py | vwxyzjn/pysc2gym | 7c43e55a8f48be77f53332b73fda7635e6063589 | [
"MIT"
] | 6 | 2020-09-23T21:31:48.000Z | 2022-03-14T23:59:35.000Z | setup.py | vwxyzjn/pysc2gym | 7c43e55a8f48be77f53332b73fda7635e6063589 | [
"MIT"
] | 2 | 2022-01-13T03:48:47.000Z | 2022-03-12T00:58:26.000Z | setup.py | vwxyzjn/pysc2gym | 7c43e55a8f48be77f53332b73fda7635e6063589 | [
"MIT"
] | 1 | 2021-06-28T14:17:11.000Z | 2021-06-28T14:17:11.000Z | from setuptools import setup
import versioneer
setup(name='gym_pysc2',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
install_requires=['gym'] # And any other dependencies foo needs
) | 28.25 | 70 | 0.738938 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.238938 |
40747f1fe0cf14a0bae5770661298c543ddc7ac6 | 1,395 | py | Python | Compressed downloads/server.py | Aldair47x/aa | ac49239ff94ec6735b316606482dc366ae52bfe8 | [
"MIT"
] | null | null | null | Compressed downloads/server.py | Aldair47x/aa | ac49239ff94ec6735b316606482dc366ae52bfe8 | [
"MIT"
] | null | null | null | Compressed downloads/server.py | Aldair47x/aa | ac49239ff94ec6735b316606482dc366ae52bfe8 | [
"MIT"
] | null | null | null | import zmq
import sys
import os
import math
def loadFiles(path):
files = {}
dataDir = os.fsencode(path)
for file in os.listdir(dataDir):
filename = os.fsdecode(file)
print("Loading {}".format(filename))
files[filename] = file
return files
def main():
if len(sys.argv) != 3:... | 26.320755 | 72 | 0.496774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.114695 |
40757d236a917305a24dbe63896ecb49966f293c | 1,618 | py | Python | metric_learn/nca.py | ogrisel/metric-learn | fb6733c190911d2c408bd7f0b8c9b54ff005fa8d | [
"MIT"
] | null | null | null | metric_learn/nca.py | ogrisel/metric-learn | fb6733c190911d2c408bd7f0b8c9b54ff005fa8d | [
"MIT"
] | null | null | null | metric_learn/nca.py | ogrisel/metric-learn | fb6733c190911d2c408bd7f0b8c9b54ff005fa8d | [
"MIT"
] | 2 | 2017-08-02T08:57:50.000Z | 2020-03-20T13:32:54.000Z | """
Neighborhood Components Analysis (NCA)
Ported to Python from https://github.com/vomjom/nca
"""
from __future__ import absolute_import
import numpy as np
from six.moves import xrange
from sklearn.utils.validation import check_X_y
from .base_metric import BaseMetricLearner
EPS = np.finfo(float).eps
class NCA(Bas... | 26.966667 | 74 | 0.600742 | 1,310 | 0.809642 | 0 | 0 | 0 | 0 | 0 | 0 | 310 | 0.191595 |
4075a5272343f25994c7b713935ff6736a8b4fb7 | 2,923 | py | Python | rl_repr/batch_rl/evaluation.py | xxdreck/google-research | dac724bc2b9362d65c26747a8754504fe4c615f8 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | rl_repr/batch_rl/evaluation.py | xxdreck/google-research | dac724bc2b9362d65c26747a8754504fe4c615f8 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | rl_repr/batch_rl/evaluation.py | admariner/google-research | 7cee4b22b925581d912e8d993625c180da2a5a4f | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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... | 31.771739 | 80 | 0.671912 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,093 | 0.373931 |
4075b24c28e51db8658934eede3f2eedb744d8c0 | 4,721 | py | Python | src/nwb_conversion_tools/datainterfaces/ecephys/intan/intandatainterface.py | ben-dichter-consulting/nwbn-conversion-tools | f5641317d2697a3916eeb54f74ce171ed65469ed | [
"BSD-3-Clause"
] | null | null | null | src/nwb_conversion_tools/datainterfaces/ecephys/intan/intandatainterface.py | ben-dichter-consulting/nwbn-conversion-tools | f5641317d2697a3916eeb54f74ce171ed65469ed | [
"BSD-3-Clause"
] | 6 | 2020-01-31T13:29:40.000Z | 2020-03-27T13:09:32.000Z | src/nwb_conversion_tools/datainterfaces/ecephys/intan/intandatainterface.py | ben-dichter-consulting/nwb-conversion-tools | f5641317d2697a3916eeb54f74ce171ed65469ed | [
"BSD-3-Clause"
] | 1 | 2019-11-24T05:08:06.000Z | 2019-11-24T05:08:06.000Z | """Authors: Cody Baker and Ben Dichter."""
from pathlib import Path
import spikeextractors as se
from pynwb.ecephys import ElectricalSeries
from ..baserecordingextractorinterface import BaseRecordingExtractorInterface
from ....utils import get_schema_from_hdmf_class, FilePathType
try:
from pyintan.intan import r... | 44.121495 | 118 | 0.615336 | 4,244 | 0.898962 | 0 | 0 | 0 | 0 | 0 | 0 | 824 | 0.174539 |
40771f48cc35e55bf1ed0377d840f200b12f6982 | 739 | py | Python | Use.py | XtremeCoder1384/SongDownloader | 7bb06d7961ec699af8517cbd7cb4a1ec83d4fd02 | [
"MIT"
] | 1 | 2019-03-04T02:26:41.000Z | 2019-03-04T02:26:41.000Z | Use.py | XtremeCoder1384/SongDownloader | 7bb06d7961ec699af8517cbd7cb4a1ec83d4fd02 | [
"MIT"
] | 1 | 2018-12-20T02:32:35.000Z | 2019-03-11T12:51:15.000Z | Use.py | IngeniousCoder/SongDownloader | 7bb06d7961ec699af8517cbd7cb4a1ec83d4fd02 | [
"MIT"
] | null | null | null | import os
import youtube_dl
os.system("setup.bat")
playlist = input("Paste the Youtube Playlist URL Here.")
track = 1
print("""THIS TOOL WILL ATTEMPT TO DOWNLOAD THE FIRST 1000 SONGS IN THE QUEUE.\n
PLEASE DO NOT INTERRUPT THE TOOL.
YOU MAY CLOSE THE TOOL WHEN IT DISPLAYS "DONE!".
ALL... | 36.95 | 129 | 0.663058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 497 | 0.67253 |
40776dbc5b7aba40a9cfd205d779833d8dd62541 | 1,903 | py | Python | site/manage.py | oaoouo/railgun | b09d276723976740841d8b8adf9cbf87a05cd970 | [
"MIT"
] | null | null | null | site/manage.py | oaoouo/railgun | b09d276723976740841d8b8adf9cbf87a05cd970 | [
"MIT"
] | null | null | null | site/manage.py | oaoouo/railgun | b09d276723976740841d8b8adf9cbf87a05cd970 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
manage.py
~~~~~~~~~
"""
import os
import sys
import shutil
import platform
from app import app
from gen import Gen
from flask_script import Manager
"""编码设置"""
if (platform.python_version().split('.')[0] == '2'):
# reload(sys) is evil :)
reload(sys)
sys.setdefaultencoding('utf... | 25.039474 | 71 | 0.60536 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 456 | 0.237624 |
40780e501d35b1715806673a2e143e24f1727e1c | 3,152 | py | Python | tests/test_segmenters.py | edoarn/cv-models | 5fa7e50fd69f76b54611bb323b15610eeb1bb5cf | [
"MIT"
] | null | null | null | tests/test_segmenters.py | edoarn/cv-models | 5fa7e50fd69f76b54611bb323b15610eeb1bb5cf | [
"MIT"
] | 4 | 2021-04-23T12:05:45.000Z | 2021-04-25T11:38:01.000Z | tests/test_segmenters.py | edoarn/cv-models | 5fa7e50fd69f76b54611bb323b15610eeb1bb5cf | [
"MIT"
] | null | null | null | from typing import Any
import torch
import torch.nn as nn
from cvmodels.segmentation import unet, deeplab as dl
def output(model: nn.Module, input_batch: torch.Tensor) -> Any:
model.eval()
with torch.no_grad():
return model(input_batch)
def numel(m: torch.nn.Module, only_trainable: bool = True) -> ... | 36.651163 | 115 | 0.703046 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
40788e305d7f2fee1abfae85125753bcd3fa071f | 10,981 | py | Python | bagua/torch_api/contrib/sync_batchnorm.py | mmathys/bagua | e17978690452318b65b317b283259f09c24d59bb | [
"MIT"
] | 635 | 2021-06-11T03:03:11.000Z | 2022-03-31T14:52:57.000Z | bagua/torch_api/contrib/sync_batchnorm.py | mmathys/bagua | e17978690452318b65b317b283259f09c24d59bb | [
"MIT"
] | 181 | 2021-06-10T12:27:19.000Z | 2022-03-31T04:08:19.000Z | bagua/torch_api/contrib/sync_batchnorm.py | shjwudp/bagua | 7e1b438e27e3119b23e472f5b9217a9862932bef | [
"MIT"
] | 71 | 2021-06-10T13:16:53.000Z | 2022-03-22T09:26:22.000Z | # Copyright (c) Uber Technologies, Inc. and its affiliates.
# Copyright (c) 2021 Kuaishou AI Platform & DS3 Lab.
#
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from distutils.version import LooseVersion
impor... | 38.128472 | 160 | 0.601858 | 10,035 | 0.913851 | 0 | 0 | 7,439 | 0.677443 | 0 | 0 | 4,024 | 0.366451 |
407a65f9c4b9f958fde5ab42bad4bdd15788bb31 | 4,046 | py | Python | tests/test_classification_metric.py | DaveFClarke/ml_bias_checking | 90f67ebc602b6107042e6cbff3268051bb3b1c95 | [
"Apache-2.0"
] | 2 | 2021-07-31T20:52:37.000Z | 2022-02-15T21:05:17.000Z | tests/test_classification_metric.py | DaveFClarke/ml_bias_checking | 90f67ebc602b6107042e6cbff3268051bb3b1c95 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:16:43.000Z | 2022-02-10T05:26:14.000Z | tests/test_classification_metric.py | DaveFClarke/ml_bias_checking | 90f67ebc602b6107042e6cbff3268051bb3b1c95 | [
"Apache-2.0"
] | 1 | 2019-05-21T15:31:24.000Z | 2019-05-21T15:31:24.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
import pandas as pd
from aif360.datasets import BinaryLabelDataset
from aif360.metrics import ClassificationMetric
def test_generalized_entropy_inde... | 34.87931 | 85 | 0.505685 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.067721 |
407b22ddf13dab3659fb801ada3a7cb31608cf9a | 200 | py | Python | PDA/extra_assignments/10.6. Dicts_ Countries and cities/solution/main.py | EMbeDS-education/StatsAndComputing20212022 | 971e418882b206a1b5606d15d222cef1a5a04834 | [
"MIT"
] | 2 | 2022-02-24T09:35:15.000Z | 2022-03-14T20:34:33.000Z | PDA/extra_assignments/10.6. Dicts_ Countries and cities/solution/main.py | GeorgiosArg/StatsAndComputing20212022 | 798d39af6aa5ef5eef49d5d6f43191351e8a49f3 | [
"MIT"
] | null | null | null | PDA/extra_assignments/10.6. Dicts_ Countries and cities/solution/main.py | GeorgiosArg/StatsAndComputing20212022 | 798d39af6aa5ef5eef49d5d6f43191351e8a49f3 | [
"MIT"
] | 2 | 2022-03-15T21:40:35.000Z | 2022-03-26T14:51:31.000Z | city_country = {}
for _ in range(int(input())):
country, *cities = input().split()
for city in cities:
city_country[city] = country
for _ in range(int(input())):
print(city_country[input()]) | 28.571429 | 36 | 0.665 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
407cd39412220721420002d2204aeef22618cb4c | 1,562 | py | Python | config.py | oyasr/mudawen | 6f0161ab783536d7c5d695225ef28ce4947a46e3 | [
"MIT"
] | null | null | null | config.py | oyasr/mudawen | 6f0161ab783536d7c5d695225ef28ce4947a46e3 | [
"MIT"
] | null | null | null | config.py | oyasr/mudawen | 6f0161ab783536d7c5d695225ef28ce4947a46e3 | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
load_dotenv()
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.getenv('SECRET_KEY') or os.urandom(32)
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_RECORD_QUERIES = True
MAIL_SERVER = os.getenv('MAIL_SERVER') or 'smtp.goog... | 28.4 | 70 | 0.691421 | 1,308 | 0.837388 | 0 | 0 | 49 | 0.03137 | 0 | 0 | 361 | 0.231114 |
407ce0ad1e21c01e8414bc4b63e17958aa42df9e | 998 | py | Python | experiments/async_tests/async_3.py | 10ks/py_utils | 54ce06dbd567b097deda1c7ef2d0a2265e5b243e | [
"MIT"
] | null | null | null | experiments/async_tests/async_3.py | 10ks/py_utils | 54ce06dbd567b097deda1c7ef2d0a2265e5b243e | [
"MIT"
] | null | null | null | experiments/async_tests/async_3.py | 10ks/py_utils | 54ce06dbd567b097deda1c7ef2d0a2265e5b243e | [
"MIT"
] | null | null | null | import asyncio
async def wait_sec(l):
print("Before wait")
await asyncio.sleep(1)
print("After wait")
l[0] = False
async def main():
# await asyncio.gather(wait_sec([True]), wait_sec([True]), wait_sec([True]))
run = [True]
asyncio.create_task(wait_sec(run))
await asyncio.sleep(0)
... | 23.209302 | 80 | 0.607214 | 0 | 0 | 0 | 0 | 0 | 0 | 549 | 0.5501 | 499 | 0.5 |
407d150b5548e5dc5c3decda923610fd51eb2141 | 1,438 | py | Python | vk_bot/mods/util/calculator.py | triangle1984/GLaDOS | 39dea7bf8043e791ef079ea1ac6616f95d5b5312 | [
"BSD-3-Clause"
] | 3 | 2019-12-12T05:48:34.000Z | 2020-12-07T19:23:41.000Z | vk_bot/mods/util/calculator.py | anar66/vk-bot | 39dea7bf8043e791ef079ea1ac6616f95d5b5312 | [
"BSD-3-Clause"
] | 1 | 2019-11-15T14:28:49.000Z | 2019-11-15T14:28:49.000Z | vk_bot/mods/util/calculator.py | triangle1984/vk-bot | 39dea7bf8043e791ef079ea1ac6616f95d5b5312 | [
"BSD-3-Clause"
] | 5 | 2019-11-20T14:20:30.000Z | 2022-02-05T10:37:01.000Z | # from vk_bot.core.modules.basicplug import BasicPlug
# import math
# class Calculator(BasicPlug):
# doc = "Калькулятор"
# command = ("калькулятор",)
# def main(self):
# try:
# x = self.text[1]; x = int(x)
# encalc = self.text[2]; encalc = encalc.lower()
# y = sel... | 36.871795 | 74 | 0.462448 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,576 | 0.976456 |
407dc792a754cf8c4cf33cd4fb3c31fe49507ba3 | 9,201 | py | Python | sample-input/homogeneous/geometry.py | AI-Pranto/OpenMOC | 7f6ce4797aec20ddd916981a56a4ba54ffda9a06 | [
"MIT"
] | 97 | 2015-01-02T02:13:45.000Z | 2022-03-09T14:12:45.000Z | sample-input/homogeneous/geometry.py | AI-Pranto/OpenMOC | 7f6ce4797aec20ddd916981a56a4ba54ffda9a06 | [
"MIT"
] | 325 | 2015-01-07T17:43:14.000Z | 2022-02-21T17:22:00.000Z | sample-input/homogeneous/geometry.py | AI-Pranto/OpenMOC | 7f6ce4797aec20ddd916981a56a4ba54ffda9a06 | [
"MIT"
] | 73 | 2015-01-17T19:11:58.000Z | 2022-03-24T16:31:37.000Z | import openmoc
import openmoc.log as log
import openmoc.plotter as plotter
import openmoc.materialize as materialize
log.set_log_level('NORMAL')
###############################################################################
########################### Creating Materials ############################
#############... | 46.705584 | 79 | 0.29236 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,806 | 0.196283 |
407e66ad31400c201f52210276cc27484a563068 | 22,314 | py | Python | google/ads/google_ads/v5/__init__.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | 1 | 2021-04-09T04:28:47.000Z | 2021-04-09T04:28:47.000Z | google/ads/google_ads/v5/__init__.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v5/__init__.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 71.519231 | 113 | 0.791118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18,795 | 0.842296 |
407f96b82e23f251ebe7b0d09ba3c8416a7e9d98 | 5,279 | py | Python | PNN/model.py | jingxiufenghua/rec-model | 23204f70fc1bf384d3cdd0cc85e43117d3394074 | [
"MIT"
] | 1,323 | 2020-08-24T02:34:25.000Z | 2022-03-31T06:03:28.000Z | PNN/model.py | yiLinMaster/Recommender-System-with-TF2.0 | cfc7b3fbd4ba2d9157a78938e6bdaeba7df82822 | [
"MIT"
] | 65 | 2020-08-25T06:07:41.000Z | 2022-03-18T20:10:53.000Z | PNN/model.py | yiLinMaster/Recommender-System-with-TF2.0 | cfc7b3fbd4ba2d9157a78938e6bdaeba7df82822 | [
"MIT"
] | 395 | 2020-08-24T00:57:08.000Z | 2022-03-31T12:41:13.000Z | """
Created on July 20, 2020
Updated on May 19, 2021
model: Product-based Neural Networks for User Response Prediction
@author: Ziyao Geng(zggzy1996@163.com)
"""
import tensorflow as tf
from tensorflow.keras import Model
from tensorflow.keras.regularizers import l2
from tensorflow.keras.layers import Embedding, Dens... | 47.990909 | 114 | 0.544232 | 4,906 | 0.929343 | 0 | 0 | 0 | 0 | 0 | 0 | 1,346 | 0.254973 |
407fa3643267388dca73bf3b3496b61a0c5f9491 | 314 | py | Python | exercicio3.py | DrokaGit/-infosatc-lp-avaliativo-02 | 6bb78ce84ac325c866201ff538f426d6e7a72ab5 | [
"MIT"
] | null | null | null | exercicio3.py | DrokaGit/-infosatc-lp-avaliativo-02 | 6bb78ce84ac325c866201ff538f426d6e7a72ab5 | [
"MIT"
] | null | null | null | exercicio3.py | DrokaGit/-infosatc-lp-avaliativo-02 | 6bb78ce84ac325c866201ff538f426d6e7a72ab5 | [
"MIT"
] | null | null | null | nume1 = int(input("Digite um numero"))
nume2 = int(input("Digite um numero"))
nume3 = int(input("Digite um numero"))
nume4 = int(input("Digite um numero"))
nume5 = int(input("Digite um numero"))
table = [nume1,nume2,nume3,nume4,nume5]
tableM = (float((nume1 + nume2 + nume3 + nume4 + nume5)))
print(float(tableM)) | 34.888889 | 57 | 0.691083 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.286624 |
40804fd1f1dd57a07519de8f44b10f0b6f6d1a54 | 274 | py | Python | platonic/platonic/box/implementation.py | anatoly-scherbakov/platonic | b2d239e19f3ebf5a562b6aabcd4b82492bb03564 | [
"MIT"
] | 1 | 2019-11-01T09:08:50.000Z | 2019-11-01T09:08:50.000Z | platonic/platonic/box/implementation.py | anatoly-scherbakov/platonic | b2d239e19f3ebf5a562b6aabcd4b82492bb03564 | [
"MIT"
] | null | null | null | platonic/platonic/box/implementation.py | anatoly-scherbakov/platonic | b2d239e19f3ebf5a562b6aabcd4b82492bb03564 | [
"MIT"
] | null | null | null | from typing import TypeVar
from .abstract import AbstractBox
T = TypeVar('T')
class ValueBox(AbstractBox[T]):
_value: T
@property
def value(self) -> T:
return self._value
@value.setter
def value(self, value: T):
self._value = value
| 15.222222 | 33 | 0.635036 | 191 | 0.69708 | 0 | 0 | 134 | 0.489051 | 0 | 0 | 3 | 0.010949 |
408169e338ef415cc1c1cefeaa3179019885ca4e | 79 | py | Python | Schemas/Subject.py | esot0/jmsa-tutoring-backend | f35000c73fbbb31f9b4dcca36e40854dc2e06d23 | [
"MIT"
] | null | null | null | Schemas/Subject.py | esot0/jmsa-tutoring-backend | f35000c73fbbb31f9b4dcca36e40854dc2e06d23 | [
"MIT"
] | null | null | null | Schemas/Subject.py | esot0/jmsa-tutoring-backend | f35000c73fbbb31f9b4dcca36e40854dc2e06d23 | [
"MIT"
] | null | null | null | from mongoengine import *
class Subject(Document):
subject = StringField() | 19.75 | 27 | 0.746835 | 52 | 0.658228 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
40826ce560682ad3ad560f8fecc12e0ab6658bc0 | 767 | py | Python | 39. Combination Sum.py | MapleLove2014/leetcode | 135c79ebe98815d0e38280edfadaba90e677aff5 | [
"Apache-2.0"
] | 1 | 2020-12-04T07:38:16.000Z | 2020-12-04T07:38:16.000Z | 39. Combination Sum.py | MapleLove2014/leetcode | 135c79ebe98815d0e38280edfadaba90e677aff5 | [
"Apache-2.0"
] | null | null | null | 39. Combination Sum.py | MapleLove2014/leetcode | 135c79ebe98815d0e38280edfadaba90e677aff5 | [
"Apache-2.0"
] | null | null | null | class Solution:
def combinationSum(self, candidates, target):
def lookup(candidates, index, target, combine, result):
if target == 0:
result.append(combine)
return
if index >= len(candidates) and target > 0:
return
... | 34.863636 | 114 | 0.555411 | 676 | 0.881356 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4082bcb5f99112c93d2d504f08622c615955a33b | 1,204 | py | Python | crawl_comments.py | tosh1ki/NicoCrawler | 236029f103e01de9e61a042759dc9bf2cb7d3d55 | [
"MIT"
] | 1 | 2015-03-04T14:06:33.000Z | 2015-03-04T14:06:33.000Z | crawl_comments.py | tosh1ki/NicoCrawler | 236029f103e01de9e61a042759dc9bf2cb7d3d55 | [
"MIT"
] | 2 | 2015-03-04T02:48:18.000Z | 2015-03-04T14:18:32.000Z | crawl_comments.py | tosh1ki/NicoCrawler | 236029f103e01de9e61a042759dc9bf2cb7d3d55 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__doc__ = '''
Crawl comment from nicovideo.jp
Usage:
crawl_comments.py --url <url> --mail <mail> --pass <pass> [--sqlite <sqlite>] [--csv <csv>]
Options:
--url <url>
--mail <mail>
--pass <pass>
--sqlite <sqlite> (optional) path of comment DB [d... | 26.173913 | 102 | 0.671096 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 763 | 0.603639 |
40830eea2a3d7f03b3b7dae05b19fdc253a0e60b | 2,095 | py | Python | sif/greedy_sim_max.py | longland-m/wikigen | 459ba7bf9d3ca9584de65388cc9b9a15fa16a69f | [
"MIT"
] | null | null | null | sif/greedy_sim_max.py | longland-m/wikigen | 459ba7bf9d3ca9584de65388cc9b9a15fa16a69f | [
"MIT"
] | 2 | 2021-08-25T16:04:29.000Z | 2022-02-10T01:50:44.000Z | sif/greedy_sim_max.py | longland-m/wikigen | 459ba7bf9d3ca9584de65388cc9b9a15fa16a69f | [
"MIT"
] | null | null | null | # Functions to do the greedy similarity maximisation for article:node assignments
# All code is original
import random
def computeSimSum(G, similarityMatrix, asgn):
""" Compute the total similarity sum for the current node:article assignment """
S = sum([similarityMatrix[asgn[j], asgn[i]]
for j in ra... | 32.230769 | 82 | 0.651074 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 598 | 0.285442 |
40836d6113e4a1359c6e3078275ec9078aa642e4 | 23,463 | py | Python | plab/photon_counters/Idq801.py | joamatab/photonic-coupling-drivers | c12581d8e2158a292e1c585e45c0207c8129c0f1 | [
"MIT"
] | null | null | null | plab/photon_counters/Idq801.py | joamatab/photonic-coupling-drivers | c12581d8e2158a292e1c585e45c0207c8129c0f1 | [
"MIT"
] | null | null | null | plab/photon_counters/Idq801.py | joamatab/photonic-coupling-drivers | c12581d8e2158a292e1c585e45c0207c8129c0f1 | [
"MIT"
] | null | null | null | import sys
import numpy as np
import shutil
import time
import itertools as it
import collections
import ctypes as ct
import os
import copy
sys.path.append(os.path.dirname(__file__))
from ThreadStoppable import ThreadStoppable
class Idq801(object):
def __init__(
self,
deviceId=-1,
timesta... | 35.931087 | 112 | 0.592507 | 22,977 | 0.979287 | 0 | 0 | 0 | 0 | 0 | 0 | 5,143 | 0.219196 |
408378ae2d1cd6ca599deacc2843f436a637b9b1 | 7,472 | py | Python | IRIS/IRIS_formatting.py | Xinglab/IRIS | dc3c172eae9083daf57ce0e71c4fe322ab5cc928 | [
"BSD-2-Clause-FreeBSD"
] | 7 | 2019-11-21T08:42:37.000Z | 2021-08-13T15:49:18.000Z | IRIS/IRIS_formatting.py | Xinglab/IRIS | dc3c172eae9083daf57ce0e71c4fe322ab5cc928 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | IRIS/IRIS_formatting.py | Xinglab/IRIS | dc3c172eae9083daf57ce0e71c4fe322ab5cc928 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2021-05-08T08:22:38.000Z | 2022-01-20T23:43:03.000Z | import sys, numpy, argparse, os
def loadSamplelist(fin_samples, sample_fin_list, sample_header, sample_name_field, sample_size):
for l in open(fin_samples):
ls=l.strip()
sample_fin_list.append(ls)
for r in open(ls):
rs=map(lambda x:x.split('/')[-sample_name_field].split('.bam')[0],r.strip().strip(',').split(... | 42.454545 | 204 | 0.722564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,509 | 0.201954 |
408407cd45d1d31df97defaffbefa6540d0ab484 | 7,444 | py | Python | quests/dataflow_python/streaming_event_generator.py | Glairly/introduction_to_tensorflow | aa0a44d9c428a6eb86d1f79d73f54c0861b6358d | [
"Apache-2.0"
] | 2 | 2022-01-06T11:52:57.000Z | 2022-01-09T01:53:56.000Z | quests/dataflow_python/streaming_event_generator.py | Glairly/introduction_to_tensorflow | aa0a44d9c428a6eb86d1f79d73f54c0861b6358d | [
"Apache-2.0"
] | null | null | null | quests/dataflow_python/streaming_event_generator.py | Glairly/introduction_to_tensorflow | aa0a44d9c428a6eb86d1f79d73f54c0861b6358d | [
"Apache-2.0"
] | null | null | null | # This program reads a file representing web server logs in common log format and streams them into a PubSub topic
# with lag characteristics as determined by command-line arguments
import argparse
from google.cloud import pubsub_v1
import time
from datetime import datetime, timezone
import random
from anytree... | 39.595745 | 116 | 0.657174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,991 | 0.4018 |
4084a9455c8745ebe8cdb17a3177996a15d02016 | 210 | py | Python | src/models/configs/database.py | Nardri/rbac-service | c5cf6baf60e95a7790156c85e37c76c697efd585 | [
"MIT"
] | null | null | null | src/models/configs/database.py | Nardri/rbac-service | c5cf6baf60e95a7790156c85e37c76c697efd585 | [
"MIT"
] | null | null | null | src/models/configs/database.py | Nardri/rbac-service | c5cf6baf60e95a7790156c85e37c76c697efd585 | [
"MIT"
] | null | null | null | """Database setup"""
# Third party library
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
# initialization of the database and migration
database = SQLAlchemy()
migrate = Migrate()
| 21 | 46 | 0.795238 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.414286 |
4085bccb38fa4dfee0e895626450b9f141da766f | 4,111 | py | Python | postreise/plot/plot_heatmap.py | lanesmith/PostREISE | 69d47968cf353bca57aa8b587cc035d127fa424f | [
"MIT"
] | 1 | 2022-01-31T16:53:40.000Z | 2022-01-31T16:53:40.000Z | postreise/plot/plot_heatmap.py | lanesmith/PostREISE | 69d47968cf353bca57aa8b587cc035d127fa424f | [
"MIT"
] | 71 | 2021-01-22T20:09:47.000Z | 2022-03-30T16:53:18.000Z | postreise/plot/plot_heatmap.py | lanesmith/PostREISE | 69d47968cf353bca57aa8b587cc035d127fa424f | [
"MIT"
] | 7 | 2021-04-02T14:45:21.000Z | 2022-01-17T22:23:38.000Z | import datetime as dt
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import pandas as pd
from powersimdata.input.check import _check_time_series
from postreise.analyze.time import change_time_zone
def plot_heatmap(
series,
time_zone=None,
time_zone_label=None,
title=None,
cmap... | 37.036036 | 88 | 0.683289 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,889 | 0.459499 |
4086e4dd21e9a774c97734bcd63cd0233cf32c3d | 4,000 | py | Python | tensorflow_federated/python/simulation/file_per_user_client_data.py | houcharlie/federated-legacy | cb10a9cdcea33288f8113e7445782d21c8c65f81 | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/simulation/file_per_user_client_data.py | houcharlie/federated-legacy | cb10a9cdcea33288f8113e7445782d21c8c65f81 | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/simulation/file_per_user_client_data.py | houcharlie/federated-legacy | cb10a9cdcea33288f8113e7445782d21c8c65f81 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 36.363636 | 80 | 0.74325 | 2,990 | 0.7475 | 0 | 0 | 1,368 | 0.342 | 0 | 0 | 1,635 | 0.40875 |
4086e6c92cd0f6bf0670ff63d76bbec71943f194 | 162 | py | Python | 20-Blog_Clone_Project/blog_project_Practice/blog/admin.py | andy2167565/Django-Bootcamp-Practice | f08d2866382db96060450d4dbd1ffaca7243f623 | [
"MIT"
] | null | null | null | 20-Blog_Clone_Project/blog_project_Practice/blog/admin.py | andy2167565/Django-Bootcamp-Practice | f08d2866382db96060450d4dbd1ffaca7243f623 | [
"MIT"
] | null | null | null | 20-Blog_Clone_Project/blog_project_Practice/blog/admin.py | andy2167565/Django-Bootcamp-Practice | f08d2866382db96060450d4dbd1ffaca7243f623 | [
"MIT"
] | null | null | null | from django.contrib import admin
from blog.models import Post, Comment
# Register your models here.
admin.site.register(Post)
admin.site.register(Comment)
| 23.142857 | 38 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.179012 |
408710371dd0d37abadd9978ea2c4a4f85a8ec3b | 6,459 | py | Python | tests/compilation/request/test_request_compiler.py | ymoch/preacher | ae68170d14c72791884e91b20054bd13a79b52d0 | [
"MIT"
] | 3 | 2019-08-01T03:14:49.000Z | 2020-01-31T08:55:22.000Z | tests/compilation/request/test_request_compiler.py | ymoch/preacher | ae68170d14c72791884e91b20054bd13a79b52d0 | [
"MIT"
] | 353 | 2019-04-14T14:53:28.000Z | 2022-03-11T03:26:08.000Z | tests/compilation/request/test_request_compiler.py | ymoch/preacher | ae68170d14c72791884e91b20054bd13a79b52d0 | [
"MIT"
] | 1 | 2020-08-01T06:23:08.000Z | 2020-08-01T06:23:08.000Z | from unittest.mock import NonCallableMock, sentinel
from pytest import mark, raises, fixture
from preacher.compilation.argument import Argument
from preacher.compilation.error import CompilationError, NamedNode, IndexedNode
from preacher.compilation.request.request import RequestCompiler, RequestCompiled
from preache... | 34.174603 | 81 | 0.71203 | 0 | 0 | 0 | 0 | 2,065 | 0.319709 | 0 | 0 | 562 | 0.08701 |
408784a24cae84367d1864aa02a8ff6e4a8e197a | 1,109 | py | Python | bot/conversation_handlers/stage01.py | gerbigtim/coaching_bot | 5b4ef6e207a5017f7b4274d8238550b4988d0a6e | [
"MIT"
] | null | null | null | bot/conversation_handlers/stage01.py | gerbigtim/coaching_bot | 5b4ef6e207a5017f7b4274d8238550b4988d0a6e | [
"MIT"
] | null | null | null | bot/conversation_handlers/stage01.py | gerbigtim/coaching_bot | 5b4ef6e207a5017f7b4274d8238550b4988d0a6e | [
"MIT"
] | null | null | null | # imports
from telegram.ext import (
CommandHandler,
MessageHandler,
Filters,
ConversationHandler,
)
from handler_functions.start import start
from handler_functions.bio import bio
from handler_functions.gender import gender
from handler_functions.photo import photo, skip_photo
from handler_functions.lo... | 38.241379 | 102 | 0.734896 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 174 | 0.156898 |
4087ac882a0e642cb2645d67bfb2e7473130d2e9 | 265 | py | Python | python100days/day03/conversion.py | lanSeFangZhou/pythonbase | f4daa373573b2fc0a59a5eb919d02eddf5914e18 | [
"Apache-2.0"
] | null | null | null | python100days/day03/conversion.py | lanSeFangZhou/pythonbase | f4daa373573b2fc0a59a5eb919d02eddf5914e18 | [
"Apache-2.0"
] | 1 | 2021-06-02T00:58:26.000Z | 2021-06-02T00:58:26.000Z | python100days/day03/conversion.py | lanSeFangZhou/pythonbase | f4daa373573b2fc0a59a5eb919d02eddf5914e18 | [
"Apache-2.0"
] | null | null | null | # 英制单位英寸和公制单位厘米互换
value =float(input('请输入长度:'))
unit =input('请输入单位:')
if unit == 'in' or unit == '英寸':
print('%f英寸 = %f厘米' % (value, value * 2.54))
elif unit == '厘米' or unit == 'cm':
print('%f 厘米 = %f英寸' % (value, value / 2.54))
else:
print('请输入有效的单位') | 26.5 | 49 | 0.558491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0.501393 |
4088dc579c34d53321481174879bd2850ab8f43e | 485 | py | Python | tests/models/test_dtfactory.py | surajsjain/ocean.py | 2e853db94d9aee2a0cf6b3d58f714215b83d917b | [
"Apache-2.0"
] | 4 | 2021-07-05T20:21:41.000Z | 2021-09-02T14:13:26.000Z | tests/models/test_dtfactory.py | surajsjain/ocean.py | 2e853db94d9aee2a0cf6b3d58f714215b83d917b | [
"Apache-2.0"
] | null | null | null | tests/models/test_dtfactory.py | surajsjain/ocean.py | 2e853db94d9aee2a0cf6b3d58f714215b83d917b | [
"Apache-2.0"
] | 1 | 2021-03-25T15:04:12.000Z | 2021-03-25T15:04:12.000Z | from ocean_lib.models.data_token import DataToken
from ocean_lib.models.dtfactory import DTFactory
from ocean_lib.ocean.util import to_base_18
def test1(network, alice_wallet, dtfactory_address):
dtfactory = DTFactory(dtfactory_address)
dt_address = dtfactory.createToken('foo_blob', 'DT1', 'DT1', to_base_18(... | 37.307692 | 108 | 0.781443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.061856 |
408a713d6a5b30cf98528302f34eefe2000e2530 | 4,223 | py | Python | methods/unilm_based/unilm/src/pytorch_pretrained_bert/optimization_fp16.py | Guaguago/CommonGen | 0a81b4edb8cd111571eba817eb994420f1070c48 | [
"MIT"
] | 100 | 2020-01-30T08:14:25.000Z | 2022-03-30T08:59:33.000Z | methods/unilm_based/unilm/src/pytorch_pretrained_bert/optimization_fp16.py | Guaguago/CommonGen | 0a81b4edb8cd111571eba817eb994420f1070c48 | [
"MIT"
] | 4 | 2021-06-08T22:34:33.000Z | 2022-03-12T00:50:13.000Z | methods/unilm_based/unilm/src/pytorch_pretrained_bert/optimization_fp16.py | Guaguago/CommonGen | 0a81b4edb8cd111571eba817eb994420f1070c48 | [
"MIT"
] | 15 | 2020-04-13T22:56:27.000Z | 2022-03-10T02:44:26.000Z | # coding=utf-8
"""PyTorch optimization for BERT model."""
from apex.contrib.optimizers import FP16_Optimizer
class FP16_Optimizer_State(FP16_Optimizer):
def __init__(self,
init_optimizer,
static_loss_scale=1.0,
dynamic_loss_scale=False,
dynamic_... | 52.135802 | 117 | 0.656642 | 4,110 | 0.973242 | 0 | 0 | 0 | 0 | 0 | 0 | 2,612 | 0.618518 |
408ac0aced4fa7689e5bb64bd87a616424377650 | 46 | py | Python | ermaket/api/generation/__init__.py | SqrtMinusOne/ERMaket_Experiment | c4a7b61651edd15a619d9b690e2aaeaab4de282d | [
"Apache-2.0"
] | null | null | null | ermaket/api/generation/__init__.py | SqrtMinusOne/ERMaket_Experiment | c4a7b61651edd15a619d9b690e2aaeaab4de282d | [
"Apache-2.0"
] | null | null | null | ermaket/api/generation/__init__.py | SqrtMinusOne/ERMaket_Experiment | c4a7b61651edd15a619d9b690e2aaeaab4de282d | [
"Apache-2.0"
] | null | null | null | from .generator import *
from .types import *
| 15.333333 | 24 | 0.73913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
408c88fb92a834b62165870e3156152b98dd330c | 956 | py | Python | Source/stack0verf10w.py | IRIDIUM-SUB/Software-Security-Course-Design | 596664a728d73133e44a4566027561170c5d2ae8 | [
"MIT"
] | null | null | null | Source/stack0verf10w.py | IRIDIUM-SUB/Software-Security-Course-Design | 596664a728d73133e44a4566027561170c5d2ae8 | [
"MIT"
] | null | null | null | Source/stack0verf10w.py | IRIDIUM-SUB/Software-Security-Course-Design | 596664a728d73133e44a4566027561170c5d2ae8 | [
"MIT"
] | null | null | null | import Bugdetectionuniversalframe
import os
import re
class overflowdetection(Bugdetectionuniversalframe.uniframe):
def __init__(self):
Bugdetectionuniversalframe.uniframe.__init__(self)
def deploy(self):#Re-write deploy method
flag=0
self.filesort()
if self.path != "":
... | 30.83871 | 84 | 0.582636 | 912 | 0.942149 | 0 | 0 | 0 | 0 | 0 | 0 | 235 | 0.242769 |
408e5eee21b5e0ed193fbd1da82ee85348eb987d | 7,517 | py | Python | ndbc/station.py | ppokhrel1/ndbc | e8ed73ae35a49c967384e2c80c1a2bf838eeb0c2 | [
"MIT"
] | null | null | null | ndbc/station.py | ppokhrel1/ndbc | e8ed73ae35a49c967384e2c80c1a2bf838eeb0c2 | [
"MIT"
] | null | null | null | ndbc/station.py | ppokhrel1/ndbc | e8ed73ae35a49c967384e2c80c1a2bf838eeb0c2 | [
"MIT"
] | null | null | null | """
station.py
"""
from datetime import datetime, timedelta
import gzip
import numpy as np
import requests
import urllib
_BASEURL = 'http://www.ndbc.noaa.gov/data'
_SENSOR_URL = _BASEURL+'/stations/buoyht.txt'
_REALTIME_URL = _BASEURL+'/realtime2/'
_RECENT_URL = _BASEURL+'/stdmet/'
_HISTORICAL_URL = _BASEURL+'/histori... | 41.994413 | 89 | 0.543036 | 7,128 | 0.948251 | 0 | 0 | 0 | 0 | 0 | 0 | 855 | 0.113742 |
408f68f533f8c5055f6e751095cb737571178a12 | 765 | py | Python | main.py | kajuna0amendez/Cython_Machine_Learning_Models | 8b7d502bae07487ae0fdbced796e0fa50082e681 | [
"Apache-2.0"
] | null | null | null | main.py | kajuna0amendez/Cython_Machine_Learning_Models | 8b7d502bae07487ae0fdbced796e0fa50082e681 | [
"Apache-2.0"
] | 2 | 2021-02-02T23:02:12.000Z | 2021-08-23T20:51:22.000Z | main.py | kajuna0amendez/Machine_Learning_Models | 8b7d502bae07487ae0fdbced796e0fa50082e681 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/env python
__author__ = "Andres Mendez-Vazquez"
__copyright__ = "Copyright 2018"
__credits__ = ["Andres Mendez-Vazquez"]
__license__ = "Apache"
__version__ = "v1.0.0"
__maintainer__ = "Andres Mendez-Vazquez"
__email = "kajuna0kajuna@gmail.com"
__status__ = "Development"
from data_m... | 23.181818 | 68 | 0.705882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 288 | 0.376471 |
408f7d16d7791c4eaced84288001a4eccaab5dae | 54 | py | Python | graw/__init__.py | iamsajjad/graw | 84289b9bd2e298bad72ade402ab8a87e7c37688d | [
"MIT"
] | null | null | null | graw/__init__.py | iamsajjad/graw | 84289b9bd2e298bad72ade402ab8a87e7c37688d | [
"MIT"
] | null | null | null | graw/__init__.py | iamsajjad/graw | 84289b9bd2e298bad72ade402ab8a87e7c37688d | [
"MIT"
] | null | null | null |
# version of the graw package
__version__ = "0.1.0"
| 10.8 | 29 | 0.685185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.666667 |
408fa80f7b62ab2142b5ebe87fafa4317281b530 | 6,779 | py | Python | sdk/python/pulumi_aws/acm/get_certificate.py | mehd-io/pulumi-aws | 034629c3fb30dc90db65b196d115df43723df19c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/acm/get_certificate.py | mehd-io/pulumi-aws | 034629c3fb30dc90db65b196d115df43723df19c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/acm/get_certificate.py | mehd-io/pulumi-aws | 034629c3fb30dc90db65b196d115df43723df19c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilitie... | 39.184971 | 260 | 0.651424 | 3,311 | 0.48842 | 354 | 0.05222 | 2,872 | 0.423661 | 0 | 0 | 2,969 | 0.43797 |
40902a024648160483f25a5dd670916ae7cc2c01 | 2,688 | py | Python | Part 3/batch_VS_stochastic.py | m9psy/neural_network_habr_guide | 543b4bc82cfed5d5675b9ecc1cc97c2286a5562a | [
"MIT"
] | 20 | 2016-08-08T12:16:51.000Z | 2022-03-26T19:56:09.000Z | Part 3/batch_VS_stochastic.py | m9psy/neural_network_habr_guide | 543b4bc82cfed5d5675b9ecc1cc97c2286a5562a | [
"MIT"
] | null | null | null | Part 3/batch_VS_stochastic.py | m9psy/neural_network_habr_guide | 543b4bc82cfed5d5675b9ecc1cc97c2286a5562a | [
"MIT"
] | 8 | 2016-08-08T14:22:13.000Z | 2020-05-30T07:05:36.000Z | import numpy as np
import matplotlib.pyplot as plt
TOTAL = 200
STEP = 0.25
EPS = 0.1
INITIAL_THETA = [9, 14]
def func(x):
return 0.2 * x + 3
def generate_sample(total=TOTAL):
x = 0
while x < total * STEP:
yield func(x) + np.random.uniform(-1, 1) * np.random.uniform(2, 8)
x += STEP
def... | 29.866667 | 74 | 0.553943 | 0 | 0 | 164 | 0.059227 | 0 | 0 | 0 | 0 | 424 | 0.153124 |
4090bb4b6d1ad59682a210fa58e3049a7296547f | 4,103 | py | Python | castle.py | codyd51/castle | 93e7f8c18a0dacd5437b7503b7f3420d6ebc6256 | [
"MIT"
] | 2 | 2018-08-07T16:18:58.000Z | 2018-08-09T16:59:48.000Z | castle.py | codyd51/castle | 93e7f8c18a0dacd5437b7503b7f3420d6ebc6256 | [
"MIT"
] | null | null | null | castle.py | codyd51/castle | 93e7f8c18a0dacd5437b7503b7f3420d6ebc6256 | [
"MIT"
] | null | null | null | import castle
from typing import Tuple
def select_player_types() -> Tuple[castle.PlayerType, castle.PlayerType]:
player1, player2 = None, None
while True:
print(f'1) Play a person')
print(f'2) Play the computer')
print(f'3) Play the computer against itself')
choice_str = input... | 37.3 | 95 | 0.663417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 938 | 0.228613 |
40914f27511088ce3ade62cbe86245a30a969a5b | 2,603 | py | Python | pyfos/utils/configure/switch_configuration_show.py | madhavinaiduprathap/pyfosbrocade | ec100e77c441761c3e688f1d8e5d18ad38cc83f4 | [
"Apache-2.0"
] | 44 | 2017-11-17T12:03:11.000Z | 2022-02-03T20:57:56.000Z | pyfos/utils/configure/switch_configuration_show.py | madhavinaiduprathap/pyfosbrocade | ec100e77c441761c3e688f1d8e5d18ad38cc83f4 | [
"Apache-2.0"
] | 13 | 2018-10-09T15:34:15.000Z | 2022-02-24T20:03:17.000Z | pyfos/utils/configure/switch_configuration_show.py | madhavinaiduprathap/pyfosbrocade | ec100e77c441761c3e688f1d8e5d18ad38cc83f4 | [
"Apache-2.0"
] | 23 | 2017-12-14T18:08:33.000Z | 2022-02-03T15:33:40.000Z | #!/usr/bin/env python3
# Copyright 2018 Brocade Communications Systems LLC. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may also obtain a copy of the License at
# http://www.apache.org/licenses/LICENS... | 28.293478 | 80 | 0.683826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,975 | 0.75874 |
409191dc8e0d6b6abf220bc3d47860d3cfbeff3a | 31,078 | py | Python | vehicle/views.py | BernardAli/vehicle-service-mgt | 242d9797f9138a23d1c649d63660c2ee0b6cc462 | [
"MIT"
] | 105 | 2020-09-27T16:10:44.000Z | 2022-03-31T18:08:36.000Z | vehicle/views.py | BernardAli/vehicle-service-mgt | 242d9797f9138a23d1c649d63660c2ee0b6cc462 | [
"MIT"
] | 1 | 2021-07-15T21:36:09.000Z | 2021-07-15T21:36:09.000Z | vehicle/views.py | BernardAli/vehicle-service-mgt | 242d9797f9138a23d1c649d63660c2ee0b6cc462 | [
"MIT"
] | 87 | 2020-10-02T11:45:42.000Z | 2022-03-25T16:43:22.000Z | from django.shortcuts import render,redirect,reverse
from . import forms,models
from django.db.models import Sum
from django.contrib.auth.models import Group
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required,user_passes_test
from django.conf import settings
from djan... | 41.327128 | 150 | 0.702491 | 0 | 0 | 0 | 0 | 25,357 | 0.815915 | 0 | 0 | 6,581 | 0.211758 |
409204c88e09d10160109d7dfc196e9a1647012b | 28,322 | py | Python | deep_disfluency/utils/tools.py | treena908/deep_disfluency | 4e18bc17e74c356cd3a9c26fc80bf1c4a5487d59 | [
"MIT"
] | null | null | null | deep_disfluency/utils/tools.py | treena908/deep_disfluency | 4e18bc17e74c356cd3a9c26fc80bf1c4a5487d59 | [
"MIT"
] | null | null | null | deep_disfluency/utils/tools.py | treena908/deep_disfluency | 4e18bc17e74c356cd3a9c26fc80bf1c4a5487d59 | [
"MIT"
] | null | null | null | import random
import numpy as np
import itertools
import re
from collections import defaultdict
import os
def get_tags(s, open_delim='<', close_delim='/>'):
"""Iterator to spit out the xml style disfluency tags in a given string.
Keyword arguments:
s -- input string
"""
while True:
# Sear... | 40.634146 | 85 | 0.49541 | 0 | 0 | 711 | 0.025104 | 0 | 0 | 0 | 0 | 9,263 | 0.32706 |
4093599c05b72acbbffdbf768053f07822e78e65 | 124 | py | Python | library/favourite/api/pagination.py | furkan-34/library-DRF-django-api | 3634133b7c543d6d05845dd8fa1f206386c1badb | [
"MIT"
] | null | null | null | library/favourite/api/pagination.py | furkan-34/library-DRF-django-api | 3634133b7c543d6d05845dd8fa1f206386c1badb | [
"MIT"
] | null | null | null | library/favourite/api/pagination.py | furkan-34/library-DRF-django-api | 3634133b7c543d6d05845dd8fa1f206386c1badb | [
"MIT"
] | null | null | null | from rest_framework.pagination import PageNumberPagination
class FavouritePagination(PageNumberPagination):
page_size=4 | 31 | 58 | 0.870968 | 64 | 0.516129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
40946ed59b952cc97c649459f7de1a75d4265832 | 564 | py | Python | Python-Math/Python-Math/check_prime.py | rgabeflores/Scripts | c8138cb4543e576924de2107abb5a65f0b84264c | [
"MIT"
] | 2 | 2018-05-12T10:58:51.000Z | 2021-11-16T11:52:27.000Z | src/Python-Math/check_prime.py | learn-py/Posts | da394236db0a52c93ca1c0374ad121b263555272 | [
"MIT"
] | null | null | null | src/Python-Math/check_prime.py | learn-py/Posts | da394236db0a52c93ca1c0374ad121b263555272 | [
"MIT"
] | null | null | null | '''
@author Gabriel Flores
Checks the primality of an integer.
'''
def is_prime(x):
'''
Checks the primality of an integer.
'''
sqrt = int(x ** (1/2))
for i in range(2, sqrt, 1):
if x % i == 0:
return False
return True
def main():
try:
print("\n\n")
a = int(input(" Enter an integer to check if ... | 18.8 | 66 | 0.592199 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.496454 |
4095239ac8155507cd8501376f1d1a88028e9392 | 1,580 | py | Python | src/contrib/cortex-strings/scripts/plot-top.py | lastweek/source-freebsd | 0821950b0c40cbc891a27964b342e0202a3859ec | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | src/contrib/cortex-strings/scripts/plot-top.py | lastweek/source-freebsd | 0821950b0c40cbc891a27964b342e0202a3859ec | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | src/contrib/cortex-strings/scripts/plot-top.py | lastweek/source-freebsd | 0821950b0c40cbc891a27964b342e0202a3859ec | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | #!/usr/bin/env python
"""Plot the performance of different variants of the string routines
for one size.
"""
import libplot
import pylab
def plot(records, bytes):
records = [x for x in records if x.bytes==bytes]
variants = libplot.unique(records, 'variant', prefer='this')
functions = libplot.unique(re... | 25.483871 | 112 | 0.61519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.153165 |
40958b5deb96439390eb8a34bb5ed7d5f2983d33 | 3,292 | py | Python | part1.py | aspiringguru/python_sqlite_demo | 01422c69493b7301f66dee5a0c99e358aec9746b | [
"MIT"
] | null | null | null | part1.py | aspiringguru/python_sqlite_demo | 01422c69493b7301f66dee5a0c99e358aec9746b | [
"MIT"
] | null | null | null | part1.py | aspiringguru/python_sqlite_demo | 01422c69493b7301f66dee5a0c99e358aec9746b | [
"MIT"
] | null | null | null | import sqlite3
import time, datetime, random
import matplotlib
matplotlib.use("Agg")
#added due to error, possibly due to install configuration
import matplotlib.pyplot as plt
print(matplotlib.get_backend())
import matplotlib.dates as mdates
from matplotlib import style
style.use('fivethirtyeight')
conn = sqlite3... | 25.92126 | 124 | 0.65401 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,321 | 0.401276 |
40964229b92108c25937fb12522f648ac39e3e91 | 42,098 | py | Python | tests/test_oic_consumer.py | infohash/pyoidc | 62c7318e68c22b7933100d1c06ecc0c78f77f0d9 | [
"Apache-2.0"
] | null | null | null | tests/test_oic_consumer.py | infohash/pyoidc | 62c7318e68c22b7933100d1c06ecc0c78f77f0d9 | [
"Apache-2.0"
] | null | null | null | tests/test_oic_consumer.py | infohash/pyoidc | 62c7318e68c22b7933100d1c06ecc0c78f77f0d9 | [
"Apache-2.0"
] | null | null | null | import json
import os
from urllib.parse import parse_qs
from urllib.parse import urlparse
import pytest
import responses
from freezegun import freeze_time
from jwkest import BadSignature
from jwkest.jwk import SYMKey
from oic.oauth2.message import MissingSigningKey
from oic.oauth2.message import WrongSigningAlgorithm... | 35.585799 | 114 | 0.551071 | 38,260 | 0.908832 | 0 | 0 | 1,043 | 0.024776 | 0 | 0 | 10,931 | 0.259656 |
409660d0cd505763586410c6b2b0e9f378f6b60a | 2,338 | py | Python | setup.py | CristianPachacama/cartoframes | 3dc4e10d175069a7d7b734db3d9526127aad9dec | [
"BSD-3-Clause"
] | 1 | 2020-11-23T23:44:32.000Z | 2020-11-23T23:44:32.000Z | setup.py | CristianPachacama/cartoframes | 3dc4e10d175069a7d7b734db3d9526127aad9dec | [
"BSD-3-Clause"
] | null | null | null | setup.py | CristianPachacama/cartoframes | 3dc4e10d175069a7d7b734db3d9526127aad9dec | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import io
from codecs import open
from setuptools import setup, find_packages
def walk_subpkg(name):
data_files = []
package_dir = 'cartoframes'
for parent, dirs, files in os.walk(os.path.join(package_dir, name)):
# Remove package_dir from t... | 28.168675 | 82 | 0.597092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,030 | 0.440547 |
40967bb7a1cadc5b1fb7c5cf4f834747f6a13132 | 1,026 | py | Python | Tests/test_BioSQL_mysql_connector_online.py | bioinf-mcb/biopython | 1a1f4a7ee4e0efba517d3d607c56c27e72e399cc | [
"BSD-3-Clause"
] | 2 | 2019-10-25T18:20:34.000Z | 2019-10-28T15:26:40.000Z | Tests/test_BioSQL_mysql_connector_online.py | cosign070128/biopython | 2f02e34ba76306e9c27eec9e051809bec2cece9b | [
"BSD-3-Clause"
] | 9 | 2020-05-05T00:54:23.000Z | 2020-06-09T17:10:45.000Z | Tests/test_BioSQL_mysql_connector_online.py | cosign070128/biopython | 2f02e34ba76306e9c27eec9e051809bec2cece9b | [
"BSD-3-Clause"
] | 3 | 2020-06-29T13:07:46.000Z | 2021-06-14T20:11:55.000Z | #!/usr/bin/env python
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Run BioSQL tests using MySQL."""
import unittest
# Really do want "import *" to get all the test clases:
from common_BioSQL ... | 30.176471 | 70 | 0.770955 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 453 | 0.44152 |
4096eff81f78a7602d75dd243df5e2e64ac51f0d | 429 | py | Python | kalachakra/saraswati/migrations/0004_ritual_people_name.py | tony-mikhailov/Kalachakra | 7a46be7e75bad0500914e5a7c44662c6740ebaa2 | [
"MIT"
] | null | null | null | kalachakra/saraswati/migrations/0004_ritual_people_name.py | tony-mikhailov/Kalachakra | 7a46be7e75bad0500914e5a7c44662c6740ebaa2 | [
"MIT"
] | 3 | 2021-03-19T01:19:04.000Z | 2021-06-04T22:44:35.000Z | kalachakra/saraswati/migrations/0004_ritual_people_name.py | tony-mikhailov/Kalachakra | 7a46be7e75bad0500914e5a7c44662c6740ebaa2 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2020-04-05 07:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('saraswati', '0003_auto_20200402_1918'),
]
operations = [
migrations.AddField(
model_name='ritual',
name='people_name... | 22.578947 | 88 | 0.617716 | 336 | 0.783217 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.242424 |
40997199af5c3427ea68e5bd37b9d827653408fe | 14,709 | py | Python | src/toil/jobStores/abstractJobStore.py | adamnovak/toil | 3a81f1114ec7f347e6e7bfd861073d897a9188ec | [
"Apache-2.0"
] | null | null | null | src/toil/jobStores/abstractJobStore.py | adamnovak/toil | 3a81f1114ec7f347e6e7bfd861073d897a9188ec | [
"Apache-2.0"
] | null | null | null | src/toil/jobStores/abstractJobStore.py | adamnovak/toil | 3a81f1114ec7f347e6e7bfd861073d897a9188ec | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015 UCSC Computational Genomics Lab
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 37.143939 | 102 | 0.615066 | 13,899 | 0.944932 | 0 | 0 | 8,189 | 0.556734 | 0 | 0 | 8,258 | 0.561425 |
409a342355b661973139a052737ed840078d30d8 | 9,819 | py | Python | dashboard.py | TheCrypticMusic/COVID-19 | b813d6abeb8031f1165ad2981f14bfd75853e083 | [
"MIT"
] | null | null | null | dashboard.py | TheCrypticMusic/COVID-19 | b813d6abeb8031f1165ad2981f14bfd75853e083 | [
"MIT"
] | null | null | null | dashboard.py | TheCrypticMusic/COVID-19 | b813d6abeb8031f1165ad2981f14bfd75853e083 | [
"MIT"
] | null | null | null | from datetime import date
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import plotly.express as px
from dash.dependencies import Input, Output
test_data = pd.read_csv("data/world_data.csv")
today = date.today()
external... | 51.952381 | 250 | 0.440778 | 0 | 0 | 0 | 0 | 2,695 | 0.274468 | 0 | 0 | 2,624 | 0.267237 |
409ac3a28f63c2603ac7a86d7009827a8fa89371 | 979 | py | Python | dataset/load_data_queue.py | hezhujun/autofocus-rnn | dd21ec5cfce07990172048b74e5fc8e3d5b55229 | [
"MIT"
] | 7 | 2020-08-19T01:32:34.000Z | 2021-12-06T07:31:32.000Z | dataset/load_data_queue.py | hezhujun/autofocus-rnn | dd21ec5cfce07990172048b74e5fc8e3d5b55229 | [
"MIT"
] | 2 | 2021-01-28T07:35:45.000Z | 2021-06-20T14:19:01.000Z | dataset/load_data_queue.py | hezhujun/autofocus-rnn | dd21ec5cfce07990172048b74e5fc8e3d5b55229 | [
"MIT"
] | null | null | null | from collections import OrderedDict
import skimage.io as io
from config import get_config
config = get_config()
class LRUCache:
def __init__(self, capacity: int):
self._ordered_dict = OrderedDict()
self._capacity = capacity
def get(self, key):
self._move_to_end_if_exist(key)
... | 23.309524 | 63 | 0.6476 | 639 | 0.652707 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.068437 |
409ad3c2aaa2132563a0928975965afc50081365 | 1,852 | py | Python | algs/astar.py | jakedolan443/search-algorithm-visualizer | 331c22886ef8017add16bc63a8e75df9643f4fe9 | [
"MIT"
] | null | null | null | algs/astar.py | jakedolan443/search-algorithm-visualizer | 331c22886ef8017add16bc63a8e75df9643f4fe9 | [
"MIT"
] | null | null | null | algs/astar.py | jakedolan443/search-algorithm-visualizer | 331c22886ef8017add16bc63a8e75df9643f4fe9 | [
"MIT"
] | null | null | null | import numpy
from heapq import *
import time
def heuristic(a, b):
return (b[0] - a[0]) ** 2 + (b[1] - a[1]) ** 2
def astar(canvas, array, start, goal):
neighbours = [(0, 1), (0, -1), (1, 0), (-1, 0)]
close_set = set()
came_from = {}
gscore = {start: 0}
fscore = {start: heuristic(start, goal)... | 30.360656 | 100 | 0.532937 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.00378 |
409bc944bcc8474410d41d3c5ed935bde146869f | 1,119 | py | Python | examples/serial_client.py | marcinbor85/qupy | 219563523c975d1d5ae2aa47bbd02862c906ab43 | [
"MIT"
] | null | null | null | examples/serial_client.py | marcinbor85/qupy | 219563523c975d1d5ae2aa47bbd02862c906ab43 | [
"MIT"
] | null | null | null | examples/serial_client.py | marcinbor85/qupy | 219563523c975d1d5ae2aa47bbd02862c906ab43 | [
"MIT"
] | null | null | null | import logging
import time
from qupy.framing.slip import Slip
from qupy.interface.serial import SerialPort
from qupy.interface.errors import InterfaceTimeoutError, InterfaceIOError, InterfaceError
from qupy.comm.client import CommClient
logging.basicConfig(level=logging.DEBUG)
if __name__ == '__main__':
s = Se... | 22.836735 | 89 | 0.513852 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.051832 |
409c909153fb2318680014346b00ba060e9d1ace | 699 | py | Python | summary/abs_summarization.py | solarpark7346/sukjulyo | 52caaa7f49294898b055062d7c0b2cb5c5393c24 | [
"MIT"
] | null | null | null | summary/abs_summarization.py | solarpark7346/sukjulyo | 52caaa7f49294898b055062d7c0b2cb5c5393c24 | [
"MIT"
] | null | null | null | summary/abs_summarization.py | solarpark7346/sukjulyo | 52caaa7f49294898b055062d7c0b2cb5c5393c24 | [
"MIT"
] | 3 | 2021-10-31T08:23:44.000Z | 2022-01-13T03:59:22.000Z | import torch
from transformers import PreTrainedTokenizerFast
from transformers import BartForConditionalGeneration
class AbsSummarization():
def __init__(self):
self.tokenizer = PreTrainedTokenizerFast.from_pretrained('gogamza/kobart-summarization')
self.model = BartForConditionalGeneration.from_pretrained('gog... | 38.833333 | 91 | 0.815451 | 548 | 0.783977 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.085837 |
409d329c8dc7ebfbbdbfdb66ef4f8976ba9ec528 | 12,413 | py | Python | dp_tornado/helper/io/image/__init__.py | donghak-shin/dp-tornado | 095bb293661af35cce5f917d8a2228d273489496 | [
"MIT"
] | 18 | 2015-04-07T14:28:39.000Z | 2020-02-08T14:03:38.000Z | dp_tornado/helper/io/image/__init__.py | donghak-shin/dp-tornado | 095bb293661af35cce5f917d8a2228d273489496 | [
"MIT"
] | 7 | 2016-10-05T05:14:06.000Z | 2021-05-20T02:07:22.000Z | dp_tornado/helper/io/image/__init__.py | donghak-shin/dp-tornado | 095bb293661af35cce5f917d8a2228d273489496 | [
"MIT"
] | 11 | 2015-12-15T09:49:39.000Z | 2021-09-06T18:38:21.000Z | # -*- coding: utf-8 -*-
import tempfile
from dp_tornado.engine.helper import Helper as dpHelper
class ImageHelper(dpHelper):
def compare(self, i1, i2, error=0):
i1 = self.load(i1)
i2 = self.load(i2)
if not i1 or not i2:
return None
s1 = i1.size
s2 = i2.size... | 30.573892 | 118 | 0.512688 | 12,311 | 0.991783 | 0 | 0 | 0 | 0 | 0 | 0 | 646 | 0.052042 |
409e06685c9ecbd99f82a4b27833a85d0c5a9b1e | 4,385 | py | Python | script.py | triethyl/wbut-results-parsed | 9ca8f5dd6afab1eb2b0436093b3a20e6e07f923d | [
"MIT"
] | 1 | 2019-02-28T05:32:51.000Z | 2019-02-28T05:32:51.000Z | script.py | triethyl/wbut-results-parsed | 9ca8f5dd6afab1eb2b0436093b3a20e6e07f923d | [
"MIT"
] | null | null | null | script.py | triethyl/wbut-results-parsed | 9ca8f5dd6afab1eb2b0436093b3a20e6e07f923d | [
"MIT"
] | 2 | 2019-03-15T19:40:17.000Z | 2019-05-24T17:15:59.000Z | import requests
from bs4 import BeautifulSoup
import json
import re
# Range of Roll Number - User Input
start_roll = int(input("Starting Roll Number: "))
end_roll = int(input("Ending Roll Number: "))
# Semester - User Input
sem = int(input("Which Semester[1-8]: "))
# Verbosity
verbose = int(input("Verbo... | 35.650407 | 140 | 0.575143 | 0 | 0 | 2,909 | 0.663398 | 0 | 0 | 0 | 0 | 1,416 | 0.322919 |
409f7a2dc9434e9656e7bedb75a00b02b076a630 | 1,411 | py | Python | cartoonify.py | adl1995/image-processing-filters | 850e4a6e23ef0f3843cc306cf1e42569f705f07e | [
"MIT"
] | null | null | null | cartoonify.py | adl1995/image-processing-filters | 850e4a6e23ef0f3843cc306cf1e42569f705f07e | [
"MIT"
] | null | null | null | cartoonify.py | adl1995/image-processing-filters | 850e4a6e23ef0f3843cc306cf1e42569f705f07e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = "Adeel Ahmad"
__email__ = "adeelahmad14@hotmail.com"
__status__ = "Production"
import matplotlib.pyplot as plt
import numpy as np
import skimage as ski
import Image
def cartoonify(im, display=False):
"""
function receives an image and add its gradient magnitude in it and add it
... | 31.355556 | 255 | 0.59674 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 487 | 0.345145 |
40a00c80a3cc741480575d8150f065c48c9b4231 | 4,341 | py | Python | keymapper/__init__.py | rburns629/KeyMapper | ba1f463bdfa7710f3b9487974874db9424632d85 | [
"MIT"
] | null | null | null | keymapper/__init__.py | rburns629/KeyMapper | ba1f463bdfa7710f3b9487974874db9424632d85 | [
"MIT"
] | null | null | null | keymapper/__init__.py | rburns629/KeyMapper | ba1f463bdfa7710f3b9487974874db9424632d85 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
import json
import re
@dataclass
class KeyMapper(dict):
"""
Example:
km = KeyMapper({'messages': {'message1': 'Hello World!'}}})
print(km['messages.message1'])
Variables:
__delimiter__ is set to dot-notation by default, unless specified otherwise.
... | 33.651163 | 135 | 0.476618 | 4,272 | 0.984105 | 0 | 0 | 4,283 | 0.986639 | 0 | 0 | 467 | 0.107579 |
40a02814845a829728726e29b79dfead7feb2132 | 3,401 | py | Python | PythonFiles_DataScience/demo37_pythonfordatascience.py | mahnooranjum/Programming_DataScience | f7a4215d4615b3f8460c3a1944a585628cf6930d | [
"MIT"
] | null | null | null | PythonFiles_DataScience/demo37_pythonfordatascience.py | mahnooranjum/Programming_DataScience | f7a4215d4615b3f8460c3a1944a585628cf6930d | [
"MIT"
] | null | null | null | PythonFiles_DataScience/demo37_pythonfordatascience.py | mahnooranjum/Programming_DataScience | f7a4215d4615b3f8460c3a1944a585628cf6930d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Demo37_PythonforDataScience.ipynb
# PYTHON FOR DATA SCIENCE
We will take our python programming skills a step further and process large data in it. Python is an excellent language for deployment. Hence we will be using open source data during the learning process!!
This will make sure we un... | 18.284946 | 259 | 0.643046 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,852 | 0.544386 |
40a0b272172c34d79349dc117521f3988050cbff | 4,401 | py | Python | quantrocket/db.py | Jay-Jay-D/quantrocket-client | b70ac199382d22d56fad923ca2233ce027f3264a | [
"Apache-2.0"
] | null | null | null | quantrocket/db.py | Jay-Jay-D/quantrocket-client | b70ac199382d22d56fad923ca2233ce027f3264a | [
"Apache-2.0"
] | null | null | null | quantrocket/db.py | Jay-Jay-D/quantrocket-client | b70ac199382d22d56fad923ca2233ce027f3264a | [
"Apache-2.0"
] | 1 | 2019-06-12T11:34:27.000Z | 2019-06-12T11:34:27.000Z | # Copyright 2017 QuantRocket - All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 29.536913 | 102 | 0.667803 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,492 | 0.566235 |
40a0c02ad22b941af8159f65f284f536c99461a2 | 3,889 | py | Python | ink2canvas/GradientHelper.py | greipfrut/pdftohtml5canvas | bd4b829a5fd02b503e6b32c268b265daa92e92e5 | [
"MIT"
] | 4 | 2016-05-06T21:29:39.000Z | 2020-02-25T08:47:48.000Z | ink2canvas/GradientHelper.py | letw/pdftohtml5canvas | bd4b829a5fd02b503e6b32c268b265daa92e92e5 | [
"MIT"
] | null | null | null | ink2canvas/GradientHelper.py | letw/pdftohtml5canvas | bd4b829a5fd02b503e6b32c268b265daa92e92e5 | [
"MIT"
] | null | null | null | from ink2canvas.lib.simpletransform import parseTransform
class GradientHelper(object):
def __init__(self, abstractShape):
self.abstractShape = abstractShape
def hasGradient(self, key):
style = self.abstractShape.getStyle()
if key in style:
styleParamate... | 43.696629 | 141 | 0.609154 | 3,826 | 0.9838 | 0 | 0 | 0 | 0 | 0 | 0 | 230 | 0.059141 |
40a15dfaa12f9d16539bfd378e8a390a22b70eb7 | 529 | py | Python | project/manage.py | yosukesuzuki/let-me-notify | 39f50214403822712329c1cd953167d6e9b315d6 | [
"MIT"
] | null | null | null | project/manage.py | yosukesuzuki/let-me-notify | 39f50214403822712329c1cd953167d6e9b315d6 | [
"MIT"
] | null | null | null | project/manage.py | yosukesuzuki/let-me-notify | 39f50214403822712329c1cd953167d6e9b315d6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Kay management script.
:Copyright: (c) 2009 Accense Technology, Inc. All rights reserved.
:license: BSD, see LICENSE for more details.
"""
import sys
import os
import logging
sys.path = [os.path.abspath(os.path.dirname(__file__))] + sys.path
import kay
kay.setup_en... | 19.592593 | 66 | 0.701323 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 205 | 0.387524 |
40a223cfd00d5ab5d2f6c9db56030a295e86ca65 | 1,624 | py | Python | examples/plotting/field_pole_figure.py | heprom/pymicro | 176bf3a829dbf67796a3d4471f18868a3da229a7 | [
"MIT"
] | 30 | 2017-03-02T14:43:48.000Z | 2022-02-25T13:22:22.000Z | examples/plotting/field_pole_figure.py | heprom/pymicro | 176bf3a829dbf67796a3d4471f18868a3da229a7 | [
"MIT"
] | 14 | 2019-12-29T12:41:29.000Z | 2021-12-01T21:13:20.000Z | examples/plotting/field_pole_figure.py | heprom/pymicro | 176bf3a829dbf67796a3d4471f18868a3da229a7 | [
"MIT"
] | 18 | 2017-03-21T12:43:19.000Z | 2022-03-22T14:30:06.000Z | from pymicro.crystal.microstructure import *
from pymicro.crystal.texture import *
from pymicro.examples import PYMICRO_EXAMPLES_DATA_DIR
from matplotlib import pyplot as plt, colors, colorbar, cm
import pathlib as pl
'''This example demonstrate how a field can be used to color each symbol on
the pole figure with th... | 34.553191 | 93 | 0.75431 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 572 | 0.352217 |
40a57bcb86583811e90d8029258fdefae6a38a7d | 11,634 | py | Python | model/img2seq_torch.py | marcoleewow/LaTeX_OCR | 0980ea719f8d3175a6bbf6af18873dd72d04b8c7 | [
"Apache-2.0"
] | 290 | 2019-04-04T01:52:32.000Z | 2022-03-30T08:07:53.000Z | model/img2seq_torch.py | w32zhong/LaTeX_OCR | 1e1f196468e678c93dfa2d8ab2ba02fbda38a3c0 | [
"Apache-2.0"
] | 23 | 2019-06-11T05:07:58.000Z | 2022-03-11T23:44:17.000Z | model/img2seq_torch.py | w32zhong/LaTeX_OCR | 1e1f196468e678c93dfa2d8ab2ba02fbda38a3c0 | [
"Apache-2.0"
] | 81 | 2019-04-06T11:40:34.000Z | 2022-02-28T15:08:05.000Z | import time
import sys
import os
import numpy as np
import torch
import torch.nn as nn
import torchvision.models as models
from torch.nn.utils.rnn import pack_padded_sequence
from model.base_torch import BaseModel
from model.utils.general import init_dir, get_logger
from model.utils.general import Progb... | 42.772059 | 147 | 0.577016 | 10,686 | 0.918515 | 0 | 0 | 0 | 0 | 0 | 0 | 3,171 | 0.272563 |
40a5a49f8963d40bc4247496570aa980197c909d | 719 | py | Python | src/third_party/dart/tools/dom/scripts/all_tests.py | rhencke/engine | 1016db292c4e73374a0a11536b18303c9522a224 | [
"BSD-3-Clause"
] | 21 | 2021-06-04T21:08:21.000Z | 2022-03-04T14:21:34.000Z | src/third_party/dart/tools/dom/scripts/all_tests.py | rhencke/engine | 1016db292c4e73374a0a11536b18303c9522a224 | [
"BSD-3-Clause"
] | 1 | 2021-01-21T14:45:59.000Z | 2021-01-21T14:45:59.000Z | src/third_party/dart/tools/dom/scripts/all_tests.py | rhencke/engine | 1016db292c4e73374a0a11536b18303c9522a224 | [
"BSD-3-Clause"
] | 9 | 2021-03-16T09:29:26.000Z | 2022-01-06T08:38:10.000Z | #!/usr/bin/python
# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
"""This entry point runs all script tests."""
import logging.config
import unittest
if ... | 37.842105 | 76 | 0.719054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 471 | 0.655076 |
40a5c13d7bfe8ebdc535f6e928718db2cd73a81f | 623 | py | Python | src/11/11367.py | youngdaLee/Baekjoon | 7d858d557dbbde6603fe4e8af2891c2b0e1940c0 | [
"MIT"
] | 11 | 2020-09-20T15:17:11.000Z | 2022-03-17T12:43:33.000Z | src/11/11367.py | youngdaLee/Baekjoon | 7d858d557dbbde6603fe4e8af2891c2b0e1940c0 | [
"MIT"
] | 3 | 2021-10-30T07:51:36.000Z | 2022-03-09T05:19:23.000Z | src/11/11367.py | youngdaLee/Baekjoon | 7d858d557dbbde6603fe4e8af2891c2b0e1940c0 | [
"MIT"
] | 13 | 2021-01-21T03:19:08.000Z | 2022-03-28T10:44:58.000Z | """
11367. Report Card Time
작성자: xCrypt0r
언어: Python 3
사용 메모리: 29,380 KB
소요 시간: 64 ms
해결 날짜: 2020년 9월 18일
"""
def main():
for _ in range(int(input())):
name, score = input().split()
score = int(score)
if score < 60: grade = 'F'
elif score < 67: grade = 'D'
elif score < 70:... | 20.096774 | 37 | 0.499197 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.294737 |
40a5dc8510f8fdf8f4c9c7d29bd318a4e6deedc1 | 49,691 | py | Python | imgaug/augmentables/bbs.py | bill0714/imgaug | 5abdc4d9d7f512ba34c78955557b174a64ad22a6 | [
"MIT"
] | 1 | 2019-10-25T17:43:20.000Z | 2019-10-25T17:43:20.000Z | imgaug/augmentables/bbs.py | RTANC/imgaug | 2a3161550a4a1895a227bb8856d525e69a7d503d | [
"MIT"
] | null | null | null | imgaug/augmentables/bbs.py | RTANC/imgaug | 2a3161550a4a1895a227bb8856d525e69a7d503d | [
"MIT"
] | null | null | null | from __future__ import print_function, division, absolute_import
import copy
import numpy as np
import skimage.draw
import skimage.measure
from .. import imgaug as ia
from .utils import normalize_shape, project_coords
# TODO functions: square(), to_aspect_ratio(), contains_point()
class BoundingBox(object):
""... | 33.327297 | 127 | 0.55666 | 49,400 | 0.994144 | 0 | 0 | 8,788 | 0.176853 | 0 | 0 | 31,539 | 0.634702 |
40a5de5724e10b92314c5b47739791ffcddafb72 | 2,891 | py | Python | scanner_relay/run.py | breakds/brokering | fa63d5ed8057a8018bcb11aaebce689c8d18e7ba | [
"MIT"
] | null | null | null | scanner_relay/run.py | breakds/brokering | fa63d5ed8057a8018bcb11aaebce689c8d18e7ba | [
"MIT"
] | null | null | null | scanner_relay/run.py | breakds/brokering | fa63d5ed8057a8018bcb11aaebce689c8d18e7ba | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from twisted.internet import endpoints
from twisted.internet import protocol
from twisted.internet import defer
from twisted.mail import imap4
from scanner_relay.pipeline import Pipeline
from scanner_relay.authentication import PassStoreFetcher, PlainPasswordFetcher
import logging
# Global con... | 34.416667 | 93 | 0.71982 | 1,636 | 0.565894 | 0 | 0 | 0 | 0 | 0 | 0 | 828 | 0.286406 |
40a624029504fa50d779ccdfdaa5ed5b7ed61a95 | 1,202 | py | Python | cubes_pilingup.py | akiselev1/hackerrank-solutions | 53c2a76c71c9b3553c077ccfde5178b27594ae72 | [
"MIT"
] | null | null | null | cubes_pilingup.py | akiselev1/hackerrank-solutions | 53c2a76c71c9b3553c077ccfde5178b27594ae72 | [
"MIT"
] | null | null | null | cubes_pilingup.py | akiselev1/hackerrank-solutions | 53c2a76c71c9b3553c077ccfde5178b27594ae72 | [
"MIT"
] | null | null | null | """
Created by akiselev on 2019-06-14
There is a horizontal row of cubes. The length of each cube is given. You need to create a new vertical pile of cubes. The new pile should follow these directions: if is on top of then
.
When stacking the cubes, you can only pick up either the leftmost or the rightmost cube ... | 23.115385 | 205 | 0.689684 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 928 | 0.772047 |
40a999434640883a137547c775c396581c90f8a2 | 14,674 | py | Python | flask_web/bootstrap_web_core_py3.py | bopopescu/docker_images_a | 348d0982c5962f2ae34d10183ed9522b7a6fe286 | [
"MIT"
] | null | null | null | flask_web/bootstrap_web_core_py3.py | bopopescu/docker_images_a | 348d0982c5962f2ae34d10183ed9522b7a6fe286 | [
"MIT"
] | null | null | null | flask_web/bootstrap_web_core_py3.py | bopopescu/docker_images_a | 348d0982c5962f2ae34d10183ed9522b7a6fe286 | [
"MIT"
] | null | null | null | #
#
# File: flask_web_py3.py
#
#
#
import os
import json
import redis
import urllib
import flask
from flask import Flask
from flask import render_template,jsonify
from flask_httpauth import HTTPDigestAuth
from flask import request, session, url_for
from redis_support_py3.graph_query_support_py3 impo... | 34.855107 | 147 | 0.568284 | 12,806 | 0.872462 | 0 | 0 | 0 | 0 | 0 | 0 | 3,663 | 0.249557 |
40a99a0c9d4869b889926f6fe54b50b768c6cb98 | 4,160 | py | Python | git_talk/lib/changelog/main.py | cove9988/git-talk | 9f549d8565948a150834bcaa704b55ae15c094c1 | [
"MIT"
] | 5 | 2020-04-06T11:00:27.000Z | 2020-09-30T15:16:56.000Z | git_talk/lib/changelog/main.py | ggdrg/git-talk | 89ed00caa6a426ea9d5fa84cbef588d07aebc1f0 | [
"MIT"
] | 3 | 2020-09-26T02:53:30.000Z | 2020-10-09T01:46:37.000Z | git_talk/lib/changelog/main.py | ggdrg/git-talk | 89ed00caa6a426ea9d5fa84cbef588d07aebc1f0 | [
"MIT"
] | 1 | 2020-09-25T23:41:54.000Z | 2020-09-25T23:41:54.000Z |
import os
import logging
from typing import Optional
import click
from git_talk.lib.changelog import generate_changelog
from git_talk.lib.changelog.presenter import MarkdownPresenter
from git_talk.lib.changelog.repository import GitRepository
# @click.command()
# @click.option(
# "-r",
# ... | 33.821138 | 122 | 0.629567 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,357 | 0.566587 |
40ab6e634c98f0a3601e54792ef5853e9f4bf06f | 6,429 | py | Python | SQED-Generator/Generators/constraint_generator.py | upscale-project/generic-sqed-demo | aa44a7563e6249c6f0641c13e8ca0b013c497df1 | [
"BSD-3-Clause"
] | 6 | 2019-09-10T02:56:47.000Z | 2021-12-18T11:17:16.000Z | SQED-Generator/Generators/constraint_generator.py | upscale-project/generic-sqed-demo | aa44a7563e6249c6f0641c13e8ca0b013c497df1 | [
"BSD-3-Clause"
] | 1 | 2019-07-19T17:05:20.000Z | 2019-07-19T17:05:20.000Z | SQED-Generator/Generators/constraint_generator.py | upscale-project/generic-sqed-demo | aa44a7563e6249c6f0641c13e8ca0b013c497df1 | [
"BSD-3-Clause"
] | 2 | 2019-10-02T00:35:14.000Z | 2019-10-23T21:13:14.000Z | # Copyright (c) Stanford University
#
# This source code is patent protected and being made available under the
# terms explained in the ../LICENSE-Academic and ../LICENSE-GOV files.
# Author: Mario J Srouji
# Email: msrouji@stanford.edu
import copy
import sys
sys.path.append("../FormatParsers/")
sys.path.append("../... | 36.737143 | 116 | 0.586872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,141 | 0.177477 |
40abfa616e38a32a5059cf71c64a0d859cac8dd9 | 3,624 | py | Python | modules/losses.py | Sapperdomonik/retinaface-tf2 | af06baffb7f5bd099e5ca6fec51c94ed298a3926 | [
"MIT"
] | null | null | null | modules/losses.py | Sapperdomonik/retinaface-tf2 | af06baffb7f5bd099e5ca6fec51c94ed298a3926 | [
"MIT"
] | null | null | null | modules/losses.py | Sapperdomonik/retinaface-tf2 | af06baffb7f5bd099e5ca6fec51c94ed298a3926 | [
"MIT"
] | null | null | null | import tensorflow as tf
def _smooth_l1_loss(y_true, y_pred):
t = tf.abs(y_pred - y_true)
return tf.where(t < 1, 0.5 * t ** 2, t - 0.5)
def MultiBoxLoss(num_class=2, neg_pos_ratio=3):
"""multi-box loss"""
def multi_box_loss(y_true, y_pred):
num_batch = tf.shape(y_true)[0]
num_prior = ... | 48.32 | 79 | 0.625828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 398 | 0.109823 |
40ac4ec777b7bc387be14a996d46bdf5f0da5291 | 2,416 | py | Python | tests.py | ckelly/pybingmaps | 9214e3a4c2c9e756848fac7c0d76c46dcc64b65d | [
"MIT"
] | null | null | null | tests.py | ckelly/pybingmaps | 9214e3a4c2c9e756848fac7c0d76c46dcc64b65d | [
"MIT"
] | null | null | null | tests.py | ckelly/pybingmaps | 9214e3a4c2c9e756848fac7c0d76c46dcc64b65d | [
"MIT"
] | null | null | null | import unittest
import random
from time import sleep
import os
from bingmaps import *
class BingMapsTestError(Exception):
"""Bing Maps test exception"""
def __init__(self, reason):
self.reason = unicode(reason)
def __str__(self):
return self.reason
# TODO: enter your key for testing
api... | 29.82716 | 78 | 0.598096 | 2,221 | 0.919288 | 0 | 0 | 0 | 0 | 0 | 0 | 701 | 0.290149 |
40acba1acfb883bbd0db070af8041dc100486a53 | 1,153 | py | Python | fds/config.py | dvershinin/fds | 4c4c96deb3d2bbe4d0853f601c3dc2b87801ced4 | [
"BSD-2-Clause"
] | 9 | 2020-04-29T14:25:06.000Z | 2021-12-30T03:28:05.000Z | fds/config.py | dvershinin/fds | 4c4c96deb3d2bbe4d0853f601c3dc2b87801ced4 | [
"BSD-2-Clause"
] | 18 | 2020-01-28T22:07:07.000Z | 2022-03-20T16:06:12.000Z | fds/config.py | dvershinin/fds | 4c4c96deb3d2bbe4d0853f601c3dc2b87801ced4 | [
"BSD-2-Clause"
] | null | null | null | from cds.CloudflareWrapper import suggest_set_up, cf_config_filename
from .FirewallWrapper import FirewallWrapper
import logging as log
def open_web_if_webserver_running():
fw = FirewallWrapper()
from .utils import is_process_running, query_yes_no
webserver_running = is_process_running('nginx')
if web... | 36.03125 | 86 | 0.692975 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 290 | 0.251518 |
40adb16a80ad4faf260352c08db6efc0124c7ac3 | 450 | py | Python | awardapp/migrations/0004_auto_20191024_1607.py | Elisephan/Awards-project | 269bfbe45a35338fab9c71fc7d8de48b61b1580b | [
"MIT"
] | null | null | null | awardapp/migrations/0004_auto_20191024_1607.py | Elisephan/Awards-project | 269bfbe45a35338fab9c71fc7d8de48b61b1580b | [
"MIT"
] | null | null | null | awardapp/migrations/0004_auto_20191024_1607.py | Elisephan/Awards-project | 269bfbe45a35338fab9c71fc7d8de48b61b1580b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-10-24 16:07
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('awardapp', '0003_auto_20191024_1606'),
]
operations = [
migrations.AlterField... | 21.428571 | 51 | 0.617778 | 294 | 0.653333 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.264444 |
40adc41d2f17560f722bc8589f813ea290672937 | 21,395 | py | Python | hikari/events/channel_events.py | Reliku/hikari | c6e62b750ce35885a5e4124ffe8df6445ab34acd | [
"MIT"
] | null | null | null | hikari/events/channel_events.py | Reliku/hikari | c6e62b750ce35885a5e4124ffe8df6445ab34acd | [
"MIT"
] | null | null | null | hikari/events/channel_events.py | Reliku/hikari | c6e62b750ce35885a5e4124ffe8df6445ab34acd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# cython: language_level=3
# Copyright (c) 2020 Nekokatt
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights... | 33.906498 | 119 | 0.686282 | 17,046 | 0.796728 | 0 | 0 | 18,973 | 0.886796 | 5,217 | 0.243842 | 10,967 | 0.512596 |
40af0b1139a38fce3114910895fc7959fcc89bca | 8,649 | py | Python | tests/unit/test_coordinator.py | sopel39/presto-admin | 6e7aee3427bdbea6da2deb41b7f090ef6fdcadd9 | [
"Apache-2.0"
] | 34 | 2016-01-08T21:02:13.000Z | 2017-03-10T02:01:03.000Z | tests/unit/test_coordinator.py | sopel39/presto-admin | 6e7aee3427bdbea6da2deb41b7f090ef6fdcadd9 | [
"Apache-2.0"
] | 3 | 2016-01-27T19:11:14.000Z | 2016-12-02T21:29:53.000Z | tests/unit/test_coordinator.py | sopel39/presto-admin | 6e7aee3427bdbea6da2deb41b7f090ef6fdcadd9 | [
"Apache-2.0"
] | 5 | 2016-04-29T05:27:43.000Z | 2018-01-12T07:50:25.000Z | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | 47.78453 | 78 | 0.492889 | 7,851 | 0.907735 | 0 | 0 | 2,283 | 0.263961 | 0 | 0 | 3,528 | 0.407908 |
40af4a6cd5eabd173caad42e65be14761273bd46 | 3,911 | py | Python | other/string chains/strings4.py | saulc/myth-math | 5e278eb8fbaf16a01f5f021aca2142e5ce3131ec | [
"MIT"
] | null | null | null | other/string chains/strings4.py | saulc/myth-math | 5e278eb8fbaf16a01f5f021aca2142e5ce3131ec | [
"MIT"
] | null | null | null | other/string chains/strings4.py | saulc/myth-math | 5e278eb8fbaf16a01f5f021aca2142e5ce3131ec | [
"MIT"
] | null | null | null | # Saul Castro
# Hiralben Hirpara
# config file format
import random
def openFile():
file = open("test.txt", 'r')
return file
def printFile(f):
print(f.read())
def readInput():
testout = "CarpenteRatcheThread"
file = open("test.txt", 'r')
s = str(file.read())
words = s.split(" ");
... | 25.730263 | 85 | 0.504475 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,054 | 0.269496 |
40b182cffd8ba6689e9b3d11caa57c733d863c65 | 2,646 | py | Python | supervised_learning/analysis.py | gonzalezJohnas/SpeechCommand-recognition | d5351abe45c571a075c24bd04d328e76293f9230 | [
"MIT"
] | null | null | null | supervised_learning/analysis.py | gonzalezJohnas/SpeechCommand-recognition | d5351abe45c571a075c24bd04d328e76293f9230 | [
"MIT"
] | 2 | 2021-04-10T18:12:44.000Z | 2022-02-09T23:36:43.000Z | supervised_learning/analysis.py | gonzalezJohnas/SpeechCommand-recognition | d5351abe45c571a075c24bd04d328e76293f9230 | [
"MIT"
] | null | null | null | from global_utils import *
# target word
TARGET_WORD = 'right'
def display_lowpass_normal(wav, lowpass_signal, fs, label=''):
fig, (axs_raw, axs_low) = plt.subplots(2)
fig.tight_layout(pad=3.0)
fig.set_figheight(FIG_HEIGHT)
fig.set_figwidth(FIG_WIDTH)
# display the plot
axs_raw.plot(wav)
... | 29.730337 | 103 | 0.708239 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 427 | 0.161376 |
40b1a05b02e671eeb4b12cc51ccc3740e6e21280 | 2,010 | py | Python | qnarre/base/proof.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/base/proof.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/base/proof.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2019 Quantapix Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 30.454545 | 79 | 0.570149 | 1,240 | 0.616915 | 0 | 0 | 524 | 0.260697 | 0 | 0 | 732 | 0.364179 |
40b2a0543dc5434ad9bc96313563cef627bd5d42 | 6,636 | py | Python | learningPygame/Dave/06-SpaceInvaders/space_invaders.py | Rosebotics/catapult2019 | 4f125632f4d144b97ee3ecaf00a517780d510a70 | [
"MIT"
] | null | null | null | learningPygame/Dave/06-SpaceInvaders/space_invaders.py | Rosebotics/catapult2019 | 4f125632f4d144b97ee3ecaf00a517780d510a70 | [
"MIT"
] | null | null | null | learningPygame/Dave/06-SpaceInvaders/space_invaders.py | Rosebotics/catapult2019 | 4f125632f4d144b97ee3ecaf00a517780d510a70 | [
"MIT"
] | null | null | null | import pygame, sys, random, time
from pygame.locals import *
class Missile:
def __init__(self, screen, x):
# Store the data. Initialize: y to 591 and exploded to False.
self.screen = screen
self.x = x
self.y = 591
self.exploded = False
def move(self):
# ... | 32.851485 | 104 | 0.583484 | 4,449 | 0.670434 | 0 | 0 | 181 | 0.027275 | 0 | 0 | 1,717 | 0.25874 |