hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f755b0462494c8c56ef315c454c2130ad1187c1d | 43,828 | py | Python | src/instabot.py | cyberjinmics/master | 92b86c58331d800963a63d34dbb7ac967d553de1 | [
"MIT"
] | null | null | null | src/instabot.py | cyberjinmics/master | 92b86c58331d800963a63d34dbb7ac967d553de1 | [
"MIT"
] | null | null | null | src/instabot.py | cyberjinmics/master | 92b86c58331d800963a63d34dbb7ac967d553de1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from .userinfo import UserInfo
import datetime
import json
import logging
import time
import requests
from requests_toolbelt import MultipartEncoder
import uuid
import re
from .commentGen import commentGen
from .filesCoun... | 43.696909 | 232 | 0.526444 |
f755b8b8407f83f29cc2ddc1c51ef7a139e40350 | 8,360 | py | Python | bayesian_bootstrap/tests/test_bootstrap.py | vishalbelsare/bayesian_bootstrap | 57a093a128ac1aaf7ff7a6cf70f6b05d684589d7 | [
"MIT"
] | 118 | 2017-06-27T05:23:12.000Z | 2022-03-21T05:50:44.000Z | bayesian_bootstrap/tests/test_bootstrap.py | vishalbelsare/bayesian_bootstrap | 57a093a128ac1aaf7ff7a6cf70f6b05d684589d7 | [
"MIT"
] | 18 | 2017-08-28T13:25:16.000Z | 2022-03-12T16:58:38.000Z | bayesian_bootstrap/tests/test_bootstrap.py | vishalbelsare/bayesian_bootstrap | 57a093a128ac1aaf7ff7a6cf70f6b05d684589d7 | [
"MIT"
] | 19 | 2017-07-06T13:10:32.000Z | 2022-01-25T19:50:34.000Z | import unittest
import numpy as np
import scipy
import random
import bayesian_bootstrap.bootstrap as bb
from bayesian_bootstrap.bootstrap import (
mean,
var,
bayesian_bootstrap,
central_credible_interval,
highest_density_interval,
BayesianBootstrapBagging,
covar,
)
from sklearn.linear_model ... | 42.222222 | 99 | 0.651196 |
f755bbad225ae4b40f0766382732b3d109c04490 | 2,084 | py | Python | helper_functions/join_main_category.py | jvario/inside_Airbnb-Athens- | 8abae93756d1e4388f770dfb073ec27cfc9bacbf | [
"MIT"
] | 1 | 2021-04-12T16:03:59.000Z | 2021-04-12T16:03:59.000Z | helper_functions/join_main_category.py | jvario/inside_Airbnb-Athens | 8abae93756d1e4388f770dfb073ec27cfc9bacbf | [
"MIT"
] | null | null | null | helper_functions/join_main_category.py | jvario/inside_Airbnb-Athens | 8abae93756d1e4388f770dfb073ec27cfc9bacbf | [
"MIT"
] | null | null | null | import pandas as pd
import collections as col
import numpy as np
def join_main_category(new_category, sub_categories, word_dict, size, data):
'''
this function joins sub_categories into a main category
==============================================================
input:
- new_... | 31.575758 | 84 | 0.502879 |
f755c7ac3138218c3758b8cc5e84d4a4b9b404ea | 2,818 | py | Python | transmanager/forms.py | APSL/transmanager | 79157085840008e146b264521681913090197ed1 | [
"MIT"
] | 18 | 2016-06-01T15:47:43.000Z | 2018-07-10T22:04:21.000Z | transmanager/forms.py | APSL/transmanager | 79157085840008e146b264521681913090197ed1 | [
"MIT"
] | 13 | 2016-06-21T15:19:30.000Z | 2021-06-10T19:21:39.000Z | transmanager/forms.py | APSL/transmanager | 79157085840008e146b264521681913090197ed1 | [
"MIT"
] | 1 | 2017-02-10T07:40:50.000Z | 2017-02-10T07:40:50.000Z | # -*- encoding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.forms import ModelForm
from django import forms
from transmanager.utils import get_model_choices, get_application_choices
from .models import TransTask, TransModelLanguage, TransApplicationLanguage, TransUser
class TransAp... | 39.138889 | 107 | 0.666075 |
f755fcaff4d7f1e8da88b566f47517988593c88b | 3,332 | py | Python | socfaker/useragent.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | null | null | null | socfaker/useragent.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | null | null | null | socfaker/useragent.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | null | null | null | import json, requests, datetime, random, os
from bs4 import BeautifulSoup
__USER_AGENT_URL__ = 'http://www.useragentstring.com/pages/useragentstring.php?name={}'
class UserAgent(object):
__DATA_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), 'data', 'useragent' + '.json'))
BROWSER_LIST = ['... | 35.827957 | 108 | 0.558824 |
f756009c639a9d03dd455770351da4371a7b7f0f | 3,126 | py | Python | bigml/tests/compute_multivote_prediction_steps.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:38.000Z | 2021-08-30T20:18:38.000Z | bigml/tests/compute_multivote_prediction_steps.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | null | null | null | bigml/tests/compute_multivote_prediction_steps.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:40.000Z | 2021-08-30T20:18:40.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2012, 2015-2019 BigML
#
# 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... | 34.733333 | 75 | 0.709853 |
f7568c1e207d95524bea82c452c6e6a9fc23ebb2 | 5,213 | py | Python | flask_mailman/backends/smtp.py | jugmac00/flask-mailman | 248b7d0376d2a2b4bafbf876869e853039963755 | [
"BSD-3-Clause"
] | null | null | null | flask_mailman/backends/smtp.py | jugmac00/flask-mailman | 248b7d0376d2a2b4bafbf876869e853039963755 | [
"BSD-3-Clause"
] | null | null | null | flask_mailman/backends/smtp.py | jugmac00/flask-mailman | 248b7d0376d2a2b4bafbf876869e853039963755 | [
"BSD-3-Clause"
] | null | null | null | """SMTP email backend class."""
import smtplib
import ssl
import threading
from flask_mailman.backends.base import BaseEmailBackend
from flask_mailman.message import sanitize_address
from flask_mailman.utils import DNS_NAME
class EmailBackend(BaseEmailBackend):
"""
A wrapper that manages the SMTP network con... | 39.793893 | 95 | 0.615576 |
f756d4d4313a30f55d891f7959d655cbc188e8c8 | 1,808 | py | Python | pandaserver/test/testEvgen17.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | 7 | 2015-03-30T14:15:35.000Z | 2021-12-22T06:48:22.000Z | pandaserver/test/testEvgen17.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | 16 | 2015-06-01T13:48:01.000Z | 2022-02-08T15:03:32.000Z | pandaserver/test/testEvgen17.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | 15 | 2015-03-02T08:57:35.000Z | 2022-03-01T09:48:45.000Z | import sys
import time
import uuid
import pandaserver.userinterface.Client as Client
from pandaserver.taskbuffer.JobSpec import JobSpec
from pandaserver.taskbuffer.FileSpec import FileSpec
site = sys.argv[1]
cloud = sys.argv[2]
datasetName = 'panda.destDB.%s' % str(uuid.uuid4())
destName = None
jobList = []
fo... | 30.644068 | 92 | 0.646018 |
f75711e7673714e980140d95602d3fe767cbd7d4 | 135 | py | Python | super32emu/__init__.py | xsjad0/Super32 | 75cf5828b17cdbce144447a69ff3d1be7ad601f2 | [
"BSD-3-Clause"
] | 1 | 2019-12-07T01:56:31.000Z | 2019-12-07T01:56:31.000Z | super32emu/__init__.py | xsjad0/Super32 | 75cf5828b17cdbce144447a69ff3d1be7ad601f2 | [
"BSD-3-Clause"
] | 42 | 2019-11-30T12:57:07.000Z | 2020-02-26T16:30:33.000Z | super32emu/__init__.py | xsjad0/Super32 | 75cf5828b17cdbce144447a69ff3d1be7ad601f2 | [
"BSD-3-Clause"
] | 4 | 2019-11-27T15:05:33.000Z | 2020-05-13T06:51:21.000Z | """
Super32 Emulator
"""
import logging
from logging import NullHandler
logging.getLogger(__name__).addHandler(logging.NullHandler())
| 16.875 | 61 | 0.8 |
f7572e46cf84f9f71326eba212a7083feb98b102 | 391 | py | Python | smcpy/utils/progress_bar.py | HarshilShrivastava/SMCPy | e3c958023aab3f3143e70de5a52e3c195e536dd1 | [
"NASA-1.3"
] | 1 | 2020-02-11T22:37:43.000Z | 2020-02-11T22:37:43.000Z | smcpy/utils/progress_bar.py | HarshilShrivastava/SMCPy | e3c958023aab3f3143e70de5a52e3c195e536dd1 | [
"NASA-1.3"
] | null | null | null | smcpy/utils/progress_bar.py | HarshilShrivastava/SMCPy | e3c958023aab3f3143e70de5a52e3c195e536dd1 | [
"NASA-1.3"
] | null | null | null | def set_bar(pbar, t, last_ess, ess, acceptance_ratio, resample_status):
pbar.set_description("Step number: {:2d} | Last ess: {:8.2f} | "
"Current ess: {:8.2f} | Samples accepted: "
"{:.1%} | {} |"
.format(t + 1, last_ess, ess, acceptance_rat... | 48.875 | 72 | 0.478261 |
f75739a9d3341380bad816fb37c329f8be9eb961 | 1,084 | py | Python | test/unittests/test_NRUNCON.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | test/unittests/test_NRUNCON.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | test/unittests/test_NRUNCON.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | import numpy as np
from VariableUnittest import VariableUnitTest
from gwlfe.BMPs.AgAnimal import NRUNCON
class TestNRUNCON(VariableUnitTest):
def test_NRUNCON(self):
z = self.z
np.testing.assert_array_almost_equal(
NRUNCON.NRUNCON_f(z.NYrs, z.GrazingAnimal_0, z.NumAnimals, z.AvgAnima... | 49.272727 | 116 | 0.592251 |
f757cc8bd60cfc76e1b8237ca16f2153d4331b9c | 882 | py | Python | tests/terraform/parser/test_plan_parser.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | null | null | null | tests/terraform/parser/test_plan_parser.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | 3 | 2020-02-07T19:51:40.000Z | 2022-03-21T05:06:29.000Z | tests/terraform/parser/test_plan_parser.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | null | null | null | import os
import unittest
from checkov.terraform.plan_parser import parse_tf_plan
class TestPlanFileParser(unittest.TestCase):
def test_tags_values_are_flattened(self):
current_dir = os.path.dirname(os.path.realpath(__file__))
valid_plan_path = current_dir + "/resources/plan_tags/tfplan.json"
... | 38.347826 | 85 | 0.71542 |
f757e142f2bdb777e0d12909c7f6d6346a03d7bd | 251 | py | Python | converter/rate_providers/__init__.py | giefferre/convert | 4f6dc199d32a7c7d4f531fc70e15865bd448a020 | [
"MIT"
] | 1 | 2020-02-28T20:17:19.000Z | 2020-02-28T20:17:19.000Z | converter/rate_providers/__init__.py | giefferre/convert | 4f6dc199d32a7c7d4f531fc70e15865bd448a020 | [
"MIT"
] | null | null | null | converter/rate_providers/__init__.py | giefferre/convert | 4f6dc199d32a7c7d4f531fc70e15865bd448a020 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Offers different rate providers meant to be used with the converter package.
"""
from .interface import RateProviderInterface
from .random_provider import RandomRateProvider
from .ecb_rate_provider import ECBRateProvider
| 25.1 | 76 | 0.792829 |
f758176ad2c5da0914a6ec7dc1d5061e8e166bfa | 6,537 | py | Python | moto/ecr/responses.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2018-01-29T14:50:38.000Z | 2018-05-12T10:45:31.000Z | moto/ecr/responses.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2021-03-31T20:15:51.000Z | 2021-12-13T20:50:52.000Z | moto/ecr/responses.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 12 | 2017-09-06T22:11:15.000Z | 2021-05-28T17:22:31.000Z | from __future__ import unicode_literals
import json
from base64 import b64encode
from datetime import datetime
import time
from moto.core.responses import BaseResponse
from .models import ecr_backends, DEFAULT_REGISTRY_ID
class ECRResponse(BaseResponse):
@property
def ecr_backend(self):
return ecr_ba... | 38.005814 | 113 | 0.666667 |
f758243fa477c542c1218633114993f0c127f9a8 | 6,130 | py | Python | rip.py | jiomvk/dash-widevine-rip | aec41bca7f7c7f4568d2134490584c05e30603ca | [
"MIT"
] | 1 | 2021-12-24T22:20:00.000Z | 2021-12-24T22:20:00.000Z | rip.py | jiomvk/dash-widevine-rip | aec41bca7f7c7f4568d2134490584c05e30603ca | [
"MIT"
] | null | null | null | rip.py | jiomvk/dash-widevine-rip | aec41bca7f7c7f4568d2134490584c05e30603ca | [
"MIT"
] | null | null | null | """
Given a TOML playlist configuration, rips a Widevine DRM-encrypted DASH stream by parsing
the MPD configuration, decrypting audio and video parts individually, then
combining them into a single video file.
"""
import os
import sys
from enum import Enum
from typing import Dict, List, Optional, Union
import requests... | 31.761658 | 89 | 0.640457 |
f7586b000eecdff1b43a09575d4a94ba7e456fa0 | 6,061 | py | Python | tests/test_core.py | joshfp/fastai | eb455070adaea072b4771e340d48a371c6c0c4e2 | [
"Apache-2.0"
] | 1 | 2019-01-29T22:13:29.000Z | 2019-01-29T22:13:29.000Z | tests/test_core.py | jamesrequa/fastai | 794365cd7f734b5e1027d7e19c99e648fbb9a12b | [
"Apache-2.0"
] | null | null | null | tests/test_core.py | jamesrequa/fastai | 794365cd7f734b5e1027d7e19c99e648fbb9a12b | [
"Apache-2.0"
] | null | null | null | import pytest, torch
import numpy as np
from fastai import *
from tempfile import TemporaryDirectory
def test_cpus(): assert num_cpus() >= 1
@pytest.mark.parametrize("p, q, expected", [
(5 , 1 , [5]),
(5 , [1,1], [5, 5]),
([5], 1 , [5]),
([5], [1,1], [5, 5]),
("ab" , "cd" , ["a", "... | 31.9 | 159 | 0.538855 |
f7586e47a874b10e20826983ab6c81b9596a93f7 | 59,284 | py | Python | pyseqlab/utilities.py | bratao/-PySeqLab | fea1c4bd4d43565b1bb20a789d78946e1022d0ff | [
"MIT"
] | 6 | 2019-05-03T22:14:11.000Z | 2022-03-04T10:36:31.000Z | pyseqlab/utilities.py | bratao/-PySeqLab | fea1c4bd4d43565b1bb20a789d78946e1022d0ff | [
"MIT"
] | 1 | 2020-11-12T02:46:15.000Z | 2020-11-12T03:12:45.000Z | pyseqlab/utilities.py | bratao/-PySeqLab | fea1c4bd4d43565b1bb20a789d78946e1022d0ff | [
"MIT"
] | 3 | 2019-05-04T03:50:49.000Z | 2020-06-27T00:43:29.000Z | """
@author: ahmed allam <ahmed.allam@yale.edu>
"""
import os
import pickle
import shutil
from datetime import datetime
from copy import deepcopy
from itertools import combinations
import heapq
import numpy
class SequenceStruct(object):
r"""class for representing each sequence/segment
Args:
... | 37.592898 | 145 | 0.547635 |
f7588f9831b205911cfc6947c1635fc66ee469d0 | 1,879 | py | Python | tests/test_commands.py | justengel/pybk8500 | 6a9748033c783a0081ec391359067dfb9dc83760 | [
"MIT"
] | null | null | null | tests/test_commands.py | justengel/pybk8500 | 6a9748033c783a0081ec391359067dfb9dc83760 | [
"MIT"
] | null | null | null | tests/test_commands.py | justengel/pybk8500 | 6a9748033c783a0081ec391359067dfb9dc83760 | [
"MIT"
] | null | null | null |
def test_names_to_values():
import pybk8500
cmd = pybk8500.CommandStatus(status=0x90)
assert cmd.status == 'Checksum incorrect'
assert cmd[3] == 0x90
cmd = pybk8500.CommandStatus(status='Parameter incorrect')
assert cmd.status == 'Parameter incorrect'
assert cmd[3] == 0xA0
cmd = pybk8... | 29.359375 | 73 | 0.646088 |
f75899682710b825a4a2780808cc8edb60bc6d6a | 107 | py | Python | tests/environment.py | linkml/linkml-csv | faab3ce6921d5558b2c552ad09077a0821d15b00 | [
"CC0-1.0"
] | 2 | 2021-08-05T16:00:35.000Z | 2021-08-22T22:47:14.000Z | tests/environment.py | linkml/linkml-csv | faab3ce6921d5558b2c552ad09077a0821d15b00 | [
"CC0-1.0"
] | 1 | 2021-08-09T17:57:15.000Z | 2021-08-22T23:47:08.000Z | tests/environment.py | linkml/linkml-csv | faab3ce6921d5558b2c552ad09077a0821d15b00 | [
"CC0-1.0"
] | null | null | null | from linkml_runtime.tests.support.test_environment import TestEnvironment
env = TestEnvironment(__file__)
| 26.75 | 73 | 0.869159 |
f758a59780503e88ef8d21698f3fe033ef9a5a93 | 7,258 | py | Python | scripts/python/blend_sat/ncvdefs.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2020-06-03T15:59:50.000Z | 2020-12-21T11:11:57.000Z | scripts/python/blend_sat/ncvdefs.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | null | null | null | scripts/python/blend_sat/ncvdefs.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2019-10-02T06:47:23.000Z | 2020-02-02T18:32:23.000Z | #!/usr/bin/env python
#
# File containing standard definitions for various things
#
# File suffixes or extensions
ADDS_SUFFIX = "bin"
ASC_SUFFIX = "asc"
BUFR_SUFFIX = "bufr"
EPL_SUFFIX = "epl"
GINI_SUFFIX = "gini"
GRB_SUFFIX = "grb"
GRB2_SUFFIX = "grb2"
GZIP_SUFFIX = "gz"
HDF_SUFFIX = "h5"
NC_SUFFIX = "nc"
NETCDF_SUF... | 46.229299 | 118 | 0.539267 |
f758c7f6537fbb8fe57f7d960b91163b1684542f | 414 | py | Python | implore/contact.py | skeptycal/implore | 18035c13b94e9277658d07baaaa519b41513f1d5 | [
"MIT",
"Unlicense"
] | null | null | null | implore/contact.py | skeptycal/implore | 18035c13b94e9277658d07baaaa519b41513f1d5 | [
"MIT",
"Unlicense"
] | null | null | null | implore/contact.py | skeptycal/implore | 18035c13b94e9277658d07baaaa519b41513f1d5 | [
"MIT",
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
""" Part of the `AutoSys` package
copyright (c) 2019 Michael Treanor
https://www.github.com/skeptycal/autosys
https://www.twitter.com/skeptycal
`AutoSys` is licensed under the `MIT License
`<https://opensource.org/licenses/MIT>`
"""
__license__ = "MIT"
... | 25.875 | 58 | 0.625604 |
f758c9c3c59b2323ce863aa66f0ffa57f7ffe669 | 1,709 | py | Python | for_imagenet/make_df_imagenet.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | for_imagenet/make_df_imagenet.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | for_imagenet/make_df_imagenet.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | import pandas as pd
from PIL import Image
from pathlib import Path
def make_df_imagenet(dataset):
"""
Making Pandas Dataframes of the extracted data
"""
# Making lists of class columns
classes = list(Path(dataset).iterdir())
classes = [p.stem for p in classes if p.is_dir()]
class_ids = [i f... | 24.768116 | 69 | 0.613224 |
f758f8137e12b5019a86ae0c59dcfac15b4f2754 | 1,133 | py | Python | clients/client/python/test/test_submit_self_service_settings_flow_with_lookup_method_body.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | clients/client/python/test/test_submit_self_service_settings_flow_with_lookup_method_body.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | clients/client/python/test/test_submit_self_service_settings_flow_with_lookup_method_body.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.71
Contact: support@ory.sh
Generated by: htt... | 30.621622 | 194 | 0.765225 |
f759071c0f22a55808078a5530bb400e6beac4de | 313 | py | Python | python/divide_and_conquer/0241_different_ways_to_add_parentheses.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/divide_and_conquer/0241_different_ways_to_add_parentheses.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/divide_and_conquer/0241_different_ways_to_add_parentheses.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | class Solution(object):
def diffWaysToCompute(self, input):
"""
:type input: str
:rtype: List[int]
"""
def test_diff_ways_to_compute():
s = Solution()
assert [0, 2] == s.diffWaysToCompute("2-1-1")
assert [-34, -14, -10, -10, 10] == s.diffWaysToCompute("2*3-4*5")
| 24.076923 | 69 | 0.5623 |
f7591e2bcfc6581618fc921d0934663aa46466ea | 782 | py | Python | table_test.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | 2 | 2015-05-25T10:47:30.000Z | 2017-12-12T18:15:00.000Z | table_test.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | table_test.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | from go import os
from go import path.filepath as F
import table
D ='/tmp/_aphid_test_skiplist_'
try:
os.RemoveAll(D)
except:
pass
os.Mkdir(D, 0777)
fd = os.Create(F.Join(D, 't.001'))
print >>fd, '''
# comment
+0012345.0{tab}color{tab}red
+0012345.0{tab}flavor{tab}lime
+0012345.0{tab}size{tab}XL
;
# overrides
+... | 17.377778 | 34 | 0.64578 |
f759291a9b889532433b133745164006cd72e6b6 | 28,950 | py | Python | sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_instances_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_instances_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_instances_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 50.347826 | 205 | 0.656304 |
f759405eae3f0972d492d671bf41c7e59cc6fc60 | 1,965 | py | Python | ch01_arrays_and_strings/1.5_one-away.py | appletreeisyellow/cracking-the-coding-interview | dc04c1c1e75a58bd543a298520f4595425f38104 | [
"MIT"
] | null | null | null | ch01_arrays_and_strings/1.5_one-away.py | appletreeisyellow/cracking-the-coding-interview | dc04c1c1e75a58bd543a298520f4595425f38104 | [
"MIT"
] | null | null | null | ch01_arrays_and_strings/1.5_one-away.py | appletreeisyellow/cracking-the-coding-interview | dc04c1c1e75a58bd543a298520f4595425f38104 | [
"MIT"
] | null | null | null | import unittest
"""
1.5 One Away
There are three types of edits that can be performed on
strings: insert a character, remove a character, or
replace a character. Given two strings, write a function
to check if they are one edit (or zero edits) away.
EXAMPLE
pale, ple -> true
pales, pale -> true
pa... | 23.392857 | 84 | 0.619338 |
f75946835957a8acf98ace050c01ca03382cc071 | 3,283 | py | Python | run_combinations.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | null | null | null | run_combinations.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | null | null | null | run_combinations.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | 2 | 2022-03-20T10:30:38.000Z | 2022-03-22T06:39:14.000Z | from combinations.equal_weight import EqualWeight
from combinations.pso_model import PSO
from combinations.recursive_method import RecursiveEnsemble
import constants as const
import pandas as pd
import numpy as np
def run_combinations(horizon, forecast, forecast_test, data_train, data_out_sample):
weights = {'wei... | 39.554217 | 120 | 0.672251 |
f7595e283208a3c72d22c1fb4ad67499563ddad1 | 481 | py | Python | orderbook_veinte/orderbook/serializers/user_serializer.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | orderbook_veinte/orderbook/serializers/user_serializer.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | orderbook_veinte/orderbook/serializers/user_serializer.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null |
#RESTFRAMEWORK
from rest_framework import serializers
#MODELS
from orderbook_veinte.orderbook.models import Orders , OrderStatus
class OrdersStatusSerializer(serializers.ModelSerializer):
class Meta:
model = OrderStatus
fields = ('status' ,)
class UserOrderSerializer(serializers.ModelSerializer... | 28.294118 | 67 | 0.717256 |
f75968bd86296466d947e2ad0a811abf6895a0cc | 2,376 | py | Python | api/preprint_providers/serializers.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | api/preprint_providers/serializers.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | api/preprint_providers/serializers.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | null | null | null | from rest_framework import serializers as ser
from api.base.utils import absolute_reverse
from api.base.serializers import JSONAPISerializer, LinksField, RelationshipField
class PreprintProviderSerializer(JSONAPISerializer):
filterable_fields = frozenset([
'name',
'description',
'id'
... | 35.462687 | 82 | 0.708754 |
f759773bff22215f99aeb7cd4c02e4f0c313be51 | 3,446 | py | Python | var/spack/repos/builtin/packages/podman/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/podman/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/podman/package.py | flatironinstitute/spack | 71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Podman(Package):
"""An optionally rootless and daemonless container engine: alias docker=p... | 42.02439 | 95 | 0.624782 |
f759830e4bcb7357e6849657d19d5c253389a8bc | 22,105 | py | Python | mars/web/session.py | deka108/mars | 2cd39847c188bb690dd5e2d612a5cbe9f7b21eca | [
"Apache-2.0"
] | 1 | 2021-11-30T12:07:21.000Z | 2021-11-30T12:07:21.000Z | mars/web/session.py | deka108/mars | 2cd39847c188bb690dd5e2d612a5cbe9f7b21eca | [
"Apache-2.0"
] | null | null | null | mars/web/session.py | deka108/mars | 2cd39847c188bb690dd5e2d612a5cbe9f7b21eca | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 43.599606 | 109 | 0.637412 |
f75984683c30422d5523fd446980cf97f130084c | 2,436 | py | Python | .eggs/boto-2.48.0-py2.7.egg/boto/sdb/db/blob.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | .eggs/boto-2.48.0-py2.7.egg/boto/sdb/db/blob.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | .eggs/boto-2.48.0-py2.7.egg/boto/sdb/db/blob.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy,... | 31.636364 | 74 | 0.655583 |
f759bb46f3df8999dd717e22a0200a95b4ce2a85 | 3,141 | py | Python | data_utils/hdf5_utils.py | gvalvano/idas | e1b112c8d0cd17b2b8486435dfe9de477bca2221 | [
"Apache-2.0"
] | 29 | 2020-07-04T00:04:28.000Z | 2022-03-18T01:49:34.000Z | idas/data_utils/hdf5_utils.py | gvalvano/unet_crf_as_rnn | 31b79741b77614764dcf3d2690fe0b0fab44934d | [
"Apache-2.0"
] | 2 | 2020-10-31T14:41:02.000Z | 2021-11-21T18:16:19.000Z | data_utils/hdf5_utils.py | gvalvano/idas | e1b112c8d0cd17b2b8486435dfe9de477bca2221 | [
"Apache-2.0"
] | 7 | 2020-10-21T01:02:52.000Z | 2021-11-14T16:52:18.000Z | """
Utilities for hdf5 data
"""
# Copyright 2019 Gabriele Valvano
#
# 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 require... | 31.41 | 111 | 0.672716 |
f759cda21dbe457e3133af64b52b3118a76109d9 | 1,514 | py | Python | cog/command/beta.py | DrLarck/DiscordBallZ_ | c274e26efce4c5a757d258c54bc285d118618751 | [
"MIT"
] | 4 | 2020-01-19T13:53:43.000Z | 2020-01-20T13:34:17.000Z | cog/command/beta.py | DrLarck/DiscordBallZ_ | c274e26efce4c5a757d258c54bc285d118618751 | [
"MIT"
] | 18 | 2020-01-19T17:52:17.000Z | 2020-02-17T15:06:13.000Z | cog/command/beta.py | DrLarck/DiscordBallZ_ | c274e26efce4c5a757d258c54bc285d118618751 | [
"MIT"
] | 1 | 2020-10-08T19:59:42.000Z | 2020-10-08T19:59:42.000Z | """
BETA test commands
"""
# dependancies
import asyncio
import discord
from discord.ext import commands
# util
from utility.cog.player.player import Player
from utility.cog.combat_system.cpu import CPU
# characters
from utility.cog.character.list import c001_sabimen
from utility.cog.character.list import c002_sabim... | 23.65625 | 65 | 0.589168 |
f759e814f57fe5ec1b432917ac4d2139e4b2f11d | 5,842 | py | Python | nanonisTCP/Piezo.py | New-Horizons-SPM/nanonisTCP | e810877fce41c4dc3d9ba2b18cbe619ff04c640a | [
"MIT"
] | null | null | null | nanonisTCP/Piezo.py | New-Horizons-SPM/nanonisTCP | e810877fce41c4dc3d9ba2b18cbe619ff04c640a | [
"MIT"
] | null | null | null | nanonisTCP/Piezo.py | New-Horizons-SPM/nanonisTCP | e810877fce41c4dc3d9ba2b18cbe619ff04c640a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 9 22:51:52 2022
@author: jced0001
"""
class Piezo:
"""
Nanonis Piezo Module
"""
def __init__(self,NanonisTCP):
self.NanonisTCP = NanonisTCP
def TiltSet(self,tilt_x=None,tilt_y=None):
"""
Configures the tilt correction par... | 33.768786 | 81 | 0.595515 |
f75a0f4db446801a45c5a3f60a615b5354d66e00 | 929 | py | Python | miniworld/model/network/connections/NodeDictMixin.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 5 | 2019-05-11T14:57:15.000Z | 2021-07-05T00:35:25.000Z | miniworld/model/network/connections/NodeDictMixin.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 27 | 2017-03-17T07:11:02.000Z | 2019-05-26T23:36:56.000Z | miniworld/model/network/connections/NodeDictMixin.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 6 | 2017-05-03T12:11:33.000Z | 2020-04-03T11:44:27.000Z | from collections import UserDict
from miniworld.model.network.connections.JSONEncoder import JSONStrMixin
# TODO: REMOVE
class NodeDictMixin:
"""
"""
#########################################
# Structure Converting
#########################################
def to_ids(self):
"""
... | 25.805556 | 126 | 0.53606 |
f75a16661a87dbecc8cedd5e924beb9f4374fc34 | 2,159 | py | Python | tests/test_restsession.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/test_restsession.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/test_restsession.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""dnacentersdk/restsession.py Fixtures & Tests
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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, i... | 34.269841 | 94 | 0.746642 |
f75a56fe2ad4c6f1e52c4f8ad4a1d1ffdcb129f8 | 675 | py | Python | plugins/maya/publish/avalon_scene_ready.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | plugins/maya/publish/avalon_scene_ready.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | plugins/maya/publish/avalon_scene_ready.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z |
import pyblish.api
class AvalonSceneReady(pyblish.api.ContextPlugin):
"""標記場景為預備狀態
場景在被標記為預備狀態之後,如果有任何物件或數值的更動,狀態就會失效
"""
"""Define current scene in ready state
Collecte current undo count for later validation.
"""
order = pyblish.api.CollectorOrder + 0.49999
label = "進入預備狀態"
... | 20.454545 | 54 | 0.653333 |
f75a61995b4ae30d0fcab9ff9337eb6e8b7580f7 | 143 | py | Python | asking/types.py | cariad/asking | 482947f70e90928314b90c2db14a86908714125a | [
"MIT"
] | null | null | null | asking/types.py | cariad/asking | 482947f70e90928314b90c2db14a86908714125a | [
"MIT"
] | 4 | 2021-11-28T08:40:52.000Z | 2021-11-30T14:43:58.000Z | asking/types.py | cariad/asking | 482947f70e90928314b90c2db14a86908714125a | [
"MIT"
] | null | null | null | from typing import Any, Dict, List
AnyDict = Dict[Any, Any]
StageKey = str
StageType = List[Dict[str, Any]]
ScriptDict = Dict[str, StageType]
| 20.428571 | 34 | 0.727273 |
f75a72add157e7bf14dc4bda863495e83c235f3a | 239 | py | Python | moto/apigateway/__init__.py | argos83/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2021-03-06T22:01:41.000Z | 2021-03-06T22:01:41.000Z | moto/apigateway/__init__.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | null | null | null | moto/apigateway/__init__.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2017-10-19T00:53:28.000Z | 2017-10-19T00:53:28.000Z | from __future__ import unicode_literals
from .models import apigateway_backends
from ..core.models import MockAWS, base_decorator
apigateway_backend = apigateway_backends['us-east-1']
mock_apigateway = base_decorator(apigateway_backends)
| 34.142857 | 53 | 0.853556 |
f75a7d6c221afb66510c31a43b7cf9cbcfd6109e | 1,323 | py | Python | gpt2_model/generate_gpt2_embeddings.py | bclarkson-code/search-query-classification | 8928faad459ef97934a6dbcf38a9347da5662415 | [
"MIT"
] | null | null | null | gpt2_model/generate_gpt2_embeddings.py | bclarkson-code/search-query-classification | 8928faad459ef97934a6dbcf38a9347da5662415 | [
"MIT"
] | null | null | null | gpt2_model/generate_gpt2_embeddings.py | bclarkson-code/search-query-classification | 8928faad459ef97934a6dbcf38a9347da5662415 | [
"MIT"
] | null | null | null | import pickle
import torch
from tqdm.auto import tqdm
from gpt2_predictor import GPT2Predictor, GPT2TestSearchQueryDataModule
if __name__ == '__main__':
encoding = {
'Arts': 0,
'Business': 11,
'Computers': 10,
'Games': 12,
'Health': 9,
'Home': 6,
'News': 14,
... | 24.054545 | 71 | 0.5548 |
f75a867708ece431d3ea8cc74d4ad9cdd51e457e | 1,023 | py | Python | setup.py | Man-who-sold-the-world/gdelt-doc-api | 9e2a5922aba7a56718fc6886e926e351e73597b4 | [
"MIT"
] | null | null | null | setup.py | Man-who-sold-the-world/gdelt-doc-api | 9e2a5922aba7a56718fc6886e926e351e73597b4 | [
"MIT"
] | null | null | null | setup.py | Man-who-sold-the-world/gdelt-doc-api | 9e2a5922aba7a56718fc6886e926e351e73597b4 | [
"MIT"
] | null | null | null | import setuptools
with open("requirements.txt", "r") as f:
requirements = [line.replace("\n", "") for line in f.readlines()]
with open("README.md", "r") as fh:
long_description = fh.read()
with open("gdeltdoc/__init__.py", "r") as g:
version = "1.0.0"
for line in g.readlines():
if "__version_... | 31.96875 | 92 | 0.632454 |
f75aa9e8630eaccc1fa403b8e1703afc0057c2bf | 29,298 | py | Python | azure-devops/azext_devops/vstsCompressed/member_entitlement_management/v4_0/models/models.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | azure-devops/azext_devops/vstsCompressed/member_entitlement_management/v4_0/models/models.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | 37 | 2020-04-27T07:45:19.000Z | 2021-04-05T07:27:15.000Z | azure-devops/azext_devops/vstsCompressed/member_entitlement_management/v4_0/models/models.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 43.598214 | 287 | 0.675268 |
f75ab961b3eb99af30897baab7b8c091e6b1d3ec | 929 | py | Python | plugins/holland.backup.random/setup.py | Alibloke/holland | e630b511a95ed8e36205e8300e632018918223ff | [
"BSD-3-Clause"
] | null | null | null | plugins/holland.backup.random/setup.py | Alibloke/holland | e630b511a95ed8e36205e8300e632018918223ff | [
"BSD-3-Clause"
] | null | null | null | plugins/holland.backup.random/setup.py | Alibloke/holland | e630b511a95ed8e36205e8300e632018918223ff | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
version = "1.2.0"
setup(
name="holland.backup.random",
version=version,
description="Back up data from /dev/random",
long_description="""\
Uses /dev/random. A bit more of an example then holland.backup.example
""",
classifiers=[], # Get stri... | 29.967742 | 94 | 0.65662 |
f75ae3f598601383a8e40116fe4c0e34b7b54f63 | 36,368 | py | Python | evcouplings/compare/protocol.py | thomashopf/EVcouplings-1 | d3e4947d29b62537bd79215ce72b6eea18134850 | [
"MIT"
] | null | null | null | evcouplings/compare/protocol.py | thomashopf/EVcouplings-1 | d3e4947d29b62537bd79215ce72b6eea18134850 | [
"MIT"
] | null | null | null | evcouplings/compare/protocol.py | thomashopf/EVcouplings-1 | d3e4947d29b62537bd79215ce72b6eea18134850 | [
"MIT"
] | 2 | 2021-04-03T14:19:12.000Z | 2021-04-05T17:34:32.000Z | """
EC to 3D structure comparison protocols/workflows.
Authors:
Thomas A. Hopf
Anna G. Green (complex and _make_complex_contact_maps)
"""
from copy import deepcopy
from math import ceil
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from evcouplings.align.alignment import (
read_fasta... | 34.801914 | 113 | 0.613836 |
f75b0f56e3d38f411144845899ed386194a8fadc | 27,195 | py | Python | main_imagenet.py | VITA-Group/Peek-a-Boo | 9290d4e5e3aee0dff994e1a664ec91bd6ec93176 | [
"MIT"
] | 2 | 2022-01-22T03:57:21.000Z | 2022-01-30T20:44:32.000Z | main_imagenet.py | VITA-Group/Peek-a-Boo | 9290d4e5e3aee0dff994e1a664ec91bd6ec93176 | [
"MIT"
] | null | null | null | main_imagenet.py | VITA-Group/Peek-a-Boo | 9290d4e5e3aee0dff994e1a664ec91bd6ec93176 | [
"MIT"
] | 2 | 2022-01-30T12:26:56.000Z | 2022-03-14T12:42:06.000Z | import argparse
import os
import random
import shutil
import time
import warnings
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.distributed as dist
import torch.optim
import torch.multiprocessing as mp
import torch.utils.data
import torch.utils.data.distr... | 43.933764 | 128 | 0.618128 |
f75b3557e861d98df3053c83895edbb0b6c8fbc0 | 3,902 | py | Python | src/onevision/data/data_class/detection.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/data/data_class/detection.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/data/data_class/detection.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Data class to store output from detectors.
"""
from __future__ import annotations
import uuid
from timeit import default_timer as timer
from typing import Optional
from typing import Union
import cv2
import numpy as np
from onevision.cv.imgproc.shape import box_xyxy... | 24.540881 | 79 | 0.627627 |
f75b422e945f6d8fca51464b8155e36e9ceaf9ab | 3,116 | py | Python | automaton/lib/plugin.py | nemec/Automaton | eea2f89dc10031fba45c80eb63053480dfc3543f | [
"MIT"
] | 6 | 2016-01-05T09:14:57.000Z | 2021-05-17T20:46:46.000Z | automaton/lib/plugin.py | nemec/Automaton | eea2f89dc10031fba45c80eb63053480dfc3543f | [
"MIT"
] | null | null | null | automaton/lib/plugin.py | nemec/Automaton | eea2f89dc10031fba45c80eb63053480dfc3543f | [
"MIT"
] | 1 | 2018-12-18T02:37:24.000Z | 2018-12-18T02:37:24.000Z | try:
import unittest2 as unittest
except ImportError:
import unittest
from automaton.lib import registrar
class UnsuccessfulExecution(Exception):
""" UnsuccessfulExecution errors are not necessarily fatal.
All they represent is a failure on the service's part to
successfully produce normal output. ... | 32.8 | 78 | 0.723363 |
f75b4b8f8b9c555b2b22290c17f4b7bfaa14c619 | 12,886 | py | Python | hytra/core/divisionfeatures.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | hytra/core/divisionfeatures.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | hytra/core/divisionfeatures.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | import numpy as np
import math
def dotproduct(v1, v2):
return sum((a * b) for a, b in zip(v1, v2))
def length(v):
return math.sqrt(dotproduct(v, v))
def angle(v1, v2):
try:
if length(v1) * length(v2) == 0:
radians = 0
else:
radians = math.acos(dotproduct(v1, v2)... | 33.732984 | 123 | 0.565032 |
f75b8d9d39cddc633df141d41917ba4bf30fc46f | 1,906 | py | Python | aldryn_faq/forms.py | liip-forks/aldryn-faq | 1e9d5c8d410f955b8082bd20ea7a4d85d4c5e0f7 | [
"BSD-3-Clause"
] | null | null | null | aldryn_faq/forms.py | liip-forks/aldryn-faq | 1e9d5c8d410f955b8082bd20ea7a4d85d4c5e0f7 | [
"BSD-3-Clause"
] | null | null | null | aldryn_faq/forms.py | liip-forks/aldryn-faq | 1e9d5c8d410f955b8082bd20ea7a4d85d4c5e0f7 | [
"BSD-3-Clause"
] | null | null | null |
from django import forms
from django.utils.translation import ugettext_lazy as _
from aldryn_apphooks_config.utils import setup_config
from app_data import AppDataForm
from parler.forms import TranslatableModelForm
from sortedm2m.forms import SortedMultipleChoiceField
from .models import Category, QuestionListPlu... | 27.623188 | 77 | 0.665268 |
f75b95a029d4024af2c7bbe319810adb0338b3d0 | 8,196 | py | Python | twisted/mail/test/test_options.py | sxamit/twisted | 30f6966329c857c3631c60aeb420d84d7828e01e | [
"MIT",
"Unlicense"
] | 1 | 2017-08-07T14:52:02.000Z | 2017-08-07T14:52:02.000Z | Lib/site-packages/twisted/mail/test/test_options.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/twisted/mail/test/test_options.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | 1 | 2018-11-07T12:52:07.000Z | 2018-11-07T12:52:07.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.mail.tap}.
"""
from twisted.trial.unittest import TestCase
from twisted.python.usage import UsageError
from twisted.mail import protocols
from twisted.mail.tap import Options, makeService
from twisted.python.filepath impo... | 33.317073 | 80 | 0.627989 |
f75ba8fcc31e18267a800445537075f8e521c3b9 | 32,198 | py | Python | script/MergeBrain.py | lsb-riken/CUBIC-informatics | e7982072bb5d892f55e86cdf671376ab379b9b29 | [
"MIT"
] | 6 | 2019-11-23T18:45:19.000Z | 2021-03-24T16:02:06.000Z | script/MergeBrain.py | lsb-riken/CUBIC-informatics | e7982072bb5d892f55e86cdf671376ab379b9b29 | [
"MIT"
] | 5 | 2020-01-30T18:04:29.000Z | 2021-10-22T01:50:24.000Z | script/MergeBrain.py | lsb-riken/CUBIC-informatics | e7982072bb5d892f55e86cdf671376ab379b9b29 | [
"MIT"
] | 1 | 2019-09-12T07:57:07.000Z | 2019-09-12T07:57:07.000Z | #!/usr/bin/env python
#-*- coding:utf-8 -*-
"""Overview:
Downscale images & cells for altas mapping
Usage:
MergeBrain.py images PARAM_FILE [-p NUM_CPUS] [--exec <path>]
MergeBrain.py cells PARAM_FILE
MergeBrain.py full PARAM_FILE [-p NUM_CPUS] [--exec <path>]
Options:
-h --help Show this screen.
-... | 50.946203 | 229 | 0.615349 |
f75bb65996c0940d32b2f8dbd0c51209be544e04 | 6,124 | py | Python | components/aws/sagemaker/batch_transform/src/batch_transform.py | cclauss/pipelines | 2592307cceb72fdb61be2673f67d7b4a4bd12023 | [
"Apache-2.0"
] | null | null | null | components/aws/sagemaker/batch_transform/src/batch_transform.py | cclauss/pipelines | 2592307cceb72fdb61be2673f67d7b4a4bd12023 | [
"Apache-2.0"
] | null | null | null | components/aws/sagemaker/batch_transform/src/batch_transform.py | cclauss/pipelines | 2592307cceb72fdb61be2673f67d7b4a4bd12023 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 94.215385 | 244 | 0.75147 |
f75bc9656041281005d2405f217d2685c7e74f87 | 21,738 | py | Python | chapter_2_collection/diarize.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | 1 | 2020-03-05T01:19:17.000Z | 2020-03-05T01:19:17.000Z | chapter_2_collection/diarize.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | chapter_2_collection/diarize.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | '''
================================================
## VOICEBOOK REPOSITORY ##
================================================
repository name: voicebook
repository version: 1.0
repository link: https://github.com/jim-schwoebel/voicebook
author: Jim Schwoebel
author contact: js@neur... | 42.960474 | 143 | 0.457172 |
f75be1c9161eec3f2b8cb1f4cad4183e1ba9d351 | 14,106 | py | Python | CPCTrans/main.py | yliu1229/CPCTR | 66fcd336ee69fd18b322853f195c5b65b4a046b7 | [
"MIT"
] | null | null | null | CPCTrans/main.py | yliu1229/CPCTR | 66fcd336ee69fd18b322853f195c5b65b4a046b7 | [
"MIT"
] | null | null | null | CPCTrans/main.py | yliu1229/CPCTR | 66fcd336ee69fd18b322853f195c5b65b4a046b7 | [
"MIT"
] | null | null | null | import os
import sys
import time
import re
import argparse
import numpy as np
from tqdm import tqdm
from tensorboardX import SummaryWriter
import matplotlib.pyplot as plt
plt.switch_backend('agg')
sys.path.append('../Utils')
from CPCTrans.dataset_3d import *
from CPCTrans.model_3d import *
from Backbone.resnet import... | 41.245614 | 133 | 0.607188 |
f75bfc6bd70d285e8df66e56086560c9c887971c | 30,707 | py | Python | tests/test_actionAngleTorus.py | turnergarrow/galpy | 7132eddbf2dab491fe137790e31eacdc604b0534 | [
"BSD-3-Clause"
] | null | null | null | tests/test_actionAngleTorus.py | turnergarrow/galpy | 7132eddbf2dab491fe137790e31eacdc604b0534 | [
"BSD-3-Clause"
] | null | null | null | tests/test_actionAngleTorus.py | turnergarrow/galpy | 7132eddbf2dab491fe137790e31eacdc604b0534 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, division
import os
import sys
import pytest
import warnings
import numpy
from galpy.util import galpyWarning
from test_actionAngle import reset_warning_registry
_TRAVIS= bool(os.getenv('TRAVIS'))
PY2= sys.version < '3'
# Print all galpyWarnings always for tests of warnings
warning... | 52.851979 | 184 | 0.702055 |
f75c10a90632f4b521b5383bbf5cf33532139ce2 | 3,062 | py | Python | tests/task_plugin_test.py | pchoisel/girder_worker | 66e1e8b82ee3e64421b59111a76b84852eec7947 | [
"Apache-2.0"
] | 37 | 2016-01-26T19:21:23.000Z | 2021-06-10T14:12:59.000Z | tests/task_plugin_test.py | pchoisel/girder_worker | 66e1e8b82ee3e64421b59111a76b84852eec7947 | [
"Apache-2.0"
] | 290 | 2016-01-27T14:02:10.000Z | 2022-01-24T16:50:27.000Z | tests/task_plugin_test.py | pchoisel/girder_worker | 66e1e8b82ee3e64421b59111a76b84852eec7947 | [
"Apache-2.0"
] | 29 | 2016-02-17T17:54:47.000Z | 2022-03-17T23:36:17.000Z | from girder_worker import entrypoint
from girder_worker.__main__ import main
from girder_worker.entrypoint import discover_tasks
import mock
import pytest
def setup_function(func):
if hasattr(func, 'pytestmark'):
for m in func.pytestmark:
if m.name == 'namespace':
namespace = ... | 33.648352 | 93 | 0.701502 |
f75c1108626161702826e7b0c972a2d11ea7bbd4 | 1,007 | py | Python | marqeta/response_models/commando_mode_nested_transition.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 21 | 2019-04-12T09:02:17.000Z | 2022-02-18T11:39:06.000Z | marqeta/response_models/commando_mode_nested_transition.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 1 | 2020-07-22T21:27:40.000Z | 2020-07-23T17:38:43.000Z | marqeta/response_models/commando_mode_nested_transition.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 10 | 2019-05-08T14:20:37.000Z | 2021-09-20T18:09:26.000Z | from datetime import datetime, date
from marqeta.response_models import datetime_object
import json
import re
class CommandoModeNestedTransition(object):
def __init__(self, json_response):
self.json_response = json_response
def __str__(self):
return json.dumps(self.json_response, default=self... | 25.175 | 121 | 0.701092 |
f75c1d9eb94577e27f0fdee7d82c2e048246833a | 1,829 | py | Python | tests/test_preprocessing_glove.py | bbreton3/glove_tf_21 | 16b18bdb2d41c104dcd9159c0a760336bb5fd4d1 | [
"MIT"
] | 1 | 2020-04-18T16:33:05.000Z | 2020-04-18T16:33:05.000Z | tests/test_preprocessing_glove.py | bbreton3/glove_tf_21 | 16b18bdb2d41c104dcd9159c0a760336bb5fd4d1 | [
"MIT"
] | 7 | 2020-11-13T17:44:25.000Z | 2022-02-10T01:16:13.000Z | tests/test_preprocessing_glove.py | bbreton3/glove_tf_21 | 16b18bdb2d41c104dcd9159c0a760336bb5fd4d1 | [
"MIT"
] | null | null | null | from glove_tf_21.utils.file_utils import save_labels
import numpy as np
import os
def test_cooc_count(preprocessing_glove, ix_sequences_full, cooc_dict):
output_cooc = dict()
for ix_seq in ix_sequences_full:
output_cooc = preprocessing_glove.cooc_count(output_cooc, ix_seq)
assert len(output_cooc... | 34.509434 | 108 | 0.785128 |
f75c31ebee1c575c487db6678c659f1e492c04e5 | 37,312 | py | Python | skorch/callbacks/logging.py | TheAutumnOfRice/skorch | 6d778fc38d797644c847a9c87dd23299eea63087 | [
"BSD-3-Clause"
] | 2,748 | 2019-03-19T11:43:01.000Z | 2022-03-31T13:55:28.000Z | skorch/callbacks/logging.py | TheAutumnOfRice/skorch | 6d778fc38d797644c847a9c87dd23299eea63087 | [
"BSD-3-Clause"
] | 392 | 2019-03-19T11:17:04.000Z | 2022-03-29T21:36:53.000Z | skorch/callbacks/logging.py | TheAutumnOfRice/skorch | 6d778fc38d797644c847a9c87dd23299eea63087 | [
"BSD-3-Clause"
] | 197 | 2019-03-27T09:18:25.000Z | 2022-03-27T00:15:23.000Z | """ Callbacks for printing, logging and log information."""
import sys
import time
import tempfile
from contextlib import suppress
from numbers import Number
from itertools import cycle
from pathlib import Path
import numpy as np
import tqdm
from tabulate import tabulate
from skorch.utils import Ansi
from skorch.dat... | 35.2 | 91 | 0.639633 |
f75c455870e4611cc859ce7df7434daa1dfa7d0c | 9,928 | py | Python | pyserver/pymysql3/tests/capabilities.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | 1 | 2015-05-22T14:11:17.000Z | 2015-05-22T14:11:17.000Z | pyserver/pymysql3/tests/capabilities.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | 2 | 2021-09-02T20:01:35.000Z | 2022-01-26T19:47:35.000Z | pyserver/pymysql3/tests/capabilities.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | null | null | null | #!/usr/bin/env python -O
""" Script to test database capabilities and the DB-API interface
for functionality and memory leaks.
Adapted from a script by M-A Lemburg.
"""
from time import time
import array
import unittest
class DatabaseTest(unittest.TestCase):
db_module = None
connect_args = ()
... | 34.234483 | 102 | 0.535153 |
f75c476988a516fd655e9ed8d719f2bf87767ff1 | 2,931 | py | Python | cumulusci/core/tests/test_salesforce_locators.py | hamedizadpanah-ibm/CumulusCI | eb93723e2da1ca66a7639b3197e6fab02d1bd24a | [
"BSD-3-Clause"
] | 1 | 2020-08-08T03:55:21.000Z | 2020-08-08T03:55:21.000Z | cumulusci/core/tests/test_salesforce_locators.py | Julian88Tex/CumulusCI | 82d5fab71b61fbab53c1b5fc6001452fa3f97da8 | [
"BSD-3-Clause"
] | null | null | null | cumulusci/core/tests/test_salesforce_locators.py | Julian88Tex/CumulusCI | 82d5fab71b61fbab53c1b5fc6001452fa3f97da8 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from robot.libraries.BuiltIn import RobotNotRunningError
from cumulusci.robotframework.Salesforce import Salesforce
from unittest import mock
# FIXME: we shouldn't have to tweak these tests for every
# version. The tests should be smarter.
class TestLocators(unittest.TestCase):
@mock.patch("cumulu... | 42.478261 | 98 | 0.701808 |
f75c495aaa1058037ba191ae4c2bb90de8f0df1b | 1,285 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/category_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/cognitiveservices/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/category_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/category_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 33.815789 | 92 | 0.582101 |
f75c5b41a23be600e5e460faf0704a5278bd21c4 | 10,921 | py | Python | indico/core/db/sqlalchemy/locations.py | antzshrek/indico | 25bedccf4b648d85dcd4b44d710726f8c85e3731 | [
"MIT"
] | null | null | null | indico/core/db/sqlalchemy/locations.py | antzshrek/indico | 25bedccf4b648d85dcd4b44d710726f8c85e3731 | [
"MIT"
] | null | null | null | indico/core/db/sqlalchemy/locations.py | antzshrek/indico | 25bedccf4b648d85dcd4b44d710726f8c85e3731 | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from sqlalchemy.event import listens_for
from sqlalchemy.ext.decl... | 34.669841 | 114 | 0.594543 |
f75c8902eda9e3eee7a9dfc2b8a317da035d897c | 13,629 | py | Python | 3DCNN.py | YLFF/2004P_Pytorch-Networks | 2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05 | [
"MIT"
] | 454 | 2019-12-26T15:04:02.000Z | 2020-10-24T13:57:35.000Z | 3DCNN.py | YLFF/2004P_Pytorch-Networks | 2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05 | [
"MIT"
] | 1 | 2020-05-14T06:01:18.000Z | 2020-05-14T06:01:18.000Z | 3DCNN.py | YLFF/2004P_Pytorch-Networks | 2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05 | [
"MIT"
] | 17 | 2019-12-27T12:19:47.000Z | 2020-02-03T07:42:05.000Z | # --------------------------------------------------------------------------- #
# ResNet, CVPR2016 bestpaper, https://arxiv.org/abs/1512.03385
# pytorch implementation by Haiyang Liu (haiyangliu1997@gmail.com)
# --------------------------------------------------------------------------- #
import torch
import torch.nn... | 38.069832 | 129 | 0.525424 |
f75ce26d914323394f3cea7ed8f74f28ce6f1602 | 906 | py | Python | racing_data/meet.py | predictive-punter/racing_data | 0d1b0ad0fe7591ce859d528af719349c0c7534d3 | [
"MIT"
] | 15 | 2017-04-08T05:22:49.000Z | 2021-04-20T17:33:22.000Z | racing_data/meet.py | phillc73/racing_data | 0d1b0ad0fe7591ce859d528af719349c0c7534d3 | [
"MIT"
] | 54 | 2016-07-21T10:35:45.000Z | 2016-07-30T23:06:50.000Z | racing_data/meet.py | phillc73/racing_data | 0d1b0ad0fe7591ce859d528af719349c0c7534d3 | [
"MIT"
] | 7 | 2016-12-15T06:02:54.000Z | 2020-04-20T15:32:55.000Z | from . import Entity
class Meet(Entity):
"""A meet represents a collection of races occurring at a given track on a given date"""
def __str__(self):
return '{track} on {date:%Y-%m-%d}'.format(track=self['track'], date=self['date'].astimezone(self.provider.local_timezone))
@property
def has_... | 33.555556 | 131 | 0.66777 |
f75cf9bcb6eb50703ecaf3f3d3de676a716e4588 | 38,508 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_bno08x/__init__.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_bno08x/__init__.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_bno08x/__init__.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # pylint:disable=too-many-lines
# SPDX-FileCopyrightText: Copyright (c) 2020 Bryan Siepert for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_bno08x`
================================================================================
Helper library for the Hillcrest Laboratories BNO08x IMUs
* Author... | 35.589649 | 98 | 0.636699 |
f75cfc6fbc2038eba7fd11782abf69dd68f71bc2 | 3,904 | py | Python | resnet.py | BXuan694/basemodel-pytorch | a36c96904580be902e323db17eebbe2ea1f54176 | [
"MIT"
] | 1 | 2019-03-18T15:35:34.000Z | 2019-03-18T15:35:34.000Z | resnet.py | BXuan694/basemodel-pytorch | a36c96904580be902e323db17eebbe2ea1f54176 | [
"MIT"
] | null | null | null | resnet.py | BXuan694/basemodel-pytorch | a36c96904580be902e323db17eebbe2ea1f54176 | [
"MIT"
] | 1 | 2019-03-19T01:06:47.000Z | 2019-03-19T01:06:47.000Z | '''ResNet in PyTorch.
For Pre-activation ResNet, see 'preact_resnet.py'.
Reference:
[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
Deep Residual Learning for Image Recognition. arXiv:1512.03385
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicBlock(nn.Module):
expansi... | 34.548673 | 102 | 0.626537 |
f75d3544ffa19cc489ce532ee8d14ab4f09c6953 | 3,830 | py | Python | datar/base/trig_hb.py | stjordanis/datar | 4e2b5db026ad35918954576badef9951928c0cb1 | [
"MIT"
] | 110 | 2021-03-09T04:10:40.000Z | 2022-03-13T10:28:20.000Z | datar/base/trig_hb.py | sthagen/datar | 1218a549e2f0547c7b5a824ca6d9adf1bf96ba46 | [
"MIT"
] | 54 | 2021-06-20T18:53:44.000Z | 2022-03-29T22:13:07.000Z | datar/base/trig_hb.py | sthagen/datar | 1218a549e2f0547c7b5a824ca6d9adf1bf96ba46 | [
"MIT"
] | 11 | 2021-06-18T03:03:14.000Z | 2022-02-25T11:48:26.000Z | """Trigonometric and Hyperbolic Functions"""
from typing import Callable
import numpy
from pipda import register_func
from ..core.contexts import Context
from ..core.types import FloatOrIter
from .constants import pi
def _register_trig_hb_func(name: str, np_name: str, doc: str) -> Callable:
"""Register trigono... | 16.228814 | 76 | 0.636031 |
f75d98745f8bb5f44f016f73dddb5848239e46a1 | 34,823 | py | Python | packages/python/pyfora/test/PyAstFreeVariableAnalyses_test.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | packages/python/pyfora/test/PyAstFreeVariableAnalyses_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | packages/python/pyfora/test/PyAstFreeVariableAnalyses_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 28.357492 | 97 | 0.435775 |
f75dac59ec17719df865826b8d86750f76ed68eb | 3,418 | py | Python | statsd/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | statsd/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | statsd/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | # Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
import json
import re
here = path.abspath(path.dirname(__file__))
def parse_req_line(line):
line = line.strip()
if not line or line.startswith('--hash') or line[0]... | 28.247934 | 92 | 0.631363 |
f75db6d92b4879ecfdc8c7bce21b887d2c00195c | 4,100 | py | Python | hw4/cs285/agents/mb_agent.py | erfanMhi/Deep-Reinforcement-Learning-CS285 | 4b832c232889b0f867c5d43b4f28c588607cfd60 | [
"MIT"
] | 1 | 2020-08-16T13:01:27.000Z | 2020-08-16T13:01:27.000Z | hw4/cs285/agents/mb_agent.py | erfanMhi/Deep-Reinforcement-Learning-CS285 | 4b832c232889b0f867c5d43b4f28c588607cfd60 | [
"MIT"
] | null | null | null | hw4/cs285/agents/mb_agent.py | erfanMhi/Deep-Reinforcement-Learning-CS285 | 4b832c232889b0f867c5d43b4f28c588607cfd60 | [
"MIT"
] | 3 | 2020-12-16T15:24:39.000Z | 2022-01-27T21:29:34.000Z | from .base_agent import BaseAgent
from cs285.models.ff_model import FFModel
from cs285.policies.MPC_policy import MPCPolicy
from cs285.infrastructure.replay_buffer import ReplayBuffer
from cs285.infrastructure.utils import *
class MBAgent(BaseAgent):
def __init__(self, sess, env, agent_params):
super(MBAg... | 46.590909 | 102 | 0.579756 |
f75e11209704b4c1ca00d10b546afdd97cf2b6e8 | 1,618 | py | Python | tests/test_scan.py | eruvanos/dynafile | 207425b073a963b01c677b697e74842b429c004a | [
"MIT"
] | null | null | null | tests/test_scan.py | eruvanos/dynafile | 207425b073a963b01c677b697e74842b429c004a | [
"MIT"
] | null | null | null | tests/test_scan.py | eruvanos/dynafile | 207425b073a963b01c677b697e74842b429c004a | [
"MIT"
] | null | null | null | from _operator import itemgetter
from dynafile import Dynafile
def test_scan_all_items(tmp_path):
db = Dynafile(tmp_path / "db")
aa = {
"PK": "1",
"SK": "aa",
}
ab = {
"PK": "1",
"SK": "ab",
}
ac = {
"PK": "1",
"SK": "ac",
}
ba = {
... | 17.212766 | 90 | 0.434487 |
f75e1afa2f582ef72566a9f1236eb47e92500b9e | 515 | py | Python | geoq/training/admin.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 471 | 2015-01-05T15:16:26.000Z | 2022-03-28T05:06:11.000Z | geoq/training/admin.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 109 | 2015-01-06T20:00:58.000Z | 2022-03-11T23:17:53.000Z | geoq/training/admin.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 100 | 2015-01-05T15:16:39.000Z | 2021-12-01T12:13:13.000Z | # This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and
# is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012)
from reversion.admin import VersionAdmin
from django.contrib.gis import admin
from .models import *
class Objec... | 32.1875 | 104 | 0.757282 |
f75e1bbd91fd329bea50425c828ffbf5b2ab1b32 | 120 | py | Python | desafio_certo.py | franciol/Servidor_de_desafios | 3ce3de561af5ce5182a3d0f5db0a7dfd3b51a8fc | [
"MIT"
] | null | null | null | desafio_certo.py | franciol/Servidor_de_desafios | 3ce3de561af5ce5182a3d0f5db0a7dfd3b51a8fc | [
"MIT"
] | null | null | null | desafio_certo.py | franciol/Servidor_de_desafios | 3ce3de561af5ce5182a3d0f5db0a7dfd3b51a8fc | [
"MIT"
] | null | null | null | """Arquivo a ser enviado ao sistema"""
def desafio1(number):
"""Função que retorna o valor entrado"""
return 0
| 20 | 44 | 0.666667 |
f75e37c8f400e30099681450ab0f9a8bda1e56f0 | 703 | py | Python | tests/integration/integration_test.py | sohomiitb/hackathonCN | 99dfe67d1f6884dc99c7c71663807dcdf0617722 | [
"MIT"
] | null | null | null | tests/integration/integration_test.py | sohomiitb/hackathonCN | 99dfe67d1f6884dc99c7c71663807dcdf0617722 | [
"MIT"
] | null | null | null | tests/integration/integration_test.py | sohomiitb/hackathonCN | 99dfe67d1f6884dc99c7c71663807dcdf0617722 | [
"MIT"
] | null | null | null | import requests
import json
test_sample = json.dumps({'data': [
[1,2,3,4,54,6,7,8,88,10],
[10,9,8,37,36,45,4,33,2,1]
]})
test_sample = str(test_sample)
def test_ml_service(scoreurl, scorekey):
assert scoreurl != None
if scorekey is None:
headers = {'Content-Type':'application/js... | 30.565217 | 94 | 0.642959 |
f75e5cebd956a4025bf0265b1e7dd05df153d431 | 1,205 | py | Python | appengine/findit/services/test_failure/test_results_service.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/services/test_failure/test_results_service.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/services/test_failure/test_results_service.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Provides functions for Findit's special operations on test results."""
import base64
def GetFailedTestsInformationFromTestResult(test_results_object):
... | 34.428571 | 79 | 0.756017 |
f75e684997ed998bb609136426eba7604a6d9f60 | 394 | py | Python | python/excel/iterating_over_cell_values.py | y2ghost/work | b7f5b02db9dc0df6157bc799ddb4a1ac9d574cf3 | [
"MIT"
] | null | null | null | python/excel/iterating_over_cell_values.py | y2ghost/work | b7f5b02db9dc0df6157bc799ddb4a1ac9d574cf3 | [
"MIT"
] | null | null | null | python/excel/iterating_over_cell_values.py | y2ghost/work | b7f5b02db9dc0df6157bc799ddb4a1ac9d574cf3 | [
"MIT"
] | null | null | null | from openpyxl import load_workbook
def iterating_over_values(path):
workbook = load_workbook(filename=path)
sheet = workbook.active
for value in sheet.iter_rows(min_row=1, max_row=3,
min_col=1, max_col=3,
values_only=True):
print(va... | 26.266667 | 54 | 0.609137 |
f75e9101a08e5e6ea8785eb222e080eeb9033012 | 2,532 | py | Python | shaker/cli.py | benjaminws/shaker | d9195422b8bef64bc751fffee8706f1abbd656a3 | [
"BSD-2-Clause"
] | 1 | 2015-11-05T10:28:03.000Z | 2015-11-05T10:28:03.000Z | shaker/cli.py | benjaminws/shaker | d9195422b8bef64bc751fffee8706f1abbd656a3 | [
"BSD-2-Clause"
] | null | null | null | shaker/cli.py | benjaminws/shaker | d9195422b8bef64bc751fffee8706f1abbd656a3 | [
"BSD-2-Clause"
] | null | null | null | from shaker.version import __version__
import optparse
def parse_cli():
parser = optparse.OptionParser(
usage="%prog [options] profile",
version="%%prog %s" % __version__)
parser.add_option(
'-a', '--ami', dest='ec2_ami_id', metavar='AMI',
help='Build instance from AMI')
p... | 35.166667 | 75 | 0.593602 |
f75e96d03943d80dfc2c33ec15de4bf9add6c2ce | 1,022 | py | Python | experiments/arcbench_data_preparation/arc_model_data_preparation.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 3 | 2020-08-03T19:25:44.000Z | 2021-06-27T22:25:55.000Z | experiments/arcbench_data_preparation/arc_model_data_preparation.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | null | null | null | experiments/arcbench_data_preparation/arc_model_data_preparation.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 2 | 2020-08-07T22:54:28.000Z | 2021-02-18T06:11:01.000Z | import pandas as pd
from experiments.arcbench_data_preparation.reworked_one_hot_encoding import get_original_data_fold_abs_file_name, \
TrainTestEnum
from mdrsl.data_handling.nan_data_filtering import remove_instances_with_nans_in_column
from mdrsl.data_handling.reorder_dataset_columns import reorder_columns
def... | 42.583333 | 115 | 0.807241 |
f75e9d9e5e6169334b512a07db12fa97a0871bb9 | 4,286 | py | Python | src/UniFam.py | jcrosskey/unifam | 7ff125f6bb0b5093a60ffda779847ef537c02790 | [
"MIT"
] | null | null | null | src/UniFam.py | jcrosskey/unifam | 7ff125f6bb0b5093a60ffda779847ef537c02790 | [
"MIT"
] | null | null | null | src/UniFam.py | jcrosskey/unifam | 7ff125f6bb0b5093a60ffda779847ef537c02790 | [
"MIT"
] | null | null | null | '''
UniFam.py
pipeline
Created by JJ Chai on 02/24/2014
Last modified Mon Apr 20 16:58:56 EDT 2015
Copyright (c) 2014 JJ Chai (ORNL). All rights reserved.
'''
# Import Python modules
import configparser
import argparse
import sys
from datetime import datetime
# Import local modules
import UniFam_lib # in this direc... | 40.433962 | 138 | 0.603126 |
f75ee654261c2a65968b7c24776d8541f15000b8 | 53 | py | Python | eupy/native/__init__.py | fivosts/eupy | 9e21ee2cf3ba5666db85723384c7b3422c71286a | [
"MIT"
] | null | null | null | eupy/native/__init__.py | fivosts/eupy | 9e21ee2cf3ba5666db85723384c7b3422c71286a | [
"MIT"
] | 4 | 2020-04-03T00:03:48.000Z | 2020-06-24T18:37:03.000Z | eupy/native/__init__.py | fivosts/eupy | 9e21ee2cf3ba5666db85723384c7b3422c71286a | [
"MIT"
] | null | null | null | __all__ = ['logger', 'plotter', 'profiler', 'shell']
| 26.5 | 52 | 0.622642 |
f75f10b73659b2a0b1773878cea57701dc7c283f | 18,509 | py | Python | tests/layers/test_layers_convolution.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | tests/layers/test_layers_convolution.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | tests/layers/test_layers_convolution.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import unittest
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
import tensorlayer as tl
from tensorlayer.layers import *
from tensorlayer.models import *
from tests.utils import CustomTestCase
class Layer_Convolution_1D_Test(CustomTestCase)... | 38.084362 | 134 | 0.607164 |
f75f24b70858f398a5be3908ae2432e2736ed3f9 | 12,866 | py | Python | tests/platform_tests/mellanox/check_sysfs.py | vincent201881/sonic-mgmt | 4f02bb5f91600ae5180ace1620a718caf02c63a1 | [
"Apache-2.0"
] | null | null | null | tests/platform_tests/mellanox/check_sysfs.py | vincent201881/sonic-mgmt | 4f02bb5f91600ae5180ace1620a718caf02c63a1 | [
"Apache-2.0"
] | null | null | null | tests/platform_tests/mellanox/check_sysfs.py | vincent201881/sonic-mgmt | 4f02bb5f91600ae5180ace1620a718caf02c63a1 | [
"Apache-2.0"
] | null | null | null | """
Helper script for checking status of sysfs.
This script contains re-usable functions for checking status of hw-management related sysfs.
"""
import logging
from tests.common.utilities import wait_until
def check_sysfs(dut):
"""
@summary: Check various hw-management related sysfs under /var/run/hw-managem... | 53.832636 | 116 | 0.656459 |
f75f56da07863bf68a68f89adfb3a1524d06cf9c | 661 | py | Python | scripts/spectrogram_example.py | KISMED-TUDa/ECG_Classification | 7df7b6d28287f592536cdbf01b6aec73e7b045ef | [
"MIT"
] | 3 | 2021-12-07T17:08:00.000Z | 2021-12-08T23:16:57.000Z | scripts/spectrogram_example.py | KISMED-TUDa/ECG_Classification | 7df7b6d28287f592536cdbf01b6aec73e7b045ef | [
"MIT"
] | 1 | 2021-12-09T00:33:41.000Z | 2021-12-09T15:59:48.000Z | scripts/spectrogram_example.py | KISMED-TUDa/ECG_Classification | 7df7b6d28287f592536cdbf01b6aec73e7b045ef | [
"MIT"
] | 1 | 2021-07-30T14:53:48.000Z | 2021-07-30T14:53:48.000Z | from scipy.signal import spectrogram
import numpy as np
import matplotlib.pyplot as plt
import torch
import torchaudio
from wettbewerb import load_references
if __name__ == '__main__':
ecg_leads = load_references("../data/training/")[0]
for ecg_lead_ in ecg_leads:
if ecg_lead_.shape[0] == 18000:
... | 30.045455 | 118 | 0.694402 |
f75f98477c9240f0a7e7a888bb994709084f6e5f | 1,342 | py | Python | rns/util.py | matwilso/relation-networks | 66c67b342a90ae3699e576dcec883c329905b2e0 | [
"MIT"
] | null | null | null | rns/util.py | matwilso/relation-networks | 66c67b342a90ae3699e576dcec883c329905b2e0 | [
"MIT"
] | null | null | null | rns/util.py | matwilso/relation-networks | 66c67b342a90ae3699e576dcec883c329905b2e0 | [
"MIT"
] | null | null | null | import tensorflow as tf
def merge_summaries(sd, id):
summaries = []
for key in sd.keys():
summaries.append(tf.summary.scalar(key, sd[key]))
for key in id.keys():
summaries.append(tf.summary.image(key, id[key]))
return tf.summary.merge(summaries)
def pack_images(images, rows, cols):
... | 36.27027 | 76 | 0.638599 |
f75fa6c39c363d3440d893269a09f7b6f67c5cae | 3,019 | py | Python | docs/conf.py | VolodymyrChapman/cellpose | 4a4e78cda44a0728b5bfd27b389e418679ec2b0e | [
"BSD-3-Clause"
] | 504 | 2020-02-04T06:42:53.000Z | 2022-03-31T06:13:11.000Z | docs/conf.py | VolodymyrChapman/cellpose | 4a4e78cda44a0728b5bfd27b389e418679ec2b0e | [
"BSD-3-Clause"
] | 457 | 2020-02-04T20:53:06.000Z | 2022-03-30T07:30:32.000Z | docs/conf.py | VolodymyrChapman/cellpose | 4a4e78cda44a0728b5bfd27b389e418679ec2b0e | [
"BSD-3-Clause"
] | 208 | 2020-02-04T15:50:20.000Z | 2022-03-31T14:57:48.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 32.462366 | 79 | 0.654521 |
f75fa91922dc4e630aeb219758e3e459b8cab923 | 6,143 | py | Python | models/StereoCNN/Resnet_module.py | daili0015/ModelFeast | 0689ced4d0f37be438d3a91908e5e4cc5b7d54b8 | [
"MIT"
] | 247 | 2019-03-05T07:12:29.000Z | 2022-03-29T01:51:17.000Z | models/StereoCNN/Resnet_module.py | jungerschwarz/ModelFeast | 03afca0b129532135910ee2ac72a3b85be795289 | [
"MIT"
] | 8 | 2019-05-21T03:05:27.000Z | 2021-12-09T03:22:51.000Z | models/StereoCNN/Resnet_module.py | jungerschwarz/ModelFeast | 03afca0b129532135910ee2ac72a3b85be795289 | [
"MIT"
] | 47 | 2019-03-05T07:14:13.000Z | 2021-11-11T01:04:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: zcy
# @Date: 2019-02-14 19:29:27
# @Last Modified by: zcy
# @Last Modified time: 2019-02-15 15:06:31
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
from functools import partial
__all__ = ['ResNet', 'BasicBlock', 'Bottleneck']... | 29.252381 | 87 | 0.562917 |
f75fb23d82a52351d2f8e2805783df5a90cd225a | 24,187 | py | Python | openpype/settings/entities/dict_mutable_keys_entity.py | yosuperdope/OpenPype | 0c90df97ddb8cda291a4f66d35da58b3deb94a71 | [
"MIT"
] | 44 | 2019-03-19T04:56:35.000Z | 2021-04-23T12:05:08.000Z | openpype/settings/entities/dict_mutable_keys_entity.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | 655 | 2020-03-17T15:10:21.000Z | 2021-04-23T18:22:52.000Z | openpype/settings/entities/dict_mutable_keys_entity.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | 21 | 2019-03-19T04:56:38.000Z | 2021-04-23T09:10:59.000Z | import re
import copy
from .lib import (
NOT_SET,
OverrideState
)
from . import EndpointEntity
from .exceptions import (
DefaultsNotDefined,
InvalidKeySymbols,
StudioDefaultsNotDefined,
RequiredKeyModified,
EntitySchemaError
)
from openpype.settings.constants import (
METADATA_KEYS,
... | 33.269601 | 79 | 0.623972 |
f75fcc68f69839268ac35d8fd902fcdaa112a170 | 12,245 | py | Python | dynamic_programming/64_minimum_path_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | dynamic_programming/64_minimum_path_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | dynamic_programming/64_minimum_path_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | 2 | 2020-02-07T20:49:02.000Z | 2020-02-11T06:01:55.000Z | # top down, classic 2D O(mn) time, O(mn) space
# top down, 1-D O(mn) time, O(n) space
# top down, O(mn) time, O(1) space
# bottom up, classic 2D O(mn) time, O(mn) space
# bottom up, 1-D O(mn) time, O(n) space
# bottom up, O(mn) time, O(1) space
# left-right, classic 2D O(mn) time, O(mn) space
# left-right, 1-D O(mn) ti... | 35.699708 | 95 | 0.393712 |
f7601cfd8e8be0a1b154818dbb6267fccde25717 | 6,804 | py | Python | run.py | maeda6uiui/BingImageDownloader | 5ccb781828633abdc8be9ec9bddfe46d99f9c6a1 | [
"MIT"
] | null | null | null | run.py | maeda6uiui/BingImageDownloader | 5ccb781828633abdc8be9ec9bddfe46d99f9c6a1 | [
"MIT"
] | null | null | null | run.py | maeda6uiui/BingImageDownloader | 5ccb781828633abdc8be9ec9bddfe46d99f9c6a1 | [
"MIT"
] | null | null | null | #!python3.6
import argparse
import glob
import hashlib
import logging
import multiprocessing
import os
import pathlib
import shutil
import sys
from icrawler.builtin import BingImageCrawler
from typing import Any,List
sys.path.append(".")
from postprocessing import format_images
logging_fmt = "%(asctime)s %(levelname)... | 38.011173 | 116 | 0.714139 |
f7602ef8d38bca1d07a0553f2dc11970743a3a15 | 1,268 | py | Python | yeoboseyo/services/reddit.py | foxmask/yeoboseyo-django | 8dc1df9373f4fc27502aa9097e3724a87a2b8ce6 | [
"BSD-3-Clause"
] | 2 | 2020-11-18T08:18:17.000Z | 2021-02-27T13:17:20.000Z | yeoboseyo/services/reddit.py | foxmask/yeoboseyo-django | 8dc1df9373f4fc27502aa9097e3724a87a2b8ce6 | [
"BSD-3-Clause"
] | null | null | null | yeoboseyo/services/reddit.py | foxmask/yeoboseyo-django | 8dc1df9373f4fc27502aa9097e3724a87a2b8ce6 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
"""
여보세요 Service Reddit
"""
# std lib
from __future__ import unicode_literals
from django.conf import settings
from logging import getLogger
# external lib
from praw import Reddit as RedditAPI
# yeoboseyo
from yeoboseyo.services import Service
# create logger
logger = getLogger(__name__)
__all__ = ... | 26.978723 | 85 | 0.599369 |
f7603efdb3fe6b96f2e80c8801bfbb4190439307 | 1,446 | py | Python | tempest_zigzag/cli.py | rcbops/tempest-zigzag | 12f4bc528c9b88263f04394e5f31755519aa02e8 | [
"Apache-2.0"
] | null | null | null | tempest_zigzag/cli.py | rcbops/tempest-zigzag | 12f4bc528c9b88263f04394e5f31755519aa02e8 | [
"Apache-2.0"
] | 2 | 2019-01-14T22:48:35.000Z | 2019-02-25T20:06:06.000Z | tempest_zigzag/cli.py | rcbops/tempest-zigzag | 12f4bc528c9b88263f04394e5f31755519aa02e8 | [
"Apache-2.0"
] | 2 | 2019-01-08T20:19:16.000Z | 2019-01-10T22:12:30.000Z | # -*- coding: utf-8 -*-
"""Console script for tempest-zigzag."""
# ======================================================================================================================
# Imports
# ======================================================================================================================
fr... | 42.529412 | 120 | 0.488935 |
f7606830ca6c82474d973395beffb0d9e09b57f6 | 20,167 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 43 | 287 | 0.651014 |
f7608ca86a64d630034e720d97e67718695205f2 | 1,123 | py | Python | expected_results/users/valid_users_templates/john_doe.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 4 | 2019-08-12T19:36:58.000Z | 2021-09-14T18:48:27.000Z | expected_results/users/valid_users_templates/john_doe.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 1 | 2021-06-02T00:01:00.000Z | 2021-06-02T00:01:00.000Z | expected_results/users/valid_users_templates/john_doe.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 2 | 2019-08-12T10:06:00.000Z | 2020-12-25T05:52:40.000Z | # Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
class JohnDoe:
FIRST_NAME = 'John'
LAST_NAME = 'Doe'
ADDRESS = '9805 Cambridge Street'
CITY = 'NY'
STATE = 'Brooklyn'
ZIP_CODE = '11235'
PHONE = '718-437-9185'
USERNAME = 'johndoe'
PASSWOR... | 27.390244 | 92 | 0.715049 |
f760b6267d6009ab0fdb0417e574e500071072c2 | 35,299 | py | Python | src/scorer.py | nobu-g/cohesion-analysis | bf2e22c1aff51f96fd2aaef6359839646548c3be | [
"MIT"
] | 12 | 2020-12-25T11:13:17.000Z | 2021-12-28T05:19:46.000Z | src/scorer.py | nobu-g/cohesion-analysis | bf2e22c1aff51f96fd2aaef6359839646548c3be | [
"MIT"
] | 1 | 2020-12-25T09:26:26.000Z | 2020-12-25T09:26:34.000Z | src/scorer.py | nobu-g/cohesion-analysis | bf2e22c1aff51f96fd2aaef6359839646548c3be | [
"MIT"
] | 1 | 2022-02-25T13:22:47.000Z | 2022-02-25T13:22:47.000Z | import argparse
import io
import logging
import sys
from collections import OrderedDict
from dataclasses import dataclass
from pathlib import Path
from typing import List, Dict, Set, Union, Optional, TextIO
import pandas as pd
from jinja2 import Template, Environment, FileSystemLoader
from kyoto_reader import KyotoRea... | 48.222678 | 120 | 0.575342 |
f760cd754822e6c117f6f18b47329bbd5af54f18 | 407 | py | Python | setup.py | ethanmiller/tablesnap | c1573247a21fdcdaa422d795ea31c821c4180e28 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ethanmiller/tablesnap | c1573247a21fdcdaa422d795ea31c821c4180e28 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ethanmiller/tablesnap | c1573247a21fdcdaa422d795ea31c821c4180e28 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
setup(
name='tablesnap',
version='0.7.2',
author='Jeremy Grosser',
author_email='jeremy@synack.me',
url='https://github.com/JeremyGrosser/tablesnap',
scripts=[
'tablesnap',
'tableslurp',
'tablechop'
],
install_requires=[
'pyin... | 19.380952 | 53 | 0.555283 |
f7610c48b982c798ed895bc73badd3854b56d97c | 17,389 | py | Python | ost/s1_core/search.py | Scartography/OpenSarToolkit | 53c19e1c6c21260e73518eb9106ce7305539a83d | [
"MIT"
] | null | null | null | ost/s1_core/search.py | Scartography/OpenSarToolkit | 53c19e1c6c21260e73518eb9106ce7305539a83d | [
"MIT"
] | null | null | null | ost/s1_core/search.py | Scartography/OpenSarToolkit | 53c19e1c6c21260e73518eb9106ce7305539a83d | [
"MIT"
] | null | null | null |
'''
Based on a set of search parameters the script will create a query
on www.scihub.copernicus.eu and return the results either
as shapefile, sqlite, or write to a PostGreSQL database.
------------------
Usage
------------------
python3 search.py -a /path/to/aoi-shapefile.shp -b 2018-01-01 -e 2018-31-12
... | 39.974713 | 88 | 0.503077 |
f7610cede53dbc3dc053489011b6c970e78ef3d0 | 9,501 | py | Python | dataset.py | vish119/Neural-Network-for-XOR-and-Binary-Image-Classification | 10e27cc5618c2c399826af06aae6a2e86b4b3df2 | [
"MIT"
] | null | null | null | dataset.py | vish119/Neural-Network-for-XOR-and-Binary-Image-Classification | 10e27cc5618c2c399826af06aae6a2e86b4b3df2 | [
"MIT"
] | null | null | null | dataset.py | vish119/Neural-Network-for-XOR-and-Binary-Image-Classification | 10e27cc5618c2c399826af06aae6a2e86b4b3df2 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import sys
sys.path.append('../../core')
from imgutils import *
class xor(object):
"""
Class that creates a xor dataset. Note that for the grading of the project, this method
might be changed, although it's output format will not be. This implies we migh... | 39.753138 | 107 | 0.581518 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.