hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55c0f28d16ac514b5c7b981e6e3bb0696cc2040b | 54 | py | Python | extensions.py | ubioinformat/UPEfinder | 4dbc2ae0ab1993e56f8e1809f6c98d5326fc76e0 | [
"MIT"
] | 1 | 2020-11-12T15:43:42.000Z | 2020-11-12T15:43:42.000Z | extensions.py | ubioinformat/UPEfinder | 4dbc2ae0ab1993e56f8e1809f6c98d5326fc76e0 | [
"MIT"
] | null | null | null | extensions.py | ubioinformat/UPEfinder | 4dbc2ae0ab1993e56f8e1809f6c98d5326fc76e0 | [
"MIT"
] | null | null | null | from flask_pymongo import PyMongo
mongo = PyMongo()
| 13.5 | 34 | 0.777778 |
01430eac6cb2e85e733e9fc740127ad769809f22 | 3,636 | py | Python | rect_solutions.py | wusui/pentomino_redux | 258b2f541329a6e7e20fc6b58534ab4201b6082f | [
"MIT"
] | null | null | null | rect_solutions.py | wusui/pentomino_redux | 258b2f541329a6e7e20fc6b58534ab4201b6082f | [
"MIT"
] | null | null | null | rect_solutions.py | wusui/pentomino_redux | 258b2f541329a6e7e20fc6b58534ab4201b6082f | [
"MIT"
] | null | null | null | """
Solve pentomino filling of a rectangle
"""
from rect_place import find_placements
from rect_check_areas import areas_ok_size
from rect_translate import translate
def set_fig_in_pt_set(rectangle, value, points):
"""
General routine to set tiles found in points to value
"""
if not points:
re... | 33.054545 | 78 | 0.518152 |
8a7e4ac026621e9f1e95d6285bca7a864046f896 | 3,621 | py | Python | detail/NaptListenerPart.py | rainforest-tokyo/AutoNaptPython | 5c021ca18e7a8280b52fd168ff6c443321ff3e31 | [
"MIT"
] | null | null | null | detail/NaptListenerPart.py | rainforest-tokyo/AutoNaptPython | 5c021ca18e7a8280b52fd168ff6c443321ff3e31 | [
"MIT"
] | null | null | null | detail/NaptListenerPart.py | rainforest-tokyo/AutoNaptPython | 5c021ca18e7a8280b52fd168ff6c443321ff3e31 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import socket
import struct
from enum import Enum
from Utils import Utils
try:
from Event import Event
from SocketSelector import SocketSelector
from NaptListener import NaptListenerStatus
from NaptListenerEventArgs import NaptListener... | 25.680851 | 93 | 0.598177 |
e648f22dd931b5a0020ef9e5d6b46eb0ec85ba00 | 743 | py | Python | deeplearning/pytorch/src/main/python/twister2deepnet/deepnet/datasets/Dataset.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 63 | 2017-08-31T10:02:52.000Z | 2021-12-18T21:42:14.000Z | deeplearning/pytorch/src/main/python/twister2deepnet/deepnet/datasets/Dataset.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 284 | 2017-10-20T15:35:26.000Z | 2020-09-11T15:25:40.000Z | deeplearning/pytorch/src/main/python/twister2deepnet/deepnet/datasets/Dataset.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 44 | 2017-08-21T19:47:57.000Z | 2020-11-22T22:45:50.000Z | # // Licensed under the Apache License, Version 2.0 (the "License");
# // you may not use this file except in compliance with the License.
# // You may obtain a copy of the License at
# //
# // http://www.apache.org/licenses/LICENSE-2.0
# //
# // Unless required by applicable law or agreed to in writing, softwar... | 39.105263 | 78 | 0.725437 |
f587e862cd2ccecda4b2677a6805cb78f7f809df | 4,206 | py | Python | datahub_core/data/data_access.py | grovesy/datahub | 57bd1a837b9996c2dae5e052a94131b8fc56e3fb | [
"Apache-2.0"
] | 67 | 2020-05-15T09:37:20.000Z | 2022-03-18T04:12:08.000Z | datahub_core/data/data_access.py | grovesy/datahub | 57bd1a837b9996c2dae5e052a94131b8fc56e3fb | [
"Apache-2.0"
] | 37 | 2020-05-15T08:03:17.000Z | 2020-10-28T12:24:30.000Z | datahub_core/data/data_access.py | grovesy/datahub | 57bd1a837b9996c2dae5e052a94131b8fc56e3fb | [
"Apache-2.0"
] | 10 | 2020-05-16T14:11:12.000Z | 2021-10-06T19:20:47.000Z | import csv
from datahub_core.datasets import Country
from datahub_core import resource
from ..libs.data_access import sic_raw_data_access
COUNTRIES = []
def populate_countries():
raw = list(csv.reader(open(resource('country-codes.txt')), delimiter='\t'))
count = 0
for row in raw:
name = row[0]
... | 21.242424 | 80 | 0.588445 |
dacf53b1709541a62a928cc9123207a0f16f9855 | 21,165 | py | Python | photometry/ysfitsutilpy/ysfitsutilpy/hdrutil.py | ysBach/IshiguroM_etal_155140_2005UD | 37e0768f2a9dd59b3d4041c37c104d2d57e037ab | [
"MIT"
] | 1 | 2019-12-31T19:39:40.000Z | 2019-12-31T19:39:40.000Z | photometry/ysfitsutilpy/ysfitsutilpy/hdrutil.py | ysBach/IshiguroM_etal_155140_2005UD | 37e0768f2a9dd59b3d4041c37c104d2d57e037ab | [
"MIT"
] | null | null | null | photometry/ysfitsutilpy/ysfitsutilpy/hdrutil.py | ysBach/IshiguroM_etal_155140_2005UD | 37e0768f2a9dd59b3d4041c37c104d2d57e037ab | [
"MIT"
] | 1 | 2021-09-26T08:19:49.000Z | 2021-09-26T08:19:49.000Z | '''
Collection of functions that are rather header-dependent than the data.
'''
import re
from warnings import warn
import numpy as np
from astropy import units as u
from astropy import wcs as astropywcs
from astropy.coordinates import EarthLocation, SkyCoord
from astropy.io import fits
from astropy.io.fits import Car... | 36.617647 | 79 | 0.552941 |
ff72d87841f2088ab14de315d0ab82092cf51c6d | 917 | py | Python | hw_16.1/stats/setup.py | rchintsov/python-course-hw | f8af24e54c1bb3618a1503225d945500021c4833 | [
"Apache-2.0"
] | null | null | null | hw_16.1/stats/setup.py | rchintsov/python-course-hw | f8af24e54c1bb3618a1503225d945500021c4833 | [
"Apache-2.0"
] | null | null | null | hw_16.1/stats/setup.py | rchintsov/python-course-hw | f8af24e54c1bb3618a1503225d945500021c4833 | [
"Apache-2.0"
] | null | null | null | # License MIT
import os
from setuptools import setup, find_packages
DISTRO_ROOT_PATCH = os.path.dirname(os.path.abspath(__file__))
def extract_requirements(file):
"""
Install requirements from requirements file.
:param str file: path to requirements file.
:return: list[str] -- list of requirements.... | 28.65625 | 103 | 0.693566 |
a65e17feeade2be9669004bd0d943867be730134 | 7,849 | py | Python | basepl.py | MRtecno98/OperatingPyEnvironment | 70c3c545107cf5567c74a6d29e3dd7965b1c309c | [
"MIT"
] | 1 | 2019-09-14T16:17:04.000Z | 2019-09-14T16:17:04.000Z | basepl.py | MRtecno98/OperatingPyEnvironment | 70c3c545107cf5567c74a6d29e3dd7965b1c309c | [
"MIT"
] | null | null | null | basepl.py | MRtecno98/OperatingPyEnvironment | 70c3c545107cf5567c74a6d29e3dd7965b1c309c | [
"MIT"
] | null | null | null | #! oa_py
import oapi, os, sys
def bytesize_to_formatted_string(size) :
units = {0 : "B",
1 : "KB",
2 : "MB",
3 : "GB",
4 : "TB"}
unit = 0
while size > 1024 :
if unit == 4 :
break
unit+=1
size = size / 1024
return s... | 28.541818 | 87 | 0.493566 |
7006f794964dd634ec2d2dfaea14fb011e32c5c6 | 401 | py | Python | app/calculator/migrations/0012_auto_20190828_1107.py | sajeeshen/WebCalculatorAPI | d951e688e84741cc594877914d292fbddb4e9542 | [
"MIT"
] | null | null | null | app/calculator/migrations/0012_auto_20190828_1107.py | sajeeshen/WebCalculatorAPI | d951e688e84741cc594877914d292fbddb4e9542 | [
"MIT"
] | null | null | null | app/calculator/migrations/0012_auto_20190828_1107.py | sajeeshen/WebCalculatorAPI | d951e688e84741cc594877914d292fbddb4e9542 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.2 on 2019-08-28 11:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calculator', '0011_auto_20190828_1035'),
]
operations = [
migrations.AlterField(
model_name='report',
name='created_... | 21.105263 | 58 | 0.613466 |
bf2f8505a2d42d6a80db96eea3d6f886a6f28184 | 3,942 | py | Python | test/unit/cli/test_form_signature.py | ISCAS-VDI/swift-base | a5018b055b61cc0d273e549d32877608fcbf27fc | [
"Apache-2.0"
] | null | null | null | test/unit/cli/test_form_signature.py | ISCAS-VDI/swift-base | a5018b055b61cc0d273e549d32877608fcbf27fc | [
"Apache-2.0"
] | null | null | null | test/unit/cli/test_form_signature.py | ISCAS-VDI/swift-base | a5018b055b61cc0d273e549d32877608fcbf27fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2014 Samuel Merritt <sam@swiftstack.com>
#
# 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 r... | 35.513514 | 75 | 0.581431 |
e4246cae81dc72054fb1ffe27cc79be31ed14f77 | 1,346 | py | Python | PYTHON/Python-Estudos/ruby_repos.py | albertomendess/Estudos | 2e951f54d8290c23ae95ef7306171a4d8851f2f5 | [
"MIT"
] | null | null | null | PYTHON/Python-Estudos/ruby_repos.py | albertomendess/Estudos | 2e951f54d8290c23ae95ef7306171a4d8851f2f5 | [
"MIT"
] | null | null | null | PYTHON/Python-Estudos/ruby_repos.py | albertomendess/Estudos | 2e951f54d8290c23ae95ef7306171a4d8851f2f5 | [
"MIT"
] | 2 | 2021-03-02T07:31:47.000Z | 2021-03-03T08:12:05.000Z | import requests
import pygal
from pygal.style import LightColorizedStyle as LCS, LightenStyle as LS
# Faz uma chamada de API e armazena a resposta.
url = 'https://api.github.com/search/repositories?q=language:ruby&sort=stars'
r = requests.get(url)
print("Status code:", r.status_code)
# Armazena a resposta da API em u... | 29.26087 | 77 | 0.745171 |
6ff34c4b7d22e873f802a87ce3de1881ef0b7d19 | 1,082 | py | Python | step8/src/persistence/IBeaconsPersistence.py | banalna/pip-samples-beacons-python | 6a26bbb47f0d570e97e8135818ebcd76bfe41d93 | [
"MIT"
] | null | null | null | step8/src/persistence/IBeaconsPersistence.py | banalna/pip-samples-beacons-python | 6a26bbb47f0d570e97e8135818ebcd76bfe41d93 | [
"MIT"
] | null | null | null | step8/src/persistence/IBeaconsPersistence.py | banalna/pip-samples-beacons-python | 6a26bbb47f0d570e97e8135818ebcd76bfe41d93 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
step8.persistence.IBeaconsPersistence
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IBeaconsPersistence class
:copyright: Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details.
:license: MIT, see LICENSE for more details.
"""
class IBeaconsPersistence():
... | 33.8125 | 89 | 0.68854 |
fe789260de1baeb21865d66c4c5c6f904f5c5dc6 | 199 | py | Python | ex060.py | paulo-caixeta/Exercicios_Curso_Python | 3b77925499c174ea9ff81dec65d6319125219b9a | [
"MIT"
] | null | null | null | ex060.py | paulo-caixeta/Exercicios_Curso_Python | 3b77925499c174ea9ff81dec65d6319125219b9a | [
"MIT"
] | null | null | null | ex060.py | paulo-caixeta/Exercicios_Curso_Python | 3b77925499c174ea9ff81dec65d6319125219b9a | [
"MIT"
] | null | null | null | # O programa lê um número e mostra o seu fatorial
numero = int(input('Digite um número: '))
i = numero
while i > 1:
resultado = i
i = i - 1
resultado = resultado * (i-1)
print(resultado) | 24.875 | 49 | 0.638191 |
0ce308d4a4354d64e9b67bb03300d3139f056bb1 | 13,657 | py | Python | pygsti/report/table.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | 73 | 2016-01-28T05:02:05.000Z | 2022-03-30T07:46:33.000Z | pygsti/report/table.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | 113 | 2016-02-25T15:32:18.000Z | 2022-03-31T13:18:13.000Z | pygsti/report/table.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | 41 | 2016-03-15T19:32:07.000Z | 2022-02-16T10:22:05.000Z | """
Defines the ReportTable class
"""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certai... | 31.467742 | 106 | 0.563374 |
1b9e74f7d2f97501ced6cb438fb409bfaf5f426b | 715 | py | Python | test/ts2k/gmm_check.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 31 | 2021-09-09T16:09:55.000Z | 2022-02-20T02:15:19.000Z | test/ts2k/gmm_check.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 40 | 2021-08-06T14:30:08.000Z | 2022-01-19T08:49:52.000Z | test/ts2k/gmm_check.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 5 | 2021-08-06T11:20:31.000Z | 2022-01-07T19:39:40.000Z | import torch
torch.set_default_dtype(torch.float32)
from gmm import gmm_objective
print(gmm_objective.graph)
# extracted from adbench test
alphas = torch.tensor([-0.6490, 1.1812, -0.7585], requires_grad=True)
means = torch.tensor(
[[0.0923, 0.1863], [0.3456, 0.3968], [0.5388, 0.4192]], requires_grad=True,
)
icf... | 23.064516 | 88 | 0.700699 |
3831283431fa7f2fecc4e11f9de3edb51489c4c3 | 60 | py | Python | tests/scripts/tests_monitor.py | Sheshtawy/hawkeye | 3f8a6002ec56edc6d60d0fb87aa6b7ee56ccfb14 | [
"MIT"
] | 1 | 2017-08-08T14:30:36.000Z | 2017-08-08T14:30:36.000Z | tests/scripts/tests_monitor.py | Sheshtawy/hawkeye | 3f8a6002ec56edc6d60d0fb87aa6b7ee56ccfb14 | [
"MIT"
] | 45 | 2017-08-22T13:01:51.000Z | 2017-12-12T12:19:14.000Z | tests/scripts/tests_monitor.py | Sheshtawy/hawkeye | 3f8a6002ec56edc6d60d0fb87aa6b7ee56ccfb14 | [
"MIT"
] | null | null | null | import unittest
class TestMonitor(unittest.TestCase):
| 12 | 37 | 0.766667 |
9b8c8fe7675fbfedf51d999a675983bd0fc71e96 | 1,520 | py | Python | Q/questionnaire/middleware/dynamic_sites.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | null | null | null | Q/questionnaire/middleware/dynamic_sites.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | 477 | 2015-01-07T18:22:27.000Z | 2017-07-17T15:05:48.000Z | Q/questionnaire/middleware/dynamic_sites.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | null | null | null | ####################
# ES-DOC CIM Questionnaire
# Copyright (c) 2017 ES-DOC. All rights reserved.
#
# University of Colorado, Boulder
# http://cires.colorado.edu/
#
# This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT].
####################
"""
.. mo... | 33.777778 | 115 | 0.669079 |
6a47f17abe3ce51623d3821aa2d3ee5461626cda | 17,482 | py | Python | tools/wptrunner/wptrunner/executors/executorselenium.py | qanat/wpt | 7c61a4594a95682531367b6956d1c37f8b8fd486 | [
"BSD-3-Clause"
] | 1 | 2021-12-12T18:13:24.000Z | 2021-12-12T18:13:24.000Z | tools/wptrunner/wptrunner/executors/executorselenium.py | qanat/wpt | 7c61a4594a95682531367b6956d1c37f8b8fd486 | [
"BSD-3-Clause"
] | 112 | 2021-09-27T14:39:02.000Z | 2022-03-30T14:26:35.000Z | tools/wptrunner/wptrunner/executors/executorselenium.py | qanat/wpt | 7c61a4594a95682531367b6956d1c37f8b8fd486 | [
"BSD-3-Clause"
] | null | null | null | import json
import os
import socket
import threading
import time
import traceback
import uuid
from urllib.parse import urljoin
from .base import (CallbackHandler,
RefTestExecutor,
RefTestImplementation,
TestharnessExecutor,
TimedRunner,
... | 37.195745 | 116 | 0.616463 |
bced349e7a2bb25284f45c1d6cb1af15406a2cac | 330 | py | Python | src/networks/normalize.py | junleen/Expression-manipulator | 68fb985cb3b776899fa92d616de91a2960bd297e | [
"MIT"
] | 52 | 2020-07-13T03:05:40.000Z | 2022-03-28T04:34:39.000Z | src/networks/normalize.py | junleen/Expression-manipulator | 68fb985cb3b776899fa92d616de91a2960bd297e | [
"MIT"
] | 4 | 2020-11-16T09:00:19.000Z | 2021-12-27T03:11:34.000Z | src/networks/normalize.py | junleen/Expression-manipulator | 68fb985cb3b776899fa92d616de91a2960bd297e | [
"MIT"
] | 5 | 2020-10-27T08:04:15.000Z | 2022-01-22T06:42:35.000Z | import torch.nn as nn
def get_norm_layer(dims, normtype):
if normtype == 'batchnorm':
norm = nn.BatchNorm2d(dims)
elif normtype == 'instancenorm':
norm = nn.InstanceNorm2d(dims, affine=True)
elif normtype == 'layernorm':
norm = nn.LayerNorm(dims)
else:
norm = None
re... | 25.384615 | 51 | 0.624242 |
6875c3e84b04044180084c009d7ced0c2378466d | 1,365 | py | Python | setup.py | cfpb/wagtail-copyablemodeladmin | 6ae2c548deaa4a8aaa8ced410f28c46f1574dcff | [
"CC0-1.0"
] | 1 | 2020-02-04T05:07:14.000Z | 2020-02-04T05:07:14.000Z | setup.py | cfpb/wagtail-copyablemodeladmin | 6ae2c548deaa4a8aaa8ced410f28c46f1574dcff | [
"CC0-1.0"
] | null | null | null | setup.py | cfpb/wagtail-copyablemodeladmin | 6ae2c548deaa4a8aaa8ced410f28c46f1574dcff | [
"CC0-1.0"
] | 1 | 2021-02-20T10:39:27.000Z | 2021-02-20T10:39:27.000Z | from setuptools import find_packages, setup
long_description = open('README.md', 'r').read()
install_requires = [
'wagtail>=1.13,<2.8',
]
testing_extras = [
'coverage>=3.7.0',
'model-mommy>=2.0.0',
]
setup(
name='wagtail-copyablemodeladmin',
url='https://github.com/cfpb/wagtail-copyablemodeladm... | 28.4375 | 79 | 0.611722 |
aa081dfa35e6c75e0837fecad3d158c9433148e6 | 19,006 | py | Python | src/clients/ctm_saas_client/models/user_allowed_folders_properties.py | IceT-M/ctm-python-client | 0ef1d8a3c9a27a01c088be1cdf5d177d25912bac | [
"BSD-3-Clause"
] | 5 | 2021-12-01T18:40:00.000Z | 2022-03-04T10:51:44.000Z | src/clients/ctm_saas_client/models/user_allowed_folders_properties.py | IceT-M/ctm-python-client | 0ef1d8a3c9a27a01c088be1cdf5d177d25912bac | [
"BSD-3-Clause"
] | 3 | 2022-02-21T20:08:32.000Z | 2022-03-16T17:41:03.000Z | src/clients/ctm_saas_client/models/user_allowed_folders_properties.py | IceT-M/ctm-python-client | 0ef1d8a3c9a27a01c088be1cdf5d177d25912bac | [
"BSD-3-Clause"
] | 7 | 2021-12-01T11:59:16.000Z | 2022-03-01T18:16:40.000Z | # coding: utf-8
"""
Control-M Services
Provides access to BMC Control-M Services # noqa: E501
OpenAPI spec version: 9.20.30
Contact: customer_support@bmc.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from clients.ctm... | 32.10473 | 468 | 0.657529 |
75372b720a5ef2b8346e34e6fc8894c9bb9d4cc7 | 2,030 | py | Python | ca_nb/people.py | djac/scrapers-ca | 2e16a85ff8a05ea49031a11ede66fa452631f8da | [
"MIT"
] | null | null | null | ca_nb/people.py | djac/scrapers-ca | 2e16a85ff8a05ea49031a11ede66fa452631f8da | [
"MIT"
] | null | null | null | ca_nb/people.py | djac/scrapers-ca | 2e16a85ff8a05ea49031a11ede66fa452631f8da | [
"MIT"
] | null | null | null | from utils import CanadianScraper, CanadianPerson as Person
import re
from urllib.parse import urljoin
COUNCIL_PAGE = 'http://www1.gnb.ca/legis/bios/58/index-e.asp'
PARTIES = {
'PC': 'Progressive Conservative Party of New Brunswick',
'L': 'New Brunswick Liberal Association',
'IND': 'Independent',
'GP... | 35.614035 | 95 | 0.606897 |
236f1d8323bd0ecf42bab8870bf09fd7bce3ee19 | 400 | py | Python | remlang/compiler/tk.py | thautwarm/Rem | 97be815bd9f90cc7bca51782b0583fe90e196c4f | [
"MIT"
] | 24 | 2017-12-30T12:37:13.000Z | 2020-10-21T02:48:42.000Z | remlang/compiler/tk.py | thautwarm/Rem | 97be815bd9f90cc7bca51782b0583fe90e196c4f | [
"MIT"
] | 2 | 2018-03-16T03:23:58.000Z | 2019-10-11T16:54:06.000Z | remlang/compiler/tk.py | thautwarm/Rem | 97be815bd9f90cc7bca51782b0583fe90e196c4f | [
"MIT"
] | null | null | null | from Ruikowa.ObjectRegex.Tokenizer import unique_literal_cache_pool
_keywords = [
'then',
'when',
'and',
'or',
'in',
'not',
'case',
'as',
'end',
'where',
'from',
'yield',
'into',
'let',
'True',
'False',
'None',
'import',
'is',
]
keywords_map ... | 15.384615 | 92 | 0.53 |
78e9abb8ea700c0fc7f8e4047b4806f38d1516d6 | 16,580 | py | Python | arcade/gl/framebuffer.py | mlr07/arcade | 70a7046f094a05be1bf0935edeff0ccfb391e01c | [
"MIT"
] | null | null | null | arcade/gl/framebuffer.py | mlr07/arcade | 70a7046f094a05be1bf0935edeff0ccfb391e01c | [
"MIT"
] | null | null | null | arcade/gl/framebuffer.py | mlr07/arcade | 70a7046f094a05be1bf0935edeff0ccfb391e01c | [
"MIT"
] | null | null | null | from ctypes import c_int
from contextlib import contextmanager
from typing import Tuple, List, TYPE_CHECKING
import weakref
from pyglet import gl
from .texture import Texture
from .types import pixel_formats
if TYPE_CHECKING: # handle import cycle caused by type hinting
from arcade.gl import Context
class Fr... | 33.562753 | 95 | 0.601568 |
515fdc9e921f75f874031090d9031551f2ebe07e | 2,782 | py | Python | projects/migrations/0001_initial.py | OsmanMariam/Awwardsn | 004e6987781e149cee23ca74c102a75632630594 | [
"MIT"
] | null | null | null | projects/migrations/0001_initial.py | OsmanMariam/Awwardsn | 004e6987781e149cee23ca74c102a75632630594 | [
"MIT"
] | 3 | 2021-03-19T10:18:01.000Z | 2021-09-08T01:35:34.000Z | projects/migrations/0001_initial.py | OsmanMariam/Awwardsn | 004e6987781e149cee23ca74c102a75632630594 | [
"MIT"
] | 1 | 2019-05-28T14:27:03.000Z | 2019-05-28T14:27:03.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-05-27 12:31
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations... | 51.518519 | 174 | 0.566858 |
f990d8340742189cf070a4d621dca0b312a29f87 | 10,929 | py | Python | plugins/actions/validate.py | g-ramirez/ceph-lab | a0c7d2c814d014f80c12e7368de4a13153c12b44 | [
"Apache-2.0"
] | null | null | null | plugins/actions/validate.py | g-ramirez/ceph-lab | a0c7d2c814d014f80c12e7368de4a13153c12b44 | [
"Apache-2.0"
] | null | null | null | plugins/actions/validate.py | g-ramirez/ceph-lab | a0c7d2c814d014f80c12e7368de4a13153c12b44 | [
"Apache-2.0"
] | null | null | null |
from ansible.plugins.action import ActionBase
from distutils.version import LooseVersion
try:
from __main__ import display
except ImportError:
from ansible.utils.display import Display
display = Display()
try:
import notario
except ImportError:
msg = "The python-notario library is missing. Please... | 39.741818 | 137 | 0.671059 |
3b155401f1d9ffaddca8fdf19ecf190de59516d0 | 3,381 | py | Python | flask_app/deploy.py | keshik6/deep-image-retrieval | 2938aafbe9f22b72da599643ba98014c45ecd958 | [
"MIT"
] | 31 | 2019-10-02T12:51:45.000Z | 2022-03-19T13:16:41.000Z | flask_app/deploy.py | keshik6/deep-image-retrieval | 2938aafbe9f22b72da599643ba98014c45ecd958 | [
"MIT"
] | 3 | 2020-12-18T07:56:05.000Z | 2021-02-16T19:50:56.000Z | flask_app/deploy.py | keshik6/deep-image-retrieval | 2938aafbe9f22b72da599643ba98014c45ecd958 | [
"MIT"
] | 13 | 2019-10-02T12:51:47.000Z | 2021-12-28T06:06:09.000Z | from flask import Flask,request, render_template, session
from flask_uploads import UploadSet, configure_uploads, IMAGES
import infer_on_single_image as code_base
import os
app = Flask(__name__)
app.secret_key = os.urandom(24)
photos = UploadSet('photos', IMAGES)
app.config['UPLOADED_PHOTOS_DEST'] = 'static/temp'
confi... | 50.462687 | 147 | 0.74682 |
133f0b433bcd54bff888228912561298e448b37d | 1,837 | py | Python | src/visualClustering.py | StevenHuang2020/GeneExpression_analysis | 490f9f3ce098a0eee41e23e00d9cd6c2f5542bf6 | [
"MIT"
] | null | null | null | src/visualClustering.py | StevenHuang2020/GeneExpression_analysis | 490f9f3ce098a0eee41e23e00d9cd6c2f5542bf6 | [
"MIT"
] | null | null | null | src/visualClustering.py | StevenHuang2020/GeneExpression_analysis | 490f9f3ce098a0eee41e23e00d9cd6c2f5542bf6 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from sklearn.manifold import TSNE
from sklearn.decomposition import PCA
from manifoldLearning import manifoldLearningTransform,plotManifold
def visualClusterResult(data, labels, title, show=False):
#print('data.shape=',data.shape,'labels.shape=',labels.shape)
... | 31.135593 | 104 | 0.559064 |
d70785fc2bf0c2cd663eeeb7a7d2cda3030e7988 | 7,520 | py | Python | tensortrade/env/default/rewards.py | wnz99/tensortrade-1 | 4e12082ee49df5182ec54e9badd6abea14c6cfa0 | [
"Apache-2.0"
] | null | null | null | tensortrade/env/default/rewards.py | wnz99/tensortrade-1 | 4e12082ee49df5182ec54e9badd6abea14c6cfa0 | [
"Apache-2.0"
] | null | null | null | tensortrade/env/default/rewards.py | wnz99/tensortrade-1 | 4e12082ee49df5182ec54e9badd6abea14c6cfa0 | [
"Apache-2.0"
] | null | null | null |
from abc import abstractmethod
import numpy as np
import pandas as pd
from tensortrade.env.generic import RewardScheme, TradingEnv
from tensortrade.feed.core import Stream, DataFeed
import math
class TensorTradeRewardScheme(RewardScheme):
"""An abstract base class for reward schemes for the default environment... | 30.819672 | 106 | 0.615957 |
c15aede6be6bc930cd9be739a3d0cbd7c9380260 | 15,544 | py | Python | ENV/bin/pildriver.py | jupitercl/meatme-oscar-dev | 40583cbb3c6762640a403956e41bffac0bb2ad48 | [
"BSD-3-Clause"
] | null | null | null | ENV/bin/pildriver.py | jupitercl/meatme-oscar-dev | 40583cbb3c6762640a403956e41bffac0bb2ad48 | [
"BSD-3-Clause"
] | null | null | null | ENV/bin/pildriver.py | jupitercl/meatme-oscar-dev | 40583cbb3c6762640a403956e41bffac0bb2ad48 | [
"BSD-3-Clause"
] | null | null | null | #!/home/ubuntu/workspace/meatme-oscar/ENV/bin/python
"""PILdriver, an image-processing calculator using PIL.
An instance of class PILDriver is essentially a software stack machine
(Polish-notation interpreter) for sequencing PIL image
transformations. The state of the instance is the interpreter stack.
The only meth... | 29.495256 | 79 | 0.591611 |
979cb0c94d6f7dd0a75f974375bfb9b818e7efa5 | 8,515 | py | Python | nitro/resource/config/network/vxlan_nsip6_binding.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | 2 | 2020-08-24T18:04:22.000Z | 2020-08-24T18:04:47.000Z | nitro/resource/config/network/vxlan_nsip6_binding.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | null | null | null | nitro/resource/config/network/vxlan_nsip6_binding.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | 32.132075 | 174 | 0.573576 |
51719007901f33686e029211d29fe567f0b2db7f | 145 | py | Python | systemdlogging/__init__.py | idlesign/systemd-logging | 0427ba93b2a9267627302342cbd8e6ea347f1545 | [
"BSD-3-Clause"
] | 24 | 2019-10-15T19:57:04.000Z | 2022-02-03T11:02:58.000Z | systemdlogging/__init__.py | idlesign/systemd-logging | 0427ba93b2a9267627302342cbd8e6ea347f1545 | [
"BSD-3-Clause"
] | 5 | 2020-01-16T00:55:11.000Z | 2022-01-28T11:57:43.000Z | systemdlogging/__init__.py | idlesign/systemd-logging | 0427ba93b2a9267627302342cbd8e6ea347f1545 | [
"BSD-3-Clause"
] | 1 | 2020-01-28T22:26:45.000Z | 2020-01-28T22:26:45.000Z |
VERSION = (1, 0, 0)
"""Application version number tuple."""
VERSION_STR = '.'.join(map(str, VERSION))
"""Application version number string.""" | 20.714286 | 41 | 0.668966 |
4725457e292c5f62a1083a1fe673493d7b0aeff5 | 21,008 | py | Python | deeptools/bamPEFragmentSize.py | samhuairen/deepTools | 7c89456b6a986259c96b8d280c53e4ab155696ef | [
"MIT"
] | null | null | null | deeptools/bamPEFragmentSize.py | samhuairen/deepTools | 7c89456b6a986259c96b8d280c53e4ab155696ef | [
"MIT"
] | null | null | null | deeptools/bamPEFragmentSize.py | samhuairen/deepTools | 7c89456b6a986259c96b8d280c53e4ab155696ef | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import sys
import numpy as np
import matplotlib
matplotlib.use('Agg')
matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['svg.fonttype'] = 'none'
from deeptools import cm # noqa: F401
import matplotlib.pyplot as plt
import plotly.offline as py
... | 57.873278 | 344 | 0.415842 |
053ae99f23c06f23d01dba0682745e7013efb6e6 | 24,331 | py | Python | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/cloud/amazon/s3_bucket.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-03-29T18:41:01.000Z | 2020-03-29T18:41:01.000Z | ansible/ansible/modules/cloud/amazon/s3_bucket.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 7 | 2020-09-07T17:27:56.000Z | 2022-03-02T06:25:46.000Z | ansible/ansible/modules/cloud/amazon/s3_bucket.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 1 | 2020-03-22T01:04:48.000Z | 2020-03-22T01:04:48.000Z | #!/usr/bin/python
#
# This is a free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This Ansible library is distributed in the hope that i... | 40.283113 | 159 | 0.666763 |
639af36f6f75a709c0a54c4d03f000d245e3c618 | 2,260 | py | Python | tests/number/test_automapper_number.py | icanbwell/SparkAutoMapper | bfd5da72f3b55ec48860935228c1ecf6d7c1a2e4 | [
"Apache-2.0"
] | 2 | 2021-12-27T10:41:59.000Z | 2022-02-24T00:19:40.000Z | tests/number/test_automapper_number.py | icanbwell/SparkAutoMapper | bfd5da72f3b55ec48860935228c1ecf6d7c1a2e4 | [
"Apache-2.0"
] | 5 | 2020-10-22T01:19:11.000Z | 2021-03-18T16:04:23.000Z | tests/number/test_automapper_number.py | icanbwell/SparkAutoMapper | bfd5da72f3b55ec48860935228c1ecf6d7c1a2e4 | [
"Apache-2.0"
] | 3 | 2020-12-17T21:23:46.000Z | 2021-07-29T18:08:31.000Z | from typing import Dict
from pyspark.sql import SparkSession, Column, DataFrame
# noinspection PyUnresolvedReferences
from pyspark.sql.functions import col, lit
from spark_auto_mapper.automappers.automapper import AutoMapper
from spark_auto_mapper.data_types.literal import AutoMapperDataTypeLiteral
from spark_auto_m... | 32.285714 | 87 | 0.654867 |
25a600528bf60d216f3f9bd927ca592643b989bd | 11,604 | py | Python | hummingbot/market/radar_relay/radar_relay_api_order_book_data_source.py | mehmeta/hummingbot | 0ab56228c87194a64eab0f409e93e6bb74425f4c | [
"Apache-2.0"
] | 2 | 2020-08-09T18:08:17.000Z | 2020-11-19T03:21:31.000Z | hummingbot/market/radar_relay/radar_relay_api_order_book_data_source.py | mehmeta/hummingbot | 0ab56228c87194a64eab0f409e93e6bb74425f4c | [
"Apache-2.0"
] | null | null | null | hummingbot/market/radar_relay/radar_relay_api_order_book_data_source.py | mehmeta/hummingbot | 0ab56228c87194a64eab0f409e93e6bb74425f4c | [
"Apache-2.0"
] | 3 | 2020-08-18T16:06:53.000Z | 2020-08-19T08:53:39.000Z | #!/usr/bin/env python
import asyncio
import aiohttp
import logging
import pandas as pd
from typing import (
AsyncIterable,
Dict,
List,
Optional,
)
import re
import time
import ujson
import websockets
from websockets.exceptions import ConnectionClosed
from hummingbot.core.data_type.order_book import Or... | 46.047619 | 115 | 0.603585 |
9a4ca513fdf524445e75ab7fa8203df45bee8554 | 807 | py | Python | manager/director/apps/sites/migrations/0014_auto_20200131_0935.py | darius-kia/director4 | 1d2c2c4c3ec12cc9b7f846d5dc075ea3bbef36f9 | [
"MIT"
] | 7 | 2020-08-23T23:08:34.000Z | 2021-12-02T04:17:37.000Z | manager/director/apps/sites/migrations/0014_auto_20200131_0935.py | darius-kia/director4 | 1d2c2c4c3ec12cc9b7f846d5dc075ea3bbef36f9 | [
"MIT"
] | 43 | 2020-08-24T16:48:29.000Z | 2022-03-02T19:45:54.000Z | manager/director/apps/sites/migrations/0014_auto_20200131_0935.py | darius-kia/director4 | 1d2c2c4c3ec12cc9b7f846d5dc075ea3bbef36f9 | [
"MIT"
] | 10 | 2020-08-17T20:42:52.000Z | 2021-07-16T03:46:51.000Z | # Generated by Django 2.2.9 on 2020-01-31 14:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sites', '0013_remove_site_port'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='type',
... | 42.473684 | 474 | 0.672862 |
0ca39af2ed23794ec636df606edee4c22eff6b67 | 159,255 | py | Python | tensorflow/python/ops/math_ops.py | leike666666/tensorflow | a3fd0ddfcb716be124e95b51e96e6c1e4507ef64 | [
"Apache-2.0"
] | 1 | 2019-12-25T09:44:14.000Z | 2019-12-25T09:44:14.000Z | tensorflow/python/ops/math_ops.py | leike666666/tensorflow | a3fd0ddfcb716be124e95b51e96e6c1e4507ef64 | [
"Apache-2.0"
] | 2 | 2021-08-25T15:57:35.000Z | 2022-02-10T01:09:32.000Z | tensorflow/python/ops/math_ops.py | leike666666/tensorflow | a3fd0ddfcb716be124e95b51e96e6c1e4507ef64 | [
"Apache-2.0"
] | 1 | 2017-11-27T02:55:11.000Z | 2017-11-27T02:55:11.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.707399 | 121 | 0.664067 |
00a9ffe69a2750f6224dd7bf9469668209ff1b8d | 41,793 | py | Python | venv/Lib/site-packages/numpy/core/setup.py | adityasagam/azurePy | bf6c61c1d6f52521602bae2ab3f06ffba4e30444 | [
"MIT"
] | 4 | 2019-03-11T18:05:49.000Z | 2021-05-22T21:09:09.000Z | venv/Lib/site-packages/numpy/core/setup.py | adityasagam/azurePy | bf6c61c1d6f52521602bae2ab3f06ffba4e30444 | [
"MIT"
] | 16 | 2020-03-24T17:30:37.000Z | 2022-03-11T23:57:41.000Z | venv/Lib/site-packages/numpy/core/setup.py | adityasagam/azurePy | bf6c61c1d6f52521602bae2ab3f06ffba4e30444 | [
"MIT"
] | 6 | 2020-10-16T13:28:31.000Z | 2021-08-25T12:08:34.000Z | from __future__ import division, print_function
import os
import sys
import pickle
import copy
import warnings
import platform
from os.path import join
from numpy.distutils import log
from distutils.dep_util import newer
from distutils.sysconfig import get_config_var
from numpy._build_utils.apple_accelerate import (
... | 42.515768 | 113 | 0.542746 |
dd192faf883b112f364bbed69253ce67e031c3ae | 5,819 | py | Python | graphscale/examples/hcris/analyze_csv.py | schrockntemp/graphscaletemp | 59a0982f000dfbfe62f9773fb71204f2eadf73d4 | [
"MIT"
] | null | null | null | graphscale/examples/hcris/analyze_csv.py | schrockntemp/graphscaletemp | 59a0982f000dfbfe62f9773fb71204f2eadf73d4 | [
"MIT"
] | null | null | null | graphscale/examples/hcris/analyze_csv.py | schrockntemp/graphscaletemp | 59a0982f000dfbfe62f9773fb71204f2eadf73d4 | [
"MIT"
] | null | null | null | import sys
import csv
import re
class OnePassFilterRule:
def __init__(self, filter_fn, description):
self.passes = False
self.filter_fn = filter_fn
self._description = description
def process(self, value):
if not self.passes:
self.passes = self.filter_fn(value)
... | 28.111111 | 92 | 0.575357 |
919e879d7b7c347184e1d437493931b854a203bf | 534 | py | Python | Integration/TTS/gtts_test.py | Vidur-CUBoulder/GroceryRecommendataion | 26de07156f4cd4ba5b008c8296c9c23be4032a54 | [
"MIT"
] | null | null | null | Integration/TTS/gtts_test.py | Vidur-CUBoulder/GroceryRecommendataion | 26de07156f4cd4ba5b008c8296c9c23be4032a54 | [
"MIT"
] | null | null | null | Integration/TTS/gtts_test.py | Vidur-CUBoulder/GroceryRecommendataion | 26de07156f4cd4ba5b008c8296c9c23be4032a54 | [
"MIT"
] | null | null | null | #!usr/bin/python
from pygame import mixer
from gtts import gTTS
import os
import global_types
def text_op(speech):
tts = gTTS(text=speech,lang='en-us',slow=False)
tts.save("vocal.mp3")
mixer.init()
volval = mixer.Sound("./vocal.mp3")
print("gtts_test: ",float((global_types.volume)/100))
volval.set_volume(0.25)
... | 20.538462 | 54 | 0.700375 |
e52c49a0bdcce93e3bf7c6ddf04b73bdbd80e064 | 1,049 | py | Python | Basic Data Structures/string/leet_043_MultiplyStrings.py | rush2catch/algorithms-leetcode | 38a5e6aa33d48fa14fe09c50c28a2eaabd736e55 | [
"MIT"
] | null | null | null | Basic Data Structures/string/leet_043_MultiplyStrings.py | rush2catch/algorithms-leetcode | 38a5e6aa33d48fa14fe09c50c28a2eaabd736e55 | [
"MIT"
] | null | null | null | Basic Data Structures/string/leet_043_MultiplyStrings.py | rush2catch/algorithms-leetcode | 38a5e6aa33d48fa14fe09c50c28a2eaabd736e55 | [
"MIT"
] | null | null | null | # Problem: Multiply Strings
# Difficulty: Medium
# Category: String
# Leetcode 43: https://leetcode.com/problems/multiply-strings/description/
"""
Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2.
Note:
The length of both num1 and num2 is < 110.
Both num1 and num... | 30.852941 | 106 | 0.641563 |
2b816529b73c89acec62fedc5351d222b9976592 | 1,235 | py | Python | source/core-api/lambda_functions/get_public_key.py | aws-solutions/aws-virtual-waiting-room | 149031bbc31a76aa75855dee7b77d4fe616dd9e5 | [
"Apache-2.0"
] | 30 | 2021-11-25T11:53:40.000Z | 2022-03-30T20:06:38.000Z | source/core-api/lambda_functions/get_public_key.py | aws-solutions/aws-virtual-waiting-room | 149031bbc31a76aa75855dee7b77d4fe616dd9e5 | [
"Apache-2.0"
] | 21 | 2021-11-10T16:40:14.000Z | 2022-03-31T16:28:33.000Z | source/core-api/lambda_functions/get_public_key.py | aws-solutions/aws-virtual-waiting-room | 149031bbc31a76aa75855dee7b77d4fe616dd9e5 | [
"Apache-2.0"
] | 7 | 2021-11-29T06:20:52.000Z | 2022-02-22T02:03:00.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
This module is the get_public_key API handler.
It retrieves the public key generated by a custom resource stored in Secrets Manager.
"""
import boto3
import os
from botocore import config
from botocore.excep... | 27.444444 | 85 | 0.679352 |
ac232808792270cd1834c6af961e8da2a1c47cb5 | 11,305 | py | Python | docs/source/conf.py | gbouvignies/ChemEx | b1748f1bdc623a1d078de47dffe8cae2515d3411 | [
"BSD-3-Clause"
] | 10 | 2018-09-20T00:33:59.000Z | 2021-08-08T10:21:27.000Z | docs/source/conf.py | gbouvignies/ChemEx | b1748f1bdc623a1d078de47dffe8cae2515d3411 | [
"BSD-3-Clause"
] | 28 | 2018-09-17T12:01:58.000Z | 2022-03-23T13:40:48.000Z | docs/source/conf.py | gbouvignies/ChemEx | b1748f1bdc623a1d078de47dffe8cae2515d3411 | [
"BSD-3-Clause"
] | 6 | 2018-09-17T13:50:13.000Z | 2021-02-23T07:39:10.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If exte... | 30.389785 | 85 | 0.668908 |
206443890c9a8c78e63a94353090a7cdaf05246a | 8,527 | py | Python | utils/end2end_anno/pin_adversarial.py | VV123/NLIDB_gradient | f42a6f383d2d4ac41c354cf55df2a21507577b02 | [
"MIT"
] | null | null | null | utils/end2end_anno/pin_adversarial.py | VV123/NLIDB_gradient | f42a6f383d2d4ac41c354cf55df2a21507577b02 | [
"MIT"
] | 1 | 2021-01-11T03:42:43.000Z | 2021-02-19T17:06:59.000Z | utils/end2end_anno/pin_adversarial.py | VV123/NLIDB_gradient | f42a6f383d2d4ac41c354cf55df2a21507577b02 | [
"MIT"
] | null | null | null | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import numpy as np
import tensorflow as tf
from numpy import linalg as LA
import copy
import time
import scipy
import re
import pickle
import sys
#sys.path.append('/home/wzw0022/match-lstm/annotation/lib')
# -------------------------------------------------------------... | 37.399123 | 152 | 0.497479 |
6a682610106a13e51ab3571db0031185a6a8f424 | 307 | py | Python | src/training/modeller.py | skyimager/building_footprint_segmentation | 3a1af72446d41d8023dea725a806508a65d94327 | [
"MIT"
] | 6 | 2020-05-01T15:39:39.000Z | 2022-01-10T15:56:55.000Z | src/training/modeller.py | skyimager/bfss | 3a1af72446d41d8023dea725a806508a65d94327 | [
"MIT"
] | null | null | null | src/training/modeller.py | skyimager/bfss | 3a1af72446d41d8023dea725a806508a65d94327 | [
"MIT"
] | 4 | 2020-05-01T15:39:41.000Z | 2022-01-10T15:56:57.000Z | import config
def finetune_model(base_model):
for i, layer in enumerate(base_model.layers):
if i in config.trainable_layers:
layer.trainable=True
else:
layer.trainable=False
print("Layer freezing complete!!")
return base_model | 23.615385 | 49 | 0.602606 |
8e4e5d18010e0fa5f4c0d594f79e2381e66c916e | 9,059 | py | Python | demo/predictor.py | isolution911/AdelaiDet | cb7e657e8e4287929c3417dceca2cffeae120282 | [
"BSD-2-Clause"
] | 2,597 | 2020-03-15T06:01:23.000Z | 2022-03-31T18:21:31.000Z | demo/predictor.py | isolution911/AdelaiDet | cb7e657e8e4287929c3417dceca2cffeae120282 | [
"BSD-2-Clause"
] | 467 | 2020-03-16T11:31:52.000Z | 2022-03-31T08:50:15.000Z | demo/predictor.py | isolution911/AdelaiDet | cb7e657e8e4287929c3417dceca2cffeae120282 | [
"BSD-2-Clause"
] | 584 | 2020-03-15T05:53:40.000Z | 2022-03-26T02:56:30.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import numpy as np
import atexit
import bisect
import multiprocessing as mp
from collections import deque
import cv2
import torch
import matplotlib.pyplot as plt
from detectron2.data import MetadataCatalog
from detectron2.engine.defaults import Def... | 36.381526 | 109 | 0.593443 |
f1d58cfdcbf0653be5e91670d16a47fbe3155482 | 3,113 | py | Python | pytorch_tools/losses/detection.py | YevheniiSemendiak/pytorch-tools | 11f895ac7af796ca786a3d94bb46de70d7fce87a | [
"MIT"
] | 155 | 2019-11-06T14:05:32.000Z | 2022-03-24T11:12:19.000Z | pytorch_tools/losses/detection.py | YevheniiSemendiak/pytorch-tools | 11f895ac7af796ca786a3d94bb46de70d7fce87a | [
"MIT"
] | 41 | 2019-11-01T21:41:51.000Z | 2021-07-19T12:53:39.000Z | pytorch_tools/losses/detection.py | YevheniiSemendiak/pytorch-tools | 11f895ac7af796ca786a3d94bb46de70d7fce87a | [
"MIT"
] | 15 | 2019-12-07T19:09:18.000Z | 2021-09-27T19:17:55.000Z | import torch
import torch.nn as nn
import pytorch_tools as pt
from functools import partial
from pytorch_tools.utils.box import generate_targets
from pytorch_tools.losses.base import Loss
class DetectionLoss(Loss):
"""Constructs Wrapper for Object Detection which combines Focal Loss and L1 loss"""
def __init... | 42.643836 | 118 | 0.667845 |
e4ef61a0def55c213959a5707217947e0c5c197d | 4,119 | py | Python | class2/p32_sgd.py | anlei2014/ML-code | 4f501720ee94abc27534cf0aa7c30a8ecbf62398 | [
"MIT"
] | null | null | null | class2/p32_sgd.py | anlei2014/ML-code | 4f501720ee94abc27534cf0aa7c30a8ecbf62398 | [
"MIT"
] | null | null | null | class2/p32_sgd.py | anlei2014/ML-code | 4f501720ee94abc27534cf0aa7c30a8ecbf62398 | [
"MIT"
] | null | null | null | # 利用鸢尾花数据集,实现前向传播、反向传播,可视化loss曲线
# 导入所需模块
import tensorflow as tf
from sklearn import datasets
from matplotlib import pyplot as plt
import numpy as np
import time ##1##
# 导入数据,分别为输入特征和标签
x_data = datasets.load_iris().data
y_data = datasets.load_iris().target
# 随机打乱数据(因为原始数据是顺序的,顺序不打乱会影响准确率)
# seed: 随机... | 36.131579 | 91 | 0.672979 |
919b6e7507c6b3db15552bde5e7be595c92fbbda | 45,312 | py | Python | validation_fixer.py | UrbanInstitute/nccs-public | fcf45aa51f39645049ab8bee244f5971bc7beed9 | [
"MIT"
] | 7 | 2019-01-22T19:22:01.000Z | 2022-03-02T22:18:58.000Z | validation_fixer.py | UrbanInstitute/nccs-public | fcf45aa51f39645049ab8bee244f5971bc7beed9 | [
"MIT"
] | 1 | 2021-07-20T04:17:50.000Z | 2022-03-02T22:23:43.000Z | validation_fixer.py | UrbanInstitute/nccs-public | fcf45aa51f39645049ab8bee244f5971bc7beed9 | [
"MIT"
] | null | null | null | import os
import sys
import time
import subprocess
import webbrowser
from collections import defaultdict
import pandas as pd
import numpy as np
from numpy import floor, ceil
path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(path)
pd.set_option('display.float_format', lambda x: '%.3f' % x)
from valida... | 46.04878 | 481 | 0.561242 |
2aa2c2ed88a47705e0c972c8f81992f891f82b70 | 1,225 | py | Python | src/pyim/main/pyim_align.py | jrderuiter/pyim | e767c3bd14e0d0c9b3d0ff3482c19a8e1a9c61d4 | [
"MIT"
] | null | null | null | src/pyim/main/pyim_align.py | jrderuiter/pyim | e767c3bd14e0d0c9b3d0ff3482c19a8e1a9c61d4 | [
"MIT"
] | 1 | 2018-05-11T02:46:09.000Z | 2018-05-11T02:46:09.000Z | src/pyim/main/pyim_align.py | jrderuiter/pyim | e767c3bd14e0d0c9b3d0ff3482c19a8e1a9c61d4 | [
"MIT"
] | 1 | 2018-04-17T16:08:34.000Z | 2018-04-17T16:08:34.000Z | """Script for the pyim-align command.
The align command is responsible for extracting genomic reads from the
sequencing data, aligning these reads to the reference genome and extracting
insertion sites from these alignments. The command provides access to several
distinct pipelines, which perform these tasks for diffe... | 25 | 77 | 0.716735 |
43ac5fb2a6f6f1a156d5df0cbbb61944a0dffb64 | 5,371 | py | Python | datto/CleanText.py | benhummel/datto | 3e6ef90c1ee7a369a1f53b58d0221babb3ba2ac0 | [
"MIT"
] | null | null | null | datto/CleanText.py | benhummel/datto | 3e6ef90c1ee7a369a1f53b58d0221babb3ba2ac0 | [
"MIT"
] | null | null | null | datto/CleanText.py | benhummel/datto | 3e6ef90c1ee7a369a1f53b58d0221babb3ba2ac0 | [
"MIT"
] | null | null | null | import os
import re
import string
import numpy as np
import pandas as pd
import spacy
from spacy.cli import download
download("en")
nlp = spacy.load("en")
class CleanText:
def remove_names(self, text):
"""
Parameters
--------
text: str
Returns
--------
cl... | 26.458128 | 223 | 0.494135 |
d8f990c33cd3856bbdf191f9705b5d521611b049 | 2,193 | py | Python | maxscale_discovery.py | eBeyond/zbx_maxscale | 66993c5f2aed765f3063d074fef9422b030d5b2a | [
"Apache-2.0"
] | null | null | null | maxscale_discovery.py | eBeyond/zbx_maxscale | 66993c5f2aed765f3063d074fef9422b030d5b2a | [
"Apache-2.0"
] | null | null | null | maxscale_discovery.py | eBeyond/zbx_maxscale | 66993c5f2aed765f3063d074fef9422b030d5b2a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import requests
import click
import json
from requests.auth import HTTPBasicAuth
class Server(object):
def __init__(self, host=None, port=8989, user='admin', password='mariadb'):
self.host = host
self.port = port
self.user = user
self.password = password
... | 23.580645 | 79 | 0.652531 |
83f22a85450fe701914cfca79dda53c2a6d449ff | 159 | py | Python | config_mode.py | fdeloche/fmaskedCAP-model | dbedf25adfd022925948007268a607e8ea71f89f | [
"MIT"
] | null | null | null | config_mode.py | fdeloche/fmaskedCAP-model | dbedf25adfd022925948007268a607e8ea71f89f | [
"MIT"
] | null | null | null | config_mode.py | fdeloche/fmaskedCAP-model | dbedf25adfd022925948007268a607e8ea71f89f | [
"MIT"
] | null | null | null | #util module to share CAP mode (C/R/C+R) accross scripts
mode=None
def init(mode_str):
assert mode_str in ['C', 'R', 'C+R']
global mode
mode = mode_str
| 14.454545 | 56 | 0.672956 |
2aab7c814819d6b943b9e5b47ecffa8847fea751 | 6,274 | py | Python | homeassistant/generated/config_flows.py | khmelevskikh/core | f30f6234f9500965c68aeea710c5bd18db55ecb0 | [
"Apache-2.0"
] | null | null | null | homeassistant/generated/config_flows.py | khmelevskikh/core | f30f6234f9500965c68aeea710c5bd18db55ecb0 | [
"Apache-2.0"
] | 9 | 2022-01-26T06:25:43.000Z | 2022-03-31T07:15:42.000Z | homeassistant/generated/config_flows.py | khmelevskikh/core | f30f6234f9500965c68aeea710c5bd18db55ecb0 | [
"Apache-2.0"
] | null | null | null | """Automatically generated by hassfest.
To update, run python3 -m script.hassfest
"""
# fmt: off
FLOWS = [
"abode",
"accuweather",
"acmeda",
"adax",
"adguard",
"advantage_air",
"aemet",
"agent_dvr",
"airly",
"airnow",
"airthings",
"airtouch4",
"airvisual",
"ala... | 16.296104 | 41 | 0.516258 |
907ce1acebf8f044bd06f01d12d126527cef3447 | 5,553 | py | Python | sphinxcontrib/needs/roles/need_outgoing.py | danieleades/sphinxcontrib-needs | d2dc69bfa285f83f4a3713a9278f6892c6de6805 | [
"MIT"
] | null | null | null | sphinxcontrib/needs/roles/need_outgoing.py | danieleades/sphinxcontrib-needs | d2dc69bfa285f83f4a3713a9278f6892c6de6805 | [
"MIT"
] | 2 | 2022-02-13T19:49:18.000Z | 2022-02-13T19:49:18.000Z | sphinxcontrib/needs/roles/need_outgoing.py | danieleades/sphinxcontrib-needs | d2dc69bfa285f83f4a3713a9278f6892c6de6805 | [
"MIT"
] | null | null | null | from docutils import nodes
from sphinx.util.nodes import make_refnode
try:
from sphinx.errors import NoUri # Sphinx 3.0
except ImportError:
from sphinx.environment import NoUri # Sphinx < 3.0
from sphinxcontrib.needs.logging import get_logger
log = get_logger(__name__)
class NeedOutgoing(nodes.Inline, no... | 41.75188 | 109 | 0.518819 |
841638603589e66b184853e1ecd43aed49cdec99 | 3,389 | py | Python | python3.4Smartforest/lib/python3.4/site-packages/django/templatetags/cache.py | letouriste001/SmartForest_2.0 | 109b78bf1e8c8404800f377ab969395ccbb617be | [
"MIT"
] | null | null | null | python3.4Smartforest/lib/python3.4/site-packages/django/templatetags/cache.py | letouriste001/SmartForest_2.0 | 109b78bf1e8c8404800f377ab969395ccbb617be | [
"MIT"
] | null | null | null | python3.4Smartforest/lib/python3.4/site-packages/django/templatetags/cache.py | letouriste001/SmartForest_2.0 | 109b78bf1e8c8404800f377ab969395ccbb617be | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.core.cache import InvalidCacheBackendError, caches
from django.core.cache.utils import make_template_fragment_key
from django.template import (
Library, Node, TemplateSyntaxError, VariableDoesNotExist,
)
register = Library()
class CacheNode(Node):
def __in... | 3,389 | 3,389 | 0.636471 |
6396c5e606e114765763b94e2019eb61d9c7eef6 | 1,379 | py | Python | kblocks/__main__.py | SamuelMarks/kblocks | 461705c6e89d3ae1c2d3ee90e27c580e683062a9 | [
"MIT"
] | null | null | null | kblocks/__main__.py | SamuelMarks/kblocks | 461705c6e89d3ae1c2d3ee90e27c580e683062a9 | [
"MIT"
] | 1 | 2020-12-20T01:50:52.000Z | 2020-12-20T01:50:52.000Z | kblocks/__main__.py | SamuelMarks/kblocks | 461705c6e89d3ae1c2d3ee90e27c580e683062a9 | [
"MIT"
] | 1 | 2020-12-18T03:16:57.000Z | 2020-12-18T03:16:57.000Z | """
Generic entry-point for programs predominantly configured via `gin-config`.
Parses arbitrary config files and bindings. It is assumed that one of these
configures a `main.fn`.
Positional args are interpreted as paths to config files, with `.gin` appended
if missing. The environment variable `KB_CONFIG` is defined... | 30.644444 | 78 | 0.728064 |
8133365ce90cb779d163455265c28cf5659c2caf | 40,421 | py | Python | selectinf/randomized/lasso.py | kevinbfry/selective-inference | 4e846877b5c23969fc420b452f20cc3b16b6cb78 | [
"BSD-3-Clause"
] | 14 | 2015-09-01T19:31:25.000Z | 2021-11-26T08:47:10.000Z | selectinf/randomized/lasso.py | kevinbfry/selective-inference | 4e846877b5c23969fc420b452f20cc3b16b6cb78 | [
"BSD-3-Clause"
] | 7 | 2016-09-12T20:41:41.000Z | 2018-06-26T02:10:30.000Z | selectinf/randomized/lasso.py | kevinbfry/selective-inference | 4e846877b5c23969fc420b452f20cc3b16b6cb78 | [
"BSD-3-Clause"
] | 10 | 2015-09-01T19:31:28.000Z | 2021-02-23T01:16:20.000Z | from __future__ import print_function
import functools
from copy import copy
import numpy as np
from scipy.stats import norm as ndist
import regreg.api as rr
from ..algorithms.sqrt_lasso import solve_sqrt_lasso, choose_lambda
from .query import gaussian_query
from .randomization import randomization
from ..base im... | 33.65612 | 131 | 0.545484 |
1d5053a10a87b0da8a8a1b21f4bc14d366ffd8e7 | 12,949 | py | Python | snet_cli/identity.py | astroseger/snet-cli | 560358ea3dc5e43c6fd1668b2672d2ee2b191463 | [
"MIT"
] | null | null | null | snet_cli/identity.py | astroseger/snet-cli | 560358ea3dc5e43c6fd1668b2672d2ee2b191463 | [
"MIT"
] | 1 | 2019-04-12T19:07:31.000Z | 2019-04-12T19:07:31.000Z | snet_cli/identity.py | astroseger/snet-cli | 560358ea3dc5e43c6fd1668b2672d2ee2b191463 | [
"MIT"
] | null | null | null | import abc
import hashlib
import struct
import time
from pycoin.key.BIP32Node import BIP32Node
import ecdsa
import rlp
from eth_account.internal.transactions import serializable_unsigned_transaction_from_dict, encode_transaction, \
UnsignedTransaction
from eth_account.messages import defunct_hash_message
from mnem... | 42.179153 | 117 | 0.605452 |
d96ea8c35869800824b4fbee9fc96331f33ca736 | 3,447 | py | Python | tests/language/test_helpers.py | alurin/gvm | 03feca42c2ab56f26a7167b4a07213ce5c0fbdb4 | [
"MIT"
] | null | null | null | tests/language/test_helpers.py | alurin/gvm | 03feca42c2ab56f26a7167b4a07213ce5c0fbdb4 | [
"MIT"
] | null | null | null | tests/language/test_helpers.py | alurin/gvm | 03feca42c2ab56f26a7167b4a07213ce5c0fbdb4 | [
"MIT"
] | null | null | null | # Copyright (C) 2019-2020 Vasiliy Sheredeko
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import pytest
from gvm.exceptions import DiagnosticError
from gvm.language import Grammar
from gvm.language.combinators import TokenCombinator, ParseletC... | 31.916667 | 113 | 0.722947 |
3fbff57224f290c140a829650a10f835cd9b59e4 | 373 | py | Python | Lista7/sequencia_fibonacci/sequencia_fibonacci.py | KroosBR/Programa-o-Din-mica | 6d6dbbd7e2073faf4b5627e09e39445978d59dd2 | [
"MIT"
] | null | null | null | Lista7/sequencia_fibonacci/sequencia_fibonacci.py | KroosBR/Programa-o-Din-mica | 6d6dbbd7e2073faf4b5627e09e39445978d59dd2 | [
"MIT"
] | null | null | null | Lista7/sequencia_fibonacci/sequencia_fibonacci.py | KroosBR/Programa-o-Din-mica | 6d6dbbd7e2073faf4b5627e09e39445978d59dd2 | [
"MIT"
] | null | null | null | tb = [-1]*1005
def fib_dp(n):
global tb
if n == 0:
return 0
if n == 1:
return 1
if tb[n] != -1:
return tb[n]
tb[n] = (fib_dp(n - 1) + fib_dp(n - 2)) % 1000000007
return tb[n]
while True:
try:
n = int(input())
f = fib_dp(n)
print("fib({})= {... | 15.541667 | 56 | 0.439678 |
de256e518c463051029f6d58a76daa3c10de7179 | 14,731 | py | Python | main-back.py | p-sk/AlexaMeetingRoomBooking | 42c9cefa6cc085c51312fb9e1bcc66ea2e73fe23 | [
"MIT"
] | null | null | null | main-back.py | p-sk/AlexaMeetingRoomBooking | 42c9cefa6cc085c51312fb9e1bcc66ea2e73fe23 | [
"MIT"
] | null | null | null | main-back.py | p-sk/AlexaMeetingRoomBooking | 42c9cefa6cc085c51312fb9e1bcc66ea2e73fe23 | [
"MIT"
] | null | null | null | import json
import datetime
import isodate
import boto3
# Create clients
sns = boto3.client('sns')
dynamodb = boto3.resource('dynamodb', region_name='eu-west-1')
roomTable = dynamodb.Table('myrecords')
# Check if is there any booking fot that day
def isTimeAvailable(_order):
bookingData = roomTable.scan()["Ite... | 39.387701 | 163 | 0.388908 |
974290555a5c151629db03cbb3a7936676e25e71 | 3,455 | py | Python | kolibril_projects/physics/Zeemann/zeemann_final_bhigh.py | kolibril13/manim | 6a1e03ce79e5abb8bafbf11a7345b51aa7b0d333 | [
"MIT"
] | 5 | 2019-02-22T14:10:08.000Z | 2022-03-13T01:03:49.000Z | kolibril_projects/physics/Zeemann/zeemann_final_bhigh.py | kolibril13/manim | 6a1e03ce79e5abb8bafbf11a7345b51aa7b0d333 | [
"MIT"
] | 1 | 2021-04-15T08:02:43.000Z | 2021-04-15T09:46:42.000Z | kolibril_projects/physics/Zeemann/zeemann_final_bhigh.py | kolibril13/manim | 6a1e03ce79e5abb8bafbf11a7345b51aa7b0d333 | [
"MIT"
] | 1 | 2019-03-22T14:33:25.000Z | 2019-03-22T14:33:25.000Z | from manim import *
def z_func(z0, w0, t):
z_val= z0 * np.exp(1j*w0*t)
return z_val.real
def get_u(u0, w0, e, B0, m,t) :
u_val = u0 * np.exp(1j*(w0-(e*B0)/(2*m))*t)
return u_val
def get_v(u0, w0, e, B0, m,t) :
v_val = u0 * np.exp(1j*(w0+(e*B0)/(2*m))*t)
return v_val
class Zeemann1(Scene):
... | 35.255102 | 142 | 0.583502 |
32512e7aa8277497f397444fdf175b8d4a06a64a | 7,874 | py | Python | baselines/run.py | manorzvi/baselines | fed1596be3f400d080908e34993ed4c382fb8417 | [
"MIT"
] | null | null | null | baselines/run.py | manorzvi/baselines | fed1596be3f400d080908e34993ed4c382fb8417 | [
"MIT"
] | null | null | null | baselines/run.py | manorzvi/baselines | fed1596be3f400d080908e34993ed4c382fb8417 | [
"MIT"
] | null | null | null | import sys
import re
import multiprocessing
import os.path as osp
import gym
from collections import defaultdict
import tensorflow as tf
import numpy as np
from baselines.common.vec_env import VecFrameStack, VecNormalize, VecEnv
from baselines.common.vec_env.vec_video_recorder import VecVideoRecorder
from baselines.co... | 30.053435 | 158 | 0.641224 |
98220e5b7e77020f99fb73a65b76828cabd7d336 | 2,400 | py | Python | src/example/10.Motor_pairs/move_tank.py | rundhall/ESP-LEGO-SPIKE-Simulator | dc83b895ff2aac5cf2fe576d0ba98426fea60827 | [
"MIT"
] | null | null | null | src/example/10.Motor_pairs/move_tank.py | rundhall/ESP-LEGO-SPIKE-Simulator | dc83b895ff2aac5cf2fe576d0ba98426fea60827 | [
"MIT"
] | null | null | null | src/example/10.Motor_pairs/move_tank.py | rundhall/ESP-LEGO-SPIKE-Simulator | dc83b895ff2aac5cf2fe576d0ba98426fea60827 | [
"MIT"
] | null | null | null | '''move_tank(amount, unit='cm', left_speed=None, right_speed=None)
Moves the Driving Base using differential (tank) steering.
The speed of each motor can be controlled independently for differential (tank) drive Driving Bases.
When the specified unit is "cm" or "in," the "amount" of the unit parameter is equal to the h... | 55.813953 | 383 | 0.79125 |
846e8f817693093a86cd43440c1271aaa92ab921 | 7,164 | py | Python | pytplot/importers/sts_to_tplot.py | nickssl/PyTplot | 1c2d6c16647d09c4e2e1926432e6d929dd2ea83d | [
"MIT"
] | 12 | 2018-02-21T21:29:52.000Z | 2022-01-23T19:49:38.000Z | pytplot/importers/sts_to_tplot.py | nickssl/PyTplot | 1c2d6c16647d09c4e2e1926432e6d929dd2ea83d | [
"MIT"
] | 128 | 2018-07-25T22:38:44.000Z | 2022-01-17T06:21:58.000Z | pytplot/importers/sts_to_tplot.py | nickssl/PyTplot | 1c2d6c16647d09c4e2e1926432e6d929dd2ea83d | [
"MIT"
] | 25 | 2018-01-30T20:18:07.000Z | 2021-12-25T05:07:30.000Z | # Copyright 2017 Regents of the University of Colorado. All Rights Reserved.
# Released under the MIT license.
# This software was developed at the University of Colorado's Laboratory for Atmospheric and Space Physics.
# Verify current version before use at: https://github.com/MAVENSDC/Pydivide
import os
import dateti... | 39.147541 | 142 | 0.59129 |
d6e4e8034bad1b7fb5c2029ff1b524f2cea88290 | 3,711 | py | Python | twitter-crawler/scrapers/sentiments.py | GonzaloUlla/unlp-dbd-newsler | 67c9fa2c56f487f48f137c1512f7fcf420819200 | [
"MIT"
] | 1 | 2021-04-16T20:06:31.000Z | 2021-04-16T20:06:31.000Z | twitter-crawler/scrapers/sentiments.py | GonzaloUlla/unlp-dbd-newsler | 67c9fa2c56f487f48f137c1512f7fcf420819200 | [
"MIT"
] | 22 | 2020-04-12T22:47:22.000Z | 2020-06-01T04:03:08.000Z | twitter-crawler/scrapers/sentiments.py | GonzaloUlla/unlp-dbd-newsler | 67c9fa2c56f487f48f137c1512f7fcf420819200 | [
"MIT"
] | null | null | null | import re
import time
import logging
import os
import enchant
from string import punctuation
from nltk.corpus import stopwords, wordnet
from nltk.metrics import edit_distance
from nltk.tokenize import word_tokenize
from textblob import TextBlob
logging_level = os.getenv("LOGGING_LEVEL", "INFO")
formatter = '%(levelna... | 31.449153 | 112 | 0.64996 |
79bbabd2e6a196dc279f7725ba197e58fd7605ad | 3,187 | py | Python | src/rprblender/ui/object.py | Toorero/RadeonProRenderBlenderAddon | 46be6f11cfb90e1bc40180213862eb9d8b623c5f | [
"Apache-2.0"
] | 1 | 2021-08-23T19:29:46.000Z | 2021-08-23T19:29:46.000Z | src/rprblender/ui/object.py | wojtuss/RadeonProRenderBlenderAddon | 5ce2b5b61de8b6b802e58756f823c662808cf08a | [
"Apache-2.0"
] | null | null | null | src/rprblender/ui/object.py | wojtuss/RadeonProRenderBlenderAddon | 5ce2b5b61de8b6b802e58756f823c662808cf08a | [
"Apache-2.0"
] | null | null | null | #**********************************************************************
# Copyright 2020 Advanced Micro Devices, 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.o... | 35.808989 | 111 | 0.643238 |
db29f80a92b51fde2c68e7d39c1c9063dbc1730d | 3,180 | py | Python | setup.py | delbao/cassandra_perf | ac4170b8cc11a11260953119ef37d03a737c111b | [
"MIT"
] | null | null | null | setup.py | delbao/cassandra_perf | ac4170b8cc11a11260953119ef37d03a737c111b | [
"MIT"
] | null | null | null | setup.py | delbao/cassandra_perf | ac4170b8cc11a11260953119ef37d03a737c111b | [
"MIT"
] | null | null | null |
from __future__ import print_function
import os
import sys
from setuptools import setup
from setuptools import find_packages
from distutils.cmd import Command
long_description = ""
with open("README.rst") as f:
long_description = f.read()
class DocCommand(Command):
description = "generate or test documen... | 30.576923 | 111 | 0.569811 |
a89888a18dc60045e0c064b58f02038f14c61ce0 | 3,408 | py | Python | spyder/plugins/editor/widgets/tests/test_formatting.py | MarrMu-KoHTeT/spyder | 283920d3480008b06a98b82652c0112402b6e0bd | [
"MIT"
] | 1 | 2021-06-20T14:52:40.000Z | 2021-06-20T14:52:40.000Z | spyder/plugins/editor/widgets/tests/test_formatting.py | Pancakerr/spyder | 34a9878bba97f427fbdd7b4a6d77ac0651327565 | [
"MIT"
] | 1 | 2021-04-30T21:16:55.000Z | 2021-04-30T21:16:55.000Z | spyder/plugins/editor/widgets/tests/test_formatting.py | Pancakerr/spyder | 34a9878bba97f427fbdd7b4a6d77ac0651327565 | [
"MIT"
] | 1 | 2020-06-14T07:03:50.000Z | 2020-06-14T07:03:50.000Z | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
#
"""Tests for code formatting."""
# Standard library imports
import os.path as osp
# Third party imports
import pytest
# Qt imports
from qtpy.QtGui import QTextCursor
# Local imports
from spyder.confi... | 29.634783 | 77 | 0.705399 |
a6e33adf06037e37503e59de2259d98f7d093373 | 431 | py | Python | app/core/migrations/0005_recipe_image.py | danish21752/recipe-app-api-complete | b8fce9de31b787cb1ea4bdb8e9f238135c81a42f | [
"MIT"
] | null | null | null | app/core/migrations/0005_recipe_image.py | danish21752/recipe-app-api-complete | b8fce9de31b787cb1ea4bdb8e9f238135c81a42f | [
"MIT"
] | null | null | null | app/core/migrations/0005_recipe_image.py | danish21752/recipe-app-api-complete | b8fce9de31b787cb1ea4bdb8e9f238135c81a42f | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2021-04-23 21:48
import core.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0004_recipe'),
]
operations = [
migrations.AddField(
model_name='recipe',
name='image',
... | 21.55 | 93 | 0.62181 |
0133fc00421d32e72d50e6c933a89dce2281d878 | 2,138 | py | Python | setup.py | conestack/cone.app | 73501d35b850b89f49ba2c080d22d3c35c914010 | [
"BSD-2-Clause"
] | 1 | 2022-03-13T17:51:09.000Z | 2022-03-13T17:51:09.000Z | setup.py | conestack/cone.app | 73501d35b850b89f49ba2c080d22d3c35c914010 | [
"BSD-2-Clause"
] | 1 | 2021-08-06T08:12:00.000Z | 2021-08-06T08:12:00.000Z | setup.py | conestack/cone.app | 73501d35b850b89f49ba2c080d22d3c35c914010 | [
"BSD-2-Clause"
] | null | null | null | from setuptools import find_packages
from setuptools import setup
from setuptools.command.test import test
import os
def read_file(name):
with open(os.path.join(os.path.dirname(__file__), name)) as f:
return f.read()
version = '1.0.5.dev0'
shortdesc = 'Web application stub'
longdesc = '\n\n'.join([read_... | 22.744681 | 66 | 0.565014 |
28e2871ecb73d3a90fb39344efa04d2a08092266 | 1,570 | py | Python | epytope/Data/pssms/syfpeithi/mat/C_1701_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | null | null | null | epytope/Data/pssms/syfpeithi/mat/C_1701_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | null | null | null | epytope/Data/pssms/syfpeithi/mat/C_1701_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | null | null | null | C_1701_9 = {0: {'A': 0, 'C': 0, 'D': 0, 'E': 0, 'F': 3, 'G': 0, 'H': 0, 'I': 0, 'K': 0, 'L': 0, 'M': 0, 'N': 0, 'P': 0, 'Q': 0, 'R': 0, 'S': 1, 'T': 0, 'V': 0, 'W': 0, 'Y': 1, 'X': 0}, 1: {'A': 10, 'C': 0, 'D': 0, 'E': 0, 'F': 0, 'G': 0, 'H': 0, 'I': 6, 'K': 0, 'L': 8, 'M': 0, 'N': 0, 'P': 0, 'Q': 0, 'R': 0, 'S': 8, 'T... | 1,570 | 1,570 | 0.252866 |
0f5d35b5c87c15cc869fb28f56caed9022b964d7 | 2,024 | py | Python | config/settings/test.py | syoung19940/nomadgram | 8556ac51d6ee6c49079086d6785accf440758037 | [
"MIT"
] | null | null | null | config/settings/test.py | syoung19940/nomadgram | 8556ac51d6ee6c49079086d6785accf440758037 | [
"MIT"
] | 13 | 2020-06-05T18:23:55.000Z | 2022-03-03T22:32:50.000Z | config/settings/test.py | syoung19940/nomadgram | 8556ac51d6ee6c49079086d6785accf440758037 | [
"MIT"
] | null | null | null | """
With these settings, tests run faster.
"""
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = False
# https://docs.djangoproject.com/en/dev/ref/settings/#se... | 36.142857 | 113 | 0.546443 |
dc37521f3985d832e8b0087d69d7c33525d6a0e1 | 772 | py | Python | tests/inputs/buggy/cv_two_kernel_fixed_effect_linear_qqfit.N30.py | code-review-doctor/FaST-LMM | d1fdad820ebb80329b39cedf8e599ef33230487e | [
"Apache-2.0"
] | 27 | 2019-12-11T18:13:27.000Z | 2022-01-07T18:13:49.000Z | tests/inputs/buggy/cv_two_kernel_fixed_effect_linear_qqfit.N30.py | code-review-doctor/FaST-LMM | d1fdad820ebb80329b39cedf8e599ef33230487e | [
"Apache-2.0"
] | 26 | 2019-12-28T03:30:45.000Z | 2022-03-21T01:20:42.000Z | tests/inputs/buggy/cv_two_kernel_fixed_effect_linear_qqfit.N30.py | code-review-doctor/FaST-LMM | d1fdad820ebb80329b39cedf8e599ef33230487e | [
"Apache-2.0"
] | 12 | 2020-02-04T14:21:10.000Z | 2022-02-21T09:49:58.000Z | distributable = FastLmmSet(
phenofile = 'datasets/phenSynthFrom22.23.bin.N30.txt',
bedfilealt = 'datasets/all_chr.maf0.001.N30',
altset_list = 'datasets/set_input.23.txt',
covarfile = None,
filenull = 'datasets/all_chr.maf0.001.chr22.23.N30.bed',
autoselect = True,
mindist = 0,
... | 30.88 | 69 | 0.568653 |
4d7c09852c07e837c298ded2bac5b8a67ee10a17 | 207 | py | Python | fabfile/templates/rabbitmq_config_single_node.py | sunilbasker-jnpr/contrail-fabric-utils | c5855bbc4b0cf64ff98e844a8e2c1c1705bbdf83 | [
"Apache-2.0"
] | 2 | 2015-10-29T19:36:26.000Z | 2016-04-19T13:24:00.000Z | fabfile/templates/rabbitmq_config_single_node.py | sunilbasker-jnpr/contrail-fabric-utils | c5855bbc4b0cf64ff98e844a8e2c1c1705bbdf83 | [
"Apache-2.0"
] | 1 | 2017-07-03T09:10:18.000Z | 2017-07-03T09:10:18.000Z | fabfile/templates/rabbitmq_config_single_node.py | sunilbasker-jnpr/contrail-fabric-utils | c5855bbc4b0cf64ff98e844a8e2c1c1705bbdf83 | [
"Apache-2.0"
] | 18 | 2016-01-14T23:10:39.000Z | 2021-12-13T06:32:38.000Z | import string
template = string.Template("""[
{rabbit, [ {tcp_listeners, [{"$__control_intf_ip__", 5672}]},
{loopback_users, []},
{log_levels,[{connection, info},{mirroring, info}]} ]
}
].""")
| 23 | 64 | 0.613527 |
e86ad0fa68af064517c5d4bc90f03cebdfaff062 | 4,193 | py | Python | k8sv1/models/v1_key_to_path.py | pearsontechnology/k8sv1 | f9df106a4f2492d35af63b6bb2b1da4ed2b84579 | [
"Apache-2.0"
] | 1 | 2016-08-10T15:06:53.000Z | 2016-08-10T15:06:53.000Z | k8sv1/models/v1_key_to_path.py | pearsontechnology/k8sv1 | f9df106a4f2492d35af63b6bb2b1da4ed2b84579 | [
"Apache-2.0"
] | null | null | null | k8sv1/models/v1_key_to_path.py | pearsontechnology/k8sv1 | f9df106a4f2492d35af63b6bb2b1da4ed2b84579 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use ... | 27.768212 | 160 | 0.555211 |
71e5ec3e07d9054dda68a88f0ed218fd8b3ef778 | 2,680 | py | Python | build/sphinx/mongoc_common.py | samantharitter/mongo-c-driver | 3213098f6a283c2b73a50d76f39b70212b38f5f1 | [
"Apache-2.0"
] | 14 | 2018-06-16T04:49:50.000Z | 2021-04-10T03:18:40.000Z | build/sphinx/mongoc_common.py | samantharitter/mongo-c-driver | 3213098f6a283c2b73a50d76f39b70212b38f5f1 | [
"Apache-2.0"
] | 1 | 2021-06-28T14:22:32.000Z | 2021-06-28T14:22:32.000Z | build/sphinx/mongoc_common.py | samantharitter/mongo-c-driver | 3213098f6a283c2b73a50d76f39b70212b38f5f1 | [
"Apache-2.0"
] | 7 | 2018-06-14T10:15:32.000Z | 2020-11-06T17:07:09.000Z | import os
needs_sphinx = '1.6'
author = 'MongoDB, Inc'
# -- Options for HTML output ----------------------------------------------
smart_quotes = False
html_show_sourcelink = False
# Note: http://www.sphinx-doc.org/en/1.5.1/config.html#confval-html_copy_source
# This will degrade the Javascript quicksearch if we ev... | 31.529412 | 80 | 0.651119 |
ed811d4b4b28bde55b0aea045e679dad5654b9e1 | 337 | py | Python | erprint_layouts/config/docs.py | sleonardoaugusto/erprint_layouts | 62cdfde4f1ba5823dd335cbd491e79a904298171 | [
"MIT"
] | null | null | null | erprint_layouts/config/docs.py | sleonardoaugusto/erprint_layouts | 62cdfde4f1ba5823dd335cbd491e79a904298171 | [
"MIT"
] | 1 | 2019-01-02T18:49:41.000Z | 2019-01-02T18:51:20.000Z | erprint_layouts/config/docs.py | sleonardoaugusto/erprint_layouts | 62cdfde4f1ba5823dd335cbd491e79a904298171 | [
"MIT"
] | null | null | null | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/erprint_layouts"
# docs_base_url = "https://[org_name].github.io/erprint_layouts"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html = "... | 28.083333 | 68 | 0.738872 |
d4a51298a91d3776a2785dc97dfea18cac76b2f8 | 9,706 | py | Python | allennlp/commands/fine_tune.py | avinashsai/allennlp | 6da30e9d53bd2c8199848addc78ff0e29d79b542 | [
"Apache-2.0"
] | null | null | null | allennlp/commands/fine_tune.py | avinashsai/allennlp | 6da30e9d53bd2c8199848addc78ff0e29d79b542 | [
"Apache-2.0"
] | null | null | null | allennlp/commands/fine_tune.py | avinashsai/allennlp | 6da30e9d53bd2c8199848addc78ff0e29d79b542 | [
"Apache-2.0"
] | null | null | null | """
The ``fine-tune`` subcommand is used to continue training (or `fine-tune`) a model on a `different
dataset` than the one it was originally trained on. It requires a saved model archive file, a path
to the data you will continue training with, and a directory in which to write the results.
.. code-block:: bash
... | 43.137778 | 99 | 0.617762 |
13a8c617975ea77078a07fa2ae2cb106894ce29a | 2,080 | py | Python | tests/trainer/properties/test_get_model.py | Benjamin-Etheredge/pytorch-lightning | fe572c5911abfa2cc0b806b1c2cfe977d483c7c1 | [
"Apache-2.0"
] | 3 | 2020-04-11T01:39:41.000Z | 2022-03-09T16:21:01.000Z | tests/trainer/properties/test_get_model.py | Benjamin-Etheredge/pytorch-lightning | fe572c5911abfa2cc0b806b1c2cfe977d483c7c1 | [
"Apache-2.0"
] | 2 | 2021-03-22T00:20:28.000Z | 2021-06-25T11:35:33.000Z | tests/trainer/properties/test_get_model.py | Benjamin-Etheredge/pytorch-lightning | fe572c5911abfa2cc0b806b1c2cfe977d483c7c1 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 30.144928 | 115 | 0.734135 |
b0d8c03b3a09edd60cb895927de5ada6cf7ea766 | 52 | py | Python | c9_qt_modern/__init__.py | cubit9/c9_qt_modern | cae4fb667782cd49effd89031e5fc2937062fdda | [
"MIT"
] | null | null | null | c9_qt_modern/__init__.py | cubit9/c9_qt_modern | cae4fb667782cd49effd89031e5fc2937062fdda | [
"MIT"
] | null | null | null | c9_qt_modern/__init__.py | cubit9/c9_qt_modern | cae4fb667782cd49effd89031e5fc2937062fdda | [
"MIT"
] | null | null | null | __version__ = '0.1.3'
""" str: Package version. """
| 17.333333 | 29 | 0.596154 |
40b997c10c912f6b08afbdf51b6ea5e636a31b09 | 646 | py | Python | malib/algorithm/imitation/bc/trainer.py | zbzhu99/malib | 5be07ac00761a34fb095adb2b3018a798ceea256 | [
"MIT"
] | 258 | 2021-05-10T11:17:45.000Z | 2022-03-30T13:41:09.000Z | malib/algorithm/imitation/bc/trainer.py | zbzhu99/malib | 5be07ac00761a34fb095adb2b3018a798ceea256 | [
"MIT"
] | 28 | 2021-05-13T06:50:04.000Z | 2022-03-30T14:19:15.000Z | malib/algorithm/imitation/bc/trainer.py | zbzhu99/malib | 5be07ac00761a34fb095adb2b3018a798ceea256 | [
"MIT"
] | 34 | 2021-05-31T16:17:49.000Z | 2022-03-26T06:59:59.000Z | from typing import Any
from malib.algorithm.common.trainer import Trainer
from malib.algorithm.imitation.bc.policy import BC
from malib.algorithm.imitation.bc.loss import BCLoss
class BCTrainer(Trainer):
def __init__(self, tid):
super(BCTrainer, self).__init__(tid)
self._loss = BCLoss()
s... | 23.925926 | 63 | 0.664087 |
6f00f5d0065307fe680a50bad617b24aeca6785f | 5,283 | py | Python | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/stock_calendar/tests/test_stock_calendar.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | 1 | 2019-12-19T01:53:13.000Z | 2019-12-19T01:53:13.000Z | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/stock_calendar/tests/test_stock_calendar.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/stock_calendar/tests/test_stock_calendar.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime, timedelta
from odoo import fields
from odoo.tests import common
class TestsStockCalendar(common.TransactionCase):
def setUp(self):
super(TestsStockCalendar, self).setUp()
... | 51.794118 | 169 | 0.647359 |
bcb4c7b7425162829c9c2f30aca109b1c3361569 | 93 | py | Python | languages/python/src/tests/test_test_project.py | at0x0ft/VSCode-Remote-Container-Development-Environments | 023d7736e0877452e56a31321695be689cf16bec | [
"MIT"
] | null | null | null | languages/python/src/tests/test_test_project.py | at0x0ft/VSCode-Remote-Container-Development-Environments | 023d7736e0877452e56a31321695be689cf16bec | [
"MIT"
] | null | null | null | languages/python/src/tests/test_test_project.py | at0x0ft/VSCode-Remote-Container-Development-Environments | 023d7736e0877452e56a31321695be689cf16bec | [
"MIT"
] | null | null | null | from test_project import __version__
def test_version():
assert __version__ == '0.1.0'
| 15.5 | 36 | 0.731183 |
1de350a532fc30e88bcff6dec23ec6015dadffa4 | 8,516 | py | Python | Lib/site-packages/wx-3.0-msw/wx/lib/floatcanvas/Utilities/BBox.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | Lib/site-packages/wx-3.0-msw/wx/lib/floatcanvas/Utilities/BBox.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | Lib/site-packages/wx-3.0-msw/wx/lib/floatcanvas/Utilities/BBox.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | #!/usr/bin/env python
"""
A Bounding Box object and assorted utilities , subclassed from a numpy array
"""
import numpy as N
class BBox(N.ndarray):
"""
A Bounding Box object:
Takes Data as an array. Data is any python sequence that can be turned into a
2x2 numpy array of floats:
[[MinX, M... | 28.105611 | 107 | 0.566581 |
69fc9c784eb3214ce3d5c178b9d705940f9aa0e6 | 2,769 | py | Python | pyny/server.py | namuyan/pyny | c48f0aa9f61ab0628e08236c27ff4cde92d34f3b | [
"BSD-2-Clause"
] | 1 | 2020-02-29T03:41:17.000Z | 2020-02-29T03:41:17.000Z | pyny/server.py | namuyan/pyny | c48f0aa9f61ab0628e08236c27ff4cde92d34f3b | [
"BSD-2-Clause"
] | null | null | null | pyny/server.py | namuyan/pyny | c48f0aa9f61ab0628e08236c27ff4cde92d34f3b | [
"BSD-2-Clause"
] | null | null | null | '''Server.
'''
#
# Copyright (c) 2006 Pyny Project.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of ... | 26.883495 | 76 | 0.689419 |
4354bad81a039281dd048c688fc4f9509cde29df | 2,526 | py | Python | pyVersioning/GitHub.py | Paebbels/pyVersioning | b093ee13e4506bfa6a1ab93ecd6aa8ffe933044f | [
"Apache-2.0"
] | 3 | 2020-08-27T19:36:12.000Z | 2022-02-04T19:11:53.000Z | pyVersioning/GitHub.py | Paebbels/pyVersioning | b093ee13e4506bfa6a1ab93ecd6aa8ffe933044f | [
"Apache-2.0"
] | 6 | 2021-02-07T09:37:53.000Z | 2022-01-10T20:32:27.000Z | pyVersioning/GitHub.py | Paebbels/pyVersioning | b093ee13e4506bfa6a1ab93ecd6aa8ffe933044f | [
"Apache-2.0"
] | null | null | null | # =============================================================================
# __ __ _ _
# _ __ _ \ \ / /__ _ __ ___(_) ___ _ __ (_)_ __ __ _
# | '_ \| | | \ \ / / _ \ '__/ __| |/ _ \| '_ \| | '_ \ / _` |
# | |_) | |_| |\ V / __/ | \__ \ | (_) | | | | | | | | (_| |
# ... | 29.717647 | 79 | 0.542755 |
f03c4402e0ba76a4bb4ddb9aded0d957edc589cc | 412 | py | Python | fr/b.py | epeios-q37/hangman-fr-teacher | 57caf70cefbcd2c1235e310ebaf28addb928bf36 | [
"MIT"
] | null | null | null | fr/b.py | epeios-q37/hangman-fr-teacher | 57caf70cefbcd2c1235e310ebaf28addb928bf36 | [
"MIT"
] | null | null | null | fr/b.py | epeios-q37/hangman-fr-teacher | 57caf70cefbcd2c1235e310ebaf28addb928bf36 | [
"MIT"
] | null | null | null | # coding: utf-8
import sys
sys.path.append(".")
from workshop.fr.b import *
DIVULGUER_MOT_SECRET = VRAI
"""
- 'suggestion'; le contenu du champ texte du mot secret ;
utilisé seulement en mode 'dev'.
Retourne 'suggestion' si non vide, un mot quelconque sinon.
"""
def choisirMot(suggestion):
if l... | 17.166667 | 60 | 0.652913 |
fd6de2a09decc92be9e38c07108ecaeb5066893c | 24,087 | py | Python | pysph/solver/solver.py | suhasjains/pysph | df4e882ac790b2790ccd23fb1aaa66a049c2f7b1 | [
"BSD-3-Clause"
] | 3 | 2021-01-06T03:01:18.000Z | 2022-03-21T03:02:55.000Z | docker/water/sph/tags/pysph/pysph/solver/solver.py | liujiamingustc/phd | 4f815a738abad43531d02ac66f5bd0d9a1def52a | [
"Apache-2.0"
] | null | null | null | docker/water/sph/tags/pysph/pysph/solver/solver.py | liujiamingustc/phd | 4f815a738abad43531d02ac66f5bd0d9a1def52a | [
"Apache-2.0"
] | 1 | 2020-06-21T08:42:07.000Z | 2020-06-21T08:42:07.000Z | """ An implementation of a general solver base class """
# System library imports.
import os
import numpy
# PySPH imports
from pysph.base.kernels import CubicSpline
from pysph.sph.acceleration_eval import AccelerationEval
from pysph.sph.sph_compiler import SPHCompiler
from pysph.solver.utils import FloatPBar, load, ... | 32.073236 | 96 | 0.579109 |
871e2bbea74a44feebe806e08e787c1035de10de | 900 | py | Python | velbus/messages/counter_status_request.py | NelisG/python-velbus | b3402d497a1258723a952f0fdf39b755d04768f3 | [
"MIT"
] | 12 | 2018-01-02T11:12:33.000Z | 2021-12-03T08:48:42.000Z | velbus/messages/counter_status_request.py | NelisG/python-velbus | b3402d497a1258723a952f0fdf39b755d04768f3 | [
"MIT"
] | 33 | 2017-11-19T15:14:02.000Z | 2021-12-09T12:16:26.000Z | velbus/messages/counter_status_request.py | NelisG/python-velbus | b3402d497a1258723a952f0fdf39b755d04768f3 | [
"MIT"
] | 22 | 2017-11-19T09:47:56.000Z | 2021-08-23T18:39:49.000Z | """
:author: Maikel Punie <maikel.punie@gmail.com>
"""
from velbus.message import Message
from velbus.command_registry import register_command
COMMAND_CODE = 0xBD
class CounterStatusRequestMessage(Message):
"""
send by:
received by: VMB7IN
"""
def __init__(self, address=None):
Message.__... | 23.076923 | 69 | 0.645556 |
4dc674b850b8d84f5a789f7fa5eb46496d0ca757 | 382 | py | Python | searchBar/booking/tokens.py | rajvijen/Industry-Visit-Planning-and-Booking | fe54f9f354eb88cd78b1bc18a61908fe7de03577 | [
"MIT"
] | null | null | null | searchBar/booking/tokens.py | rajvijen/Industry-Visit-Planning-and-Booking | fe54f9f354eb88cd78b1bc18a61908fe7de03577 | [
"MIT"
] | 8 | 2019-09-05T04:58:20.000Z | 2022-01-13T00:58:01.000Z | searchBar/booking/tokens.py | rajvijen/ASE-101 | fe54f9f354eb88cd78b1bc18a61908fe7de03577 | [
"MIT"
] | 5 | 2018-11-15T19:04:29.000Z | 2018-11-17T06:10:38.000Z | from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.utils import six
class TokenGenerator(PasswordResetTokenGenerator):
def _make_hash_value(self, user, timestamp):
return (
six.text_type(user.pk) + six.text_type(timestamp) +
six.text_type(user.is_act... | 38.2 | 67 | 0.717277 |
c0b855b69932dd2c23e5b22c43c04d82c97cfe5b | 2,317 | py | Python | src/core/toga/__init__.py | czoop/toga | 2b490e1b723d1fc1af451b8348d87c9c64c92678 | [
"BSD-3-Clause"
] | null | null | null | src/core/toga/__init__.py | czoop/toga | 2b490e1b723d1fc1af451b8348d87c9c64c92678 | [
"BSD-3-Clause"
] | null | null | null | src/core/toga/__init__.py | czoop/toga | 2b490e1b723d1fc1af451b8348d87c9c64c92678 | [
"BSD-3-Clause"
] | null | null | null | from .app import App, DocumentApp, MainWindow
from .command import Command, CommandSet, Group, GROUP_BREAK, SECTION_BREAK
from .documents import Document
from .keys import Key
# Resources
from .colors import hsl, hsla, rgb, rgba
from .fonts import Font
from .icons import Icon
from .images import Image
# Widgets
from ... | 25.461538 | 75 | 0.70997 |
d2d8c7d34603d9f62e5c884fea6fd66639a413ca | 1,552 | py | Python | test.py | testlnord/entity_matching_tool | 6b965d6b2f8418000369e79264f4ce0c1b1cb64f | [
"MIT"
] | 2 | 2017-06-14T13:43:03.000Z | 2019-02-15T19:20:03.000Z | test.py | testlnord/entity_matching_tool | 6b965d6b2f8418000369e79264f4ce0c1b1cb64f | [
"MIT"
] | 16 | 2017-03-20T08:10:12.000Z | 2017-03-23T10:00:03.000Z | test.py | testlnord/entity_matching_tool | 6b965d6b2f8418000369e79264f4ce0c1b1cb64f | [
"MIT"
] | 4 | 2017-10-11T11:12:18.000Z | 2018-07-03T09:46:01.000Z | from requests import get, post, delete
from entity_matching_tool import db
from entity_matching_tool.config import app_config
if __name__ == "__main__":
username = 'admin'
password = 'qwerty'
info = post('http://{}/regist/'.format(app_config.SERVER_NAME),
json=dict(userName=username, passw... | 47.030303 | 116 | 0.657216 |
bce27773492f4259ecc7c422a2894b75a234a3d0 | 1,409 | py | Python | src/utils/data_mgmt.py | asitnayak/MLflow-CNN-app | 65014544f3429d91859885d78fa4e8bd4fe563da | [
"MIT"
] | null | null | null | src/utils/data_mgmt.py | asitnayak/MLflow-CNN-app | 65014544f3429d91859885d78fa4e8bd4fe563da | [
"MIT"
] | null | null | null | src/utils/data_mgmt.py | asitnayak/MLflow-CNN-app | 65014544f3429d91859885d78fa4e8bd4fe563da | [
"MIT"
] | null | null | null | import imp
from src.utils.common import create_directories
import shutil
import imghdr
import os
from PIL import Image
import logging
def validate_image(config: dict) -> None:
PARENT_DIR = os.path.join(config['data']['unzip_data_dir'], config['data']['parent_data_dir'])
BAD_DATA_DIR = os.path.join(config['dat... | 41.441176 | 98 | 0.622427 |
6de14fea05d7bac4a2e5242e519a5ca5c2e1c70c | 23,307 | py | Python | powerline/lint/spec.py | elventear/powerline | cddfc364c1bf269f721dfdbd765cde2649a3410d | [
"MIT"
] | 1 | 2015-02-16T09:40:07.000Z | 2015-02-16T09:40:07.000Z | powerline/lint/spec.py | elventear/powerline | cddfc364c1bf269f721dfdbd765cde2649a3410d | [
"MIT"
] | null | null | null | powerline/lint/spec.py | elventear/powerline | cddfc364c1bf269f721dfdbd765cde2649a3410d | [
"MIT"
] | null | null | null | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
import itertools
import re
from copy import copy
from powerline.lib.unicode import unicode
from powerline.lint.markedjson.error import echoerr, DelayedEchoErr, NON_PRINTABLE_STR
from powerline.lint.self... | 30.911141 | 111 | 0.686232 |
707f88e58d6472a6e0cb85b324203cd06c186b3f | 4,039 | py | Python | modules/cnn/training_models/3d_resnet.py | mevol/pediip | 5e3c322c4a2dcdc431a9e1c6153c63ef1d1be5fb | [
"BSD-3-Clause"
] | 1 | 2021-09-23T00:44:32.000Z | 2021-09-23T00:44:32.000Z | modules/cnn/training_models/3d_resnet.py | mevol/pediip | 5e3c322c4a2dcdc431a9e1c6153c63ef1d1be5fb | [
"BSD-3-Clause"
] | 1 | 2021-06-23T10:39:16.000Z | 2021-06-23T10:39:16.000Z | modules/cnn/training_models/3d_resnet.py | mevol/pediip | 5e3c322c4a2dcdc431a9e1c6153c63ef1d1be5fb | [
"BSD-3-Clause"
] | 1 | 2020-07-20T06:27:00.000Z | 2020-07-20T06:27:00.000Z | """Testing with training_pipeline"""
from typing import Tuple
from keras import Sequential, optimizers
from keras.models import Model
from keras.layers.convolutional import Conv3D, ZeroPadding3D
from keras.layers.convolutional import MaxPooling3D, AveragePooling3D
from keras.layers import Dropout, Input
from keras.la... | 39.213592 | 119 | 0.677148 |
669a6f78191960390d077ab511eb7d467940aed0 | 353 | py | Python | 001. Two Sum.py | patrick-luo/Leet-Code | 989ec20c1069ce93e1d0e9ae4a4dfc59b1b1622a | [
"MIT"
] | null | null | null | 001. Two Sum.py | patrick-luo/Leet-Code | 989ec20c1069ce93e1d0e9ae4a4dfc59b1b1622a | [
"MIT"
] | null | null | null | 001. Two Sum.py | patrick-luo/Leet-Code | 989ec20c1069ce93e1d0e9ae4a4dfc59b1b1622a | [
"MIT"
] | null | null | null | class Solution(object):
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
memo = dict()
for i,ni in enumerate(nums):
if (target-ni) in memo:
return [memo[target-ni], i]
els... | 23.533333 | 43 | 0.444759 |
90b81fcd7468092b1cc3f44b5aefcece913482f1 | 2,175 | py | Python | handlers/scgihandler.py | jessicadelrio/HandyHouse | 058e8981da850790c84f990fd2a3bbcf9aa695cc | [
"BSD-3-Clause"
] | 21 | 2018-02-16T17:43:59.000Z | 2021-12-29T12:08:28.000Z | handlers/scgihandler.py | jessicadelrio/HandyHouse | 058e8981da850790c84f990fd2a3bbcf9aa695cc | [
"BSD-3-Clause"
] | 26 | 2015-01-02T13:35:48.000Z | 2015-06-10T14:39:07.000Z | handlers/scgihandler.py | jessicadelrio/HandyHouse | 058e8981da850790c84f990fd2a3bbcf9aa695cc | [
"BSD-3-Clause"
] | 8 | 2018-10-08T03:48:00.000Z | 2022-03-31T12:13:01.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
scgihandler.py - handler for SCGI protocol
Modified by Michele Comitini <michele.comitini@glisco.it>
from fcgihandler.py to support SCGI
fcgihandler has the following copyright:
" This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipi... | 27.531646 | 84 | 0.663448 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.