hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ff9c4dd8e964f42088309d6367a87321afc4076a | 10,187 | py | Python | flexget/plugins/input/next_series_episodes.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/input/next_series_episodes.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/input/next_series_episodes.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
import logging
import re
from sqlalchemy import desc
from flexget import plugin
from flexget.event import event
from flexget.entry import Entry
from flexget.manager import Ses... | 50.430693 | 117 | 0.542849 |
ff9c732bc90d0264da82bab22fa889e2978f3dcc | 760 | py | Python | binarysearch.io/188_conways_game_of_life.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | binarysearch.io/188_conways_game_of_life.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | binarysearch.io/188_conways_game_of_life.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | class Solution:
def solve(self, matrix):
n = len(matrix)
m = len(matrix[-1])
dy = [1, 0, -1, 0 ,-1, -1 ,1,1]
dx = [0, 1, 0 , -1, -1, 1 , -1,1]
ans = []
for i in range(n):
ans.append([])
for j in range(m):
b = 0
... | 33.043478 | 55 | 0.306579 |
ff9c7ea2f4ceb4e46c81fed4176a3a6703fa9cbd | 3,015 | py | Python | rnnparser/RecursiveNN/tests_npRNN/test_RNN_node.py | uphere-co/nlp-prototype | c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3 | [
"BSD-3-Clause"
] | null | null | null | rnnparser/RecursiveNN/tests_npRNN/test_RNN_node.py | uphere-co/nlp-prototype | c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3 | [
"BSD-3-Clause"
] | null | null | null | rnnparser/RecursiveNN/tests_npRNN/test_RNN_node.py | uphere-co/nlp-prototype | c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
import numpy as np
import pandas as pd
from npRNN.tree_utils import Node, NodeTree
from npRNN.node import RNNnode
from npRNN.rnn import Parser
from npRNN.param import Param
def test_value_views():
sentence='a name of the cat on a hat'
merge_history=[5, 2, 2, 1, 0, 1, 0]
... | 33.876404 | 204 | 0.684577 |
ff9c9ffd1b4e8b6943faf87ee33416937d40531a | 1,290 | py | Python | superset/migrations/versions/65903709c321_allow_dml.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 108 | 2018-01-22T11:09:59.000Z | 2021-01-15T10:53:04.000Z | superset/migrations/versions/65903709c321_allow_dml.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 112 | 2018-01-25T22:57:21.000Z | 2019-08-22T20:08:48.000Z | superset/migrations/versions/65903709c321_allow_dml.py | zhwXF/Superset | 14c3488c79f8f3cdbd1123e8f7a92f8746c2db09 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 24 | 2018-01-19T22:54:39.000Z | 2020-11-12T13:04:25.000Z | # 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
# "License"); you may not u... | 28.666667 | 77 | 0.742636 |
ff9ca30f15027f05982d6d4d23f1e1b6d6d0b6a2 | 47,063 | py | Python | pex/resolver.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | null | null | null | pex/resolver.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | null | null | null | pex/resolver.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import
import functools
import json
import os
import subprocess
import zipfile
from collections import OrderedDict, defaultdict, namedtuple
... | 42.020536 | 167 | 0.715148 |
ff9cb50bee8044ac9d094d583c5028f73894be28 | 1,035 | py | Python | python/phonenumbers/shortdata/region_FJ.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/phonenumbers/shortdata/region_FJ.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/shortdata/region_FJ.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | """Auto-generated file, do not edit by hand. FJ metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_FJ = PhoneMetadata(id='FJ', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[0-579]\\d{1,2}', possible_number_patte... | 79.615385 | 178 | 0.771981 |
ff9ccc194ba8fe25b1b9c739ead4769f56138684 | 8,451 | py | Python | examples/scripts/csc/implsden_clr.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 217 | 2016-06-13T16:41:26.000Z | 2022-03-22T06:31:05.000Z | examples/scripts/csc/implsden_clr.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 21 | 2016-06-13T23:28:35.000Z | 2022-02-17T23:20:01.000Z | examples/scripts/csc/implsden_clr.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 47 | 2016-12-14T13:08:33.000Z | 2021-12-12T01:59:49.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
"""
Impulse Noise Restoration via CSC
=================================
This example demonstrates the removal of s... | 40.052133 | 1,073 | 0.705952 |
ff9cee4958f4b90f382f81b16ac25bc92da81222 | 1,531 | py | Python | dakotathon/tests/test_interface_fork.py | csdms/dakotathon | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 8 | 2019-09-11T12:59:57.000Z | 2021-08-11T16:31:58.000Z | dakotathon/tests/test_interface_fork.py | csdms/dakota | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 66 | 2015-04-06T17:11:21.000Z | 2019-02-03T18:09:52.000Z | dakotathon/tests/test_interface_fork.py | csdms/dakota | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 5 | 2015-03-24T22:39:34.000Z | 2018-04-21T12:14:05.000Z | """Tests for the dakotathon.interface.fork module."""
import os
from nose.tools import assert_true, assert_false, assert_equal
from dakotathon.interface.fork import Fork
from .test_interface_base import default_str_lines
run_dir = os.getcwd()
config_file = os.path.join(run_dir, "dakota.yaml")
def setup_module():
... | 24.301587 | 68 | 0.702155 |
ff9cf3ad89830cb351219283ddf5b32195b23996 | 528 | py | Python | cleverhans/model_zoo/__init__.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 4,333 | 2017-06-06T22:03:41.000Z | 2020-12-10T11:36:33.000Z | cleverhans/model_zoo/__init__.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 728 | 2017-06-06T22:09:46.000Z | 2020-12-01T08:13:55.000Z | cleverhans/model_zoo/__init__.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 1,322 | 2017-06-06T22:04:59.000Z | 2020-12-10T11:21:47.000Z | """
A module for hosting a variety of models of interest to the adversarial
example community.
Warning:
This module is not nearly as conservative as the rest of CleverHans.
Most of CleverHans is used to create rigorous vulnerability benchmarks.
For example, the error rate caused by an Attack is considered to be
... | 37.714286 | 73 | 0.776515 |
ff9cf78e44368996a13d5be8c7db5e495b504988 | 93 | py | Python | phr/ciudadano/apps.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/ciudadano/apps.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/ciudadano/apps.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | from django.apps import AppConfig
class CiudadanoConfig(AppConfig):
name = 'ciudadano'
| 15.5 | 33 | 0.763441 |
ff9d107c6f6386f86743dbf94223a739ce2890de | 687 | py | Python | asd_test/scripts/odom_relay.py | DenizUgur/asd_driver | 62ca1390bd34eea3d11df2be541082fd0e3f0d54 | [
"MIT"
] | null | null | null | asd_test/scripts/odom_relay.py | DenizUgur/asd_driver | 62ca1390bd34eea3d11df2be541082fd0e3f0d54 | [
"MIT"
] | null | null | null | asd_test/scripts/odom_relay.py | DenizUgur/asd_driver | 62ca1390bd34eea3d11df2be541082fd0e3f0d54 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from nav_msgs.msg import Odometry
from gazebo_msgs.msg import ModelStates
def callback(msg):
try:
leo_p = msg.pose[msg.name.index("leo")]
leo_t = msg.twist[msg.name.index("leo")]
new_msg = Odometry()
new_msg.header.stamp = rospy.Time.now()
... | 24.535714 | 87 | 0.669578 |
ff9d1cd4ce6b6b6200772966d32810ab64845301 | 6,715 | py | Python | aim/sdk/repo.py | admariner/aim | 4c143ea40acf3531abfa69f66503428d73d9fedc | [
"Apache-2.0"
] | null | null | null | aim/sdk/repo.py | admariner/aim | 4c143ea40acf3531abfa69f66503428d73d9fedc | [
"Apache-2.0"
] | null | null | null | aim/sdk/repo.py | admariner/aim | 4c143ea40acf3531abfa69f66503428d73d9fedc | [
"Apache-2.0"
] | null | null | null | import os
import shutil
from collections import defaultdict
from typing import Dict, Iterator, NamedTuple, Optional
from weakref import WeakValueDictionary
from aim.sdk.configs import AIM_REPO_NAME
from aim.sdk.run import Run
from aim.sdk.utils import search_aim_repo, clean_repo_path
from aim.sdk.trace import QueryRu... | 34.613402 | 94 | 0.638868 |
ff9d357dda720b2d5d2f56ca9f32d011eb7fb9c8 | 28,312 | py | Python | asposewordscloud/models/rtf_save_options_data.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/rtf_save_options_data.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/rtf_save_options_data.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="rtf_save_options_data.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
#... | 43.556923 | 572 | 0.689284 |
ff9d37f0c5ab40c9928d30dedae4d182a26f1329 | 16,486 | py | Python | sncosmo/spectral.py | MickaelRigault/sncosmo | 6b934228f7d3734223e4f21cb590a24d76e39511 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | 1 | 2021-03-22T22:24:29.000Z | 2021-03-22T22:24:29.000Z | sncosmo/spectral.py | MickaelRigault/sncosmo | 6b934228f7d3734223e4f21cb590a24d76e39511 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | sncosmo/spectral.py | MickaelRigault/sncosmo | 6b934228f7d3734223e4f21cb590a24d76e39511 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import abc
import math
from copy import deepcopy
import numpy as np
from astropy.utils import OrderedDict, lazyproperty
from astropy.io import ascii
import astropy.units as u
import astropy.constants as const
from astropy import cosmology
from . import... | 32.199219 | 79 | 0.581645 |
ff9d3aadf8cdef92e3ee38d1abb0c47bb310c02f | 6,017 | py | Python | wrapymongo/__init__.py | shreyasgokhale/wrapymongo | 3db298fae5b2e2c36ab7ac86419fcb4f3d56d037 | [
"MIT"
] | 1 | 2020-01-06T22:19:00.000Z | 2020-01-06T22:19:00.000Z | wrapymongo/__init__.py | shreyasgokhale/wrapymongo | 3db298fae5b2e2c36ab7ac86419fcb4f3d56d037 | [
"MIT"
] | null | null | null | wrapymongo/__init__.py | shreyasgokhale/wrapymongo | 3db298fae5b2e2c36ab7ac86419fcb4f3d56d037 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
MongoDB API Wrapper
@author: Shreyas Gokhale
@contact: shreyas6gokhale@gmail.com
"""
import pymongo
class driver:
def __init__(self, link=None, username=None, password=None, authdb='admin'):
"""
Define client for object
:param link: MongoDB link for connecti... | 30.69898 | 124 | 0.572046 |
ff9d44b1d9759f0fd326bfe8a14689de677d27c8 | 153 | py | Python | src/node-agent/log_utils.py | srikanteswartalluri/container-orchestrator | 3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9 | [
"Apache-2.0"
] | null | null | null | src/node-agent/log_utils.py | srikanteswartalluri/container-orchestrator | 3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9 | [
"Apache-2.0"
] | null | null | null | src/node-agent/log_utils.py | srikanteswartalluri/container-orchestrator | 3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9 | [
"Apache-2.0"
] | null | null | null | import logging
logging.basicConfig(level=logging.DEBUG,format='%(asctime)s %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
| 38.25 | 100 | 0.751634 |
ff9d67e046c27fda2b674acab7528164735d343e | 12,879 | py | Python | infographics/donuts.py | thom-brooke/infographics | c4ac91fd1716e077c940035ee6aa71546105edb4 | [
"MIT"
] | null | null | null | infographics/donuts.py | thom-brooke/infographics | c4ac91fd1716e077c940035ee6aa71546105edb4 | [
"MIT"
] | null | null | null | infographics/donuts.py | thom-brooke/infographics | c4ac91fd1716e077c940035ee6aa71546105edb4 | [
"MIT"
] | null | null | null | """Module to generate 'donut' (and 'pie') charts as SVG.
A donut chart is just a pie chart with a central "hole". We treat the pie chart
as a degenerate case -- a donut chart with a zero-width hole -- which is kind of
backwards.
This module is written in/for Python3, although it can probably be used in Python2
wit... | 43.955631 | 165 | 0.613635 |
ff9d882b30556f612aa499f18f8c19935288df24 | 2,628 | py | Python | graphs/prim.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | graphs/prim.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | graphs/prim.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | 1 | 2020-06-26T09:46:17.000Z | 2020-06-26T09:46:17.000Z | '''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 26.816327 | 79 | 0.620624 |
ff9dc3c66877b9ec0f1a840ff46bb5181059bb57 | 28,872 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.902022 | 229 | 0.66684 |
ff9ddb13c8260fa7e5db3e7b856339fae4228305 | 154,123 | py | Python | merlinmusicplayer/src/plugin.py | pololoko111/enigma2-plugins | 79b4e5e15663bcda7d1b679769e10942915f5bf5 | [
"OLDAP-2.3"
] | null | null | null | merlinmusicplayer/src/plugin.py | pololoko111/enigma2-plugins | 79b4e5e15663bcda7d1b679769e10942915f5bf5 | [
"OLDAP-2.3"
] | null | null | null | merlinmusicplayer/src/plugin.py | pololoko111/enigma2-plugins | 79b4e5e15663bcda7d1b679769e10942915f5bf5 | [
"OLDAP-2.3"
] | null | null | null | #
# Merlin Music Player E2
#
# $Id$
#
# Coded by Dr.Best (c) 2010
# Support: www.dreambox-tools.info
#
# This plugin is licensed under the Creative Commons
# Attribution-NonCommercial-ShareAlike 3.0 Unported
# License. To view a copy of this license, visit
# http://creativecommons.org/licenses/by-nc-sa/3.0/ o... | 45.144405 | 484 | 0.71587 |
ff9e07dcffeb24137254bfcebd4d2a839700798d | 2,427 | py | Python | google-cloud-sdk/lib/surface/emulators/datastore/start.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/emulators/datastore/start.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/emulators/datastore/start.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2015 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 required by applicable law or ag... | 34.671429 | 79 | 0.691389 |
ff9e0b1db0d09236b6bbf3aee6fc1173735cc6c9 | 154 | py | Python | binarysearch.io/stairway_to_heaven.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | binarysearch.io/stairway_to_heaven.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | binarysearch.io/stairway_to_heaven.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | class Solution:
def solve(self, nums):
# Write your code here
for i in range(len(nums)):
nums[i] += i
return nums
| 22 | 34 | 0.519481 |
ff9e1556c2f37352b997dcf78ec4e8b7a4247632 | 1,149 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/turtle_sierpinski.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/turtle_sierpinski.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 12 | 2019-06-27T18:01:48.000Z | 2022-02-19T15:15:06.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/turtle_sierpinski.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import board
from adafruit_turtle import turtle
def getMid(p1, p2):
return ((p1[0] + p2[0]) / 2, (p1[1] + p2[1]) / 2) # find midpoint
def triangle(points, depth):
turtle.penup()
turtle.goto(points[0][0], poi... | 26.113636 | 84 | 0.577023 |
ff9e17d51d6aceffe835e016768954af4a8c2031 | 6,309 | py | Python | src/genie/telemetry/config/schema.py | CiscoTestAutomation/genietelemetry | 286cd1d281c7375c3d161955fa3ce52e1da52372 | [
"Apache-2.0"
] | 3 | 2020-05-24T11:47:53.000Z | 2020-09-06T21:22:21.000Z | src/genie/telemetry/config/schema.py | CiscoTestAutomation/genietelemetry | 286cd1d281c7375c3d161955fa3ce52e1da52372 | [
"Apache-2.0"
] | null | null | null | src/genie/telemetry/config/schema.py | CiscoTestAutomation/genietelemetry | 286cd1d281c7375c3d161955fa3ce52e1da52372 | [
"Apache-2.0"
] | null | null | null |
import getpass
from ipaddress import IPv4Interface, IPv6Interface, ip_address
from pyats.utils.schemaengine import (
Or,
Any,
Use,
Optional,
Schema,
Use,
And,
Default,
Fallback
)
from pyats.utils.exceptions import SchemaError
from pyats.utils.import_utils import import_from_name, t... | 30.77561 | 80 | 0.479949 |
ff9e2d82885e09a0d3569e94090e283baa193f6d | 8,820 | py | Python | libcity/model/traffic_speed_prediction/DKFN.py | LibCity/Bigscity-LibCity-Docs-zh_CN | 2be639c3fe7d75727ade18f473d6f625900f73f2 | [
"Apache-2.0"
] | 5 | 2021-09-28T12:32:50.000Z | 2022-02-03T09:04:35.000Z | libcity/model/traffic_speed_prediction/DKFN.py | LibCity/Bigscity-LibCity-Docs | 24b7ecb99f29da8794def8f5e7441371ff419329 | [
"Apache-2.0"
] | null | null | null | libcity/model/traffic_speed_prediction/DKFN.py | LibCity/Bigscity-LibCity-Docs | 24b7ecb99f29da8794def8f5e7441371ff419329 | [
"Apache-2.0"
] | 1 | 2021-08-03T08:02:33.000Z | 2021-08-03T08:02:33.000Z | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from torch.nn.parameter import Parameter
from libcity.model import loss
from libcity.model.abstract_traffic_state_model import AbstractTrafficStateModel
class FilterLinear(nn.Module):
def __init__(se... | 43.663366 | 114 | 0.629138 |
ff9e2e3eb40f5143380c5eef3a3e1cd2a12aaea0 | 1,427 | py | Python | examples/AdCreativeNodeRead.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | examples/AdCreativeNodeRead.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | examples/AdCreativeNodeRead.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | 1 | 2018-09-24T14:04:48.000Z | 2018-09-24T14:04:48.000Z | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | 36.589744 | 76 | 0.775053 |
ff9e45572070b47ea875e5607dcf7b186d834b50 | 2,107 | py | Python | examples/facenet_adversarial_faces/set_loader.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 2 | 2019-10-27T03:08:29.000Z | 2019-11-06T11:20:06.000Z | examples/facenet_adversarial_faces/set_loader.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 1 | 2021-03-01T15:06:09.000Z | 2021-03-01T15:06:09.000Z | examples/facenet_adversarial_faces/set_loader.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 1 | 2020-03-10T04:23:54.000Z | 2020-03-10T04:23:54.000Z | import shutil
import os
import lfw
import facenet
import numpy as np
from PIL import Image
pairs_path = "datasets/lfw/pairs.txt"
testset_path = "datasets/lfw/lfw_mtcnnpy_160"
image_size = 160
def save_images(adv, faces1, faces2, size):
save_images_to_folder(adv, size, 'images/adversarial/')
... | 28.863014 | 75 | 0.67869 |
ff9e4aac86119fc547e66004b274e0a65feea762 | 1,164 | py | Python | pylot/loggers/lidar_logger_operator.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | pylot/loggers/lidar_logger_operator.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | pylot/loggers/lidar_logger_operator.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | import open3d as o3d
import pylot.utils
from erdos.op import Op
from erdos.utils import setup_csv_logging, setup_logging
class LidarLoggerOp(Op):
""" Logs point cloud messages."""
def __init__(self, name, flags, log_file_name=None, csv_file_name=None):
super(LidarLoggerOp, self).__init__(name)
... | 32.333333 | 79 | 0.664948 |
ff9ea23106db83b23ec9e179839d0b8b0fd14a74 | 15,186 | py | Python | tensorflow_asr/models/ctc/jasper.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 608 | 2020-10-15T16:11:23.000Z | 2022-03-28T21:23:55.000Z | tensorflow_asr/models/ctc/jasper.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 174 | 2020-10-15T16:14:27.000Z | 2022-03-28T11:48:56.000Z | tensorflow_asr/models/ctc/jasper.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 191 | 2020-10-16T01:24:15.000Z | 2022-03-28T10:30:55.000Z | # Copyright 2020 Huy Le Nguyen (@usimarit)
#
# 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... | 35.731765 | 95 | 0.62393 |
ff9eaec8cedf1a416e408a53d87154eb776cedd9 | 4,017 | py | Python | alipay/aop/api/domain/PaidOuterCardCycleInfoDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/PaidOuterCardCycleInfoDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/PaidOuterCardCycleInfoDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class PaidOuterCardCycleInfoDTO(object):
def __init__(self):
self._alipay_deduct_agreement = None
self._alipay_deduct_product_code = None
self._alipay_deduct_scene = None
... | 34.62931 | 103 | 0.650983 |
ff9ec5ce5425a04570a7f319b1d1d0e933f16220 | 510 | py | Python | yaksh/middleware/user_time_zone.py | patilnayan92/online | 0f9a8d8da5aa84a408a9a8e5825a045f6c86f481 | [
"Python-2.0"
] | 2 | 2019-03-06T02:17:25.000Z | 2019-10-03T17:43:26.000Z | yaksh/middleware/user_time_zone.py | patilnayan92/online | 0f9a8d8da5aa84a408a9a8e5825a045f6c86f481 | [
"Python-2.0"
] | null | null | null | yaksh/middleware/user_time_zone.py | patilnayan92/online | 0f9a8d8da5aa84a408a9a8e5825a045f6c86f481 | [
"Python-2.0"
] | 4 | 2019-02-01T16:10:40.000Z | 2020-08-30T02:44:39.000Z | import pytz
from django.utils import timezone
class TimezoneMiddleware(object):
""" Middleware to get user's timezone and activate timezone
if user timezone is not available default value 'Asia/Kolkata' is activated """
def process_request(self, request):
user = request.user
user_tz ... | 31.875 | 87 | 0.668627 |
ff9ee3879bc744f12ee894d8269b9065282f2842 | 1,240 | py | Python | qnt/exposure.py | anshul96go/toolbox | f60ba0b885eb0eb4786f6e56260073f923a7f844 | [
"MIT"
] | 21 | 2021-03-07T01:10:40.000Z | 2022-03-10T09:15:49.000Z | qnt/exposure.py | anshul96go/toolbox | f60ba0b885eb0eb4786f6e56260073f923a7f844 | [
"MIT"
] | 1 | 2021-03-29T20:25:58.000Z | 2021-03-31T11:32:16.000Z | qnt/exposure.py | anshul96go/toolbox | f60ba0b885eb0eb4786f6e56260073f923a7f844 | [
"MIT"
] | 8 | 2021-03-24T16:25:03.000Z | 2022-02-10T19:58:47.000Z | import qnt.stats as qnstats
import xarray as xr
import numpy as np
def drop_bad_days(weights, max_weight = 0.049):
exposure = qnstats.calc_exposure(weights)
return weights.where(exposure.max('asset') < max_weight).fillna(0)
def mix_weights(primary, secondary, max_weight = 0.049):
primary, secondary = xr... | 29.52381 | 84 | 0.700806 |
ff9ef4e33b2a362152ee658c8bac75ea84fbb682 | 7,700 | py | Python | blinkpy/blinkpy.py | dgomes/blinkpy | 64866eda1ef4b1cdbb5046e0ba61825fe19f7972 | [
"MIT"
] | null | null | null | blinkpy/blinkpy.py | dgomes/blinkpy | 64866eda1ef4b1cdbb5046e0ba61825fe19f7972 | [
"MIT"
] | null | null | null | blinkpy/blinkpy.py | dgomes/blinkpy | 64866eda1ef4b1cdbb5046e0ba61825fe19f7972 | [
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
blinkpy by Kevin Fronczak - A Blink camera Python library.
https://github.com/fronzbot/blinkpy
Original protocol hacking by MattTW :
https://github.com/MattTW/BlinkMonitorProtocol
Published under the MIT license - See LICENSE file for more details.
"Blink Wire-Free HS Home Monitoring & Ale... | 35.321101 | 78 | 0.606104 |
ff9f1b9055f5c7ac4d91261aa8be507fa79d1790 | 1,396 | py | Python | dracoon/user_models.py | Quirinwierer/dracoon-python-api | 7fad8cdb95069fb80069e76c740547f3ad02b910 | [
"Apache-2.0"
] | 3 | 2020-10-05T14:34:46.000Z | 2020-11-27T07:44:57.000Z | dracoon/user_models.py | Quirinwierer/dracoon-python-api | 7fad8cdb95069fb80069e76c740547f3ad02b910 | [
"Apache-2.0"
] | 1 | 2022-02-15T16:01:12.000Z | 2022-02-15T16:01:12.000Z | dracoon/user_models.py | Quirinwierer/dracoon-python-api | 7fad8cdb95069fb80069e76c740547f3ad02b910 | [
"Apache-2.0"
] | 1 | 2021-03-04T08:16:07.000Z | 2021-03-04T08:16:07.000Z | from .user_responses import RoleList
from .users_models import UserAuthData
from pydantic import BaseModel
from typing import List, Optional
from datetime import datetime
from enum import Enum
# required payload for PUT /user/account
class UpdateAccount(BaseModel):
userName: Optional[str]
acceptEULA: Optional[... | 23.661017 | 42 | 0.712034 |
ff9f2b3520c3c9fd23ba8d9eaa194bca27f85f87 | 919 | py | Python | the-comet-that-shook-the-py/backend_test.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 15 | 2020-04-17T12:02:14.000Z | 2022-03-16T03:01:34.000Z | the-comet-that-shook-the-py/backend_test.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 9 | 2020-04-25T01:57:16.000Z | 2020-04-29T11:42:34.000Z | the-comet-that-shook-the-py/backend_test.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 55 | 2020-04-17T12:01:11.000Z | 2021-12-28T10:14:02.000Z | """Unit tests for backend API."""
import backend
def test_check_results_equal_true():
assert(backend.check_results(['abc', 'def', 'ghi'], ['abc', 'def', 'ghi']))
def test_check_results_nequal_false():
assert(not backend.check_results(['abc', 'def', 'ghi'],
['def', 'ghi',... | 34.037037 | 79 | 0.631121 |
ff9f42c27c903a50f4403c5bb6cb544595bbc906 | 451 | py | Python | integration-tests/features/src/stack_analysis_common.py | cnulenka/fabric8-analytics-common | 570bfa69d885543944f90decc23397f546385f69 | [
"Apache-2.0"
] | null | null | null | integration-tests/features/src/stack_analysis_common.py | cnulenka/fabric8-analytics-common | 570bfa69d885543944f90decc23397f546385f69 | [
"Apache-2.0"
] | null | null | null | integration-tests/features/src/stack_analysis_common.py | cnulenka/fabric8-analytics-common | 570bfa69d885543944f90decc23397f546385f69 | [
"Apache-2.0"
] | null | null | null | """Common functions used to test stack analysis API."""
def contains_alternate_node(json_resp):
"""Check for the existence of alternate node in the stack analysis."""
assert json_resp is not None
assert 'result' in json_resp
# read the actual result
result = json_resp.get('result')
return bool... | 37.583333 | 90 | 0.691796 |
ff9f4a3496accf892ccbe4a700950ee143b8b1a6 | 7,886 | py | Python | google/cloud/compute_v1/services/region_url_maps/transports/base.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/region_url_maps/transports/base.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/region_url_maps/transports/base.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 35.363229 | 101 | 0.643419 |
ff9f4cab0d50bca5b568572941d7f985b09b2a1a | 2,534 | py | Python | demo/threadpooltest2.py | spyke/spyke | 20934521de9c557924911cf6190690ac1c6f8e80 | [
"CNRI-Python"
] | 22 | 2015-06-01T03:31:00.000Z | 2022-03-18T09:12:28.000Z | demo/threadpooltest2.py | spyke/spyke | 20934521de9c557924911cf6190690ac1c6f8e80 | [
"CNRI-Python"
] | 3 | 2017-03-24T19:16:02.000Z | 2021-01-27T14:34:30.000Z | demo/threadpooltest2.py | spyke/spyke | 20934521de9c557924911cf6190690ac1c6f8e80 | [
"CNRI-Python"
] | 6 | 2015-07-10T15:28:08.000Z | 2022-03-17T19:30:45.000Z | """Tests threadpool code from http://code.activestate.com/recipes/576519,
saved as spyke.threadpool. Threaded code runs about ncpus times faster than
unthreaded code, yet unlike multiprocessing, allows for shared memory. Only
when you're inside a numpy loop is the GIL released, and multithreading possible.
Or, same goe... | 23.90566 | 81 | 0.706788 |
ff9f72a33ef6d92cd6e7cab3d23fb69a98471f9e | 19,241 | py | Python | skbio/sequence/_genetic_code.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | skbio/sequence/_genetic_code.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | skbio/sequence/_genetic_code.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | 32.778535 | 79 | 0.534744 |
ff9f80e622c12b5fad6c61af89d16a52310009c8 | 3,919 | py | Python | day7/day7.py | tomp/AOC-2020 | c7b8313f883b6285f118d281d99c4b32b0497289 | [
"MIT"
] | null | null | null | day7/day7.py | tomp/AOC-2020 | c7b8313f883b6285f118d281d99c4b32b0497289 | [
"MIT"
] | null | null | null | day7/day7.py | tomp/AOC-2020 | c7b8313f883b6285f118d281d99c4b32b0497289 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Advent of Code 2020 - day 7
#
from pathlib import Path
from collections import defaultdict
from pprint import pprint
import re
INPUTFILE = "input.txt"
SAMPLE_INPUT = """
light red bags contain 1 bright white bag, 2 muted yellow bags.
dark orange bags contain 3 bright white bags, 4 muted y... | 23.751515 | 66 | 0.651952 |
ff9f94efea6ccac9ef4a90b8204e3019c83a43cd | 12,784 | py | Python | gpAux/extensions/gphdfs/regression/legacy/lib/apache_tar_util.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 9 | 2018-04-20T03:31:01.000Z | 2020-05-13T14:10:53.000Z | gpAux/extensions/gphdfs/regression/legacy/lib/apache_tar_util.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 36 | 2017-09-21T09:12:27.000Z | 2020-06-17T16:40:48.000Z | gpAux/extensions/gphdfs/regression/legacy/lib/apache_tar_util.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 32 | 2017-08-31T12:50:52.000Z | 2022-03-01T07:34:53.000Z | """
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the 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
... | 48.241509 | 179 | 0.636968 |
ff9f994f4af50f0678355e73357ae6fa609a20f0 | 2,509 | py | Python | test/PostgresNoSQLDatabaseTest.py | cansik/pg2nosql | d92aab35172194184e58f5ac17ef354d0fa08480 | [
"MIT"
] | 7 | 2015-07-22T13:34:31.000Z | 2020-03-17T08:37:16.000Z | test/PostgresNoSQLDatabaseTest.py | cansik/pg4nosql | d92aab35172194184e58f5ac17ef354d0fa08480 | [
"MIT"
] | 27 | 2015-07-23T05:55:33.000Z | 2015-11-09T20:56:39.000Z | test/PostgresNoSQLDatabaseTest.py | cansik/pg2nosql | d92aab35172194184e58f5ac17ef354d0fa08480 | [
"MIT"
] | 1 | 2019-02-08T16:46:06.000Z | 2019-02-08T16:46:06.000Z | from pg4nosql.PostgresNoSQLClient import PostgresNoSQLClient
from __init__ import TEST_DB_HOST, TEST_DATABASE, TEST_TEMP_DATABASE, TEST_TABLE, TEST_TEMP_TABLE, RELATIONAL_FIELDS, \
TEST_DB_USER, TEST_DB_PASSWORD
__author__ = 'cansik'
import unittest
class PostgresNoSQLDatabaseTest(unittest.TestCase):
def s... | 35.338028 | 119 | 0.732563 |
ffa029908f80c169d7d2ce64ce5b244414d1c6e4 | 3,118 | py | Python | ros1_ws/src/hdf5_data_publisher/scripts/hdf5_pcd_publisher.py | FastSense/rosbot-ros2 | c2d274ce179534fec5b2786a6f96b6d638019ac4 | [
"MIT"
] | null | null | null | ros1_ws/src/hdf5_data_publisher/scripts/hdf5_pcd_publisher.py | FastSense/rosbot-ros2 | c2d274ce179534fec5b2786a6f96b6d638019ac4 | [
"MIT"
] | 2 | 2021-07-05T14:50:09.000Z | 2021-09-14T15:21:11.000Z | ros1_ws/src/hdf5_data_publisher/scripts/hdf5_pcd_publisher.py | FastSense/metalbot | 063c897a16129d9aa88c2c7c52bdf6547af894e4 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
import rospy
from sensor_msgs.msg import PointCloud2, PointField
from geometry_msgs.msg import PoseWithCovarianceStamped, Point, Quaternion
import h5py
import numpy as np
import tf
import cv2
rospy.init_node('hdf5_pcd_publisher')
# Read data from HDF5
hdf5_data_file = '/home/kirill/DTL_project... | 32.821053 | 99 | 0.729955 |
ffa032da56c16c26c97ac97ee0cc5126a5598e11 | 1,720 | py | Python | tests/st/ops/test_fused_bn_update.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/st/ops/test_fused_bn_update.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/st/ops/test_fused_bn_update.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 34.4 | 74 | 0.657558 |
ffa0391940fa94e537ae3e2e0ba7722a7084f1d9 | 4,410 | py | Python | src/train_and_predict.py | isabelladegen/nlp-2021 | 8d89480d06cff9bef807db6c8090afabaeec9208 | [
"BSD-2-Clause"
] | null | null | null | src/train_and_predict.py | isabelladegen/nlp-2021 | 8d89480d06cff9bef807db6c8090afabaeec9208 | [
"BSD-2-Clause"
] | null | null | null | src/train_and_predict.py | isabelladegen/nlp-2021 | 8d89480d06cff9bef807db6c8090afabaeec9208 | [
"BSD-2-Clause"
] | null | null | null | from typing import Any, List
from datasets import Dataset
import random
from gensim.models import KeyedVectors
from gensim.models.doc2vec import Doc2Vec
from src.preprocessing_documents import GroundingDocument
from src.preprocessing_rc import *
from src.evaluate import PredictionsEvaluation
from src.configurations im... | 40.090909 | 103 | 0.678005 |
ffa03954334487a0f8b8514497934f9dc8c88cc6 | 20,209 | py | Python | appcli/orchestrators.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | null | null | null | appcli/orchestrators.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | null | null | null | appcli/orchestrators.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# # -*- coding: utf-8 -*-
"""
Orchestrators for launching docker containers.
________________________________________________________________________________
Created by brightSPARK Labs
www.brightsparklabs.com
"""
# standard libraries
import os
import sys
from pathlib import Path
from subproce... | 37.773832 | 131 | 0.648572 |
ffa082b920fefbf8ee3f022a6544c716e4df6298 | 6,813 | py | Python | ediblepickle.py | mpavan/ediblepickle | 7dca67260caaf8a342ef7197f651c841724d67b0 | [
"Apache-2.0"
] | 8 | 2017-08-10T00:37:36.000Z | 2021-12-31T15:10:36.000Z | ediblepickle.py | mpavan/ediblepickle | 7dca67260caaf8a342ef7197f651c841724d67b0 | [
"Apache-2.0"
] | 4 | 2017-04-02T18:10:17.000Z | 2019-05-30T17:16:04.000Z | ediblepickle.py | mpavan/ediblepickle | 7dca67260caaf8a342ef7197f651c841724d67b0 | [
"Apache-2.0"
] | 3 | 2018-03-05T16:58:35.000Z | 2018-12-05T21:05:11.000Z | ## Copyright 2013 Pavan Mallapragada
##
## 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 ... | 39.610465 | 111 | 0.642155 |
ffa08a58dfe708e3a7a634f85f931199eedfbfcb | 13,474 | py | Python | src/CBigNumber/scripts/rebuild_lib_CBigNumber.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | 3 | 2019-11-26T05:33:47.000Z | 2020-05-18T06:49:41.000Z | src/CBigNumber/scripts/rebuild_lib_CBigNumber.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | null | null | null | src/CBigNumber/scripts/rebuild_lib_CBigNumber.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | 1 | 2020-06-03T03:27:27.000Z | 2020-06-03T03:27:27.000Z | #!python3
# -*- coding:utf-8 -*-
import os
import sys
import time
import ctypes
import shutil
import subprocess
IsPy3 = sys.version_info[0] >= 3
if IsPy3:
import winreg
else:
import codecs
import _winreg as winreg
BuildType = 'Release'
IsRebuild = True
Build = 'Rebuild'
Update = False
C... | 39.282799 | 178 | 0.582678 |
ffa09ec65f1da0b45815052d5d4bd26b95360828 | 7,715 | py | Python | instana/__init__.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 61 | 2017-09-27T02:50:17.000Z | 2022-03-22T12:13:37.000Z | instana/__init__.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 82 | 2017-07-11T13:47:33.000Z | 2022-03-22T10:10:38.000Z | instana/__init__.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 27 | 2017-09-11T16:22:32.000Z | 2022-03-11T17:21:49.000Z | # coding=utf-8
"""
▀████▀███▄ ▀███▀▄█▀▀▀█▄███▀▀██▀▀███ ██ ▀███▄ ▀███▀ ██
██ ███▄ █ ▄██ ▀█▀ ██ ▀█ ▄██▄ ███▄ █ ▄██▄
██ █ ███ █ ▀███▄ ██ ▄█▀██▄ █ ███ █ ▄█▀██▄
██ █ ▀██▄ █ ▀█████▄ ██ ▄█ ▀██ █ ▀██▄ █ ▄█ ▀██
██ █ ▀██▄█... | 37.270531 | 113 | 0.638756 |
ffa0ab21d914c4a120fe807c07405a2799106808 | 2,696 | py | Python | tests/compile/test_backend.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 222 | 2019-02-13T07:56:28.000Z | 2022-03-28T07:07:54.000Z | tests/compile/test_backend.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 107 | 2019-02-12T21:56:39.000Z | 2022-03-12T01:08:03.000Z | tests/compile/test_backend.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 27 | 2017-11-14T17:58:15.000Z | 2019-01-14T01:36:09.000Z | import pytest
from myia.compile.backends import (
LoadingError,
UnknownBackend,
load_backend,
parse_default,
prim_groups as G,
)
from myia.operations import (
array_reduce,
array_to_scalar,
reshape,
scalar_add,
scalar_to_array,
)
from myia.testing.common import AN, MA
from myia.... | 19.678832 | 80 | 0.643917 |
ffa0ad7a5a54f14c4f86782f8385d963d59e7554 | 7,911 | py | Python | Code/GetDataFromBusRoute.py | gzyszuuow/BusBunching | e9b01a62e422ae6525d9287bdf46c25aacdf9c6c | [
"Apache-2.0"
] | null | null | null | Code/GetDataFromBusRoute.py | gzyszuuow/BusBunching | e9b01a62e422ae6525d9287bdf46c25aacdf9c6c | [
"Apache-2.0"
] | null | null | null | Code/GetDataFromBusRoute.py | gzyszuuow/BusBunching | e9b01a62e422ae6525d9287bdf46c25aacdf9c6c | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pandas as pd
from pandas import DataFrame, Series
import random
import time
import math
import datetime as dt
import random
import copy
from datetime import datetime
from time import mktime
import os
import json
busid = 412
path = "C:\\Users\\bdu\\Desktop\\gzy\\BusBunching\\Bus... | 38.590244 | 187 | 0.593477 |
ffa0ed154eebaa51bedb45e4a6aa03b95275a936 | 4,162 | py | Python | design_pattern/repository/run.py | AustinHellerRepo/DesignPatternDemo | 2409315eb7494ff738e64e1ca51206fb46083040 | [
"MIT"
] | null | null | null | design_pattern/repository/run.py | AustinHellerRepo/DesignPatternDemo | 2409315eb7494ff738e64e1ca51206fb46083040 | [
"MIT"
] | null | null | null | design_pattern/repository/run.py | AustinHellerRepo/DesignPatternDemo | 2409315eb7494ff738e64e1ca51206fb46083040 | [
"MIT"
] | null | null | null | from design_pattern.repository.implementation import MemoryDatabaseInterface, MemoryDatabaseInterfaceException, RepositoryException, UserRepository, User, OrderRepository, Order
from typing import List
# instantiate the database interface
_database_interface = MemoryDatabaseInterface()
# create the repositories
_use... | 30.379562 | 177 | 0.679241 |
ffa0fefc0bd1d048b8f0db00b89341075f66e9c2 | 6,487 | py | Python | apps/blog/migrations/0008_auto__del_field_blog_published__add_field_blog_status.py | Profeel/django_blog | 6c86c0e4c3b3b122317bbb24a43ded4cb32724d9 | [
"Apache-2.0"
] | 1 | 2016-03-07T00:38:52.000Z | 2016-03-07T00:38:52.000Z | apps/blog/migrations/0008_auto__del_field_blog_published__add_field_blog_status.py | Profeel/django_blog | 6c86c0e4c3b3b122317bbb24a43ded4cb32724d9 | [
"Apache-2.0"
] | null | null | null | apps/blog/migrations/0008_auto__del_field_blog_published__add_field_blog_status.py | Profeel/django_blog | 6c86c0e4c3b3b122317bbb24a43ded4cb32724d9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Blog.published'
db.delete_column(u'blog_blog... | 66.876289 | 196 | 0.551873 |
ffa10366fe33ea9beaefab26076d7876d4442eb8 | 24,083 | py | Python | tests/test_meta_learner.py | zhengying-liu/mlt | 6fd704c72c24a0128e092c1087de97ef341347ea | [
"Apache-2.0"
] | null | null | null | tests/test_meta_learner.py | zhengying-liu/mlt | 6fd704c72c24a0128e092c1087de97ef341347ea | [
"Apache-2.0"
] | null | null | null | tests/test_meta_learner.py | zhengying-liu/mlt | 6fd704c72c24a0128e092c1087de97ef341347ea | [
"Apache-2.0"
] | null | null | null | # Author: Zhengying Liu
# Creation date: 4 Dec 2020
from mlt.meta_learner import RandomSearchMetaLearner
from mlt.meta_learner import MeanMetaLearner
from mlt.meta_learner import GreedyMetaLearner
from mlt.meta_learner import OptimalMetaLearner
from mlt.meta_learner import TopkRankMetaLearner
from mlt.meta_learner imp... | 30.836108 | 88 | 0.60632 |
ffa10d7d0bbb276a9bf6466741ac163a45cdab60 | 864 | py | Python | ghwht/hooks/member.py | flyingdice/github-webhook-types | 38edff89ec3ce809a510328463a43d7bea56ae36 | [
"Apache-2.0"
] | null | null | null | ghwht/hooks/member.py | flyingdice/github-webhook-types | 38edff89ec3ce809a510328463a43d7bea56ae36 | [
"Apache-2.0"
] | null | null | null | ghwht/hooks/member.py | flyingdice/github-webhook-types | 38edff89ec3ce809a510328463a43d7bea56ae36 | [
"Apache-2.0"
] | null | null | null | """
ghwht/hooks/member
~~~~~~~~~~~~~~~~~~
Contains types for the 'member' webhook.
https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/webhook-events-and-payloads#member
"""
from typing import Optional
from pydantic import dataclasses
from . import base, common
class Act... | 21.073171 | 117 | 0.709491 |
ffa1248d26351ec214c4a8ca797137dac7261de7 | 417 | py | Python | scrap_tools/facebook/models.py | borismnq/scraping-tools | 2d91e7fe8c51a4cf87a50af64e9a4da2d49bfa31 | [
"MIT"
] | null | null | null | scrap_tools/facebook/models.py | borismnq/scraping-tools | 2d91e7fe8c51a4cf87a50af64e9a4da2d49bfa31 | [
"MIT"
] | null | null | null | scrap_tools/facebook/models.py | borismnq/scraping-tools | 2d91e7fe8c51a4cf87a50af64e9a4da2d49bfa31 | [
"MIT"
] | null | null | null | from django.db import models
class Facebook(models.Model):
shared = models.CharField(max_length=255)
shared_id = models.CharField(max_length=255)
original = models.CharField(max_length=255)
original_id = models.CharField(max_length=255)
created = models.DateTimeField(auto_now_add=True)
modifi... | 27.8 | 53 | 0.743405 |
ffa1464339fc94f66bcd15ab762524b7b9ed8877 | 36,876 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/models/_models_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/models/_models_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/models/_models_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 28.786885 | 120 | 0.576039 |
ffa18e830a1855910d929fbcd9cd4b887444f5ae | 361 | py | Python | code/project-euler/src/015.py | taseikyo/til | 8f703e69a49cbd9854062b102ba307c775d43a56 | [
"MIT"
] | 1 | 2021-09-01T14:39:12.000Z | 2021-09-01T14:39:12.000Z | code/project-euler/src/015.py | taseikyo/til | 8f703e69a49cbd9854062b102ba307c775d43a56 | [
"MIT"
] | null | null | null | code/project-euler/src/015.py | taseikyo/til | 8f703e69a49cbd9854062b102ba307c775d43a56 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2019-07-11 15:34:12
# @Author : Lewis Tian (taseikyo@gmail.com)
# @Link : github.com/taseikyo
# @Version : Python3.7
# https://projecteuler.net/problem=15
from pylib import Combination
def main():
return Combination(40, 20)
if __name__ == "__main_... | 18.05 | 44 | 0.642659 |
ffa1b5712c2a47fecee7871c021892759076efca | 1,537 | py | Python | tests/_tests_cv_classification/experiment.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | null | null | null | tests/_tests_cv_classification/experiment.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | null | null | null | tests/_tests_cv_classification/experiment.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | 1 | 2018-12-21T15:56:21.000Z | 2018-12-21T15:56:21.000Z | from collections import OrderedDict
import torchvision
from torchvision import transforms
from catalyst.dl import ConfigExperiment
class Experiment(ConfigExperiment):
"""
@TODO: Docs. Contribution is welcome
"""
@staticmethod
def get_transforms(stage: str = None, mode: str = None):
"""
... | 27.945455 | 79 | 0.538061 |
ffa1ba2c5839e915bf5e76a60e442bea6b4654f8 | 713 | py | Python | setup.py | trypolis/putils | f14f74692ae07d77fa19b2f6d38c96bec05ba2c8 | [
"MIT"
] | null | null | null | setup.py | trypolis/putils | f14f74692ae07d77fa19b2f6d38c96bec05ba2c8 | [
"MIT"
] | null | null | null | setup.py | trypolis/putils | f14f74692ae07d77fa19b2f6d38c96bec05ba2c8 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
__version__ = 0.1
with open("readme.md", "r") as f:
long_description = f.read()
setup(
name="PUtils",
version=__version__,
author="Ty Gillespie",
author_email="tygillespie6@gmail.com",
description="A huge library of Python functions.",
long_des... | 26.407407 | 54 | 0.659187 |
ffa1e39b6548cc6683467a2b392221df34ad4fa2 | 1,893 | py | Python | migrations/versions/94d5abf29c78_initial_migration.py | Kipkorir-Gideon/60secs-impression | 2222d1e1db251ef1d1ae0aada476bd2aeedbf39d | [
"MIT"
] | null | null | null | migrations/versions/94d5abf29c78_initial_migration.py | Kipkorir-Gideon/60secs-impression | 2222d1e1db251ef1d1ae0aada476bd2aeedbf39d | [
"MIT"
] | null | null | null | migrations/versions/94d5abf29c78_initial_migration.py | Kipkorir-Gideon/60secs-impression | 2222d1e1db251ef1d1ae0aada476bd2aeedbf39d | [
"MIT"
] | null | null | null | """Initial Migration
Revision ID: 94d5abf29c78
Revises: 542fe9a9b0fa
Create Date: 2021-11-08 20:21:01.370918
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '94d5abf29c78'
down_revision = '542fe9a9b0fa'
branch_labels = None
depends_on = None
def upgrade():
... | 34.418182 | 90 | 0.674591 |
ffa1e44494dd86b060e0a8b8737dc83bd19923ad | 3,315 | py | Python | src/gui/buffered_window.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | 1 | 2018-06-15T09:42:22.000Z | 2018-06-15T09:42:22.000Z | src/gui/buffered_window.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | src/gui/buffered_window.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | import wx
# This has been set up to optionally use the wxBufferedDC if
# USE_BUFFERED_DC is True, it will be used. Otherwise, it uses the raw
# wxMemory DC , etc.
USE_BUFFERED_DC = 1
class BufferedWindow(wx.Panel):
"""
A Buffered window class.
To use it, subclass it and define a Draw(DC)... | 34.53125 | 84 | 0.6181 |
ffa1e4e62b9b16968d8bdbc0afcb001cf59f5382 | 4,887 | py | Python | add_text_to_conllu.py | spyysalo/add-text-to-conllu | 654a3df39d623876a35fcb31549cb8f0761870cb | [
"MIT"
] | 1 | 2019-05-14T00:40:55.000Z | 2019-05-14T00:40:55.000Z | add_text_to_conllu.py | spyysalo/add-text-to-conllu | 654a3df39d623876a35fcb31549cb8f0761870cb | [
"MIT"
] | null | null | null | add_text_to_conllu.py | spyysalo/add-text-to-conllu | 654a3df39d623876a35fcb31549cb8f0761870cb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
import re
from logging import warning, error
# TODO: complete
PTB_UNESCAPES = {
'``': '"',
"''": '"',
'-LRB-': '(',
'-RRB-': ')',
'-LSB-': '[',
'-RSB-': ']',
}
class Word(object):
def __init__(self, id_, form, lemma, upos, xpos, feats, head, ... | 30.166667 | 79 | 0.553919 |
ffa1f0567a829954c45bd16228b41f6ff7e3b3c4 | 7,376 | py | Python | grouper/fe/routes.py | lfaraone/grouper | 7df5eda8003a0b4a9ba7f0dcb044ae1e4710b171 | [
"Apache-2.0"
] | null | null | null | grouper/fe/routes.py | lfaraone/grouper | 7df5eda8003a0b4a9ba7f0dcb044ae1e4710b171 | [
"Apache-2.0"
] | 1 | 2016-02-18T18:55:29.000Z | 2016-02-18T18:55:29.000Z | grouper/fe/routes.py | lfaraone/grouper | 7df5eda8003a0b4a9ba7f0dcb044ae1e4710b171 | [
"Apache-2.0"
] | null | null | null | from grouper.constants import (
NAME2_VALIDATION,
NAME_VALIDATION,
PERMISSION_VALIDATION,
USERNAME_VALIDATION,
)
from grouper.fe.handlers.audits_complete import AuditsComplete
from grouper.fe.handlers.audits_create import AuditsCreate
from grouper.fe.handlers.audits_view import A... | 47.282051 | 99 | 0.730613 |
ffa216e83ea56c7bce15c7c3716a23696b3ff7a7 | 5,767 | py | Python | tests/CNN/t02b_compare_PCA_idx.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | tests/CNN/t02b_compare_PCA_idx.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | tests/CNN/t02b_compare_PCA_idx.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
import pickle
import tensorflow as tf
from utils.load_config import load_config
from utils.load_data import load_data
from utils.feature_reduction import load_feature_selection
from utils.Semantic.SemanticFeatureSelection import SemanticFeatureSelection
from utils.extraction_model import l... | 33.33526 | 118 | 0.610369 |
ffa220b878b2e907701251220f32cb25305805ef | 23,422 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_vmware/network/nsx/nsxv/api/api.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_vmware/network/nsx/nsxv/api/api.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_vmware/network/nsx/nsxv/api/api.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 VMware, 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... | 39.101836 | 78 | 0.617923 |
ffa234cab7ef3bfaec759de9307d083b729f6776 | 12,269 | py | Python | rlkit/core/logging.py | naomilwx/rlkit | d4514f89e4cef0a93a936c4f6b34b2099ae3a523 | [
"MIT"
] | null | null | null | rlkit/core/logging.py | naomilwx/rlkit | d4514f89e4cef0a93a936c4f6b34b2099ae3a523 | [
"MIT"
] | null | null | null | rlkit/core/logging.py | naomilwx/rlkit | d4514f89e4cef0a93a936c4f6b34b2099ae3a523 | [
"MIT"
] | null | null | null | """
Based on rllab's logger.
https://github.com/rll/rllab
"""
from enum import Enum
from contextlib import contextmanager
import numpy as np
import os
import os.path as osp
import sys
import datetime
import dateutil.tz
import csv
import json
import pickle
import errno
import torch
from collections import OrderedDict
... | 34.954416 | 99 | 0.591409 |
ffa246ea80953d19b9769bf895b1f0f01df12e21 | 4,868 | py | Python | poppurri/mixture/migrations/0002_auto__add_field_mixture_valoration.py | ariel17/poppurri | 56c2f7ec96402e96776b928cd8be5454f7c2ab67 | [
"MIT"
] | null | null | null | poppurri/mixture/migrations/0002_auto__add_field_mixture_valoration.py | ariel17/poppurri | 56c2f7ec96402e96776b928cd8be5454f7c2ab67 | [
"MIT"
] | 12 | 2017-06-01T13:15:33.000Z | 2017-06-01T13:15:35.000Z | poppurri/mixture/migrations/0002_auto__add_field_mixture_valoration.py | ariel17/poppurri | 56c2f7ec96402e96776b928cd8be5454f7c2ab67 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Mixture.valoration'
db.add_column(u'mixture_mixture', 'va... | 64.052632 | 195 | 0.571076 |
ffa24cfd9376cfa90cf6b97678295062d1eaf004 | 10,639 | py | Python | openpype/hosts/standalonepublisher/plugins/publish/collect_editorial_resources.py | yosuperdope/OpenPype | 0c90df97ddb8cda291a4f66d35da58b3deb94a71 | [
"MIT"
] | 44 | 2019-03-19T04:56:35.000Z | 2021-04-23T12:05:08.000Z | openpype/hosts/standalonepublisher/plugins/publish/collect_editorial_resources.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | 655 | 2020-03-17T15:10:21.000Z | 2021-04-23T18:22:52.000Z | openpype/hosts/standalonepublisher/plugins/publish/collect_editorial_resources.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | 21 | 2019-03-19T04:56:38.000Z | 2021-04-23T09:10:59.000Z | import os
import re
import tempfile
import pyblish.api
from copy import deepcopy
import clique
class CollectInstanceResources(pyblish.api.InstancePlugin):
"""Collect instance's resources"""
# must be after `CollectInstances`
order = pyblish.api.CollectorOrder + 0.011
label = "Collect Editorial Resour... | 39.258303 | 77 | 0.561049 |
ffa2cf4b2f36ad9cee042b06d472b4a264d547ed | 298 | py | Python | test/unit/file_lock/__init__.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | test/unit/file_lock/__init__.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | test/unit/file_lock/__init__.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | ######################################################################
#
# File: test/unit/file_lock/__init__.py
#
# Copyright 2021 Backblaze Inc. All Rights Reserved.
#
# License https://www.backblaze.com/using_b2_code.html
#
######################################################################
| 29.8 | 70 | 0.392617 |
ffa2d086a8a169b206ebef9230b2e07ad85db2d5 | 1,190 | py | Python | app/main/views.py | Geerocktricks/News_journal | 67b337bb7f082b772fbf5f45082e149e269d1023 | [
"MIT"
] | null | null | null | app/main/views.py | Geerocktricks/News_journal | 67b337bb7f082b772fbf5f45082e149e269d1023 | [
"MIT"
] | null | null | null | app/main/views.py | Geerocktricks/News_journal | 67b337bb7f082b772fbf5f45082e149e269d1023 | [
"MIT"
] | null | null | null | from flask import render_template,request,redirect,url_for
from . import main
from ..request import get_sources , get_articles
# Views
@main.route('/')
def index():
'''
View root page function that returns the page and and its data
'''
# Getting breaking news source
general_source = get_sources('g... | 36.060606 | 224 | 0.716807 |
ffa2f038ee14a6903e5958acfaafdd1e97512582 | 10,385 | py | Python | armi/physics/neutronics/fissionProductModel/tests/test_lumpedFissionProduct.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/physics/neutronics/fissionProductModel/tests/test_lumpedFissionProduct.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/physics/neutronics/fissionProductModel/tests/test_lumpedFissionProduct.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 TerraPower, 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 writi... | 35.565068 | 87 | 0.641502 |
ffa301772944277b2b822cabc2f99e639f1a1a67 | 1,545 | py | Python | python_solutions/CLEAN_UP_THE_WORDS/CLEAN_UP_THE_WORDS.py | joelstanner/codeeval | ef0591fabcad39d45f10287d7a1330f342ab96e0 | [
"MIT"
] | null | null | null | python_solutions/CLEAN_UP_THE_WORDS/CLEAN_UP_THE_WORDS.py | joelstanner/codeeval | ef0591fabcad39d45f10287d7a1330f342ab96e0 | [
"MIT"
] | null | null | null | python_solutions/CLEAN_UP_THE_WORDS/CLEAN_UP_THE_WORDS.py | joelstanner/codeeval | ef0591fabcad39d45f10287d7a1330f342ab96e0 | [
"MIT"
] | null | null | null | """
CLEAN UP THE WORDS
CHALLENGE DESCRIPTION:
You have a list of words. Letters of these words are mixed with extra symbols,
so it is hard to define the beginning and end of each word. Write a program
that will clean up the words from extra numbers and symbols.
INPUT SAMPLE:
The first argument is a path to a file. E... | 26.637931 | 79 | 0.699029 |
ffa33ba35eccb90ab33cdc8c2bd009dd2c24bac9 | 2,805 | py | Python | src/t_sne.py | abarthakur/clustering_riedel_dataset | 3f74d3979796bdc70af4dd03df65d790055f73f6 | [
"MIT"
] | 9 | 2017-12-04T15:01:37.000Z | 2019-05-19T14:22:45.000Z | src/t_sne.py | abarthakur/clustering_riedel_dataset | 3f74d3979796bdc70af4dd03df65d790055f73f6 | [
"MIT"
] | null | null | null | src/t_sne.py | abarthakur/clustering_riedel_dataset | 3f74d3979796bdc70af4dd03df65d790055f73f6 | [
"MIT"
] | 2 | 2018-07-14T03:18:18.000Z | 2022-02-21T09:22:18.000Z | import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from sklearn.manifold import TSNE
import numpy as np
def tsne_viz(mat, rownames, use_pca=True, learning_rate=1000, n_iter=1000,colors=None, output_filename=None, figheight=40, figwidth=50):
"""2d plot of `mat` using t-SNE, with the points l... | 41.865672 | 141 | 0.633155 |
ffa3837cae1525e28d6be813332465ee51be2507 | 11,467 | py | Python | pollination_sdk/models/dag_number_input_alias.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 2 | 2020-01-30T23:28:59.000Z | 2020-05-06T16:43:47.000Z | pollination_sdk/models/dag_number_input_alias.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 1 | 2020-10-02T18:00:25.000Z | 2020-10-02T18:00:25.000Z | pollination_sdk/models/dag_number_input_alias.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
pollination-server
Pollination Server OpenAPI Definition # noqa: E501
The version of the OpenAPI document: 0.16.0
Contact: info@pollination.cloud
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from pollination_sdk.configu... | 32.576705 | 213 | 0.615244 |
ffa3b8210fe295d2eade8451412bc1b121f8e150 | 5,782 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.256 | 197 | 0.680733 |
ffa3f733a8224b13870247d45f91ce28cc5ee044 | 8,816 | py | Python | tests/unit/industry/test_facility.py | eve-basil/calculib | 217e15809c89e77bf22d30ad5a19490085094acb | [
"Apache-2.0"
] | null | null | null | tests/unit/industry/test_facility.py | eve-basil/calculib | 217e15809c89e77bf22d30ad5a19490085094acb | [
"Apache-2.0"
] | null | null | null | tests/unit/industry/test_facility.py | eve-basil/calculib | 217e15809c89e77bf22d30ad5a19490085094acb | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
import pytest
from mock import patch
from tests import *
import basil.industry.facility as f
@pytest.fixture(scope="module")
def system():
url = "https://public-crest.eveonline.com/solarsystems/30002054/"
return {"systemCostIndices":
[{"costIndex": 0.001, ... | 42.181818 | 79 | 0.617173 |
ffa41b98ae7ef000a629c159d2a38186b1e5f9d9 | 5,822 | py | Python | player.py | calitaz/tibia_discord_bot | 37fea225fe7018146336b1893bdf621b29a2bbbe | [
"MIT"
] | null | null | null | player.py | calitaz/tibia_discord_bot | 37fea225fe7018146336b1893bdf621b29a2bbbe | [
"MIT"
] | null | null | null | player.py | calitaz/tibia_discord_bot | 37fea225fe7018146336b1893bdf621b29a2bbbe | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import urllib3
class Player:
def __init__(self, character_name: str):
self.__character_name = character_name
self.__character_url = "https://www.tibia.com/community/?subtopic=characters"
@property
def character_name(self):
return self.__character_name
... | 35.5 | 114 | 0.559258 |
ffa443509a93a34ed471387a618a61abed1484d9 | 1,261 | py | Python | artemis/ml/tools/test_processors.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | artemis/ml/tools/test_processors.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | artemis/ml/tools/test_processors.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-10-16T21:21:59.000Z | 2022-03-07T22:18:44.000Z | import numpy as np
import pytest
from six.moves import xrange
from artemis.ml.tools.running_averages import RunningAverage, RecentRunningAverage
__author__ = 'peter'
def test_running_average():
inp = np.arange(5)
processor = RunningAverage()
out = [processor(el) for el in inp]
assert out == [0, 0.5... | 28.659091 | 112 | 0.692308 |
ffa49bbf687f23175d6a61b2bccbcf252dac03a9 | 2,803 | py | Python | 2019/5/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | 2 | 2020-12-04T09:45:38.000Z | 2020-12-07T14:06:12.000Z | 2019/5/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null | 2019/5/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null | file_name = "input"
input = 5
with open(file_name + ".txt") as input_file:
program = input_file.readlines()[0].split(",")
program = [int(c) for c in program]
def process_opcode(opcode):
zero_string = str(opcode).zfill(5)
m3, m2, m1, *instruction = zero_string
return int(m3), int(m2), int(m1), int(... | 26.951923 | 63 | 0.542633 |
ffa4b785b1f7137f5ae20061d8188a9f8151c6cd | 4,922 | py | Python | ExtentionPackages/pysnmp/hlapi/asyncore/transport.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | ExtentionPackages/pysnmp/hlapi/asyncore/transport.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | ExtentionPackages/pysnmp/hlapi/asyncore/transport.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | #
# This file is part of pysnmp software.
#
# Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net>
# License: http://pysnmp.sf.net/license.html
#
import socket, sys
from pysnmp.carrier.asyncore.dgram import udp, udp6, unix
from pysnmp.hlapi.transport import AbstractTransportTarget
from pysnmp import error
__all__ = [... | 41.711864 | 141 | 0.644453 |
ffa5158e9dad34a6d0cc30e219aa4ab550bb5d43 | 1,903 | py | Python | nova/api/openstack/compute/versionsV21.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2016-04-28T16:20:38.000Z | 2021-04-25T11:19:03.000Z | nova/api/openstack/compute/versionsV21.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 11 | 2017-06-19T01:28:55.000Z | 2017-06-23T02:01:47.000Z | nova/api/openstack/compute/versionsV21.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2020-04-08T20:24:45.000Z | 2020-10-05T19:02:13.000Z | # Copyright 2013 IBM Corp.
# 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 app... | 31.716667 | 78 | 0.666842 |
ffa523d2fe7143a98b135d15913272ad6ee665f7 | 839 | py | Python | Sklearn_scipy_numpy/source/sklearn/decomposition/setup.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 4 | 2018-01-21T21:18:35.000Z | 2022-03-23T21:57:56.000Z | Sklearn_scipy_numpy/source/sklearn/decomposition/setup.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | Sklearn_scipy_numpy/source/sklearn/decomposition/setup.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2020-05-07T11:04:14.000Z | 2020-05-07T11:04:14.000Z | import os
import numpy
from numpy.distutils.misc_util import Configuration
def configuration(parent_package="", top_path=None):
config = Configuration("decomposition", parent_package, top_path)
libraries = []
if os.name == 'posix':
libraries.append('m')
config.add_extension("_online_lda",
... | 27.966667 | 69 | 0.594756 |
ffa55d38ae607452d8bdb691b63d3e3666cb8ce9 | 502 | py | Python | mmaction/version.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | 1,870 | 2020-07-11T09:33:46.000Z | 2022-03-31T13:21:36.000Z | mmaction/version.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | 1,285 | 2020-07-11T11:18:57.000Z | 2022-03-31T08:41:17.000Z | mmaction/version.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | 557 | 2020-07-11T09:51:57.000Z | 2022-03-31T13:21:35.000Z | # Copyright (c) Open-MMLab. All rights reserved.
__version__ = '0.20.0'
def parse_version_info(version_str):
version_info = []
for x in version_str.split('.'):
if x.isdigit():
version_info.append(int(x))
elif x.find('rc') != -1:
patch_version = x.split('rc')
... | 26.421053 | 56 | 0.629482 |
ffa5727a7afd2b9cf1041e5deb41fc081f9874a2 | 6,399 | py | Python | exercises/house_price_prediction.py | snatchysquid/IML.HUJI | 4742dd4a3526577e3c297455440cafd4fb3497e9 | [
"MIT"
] | null | null | null | exercises/house_price_prediction.py | snatchysquid/IML.HUJI | 4742dd4a3526577e3c297455440cafd4fb3497e9 | [
"MIT"
] | null | null | null | exercises/house_price_prediction.py | snatchysquid/IML.HUJI | 4742dd4a3526577e3c297455440cafd4fb3497e9 | [
"MIT"
] | null | null | null | from IMLearn.utils import split_train_test
from IMLearn.learners.regressors import LinearRegression
from typing import NoReturn
import numpy as np
import pandas as pd
import plotly.graph_objects as go
import plotly.express as px
import plotly.io as pio
pio.templates.default = "simple_white"
from plotly.subplots impor... | 36.152542 | 113 | 0.628848 |
ffa592e7b121b4ded1b6f1d5f984c6207940f374 | 5,542 | py | Python | src/buildstream/_protos/google/rpc/code_pb2.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/_protos/google/rpc/code_pb2.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/_protos/google/rpc/code_pb2.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/rpc/code.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from googl... | 36.460526 | 792 | 0.748647 |
ffa5a1fa7069a4b29010a18aff4ae6724d484ecc | 1,324 | py | Python | modules/gram_matrix.py | zhangguobin/fast-neural-style | eefdcc3b6ba5e92bbad24cd20999c71dde4df072 | [
"MIT"
] | null | null | null | modules/gram_matrix.py | zhangguobin/fast-neural-style | eefdcc3b6ba5e92bbad24cd20999c71dde4df072 | [
"MIT"
] | null | null | null | modules/gram_matrix.py | zhangguobin/fast-neural-style | eefdcc3b6ba5e92bbad24cd20999c71dde4df072 | [
"MIT"
] | null | null | null | import tensorflow as tf
# see the paper A Neural Algorithm of Artistic Style
# by Leon A. Gatys, Alexander S. Ecker, and Matthias Bethge
def gram_matrix(features, normalize=True):
"""
Compute the Gram matrix from features.
The Gram matrix is an approximation to the covariance matrix
-- we want the act... | 42.709677 | 76 | 0.685801 |
ffa5a3bda8f4a139b6368cd9e2b3834995d82272 | 485 | py | Python | alipay/aop/api/response/AlipayCommerceLogisticsWaybillStatusSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayCommerceLogisticsWaybillStatusSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayCommerceLogisticsWaybillStatusSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayCommerceLogisticsWaybillStatusSyncResponse(AlipayResponse):
def __init__(self):
super(AlipayCommerceLogisticsWaybillStatusSyncResponse, self).__init__()
def parse... | 30.3125 | 121 | 0.8 |
ffa5a8fb1ccc78989a3d0e009ca24cfd5962be85 | 2,203 | py | Python | quickmail/commands/__init__.py | avikumar15/quick-mail-cli | 4282fb62794671de89d5d8efc3697b0a0d540230 | [
"MIT"
] | 7 | 2021-03-20T06:22:44.000Z | 2021-11-03T14:43:18.000Z | quickmail/commands/__init__.py | avikumar15/quick-email-cli | 4282fb62794671de89d5d8efc3697b0a0d540230 | [
"MIT"
] | 2 | 2021-11-04T03:21:57.000Z | 2021-11-04T03:24:06.000Z | quickmail/commands/__init__.py | avikumar15/quick-mail-cli | 4282fb62794671de89d5d8efc3697b0a0d540230 | [
"MIT"
] | null | null | null | import inspect
from contextlib import suppress
from argparse import ArgumentParser, Namespace
from typing import Dict
from zope.interface import Interface, implementer
from zope.interface.exceptions import Invalid, MultipleInvalid
from quickmail.utils.misc import walk_modules, command_dir_path
class ICommand(Interf... | 32.880597 | 107 | 0.657739 |
ffa5e315786dcf77670f920e68914c3c64e7fd12 | 6,389 | py | Python | NavPython/IronPython/Lib/_weakrefset.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | 319 | 2015-01-02T11:34:16.000Z | 2022-03-25T00:43:33.000Z | NavPython/IronPython/Lib/_weakrefset.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | 20 | 2015-04-20T12:09:12.000Z | 2022-03-12T01:25:04.000Z | NavPython/IronPython/Lib/_weakrefset.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | 299 | 2015-01-23T10:06:24.000Z | 2022-02-02T06:34:51.000Z | # Access WeakSet through the weakref module.
# This code is separated-out because it is needed
# by abc.py to load everything else at startup.
from _weakref import ref
__all__ = ['WeakSet']
class _IterationGuard(object):
# This context manager registers itself in the current iterators of the
# weak containe... | 29.442396 | 78 | 0.59352 |
ffa617ac9087d03a666a2cf85eadbc454e4151b3 | 324 | py | Python | app/core/migrations/0003_remove_user_coordinates.py | siddharthmudgal/idres-gait | b9500d4eab34a72e8f877ca4f0593a335e5b3fd7 | [
"MIT"
] | null | null | null | app/core/migrations/0003_remove_user_coordinates.py | siddharthmudgal/idres-gait | b9500d4eab34a72e8f877ca4f0593a335e5b3fd7 | [
"MIT"
] | null | null | null | app/core/migrations/0003_remove_user_coordinates.py | siddharthmudgal/idres-gait | b9500d4eab34a72e8f877ca4f0593a335e5b3fd7 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-04-30 04:32
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0002_user_coordinates'),
]
operations = [
migrations.RemoveField(
model_name='user',
name='coordinates',
),
... | 18 | 45 | 0.589506 |
ffa621e5f33cc4c7a0b85f4cfe53b7bc1031e131 | 2,170 | py | Python | parse_victor70c.py | bborncr/Victor70C-Tools | 3f292bd1e5cd1edb1ee899f8041c2e1835a5f35e | [
"MIT"
] | 2 | 2020-04-01T05:06:36.000Z | 2020-08-08T23:55:02.000Z | parse_victor70c.py | bborncr/Victor70C-Tools | 3f292bd1e5cd1edb1ee899f8041c2e1835a5f35e | [
"MIT"
] | null | null | null | parse_victor70c.py | bborncr/Victor70C-Tools | 3f292bd1e5cd1edb1ee899f8041c2e1835a5f35e | [
"MIT"
] | null | null | null | def parse_victor70c(data):
# URL for RS232 port datasheet https://www.ic-fortune.com/upload/Download/FS9922-DMM4-DS-13_EN.pdf
"""
Parse a data line from a Victor 70C digital multimeter
The Victor 70C outputs at 2400 BAUD at 1 second intervals,
each line of data is terminated by a new line
A... | 27.468354 | 102 | 0.531797 |
ffa6625efdbfc15d12be038b058e389069a18651 | 3,436 | py | Python | m_or_f_gender.py | matejcrnac/Face_deidentification_kazemi | 434fff49b5a7b555bb3c56a62915fd502e0b75f9 | [
"MIT"
] | 1 | 2019-03-27T10:30:54.000Z | 2019-03-27T10:30:54.000Z | m_or_f_gender.py | matejcrnac/Face_deidentification_kazemi | 434fff49b5a7b555bb3c56a62915fd502e0b75f9 | [
"MIT"
] | null | null | null | m_or_f_gender.py | matejcrnac/Face_deidentification_kazemi | 434fff49b5a7b555bb3c56a62915fd502e0b75f9 | [
"MIT"
] | null | null | null | import numpy as np
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import Dropout
from keras.layers import Flatten
from keras.layers.normalization import BatchNormalization
from keras.layers.convolutional import Conv2D
from keras.layers.convolutional import MaxPooling2D
from keras.... | 38.606742 | 162 | 0.695576 |
ffa663abd0e006c6cf496f113768398792a8ffae | 27,575 | py | Python | test/test_languages/testCAndCPP.py | benolayinka/lizard | ad8ea93505af8f9199e580003d5acecf5b6bccf3 | [
"MIT"
] | null | null | null | test/test_languages/testCAndCPP.py | benolayinka/lizard | ad8ea93505af8f9199e580003d5acecf5b6bccf3 | [
"MIT"
] | null | null | null | test/test_languages/testCAndCPP.py | benolayinka/lizard | ad8ea93505af8f9199e580003d5acecf5b6bccf3 | [
"MIT"
] | null | null | null | import unittest
from lizard_languages import CLikeReader
from ..testHelpers import get_cpp_fileinfo, get_cpp_function_list
class Test_C_Token_extension(unittest.TestCase):
def test_connecting_macro(self):
extended = CLikeReader(None).preprocess(("a##b c", ))
#tbd
class Test_c_cpp_lizard(unittest.... | 41.717095 | 93 | 0.603518 |
ffa6773238b2496d4fbd848a7f64e163a519933c | 475 | py | Python | datasets/MOT/seed/MOT17.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | datasets/MOT/seed/MOT17.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | datasets/MOT/seed/MOT17.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | from datasets.types.data_split import DataSplit
from datasets.base.factory_seed import BaseSeed
class MOT17_Seed(BaseSeed):
def __init__(self, root_path: str=None):
if root_path is None:
root_path = self.get_path_from_config('MOT17_PATH')
super(MOT17_Seed, self).__init__('MOT17', root_... | 33.928571 | 79 | 0.724211 |
ffa6bf5d4e82da5756b69c9d847c2924c0b2d47b | 2,624 | py | Python | config/settings/local.py | Jeromeschmidt/Guru | 3128a539e55b46afceb33b59c0bafaec7e9f630a | [
"MIT"
] | null | null | null | config/settings/local.py | Jeromeschmidt/Guru | 3128a539e55b46afceb33b59c0bafaec7e9f630a | [
"MIT"
] | 1 | 2021-02-26T02:49:34.000Z | 2021-02-26T02:49:34.000Z | config/settings/local.py | Jeromeschmidt/Guru | 3128a539e55b46afceb33b59c0bafaec7e9f630a | [
"MIT"
] | 1 | 2020-02-24T18:09:00.000Z | 2020-02-24T18:09:00.000Z | import os
import django_heroku
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_... | 40.369231 | 97 | 0.62157 |
ffa6cb845f8a737fad792edff837c964ad399fa0 | 42,206 | py | Python | chamberconnectlibrary/controllerinterface.py | thalmic/ChamberConnectLibrary | 142444a103e5d42b16bc1f28c6e6c63387616aae | [
"MIT"
] | 5 | 2018-03-19T20:26:39.000Z | 2022-02-02T18:38:29.000Z | chamberconnectlibrary/controllerinterface.py | thalmic/ChamberConnectLibrary | 142444a103e5d42b16bc1f28c6e6c63387616aae | [
"MIT"
] | null | null | null | chamberconnectlibrary/controllerinterface.py | thalmic/ChamberConnectLibrary | 142444a103e5d42b16bc1f28c6e6c63387616aae | [
"MIT"
] | 2 | 2018-05-04T18:33:38.000Z | 2019-02-11T21:17:03.000Z | '''
Common interface for all All ChamberConnectLibrary upper level interfaces
:copyright: (C) Espec North America, INC.
:license: MIT, see LICENSE for more details.
'''
#pylint: disable=W0703,W0201,R0902,W0232,R0904,C0103
from abc import ABCMeta, abstractmethod
from threading import RLock
import traceback
import time... | 30.018492 | 99 | 0.523148 |
ffa6cc3bdb3fb3a46baf12ad1f8d39841fa1fcb3 | 11,930 | py | Python | common_osint_model/models/tls.py | 3c7/common-osint-model | 4c1253833a96eb236f4d1770e58f20af6e710bcd | [
"MIT"
] | 27 | 2020-06-06T08:31:33.000Z | 2022-02-19T16:58:25.000Z | common_osint_model/models/tls.py | 3c7/common-osint-model | 4c1253833a96eb236f4d1770e58f20af6e710bcd | [
"MIT"
] | 5 | 2020-06-09T10:03:35.000Z | 2021-10-18T12:47:46.000Z | common_osint_model/models/tls.py | 3c7/common-osint-model | 4c1253833a96eb236f4d1770e58f20af6e710bcd | [
"MIT"
] | 5 | 2020-06-06T20:05:25.000Z | 2021-01-15T12:09:32.000Z | import binascii
from datetime import datetime
from typing import Dict, List, Optional, Union
import pytz
from cryptography.hazmat.primitives.hashes import MD5, SHA1, SHA256
from cryptography.x509 import OID_COMMON_NAME, ExtensionOID, DNSName, ExtensionNotFound
from cryptography.x509 import load_pem_x509_certificate
fr... | 36.151515 | 119 | 0.555909 |
ffa7111b854e865647c7d2d4fffcac2b2bd52872 | 236 | py | Python | inventory/tasks.py | weirdaze/tauto | e5a635628cd92998212cf3ae74aef2f0436430f5 | [
"MIT"
] | null | null | null | inventory/tasks.py | weirdaze/tauto | e5a635628cd92998212cf3ae74aef2f0436430f5 | [
"MIT"
] | 6 | 2021-03-19T16:01:33.000Z | 2022-03-12T00:54:23.000Z | inventory/tasks.py | weirdaze/tauto | e5a635628cd92998212cf3ae74aef2f0436430f5 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, unicode_literals
from celery import shared_task
@shared_task
def add(x, y):
total = 4000000
i = 0
while True:
if i < total:
break
i += 1
return x + y
| 16.857143 | 56 | 0.605932 |
ffa7499c6935b26b7894cd1e2e85368dfabb8578 | 2,814 | py | Python | apps/dot_ext/tests/test_templates.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | 1 | 2020-01-26T16:02:27.000Z | 2020-01-26T16:02:27.000Z | apps/dot_ext/tests/test_templates.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | null | null | null | apps/dot_ext/tests/test_templates.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | 2 | 2018-09-29T18:53:08.000Z | 2020-01-26T16:02:31.000Z | from django.core.urlresolvers import reverse
from apps.test import BaseApiTest
class TestDOTTemplates(BaseApiTest):
def test_application_list_template_override(self):
"""
Test that the application list template is overridden.
"""
self._create_user('john', '123456')
self.cl... | 45.387097 | 87 | 0.66951 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.