hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 251 | max_forks_repo_name stringlengths 4 130 | 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 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1be7ab6f787e652d44d15533e2b5246954d6801d | 932 | py | Python | tests/test_parse_icao24bit.py | Collen-Roller/arp | 08eaa2dda3adb1dbd600597a6d03603669c8e06d | [
"MIT"
] | 2 | 2020-10-28T17:03:14.000Z | 2021-01-27T10:44:33.000Z | tests/test_parse_icao24bit.py | Collen-Roller/arp | 08eaa2dda3adb1dbd600597a6d03603669c8e06d | [
"MIT"
] | 8 | 2020-12-08T16:42:43.000Z | 2020-12-29T00:41:33.000Z | tests/test_parse_icao24bit.py | Collen-Roller/arp | 08eaa2dda3adb1dbd600597a6d03603669c8e06d | [
"MIT"
] | 1 | 2020-12-09T20:35:52.000Z | 2020-12-09T20:35:52.000Z | import unittest
from flydenity import Parser
if __name__ == "__main__":
unittest.main()
| 35.846154 | 133 | 0.713519 |
1be82da5cbe879b6b36fe90dd23217980058a69e | 465 | py | Python | ever/util/_main.py | Bobholamovic/ever | f38060674a40ed53072b9d9be99cc656a830398f | [
"Apache-2.0"
] | 22 | 2021-08-21T00:13:18.000Z | 2022-03-28T19:38:10.000Z | ever/util/_main.py | Bobholamovic/ever | f38060674a40ed53072b9d9be99cc656a830398f | [
"Apache-2.0"
] | 2 | 2021-09-01T06:28:38.000Z | 2021-12-06T07:17:57.000Z | ever/util/_main.py | Bobholamovic/ever | f38060674a40ed53072b9d9be99cc656a830398f | [
"Apache-2.0"
] | 6 | 2021-08-21T06:32:47.000Z | 2022-02-10T07:41:29.000Z | import os
| 19.375 | 56 | 0.597849 |
1bea69b9a810613a8cdcc7d4cd5f8e74e2b87b61 | 687 | py | Python | resthelper/tests/test_build_url.py | rklonner/resthelper | c129a7ff3efb5447aeb9794142c4d640261d962d | [
"MIT"
] | null | null | null | resthelper/tests/test_build_url.py | rklonner/resthelper | c129a7ff3efb5447aeb9794142c4d640261d962d | [
"MIT"
] | null | null | null | resthelper/tests/test_build_url.py | rklonner/resthelper | c129a7ff3efb5447aeb9794142c4d640261d962d | [
"MIT"
] | null | null | null | import unittest
from resthelper.utils import build_restful_url
if __name__ == '__main__':
unittest.main() | 32.714286 | 68 | 0.622999 |
1beb0ef06d9c6f7de745f499f7af1a9f705e4a88 | 929 | py | Python | sendsms/backends/rq.py | this-is-the-bard/django-sendsms | 8944b7d276f91b019ad6aa2e7e29324fa107fa01 | [
"MIT"
] | null | null | null | sendsms/backends/rq.py | this-is-the-bard/django-sendsms | 8944b7d276f91b019ad6aa2e7e29324fa107fa01 | [
"MIT"
] | null | null | null | sendsms/backends/rq.py | this-is-the-bard/django-sendsms | 8944b7d276f91b019ad6aa2e7e29324fa107fa01 | [
"MIT"
] | null | null | null | """ python-rq based backend
This backend will send your messages asynchronously with python-rq.
Before using this backend, make sure that django-rq is installed and
configured.
Usage
-----
In settings.py
SENDSMS_BACKEND = 'sendsms.backends.rq.SmsBackend'
RQ_SENDSMS_BACKEND = 'actual.backend.to.use.SmsBack... | 22.119048 | 68 | 0.787944 |
1bed3f78be12183f03bd98f78582fb16d8457339 | 2,435 | py | Python | venv/Lib/site-packages/openpyxl/worksheet/errors.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | venv/Lib/site-packages/openpyxl/worksheet/errors.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | venv/Lib/site-packages/openpyxl/worksheet/errors.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | #Autogenerated schema
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.descriptors import (
Typed,
String,
Bool,
Sequence,
)
from openpyxl.descriptors.excel import CellRange
| 25.904255 | 64 | 0.631622 |
1bee0a3b08699aa37d40800889d795e3cdf9fb23 | 2,918 | py | Python | cwbot/kolextra/request/ItemDescriptionRequest.py | zeryl/RUcwbot | 734716506066da599fcbc96d0a815a5e30f6e077 | [
"BSD-3-Clause"
] | null | null | null | cwbot/kolextra/request/ItemDescriptionRequest.py | zeryl/RUcwbot | 734716506066da599fcbc96d0a815a5e30f6e077 | [
"BSD-3-Clause"
] | 1 | 2019-04-15T02:48:19.000Z | 2019-04-15T03:02:36.000Z | cwbot/kolextra/request/ItemDescriptionRequest.py | rlbond86/cwbot | 2432a9c9d048b7600b53d5cb8f7ef608c6613258 | [
"BSD-3-Clause"
] | null | null | null | from kol.request.GenericRequest import GenericRequest
from kol.manager import PatternManager
import re
| 42.911765 | 100 | 0.675805 |
1beeb9bf708d482300442a926d31325bbdca0e33 | 619 | py | Python | SmartMove/SmartConnector/cpapi/utils.py | themichaelasher/SmartMove | 074c6e1a854fdfc21fb292e575a869719d56c5d5 | [
"Apache-2.0"
] | 24 | 2018-03-15T09:00:51.000Z | 2022-03-17T05:19:47.000Z | SmartMove/SmartConnector/cpapi/utils.py | themichaelasher/SmartMove | 074c6e1a854fdfc21fb292e575a869719d56c5d5 | [
"Apache-2.0"
] | 8 | 2020-01-20T15:44:42.000Z | 2021-10-18T05:39:04.000Z | SmartMove/SmartConnector/cpapi/utils.py | themichaelasher/SmartMove | 074c6e1a854fdfc21fb292e575a869719d56c5d5 | [
"Apache-2.0"
] | 22 | 2018-06-04T20:36:41.000Z | 2022-03-16T17:10:44.000Z | import json
import sys
def compatible_loads(json_data):
"""
Function json.loads in python 3.0 - 3.5 can't handle bytes, so this function handle it.
:param json_data:
:return: unicode (str if it's python 3)
"""
if isinstance(json_data, bytes) and (3, 0) <= sys.version_info < (3, 6):
... | 24.76 | 92 | 0.610662 |
1bef48d1f47271bb3d6c33f78c3cf6b32220029d | 3,578 | py | Python | VokeScan.py | DaduVoke/VokeScan | a80c8e99ab74dd15a4f9bc3ba7e01abd81840f2c | [
"MIT"
] | 2 | 2021-12-05T04:00:50.000Z | 2022-03-24T17:53:26.000Z | VokeScan.py | DaduVoke/VokeScan | a80c8e99ab74dd15a4f9bc3ba7e01abd81840f2c | [
"MIT"
] | null | null | null | VokeScan.py | DaduVoke/VokeScan | a80c8e99ab74dd15a4f9bc3ba7e01abd81840f2c | [
"MIT"
] | null | null | null | import sys,time
from colorama import Fore, Back, Style
sprint (Fore.RED + ". tool- -DaduVoke- @2021")
import socket
import _thread
import time
try:
scan = Core()
scan.GetData(input(" IP URL\n"))
print(bcolors.WARNING,":",Core.mode,"\n :",Core.ipurl,"\n :",Core.networ... | 18.162437 | 139 | 0.488262 |
1bef4c913e56949ae48100d1d528ebecb2bb01d8 | 53,296 | py | Python | agent/src/clacks/agent/objects/object.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | 2 | 2015-01-26T07:15:19.000Z | 2015-11-09T13:42:11.000Z | agent/src/clacks/agent/objects/object.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | null | null | null | agent/src/clacks/agent/objects/object.py | gonicus/clacks | da579f0acc4e48cf2e9451417ac6792282cf7ab6 | [
"ZPL-2.1"
] | null | null | null | # This file is part of the clacks framework.
#
# http://clacks-project.org
#
# Copyright:
# (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de
#
# License:
# GPL-2: http://www.gnu.org/licenses/gpl-2.0.html
#
# See the LICENSE file in the project's top-level directory for details.
"""
The object base class.
... | 38.287356 | 158 | 0.564001 |
1bef7a1aa389a58d40ce648d1ed75a0579e889d3 | 8,752 | py | Python | tests/test_benchmark.py | fossabot/BIRL | 62e91523ac5797a13a7b78b9869ccfdf61cc60d8 | [
"BSD-3-Clause"
] | null | null | null | tests/test_benchmark.py | fossabot/BIRL | 62e91523ac5797a13a7b78b9869ccfdf61cc60d8 | [
"BSD-3-Clause"
] | null | null | null | tests/test_benchmark.py | fossabot/BIRL | 62e91523ac5797a13a7b78b9869ccfdf61cc60d8 | [
"BSD-3-Clause"
] | null | null | null | """
Testing default benchmarks in single thred and parallel configuration
Check whether it generates correct outputs and resulting values
Copyright (C) 2017-2019 Jiri Borovec <jiri.borovec@fel.cvut.cz>
"""
import argparse
import logging
import os
import shutil
import sys
import unittest
try: # python 3
from uni... | 38.725664 | 114 | 0.63654 |
1bf02d45108f641ace7558443cc9e030c46ebd2f | 65 | py | Python | python/UdemyCourse/2022_Python_Bootcamp/basics/errors_exception_handling/__init__.py | pradyotprksh/development_learning | b6c5494196842f3c273965063815ad222a18b4da | [
"MIT"
] | 9 | 2021-09-03T06:20:48.000Z | 2022-03-19T12:43:30.000Z | python/UdemyCourse/2022_Python_Bootcamp/basics/errors_exception_handling/__init__.py | pradyotprksh/development_learning | b6c5494196842f3c273965063815ad222a18b4da | [
"MIT"
] | null | null | null | python/UdemyCourse/2022_Python_Bootcamp/basics/errors_exception_handling/__init__.py | pradyotprksh/development_learning | b6c5494196842f3c273965063815ad222a18b4da | [
"MIT"
] | 6 | 2021-08-16T01:13:36.000Z | 2022-03-19T12:44:10.000Z | from .errors_exception_handling import errors_exception_handling
| 32.5 | 64 | 0.923077 |
1bf0738223b67b02abba6e6aa0c92e93cd84b652 | 470 | py | Python | mtstub.py | shimniok/rockblock | 7a84d7da7df34c2dbe1a288fb6de24558eb4485f | [
"MIT"
] | 1 | 2020-05-30T01:29:06.000Z | 2020-05-30T01:29:06.000Z | mtstub.py | shimniok/rockblock | 7a84d7da7df34c2dbe1a288fb6de24558eb4485f | [
"MIT"
] | 1 | 2017-10-16T03:30:55.000Z | 2018-01-14T19:05:43.000Z | mtstub.py | shimniok/rockblock | 7a84d7da7df34c2dbe1a288fb6de24558eb4485f | [
"MIT"
] | 1 | 2019-08-05T10:31:46.000Z | 2019-08-05T10:31:46.000Z | #!/usr/bin/env python
##################################################################################################
## mtstub.py
##
## emulates rockblock api so I don't have to burn credits testing...
##################################################################################################
import cgi
#i... | 24.736842 | 98 | 0.417021 |
1bf2d4c209e500db17a5c6d33e7442b5b858b75b | 343 | py | Python | sum.py | PraghadeshManivannan/Built-in-Functions-Python | a3120641e03e7be8e1408dd467997ad6fdf04d87 | [
"MIT"
] | null | null | null | sum.py | PraghadeshManivannan/Built-in-Functions-Python | a3120641e03e7be8e1408dd467997ad6fdf04d87 | [
"MIT"
] | null | null | null | sum.py | PraghadeshManivannan/Built-in-Functions-Python | a3120641e03e7be8e1408dd467997ad6fdf04d87 | [
"MIT"
] | null | null | null |
#sum(iterable, start=0, /)
#Return the sum of a 'start' value (default: 0) plus an iterable of numbers
#When the iterable is empty, return the start value.
'''This function is intended specifically for use with numeric values and may
reject non-numeric types.'''
a = [1,3,5,7,9,4,6,2,8]
print(sum(a))
pr... | 24.5 | 78 | 0.676385 |
1bf4cd25d9e85b2b0cb4131798b2cd2ef33b36d7 | 10,926 | py | Python | idaes/apps/matopt/materials/lattices/diamond_lattice.py | carldlaird/idaes-pse | cc7a32ca9fa788f483fa8ef85f3d1186ef4a596f | [
"RSA-MD"
] | 112 | 2019-02-11T23:16:36.000Z | 2022-03-23T20:59:57.000Z | idaes/apps/matopt/materials/lattices/diamond_lattice.py | carldlaird/idaes-pse | cc7a32ca9fa788f483fa8ef85f3d1186ef4a596f | [
"RSA-MD"
] | 621 | 2019-03-01T14:44:12.000Z | 2022-03-31T19:49:25.000Z | idaes/apps/matopt/materials/lattices/diamond_lattice.py | carldlaird/idaes-pse | cc7a32ca9fa788f483fa8ef85f3d1186ef4a596f | [
"RSA-MD"
] | 154 | 2019-02-01T23:46:33.000Z | 2022-03-23T15:07:10.000Z | #################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... | 43.185771 | 114 | 0.507139 |
1bf4f3ec8b611663d899f073f4f41ae66286507f | 12,055 | py | Python | elateridae_baits.py | AAFC-BICoE/elateridae-ortholog-baitset | 8e17212a26539dfd79b414ffe8f243a906d32149 | [
"MIT"
] | null | null | null | elateridae_baits.py | AAFC-BICoE/elateridae-ortholog-baitset | 8e17212a26539dfd79b414ffe8f243a906d32149 | [
"MIT"
] | null | null | null | elateridae_baits.py | AAFC-BICoE/elateridae-ortholog-baitset | 8e17212a26539dfd79b414ffe8f243a906d32149 | [
"MIT"
] | null | null | null | # coding: utf8
"""
Ortholog Based Bait Design Script for creating Elateridae ortholog based baits suitable submission to myBaits
Compares t_coffee AA alignment scores with nucleotide tranalignments to find conserved blocks
Author Jackson Eyres jackson.eyres@canada.ca
License: MIT
Copywright: Government of Canada
"""
i... | 36.41994 | 117 | 0.616093 |
1bf638f00910b809a7d45e1aeabdb75e4e5aef9c | 1,361 | py | Python | poilab.py | octeufer/Annotate_Optimize | 32d9cecc0159882d3f962990aba07168c4a023f5 | [
"Apache-2.0"
] | null | null | null | poilab.py | octeufer/Annotate_Optimize | 32d9cecc0159882d3f962990aba07168c4a023f5 | [
"Apache-2.0"
] | null | null | null | poilab.py | octeufer/Annotate_Optimize | 32d9cecc0159882d3f962990aba07168c4a023f5 | [
"Apache-2.0"
] | null | null | null | import sys
import numpy as np
sys.path.append("d:/data/annooptimize")
import triangle
import time
tinternal = list()
| 38.885714 | 87 | 0.722998 |
1bf69ac1479d462fb413d5e64a7b2f979173894e | 5,091 | py | Python | t_core/tc_python/xrule.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 3 | 2017-06-02T19:26:27.000Z | 2021-06-14T04:25:45.000Z | t_core/tc_python/xrule.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 8 | 2016-08-24T07:04:07.000Z | 2017-05-26T16:22:47.000Z | t_core/tc_python/xrule.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 1 | 2019-10-31T06:00:23.000Z | 2019-10-31T06:00:23.000Z |
from util.infinity import INFINITY
from tc_python.arule import ARule
from t_core.rollbacker import Rollbacker
from t_core.resolver import Resolver
| 37.433824 | 111 | 0.575329 |
1bf74b762d2902af1c8ee402ce83c52345c29025 | 5,266 | py | Python | tests/commonsense/semantic_lexicon_knowledge/ai2_lexicon_test.py | keisks/propara | 49fa8fe0481291df18b2c7b48e7ba1dafaad48e2 | [
"Apache-2.0"
] | 84 | 2018-06-02T02:00:53.000Z | 2022-03-13T12:17:42.000Z | tests/commonsense/semantic_lexicon_knowledge/ai2_lexicon_test.py | keisks/propara | 49fa8fe0481291df18b2c7b48e7ba1dafaad48e2 | [
"Apache-2.0"
] | 3 | 2018-10-31T00:28:31.000Z | 2020-05-12T01:06:53.000Z | tests/commonsense/semantic_lexicon_knowledge/ai2_lexicon_test.py | keisks/propara | 49fa8fe0481291df18b2c7b48e7ba1dafaad48e2 | [
"Apache-2.0"
] | 13 | 2018-09-14T20:37:51.000Z | 2021-03-23T09:24:49.000Z | from unittest import TestCase
from propara.commonsense.semantic_lexicon_knowledge.ai2_lexicon import AI2Lexicon, AI2LexiconPredicate, AI2LexiconArg, AI2LexiconIndications, \
AI2LexiconPattern
| 71.162162 | 143 | 0.681732 |
1bf7f1bc739f582663b9e33d97b9d4189cae0d04 | 473 | py | Python | fitbit/__init__.py | erichilarysmithsr/python-fitbit | 38cf916d0318aedc91b31d15431fa9c49a13d15f | [
"Apache-2.0"
] | null | null | null | fitbit/__init__.py | erichilarysmithsr/python-fitbit | 38cf916d0318aedc91b31d15431fa9c49a13d15f | [
"Apache-2.0"
] | null | null | null | fitbit/__init__.py | erichilarysmithsr/python-fitbit | 38cf916d0318aedc91b31d15431fa9c49a13d15f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Fitbit API Library
------------------
:copyright: 2012-2015 ORCAS.
:license: BSD, see LICENSE for more details.
"""
from .api import Fitbit, FitbitOauthClient, FitbitOauth2Client
# Meta.
__title__ = 'fitbit'
__author__ = 'Issac Kelly and ORCAS'
__author_email__ = 'bpitcher@orcasinc.com'
... | 18.192308 | 62 | 0.684989 |
1bf7f576395a0ca86f448e1c60010a3d363f6af6 | 468 | py | Python | bitcoinExchange/exchange/api/urls.py | pogginicolo98/start2impact_exchange | 559c42cdeb2dec890d4b1145ed66a1a2f7c362cb | [
"MIT"
] | 1 | 2021-09-08T16:39:07.000Z | 2021-09-08T16:39:07.000Z | bitcoinExchange/exchange/api/urls.py | pogginicolo98/start2impact_exchange | 559c42cdeb2dec890d4b1145ed66a1a2f7c362cb | [
"MIT"
] | null | null | null | bitcoinExchange/exchange/api/urls.py | pogginicolo98/start2impact_exchange | 559c42cdeb2dec890d4b1145ed66a1a2f7c362cb | [
"MIT"
] | null | null | null | from django.urls import include, path
from exchange.api.views import LatestOrdersListAPIView, OrderViewSet, ProfileAPIView
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register(r'orders', OrderViewSet, basename='orders')
urlpatterns = [
path('profile/', ProfileAPIView.as_view()... | 36 | 84 | 0.767094 |
1bf8ddafa4dc0ba6cd6a406c255c3270696943bb | 848 | py | Python | kevin/aggregate/process_html.py | toddoh/thisisallabout_backend | a0c7bad675bd3fff97f99c3e2b49f19a1fef7640 | [
"MIT"
] | null | null | null | kevin/aggregate/process_html.py | toddoh/thisisallabout_backend | a0c7bad675bd3fff97f99c3e2b49f19a1fef7640 | [
"MIT"
] | 5 | 2021-03-18T22:18:49.000Z | 2022-03-11T23:40:56.000Z | kevin/aggregate/process_html.py | toddoh/thisisallabout_backend | a0c7bad675bd3fff97f99c3e2b49f19a1fef7640 | [
"MIT"
] | 1 | 2019-10-16T19:29:12.000Z | 2019-10-16T19:29:12.000Z | from bs4 import BeautifulSoup
import requests
import re | 38.545455 | 173 | 0.660377 |
1bf9ff44f1b06f0e0c18c710168ee340dcb2a97f | 869 | py | Python | cfmacro/_resources/examples/lambda.py | gchiesa/cfmacro | 9c546b7930a54a9b44efffdf87401726981e1b2a | [
"MIT"
] | null | null | null | cfmacro/_resources/examples/lambda.py | gchiesa/cfmacro | 9c546b7930a54a9b44efffdf87401726981e1b2a | [
"MIT"
] | 1 | 2019-07-30T08:49:20.000Z | 2019-07-30T08:49:20.000Z | cfmacro/_resources/examples/lambda.py | gchiesa/cfmacro | 9c546b7930a54a9b44efffdf87401726981e1b2a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from cfmacro.processors import SgProcessor
from cfmacro.core.engine import ProcessorEngine
from cfmacro.core.template import TemplateProcessor
def lambda_handler(event, context):
"""
Implement a core handler for security groups ingress / egress
:param event:
:param context:
... | 28.966667 | 99 | 0.674338 |
1bfcaa846cbe80234230889e864b2dd049be6c62 | 8,038 | py | Python | tf2qa/predict_long.py | mikelkl/TF2-QA | 3bca786d26565335df45538714532d6d3c070a2b | [
"MIT"
] | 17 | 2020-01-29T10:31:07.000Z | 2022-01-10T03:36:00.000Z | tf2qa/predict_long.py | mikelkl/TF2-QA | 3bca786d26565335df45538714532d6d3c070a2b | [
"MIT"
] | null | null | null | tf2qa/predict_long.py | mikelkl/TF2-QA | 3bca786d26565335df45538714532d6d3c070a2b | [
"MIT"
] | 4 | 2021-01-27T15:42:45.000Z | 2021-12-12T20:41:51.000Z | import torch
import argparse
from roberta_modeling import RobertaJointForLong
from transformers.modeling_roberta import RobertaConfig, RobertaModel
from torch.utils.data import TensorDataset, SequentialSampler, DataLoader
import utils
from tqdm import tqdm
import os
import json
import collections
import pickle
import p... | 43.923497 | 122 | 0.686365 |
1bfcf985c108d567ad3614fe9d2baeec4a87e0f1 | 9,385 | py | Python | city-infrastructure-platform/settings.py | City-of-Helsinki/city-infrastructure-platform | c14513a9e54405412085f1047f91ec58b263eac0 | [
"CC0-1.0"
] | 2 | 2020-11-23T22:08:58.000Z | 2022-03-02T13:13:20.000Z | city-infrastructure-platform/settings.py | City-of-Helsinki/city-infrastructure-platform | c14513a9e54405412085f1047f91ec58b263eac0 | [
"CC0-1.0"
] | 170 | 2019-12-31T13:37:04.000Z | 2022-03-12T14:03:35.000Z | city-infrastructure-platform/settings.py | City-of-Helsinki/city-infrastructure-platform | c14513a9e54405412085f1047f91ec58b263eac0 | [
"CC0-1.0"
] | 3 | 2020-05-08T05:58:02.000Z | 2022-03-15T16:07:25.000Z | """
Django settings for city-infrastructure-platform project.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
import environ
import sentry_sdk
from djan... | 31.599327 | 90 | 0.716356 |
1bfd7e8367e5e96a626394bb27f0b9266054e693 | 1,184 | py | Python | test/tc/tet_tc_base_predict_multiclass.py | dumpmemory/Pytorch-NLU | 864fb9acc7751fc51abd3d05d24b5a9a7eab7110 | [
"Apache-2.0"
] | 115 | 2021-08-29T04:28:40.000Z | 2022-03-29T22:57:48.000Z | test/tc/tet_tc_base_predict_multiclass.py | dumpmemory/Pytorch-NLU | 864fb9acc7751fc51abd3d05d24b5a9a7eab7110 | [
"Apache-2.0"
] | 2 | 2022-01-14T01:52:07.000Z | 2022-03-04T11:40:10.000Z | test/tc/tet_tc_base_predict_multiclass.py | dumpmemory/Pytorch-NLU | 864fb9acc7751fc51abd3d05d24b5a9a7eab7110 | [
"Apache-2.0"
] | 18 | 2021-09-23T06:41:10.000Z | 2022-03-22T04:37:05.000Z | # !/usr/bin/python
# -*- coding: utf-8 -*-
# @time : 2021/7/25 19:30
# @author : Mo
# @function: predict model, -
# linux
import platform
import json
import sys
import os
path_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
path_sys = os.path.join(path_root, "pytorch_nlu", "pytorch_textcl... | 32 | 104 | 0.663007 |
1bfe4bc4102702ea9b7f00d3aaa75d9c6a870a4d | 5,645 | py | Python | tests/test_create_spreadsheet_values.py | Tunous/StringSheet | 3b0bd00db6ae780c523524b71774f6d3da44435f | [
"MIT"
] | 14 | 2017-09-17T12:41:39.000Z | 2020-12-15T07:42:55.000Z | tests/test_create_spreadsheet_values.py | Tunous/StringSheet | 3b0bd00db6ae780c523524b71774f6d3da44435f | [
"MIT"
] | 10 | 2017-09-12T20:06:47.000Z | 2021-03-22T17:16:10.000Z | tests/test_create_spreadsheet_values.py | Tunous/StringSheet | 3b0bd00db6ae780c523524b71774f6d3da44435f | [
"MIT"
] | 1 | 2017-09-18T04:55:34.000Z | 2017-09-18T04:55:34.000Z | import unittest
from stringsheet.parser import create_spreadsheet_values
from stringsheet.parser import create_language_sheet_values
from stringsheet.parser import parse_resources
if __name__ == '__main__':
unittest.main()
| 46.270492 | 80 | 0.478654 |
1bff3ce09a664d524ed5b17fd85a06acad12da24 | 195 | py | Python | libs/imgutils.py | EpicKiwi/projet-datascience | 90b59fc674fc2146634d1c1681f9b65083a7aa91 | [
"MIT"
] | null | null | null | libs/imgutils.py | EpicKiwi/projet-datascience | 90b59fc674fc2146634d1c1681f9b65083a7aa91 | [
"MIT"
] | null | null | null | libs/imgutils.py | EpicKiwi/projet-datascience | 90b59fc674fc2146634d1c1681f9b65083a7aa91 | [
"MIT"
] | 2 | 2020-01-14T07:53:50.000Z | 2020-01-14T12:24:35.000Z | import cv2 | 27.857143 | 64 | 0.769231 |
1bff51099f471eb1158044ba33a024f093e0aed7 | 3,079 | py | Python | bin/nsa_fail/nsa_fail.py | changhoonhahn/SEDflow | 4561ecfe3a38cc4c25df263d971a87e8a83f88ce | [
"MIT"
] | 18 | 2022-03-16T03:11:04.000Z | 2022-03-30T16:01:42.000Z | bin/nsa_fail/nsa_fail.py | changhoonhahn/SEDflow | 4561ecfe3a38cc4c25df263d971a87e8a83f88ce | [
"MIT"
] | null | null | null | bin/nsa_fail/nsa_fail.py | changhoonhahn/SEDflow | 4561ecfe3a38cc4c25df263d971a87e8a83f88ce | [
"MIT"
] | null | null | null | import os, sys
import numpy as np
from sedflow import obs as Obs
from sedflow import train as Train
from provabgs import infer as Infer
from provabgs import models as Models
####################################################
# input
####################################################
sample = sys.argv[1]
itrain... | 33.107527 | 92 | 0.528743 |
400075fe46c49c54066ef8f12574919b2debe75a | 2,709 | py | Python | studio/gs_provider.py | NunoEdgarGFlowHub/studio | 42b221892a81535842ff25cbbcc434d6422a19e5 | [
"Apache-2.0"
] | null | null | null | studio/gs_provider.py | NunoEdgarGFlowHub/studio | 42b221892a81535842ff25cbbcc434d6422a19e5 | [
"Apache-2.0"
] | null | null | null | studio/gs_provider.py | NunoEdgarGFlowHub/studio | 42b221892a81535842ff25cbbcc434d6422a19e5 | [
"Apache-2.0"
] | null | null | null | import json
import time
import re
from .keyvalue_provider import KeyValueProvider
from .gcloud_artifact_store import GCloudArtifactStore
from .util import timeit
| 31.137931 | 79 | 0.51495 |
40007ef606785b22cbc7c72b9274d6584b3f3fb5 | 46,830 | py | Python | gslib/tests/test_ls.py | MikeJeffrey/gsutil | 12f4258540ee83aee255ec1baf50e7e6faee10e2 | [
"Apache-2.0"
] | null | null | null | gslib/tests/test_ls.py | MikeJeffrey/gsutil | 12f4258540ee83aee255ec1baf50e7e6faee10e2 | [
"Apache-2.0"
] | null | null | null | gslib/tests/test_ls.py | MikeJeffrey/gsutil | 12f4258540ee83aee255ec1baf50e7e6faee10e2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 44.137606 | 103 | 0.688661 |
4001312cef0d9f28268935ec40cf1f39b54d853e | 131 | py | Python | onadata/libs/utils/audit.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/utils/audit.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/utils/audit.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
HOME_ACCESSED = "home-accessed"
| 32.75 | 82 | 0.824427 |
4001b461738a1a675ced54e42a87a9e7681bbab2 | 2,217 | py | Python | places/management/commands/load_places.py | aevtikheev/dvmn-yandex-afisha | 7112977d6615124412b7e7ffc4abdcaa969b4078 | [
"MIT"
] | null | null | null | places/management/commands/load_places.py | aevtikheev/dvmn-yandex-afisha | 7112977d6615124412b7e7ffc4abdcaa969b4078 | [
"MIT"
] | null | null | null | places/management/commands/load_places.py | aevtikheev/dvmn-yandex-afisha | 7112977d6615124412b7e7ffc4abdcaa969b4078 | [
"MIT"
] | null | null | null | import logging
from urllib.parse import unquote, urlparse
from pathlib import PurePosixPath
import requests
from requests.exceptions import ReadTimeout, ConnectionError, HTTPError
from django.core.management.base import BaseCommand
from django.core.files.base import ContentFile
from places.models import Place, Image
... | 39.589286 | 90 | 0.59991 |
4002a9f7b6d3888657a9b000e3fb8c2cb6fac5dd | 18,227 | py | Python | gslib/utils/ls_helper.py | dickmao/gsutil | 3b61bf0e6188f65f78c72c79ea3cb69e9c61da4b | [
"Apache-2.0"
] | 1 | 2021-09-11T23:58:39.000Z | 2021-09-11T23:58:39.000Z | gslib/utils/ls_helper.py | shinfan/gsutil | 45b5fc020bed44c6342fe70ce8b081aa222d9213 | [
"Apache-2.0"
] | null | null | null | gslib/utils/ls_helper.py | shinfan/gsutil | 45b5fc020bed44c6342fe70ce8b081aa222d9213 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 36.971602 | 80 | 0.681242 |
4003c8b3ef448fd698e5fde8ffd4368a0004acc2 | 2,250 | py | Python | app/config/cnMysql.py | itay-moav/rahl_commander | 79b9bb7d16f4f9511820d0e0ffcbba6ee8e0e42b | [
"MIT"
] | 1 | 2016-12-19T16:09:02.000Z | 2016-12-19T16:09:02.000Z | app/config/cnMysql.py | itay-moav/rahl_commander | 79b9bb7d16f4f9511820d0e0ffcbba6ee8e0e42b | [
"MIT"
] | 19 | 2015-01-08T18:34:13.000Z | 2018-02-26T14:51:22.000Z | app/config/cnMysql.py | itay-moav/rahl_commander | 79b9bb7d16f4f9511820d0e0ffcbba6ee8e0e42b | [
"MIT"
] | null | null | null | '''
Created on Dec 28, 2021
@author: Itay
Abstracting the DB connection piece
'''
import mysql.connector as My
from app import logging as L
from app import exceptions as exceptions | 34.615385 | 158 | 0.636444 |
4004bec8c10906a7cd716dc8ff33d14546f3a2fe | 1,527 | py | Python | src/detector/pre_process_test_data.py | DomGonthier/PecheFantome | d031a8fe5faa2ef35f2c1dbb8241281ffda22429 | [
"MIT"
] | null | null | null | src/detector/pre_process_test_data.py | DomGonthier/PecheFantome | d031a8fe5faa2ef35f2c1dbb8241281ffda22429 | [
"MIT"
] | 8 | 2020-02-19T20:03:44.000Z | 2022-02-03T19:27:24.000Z | src/detector/pre_process_test_data.py | DomGonthier/PecheFantome | d031a8fe5faa2ef35f2c1dbb8241281ffda22429 | [
"MIT"
] | 3 | 2020-02-19T19:02:19.000Z | 2021-12-14T14:06:25.000Z | import os
from tqdm import tqdm
import cv2
import numpy as np
#pre process test data:
path = "raw_test_data/"
list_width = []
list_height = []
list_image = []
pre_process()
for image in list_image:
print(image.shape)
| 31.163265 | 115 | 0.59201 |
4004f14ddc4bfb878b0872bfe2604774deea7bcf | 4,934 | py | Python | tensorflow/python/training/localhost_cluster_performance_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 101 | 2016-12-03T11:40:52.000Z | 2017-12-23T02:02:03.000Z | tensorflow/python/training/localhost_cluster_performance_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 9 | 2016-12-14T03:27:46.000Z | 2017-09-13T02:29:07.000Z | tensorflow/python/training/localhost_cluster_performance_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 47 | 2016-12-04T12:37:24.000Z | 2018-01-14T18:13:07.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.097744 | 80 | 0.694366 |
4007ccb371063c993bd22bb2370d18838e357a3f | 3,218 | py | Python | extractor/util.py | bcskda/vk-archive-deepercopy | 3619b94eb3e0f5f67860022cdfb2074e457c0cd2 | [
"Unlicense"
] | 1 | 2020-04-24T09:24:31.000Z | 2020-04-24T09:24:31.000Z | extractor/util.py | bcskda/vk-archive-deepercopy | 3619b94eb3e0f5f67860022cdfb2074e457c0cd2 | [
"Unlicense"
] | null | null | null | extractor/util.py | bcskda/vk-archive-deepercopy | 3619b94eb3e0f5f67860022cdfb2074e457c0cd2 | [
"Unlicense"
] | null | null | null | import functools
import glob
import itertools
import logging
import os
from progressbar import progressbar
import re
import requests
from typing import List
def alphanumeric_glob(pattern: str):
"""Glob and sort alpahnumerically. Limitations: exactly one `*', no `?', file names with single extention."""
matches... | 38.771084 | 134 | 0.657551 |
400afc4da001a8c030925a65e03f44b9ed050772 | 1,637 | py | Python | setup.py | gillins/pyshepseg | bfa8d157d610bf4f581a2500d0afb42d4f92d59b | [
"MIT"
] | 5 | 2021-02-03T05:02:56.000Z | 2022-01-31T07:55:20.000Z | setup.py | gillins/pyshepseg | bfa8d157d610bf4f581a2500d0afb42d4f92d59b | [
"MIT"
] | 14 | 2021-02-03T04:18:48.000Z | 2022-01-24T03:50:22.000Z | setup.py | gillins/pyshepseg | bfa8d157d610bf4f581a2500d0afb42d4f92d59b | [
"MIT"
] | 13 | 2021-02-03T03:41:17.000Z | 2022-01-24T04:21:23.000Z | #Copyright 2021 Neil Flood and Sam Gillingham. All rights reserved.
#
#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, cop... | 46.771429 | 106 | 0.756261 |
400c696eb52726be2cb58df8b7625711faea5a60 | 3,846 | py | Python | src/utils.py | daochenzha/SimTSC | 6e3200510e8e464049eab95db9540afdaf397f9c | [
"MIT"
] | 23 | 2022-01-06T05:15:35.000Z | 2022-03-28T08:08:14.000Z | src/utils.py | daochenzha/SimTSC | 6e3200510e8e464049eab95db9540afdaf397f9c | [
"MIT"
] | 2 | 2022-02-10T02:22:35.000Z | 2022-03-28T16:45:17.000Z | src/utils.py | daochenzha/SimTSC | 6e3200510e8e464049eab95db9540afdaf397f9c | [
"MIT"
] | 5 | 2022-01-09T08:58:24.000Z | 2022-01-19T09:52:43.000Z | import os
import numpy as np
import pandas as pd
from sklearn.preprocessing import LabelEncoder
def read_dataset_from_npy(path):
""" Read dataset from .npy file
"""
data = np.load(path, allow_pickle=True)
return data[()]['X'], data[()]['y'], data[()]['train_idx'], data[()]['test_idx']
def read_dataset... | 29.584615 | 103 | 0.621945 |
400d71727dfe67b72a8bc6849bc10bc05b88d55b | 17,458 | py | Python | mpinterfaces/mat2d/friction/analysis.py | yw-fang/MPInterfaces | ca2e43b590fdfbcf87a116c5c758e54cb7cb2d2e | [
"MIT"
] | 56 | 2015-06-23T03:03:18.000Z | 2022-02-06T16:41:34.000Z | mpinterfaces/mat2d/friction/analysis.py | yw-fang/MPInterfaces | ca2e43b590fdfbcf87a116c5c758e54cb7cb2d2e | [
"MIT"
] | 21 | 2015-09-03T17:50:18.000Z | 2022-03-01T02:26:34.000Z | mpinterfaces/mat2d/friction/analysis.py | joshgabriel/MPInterfaces | 2799ae161fa94c78842092fb24ef468607afa465 | [
"MIT"
] | 50 | 2015-09-17T19:09:36.000Z | 2021-11-15T19:13:20.000Z | from __future__ import print_function, division, unicode_literals
import os
import warnings
import numpy as np
from scipy import interpolate
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
from pymatgen.io.vasp.outputs import Vasprun
from pymatgen.core.structure import Structure
from pymatg... | 32.815789 | 94 | 0.592966 |
400f0a8fc2e264478738eb502734b3f76efaa361 | 1,380 | py | Python | aiopylimit/tests/test_aiopylimit.py | zealotous/aiopylimit | 0f93a06e751b97959835187a05311deaffaed9d8 | [
"Apache-2.0"
] | 4 | 2019-05-09T12:39:14.000Z | 2022-01-05T20:36:06.000Z | aiopylimit/tests/test_aiopylimit.py | zealotous/aiopylimit | 0f93a06e751b97959835187a05311deaffaed9d8 | [
"Apache-2.0"
] | null | null | null | aiopylimit/tests/test_aiopylimit.py | zealotous/aiopylimit | 0f93a06e751b97959835187a05311deaffaed9d8 | [
"Apache-2.0"
] | 1 | 2022-01-05T19:56:49.000Z | 2022-01-05T19:56:49.000Z | from aiopylimit import AIOPyRateLimit
from aiopylimit import AIOPyRateLimitException
import asynctest
import asyncio
| 39.428571 | 72 | 0.642754 |
4010464a9caf650b2a6706b3ea8adb7b2458ae14 | 5,772 | py | Python | bookworm/platform_services/_win32/tesseract_download.py | mush42/bookworm | a4bdd89363137a89a1bed1e9e072de4fb55576fd | [
"MIT"
] | 18 | 2019-07-19T22:12:15.000Z | 2020-08-26T17:45:19.000Z | bookworm/platform_services/_win32/tesseract_download.py | mush42/bookworm | a4bdd89363137a89a1bed1e9e072de4fb55576fd | [
"MIT"
] | 44 | 2019-07-15T10:17:00.000Z | 2020-07-26T11:22:53.000Z | bookworm/platform_services/_win32/tesseract_download.py | mush42/bookworm | a4bdd89363137a89a1bed1e9e072de4fb55576fd | [
"MIT"
] | 9 | 2019-09-03T13:13:31.000Z | 2020-08-25T13:55:27.000Z | # coding: utf-8
import sys
import shutil
import requests
import wx
from pathlib import Path
from urllib.parse import urljoin, urlsplit
from tempfile import TemporaryFile
from zipfile import ZipFile
from bookworm import typehints as t
from bookworm import app
from bookworm.http_tools import RemoteJsonResource, HttpReso... | 26 | 139 | 0.573458 |
4010dc640b95065e204f3d03308d81598d5d3d22 | 2,448 | py | Python | python/plugins/processing/algs/grass7/ext/v_proj.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | null | null | null | python/plugins/processing/algs/grass7/ext/v_proj.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | null | null | null | python/plugins/processing/algs/grass7/ext/v_proj.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | 1 | 2021-12-25T08:40:30.000Z | 2021-12-25T08:40:30.000Z | # -*- coding: utf-8 -*-
"""
***************************************************************************
v_proj.py
---------
Date : November 2017
Copyright : (C) 2017 by Mdric Ribreux
Email : medspx at medspx dot fr
******************************************... | 36 | 75 | 0.561683 |
401141d52ec8be8928fc937b5ae582051fa62e45 | 1,919 | py | Python | examples/diode/gmsh_diode2d.py | QuantumOfMoose/devsim | 22f888119059a86bfc87ba9e7d9ac2cc90dadfb6 | [
"Apache-2.0"
] | null | null | null | examples/diode/gmsh_diode2d.py | QuantumOfMoose/devsim | 22f888119059a86bfc87ba9e7d9ac2cc90dadfb6 | [
"Apache-2.0"
] | null | null | null | examples/diode/gmsh_diode2d.py | QuantumOfMoose/devsim | 22f888119059a86bfc87ba9e7d9ac2cc90dadfb6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Devsim LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 30.951613 | 93 | 0.755602 |
40114e46f1a2c773c276da8bbeeb5529999aac68 | 470 | py | Python | python/astro_imaging/config.py | taranu/astro_imaging | a5a712576bd12762dc69f826703e077a859d8ec0 | [
"Apache-2.0"
] | null | null | null | python/astro_imaging/config.py | taranu/astro_imaging | a5a712576bd12762dc69f826703e077a859d8ec0 | [
"Apache-2.0"
] | null | null | null | python/astro_imaging/config.py | taranu/astro_imaging | a5a712576bd12762dc69f826703e077a859d8ec0 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
import os
path_base_default = os.getenv('ASTRO_IMAGING_DATA_PATH', default='./')
paths_default = Paths()
| 22.380952 | 70 | 0.66383 |
4011b94aee384459cb359f2d52855f8d32eb9b50 | 8,018 | py | Python | AT.py | MTandHJ/roboc | 43e5b2f9ea520b76221a7334d34ef4aaf9b3334b | [
"MIT"
] | 8 | 2021-06-07T11:02:38.000Z | 2022-03-17T11:30:28.000Z | AT.py | MTandHJ/roboc | 43e5b2f9ea520b76221a7334d34ef4aaf9b3334b | [
"MIT"
] | null | null | null | AT.py | MTandHJ/roboc | 43e5b2f9ea520b76221a7334d34ef4aaf9b3334b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from typing import Tuple
import argparse
from src.loadopts import *
METHOD = "RobOC-AT"
SAVE_FREQ = 5
PRINT_FREQ = 20
FMT = "{description}={scale}-{leverage}" \
"={learning_policy}-{optimizer}-{lr}" \
"={attack}-{epsilon:.4f}-{stepsize}-{steps}" \
"={batch_size}={trans... | 33.974576 | 109 | 0.669494 |
4012033dc557a9acee5693b0291d1d05afe295c0 | 680 | py | Python | notesapp/api_v1/models.py | kampkelly/drf_template | 44cda3fd4ebf0dc073a46205b392d5e783d9ceea | [
"MIT"
] | null | null | null | notesapp/api_v1/models.py | kampkelly/drf_template | 44cda3fd4ebf0dc073a46205b392d5e783d9ceea | [
"MIT"
] | null | null | null | notesapp/api_v1/models.py | kampkelly/drf_template | 44cda3fd4ebf0dc073a46205b392d5e783d9ceea | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
| 23.448276 | 80 | 0.733824 |
401276c3187f1d2baed3d5f8ab8ae0afba6d8f18 | 8,534 | py | Python | src/main_TS_tsconv_jma.py | inoue0406/radarJMA | f8996c3fe201f97d414fc96c4abfc6f930738d47 | [
"MIT"
] | 6 | 2018-12-20T00:32:17.000Z | 2021-05-24T08:29:08.000Z | src/main_TS_tsconv_jma.py | inoue0406/radarJMA | f8996c3fe201f97d414fc96c4abfc6f930738d47 | [
"MIT"
] | null | null | null | src/main_TS_tsconv_jma.py | inoue0406/radarJMA | f8996c3fe201f97d414fc96c4abfc6f930738d47 | [
"MIT"
] | 4 | 2018-09-20T07:08:03.000Z | 2020-06-07T21:43:31.000Z | # seq2seq LSTM (no-convolutional model) for time series prediction
import numpy as np
import torch
import torchvision
import torch.utils.data as data
import torchvision.transforms as transforms
import pandas as pd
import h5py
import os
import sys
import json
import time
import pdb
from jma_timeseries_dataset import... | 40.832536 | 99 | 0.522498 |
40131096d61db66fe053946df5d75b8d65c51a7a | 556 | py | Python | bell2014/energy/prob_abs_s.py | dmaugis/intrinsic | e223fc8abceb2bf26f9a7752d72afe598ac4e1fd | [
"MIT"
] | 134 | 2015-01-04T04:54:19.000Z | 2021-10-16T07:39:02.000Z | bell2014/energy/prob_abs_s.py | dmaugis/intrinsic | e223fc8abceb2bf26f9a7752d72afe598ac4e1fd | [
"MIT"
] | 10 | 2016-07-30T21:45:11.000Z | 2021-03-03T14:12:50.000Z | bell2014/energy/prob_abs_s.py | dmaugis/intrinsic | e223fc8abceb2bf26f9a7752d72afe598ac4e1fd | [
"MIT"
] | 34 | 2015-01-14T16:39:27.000Z | 2021-10-31T11:29:50.000Z | import numpy as np
| 30.888889 | 85 | 0.591727 |
4013520787f6cc9bbf08df7635faa9848889aff8 | 13,500 | py | Python | onemsdk/parser/tag.py | mvnm/onemsdk | d6293c632d15af3b044f130343899d3b242e287a | [
"MIT"
] | null | null | null | onemsdk/parser/tag.py | mvnm/onemsdk | d6293c632d15af3b044f130343899d3b242e287a | [
"MIT"
] | 6 | 2019-07-05T07:54:03.000Z | 2019-09-30T10:47:10.000Z | onemsdk/parser/tag.py | mvnm/onemsdk | d6293c632d15af3b044f130343899d3b242e287a | [
"MIT"
] | 2 | 2019-08-30T07:36:48.000Z | 2020-01-13T01:40:06.000Z | import inspect
import sys
from abc import ABC, abstractmethod
from enum import Enum
from typing import List, Union, Type, Optional, Dict, Any
from pydantic import BaseModel
from onemsdk.exceptions import NodeTagMismatchException, ONEmSDKException
from .node import Node
__all__ = ['Tag', 'HeaderTag', 'FooterTag', 'Br... | 28.421053 | 91 | 0.605333 |
4014970fe4ab56a4d4e3af8b117a8432e328801e | 12,113 | py | Python | backend/syntax/rule.py | austinmarsray/Ccompiler | b3ef61283e33d06294c491b71586a945c38c6e54 | [
"MIT"
] | null | null | null | backend/syntax/rule.py | austinmarsray/Ccompiler | b3ef61283e33d06294c491b71586a945c38c6e54 | [
"MIT"
] | null | null | null | backend/syntax/rule.py | austinmarsray/Ccompiler | b3ef61283e33d06294c491b71586a945c38c6e54 | [
"MIT"
] | null | null | null |
"""
1. program -> define-list
2. define-list -> define define-list
| empty
3. define -> type ID define-type
4. define-type -> var-define-follow
| fun-define-follow
5. var-define-follow -> ;
| [ NUM ] ;
6. type -> int
| void
7. fun-define-follo... | 29.834975 | 103 | 0.536366 |
4015db6712f5e331d7a0bca4b41018047675a6cf | 24,566 | py | Python | redash/models.py | slachiewicz/redash | 84d95272f31885be00fbeef0cdbf6ddae6037f5d | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-06-27T07:40:51.000Z | 2019-06-27T07:40:51.000Z | redash/models.py | slachiewicz/redash | 84d95272f31885be00fbeef0cdbf6ddae6037f5d | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2021-03-20T05:38:23.000Z | 2021-03-20T05:38:23.000Z | redash/models.py | slachiewicz/redash | 84d95272f31885be00fbeef0cdbf6ddae6037f5d | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | import json
import hashlib
import logging
import os
import threading
import time
import datetime
import itertools
import peewee
from passlib.apps import custom_app_context as pwd_context
from playhouse.postgres_ext import ArrayField, DateTimeTZField, PostgresqlExtDatabase
from flask.ext.login import UserMixin, Anonymo... | 33.790922 | 121 | 0.620492 |
40163fa4a642e9716f853bee7c3624573ecfac17 | 10,112 | py | Python | xclib/classifier/ova.py | sushantsondhi/pyxclib | ecdfab6b72f9a02892eee617f45bef73c928ca81 | [
"MIT"
] | 4 | 2019-07-11T14:43:22.000Z | 2019-08-08T19:12:53.000Z | xclib/classifier/ova.py | kunaldahiya/xclib | b40e4dd49533ac78231a12f8af362e7f8c6f5df2 | [
"MIT"
] | null | null | null | xclib/classifier/ova.py | kunaldahiya/xclib | b40e4dd49533ac78231a12f8af362e7f8c6f5df2 | [
"MIT"
] | null | null | null | import numpy as np
import time
import logging
from .base import BaseClassifier
import scipy.sparse as sp
from ._svm import train_one
from functools import partial
from ..utils import sparse
from ..data import data_loader
from ._svm import train_one, _get_liblinear_solver_type
from joblib import Parallel, delayed
from .... | 37.313653 | 79 | 0.598497 |
40179a2e52133e978bed3c8e59ac4742ba5dae20 | 6,555 | py | Python | ipgroup_test.py | RyPeck/python-ipgroup | 8fb1037d886a52127e7231f051403396dcb4dc60 | [
"Apache-2.0"
] | 1 | 2015-01-10T18:34:51.000Z | 2015-01-10T18:34:51.000Z | ipgroup_test.py | RyPeck/python-ipgroup | 8fb1037d886a52127e7231f051403396dcb4dc60 | [
"Apache-2.0"
] | null | null | null | ipgroup_test.py | RyPeck/python-ipgroup | 8fb1037d886a52127e7231f051403396dcb4dc60 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import ipaddress
import random
import unittest
import ipgroup
if __name__ == "__main__":
unittest.main()
| 31.666667 | 79 | 0.438139 |
4017c147f527555c7fa69c7bf75c0f142e6a0a28 | 2,566 | py | Python | progress.py | PsiLupan/calcprogress | 05b77e1eedb7726c34f545e10837283e2a1c6180 | [
"MIT"
] | 2 | 2022-03-07T06:41:35.000Z | 2022-03-11T04:26:40.000Z | progress.py | PsiLupan/calcprogress | 05b77e1eedb7726c34f545e10837283e2a1c6180 | [
"MIT"
] | 1 | 2022-02-22T02:08:06.000Z | 2022-02-22T02:08:06.000Z | progress.py | PsiLupan/calcprogress | 05b77e1eedb7726c34f545e10837283e2a1c6180 | [
"MIT"
] | 1 | 2022-02-21T19:47:10.000Z | 2022-02-21T19:47:10.000Z | from dataclasses import dataclass
from pickle import FALSE
from dol import Dol
from asm_section_list import AsmSection, AsmSectionType
def calc_generic_progress(dol: Dol, asm_list: list[AsmSection]):
# Sum up code/data in ASM
asm_code_size = 0
asm_data_size = 0
for section in asm_list:
if secti... | 33.763158 | 102 | 0.66212 |
4018589aba6937e4ecc7ee0d948bf2a417774d03 | 13,993 | py | Python | main_qm9.py | maxxxzdn/en_flows | 04ed4dd45431cafcd23f8bf5199a47f917a72058 | [
"MIT"
] | null | null | null | main_qm9.py | maxxxzdn/en_flows | 04ed4dd45431cafcd23f8bf5199a47f917a72058 | [
"MIT"
] | null | null | null | main_qm9.py | maxxxzdn/en_flows | 04ed4dd45431cafcd23f8bf5199a47f917a72058 | [
"MIT"
] | null | null | null | import utils
import argparse
import wandb
from os.path import join
from qm9 import dataset
from qm9 import losses
from qm9.models import get_optim, get_model
from flows.utils import assert_mean_zero_with_mask, remove_mean_with_mask,\
assert_correctly_masked
import torch
import time
import pickle
import numpy as np
... | 38.977716 | 116 | 0.622811 |
40186bf606d530f7f4ad08aa9b623b5881609f5c | 230 | py | Python | vise/tests/util/test_string.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 16 | 2020-07-14T13:14:05.000Z | 2022-03-04T13:39:30.000Z | vise/tests/util/test_string.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 10 | 2021-03-15T20:47:45.000Z | 2021-08-19T00:47:12.000Z | vise/tests/util/test_string.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 6 | 2020-03-03T00:42:39.000Z | 2022-02-22T02:34:47.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2021. Distributed under the terms of the MIT License.
from vise.util.string import numbers_to_lowercases
| 32.857143 | 70 | 0.73913 |
401926cb60c477135712ef8b53eac69d6cf43064 | 421 | py | Python | code/ch_02_foundations/_02_noneness.py | SuppMonkey/write.pythonic.code | 4400b219198c14ea0d7d9453cf6d367123b6ce8c | [
"MIT"
] | 679 | 2016-06-16T22:19:40.000Z | 2022-03-25T19:31:45.000Z | code/ch_02_foundations/_02_noneness.py | SuppMonkey/write.pythonic.code | 4400b219198c14ea0d7d9453cf6d367123b6ce8c | [
"MIT"
] | 11 | 2017-04-17T15:25:42.000Z | 2019-11-30T15:58:28.000Z | code/ch_02_foundations/_02_noneness.py | SuppMonkey/write.pythonic.code | 4400b219198c14ea0d7d9453cf6d367123b6ce8c | [
"MIT"
] | 199 | 2016-06-21T19:13:47.000Z | 2022-03-25T03:36:54.000Z |
accounts = find_accounts('python')
if accounts is None:
print("Error: DB not available")
else:
print("Accounts found: Would list them here...")
db_is_availble = True
| 10.268293 | 52 | 0.655582 |
401988f94a7b7ebda02b1f821bbce411385f8136 | 3,885 | py | Python | pupa/tests/importers/test_base_importer.py | influence-usa/pupa | 5105c39a535ad401f7babe4eecb3861bed1f8326 | [
"BSD-3-Clause"
] | null | null | null | pupa/tests/importers/test_base_importer.py | influence-usa/pupa | 5105c39a535ad401f7babe4eecb3861bed1f8326 | [
"BSD-3-Clause"
] | 3 | 2015-06-09T19:22:50.000Z | 2015-06-09T21:41:22.000Z | pupa/tests/importers/test_base_importer.py | influence-usa/pupa | 5105c39a535ad401f7babe4eecb3861bed1f8326 | [
"BSD-3-Clause"
] | null | null | null | import os
import json
import shutil
import tempfile
import mock
import pytest
from opencivicdata.models import Person
from pupa.scrape import Person as ScrapePerson
from pupa.scrape import Organization as ScrapeOrganization
from pupa.importers.base import omnihash, BaseImporter
from pupa.importers import PersonImporter... | 31.585366 | 94 | 0.686486 |
401b154f2a06b6253bd915fb79af056b04b243aa | 6,008 | py | Python | packaging/bdist_trinoadmin.py | wgzhao/trino-admin | cd2c71e4d0490cf836a7ddf0dbab69b967408ac8 | [
"Apache-2.0"
] | null | null | null | packaging/bdist_trinoadmin.py | wgzhao/trino-admin | cd2c71e4d0490cf836a7ddf0dbab69b967408ac8 | [
"Apache-2.0"
] | 2 | 2021-10-19T05:37:09.000Z | 2022-03-29T22:07:21.000Z | packaging/bdist_trinoadmin.py | wgzhao/trino-admin | cd2c71e4d0490cf836a7ddf0dbab69b967408ac8 | [
"Apache-2.0"
] | 1 | 2021-12-27T02:38:32.000Z | 2021-12-27T02:38:32.000Z | #!/usr/bin/env python
# -*- 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 t... | 37.55 | 116 | 0.621172 |
401bf5f8c246403323fb3816b89f804ced1d9820 | 547 | py | Python | 2020-05-month-long-challenge/day22.py | jkbockstael/leetcode | 8ef5c907fb153c37dc97f6524493ceca2044ea38 | [
"Unlicense"
] | null | null | null | 2020-05-month-long-challenge/day22.py | jkbockstael/leetcode | 8ef5c907fb153c37dc97f6524493ceca2044ea38 | [
"Unlicense"
] | null | null | null | 2020-05-month-long-challenge/day22.py | jkbockstael/leetcode | 8ef5c907fb153c37dc97f6524493ceca2044ea38 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# Day 22: Sort Characters By Frequency
#
# Given a string, sort it in decreasing order based on the frequency of
# characters.
import collections
# Tests
assert Solution().frequencySort("tree") in ["eert", "eetr"]
assert Solution().frequencySort("cccaaa") in ["cccaaa", "aaaccc"]
assert Solutio... | 27.35 | 71 | 0.659963 |
401c85c8336927c2f23953dd8bb76eb17a0d8316 | 1,877 | py | Python | loc.py | relax-space/pandas-first | c8aceae09263a9566ef7dc7631e27f25d569aad4 | [
"Apache-2.0"
] | null | null | null | loc.py | relax-space/pandas-first | c8aceae09263a9566ef7dc7631e27f25d569aad4 | [
"Apache-2.0"
] | null | null | null | loc.py | relax-space/pandas-first | c8aceae09263a9566ef7dc7631e27f25d569aad4 | [
"Apache-2.0"
] | null | null | null | '''
: lociloc
1.
2. 1
3.
dataframe, indexcolumns,ilocloc
,iloc, loc
'''
import numpy as np
import pandas as pd
| 26.069444 | 79 | 0.559403 |
401e8c47a022914e9d9cdffe16372061e6ecc752 | 4,673 | py | Python | checkproject/runner.py | perror/checkproject | 9321470164e010778d32e24dc77c0b28eccd9429 | [
"BSD-3-Clause"
] | null | null | null | checkproject/runner.py | perror/checkproject | 9321470164e010778d32e24dc77c0b28eccd9429 | [
"BSD-3-Clause"
] | null | null | null | checkproject/runner.py | perror/checkproject | 9321470164e010778d32e24dc77c0b28eccd9429 | [
"BSD-3-Clause"
] | null | null | null | """Runner to discover, run and collect the results of all the checks."""
def import_module(module_path):
"""Import a Python file as a module in the current context.
@param module_path: Path to the Python file.
@return: A reference to the module once loaded.
"""
import os
import sys
modu... | 32.227586 | 85 | 0.596833 |
401fd2803f10b2fab1010a7dfe0776cbe8cc8571 | 11,612 | py | Python | neutron_fwaas/extensions/firewall_v2.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | null | null | null | neutron_fwaas/extensions/firewall_v2.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | null | null | null | neutron_fwaas/extensions/firewall_v2.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 Mirantis, 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 in w... | 38.323432 | 79 | 0.673527 |
40202bd57c8aba134557450b58ae36c3239d01dd | 4,345 | py | Python | model_hub/model_hub/mmdetection/utils.py | gh-determined-ai/determined | 9a1ab33a3a356b69681b3351629fef4ab98ddb56 | [
"Apache-2.0"
] | null | null | null | model_hub/model_hub/mmdetection/utils.py | gh-determined-ai/determined | 9a1ab33a3a356b69681b3351629fef4ab98ddb56 | [
"Apache-2.0"
] | null | null | null | model_hub/model_hub/mmdetection/utils.py | gh-determined-ai/determined | 9a1ab33a3a356b69681b3351629fef4ab98ddb56 | [
"Apache-2.0"
] | null | null | null | """
Various utility functions for using mmdetection in Determined that may be useful
even if not using the provided MMDetTrial.
build_fp16_loss_scaler is large derived from the original mmcv code at
https://github.com/open-mmlab/mmcv/blob/master/mmcv/runner/hooks/optimizer.py
mmcv is covered by the Apache 2.0 License.... | 40.990566 | 95 | 0.61519 |
40203044d0b70862532fc8cce70af574c829a8d8 | 2,465 | py | Python | gcloud/datastores/tests/STUB_test_bigquery.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 2 | 2017-03-01T20:09:06.000Z | 2019-02-08T17:10:16.000Z | gcloud/datastores/tests/STUB_test_bigquery.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 40 | 2015-10-10T15:02:21.000Z | 2020-03-17T22:32:04.000Z | gcloud/datastores/tests/STUB_test_bigquery.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 2 | 2018-11-14T21:50:58.000Z | 2022-03-07T20:59:27.000Z | """tests bigquery client"""
import unittest
from gcloud.datastores.bigquery import BigqueryClient
| 22.409091 | 78 | 0.539959 |
40219219083fe79c8f213a75f899041ef2518cf2 | 354 | py | Python | filter_hash.py | mbougarne/python-algos | f05c491903dfce95ee134852252c55c2cee1b07a | [
"MIT"
] | null | null | null | filter_hash.py | mbougarne/python-algos | f05c491903dfce95ee134852252c55c2cee1b07a | [
"MIT"
] | null | null | null | filter_hash.py | mbougarne/python-algos | f05c491903dfce95ee134852252c55c2cee1b07a | [
"MIT"
] | null | null | null | fruits = ["orange", "banana", "apple", "avocado", "kiwi", "apricot",
"cherry", "grape", "coconut", "lemon", "mango", "peach",
"pear", "strawberry", "pineapple", "apple", "orange", "pear",
"grape", "banana"
]
filters = dict()
for key in fruits:
filters[key] = 1
result =... | 27.230769 | 73 | 0.536723 |
4022d54aeba2badfe2c92ef3c771f491343dff82 | 1,919 | py | Python | teste/knn.py | joandesonandrade/nebulosa | 5bc157322ed0bdb81f6f00f6ed1ea7f7a5cadfe0 | [
"MIT"
] | null | null | null | teste/knn.py | joandesonandrade/nebulosa | 5bc157322ed0bdb81f6f00f6ed1ea7f7a5cadfe0 | [
"MIT"
] | null | null | null | teste/knn.py | joandesonandrade/nebulosa | 5bc157322ed0bdb81f6f00f6ed1ea7f7a5cadfe0 | [
"MIT"
] | null | null | null | from sklearn import preprocessing
import pandas as pd
import numpy as np
#import matplotlib.pyplot as plt
#Abrindo o dados como Dataframe
dados = pd.read_csv('dados/001.csv')
#Iniciando o mtodo para binanizar as classe sim=1; no=0
pre = preprocessing.LabelBinarizer()
#Binazirando a classe jogou, e atribundo a uma ma... | 28.641791 | 105 | 0.727983 |
40255e51d495409353d842161452761a11a4b039 | 8,940 | py | Python | components/google-cloud/tests/container/experimental/gcp_launcher/test_batch_prediction_job_remote_runner.py | m-mayran/pipelines | 4e89973504980ff89d896fda09fc29a339b2d744 | [
"Apache-2.0"
] | null | null | null | components/google-cloud/tests/container/experimental/gcp_launcher/test_batch_prediction_job_remote_runner.py | m-mayran/pipelines | 4e89973504980ff89d896fda09fc29a339b2d744 | [
"Apache-2.0"
] | null | null | null | components/google-cloud/tests/container/experimental/gcp_launcher/test_batch_prediction_job_remote_runner.py | m-mayran/pipelines | 4e89973504980ff89d896fda09fc29a339b2d744 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Kubeflow 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 applicabl... | 45.380711 | 115 | 0.794519 |
4027f13cd3b7d7bc0f1afe366ba2f0949bed351e | 805 | py | Python | rotypes/Windows/Storage/Streams/__init__.py | Gliese129/ArknightsAutoHelper | 43971a63da55001ebc55a7e0de56e9364dff04bb | [
"MIT"
] | 18 | 2022-03-18T08:20:28.000Z | 2022-03-31T15:19:15.000Z | rotypes/Windows/Storage/Streams/__init__.py | Gliese129/ArknightsAutoHelper | 43971a63da55001ebc55a7e0de56e9364dff04bb | [
"MIT"
] | 4 | 2021-01-23T13:05:39.000Z | 2021-09-11T14:29:56.000Z | rotypes/Windows/Storage/Streams/__init__.py | Gliese129/ArknightsAutoHelper | 43971a63da55001ebc55a7e0de56e9364dff04bb | [
"MIT"
] | 1 | 2022-03-20T05:52:38.000Z | 2022-03-20T05:52:38.000Z | from ctypes import c_uint32, c_void_p, string_at
from rotypes.idldsl import define_winrt_com_method, GUID
from rotypes.inspectable import IInspectable, IUnknown
define_winrt_com_method(IBufferByteAccess, 'Buffer', retval=c_void_p)
define_winrt_com_method(IBuffer, 'get_Capacity', propget=c_uint32)
define_winrt_com... | 27.758621 | 69 | 0.773913 |
40293f7dca9ef672564fb8730fe1d23ecd590f2b | 23,410 | py | Python | simple_playgrounds/playground.py | Asjidkalam/simple-playgrounds | 72ec42987a33175103191fa9722e0e002f889954 | [
"MIT"
] | null | null | null | simple_playgrounds/playground.py | Asjidkalam/simple-playgrounds | 72ec42987a33175103191fa9722e0e002f889954 | [
"MIT"
] | null | null | null | simple_playgrounds/playground.py | Asjidkalam/simple-playgrounds | 72ec42987a33175103191fa9722e0e002f889954 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Playground documentation.
Module defining Playground Base Class
"""
import os
from abc import ABC
import yaml
import pymunk
from .utils import PositionAreaSampler
from .utils.definitions import SPACE_DAMPING, CollisionTypes, SceneElementTypes
# pylint: disable=unused-argument
# pylint:... | 31.893733 | 125 | 0.641948 |
402b9f4345d8a408ad36e88d31b1b6668765cd8b | 2,679 | py | Python | UEManifestReader/classes/FManifestData.py | ryryburge/UEManifestReader | 970b24dd80fc6b5d599d1bd77de78a1b19f4432e | [
"MIT"
] | null | null | null | UEManifestReader/classes/FManifestData.py | ryryburge/UEManifestReader | 970b24dd80fc6b5d599d1bd77de78a1b19f4432e | [
"MIT"
] | null | null | null | UEManifestReader/classes/FManifestData.py | ryryburge/UEManifestReader | 970b24dd80fc6b5d599d1bd77de78a1b19f4432e | [
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import zlib
from UEManifestReader.enums import *
from UEManifestReader.classes.FCustomFields import FCustomFields
from UEManifestReader.classes.FManifestMeta import FManifestMeta
from UEManifestReader.classes.FChunkDataList import FChunkDataList
from UEManifestReader.classes.FManifestHeader imp... | 46.189655 | 117 | 0.711459 |
402ba89b6c4bbf8923f29b3e69bf5634d07e5b15 | 98 | py | Python | Python/module.py | minjibyeongho/KOSA-Pytorch | 80d71a8c579d645bea4c3352c9babdf232a8630e | [
"MIT"
] | 2 | 2021-05-25T08:52:07.000Z | 2021-08-13T23:49:42.000Z | Python/module.py | minjibyeongho/KOSA-Pytorch | 80d71a8c579d645bea4c3352c9babdf232a8630e | [
"MIT"
] | null | null | null | Python/module.py | minjibyeongho/KOSA-Pytorch | 80d71a8c579d645bea4c3352c9babdf232a8630e | [
"MIT"
] | 2 | 2021-05-24T00:49:45.000Z | 2021-06-11T01:30:12.000Z | #module.py
#if __name__=="__main__":
# print(__name__) | 14 | 26 | 0.581633 |
402c6d1527bb64bf420904254134ab7105236ec8 | 10,690 | py | Python | data_utils.py | algoprog/Quin | c1fd3b8e5e2163217f6c8062620ee0c1dfeed0e8 | [
"MIT"
] | 47 | 2020-08-02T12:28:07.000Z | 2022-03-30T01:56:57.000Z | data_utils.py | algoprog/Quin | c1fd3b8e5e2163217f6c8062620ee0c1dfeed0e8 | [
"MIT"
] | 4 | 2020-09-20T17:31:51.000Z | 2021-12-02T17:40:03.000Z | data_utils.py | algoprog/Quin | c1fd3b8e5e2163217f6c8062620ee0c1dfeed0e8 | [
"MIT"
] | 4 | 2020-11-23T15:47:34.000Z | 2021-03-30T02:02:02.000Z | import csv
import json
import pickle
import logging
import re
import pandas
import gzip
import os
import numpy as np
from random import randint, random
from tqdm import tqdm
from retriever.dense_retriever import DenseRetriever
from models.tokenization import tokenize
from typing import Union, List
def get_example... | 31.627219 | 119 | 0.528718 |
402d9bbc776d0b10c128c8af7e8de8955e864e57 | 327 | py | Python | hc/accounts/migrations/0025_remove_member_team.py | opsct/healthchecks | 069bc9b735c0473aed9946104ab85238d065bea1 | [
"BSD-3-Clause"
] | null | null | null | hc/accounts/migrations/0025_remove_member_team.py | opsct/healthchecks | 069bc9b735c0473aed9946104ab85238d065bea1 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T23:14:00.000Z | 2021-06-10T23:14:00.000Z | hc/accounts/migrations/0025_remove_member_team.py | opsct/healthchecks | 069bc9b735c0473aed9946104ab85238d065bea1 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.1.5 on 2019-01-22 08:33
from django.db import migrations
| 18.166667 | 48 | 0.590214 |
402da872d024b72e61193b2048d5c5fe8a54f2e6 | 6,671 | py | Python | openstack-dashboard/openstack_dashboard/api/proxy.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | openstack-dashboard/openstack_dashboard/api/proxy.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | openstack-dashboard/openstack_dashboard/api/proxy.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
#from proxyclient.v2 import client as proxy_client
from openstack_dashboard.utils import proxy_client
#
#def logout(request):
# _proxy(request).logout(request.user.id)
#
| 35.296296 | 86 | 0.746665 |
402e10f9fc439179bd0a8ffc8b3cd706de061b93 | 251 | py | Python | tfl_data.py | dongyan1024/overtime | 4f722a823585890026fe9584ba5985963b2a586c | [
"MIT"
] | 9 | 2020-10-15T13:53:36.000Z | 2022-03-08T12:08:09.000Z | tfl_data.py | dongyan1024/overtime | 4f722a823585890026fe9584ba5985963b2a586c | [
"MIT"
] | 6 | 2021-02-07T15:43:12.000Z | 2021-04-24T04:03:39.000Z | tfl_data.py | dongyan1024/overtime | 4f722a823585890026fe9584ba5985963b2a586c | [
"MIT"
] | 7 | 2020-10-15T13:55:12.000Z | 2022-03-12T03:54:02.000Z |
import overtime as ot
times = ['14:00','14:05', '14:10', '14:15', '14:20', '14:25', '14:30', '14:35', '14:40', '14:45', '14:50', '14:55']
tfl_data = ot.TflInput(['victoria', 'central', 'bakerloo', 'piccadilly'], ['inbound', 'outbound'], times)
| 41.833333 | 116 | 0.565737 |
402eafa1a88db63bd7cacd91e03e8377d8b8d5d8 | 2,375 | py | Python | apps/dc_tools/odc/apps/dc_tools/fs_to_dc.py | opendatacube/odc-tools | 42950e93305846b640a1c6135c9da16ba76c1b3a | [
"Apache-2.0"
] | 29 | 2019-09-18T10:21:07.000Z | 2022-03-10T07:46:57.000Z | apps/dc_tools/odc/apps/dc_tools/fs_to_dc.py | opendatacube/odc-tools | 42950e93305846b640a1c6135c9da16ba76c1b3a | [
"Apache-2.0"
] | 259 | 2019-12-11T03:19:01.000Z | 2022-03-31T22:46:11.000Z | apps/dc_tools/odc/apps/dc_tools/fs_to_dc.py | opendatacube/odc-tools | 42950e93305846b640a1c6135c9da16ba76c1b3a | [
"Apache-2.0"
] | 18 | 2020-01-22T14:50:27.000Z | 2022-03-01T14:48:12.000Z | import json
from pathlib import Path
import click
import datacube
from datacube.index.hl import Doc2Dataset
from odc.apps.dc_tools.utils import (
index_update_dataset,
update_if_exists,
allow_unsafe,
transform_stac,
)
from ._stac import stac_transform
from typing import Generator, Optional
import loggi... | 26.388889 | 84 | 0.596211 |
4030d959e7cf60e57a2223602eae1667433715a2 | 651 | py | Python | scripts/fullizer.py | stijm/jazzjackrabbit2 | e47f1c42fd7c450c2e12bcb7dcaae0f695a0dc12 | [
"MIT"
] | 5 | 2021-08-03T20:02:00.000Z | 2021-11-19T20:29:36.000Z | scripts/fullizer.py | stijm/jj2 | e47f1c42fd7c450c2e12bcb7dcaae0f695a0dc12 | [
"MIT"
] | null | null | null | scripts/fullizer.py | stijm/jj2 | e47f1c42fd7c450c2e12bcb7dcaae0f695a0dc12 | [
"MIT"
] | null | null | null | """
WARNING:
Using this script outside any server except one with IP 127.0.0.1 means risking getting
an instant and permanent ban, anywhere you use it.
The script was created *ONLY FOR LOCAL* testing purposes.
NEVER, NEVER, *NEVER* run it in an online multiplayer server.
At least unless you're a dumb freak.
""... | 26.04 | 91 | 0.666667 |
403251bad5543a2ea9b5b81f85773876a2b6f3ba | 1,458 | py | Python | setup.py | pranithk/gluster-georep-tools | 3c8c7dcf63042613b002385edcead7c1ec079e61 | [
"MIT"
] | null | null | null | setup.py | pranithk/gluster-georep-tools | 3c8c7dcf63042613b002385edcead7c1ec079e61 | [
"MIT"
] | null | null | null | setup.py | pranithk/gluster-georep-tools | 3c8c7dcf63042613b002385edcead7c1ec079e61 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
gluster-georep-tools.setup.py
:copyright: (c) 2016 by Aravinda VK
:license: MIT, see LICENSE for more details.
"""
from setuptools import setup
setup(
name="gluster-georep-tools",
version="0.2",
packages=["gluster_georep_tools",
"gluster_georep_tools.... | 30.375 | 75 | 0.61454 |
403346598a2baf176ef8cdcf1186f9c5ce45137d | 14,184 | py | Python | docs/_downloads/dbc5873471dad3c21022112121cbd008/tensorboard_profiler_tutorial.py | woojinsong/PyTorch-tutorials-kr | 36fefd556f45c2b1f5db912793172c0369430fd4 | [
"BSD-3-Clause"
] | 221 | 2018-04-06T01:42:58.000Z | 2021-11-28T10:12:45.000Z | intermediate_source/tensorboard_profiler_tutorial.py | konlidoo/tutorials | 75b1c673a73ca285a16f52a62fc8ffcc6d069936 | [
"BSD-3-Clause"
] | 280 | 2018-05-25T08:53:21.000Z | 2021-12-02T05:37:25.000Z | intermediate_source/tensorboard_profiler_tutorial.py | konlidoo/tutorials | 75b1c673a73ca285a16f52a62fc8ffcc6d069936 | [
"BSD-3-Clause"
] | 181 | 2018-05-25T02:00:28.000Z | 2021-11-19T11:56:39.000Z | """
PyTorch Profiler With TensorBoard
====================================
This tutorial demonstrates how to use TensorBoard plugin with PyTorch Profiler
to detect performance bottlenecks of the model.
Introduction
------------
PyTorch 1.8 includes an updated profiler API capable of
recording the CPU side operations ... | 40.758621 | 150 | 0.666314 |
403352816f5874a59e3b9fffa9b383a34c03d749 | 311 | py | Python | imgtoch/__init__.py | hrpzcf/imgtoch | 13b59dd4c6b65b8ee17bbd22ac1133a86d34d5fb | [
"MIT"
] | null | null | null | imgtoch/__init__.py | hrpzcf/imgtoch | 13b59dd4c6b65b8ee17bbd22ac1133a86d34d5fb | [
"MIT"
] | null | null | null | imgtoch/__init__.py | hrpzcf/imgtoch | 13b59dd4c6b65b8ee17bbd22ac1133a86d34d5fb | [
"MIT"
] | null | null | null | # coding: utf-8
from .__utils__ import grayscaleOf, makeImage, sortByGrayscale
NAME = "imgtoch"
VERSIONNUM = 0, 2, 3
VERSION = ".".join(map(str, VERSIONNUM))
AUTHOR = "hrpzcf"
EMAIL = "hrpzcf@foxmail.com"
WEBSITE = "https://gitee.com/hrpzcf/imgtoch"
__all__ = ["grayscaleOf", "makeImage", "sortByGrayscale"]
| 23.923077 | 62 | 0.717042 |
40339ee3fc200a5b40a0b837adca77cf33b0c95c | 4,298 | py | Python | packages/gradient_boosting_model/gradient_boosting_model/processing/validation.py | g-nightingale/testing-and-monitoring-ml-deployments | 770d2889968e7195dba1697c164b3344cff3c5ee | [
"BSD-3-Clause"
] | 99 | 2019-11-14T11:58:51.000Z | 2022-03-19T14:23:17.000Z | packages/gradient_boosting_model/gradient_boosting_model/processing/validation.py | hoai-nguyen/testing-and-monitoring-ml-deployments | c4c0bc8d857326cc10899be6fe7c5bb03586347c | [
"BSD-3-Clause"
] | 1 | 2020-03-05T04:08:26.000Z | 2020-03-05T04:08:26.000Z | packages/gradient_boosting_model/gradient_boosting_model/processing/validation.py | hoai-nguyen/testing-and-monitoring-ml-deployments | c4c0bc8d857326cc10899be6fe7c5bb03586347c | [
"BSD-3-Clause"
] | 188 | 2019-12-13T16:48:23.000Z | 2022-03-29T09:25:12.000Z | import typing as t
from gradient_boosting_model.config.core import config
import numpy as np
import pandas as pd
from marshmallow import fields, Schema, ValidationError
def drop_na_inputs(*, input_data: pd.DataFrame) -> pd.DataFrame:
"""Check model inputs for na values and filter."""
validated_data = input... | 34.66129 | 85 | 0.704281 |
4035dbde81734e9262f7a5d9f7fcf21b0a2fc083 | 1,006 | py | Python | RLBotPack/JoeyBot/CSharpPythonAgent/CSharpPythonAgent.py | RLMarvin/RLBotPack | c88c4111bf67d324b471ad87ad962e7bc8c2a202 | [
"MIT"
] | 13 | 2019-05-25T20:25:51.000Z | 2022-03-19T13:36:23.000Z | RLBotPack/JoeyBot/CSharpPythonAgent/CSharpPythonAgent.py | RLMarvin/RLBotPack | c88c4111bf67d324b471ad87ad962e7bc8c2a202 | [
"MIT"
] | 53 | 2019-06-07T13:31:59.000Z | 2022-03-28T22:53:47.000Z | RLBotPack/JoeyBot/CSharpPythonAgent/CSharpPythonAgent.py | RLMarvin/RLBotPack | c88c4111bf67d324b471ad87ad962e7bc8c2a202 | [
"MIT"
] | 78 | 2019-06-30T08:42:13.000Z | 2022-03-23T20:11:42.000Z | import os
from rlbot.agents.base_agent import BOT_CONFIG_AGENT_HEADER
from rlbot.agents.base_dotnet_agent import BaseDotNetAgent
from rlbot.parsing.custom_config import ConfigHeader, ConfigObject
| 43.73913 | 102 | 0.744533 |
4036ce0b3a0763152669516459e91450d4954edb | 2,640 | py | Python | v3_experiments.py | runekaagaard/workflows | 7bb7fe3821bc33b5e82c65dda3ca61f69ee8bcfa | [
"Unlicense"
] | null | null | null | v3_experiments.py | runekaagaard/workflows | 7bb7fe3821bc33b5e82c65dda3ca61f69ee8bcfa | [
"Unlicense"
] | null | null | null | v3_experiments.py | runekaagaard/workflows | 7bb7fe3821bc33b5e82c65dda3ca61f69ee8bcfa | [
"Unlicense"
] | null | null | null | # coding=utf-8
import inspect
from functools import wraps
def contract(pre_conditions, post_conditions):
"""
Pre is before. Post is after.
"""
return _
def processing(pre_process, post_process):
"Procemanns"
return _
someworkflow = compose(contract, processing, add_one)
print somew... | 22.372881 | 75 | 0.576894 |
4037b08c119c1be84f8a39d7cd954a0ebc06a052 | 1,198 | py | Python | externals/binaryen/test/emscripten/tools/distill_asm.py | caokun8008/ckeos | 889093599eb59c90e4cbcff2817f4421302fada1 | [
"MIT"
] | 40 | 2018-05-14T11:05:03.000Z | 2020-10-20T03:03:06.000Z | externals/binaryen/test/emscripten/tools/distill_asm.py | caokun8008/ckeos | 889093599eb59c90e4cbcff2817f4421302fada1 | [
"MIT"
] | 4 | 2019-08-19T13:07:10.000Z | 2020-10-17T02:45:04.000Z | externals/binaryen/test/emscripten/tools/distill_asm.py | caokun8008/ckeos | 889093599eb59c90e4cbcff2817f4421302fada1 | [
"MIT"
] | 14 | 2018-05-28T09:45:02.000Z | 2018-12-18T10:54:26.000Z | '''
Gets the core asm module out of an emscripten output file.
By default it adds a ';' to end the
var asm = ...
statement. You can add a third param to customize that. If the third param is 'swap-in', it will emit code to swap this asm module in, instead of the default one.
XXX this probably doesn't work with cl... | 32.378378 | 162 | 0.69783 |
4037b4c2546a2c9d2335471a4c5869528e8d4f28 | 2,399 | py | Python | apex/contrib/conv_bias_relu/conv_bias_relu.py | XL-Kong/Painter_GAN | 23cfb57638497fdd1f2d8c09728b439b0e83efde | [
"BSD-3-Clause"
] | null | null | null | apex/contrib/conv_bias_relu/conv_bias_relu.py | XL-Kong/Painter_GAN | 23cfb57638497fdd1f2d8c09728b439b0e83efde | [
"BSD-3-Clause"
] | null | null | null | apex/contrib/conv_bias_relu/conv_bias_relu.py | XL-Kong/Painter_GAN | 23cfb57638497fdd1f2d8c09728b439b0e83efde | [
"BSD-3-Clause"
] | null | null | null | import torch
import pdb
from torch.autograd import gradcheck
import fused_conv_bias_relu
ConvBiasReLU = ConvBiasReLU_.apply
ConvBiasMaskReLU = ConvBiasMaskReLU_.apply
ConvBias = ConvBias_.apply
| 31.155844 | 93 | 0.681951 |
403ab8cc728f6138166c183502ef116ca738da28 | 3,037 | py | Python | ironic_inspector/cmd/dbsync.py | namnx228/ironic-inspector | fb5955bccef367af58c972718643fe5fdb18ffa5 | [
"Apache-2.0"
] | 31 | 2015-06-23T08:06:05.000Z | 2021-11-20T05:34:32.000Z | ironic_inspector/cmd/dbsync.py | sapcc/ironic-inspector | dee8734f8ca2b0fb0acc4c56f1806237234bf55d | [
"Apache-2.0"
] | 1 | 2019-11-22T12:07:56.000Z | 2019-11-22T12:07:59.000Z | ironic_inspector/cmd/dbsync.py | sapcc/ironic-inspector | dee8734f8ca2b0fb0acc4c56f1806237234bf55d | [
"Apache-2.0"
] | 33 | 2015-12-02T05:27:56.000Z | 2022-02-28T07:57:43.000Z | # Copyright 2015 Cisco Systems
# 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... | 33.01087 | 76 | 0.709582 |
403ac1f41e289fbd9825b8c92a8b0c154ef6090e | 1,300 | py | Python | trabalhoaqui/comp_perguntas/valida.py | EmanoelG/jogodaforca | 06baf78b31e4b40d8db9fc5be67700be32c66cba | [
"MIT"
] | 1 | 2020-06-06T17:09:55.000Z | 2020-06-06T17:09:55.000Z | trabalhoaqui/comp_perguntas/valida.py | EmanoelG/jogodaforca | 06baf78b31e4b40d8db9fc5be67700be32c66cba | [
"MIT"
] | null | null | null | trabalhoaqui/comp_perguntas/valida.py | EmanoelG/jogodaforca | 06baf78b31e4b40d8db9fc5be67700be32c66cba | [
"MIT"
] | null | null | null | from jogo import desenha_jogo
from random import randint
import sys
| 23.214286 | 127 | 0.412308 |
403b3bdafa5f824c48528757629f8e664b7cbcd3 | 9,018 | py | Python | DesksReminder/Desks/accounts_desk.py | flopezag/fiware-management-scripts | 3e9ccdb62a11ec0ffd0747511f5512bcdb0df729 | [
"Apache-2.0"
] | null | null | null | DesksReminder/Desks/accounts_desk.py | flopezag/fiware-management-scripts | 3e9ccdb62a11ec0ffd0747511f5512bcdb0df729 | [
"Apache-2.0"
] | 21 | 2017-01-17T12:19:47.000Z | 2021-06-03T07:56:56.000Z | DesksReminder/Desks/accounts_desk.py | flopezag/fiware-management-scripts | 3e9ccdb62a11ec0ffd0747511f5512bcdb0df729 | [
"Apache-2.0"
] | 1 | 2017-05-03T21:42:49.000Z | 2017-05-03T21:42:49.000Z | from datetime import date, datetime
from DesksReminder.Basics.dataFinder import Data
from DesksReminder.Basics.nickNames import ContactBook
from Config.settings import JIRA_URL
__author__ = 'Manuel Escriche'
if __name__ == "__main__":
pass
| 49.01087 | 120 | 0.555001 |
403c902e2dd03cc231fcbd2349b64917b93e7dde | 826 | py | Python | scripts/ip2hex.py | Kidlike/dotfiles | b9c4daa4da1f416662b708338a497b5a620ddcbf | [
"Apache-2.0"
] | null | null | null | scripts/ip2hex.py | Kidlike/dotfiles | b9c4daa4da1f416662b708338a497b5a620ddcbf | [
"Apache-2.0"
] | null | null | null | scripts/ip2hex.py | Kidlike/dotfiles | b9c4daa4da1f416662b708338a497b5a620ddcbf | [
"Apache-2.0"
] | 1 | 2018-05-28T08:08:25.000Z | 2018-05-28T08:08:25.000Z | #!/usr/bin/python
import sys
import re
if __name__ == '__main__':
main()
| 26.645161 | 68 | 0.468523 |
403cacc3c31596cf185f47bf3504df89608d6f14 | 1,329 | py | Python | src/models/CVX_weighted.py | DanqingZ/social-DCM | 3c2541a7ed0e7f4519d97783b5b673fa6c06ae94 | [
"MIT"
] | 14 | 2017-08-10T17:00:20.000Z | 2021-12-23T09:00:50.000Z | src/models/CVX_weighted.py | DanqingZ/social-DCM | 3c2541a7ed0e7f4519d97783b5b673fa6c06ae94 | [
"MIT"
] | null | null | null | src/models/CVX_weighted.py | DanqingZ/social-DCM | 3c2541a7ed0e7f4519d97783b5b673fa6c06ae94 | [
"MIT"
] | 1 | 2019-08-13T08:47:43.000Z | 2019-08-13T08:47:43.000Z | import random
import numpy as np
import numpy.linalg as LA
import scipy as spy
import time
from itertools import *
import sys
import cvxpy as cvx
from random import randint
import numpy as np
import random
from scipy.sparse import csc_matrix
from scipy import sparse as sp
import networkx as nx | 26.58 | 157 | 0.699774 |
403ceb47a5257374ece3af5ee6603178afb5bfd2 | 5,704 | py | Python | experiments/colorization_cINN/data.py | jlmaccal/FrEIA | 64a04cb784e19bdff69546657f602fd31835c21f | [
"MIT"
] | null | null | null | experiments/colorization_cINN/data.py | jlmaccal/FrEIA | 64a04cb784e19bdff69546657f602fd31835c21f | [
"MIT"
] | null | null | null | experiments/colorization_cINN/data.py | jlmaccal/FrEIA | 64a04cb784e19bdff69546657f602fd31835c21f | [
"MIT"
] | null | null | null | import sys
import glob
from os.path import join
from multiprocessing import Pool
import numpy as np
import matplotlib.pyplot as plt
from skimage import io, color
from PIL import Image, ImageEnhance
import torch
from torch.utils.data import Dataset, DataLoader, TensorDataset
import torch.nn.functional as F
import torch... | 32.971098 | 144 | 0.603086 |
403d3f7c3cad2d68df2456deb94e9f014798faf1 | 16,215 | py | Python | utils/editor.py | tien1504/idinvert_pytorch | 19999e9945aef4843a464930426a565256863ded | [
"MIT"
] | 415 | 2020-04-02T03:06:47.000Z | 2022-03-28T09:32:13.000Z | utils/editor.py | tien1504/idinvert_pytorch | 19999e9945aef4843a464930426a565256863ded | [
"MIT"
] | 52 | 2020-04-03T04:13:57.000Z | 2021-11-23T16:52:31.000Z | utils/editor.py | tien1504/idinvert_pytorch | 19999e9945aef4843a464930426a565256863ded | [
"MIT"
] | 68 | 2020-04-03T10:08:30.000Z | 2021-10-29T20:13:45.000Z | # python 3.7
"""Utility functions for image editing from latent space."""
import os.path
import numpy as np
__all__ = [
'parse_indices', 'interpolate', 'mix_style',
'get_layerwise_manipulation_strength', 'manipulate', 'parse_boundary_list'
]
def parse_indices(obj, min_val=None, max_val=None):
"""Parses in... | 41.259542 | 80 | 0.687882 |
403d7ac07f1f092095ae4d7caf15898f47658901 | 96 | py | Python | venv/lib/python3.8/site-packages/pyls/_version.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/pyls/_version.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/pyls/_version.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/24/e8/39/183700a0b2d2a9545f3da2571d82b53df290aab3a51dc229b113d16e6c | 96 | 96 | 0.895833 |
403e17c5ec985065a02c6baa32d0dcd4699f18d1 | 1,277 | py | Python | pymoo/util/normalization.py | Electr0phile/pymoo | 652428473cc68b6d9deada3792635bc8a831b255 | [
"Apache-2.0"
] | 1 | 2020-08-27T09:51:27.000Z | 2020-08-27T09:51:27.000Z | pymoo/util/normalization.py | Asurada2015/pymoo | 023a787d0b78813e789f170a3e94b2de85605aff | [
"Apache-2.0"
] | null | null | null | pymoo/util/normalization.py | Asurada2015/pymoo | 023a787d0b78813e789f170a3e94b2de85605aff | [
"Apache-2.0"
] | null | null | null | import numpy as np
| 21.644068 | 92 | 0.617071 |
4040a877bb3e28b9851ff90970e6bf5e768e303c | 31,211 | py | Python | alembic/versions/92235b77ea53_check_new.py | go-lab/appcomposer | c2468f11b8398edc9b16e1552ac8d609d8347677 | [
"BSD-2-Clause"
] | 1 | 2018-01-20T14:56:01.000Z | 2018-01-20T14:56:01.000Z | alembic/versions/92235b77ea53_check_new.py | go-lab/appcomposer | c2468f11b8398edc9b16e1552ac8d609d8347677 | [
"BSD-2-Clause"
] | 25 | 2015-01-21T09:16:26.000Z | 2021-12-13T20:01:21.000Z | alembic/versions/92235b77ea53_check_new.py | go-lab/appcomposer | c2468f11b8398edc9b16e1552ac8d609d8347677 | [
"BSD-2-Clause"
] | 3 | 2015-07-28T18:40:05.000Z | 2017-03-28T08:14:37.000Z | """Check new
Revision ID: 92235b77ea53
Revises: 381fdb66ec27
Create Date: 2017-10-14 02:38:51.007307
"""
# revision identifiers, used by Alembic.
revision = '92235b77ea53'
down_revision = '381fdb66ec27'
from alembic import op
import sqlalchemy as sa
# op.create_unique_constraint(None, 'ActiveTranslationMessag... | 90.205202 | 149 | 0.79834 |
4040e2297e78d48d586c2e4b34ffa775eb46c92e | 5,633 | py | Python | build/lib/adb_utils/adb_utils.py | christopherferreira3/Python-ADB-Tools | 94e39cfe4b285517ee2502f658ab23af4ff18643 | [
"MIT"
] | null | null | null | build/lib/adb_utils/adb_utils.py | christopherferreira3/Python-ADB-Tools | 94e39cfe4b285517ee2502f658ab23af4ff18643 | [
"MIT"
] | null | null | null | build/lib/adb_utils/adb_utils.py | christopherferreira3/Python-ADB-Tools | 94e39cfe4b285517ee2502f658ab23af4ff18643 | [
"MIT"
] | null | null | null | import subprocess
import os
def get_connected_devices() -> list:
"""
Returns a list of tuples containing the Device name and the android Version
:return:
"""
devices = []
devices_output = subprocess.check_output(["adb", "devices"]).decode("utf-8").strip("List of devices attached").split("\n")
... | 27.081731 | 129 | 0.617788 |
4041a6092503143d16664ce5f9772df9bdedc920 | 2,664 | py | Python | tests/unit/test_cl61d.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | 1 | 2021-11-16T15:23:24.000Z | 2021-11-16T15:23:24.000Z | tests/unit/test_cl61d.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | null | null | null | tests/unit/test_cl61d.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | null | null | null | import glob
import os
import sys
from tempfile import TemporaryDirectory
import netCDF4
import numpy as np
import numpy.ma as ma
from all_products_fun import Check
from lidar_fun import LidarFun
from cloudnetpy import concat_lib
from cloudnetpy.instruments import ceilo2nc
SCRIPT_PATH = os.path.dirname(os.path.realpa... | 30.62069 | 81 | 0.634384 |
4043eb802b57171a6cc605056ffc3abeca7f2a68 | 1,343 | py | Python | tests/functions/test_count.py | athre0z/clickhouse-sqlalchemy | d4be4a818c2fadef8eeb76a59d11ff82fc2c433a | [
"MIT"
] | 1 | 2021-07-07T09:06:00.000Z | 2021-07-07T09:06:00.000Z | tests/functions/test_count.py | athre0z/clickhouse-sqlalchemy | d4be4a818c2fadef8eeb76a59d11ff82fc2c433a | [
"MIT"
] | null | null | null | tests/functions/test_count.py | athre0z/clickhouse-sqlalchemy | d4be4a818c2fadef8eeb76a59d11ff82fc2c433a | [
"MIT"
] | null | null | null | from sqlalchemy import Column, func
from clickhouse_sqlalchemy import types, Table
from tests.testcase import (
BaseAbstractTestCase, HttpSessionTestCase, NativeSessionTestCase,
)
| 27.408163 | 72 | 0.63589 |