hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 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.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a14bf0024d7bde780374873784e2a841db0a185 | 6,215 | py | Python | vehicle_routing/vehicle_routing.py | institute-for-advanced-physical-studies/QOSF-cohort3 | 2b4b7d43fe6a3d0b7abf1f7918a565ce5b80fcf2 | [
"MIT"
] | 8 | 2021-05-02T15:42:37.000Z | 2022-03-18T15:44:16.000Z | vehicle_routing/vehicle_routing.py | institute-for-advanced-physical-studies/QOSF-cohort3 | 2b4b7d43fe6a3d0b7abf1f7918a565ce5b80fcf2 | [
"MIT"
] | null | null | null | vehicle_routing/vehicle_routing.py | institute-for-advanced-physical-studies/QOSF-cohort3 | 2b4b7d43fe6a3d0b7abf1f7918a565ce5b80fcf2 | [
"MIT"
] | 8 | 2021-08-03T06:43:13.000Z | 2022-01-29T06:22:30.000Z | import numpy as np
import dimod
import time
from functools import partial
from solver_backend import SolverBackend
from dwave.embedding.chain_strength import uniform_torque_compensation
from qiskit_optimization.converters import QuadraticProgramToQubo
from qiskit_optimization.algorithms import OptimizationResult
cla... | 37.215569 | 118 | 0.661464 |
4a14c0599fdb2b16069ecefd827125c159faafc3 | 1,253 | py | Python | src/qs/workflow.py | ryuichi1208/air-pipeline | eac5cad9f089e41ed5aace2fdaf0aff3696efb09 | [
"Apache-2.0"
] | 5 | 2019-12-01T07:50:04.000Z | 2021-06-01T02:04:22.000Z | airflow_ml/quick_start/workflow.py | icoxfog417/airflow-ml-exercises | 9fc1072a38be7a014ba2ec1a955d96b87c03e104 | [
"MIT"
] | 13 | 2019-12-04T23:09:46.000Z | 2022-03-01T23:10:31.000Z | airflow_ml/quick_start/workflow.py | icoxfog417/airflow-ml-exercises | 9fc1072a38be7a014ba2ec1a955d96b87c03e104 | [
"MIT"
] | 2 | 2020-05-22T14:27:49.000Z | 2020-10-09T03:20:50.000Z | from datetime import datetime, timedelta
import time
import random
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from pprint import pprint
default_args = {
"owner": "airflow",
"depends_on_past": False,
"start_date": datetime(2019, 4, 1),
"email": ["airflow@exampl... | 20.883333 | 61 | 0.700718 |
4a14c0f3c3840a99b4f45bc09e61e584b2e42369 | 13,445 | py | Python | tests/test_service.py | nyu-devops-2021-summer-promotions/promotions | 892a54dc137c9f77eb1aab8aee65fdbc2756b100 | [
"Apache-2.0"
] | null | null | null | tests/test_service.py | nyu-devops-2021-summer-promotions/promotions | 892a54dc137c9f77eb1aab8aee65fdbc2756b100 | [
"Apache-2.0"
] | 119 | 2021-06-15T18:36:19.000Z | 2021-08-11T17:30:26.000Z | tests/test_service.py | nyu-devops-2021-summer-promotions/promotions | 892a54dc137c9f77eb1aab8aee65fdbc2756b100 | [
"Apache-2.0"
] | 5 | 2021-06-15T19:18:20.000Z | 2021-08-08T15:14:49.000Z | """
Promotion API Service Test Suite
Test cases can be run with the following:
nosetests -v --with-spec --spec-color
coverage report -m
codecov --token=$CODECOV_TOKEN
While debugging just these tests it's convinient to use this:
nosetests --stop tests/test_service.py:TestPromotionServer
"""
import os
impor... | 39.896142 | 126 | 0.634065 |
4a14c11c95d612ec6fd34eea62623d28a2460220 | 4,090 | py | Python | robosuite/models/arenas/table_arena.py | s-tian/robosuite | 56c20db6231e03ec5910869f7227819943fc24b2 | [
"MIT"
] | 4 | 2022-01-24T07:18:21.000Z | 2022-01-25T02:29:17.000Z | robosuite/models/arenas/table_arena.py | s-tian/robosuite | 56c20db6231e03ec5910869f7227819943fc24b2 | [
"MIT"
] | 1 | 2022-01-12T14:52:28.000Z | 2022-01-12T14:52:28.000Z | robosuite/models/arenas/table_arena.py | s-tian/robosuite | 56c20db6231e03ec5910869f7227819943fc24b2 | [
"MIT"
] | null | null | null | import numpy as np
from robosuite.models.arenas import Arena
from robosuite.utils.mjcf_utils import array_to_string, string_to_array, xml_path_completion
class TableArena(Arena):
"""
Workspace that contains an empty table.
Args:
table_full_size (3-tuple): (L,W,H) full dimensions of the table
... | 41.734694 | 106 | 0.601956 |
4a14c1e35919d4960dfc3dd6069b2798f88c2cb0 | 797 | py | Python | strings_question/compare_two_version.py | rjsnh1522/geeks-4-geeks-python | 9bea0ce4f3fae9b5f9e5952fb5b4b3a8c6186cf4 | [
"MIT"
] | null | null | null | strings_question/compare_two_version.py | rjsnh1522/geeks-4-geeks-python | 9bea0ce4f3fae9b5f9e5952fb5b4b3a8c6186cf4 | [
"MIT"
] | 5 | 2021-03-10T11:49:39.000Z | 2022-02-27T01:35:59.000Z | strings_question/compare_two_version.py | rjsnh1522/geeks-4-geeks-python | 9bea0ce4f3fae9b5f9e5952fb5b4b3a8c6186cf4 | [
"MIT"
] | null | null | null | class Solution:
def compareVersion(self, A, B):
v1 = A.split('.')
v2 = B.split('.')
if len(v1) < len(v2):
while len(v1) < len(v2):
v1.append("0")
elif len(v2) < len(v1):
while len(v2) < len(v1):
v2.append("0")
v1_len = ... | 23.441176 | 55 | 0.400251 |
4a14c2ca3958346ef494325c848b6df80527ffa7 | 3,754 | py | Python | h1/models/iam_project_ownership_create.py | hyperonecom/h1-client-python | 4ce355852ba3120ec1b8f509ab5894a5c08da730 | [
"MIT"
] | null | null | null | h1/models/iam_project_ownership_create.py | hyperonecom/h1-client-python | 4ce355852ba3120ec1b8f509ab5894a5c08da730 | [
"MIT"
] | null | null | null | h1/models/iam_project_ownership_create.py | hyperonecom/h1-client-python | 4ce355852ba3120ec1b8f509ab5894a5c08da730 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
HyperOne
HyperOne API # noqa: E501
The version of the OpenAPI document: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from h1.configuration import Configuration
class IamProjectOwnershipCreate(object):
"""NOTE: T... | 30.032 | 145 | 0.577784 |
4a14c32f8774b50d65b071544b1bea3d0f2db20e | 1,451 | py | Python | src/NumericalAnalysis/elliptic.py | sidnb13/ut-aero-research | 4c0b3fbbabf9faed1414d28ad4307545378795b8 | [
"MIT"
] | null | null | null | src/NumericalAnalysis/elliptic.py | sidnb13/ut-aero-research | 4c0b3fbbabf9faed1414d28ad4307545378795b8 | [
"MIT"
] | null | null | null | src/NumericalAnalysis/elliptic.py | sidnb13/ut-aero-research | 4c0b3fbbabf9faed1414d28ad4307545378795b8 | [
"MIT"
] | null | null | null | from requirements.imports import *
from requirements.numericalMethods import *
from requirements.variables import *
# ELLIPTIC APPROXIMATION
# first kind
def elliptic1(k, n): # unfortunately cannot be vectorized, do not want to use a power series
intvals = np.zeros(N)
for i in range(0,N):
intvals[i], ... | 41.457143 | 135 | 0.656099 |
4a14c6b5c3a4a429062fb862e9bfc3840259e2d1 | 57 | py | Python | main.py | XPH0904/Library-management-system | 9990654070caa9f757af9a6f4771ce4b1b484083 | [
"Apache-2.0"
] | null | null | null | main.py | XPH0904/Library-management-system | 9990654070caa9f757af9a6f4771ce4b1b484083 | [
"Apache-2.0"
] | null | null | null | main.py | XPH0904/Library-management-system | 9990654070caa9f757af9a6f4771ce4b1b484083 | [
"Apache-2.0"
] | null | null | null | from src.frame.MainFrame import *
main = MainFrame() | 19 | 33 | 0.701754 |
4a14c7d92de75029b3d3e1442dabb172b08825f3 | 1,304 | py | Python | Webserver-MVT/jcar/pop_model/get_set.py | augustoliks/IntelliJCar-JavaBotMVC | 6037a70982e5af9bbdc9dbf1161c58272c511527 | [
"BSD-2-Clause"
] | 4 | 2018-03-23T14:44:05.000Z | 2018-08-28T10:43:49.000Z | Webserver-MVT/jcar/pop_model/get_set.py | augustoliks/IntelliJCar-JavaBotMVC | 6037a70982e5af9bbdc9dbf1161c58272c511527 | [
"BSD-2-Clause"
] | null | null | null | Webserver-MVT/jcar/pop_model/get_set.py | augustoliks/IntelliJCar-JavaBotMVC | 6037a70982e5af9bbdc9dbf1161c58272c511527 | [
"BSD-2-Clause"
] | 4 | 2018-04-16T04:57:36.000Z | 2021-05-18T00:12:48.000Z | from jcar.pop_model.database import DataBase
class GetSet():
def __init__(self):
self.database = DataBase()
self.today = self.database.last_date()[:8]
self.data = {'gas': None,
'bat': None,
'lat': None,
'lon': None,
... | 26.08 | 53 | 0.519172 |
4a14c896c594a5b4e87780cdd12cfc354cd3ee1a | 178 | py | Python | src/objects/__init__.py | deepak2431/pygame-Coin-Fall- | 2238fb8badc7db138e1bfa5e1d4e2672d652e935 | [
"MIT"
] | null | null | null | src/objects/__init__.py | deepak2431/pygame-Coin-Fall- | 2238fb8badc7db138e1bfa5e1d4e2672d652e935 | [
"MIT"
] | null | null | null | src/objects/__init__.py | deepak2431/pygame-Coin-Fall- | 2238fb8badc7db138e1bfa5e1d4e2672d652e935 | [
"MIT"
] | null | null | null | from .cart import Cart
from .coin import Coin
from .bluecoin import BlueCoin
from .bomb import Bomb
from .death_zone import Death_Zone
from .cart_one_v_one import Cart_One_V_One
| 25.428571 | 42 | 0.831461 |
4a14c8d9a925cce066bd7380c3704bbe7bd42a9c | 4,517 | py | Python | mmedit/models/backbones/encoder_decoders/decoders/indexnet_decoder.py | Jian137/mmediting-1 | e1ac6c93441ec96696d0b530f040b91b809015b6 | [
"Apache-2.0"
] | 1,884 | 2020-07-09T18:53:43.000Z | 2022-03-31T12:06:18.000Z | mmedit/models/backbones/encoder_decoders/decoders/indexnet_decoder.py | Jian137/mmediting-1 | e1ac6c93441ec96696d0b530f040b91b809015b6 | [
"Apache-2.0"
] | 622 | 2020-07-09T18:52:27.000Z | 2022-03-31T14:41:09.000Z | mmedit/models/backbones/encoder_decoders/decoders/indexnet_decoder.py | Jian137/mmediting-1 | e1ac6c93441ec96696d0b530f040b91b809015b6 | [
"Apache-2.0"
] | 361 | 2020-07-09T19:21:47.000Z | 2022-03-31T09:58:27.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import ConvModule, kaiming_init, normal_init
from mmedit.models.common import DepthwiseSeparableConvModule
from mmedit.models.registry import COMPONENTS
class IndexedUpsample(... | 32.264286 | 79 | 0.559663 |
4a14ca34fa4de43a1898dd95b41f84f9584bcb27 | 78,391 | py | Python | packages/python/plotly/plotly/graph_objs/isosurface/_colorbar.py | dvd7587/plotly.py | 1af3ca99884981c38fb49f4be40230f5f15c5fe6 | [
"MIT"
] | 1 | 2022-02-19T09:27:42.000Z | 2022-02-19T09:27:42.000Z | packages/python/plotly/plotly/graph_objs/isosurface/_colorbar.py | jkkummerfeld/plotly.py | 73ecb961cb51419e1c1b8fc0278a12d6f11d6881 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/isosurface/_colorbar.py | jkkummerfeld/plotly.py | 73ecb961cb51419e1c1b8fc0278a12d6f11d6881 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class ColorBar(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "isosurface"
_path_str = "isosurface.colorbar"
_valid_props = {
"bgcolor",
... | 36.208314 | 96 | 0.560294 |
4a14ca55c83bdf20bf41aea390762ad13ed3d9e7 | 4,579 | py | Python | src/xml_processing/process_many_pmids_to_json.py | alliance-genome/agr_literature_service | 2278316422d5c3ab65e21bb97d91e861e48853c5 | [
"MIT"
] | null | null | null | src/xml_processing/process_many_pmids_to_json.py | alliance-genome/agr_literature_service | 2278316422d5c3ab65e21bb97d91e861e48853c5 | [
"MIT"
] | 39 | 2021-10-18T17:02:49.000Z | 2022-03-28T20:56:24.000Z | src/xml_processing/process_many_pmids_to_json.py | alliance-genome/agr_literature_service | 2278316422d5c3ab65e21bb97d91e861e48853c5 | [
"MIT"
] | 1 | 2021-10-21T00:11:18.000Z | 2021-10-21T00:11:18.000Z | import time
from os import environ, path, makedirs
import argparse
import sys
import logging
# import logging.config
from get_pubmed_xml import download_pubmed_xml
from xml_to_json import generate_json
# pipenv run python process_many_pmids_to_json.py -f inputs/alliance_pmids
#
# to force skip of downloading xml
# p... | 35.496124 | 223 | 0.70321 |
4a14cb352138efe10244ca68e2a994bb848e3d6b | 13,947 | py | Python | Lib/test/test__osx_support.py | finefoot/cpython | ffcc7cd57f6a52c6074ecc9f0a9f0177fb1dbfee | [
"0BSD"
] | 1 | 2021-11-05T12:29:12.000Z | 2021-11-05T12:29:12.000Z | Lib/test/test__osx_support.py | finefoot/cpython | ffcc7cd57f6a52c6074ecc9f0a9f0177fb1dbfee | [
"0BSD"
] | 3 | 2021-12-01T00:06:10.000Z | 2022-03-01T00:03:04.000Z | Lib/test/test__osx_support.py | finefoot/cpython | ffcc7cd57f6a52c6074ecc9f0a9f0177fb1dbfee | [
"0BSD"
] | 1 | 2019-04-06T18:29:45.000Z | 2019-04-06T18:29:45.000Z | """
Test suite for _osx_support: shared OS X support functions.
"""
import os
import platform
import stat
import sys
import unittest
from test.support import os_helper
import _osx_support
@unittest.skipUnless(sys.platform.startswith("darwin"), "requires OS X")
class Test_OSXSupport(unittest.TestCase):
def setU... | 42.651376 | 81 | 0.559045 |
4a14cb8c541bbd286ce41c7efe74bd3814e45761 | 1,236 | py | Python | readthedocs/search/faceted_search.py | houllette/readthedocs.org | e11a3e45e3f0a8299c7e9258e0dfd64c5c5acebe | [
"MIT"
] | null | null | null | readthedocs/search/faceted_search.py | houllette/readthedocs.org | e11a3e45e3f0a8299c7e9258e0dfd64c5c5acebe | [
"MIT"
] | null | null | null | readthedocs/search/faceted_search.py | houllette/readthedocs.org | e11a3e45e3f0a8299c7e9258e0dfd64c5c5acebe | [
"MIT"
] | null | null | null | from elasticsearch_dsl import FacetedSearch, TermsFacet
from elasticsearch_dsl.query import SimpleQueryString, Bool
class RTDFacetedSearch(FacetedSearch):
"""Overwrite the initialization in order too meet our needs"""
# TODO: Remove the overwrite when the elastic/elasticsearch-dsl-py#916
# See more: htt... | 27.466667 | 78 | 0.649676 |
4a14cbcca0c9f2e2e1038f9628ad1cbf06fd160a | 125,124 | py | Python | test/engine/test_execute.py | ricardogferreira/sqlalchemy | fec2b6560c14bb28ee7fc9d21028844acf700b04 | [
"MIT"
] | 5,383 | 2018-11-27T07:34:03.000Z | 2022-03-31T19:40:59.000Z | test/engine/test_execute.py | ricardogferreira/sqlalchemy | fec2b6560c14bb28ee7fc9d21028844acf700b04 | [
"MIT"
] | 2,719 | 2018-11-27T07:55:01.000Z | 2022-03-31T22:09:44.000Z | test/engine/test_execute.py | ricardogferreira/sqlalchemy | fec2b6560c14bb28ee7fc9d21028844acf700b04 | [
"MIT"
] | 998 | 2018-11-28T09:34:38.000Z | 2022-03-30T19:04:11.000Z | # coding: utf-8
from contextlib import contextmanager
import re
import threading
import weakref
import sqlalchemy as tsa
from sqlalchemy import bindparam
from sqlalchemy import create_engine
from sqlalchemy import create_mock_engine
from sqlalchemy import event
from sqlalchemy import func
from sqlalchemy import inspe... | 32.190378 | 79 | 0.536827 |
4a14cbe25eabadf5e2dc84db1261781b8cffa6ed | 640 | py | Python | editor_tests/scm_tests/case_built-in-map,-filter,-reduce.py | Cal-CS-61A-Staff/scheme_interpreter_personal | ae6650362df566b15b364f0935aeb423cfca9f13 | [
"MIT"
] | 5 | 2019-03-31T23:25:44.000Z | 2019-04-02T06:47:33.000Z | editor_tests/scm_tests/case_built-in-map,-filter,-reduce.py | Cal-CS-61A-Staff/scheme_interpreter_personal | ae6650362df566b15b364f0935aeb423cfca9f13 | [
"MIT"
] | 59 | 2019-02-16T10:36:51.000Z | 2019-04-02T21:50:29.000Z | editor_tests/scm_tests/case_built-in-map,-filter,-reduce.py | Cal-CS-61A-Staff/scheme_editor | ae6650362df566b15b364f0935aeb423cfca9f13 | [
"MIT"
] | 1 | 2019-04-19T21:20:59.000Z | 2019-04-19T21:20:59.000Z | from scheme_runner import SchemeTestCase, Query
cases = [
SchemeTestCase([Query(code=['(define (square x) (* x x))'], expected={}), Query(code=["(map square '(1 2 3))"], expected={'out': ['(1 4 9)\n']}), Query(code=["(filter even? '(1 2 3 4 5))"], expected={'out': ['(2 4)\n']}), Query(code=["(reduce + '(1 2 3 4 5))"], ... | 128 | 579 | 0.55625 |
4a14cc74d7dbdf4fce5d0c27571c562ce8ffc5a4 | 882,513 | py | Python | accumulo/proxy/AccumuloProxy.py | faruken/python-accumulo | 6bca3610fc8c712d86b5639f2baa7841f0f872a7 | [
"Apache-2.0"
] | null | null | null | accumulo/proxy/AccumuloProxy.py | faruken/python-accumulo | 6bca3610fc8c712d86b5639f2baa7841f0f872a7 | [
"Apache-2.0"
] | 1 | 2019-07-24T22:51:38.000Z | 2019-07-24T22:51:38.000Z | accumulo/proxy/AccumuloProxy.py | faruken/python-accumulo | 6bca3610fc8c712d86b5639f2baa7841f0f872a7 | [
"Apache-2.0"
] | 1 | 2020-02-27T01:39:01.000Z | 2020-02-27T01:39:01.000Z | #
# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
import sys
import logging
f... | 36.113803 | 160 | 0.574619 |
4a14cd73b9acee1f97938e9040758e7205b83db8 | 4,398 | py | Python | quetz/jobs/rest_models.py | maresb/quetz | 55313ca9c2ae04577d23a1dddb38c045b4a056f4 | [
"BSD-3-Clause"
] | 108 | 2020-09-16T16:15:01.000Z | 2022-03-29T02:49:31.000Z | quetz/jobs/rest_models.py | maresb/quetz | 55313ca9c2ae04577d23a1dddb38c045b4a056f4 | [
"BSD-3-Clause"
] | 317 | 2020-09-07T18:37:33.000Z | 2022-03-25T13:10:41.000Z | quetz/jobs/rest_models.py | maresb/quetz | 55313ca9c2ae04577d23a1dddb38c045b4a056f4 | [
"BSD-3-Clause"
] | 36 | 2020-09-07T22:01:27.000Z | 2022-03-26T17:06:07.000Z | import logging
import pickle
import uuid
from datetime import datetime
from typing import Optional
from importlib_metadata import entry_points as get_entry_points
from pydantic import BaseModel, Field, validator
from . import handlers
from .models import JobStatus, TaskStatus
logger = logging.getLogger("quetz")
de... | 29.32 | 87 | 0.645975 |
4a14cd7868b0061c5183291d7d5c6d6e9955ef57 | 1,568 | py | Python | lookup_extensions/backends/postgresql/base.py | uncovertruth/django-lookup-extensions | 3a8a57130c9092fc6b2458041084746488720b57 | [
"MIT"
] | 4 | 2018-05-23T08:01:55.000Z | 2019-01-18T00:51:11.000Z | lookup_extensions/backends/postgresql/base.py | uncovertruth/django-lookup-extensions | 3a8a57130c9092fc6b2458041084746488720b57 | [
"MIT"
] | 506 | 2018-02-22T07:52:29.000Z | 2019-11-04T14:26:27.000Z | lookup_extensions/backends/postgresql/base.py | uncovertruth/django-lookup-extensions | 3a8a57130c9092fc6b2458041084746488720b57 | [
"MIT"
] | null | null | null | from django.db.backends.postgresql.base import \
DatabaseWrapper as DjangoDatabaseWrapper
from lookup_extensions.utils import merge_dicts
from .operations import DatabaseOperations
class ExtendedDatabaseWrapperMixin(object):
ops_class = DatabaseOperations
operators = merge_dicts(
DjangoDatabaseW... | 30.745098 | 75 | 0.492985 |
4a14cdb0e6bc28be851d1c545571d2ff32f2505d | 4,069 | py | Python | mbed_tools_ci_scripts/generate_news.py | urutva/mbed-tools-ci-scripts | eef162a47f56f95cbb7ecaeac1e629ca8abd7a94 | [
"Apache-2.0"
] | 2 | 2020-04-30T13:44:37.000Z | 2020-06-11T09:39:10.000Z | mbed_tools_ci_scripts/generate_news.py | urutva/mbed-tools-ci-scripts | eef162a47f56f95cbb7ecaeac1e629ca8abd7a94 | [
"Apache-2.0"
] | 43 | 2020-02-04T17:25:24.000Z | 2021-02-17T19:40:09.000Z | mbed_tools_ci_scripts/generate_news.py | urutva/mbed-tools-ci-scripts | eef162a47f56f95cbb7ecaeac1e629ca8abd7a94 | [
"Apache-2.0"
] | 4 | 2020-04-19T16:29:29.000Z | 2020-11-13T12:08:31.000Z | #
# Copyright (C) 2020 Arm Mbed. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Handles usage of towncrier for automated changelog generation and pyautoversion for versioning."""
import sys
import argparse
import logging
import os
import subprocess
from auto_version import auto_version_tool
from mbed_... | 36.657658 | 120 | 0.715409 |
4a14cdde461f13f4c8db47b5a229d68b0d53d472 | 1,809 | py | Python | lf1.py | aba450/lambdapipelien | 448eab7c1392204f8d76788bce58bf41b12feda5 | [
"MIT"
] | null | null | null | lf1.py | aba450/lambdapipelien | 448eab7c1392204f8d76788bce58bf41b12feda5 | [
"MIT"
] | null | null | null | lf1.py | aba450/lambdapipelien | 448eab7c1392204f8d76788bce58bf41b12feda5 | [
"MIT"
] | null | null | null | import json
import logging
import boto3
import os
from datetime import datetime
import time
import urllib.parse
# from requests_aws4auth import AWS4Auth
from elasticsearch import Elasticsearch, RequestsHttpConnection
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
rekognition = boto3.client('rekognition'... | 25.125 | 93 | 0.630735 |
4a14cfecfa7521112478599165839ed0c69cf45b | 5,606 | py | Python | indigorestwrapper/models.py | EdwardMoyse/django-indigorestwrapper | 498de65fbf549519b2a70f5de01f06380da0fcbe | [
"MIT"
] | null | null | null | indigorestwrapper/models.py | EdwardMoyse/django-indigorestwrapper | 498de65fbf549519b2a70f5de01f06380da0fcbe | [
"MIT"
] | null | null | null | indigorestwrapper/models.py | EdwardMoyse/django-indigorestwrapper | 498de65fbf549519b2a70f5de01f06380da0fcbe | [
"MIT"
] | null | null | null | # This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
# Feel free ... | 41.525926 | 224 | 0.711381 |
4a14d0914dabd1b8e06744d59e9a782fa41c3070 | 1,066 | py | Python | src/backend/aspen/app/views/usher.py | chanzuckerberg/aspen | 9853778a7ef68b0446751657af5a835f98dde3dc | [
"MIT"
] | 5 | 2021-02-04T20:18:46.000Z | 2021-09-09T13:42:42.000Z | src/backend/aspen/app/views/usher.py | chanzuckerberg/aspen | 9853778a7ef68b0446751657af5a835f98dde3dc | [
"MIT"
] | 422 | 2021-01-30T04:16:00.000Z | 2022-01-31T23:18:44.000Z | src/backend/aspen/app/views/usher.py | chanzuckerberg/covidr | afe05d703d30ec18ac83944bfb551c313cb216c4 | [
"MIT"
] | 1 | 2021-05-20T14:54:39.000Z | 2021-05-20T14:54:39.000Z | """Views for handling anything related to UShER"""
from typing import Iterable
from flask import g, jsonify
from aspen.app.app import application, requires_auth
from aspen.app.serializers import UsherOptionResponseSchema
from aspen.database.models.usher import UsherOption
@application.route("/api/usher/tree_options... | 34.387097 | 77 | 0.731707 |
4a14d0c1d056f37f584e565dbe7c4f1ecdee1a39 | 3,212 | py | Python | mgs/v1.2/rocksat_rx.py | vt-rocksat-2017/dashboard | e99a71edc74dd8b7f3eec023c381524561a7b6e4 | [
"MIT"
] | 1 | 2017-08-09T19:57:38.000Z | 2017-08-09T19:57:38.000Z | mgs/v1.2/rocksat_rx.py | vt-rocksat-2017/dashboard | e99a71edc74dd8b7f3eec023c381524561a7b6e4 | [
"MIT"
] | null | null | null | mgs/v1.2/rocksat_rx.py | vt-rocksat-2017/dashboard | e99a71edc74dd8b7f3eec023c381524561a7b6e4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#########################################
# Title: Rocksat Telemetry Dashboard #
# Project: Rocksat-X Competition #
# Version: 1.1 #
# Date: Jul 06, 2016 #
# Author: Zach Leffke, KJ4QLP #
# Comment: This is the initial version #
###... | 36.5 | 124 | 0.606476 |
4a14d10225d2b72a35fde74f0cfa12e2bab6fe53 | 4,562 | py | Python | Pytorch/NLP/models/seq2seq/Encoder.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | null | null | null | Pytorch/NLP/models/seq2seq/Encoder.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | null | null | null | Pytorch/NLP/models/seq2seq/Encoder.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | null | null | null | import random
import torch
import torch.nn as nn
import torch.optim as optim
class Encoder(nn.Module):
""" The Encoder module of the Seq2Seq model
You will need to complete the init function and the forward function.
"""
def __init__(self, input_size, emb_size, encoder_hidden_size, decoder_hidden... | 54.309524 | 122 | 0.45594 |
4a14d135aadcbd777e20dfcc09f9fed7166f4d3d | 3,156 | py | Python | example/mnist_cnn_one_iteration.py | johaahn/keras2cpp | 697481bb5b27a9428e79be613ec6ab41a3eda3c4 | [
"MIT"
] | null | null | null | example/mnist_cnn_one_iteration.py | johaahn/keras2cpp | 697481bb5b27a9428e79be613ec6ab41a3eda3c4 | [
"MIT"
] | null | null | null | example/mnist_cnn_one_iteration.py | johaahn/keras2cpp | 697481bb5b27a9428e79be613ec6ab41a3eda3c4 | [
"MIT"
] | null | null | null | '''
Save CNN network and one sample of train data.
Run one iteration of training of convnet on the MNIST dataset.
'''
from __future__ import print_function
import numpy as np
np.random.seed(1337) # for reproducibility
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers.core import... | 29.495327 | 81 | 0.72782 |
4a14d148207b86f7b5242b7409338831e45e3579 | 192 | py | Python | ask_name.py | AHannebelle/snips-givename | f84455d37c8789ef7531d949b5f556dac4030327 | [
"MIT"
] | null | null | null | ask_name.py | AHannebelle/snips-givename | f84455d37c8789ef7531d949b5f556dac4030327 | [
"MIT"
] | null | null | null | ask_name.py | AHannebelle/snips-givename | f84455d37c8789ef7531d949b5f556dac4030327 | [
"MIT"
] | null | null | null | import requests
URL = "http://pinoc.serveo.net/name"
def ask_name_action(name):
requests.get(url="{}/{}".format(URL, name))
response = "Bonjour {}".format(name)
return response
| 19.2 | 47 | 0.661458 |
4a14d2ad11765744fe6cd660dab6187841dc5cf8 | 20,249 | py | Python | tests/test_http.py | lsst/resources | f1bf1f77a07a3072a589e6e10d0456020a77fc45 | [
"BSD-3-Clause"
] | null | null | null | tests/test_http.py | lsst/resources | f1bf1f77a07a3072a589e6e10d0456020a77fc45 | [
"BSD-3-Clause"
] | 11 | 2021-12-07T17:19:19.000Z | 2022-03-31T05:26:36.000Z | tests/test_http.py | lsst/resources | f1bf1f77a07a3072a589e6e10d0456020a77fc45 | [
"BSD-3-Clause"
] | null | null | null | # This file is part of lsst-resources.
#
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# Use of this source code is gove... | 40.579158 | 110 | 0.661366 |
4a14d2f5ecc513921c8547cc836d6e09ea28a370 | 7,004 | py | Python | Experiments.py | anonymus369/Formalizing-Attribute-and-Membership-Inference | 27671abb94126f018578f530b6b64f43cf77411f | [
"MIT"
] | null | null | null | Experiments.py | anonymus369/Formalizing-Attribute-and-Membership-Inference | 27671abb94126f018578f530b6b64f43cf77411f | [
"MIT"
] | null | null | null | Experiments.py | anonymus369/Formalizing-Attribute-and-Membership-Inference | 27671abb94126f018578f530b6b64f43cf77411f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
import numpy as np
from numpy import random as rd
import math
import torch
import torch.nn as nn
from torch.utils.data import DataLoader, Dataset
from models import ConvNNCifar10, ConvNNMNIST
cuda = True if torch.cuda.is_available() else False
Tensor = torch.cuda.FloatT... | 33.194313 | 106 | 0.602656 |
4a14d33a2beae8de763559265f2c6779443f6ad1 | 31,380 | py | Python | BioSTEAM 2.x.x/biorefineries/wheatstraw/_system.py | blsymens/Bioindustrial-Park | c1173646185d52f4b8d595ad088ade8e5216614d | [
"MIT"
] | 18 | 2020-05-12T21:46:14.000Z | 2022-03-14T00:35:35.000Z | BioSTEAM 2.x.x/biorefineries/wheatstraw/_system.py | yalinli2/Bioindustrial-Park | 196e2d60ec9bf0466ef804d036c995b89bc72f72 | [
"MIT"
] | 24 | 2020-03-05T14:39:15.000Z | 2022-03-25T22:24:50.000Z | BioSTEAM 2.x.x/biorefineries/wheatstraw/_system.py | yalinli2/Bioindustrial-Park | 196e2d60ec9bf0466ef804d036c995b89bc72f72 | [
"MIT"
] | 9 | 2020-05-14T13:02:32.000Z | 2022-03-27T19:41:07.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 27 23:12:28 2019
@author: Joaquin
"""
from biosteam import System
import biosteam as bst
import thermosteam as tmo
from thermosteam import Stream
from biorefineries.wheatstraw._process_settings import price
from biorefineries.wheatstraw._chemicals import chemical_groups
f... | 42.986301 | 214 | 0.578043 |
4a14d3a9120b51f040cd46826a8543e2fe867af3 | 49,652 | py | Python | sklearn/naive_bayes.py | aimoip/scikit-learn | 7995941d91b0a06ef2db806be7588e2fb8dd5cb1 | [
"BSD-3-Clause"
] | null | null | null | sklearn/naive_bayes.py | aimoip/scikit-learn | 7995941d91b0a06ef2db806be7588e2fb8dd5cb1 | [
"BSD-3-Clause"
] | null | null | null | sklearn/naive_bayes.py | aimoip/scikit-learn | 7995941d91b0a06ef2db806be7588e2fb8dd5cb1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
The :mod:`sklearn.naive_bayes` module implements Naive Bayes algorithms. These
are supervised learning methods based on applying Bayes' theorem with strong
(naive) feature independence assumptions.
"""
# Author: Vincent Michel <vincent.michel@inria.fr>
# Minor fixes by Fabian Pedre... | 37.416729 | 92 | 0.620317 |
4a14d3ac2d671aeb1ac8cded25e7edd2258a9e0b | 1,246 | py | Python | _old/play.py | tekkie1618/kards | 1ccac0f9484a8acb6a79eee135a0b719d8b39f44 | [
"MIT"
] | 1 | 2022-02-26T17:39:54.000Z | 2022-02-26T17:39:54.000Z | _old/play.py | tekkie1618/kards | 1ccac0f9484a8acb6a79eee135a0b719d8b39f44 | [
"MIT"
] | null | null | null | _old/play.py | tekkie1618/kards | 1ccac0f9484a8acb6a79eee135a0b719d8b39f44 | [
"MIT"
] | null | null | null | from deck import Deck
from hand import Hand
from check_score import check_score
import settings
def play(num_players: int, starting_cards: int, number_of_decks: int = 1):
hands = []
deck = Deck(number_of_decks)
hand = Hand()
for player in range(num_players):
hand.cards = deck.deal(s... | 28.318182 | 158 | 0.592295 |
4a14d441a7c858c820d1374a1c7b9ce7a4ffa33d | 1,390 | py | Python | utils.py | ShuvozitGhose/UDBNET | 47f1dbc018c51d590c4b5f35d24bffeee2a22a71 | [
"MIT"
] | 6 | 2020-07-15T01:04:46.000Z | 2022-02-04T18:53:51.000Z | utils.py | ShuvozitGhose/UDBNET | 47f1dbc018c51d590c4b5f35d24bffeee2a22a71 | [
"MIT"
] | 4 | 2020-09-09T21:22:14.000Z | 2021-05-02T12:36:25.000Z | utils.py | ShuvozitGhose/UDBNET | 47f1dbc018c51d590c4b5f35d24bffeee2a22a71 | [
"MIT"
] | 4 | 2020-07-07T11:24:38.000Z | 2021-06-23T07:41:59.000Z | import torch
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
import numpy
class Denormalization:
def __init__(self):
self.mean_3 = torch.tensor([-1.0, -1.0, -1.0]).to(device)
self.std_3 = torch.tensor([1 / 0.5, 1 / 0.5, 1 / 0.5]).to(device)
self.mean_1 = torch.tensor([-... | 55.6 | 122 | 0.617986 |
4a14d4ace98dc8ca984d719a35b88c2d396fff17 | 1,754 | py | Python | plot.py | toytag/Parallel-KMeans | 078d98da064f148edb1ec3344f84a15c8326ffad | [
"MIT"
] | null | null | null | plot.py | toytag/Parallel-KMeans | 078d98da064f148edb1ec3344f84a15c8326ffad | [
"MIT"
] | null | null | null | plot.py | toytag/Parallel-KMeans | 078d98da064f148edb1ec3344f84a15c8326ffad | [
"MIT"
] | null | null | null | ################
##
## File: plot.py
##
## Plot the 2-d data points in standardized 'res.txt' ascii files, utlizing
## the `matplotlib.pyplot` scatter plots.
##
## * Number of colors (i.e. clusters) CANNOT exceed 20.
##
## Jose @ ShanghaiTech University
##
################
import numpy as np
import matplotlib.pyplo... | 27.84127 | 76 | 0.594641 |
4a14d52a78d94fea977285ebd886c49d85dce53f | 215 | py | Python | deui/html/attribute/type_attr.py | urushiyama/DeUI | 14530d2dae7d96a3dee30759f85e02239fb433c5 | [
"MIT"
] | 1 | 2021-10-17T01:54:18.000Z | 2021-10-17T01:54:18.000Z | deui/html/attribute/type_attr.py | urushiyama/DeUI | 14530d2dae7d96a3dee30759f85e02239fb433c5 | [
"MIT"
] | null | null | null | deui/html/attribute/type_attr.py | urushiyama/DeUI | 14530d2dae7d96a3dee30759f85e02239fb433c5 | [
"MIT"
] | null | null | null | from .attribute_builder import AttributeBuilder
class Type(AttributeBuilder):
"""
Represents 'type' attribute.
"""
def __init__(self):
super().__init__()
self.attributes = ["type"]
| 19.545455 | 47 | 0.637209 |
4a14d535549cf23a75cefaf9dd84a95dea61e778 | 338 | py | Python | src/boxes/box_processor_textfusenet.py | gregbugaj/marie-ai | f51a74f19ab5d7231c9f8a426284feff1671b974 | [
"MIT"
] | 4 | 2021-09-23T22:38:48.000Z | 2022-01-19T12:03:02.000Z | src/boxes/box_processor_textfusenet.py | gregbugaj/marie-icr | f51a74f19ab5d7231c9f8a426284feff1671b974 | [
"MIT"
] | 17 | 2021-12-22T16:37:21.000Z | 2022-03-16T16:07:34.000Z | src/boxes/box_processor_textfusenet.py | gregbugaj/marie-ai | f51a74f19ab5d7231c9f8a426284feff1671b974 | [
"MIT"
] | null | null | null | from boxes.box_processor import BoxProcessor, PSMode
class BoxProcessorTextFuseNet(BoxProcessor):
""" "TextFuseNet box processor responsible for extracting bounding boxes for given documents"""
def __init__(self):
super().__init__()
def extract_bounding_boxes(self, _id, key, img, psm=PSMode.SPAR... | 28.166667 | 99 | 0.733728 |
4a14d8f1a152b92d53bf5fdb5cf14105caed6015 | 2,344 | py | Python | tests/models/validators/v2_2_1/jsd_c2b2882c8fb65284bfc9d781e9ddd07f.py | oboehmer/dnacentersdk | 25c4e99900640deee91a56aa886874d9cb0ca960 | [
"MIT"
] | 32 | 2019-09-05T05:16:56.000Z | 2022-03-22T09:50:38.000Z | tests/models/validators/v2_2_1/jsd_c2b2882c8fb65284bfc9d781e9ddd07f.py | oboehmer/dnacentersdk | 25c4e99900640deee91a56aa886874d9cb0ca960 | [
"MIT"
] | 35 | 2019-09-07T18:58:54.000Z | 2022-03-24T19:29:36.000Z | tests/models/validators/v2_2_1/jsd_c2b2882c8fb65284bfc9d781e9ddd07f.py | oboehmer/dnacentersdk | 25c4e99900640deee91a56aa886874d9cb0ca960 | [
"MIT"
] | 18 | 2019-09-09T11:07:21.000Z | 2022-03-25T08:49:59.000Z | # -*- coding: utf-8 -*-
"""Cisco DNA Center returnReplacementDevicesCount data model.
Copyright (c) 2019-2021 Cisco Systems.
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... | 35.515152 | 83 | 0.676195 |
4a14d96b9002667af72af84ddbf99c83fd1e2dce | 3,481 | py | Python | nipype/interfaces/diffusion_toolkit/postproc.py | sebastientourbier/nipype | 99c5904176481520c5bf42a501aae1a12184e672 | [
"Apache-2.0"
] | 2 | 2019-01-25T18:20:51.000Z | 2019-07-30T20:51:51.000Z | nipype/interfaces/diffusion_toolkit/postproc.py | sebastientourbier/nipype | 99c5904176481520c5bf42a501aae1a12184e672 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/diffusion_toolkit/postproc.py | sebastientourbier/nipype | 99c5904176481520c5bf42a501aae1a12184e672 | [
"Apache-2.0"
] | 2 | 2018-01-25T19:48:17.000Z | 2019-01-25T18:20:52.000Z | # -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Provides interfaces to various commands provided by diffusion toolkit
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirnam... | 35.520408 | 141 | 0.687733 |
4a14d97cdfbfe22eeef8972f80e02bf4c0cb3340 | 1,144 | py | Python | data/convert.py | louisjensen/FinalProject588 | 16985c91a94b668dfa0e8b6b83ccf2922fb7fb92 | [
"MIT"
] | 1 | 2020-10-22T16:19:36.000Z | 2020-10-22T16:19:36.000Z | data/convert.py | louisjensen/FinalProject588 | 16985c91a94b668dfa0e8b6b83ccf2922fb7fb92 | [
"MIT"
] | null | null | null | data/convert.py | louisjensen/FinalProject588 | 16985c91a94b668dfa0e8b6b83ccf2922fb7fb92 | [
"MIT"
] | 1 | 2020-10-22T17:50:49.000Z | 2020-10-22T17:50:49.000Z | import cv2
import sys
import os
from matplotlib import pyplot as plt
import numpy as np
from PIL import Image
def detect_face(file,filename, images_delete):
directory = r'C:\Users\Rob\Documents\College\ECE 588\FinalProject588\data\cropped'
img = cv2.imread(file)
color = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)... | 28.6 | 95 | 0.696678 |
4a14d9d77120fc4e424e8455497074a4d1c31697 | 37,712 | py | Python | python/ccxt/bitbns.py | ngugcx/ccxt | 57133bf1d129f962ed9aa861006257d55e43000c | [
"MIT"
] | null | null | null | python/ccxt/bitbns.py | ngugcx/ccxt | 57133bf1d129f962ed9aa861006257d55e43000c | [
"MIT"
] | 1 | 2022-01-27T19:54:13.000Z | 2022-01-27T19:54:13.000Z | python/ccxt/bitbns.py | ngugcx/ccxt | 57133bf1d129f962ed9aa861006257d55e43000c | [
"MIT"
] | 1 | 2022-03-15T22:51:08.000Z | 2022-03-15T22:51:08.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import ArgumentsReq... | 38.17004 | 163 | 0.445773 |
4a14dacf68e8b1f9010dc2f59ba65a17dc63227f | 41,282 | py | Python | jina/helper.py | Ruchip16/jina | 24c38a5c330453fb3ebd95f4f4f977b501b21240 | [
"Apache-2.0"
] | 1 | 2022-02-09T14:14:06.000Z | 2022-02-09T14:14:06.000Z | jina/helper.py | Ruchip16/jina | 24c38a5c330453fb3ebd95f4f4f977b501b21240 | [
"Apache-2.0"
] | null | null | null | jina/helper.py | Ruchip16/jina | 24c38a5c330453fb3ebd95f4f4f977b501b21240 | [
"Apache-2.0"
] | null | null | null | import asyncio
import functools
import inspect
import json
import math
import os
import random
import re
import sys
import threading
import time
import uuid
import warnings
from argparse import ArgumentParser, Namespace
from collections.abc import MutableMapping
from datetime import datetime
from itertools import islic... | 28.411562 | 142 | 0.568335 |
4a14dbb66c75bb96488f7061754c0a079571f7ce | 7,194 | py | Python | grr/server/grr_response_server/gui/archive_generator.py | certxlm/grr | c2a442a27f656fb18dfa3bce098847e5c5b849d7 | [
"Apache-2.0"
] | 1 | 2019-08-28T23:48:20.000Z | 2019-08-28T23:48:20.000Z | grr/server/grr_response_server/gui/archive_generator.py | AjitNair2/grr | 2a2ea891b3927775872904cdd402a18e7bb3d143 | [
"Apache-2.0"
] | 2 | 2022-01-15T03:18:12.000Z | 2022-02-13T22:02:43.000Z | grr/server/grr_response_server/gui/archive_generator.py | acidburn0zzz/grr | 44e1a5b1630e8101610faaaebe15b19b5ad30cb1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""This file contains code to generate ZIP/TAR archives."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import io
import os
import zipfile
from future.utils import iteritems
from grr_response_core.lib import utils
from grr_respo... | 34.421053 | 79 | 0.704754 |
4a14dc42262408a42b8bb579c7ac5b1538100803 | 359 | py | Python | mall/apps/areas/serializers.py | xxbsg/meiduo | 0e82628833c4b482884cd392b8d22cb8558f1ffd | [
"MIT"
] | null | null | null | mall/apps/areas/serializers.py | xxbsg/meiduo | 0e82628833c4b482884cd392b8d22cb8558f1ffd | [
"MIT"
] | null | null | null | mall/apps/areas/serializers.py | xxbsg/meiduo | 0e82628833c4b482884cd392b8d22cb8558f1ffd | [
"MIT"
] | null | null | null | from rest_framework import serializers
from areas.models import Area
class AreaSerializer(serializers.ModelSerializer):
class Meta:
model = Area
fields = ['id','name']
class SubsAreaSerializer(serializers.ModelSerializer):
subs = AreaSerializer(many=True)
class Meta:
model = Are... | 22.4375 | 54 | 0.679666 |
4a14de00e7b34f8a8c949df2b98a6d4bfb029d24 | 402 | py | Python | password_required/test_urls.py | temnoregg/django-password-required | 83721290ae61eafdfd2accd35a14e6916e467091 | [
"BSD-3-Clause"
] | 18 | 2015-07-24T07:24:08.000Z | 2022-02-07T09:51:34.000Z | password_required/test_urls.py | temnoregg/django-password-required | 83721290ae61eafdfd2accd35a14e6916e467091 | [
"BSD-3-Clause"
] | 3 | 2017-12-09T02:05:15.000Z | 2020-11-04T11:59:48.000Z | password_required/test_urls.py | temnoregg/django-password-required | 83721290ae61eafdfd2accd35a14e6916e467091 | [
"BSD-3-Clause"
] | 11 | 2015-03-16T08:41:22.000Z | 2020-11-03T08:43:33.000Z | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^password_required/$', 'password_required.views.login'),
# We just need a 200 response code, never mind that the template
# produces no output without a context.
(r'^test/$', 'django.views.generic.simple.dire... | 28.714286 | 68 | 0.669154 |
4a14de1914edd9be0af2d5c9fa025616c80cf6f8 | 9,174 | py | Python | code/churnexplainer.py | peterableda/CML_AMP_Churn_Prediction | bf7982a0dc3550eb257f1235893e23c4cd38d579 | [
"Apache-2.0"
] | 6 | 2020-12-13T13:31:44.000Z | 2022-01-14T14:47:24.000Z | code/churnexplainer.py | Foxfusion/CML_AMP_Churn_Prediction | a2a83c61d1708f762390bd77777465271f129d1c | [
"Apache-2.0"
] | 4 | 2021-04-18T21:17:15.000Z | 2022-03-29T01:33:54.000Z | code/churnexplainer.py | Foxfusion/CML_AMP_Churn_Prediction | a2a83c61d1708f762390bd77777465271f129d1c | [
"Apache-2.0"
] | 11 | 2020-11-24T17:52:27.000Z | 2022-03-22T20:17:59.000Z | # ###########################################################################
#
# CLOUDERA APPLIED MACHINE LEARNING PROTOTYPE (AMP)
# (C) Cloudera, Inc. 2021
# All rights reserved.
#
# Applicable Open Source License: Apache 2.0
#
# NOTE: Cloudera open source products are modular software products
# made up of hun... | 36.404762 | 88 | 0.621648 |
4a14de195a3d1a7002c9994f208f75ed11a91e44 | 4,919 | py | Python | tests/test_fix_code.py | specfault/GreenerPython | 976260c3e78969cfd3e1e40639325f104325c703 | [
"MIT"
] | null | null | null | tests/test_fix_code.py | specfault/GreenerPython | 976260c3e78969cfd3e1e40639325f104325c703 | [
"MIT"
] | null | null | null | tests/test_fix_code.py | specfault/GreenerPython | 976260c3e78969cfd3e1e40639325f104325c703 | [
"MIT"
] | null | null | null | import textwrap
from tests.framework import AbstractFilePair
from tests.framework import in_test_function
from tests.framework import standard_test_spec
from tests.framework import SavingFixesCombination
from tests.framework import SavingFixesSUT
from tests.framework import SavingDoesNotTouchBrokenStuff
from tests.fram... | 32.361842 | 79 | 0.559667 |
4a14decd7298c39f428e91e302de8694713f4dd6 | 329 | py | Python | setup.py | shaun95/IMS-Toucan | 331d3bb5ce7d010ce9bc0a739569d17bb9de6a25 | [
"Apache-2.0"
] | 93 | 2021-08-11T13:52:37.000Z | 2022-03-29T23:19:07.000Z | setup.py | shaun95/IMS-Toucan | 331d3bb5ce7d010ce9bc0a739569d17bb9de6a25 | [
"Apache-2.0"
] | 4 | 2021-12-15T17:23:14.000Z | 2022-03-24T04:51:40.000Z | setup.py | shaun95/IMS-Toucan | 331d3bb5ce7d010ce9bc0a739569d17bb9de6a25 | [
"Apache-2.0"
] | 25 | 2021-08-11T14:23:47.000Z | 2022-03-28T20:23:51.000Z | from pathlib import Path
from typing import List
from setuptools import setup, find_packages
project_root = Path(__file__).parent
install_requires: List[str] = []
print(find_packages())
setup(name="ims_toucan", version="0.0.1", packages=find_packages(), python_requires=">=3.8",
install_requires=install_req... | 23.5 | 92 | 0.756839 |
4a14df4b94aa4e503c5bc90265ed2a43853744ce | 51,389 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/nxos.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/nxos.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/nxos.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #
# This code is part of Ansible, but is an independent component.
#
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complet... | 34.168218 | 107 | 0.555527 |
4a14df9868d3fe8c7650d26694f4637cb731bf8c | 2,242 | py | Python | linear_structures/array/414_third-maximum-number.py | b1tank/leetcode | 0b71eb7a4f52291ff072b1280d6b76e68f7adfee | [
"MIT"
] | null | null | null | linear_structures/array/414_third-maximum-number.py | b1tank/leetcode | 0b71eb7a4f52291ff072b1280d6b76e68f7adfee | [
"MIT"
] | null | null | null | linear_structures/array/414_third-maximum-number.py | b1tank/leetcode | 0b71eb7a4f52291ff072b1280d6b76e68f7adfee | [
"MIT"
] | null | null | null | # Author: b1tank
# Email: b1tank@outlook.com
#=================================
'''
414_third-maximum-number LeetCode
Solution:
- intuitive
- set()
- set() cleaner version !
- heapq: heapq.heappushpop vs heapq.heapreplace ("heappoppush")
'''
import heapq
class Solution:
def third... | 29.116883 | 111 | 0.344781 |
4a14e00f17be18bec5136e9183871cb16ee58108 | 869 | py | Python | face_app/main/helper_function.py | benjaminogbonna/face_expression_detection | 81b7adc383c7724f2c355283302374c6af8d3ed9 | [
"MIT"
] | null | null | null | face_app/main/helper_function.py | benjaminogbonna/face_expression_detection | 81b7adc383c7724f2c355283302374c6af8d3ed9 | [
"MIT"
] | null | null | null | face_app/main/helper_function.py | benjaminogbonna/face_expression_detection | 81b7adc383c7724f2c355283302374c6af8d3ed9 | [
"MIT"
] | null | null | null | import cv2
import os
import numpy as np
cur_dir = os.path.dirname(__file__)
haarcascade = os.path.join(cur_dir, 'model', 'haarcascade_frontalface_default.xml')
def load_and_prep_image(filename):
"""
Reads an image from filename, turns it into a tensor
and reshapes it to (img_shape, img_shape, colour_chan... | 29.965517 | 87 | 0.666283 |
4a14e05d36af05e572780d0cff51160a03d4c988 | 1,106 | py | Python | trove/guestagent/datastore/mariadb/manager.py | Tesora-Release/tesora-trove | 042145a573ce08b5d7cb25e1491e391e777a20be | [
"Apache-2.0"
] | 2 | 2016-08-27T01:59:08.000Z | 2018-06-08T10:02:08.000Z | trove/guestagent/datastore/mariadb/manager.py | Tesora-Release/tesora-trove | 042145a573ce08b5d7cb25e1491e391e777a20be | [
"Apache-2.0"
] | null | null | null | trove/guestagent/datastore/mariadb/manager.py | Tesora-Release/tesora-trove | 042145a573ce08b5d7cb25e1491e391e777a20be | [
"Apache-2.0"
] | 7 | 2016-04-06T19:03:03.000Z | 2018-10-12T21:50:51.000Z | # Copyright 2015 Tesora, 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 required by ... | 36.866667 | 78 | 0.740506 |
4a14e0746139dc533b1b89bd7f273d751c6b02fe | 2,597 | py | Python | ScriptZora.py | SimHanssens/ZoraProject | e25b6d235745d5414be9bad0364069a7d930a3f4 | [
"bzip2-1.0.6"
] | null | null | null | ScriptZora.py | SimHanssens/ZoraProject | e25b6d235745d5414be9bad0364069a7d930a3f4 | [
"bzip2-1.0.6"
] | null | null | null | ScriptZora.py | SimHanssens/ZoraProject | e25b6d235745d5414be9bad0364069a7d930a3f4 | [
"bzip2-1.0.6"
] | null | null | null | from naoqi import ALProxy, ALModule, ALBroker
from PIL import Image
mask = False
IP = "10.3.208.67"
port = 9559
video_device = ALProxy("ALVideoDevice", IP, port)
camera = 0 # CameraTop
resolutions = 3 # k4VGA
color_spaces = 13 # kBGRColorSpace
fps = 1
tts = ALProxy("ALTextToSpeech", IP, port)
ledRGB = ALProxy("AL... | 28.228261 | 102 | 0.581825 |
4a14e1613330804f1f32f1e0b4c9432916b15b4b | 4,464 | py | Python | src/matplotx/_spy.py | RemDelaporteMathurin/matplotx | 68c0fc4612f6060adb673cc35f203de7f2c3d19a | [
"MIT"
] | 306 | 2021-12-02T15:58:57.000Z | 2022-03-28T05:25:59.000Z | src/matplotx/_spy.py | sailfish009/matplotx | 668c2e36082c65e49b83440eeed14da4273fdca2 | [
"MIT"
] | 6 | 2021-12-10T07:11:56.000Z | 2022-02-07T15:53:47.000Z | src/matplotx/_spy.py | sailfish009/matplotx | 668c2e36082c65e49b83440eeed14da4273fdca2 | [
"MIT"
] | 17 | 2021-12-11T12:44:59.000Z | 2022-03-26T09:16:34.000Z | import tempfile
import matplotlib.colors as colors
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
def spy(*args, filename=None, **kwargs):
if filename is None:
return _plot(*args, **kwargs)
_write_png(filename, *args, **kwargs)
def _plot(A, border_width: int = ... | 30.367347 | 86 | 0.529794 |
4a14e4639e3a4069547b90cc54c21f68dde6d4dc | 120 | py | Python | services/admin.py | FGAUnB-REQ-GM/2021.2-PousadaAnimal | b7371aebccad0da23073de0db642a6ce824f919e | [
"MIT"
] | null | null | null | services/admin.py | FGAUnB-REQ-GM/2021.2-PousadaAnimal | b7371aebccad0da23073de0db642a6ce824f919e | [
"MIT"
] | 95 | 2022-02-04T19:40:09.000Z | 2022-03-31T20:24:11.000Z | services/admin.py | FGAUnB-REQ-GM/2021.2-PousadaAnimal | b7371aebccad0da23073de0db642a6ce824f919e | [
"MIT"
] | 4 | 2022-01-26T23:51:48.000Z | 2022-01-27T18:28:16.000Z | from django.contrib import admin
from .models import Service
# Register your models here.
admin.site.register(Service)
| 20 | 32 | 0.808333 |
4a14e74ee52daadcbf961099e8beb9fa1c69482c | 1,782 | py | Python | predict.py | Tyelcie/Image_Classifier | 92ae6b1b307492e8ad1732d0f516565838059bd3 | [
"MIT"
] | 1 | 2021-02-13T08:56:03.000Z | 2021-02-13T08:56:03.000Z | predict.py | Tyelcie/Image_Classifier | 92ae6b1b307492e8ad1732d0f516565838059bd3 | [
"MIT"
] | null | null | null | predict.py | Tyelcie/Image_Classifier | 92ae6b1b307492e8ad1732d0f516565838059bd3 | [
"MIT"
] | null | null | null | import argparse
import model_class as mc
import data_process as dp
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import seaborn as sb
import json
from PIL import Image
from torchvision import transforms, datasets, models
parser = argparse.ArgumentParser()
parser.add_argument('input', type = s... | 28.285714 | 193 | 0.719978 |
4a14e8d68d9b27e524bf59dcb8128949e14ad407 | 9,414 | py | Python | agents/ActorCritic_Separate.py | samuelfneumann/RLControl | 71430b1de2e4262483908932eb44579c2ec8216d | [
"Apache-2.0"
] | 9 | 2018-07-30T20:12:47.000Z | 2021-02-05T17:02:04.000Z | agents/ActorCritic_Separate.py | samuelfneumann/RLControl | 71430b1de2e4262483908932eb44579c2ec8216d | [
"Apache-2.0"
] | 14 | 2020-01-28T22:38:58.000Z | 2022-02-10T00:11:21.000Z | agents/ActorCritic_Separate.py | samuelfneumann/RLControl | 71430b1de2e4262483908932eb44579c2ec8216d | [
"Apache-2.0"
] | 3 | 2018-08-08T14:52:53.000Z | 2021-01-23T18:00:05.000Z | from __future__ import print_function
import numpy as np
import tensorflow as tf
from agents.base_agent import BaseAgent
from agents.network.base_network_manager import BaseNetwork_Manager
# from agents.network import ac_network
from agents.network import ac_actor_network
from agents.network import ac_critic_network
f... | 45.259615 | 127 | 0.656257 |
4a14e93bca5aa8ff42a39d2ef264a0dc702e332f | 2,992 | py | Python | hand_net/test.py | clearsky767/examples | d6c744061ba5ed56088af43edb171990c6942efd | [
"BSD-3-Clause"
] | null | null | null | hand_net/test.py | clearsky767/examples | d6c744061ba5ed56088af43edb171990c6942efd | [
"BSD-3-Clause"
] | null | null | null | hand_net/test.py | clearsky767/examples | d6c744061ba5ed56088af43edb171990c6942efd | [
"BSD-3-Clause"
] | null | null | null | import torch
import torch.nn as nn
import torchvision.transforms as transforms
import torch.utils.data as data
import torch.backends.cudnn as cudnn
import os
import json
import time
import cv2
import shutil
import argparse
import numpy as np
from PIL import Image, ImageDraw
from resnet import resnet18
from roi_pooling... | 25.57265 | 86 | 0.637032 |
4a14e948d90ff87675251b73eb3be69ad3896515 | 1,030 | py | Python | annotator/urls.py | acdh-oeaw/ner-annotator | ee8f72248669b848eb273644d80ad52dc495a07c | [
"MIT"
] | 1 | 2019-01-02T15:05:30.000Z | 2019-01-02T15:05:30.000Z | annotator/urls.py | acdh-oeaw/ner-annotator | ee8f72248669b848eb273644d80ad52dc495a07c | [
"MIT"
] | 8 | 2020-02-11T23:02:04.000Z | 2021-06-10T20:39:58.000Z | annotator/urls.py | acdh-oeaw/ner-annotator | ee8f72248669b848eb273644d80ad52dc495a07c | [
"MIT"
] | 1 | 2019-01-02T15:05:31.000Z | 2019-01-02T15:05:31.000Z | from django.conf.urls import url, include, handler404
from django.contrib import admin
from django.conf import settings
from rest_framework import routers
from annotations.api_views import NerSampleViewSet, NerSampleViewSetToDo
if 'bib' in settings.INSTALLED_APPS:
from bib.api_views import ZotItemViewSet
router ... | 32.1875 | 83 | 0.741748 |
4a14e9b43adec8d5df64ed4ac8a7ff9e62ade359 | 1,261 | py | Python | apps/util/speaker/__init__.py | donno2048/Rosehip-repl | b4f76a8cfc41a8b542b621a7d334ff643c716b79 | [
"MIT"
] | null | null | null | apps/util/speaker/__init__.py | donno2048/Rosehip-repl | b4f76a8cfc41a8b542b621a7d334ff643c716b79 | [
"MIT"
] | null | null | null | apps/util/speaker/__init__.py | donno2048/Rosehip-repl | b4f76a8cfc41a8b542b621a7d334ff643c716b79 | [
"MIT"
] | null | null | null | import threading, pygame, pygame_gui;from pygame_gui.elements import UILabel;from pygame_gui.elements import UITextEntryLine;import pyttsx3
class Speaker(pygame_gui.elements.UIWindow):
def __init__(self, pos, manager):super().__init__(pygame.Rect(pos, (400, 128)),manager=manager,window_display_title="speaker",obj... | 157.625 | 452 | 0.76368 |
4a14e9d07ef1dd5462070749c40d6c1dbff3aa57 | 1,561 | py | Python | pythia/pyre/db/Schemer.py | willic3/pythia | 2657b95a0c07fd3c914ab6b5f7ec89a8edba004c | [
"BSD-3-Clause"
] | 1 | 2015-11-30T08:01:39.000Z | 2015-11-30T08:01:39.000Z | pythia/pyre/db/Schemer.py | willic3/pythia | 2657b95a0c07fd3c914ab6b5f7ec89a8edba004c | [
"BSD-3-Clause"
] | 27 | 2018-05-24T18:31:25.000Z | 2021-10-16T03:57:52.000Z | pythia/pyre/db/Schemer.py | willic3/pythia | 2657b95a0c07fd3c914ab6b5f7ec89a8edba004c | [
"BSD-3-Clause"
] | 7 | 2019-07-19T02:30:56.000Z | 2021-06-02T22:00:01.000Z | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Michael A.G. Aivazis
# California Institute of Technology
# (C) 1998-2005 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~... | 24.015385 | 80 | 0.484305 |
4a14ea9b0cd4e8eadaa583e10b6a165100921d3e | 237 | py | Python | pyaz/dla/catalog/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/dla/catalog/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/dla/catalog/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | 1 | 2022-02-03T09:12:01.000Z | 2022-02-03T09:12:01.000Z | '''
Manage Data Lake Analytics catalogs.
'''
from ... pyaz_utils import _call_az
from . import assembly, credential, database, external_data_source, package, procedure, schema, table, table_partition, table_stats, table_type, tvf, view
| 33.857143 | 154 | 0.780591 |
4a14eb21ead249165aa1e3c6126f589c4cafbfb7 | 1,646 | py | Python | app/core/tests/test_models.py | robnmrz/building-projects-api | 67855e6d2e6339020fca1401551c4e67d40f83e9 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | robnmrz/building-projects-api | 67855e6d2e6339020fca1401551c4e67d40f83e9 | [
"MIT"
] | 4 | 2020-08-19T16:08:48.000Z | 2020-08-19T17:12:39.000Z | app/core/tests/test_models.py | robnmrz/building-projects-api | 67855e6d2e6339020fca1401551c4e67d40f83e9 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
class ModelTests(TestCase):
def test_create_user_with_email_successfull(self):
""" Test creating a new user with an email is successfull """
email = "robinmerz@test.de"
password = "testpassword"
# crea... | 31.056604 | 69 | 0.608748 |
4a14eb66ceecf4234b339b9c2bcf67bcc8f4b592 | 1,633 | py | Python | backend/pages/models/course.py | draihal/main-pr | 81814c5370b592963e91ad0683caa560b0ea9579 | [
"MIT"
] | 2 | 2021-01-28T08:23:15.000Z | 2021-03-09T06:06:58.000Z | backend/pages/models/course.py | draihal/main-pr | 81814c5370b592963e91ad0683caa560b0ea9579 | [
"MIT"
] | 9 | 2020-01-02T15:31:04.000Z | 2021-12-09T01:59:26.000Z | backend/pages/models/course.py | draihal/main-pr | 81814c5370b592963e91ad0683caa560b0ea9579 | [
"MIT"
] | 1 | 2021-03-09T06:11:16.000Z | 2021-03-09T06:11:16.000Z | from django.db import models
from django.core.validators import validate_image_file_extension
from rest_framework.reverse import reverse as api_reverse
def upload_image_dir(instance, filename):
return f'site/courses/{filename.lower()}'
class Course(models.Model):
name = models.CharField('Название курса', m... | 37.113636 | 95 | 0.706062 |
4a14ec2e8f97cd4723376b67945400ce5ab44ffd | 532 | py | Python | api/urls/spaces.py | PPinto22/watergenius-backend | 5ee795485b2b4b4c2b334461c7ddb0ef2496096a | [
"Apache-2.0"
] | null | null | null | api/urls/spaces.py | PPinto22/watergenius-backend | 5ee795485b2b4b4c2b334461c7ddb0ef2496096a | [
"Apache-2.0"
] | 2 | 2021-03-19T23:01:20.000Z | 2021-06-10T22:30:57.000Z | api/urls/spaces.py | PPinto22/watergenius-backend | 5ee795485b2b4b4c2b334461c7ddb0ef2496096a | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from api.views.spaces import SpacesListView, SpaceDetailView, SpaceRestrictionsListView, \
SpaceRestrictionDetailView
# /spaces
urlpatterns = [
path('', SpacesListView.as_view(), name='spaces'),
path('<int:spaceid>/', SpaceDetailView.as_view(), name='spaceDetail'),
path('<... | 38 | 115 | 0.746241 |
4a14ec871fc443388cec773008de45acc2a26253 | 31,033 | py | Python | trac/web/api.py | pkdevbox/trac | d044fc469e4dcbc5901c992b1b4160e9cbecee25 | [
"BSD-3-Clause"
] | null | null | null | trac/web/api.py | pkdevbox/trac | d044fc469e4dcbc5901c992b1b4160e9cbecee25 | [
"BSD-3-Clause"
] | null | null | null | trac/web/api.py | pkdevbox/trac | d044fc469e4dcbc5901c992b1b4160e9cbecee25 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2009 Edgewall Software
# Copyright (C) 2005-2006 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://... | 36.552415 | 79 | 0.595978 |
4a14ee891d9e87c09caaf21d1806b97bd6a6628c | 9,455 | py | Python | service/mock.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | service/mock.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | service/mock.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | """
Driver factory (non-standard mock but useful for testing)
"""
import uuid
from threepio import logger
from rtwo.models.instance import Instance
from rtwo.driver import MockDriver
from rtwo.drivers.openstack_network import NetworkManager
from rtwo.drivers.common import _connect_to_keystone_v3, _token_to_keystone_s... | 27.973373 | 164 | 0.615865 |
4a14eedbfb5699fce1da8c8944b4305da90742f8 | 395,138 | py | Python | vscode/extensions/ms-python.python-2019.2.5558/pythonFiles/lib/python/ptvsd/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py | L2D22/dotfiles | 0a01648e338159ef0cd998f6e0265beb7dc06fbf | [
"MIT"
] | null | null | null | vscode/extensions/ms-python.python-2019.2.5558/pythonFiles/lib/python/ptvsd/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py | L2D22/dotfiles | 0a01648e338159ef0cd998f6e0265beb7dc06fbf | [
"MIT"
] | null | null | null | vscode/extensions/ms-python.python-2019.2.5558/pythonFiles/lib/python/ptvsd/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py | L2D22/dotfiles | 0a01648e338159ef0cd998f6e0265beb7dc06fbf | [
"MIT"
] | null | null | null | # Automatically generated code.
# Do not edit manually.
# Generated by running: __main__pydevd_gen_debug_adapter_protocol.py
from .pydevd_base_schema import BaseSchema, register, register_request, register_response, register_event
@register
class ProtocolMessage(BaseSchema):
"""
Base class of request... | 32.629067 | 877 | 0.5337 |
4a14efb96af78592e8d871428f668e063e6578ed | 2,187 | py | Python | examples/pytorch-lightning/mnist.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | 694 | 2018-11-30T01:06:30.000Z | 2022-03-31T14:46:26.000Z | examples/pytorch-lightning/mnist.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | 323 | 2018-11-05T17:44:34.000Z | 2022-03-31T16:56:41.000Z | examples/pytorch-lightning/mnist.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | 68 | 2019-04-01T04:24:47.000Z | 2022-02-24T17:22:04.000Z | import os
import argparse
import torch
from torch import nn
from torch.nn import functional as F
from torch.optim import Adam
from torch.utils.data import DataLoader, random_split
from torchvision import datasets, transforms
from torchvision.datasets import MNIST
from pytorch_lightning import Trainer
from pytorch_l... | 27 | 84 | 0.65112 |
4a14efddec57d33c8d8d98d7c2594710dd813ee8 | 1,317 | py | Python | tools/Vitis-AI-Quantizer/vai_q_pytorch/pytorch_binding/pytorch_nndct/utils/tensor_utils.py | Carles-Figuerola/Vitis-AI | fc043ea4aca1f9fe4e18962e6a6ae397812bb34b | [
"Apache-2.0"
] | 1 | 2021-04-01T06:38:48.000Z | 2021-04-01T06:38:48.000Z | tools/Vitis-AI-Quantizer/vai_q_pytorch/pytorch_binding/pytorch_nndct/utils/tensor_utils.py | cy333/Vitis-AI | 611b82cfc32ea2fe04491432bf8feed1f378c9de | [
"Apache-2.0"
] | null | null | null | tools/Vitis-AI-Quantizer/vai_q_pytorch/pytorch_binding/pytorch_nndct/utils/tensor_utils.py | cy333/Vitis-AI | 611b82cfc32ea2fe04491432bf8feed1f378c9de | [
"Apache-2.0"
] | null | null | null |
#
# Copyright 2019 Xilinx 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 writi... | 29.266667 | 74 | 0.735004 |
4a14f0112628b9ffcedba24ec2f43b61580280aa | 2,230 | py | Python | core/domain/audit_validators.py | sf11047/oppia | dc7410cf9f36e1f357a847d744ba2241a670cb15 | [
"Apache-2.0"
] | null | null | null | core/domain/audit_validators.py | sf11047/oppia | dc7410cf9f36e1f357a847d744ba2241a670cb15 | [
"Apache-2.0"
] | null | null | null | core/domain/audit_validators.py | sf11047/oppia | dc7410cf9f36e1f357a847d744ba2241a670cb15 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2020 The Oppia 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 requi... | 35.396825 | 78 | 0.720628 |
4a14f18a0f66914e8f51bf8c104d432803b7d0ba | 4,436 | py | Python | lib/jnpr/healthbot/swagger/models/devicegroup_schema_authentication_password.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 10 | 2019-10-23T12:54:37.000Z | 2022-02-07T19:24:30.000Z | lib/jnpr/healthbot/swagger/models/devicegroup_schema_authentication_password.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 5 | 2019-09-30T04:29:25.000Z | 2022-02-16T12:21:06.000Z | docs/jnpr_healthbot_swagger/swagger_client/models/devicegroup_schema_authentication_password.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 4 | 2019-09-30T01:17:48.000Z | 2020-08-25T07:27:54.000Z | # coding: utf-8
"""
Paragon Insights APIs
API interface for PI application # noqa: E501
OpenAPI spec version: 4.0.0
Contact: healthbot-feedback@juniper.net
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class Devicegroup... | 29.972973 | 100 | 0.599188 |
4a14f3c8e8e555794c85f9b4c0335bedcbc9ed67 | 17,339 | py | Python | heat/tests/test_wsgi.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"Apache-2.0"
] | 1 | 2015-02-26T03:23:23.000Z | 2015-02-26T03:23:23.000Z | heat/tests/test_wsgi.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"Apache-2.0"
] | null | null | null | heat/tests/test_wsgi.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"Apache-2.0"
] | null | null | null |
# Copyright 2010-2011 OpenStack Foundation
# 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
#
# Unles... | 40.511682 | 79 | 0.630602 |
4a14f4e575b2ec54aa133ce3b2fca0d8dd934262 | 1,302 | py | Python | app/modules/social/video.py | Eastwu5788/Heron | 646eeaacea77e293c6eccc6dad82a04ece9294a3 | [
"Apache-2.0"
] | 7 | 2018-01-29T02:46:31.000Z | 2018-03-25T11:15:10.000Z | app/modules/social/video.py | Eastwu5788/Heron | 646eeaacea77e293c6eccc6dad82a04ece9294a3 | [
"Apache-2.0"
] | 4 | 2021-06-08T19:38:03.000Z | 2022-03-11T23:18:46.000Z | app/modules/social/video.py | Eastwu5788/Heron | 646eeaacea77e293c6eccc6dad82a04ece9294a3 | [
"Apache-2.0"
] | 1 | 2021-06-12T14:14:35.000Z | 2021-06-12T14:14:35.000Z | from . import social
from app import db
from app.modules.base.base_handler import BaseHandler
from app.models.social.image import ImageModel
from app.models.social.video import VideoModel
from app.helper.auth import login_required
from app.helper.upload import UploadImage, UploadVideo
from app.helper.response import js... | 32.55 | 114 | 0.738095 |
4a14f4f6d2d8263d7730a1217c9daefadb3efe45 | 387 | py | Python | main_file.py | das-soham/PortfolioBuilder | 891017ced2eedf9b5514c448d779b2622868422e | [
"MIT"
] | null | null | null | main_file.py | das-soham/PortfolioBuilder | 891017ced2eedf9b5514c448d779b2622868422e | [
"MIT"
] | null | null | null | main_file.py | das-soham/PortfolioBuilder | 891017ced2eedf9b5514c448d779b2622868422e | [
"MIT"
] | null | null | null | import TradeBook
import Portfolio
from Quotes import *
import sqlite3
import os
#portfolio = Portfolio.Portfolio()
#portfolio.build('TradeBook',db_path='K:\/',db_name='Portfolio.db')
#portfolio.write_db(db_path='K:\/',db_name='Portfolio.db')
#print(portfolio.portfolio)
connexion = sqlite3.connect(os.path.join('K:\/','... | 25.8 | 67 | 0.764858 |
4a14f52fc781a0aa82067b792f633978f65f53de | 1,591 | py | Python | M7/Projeto_Final.py | DouglasCarvalhoPereira/Interact-OS-PYTHON | 2405d34a0624f1e1277399c936d87d444cf0a7d6 | [
"MIT"
] | null | null | null | M7/Projeto_Final.py | DouglasCarvalhoPereira/Interact-OS-PYTHON | 2405d34a0624f1e1277399c936d87d444cf0a7d6 | [
"MIT"
] | null | null | null | M7/Projeto_Final.py | DouglasCarvalhoPereira/Interact-OS-PYTHON | 2405d34a0624f1e1277399c936d87d444cf0a7d6 | [
"MIT"
] | null | null | null | #Projeto_Final
# >>> Escrevendo um roteiro do Zero
# 1° - Importante entender completamente o problema
# 2° - Identificar as entradas e saídas necessárias
# 3° - Realizar uma pesquisa para saber se já existe uma ferramenta ou módulo pronto para isso
# 4° - Planejamento, saber quais dados são úteis para a solução, orde... | 56.821429 | 148 | 0.736015 |
4a14f552c46151954d4ad3daf584c8154ad12442 | 2,386 | py | Python | custom_components/hasl/__init__.py | Ziqqo/hasl-platform | 27386314bf58626538d59c38d89249b07ed9256a | [
"Apache-2.0"
] | null | null | null | custom_components/hasl/__init__.py | Ziqqo/hasl-platform | 27386314bf58626538d59c38d89249b07ed9256a | [
"Apache-2.0"
] | null | null | null | custom_components/hasl/__init__.py | Ziqqo/hasl-platform | 27386314bf58626538d59c38d89249b07ed9256a | [
"Apache-2.0"
] | null | null | null | """HomeAssistant Sensor for SL (Storstockholms Lokaltrafik)"""
import datetime
import json
import logging
from datetime import timedelta
import homeassistant.helpers.config_validation as cv
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.helpers.event import asyn... | 29.097561 | 73 | 0.685247 |
4a14f66f3d509dd4a3744a03188e653f1212b505 | 6,068 | py | Python | mirobot/__init__.py | mirobot/mirobot-py | c745ec309c3911eeb67bf961dcd5205addd83db1 | [
"MIT"
] | 4 | 2017-08-07T15:27:53.000Z | 2021-03-07T13:41:59.000Z | mirobot/__init__.py | mirobot/mirobot-py | c745ec309c3911eeb67bf961dcd5205addd83db1 | [
"MIT"
] | 2 | 2015-12-28T16:53:18.000Z | 2018-05-04T15:59:26.000Z | mirobot/__init__.py | mirobot/mirobot-py | c745ec309c3911eeb67bf961dcd5205addd83db1 | [
"MIT"
] | 11 | 2015-11-07T05:41:35.000Z | 2021-12-29T12:42:50.000Z | try:
from queue import Queue
except ImportError:
from Queue import Queue
from mirobot.socket_handler import SocketHandler
import time
import string
import random
import sys
import json
try:
import urllib.request as request
except ImportError:
import urllib2 as request
_sentinel = object()
class Mirobot:
def... | 29.891626 | 108 | 0.623599 |
4a14f82b5e611777a6a63f8b615dfc52398ba19e | 621 | py | Python | asn1tools/codecs/permitted_alphabet.py | cromulencellc/asn1tools | 30eb88e287cc1616903858aa96ee8791a4d7bf1c | [
"MIT"
] | 198 | 2017-08-04T21:49:15.000Z | 2022-03-26T10:11:21.000Z | asn1tools/codecs/permitted_alphabet.py | cromulencellc/asn1tools | 30eb88e287cc1616903858aa96ee8791a4d7bf1c | [
"MIT"
] | 144 | 2017-09-29T12:06:51.000Z | 2022-03-29T13:04:44.000Z | asn1tools/codecs/permitted_alphabet.py | cromulencellc/asn1tools | 30eb88e287cc1616903858aa96ee8791a4d7bf1c | [
"MIT"
] | 73 | 2017-10-09T13:33:28.000Z | 2022-03-11T01:35:22.000Z | """Permitted alphabet.
"""
import string
try:
unichr
except NameError:
unichr = chr
NUMERIC_STRING = ' 0123456789'
PRINTABLE_STRING = (string.ascii_uppercase
+ string.ascii_lowercase
+ string.digits
+ " '()+,-./:=?")
IA5_STRING = ''.join([chr(v)... | 23 | 83 | 0.618357 |
4a14f838b8f9d2561def3277b097198e6b4bc19b | 2,169 | py | Python | pdftextpos.py | pr4u4t/pdf-text-position | 2be53194f745a1b74ef7f638a0ea4d592ab6a805 | [
"MIT"
] | null | null | null | pdftextpos.py | pr4u4t/pdf-text-position | 2be53194f745a1b74ef7f638a0ea4d592ab6a805 | [
"MIT"
] | null | null | null | pdftextpos.py | pr4u4t/pdf-text-position | 2be53194f745a1b74ef7f638a0ea4d592ab6a805 | [
"MIT"
] | null | null | null | from pathlib import Path
from typing import Iterable, Any
from pdfminer.high_level import extract_pages
import sys
import os
#Global page counter
page = 1
def show_ltitem_hierarchy(o: Any, depth=0):
"""Show location and text of LTItem and all its descendants"""
if depth == 0:
print('element ... | 25.22093 | 73 | 0.596127 |
4a14f97534816b3e84ce8c199c94b1522fb7d23c | 9,026 | py | Python | test/functional/feature_signet.py | widecoin-project/widecoin | 143b190a61f95a4b7d40c5da484cdde8f0c5ac3f | [
"MIT"
] | 8 | 2021-04-17T16:11:50.000Z | 2021-06-23T05:30:39.000Z | test/functional/feature_signet.py | widecoin-project/widecoin | 143b190a61f95a4b7d40c5da484cdde8f0c5ac3f | [
"MIT"
] | 1 | 2021-04-18T11:57:59.000Z | 2021-04-18T11:57:59.000Z | test/functional/feature_signet.py | widecoin-project/widecoin | 143b190a61f95a4b7d40c5da484cdde8f0c5ac3f | [
"MIT"
] | 7 | 2021-04-17T16:04:12.000Z | 2021-06-10T00:54:53.000Z | #!/usr/bin/env python3
# Copyright (c) 2019-2020 The Widecoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test basic signet functionality"""
from decimal import Decimal
from test_framework.test_framework im... | 120.346667 | 665 | 0.910259 |
4a14f9fcb9385eee54747669194429b759fe55ec | 4,460 | py | Python | authdata/tests/test_models.py | mpassid/MPASSid-data | 1885721366165c768f2b66513f9c124b8aeaadb5 | [
"MIT"
] | null | null | null | authdata/tests/test_models.py | mpassid/MPASSid-data | 1885721366165c768f2b66513f9c124b8aeaadb5 | [
"MIT"
] | 8 | 2018-05-03T05:39:38.000Z | 2021-03-19T21:59:25.000Z | authdata/tests/test_models.py | mpassid/MPASSid-data | 1885721366165c768f2b66513f9c124b8aeaadb5 | [
"MIT"
] | 1 | 2019-09-25T05:33:42.000Z | 2019-09-25T05:33:42.000Z |
# -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2014-2015 Haltu Oy, http://haltu.fi
#
# 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 withou... | 31.188811 | 79 | 0.724664 |
4a14fc0e09525c1aed1ac6aaca26a703cb03cbb3 | 3,667 | py | Python | basicsr/utils/options.py | yuangan/Simple-SR | 630d2f9441b116620af88ff882eca4673dedc047 | [
"MIT"
] | null | null | null | basicsr/utils/options.py | yuangan/Simple-SR | 630d2f9441b116620af88ff882eca4673dedc047 | [
"MIT"
] | null | null | null | basicsr/utils/options.py | yuangan/Simple-SR | 630d2f9441b116620af88ff882eca4673dedc047 | [
"MIT"
] | null | null | null | import yaml
from collections import OrderedDict
from os import path as osp
def ordered_yaml():
"""Support OrderedDict for yaml.
Returns:
yaml Loader and Dumper.
"""
try:
from yaml import CDumper as Dumper
from yaml import CLoader as Loader
except ImportError:... | 33.642202 | 79 | 0.557404 |
4a14fccbadbc5e4b5a7a504ae1b7530f099382c0 | 36,342 | py | Python | notebooks/shared/utils/post_html.py | deeplook/debuggingbook | ff1b50fc6759f268e457bfa46dd73196b138b985 | [
"MIT"
] | null | null | null | notebooks/shared/utils/post_html.py | deeplook/debuggingbook | ff1b50fc6759f268e457bfa46dd73196b138b985 | [
"MIT"
] | null | null | null | notebooks/shared/utils/post_html.py | deeplook/debuggingbook | ff1b50fc6759f268e457bfa46dd73196b138b985 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Expand elements in generated HTML
# Usage: post-html.py CHAPTER_NAME CHAPTER_1 CHAPTER_2 ...
# Note: I suppose this could also be done using Jinja2 templates and ipypublish,
# but this thing here works pretty well.
# If you'd like to convert this into some more elegant framework,
# implement i... | 37.121553 | 346 | 0.642397 |
4a14fcd1d64c2a907afe2851b6a4be1b98fc06db | 5,387 | py | Python | tests/generator/test_rom.py | wallentx/chia-blockchain | 6bc8a3e204a4f49813093e5b3a99740fddc54a93 | [
"Apache-2.0"
] | 2 | 2022-01-01T18:52:46.000Z | 2022-01-06T17:24:02.000Z | tests/generator/test_rom.py | wallentx/chia-blockchain | 6bc8a3e204a4f49813093e5b3a99740fddc54a93 | [
"Apache-2.0"
] | 33 | 2021-09-28T10:17:59.000Z | 2022-03-29T10:13:18.000Z | tests/generator/test_rom.py | rob-opsi/chia-blockchain | 536d90f3b2d3be6ea78ce64528d04dcaba08fcb4 | [
"Apache-2.0"
] | null | null | null | from clvm_tools import binutils
from clvm_tools.clvmc import compile_clvm_text
from chia.full_node.generator import run_generator_unsafe
from chia.full_node.mempool_check_conditions import get_name_puzzle_conditions
from chia.types.blockchain_format.program import Program, SerializedProgram
from chia.types.blockchain_... | 39.610294 | 120 | 0.745684 |
4a14fdd7ac81cd25b40164be031f30fa4c2b4fea | 2,785 | py | Python | src/budget_corpus.py | j-carson/nlp-budget | 82f135c6f86efc603e3e5d94eb9f6e92fc8595dd | [
"MIT"
] | 1 | 2022-01-17T20:25:06.000Z | 2022-01-17T20:25:06.000Z | src/budget_corpus.py | j-carson/nlp-budget | 82f135c6f86efc603e3e5d94eb9f6e92fc8595dd | [
"MIT"
] | null | null | null | src/budget_corpus.py | j-carson/nlp-budget | 82f135c6f86efc603e3e5d94eb9f6e92fc8595dd | [
"MIT"
] | null | null | null | # coding: utf-8
# # Common code to read and process the corpus
#
# To make sure all models are preprocessing the data in a similar way
import pandas as pd
import numpy as np
import pdb
import json
import re
import pickle
from pathlib import Path
import gensim
from gensim.utils import simple_preprocess
from gensi... | 30.604396 | 96 | 0.668223 |
4a14fe6b97a7b16dc332d0f6b226980ee0b33a1e | 146 | py | Python | server.py | afktrust2/flask-template-files | 2045068e9b0f82c02082a0a3ea9f34ed138a1d2d | [
"MIT"
] | null | null | null | server.py | afktrust2/flask-template-files | 2045068e9b0f82c02082a0a3ea9f34ed138a1d2d | [
"MIT"
] | null | null | null | server.py | afktrust2/flask-template-files | 2045068e9b0f82c02082a0a3ea9f34ed138a1d2d | [
"MIT"
] | null | null | null | from flask_app import app
from flask_app.controllers import users
if __name__ == "__main__":
app.run(debug=True, host='localhost', port=8000) | 29.2 | 52 | 0.760274 |
4a14fe7ab5ad92ce093d1aa58e0c4bc0dc3c553e | 157 | py | Python | tf_rnn/layers/__init__.py | ffrankies/tf-rnn | 23400d4deb775841a1b8aae2831c09cc043b8263 | [
"MIT"
] | 1 | 2018-07-16T19:31:49.000Z | 2018-07-16T19:31:49.000Z | tf_rnn/layers/__init__.py | ffrankies/tf-rnn | 23400d4deb775841a1b8aae2831c09cc043b8263 | [
"MIT"
] | 25 | 2018-01-27T14:18:05.000Z | 2018-05-21T16:21:09.000Z | tf_rnn/layers/__init__.py | ffrankies/tf-rnn | 23400d4deb775841a1b8aae2831c09cc043b8263 | [
"MIT"
] | null | null | null | """Contains functions for simplifying RNN layers written with tensorflow 1.3
@since 0.6.1
"""
from .performance_layer import PerformancePlaceholders
| 22.428571 | 77 | 0.770701 |
4a14fe9ea4f459c4854ab30e632128c22bc74c81 | 7,787 | py | Python | Libraries/Python/CommonBoost/v1.0/CommonBoost/BoostBuildImpl.py | davidbrownell/Common_cpp_boost_Common | 79bdf1c5337c67ca153733e937e96a492d3a82f0 | [
"BSL-1.0"
] | null | null | null | Libraries/Python/CommonBoost/v1.0/CommonBoost/BoostBuildImpl.py | davidbrownell/Common_cpp_boost_Common | 79bdf1c5337c67ca153733e937e96a492d3a82f0 | [
"BSL-1.0"
] | null | null | null | Libraries/Python/CommonBoost/v1.0/CommonBoost/BoostBuildImpl.py | davidbrownell/Common_cpp_boost_Common | 79bdf1c5337c67ca153733e937e96a492d3a82f0 | [
"BSL-1.0"
] | null | null | null | # ----------------------------------------------------------------------
# |
# | BoostBuildImpl.py
# |
# | David Brownell <db@DavidBrownell.com>
# | 2019-04-17 15:14:35
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2019-21
# | Distribute... | 40.34715 | 171 | 0.402851 |
4a14ff6c910fe067f0fccc141bd3e5c1dc5795ae | 2,763 | py | Python | src/fuzzingtool/factories/wordlist_factory.py | retr0-13/FuzzingTool | 2fe34911abd583838b7859f83201cd474a2beefc | [
"MIT"
] | null | null | null | src/fuzzingtool/factories/wordlist_factory.py | retr0-13/FuzzingTool | 2fe34911abd583838b7859f83201cd474a2beefc | [
"MIT"
] | null | null | null | src/fuzzingtool/factories/wordlist_factory.py | retr0-13/FuzzingTool | 2fe34911abd583838b7859f83201cd474a2beefc | [
"MIT"
] | null | null | null | # Copyright (c) 2020 - present Vitor Oriel <https://github.com/VitorOriel>
#
# 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 ... | 50.236364 | 86 | 0.709736 |
4a14ff82ea8833f45db27a3dbb77066c92653948 | 13,645 | py | Python | tests/test_hpo.py | sbonner0/pykeen | df5beab80772a08d595ace1b39c7fd4df7164a39 | [
"MIT"
] | 750 | 2020-06-23T08:36:34.000Z | 2022-03-30T22:53:18.000Z | tests/test_hpo.py | sbonner0/pykeen | df5beab80772a08d595ace1b39c7fd4df7164a39 | [
"MIT"
] | 691 | 2020-06-22T11:56:28.000Z | 2022-03-31T16:07:32.000Z | tests/test_hpo.py | sbonner0/pykeen | df5beab80772a08d595ace1b39c7fd4df7164a39 | [
"MIT"
] | 122 | 2020-06-26T14:37:56.000Z | 2022-03-23T08:25:22.000Z | # -*- coding: utf-8 -*-
"""Test hyper-parameter optimization."""
import tempfile
import unittest
from unittest.mock import MagicMock
import optuna
import pytest
from optuna.trial import TrialState
from pykeen.datasets.nations import (
NATIONS_TEST_PATH,
NATIONS_TRAIN_PATH,
NATIONS_VALIDATE_PATH,
Nat... | 41.984615 | 106 | 0.651081 |
4a1500655e813cc40c29d84f42539014d1b68f63 | 177 | py | Python | divisor list.py | svikash/python-basic-program | e0542d98c2985c71cfbaaf3f09ccfdb747a9e2af | [
"MIT"
] | null | null | null | divisor list.py | svikash/python-basic-program | e0542d98c2985c71cfbaaf3f09ccfdb747a9e2af | [
"MIT"
] | null | null | null | divisor list.py | svikash/python-basic-program | e0542d98c2985c71cfbaaf3f09ccfdb747a9e2af | [
"MIT"
] | 1 | 2018-10-01T06:04:27.000Z | 2018-10-01T06:04:27.000Z | a=int(input("enter the number to check divisor"))
#add the divisor to list and print
list=[]
for i in range (1,a):
if a%i == 0:
list.append(int(i))
print(list) | 25.285714 | 50 | 0.615819 |
4a150168a3f3841a22b7c68c1af6b551f83c785e | 1,242 | py | Python | tests/node/agg/test_abstract.py | alkemics/panda | 39e50d9b2408480ebf70c1a2d1a9fa12c55907c5 | [
"Apache-2.0"
] | 13 | 2020-03-03T20:59:08.000Z | 2022-02-16T09:51:40.000Z | tests/node/agg/test_abstract.py | alkemics/panda | 39e50d9b2408480ebf70c1a2d1a9fa12c55907c5 | [
"Apache-2.0"
] | 57 | 2020-06-21T18:48:20.000Z | 2022-03-16T09:52:39.000Z | tests/node/agg/test_abstract.py | alkemics/panda | 39e50d9b2408480ebf70c1a2d1a9fa12c55907c5 | [
"Apache-2.0"
] | 2 | 2020-03-03T20:59:20.000Z | 2020-05-10T20:31:53.000Z | from pandagg.node.aggs.abstract import AggClause
def test_abstract_agg_node():
class CustomAgg(AggClause):
KEY = "custom_type"
VALUE_ATTRS = ["bucket_value_path"]
# would mean this agg can be applied only on boolean fields
WHITELISTED_MAPPING_TYPES = ["boolean"]
BLACKLISTED... | 34.5 | 78 | 0.65781 |
4a15020d6dd2ba9ce9399f9b72318d726bb1b742 | 14,021 | py | Python | pywinauto/unittests/test_taskbar.py | adolli/pywinauto | fd27458700026f283a23e176bcd7303b68bb5077 | [
"BSD-3-Clause"
] | 1 | 2019-02-17T22:46:15.000Z | 2019-02-17T22:46:15.000Z | pywinauto/unittests/test_taskbar.py | adolli/pywinauto | fd27458700026f283a23e176bcd7303b68bb5077 | [
"BSD-3-Clause"
] | 5 | 2015-12-15T14:22:28.000Z | 2019-04-14T09:57:32.000Z | pywinauto/unittests/test_taskbar.py | adolli/pywinauto | fd27458700026f283a23e176bcd7303b68bb5077 | [
"BSD-3-Clause"
] | 7 | 2015-12-03T11:08:05.000Z | 2020-04-28T05:39:35.000Z | # GUI Application automation and testing library
# Copyright (C) 2006-2018 Mark Mc Mahon and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.readthedocs.io/en/latest/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# ... | 38.308743 | 89 | 0.661579 |
4a15027e8519b4c2c43c0cceaa2eac6370f04690 | 46 | py | Python | DSA_Snippets/algo_permute.py | mahnooranjum/Python_Programming | ba251e0e855842112efeb968d06458c60eaf1bd3 | [
"MIT"
] | null | null | null | DSA_Snippets/algo_permute.py | mahnooranjum/Python_Programming | ba251e0e855842112efeb968d06458c60eaf1bd3 | [
"MIT"
] | null | null | null | DSA_Snippets/algo_permute.py | mahnooranjum/Python_Programming | ba251e0e855842112efeb968d06458c60eaf1bd3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: MAQ
"""
| 7.666667 | 23 | 0.413043 |
4a15032e4ea02c980f0b2f96bda17eb3f9d8390b | 6,771 | py | Python | backend/checklists/settings.py | Neo6666666/checklists | cc4eb1685b63f64620742843b444bad21e74214a | [
"MIT"
] | null | null | null | backend/checklists/settings.py | Neo6666666/checklists | cc4eb1685b63f64620742843b444bad21e74214a | [
"MIT"
] | null | null | null | backend/checklists/settings.py | Neo6666666/checklists | cc4eb1685b63f64620742843b444bad21e74214a | [
"MIT"
] | null | null | null | import os
from os import environ
def get_env(key, default=None):
val = environ.get(key, default)
if val == 'True':
val = True
elif val == 'False':
val = False
return val
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEBUG = get_env('DEBUG')
SECRET_KEY = get... | 28.56962 | 99 | 0.652636 |
4a1505a02413b18b51702e5897cdfbf0e7a28d35 | 1,635 | py | Python | 02_Logistic_regression_and_multilayer_perceptron/nearest_neighbor_tf.py | jastarex/DL_Notes | 4da8c5c90283d25655abde95263e44432aad343a | [
"Apache-2.0"
] | 203 | 2017-11-19T08:45:03.000Z | 2022-02-17T08:39:02.000Z | 02_Logistic_regression_and_multilayer_perceptron/nearest_neighbor_tf.py | datianshi21/DeepLearningCourseCodes | 4da8c5c90283d25655abde95263e44432aad343a | [
"Apache-2.0"
] | 3 | 2017-09-19T17:18:46.000Z | 2017-10-23T02:30:05.000Z | 02_Logistic_regression_and_multilayer_perceptron/nearest_neighbor_tf.py | datianshi21/DeepLearningCourseCodes | 4da8c5c90283d25655abde95263e44432aad343a | [
"Apache-2.0"
] | 145 | 2017-11-19T17:21:23.000Z | 2022-02-17T08:39:01.000Z |
# coding: utf-8
# # K近邻算法, TensorFlow示例
# ### K Nearest Neighbor (KNN) Example
# In[1]:
from __future__ import print_function
import numpy as np
import tensorflow as tf
# Import MNIST data, 准备MNIST数据输入
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_ho... | 28.189655 | 110 | 0.692355 |
4a1506337d799d076e1621b46f45c35214be33c3 | 398 | py | Python | chainervr/__init__.py | otsubo/chainervr | 92ab44ea68ed930342698e9da1809eca2ac064f7 | [
"MIT"
] | 7 | 2018-07-31T02:18:52.000Z | 2021-01-22T05:14:35.000Z | chainervr/__init__.py | otsubo/chainervr | 92ab44ea68ed930342698e9da1809eca2ac064f7 | [
"MIT"
] | 1 | 2018-08-20T13:37:17.000Z | 2018-08-20T13:37:17.000Z | chainervr/__init__.py | otsubo/chainervr | 92ab44ea68ed930342698e9da1809eca2ac064f7 | [
"MIT"
] | 1 | 2018-08-20T13:33:04.000Z | 2018-08-20T13:33:04.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Yuki Furuta <furushchev@jsk.imi.i.u-tokyo.ac.jp>
import pkg_resources
__dist__ = pkg_resources.get_distribution("chainer-video-representations")
__version__ = __dist__.version
from . import datasets
from . import functions
from . import links
from . import m... | 19.9 | 74 | 0.758794 |
4a150697ff124cf8ffcfd0bcb232144af634319a | 1,177 | py | Python | Level 2/challenge2.2.py | esslushy/GoogleFoobarChallenges | 68dc0b86feb4561de0a900389bc9e36a00608b2a | [
"MIT"
] | null | null | null | Level 2/challenge2.2.py | esslushy/GoogleFoobarChallenges | 68dc0b86feb4561de0a900389bc9e36a00608b2a | [
"MIT"
] | null | null | null | Level 2/challenge2.2.py | esslushy/GoogleFoobarChallenges | 68dc0b86feb4561de0a900389bc9e36a00608b2a | [
"MIT"
] | null | null | null | from functools import reduce
def solution(xs):
# If it is only one number return that value
if len(xs) == 1:
return str(xs[0])
# Get out positive and negative numbers. Ignore zeroes
pos_nums = []
neg_nums = []
for num in xs:
if num > 0:
pos_nums.append(num)
e... | 30.179487 | 126 | 0.605777 |
4a15071a7debf69a51cd1a3ecb94793978a5b2de | 1,790 | py | Python | tests/gcp/operators/test_bigtable_system.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 1 | 2017-06-25T14:18:15.000Z | 2017-06-25T14:18:15.000Z | tests/gcp/operators/test_bigtable_system.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 3 | 2020-07-07T20:39:24.000Z | 2021-09-29T17:34:46.000Z | tests/gcp/operators/test_bigtable_system.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 1 | 2020-11-04T03:17:51.000Z | 2020-11-04T03:17:51.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 38.913043 | 89 | 0.746927 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.