hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1135405a7392df4fcab654f5f585d507f9f5e9 | 24,200 | py | Python | tornado/netutil.py | graingert/tornado | e4615991845d12bb2aebec4adb689b5cc7214060 | [
"Apache-2.0"
] | null | null | null | tornado/netutil.py | graingert/tornado | e4615991845d12bb2aebec4adb689b5cc7214060 | [
"Apache-2.0"
] | null | null | null | tornado/netutil.py | graingert/tornado | e4615991845d12bb2aebec4adb689b5cc7214060 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2011 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.230769 | 86 | 0.651777 |
4a1135c33c57c85889c442c625d2eb32bbbe8c3f | 16,364 | bzl | Python | apple/bundling/bundling_support.bzl | kastiglione/rules_apple | 3745c3f03b9d29a04671fd4fac96468ca7031fd6 | [
"Apache-2.0"
] | 2 | 2019-09-01T06:06:40.000Z | 2020-11-10T00:37:01.000Z | apple/bundling/bundling_support.bzl | c-parsons/rules_apple | f75c4b1be219cb32704d900bd1a42ab200eab445 | [
"Apache-2.0"
] | null | null | null | apple/bundling/bundling_support.bzl | c-parsons/rules_apple | f75c4b1be219cb32704d900bd1a42ab200eab445 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Bazel 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 applicable la... | 38.233645 | 84 | 0.683085 |
4a11372478483a8159ac0267ea70862a9765a2b0 | 23,546 | py | Python | SDK/test_integration_config_helpers.py | queueit/KnownUser.V3.Python | 2e9e429451221b650209dabd6df6b3e420a8ac34 | [
"MIT"
] | 2 | 2019-07-04T11:09:45.000Z | 2021-04-02T17:28:15.000Z | SDK/test_integration_config_helpers.py | queueit/KnownUser.V3.Python | 2e9e429451221b650209dabd6df6b3e420a8ac34 | [
"MIT"
] | null | null | null | SDK/test_integration_config_helpers.py | queueit/KnownUser.V3.Python | 2e9e429451221b650209dabd6df6b3e420a8ac34 | [
"MIT"
] | 3 | 2019-06-30T18:51:32.000Z | 2021-11-15T19:57:11.000Z | import unittest
from queueit_knownuserv3.integration_config_helpers import *
from queueit_knownuserv3.http_context_providers import HttpContextProvider
class HttpContextProviderMock(HttpContextProvider):
def __init__(self):
self.headers = {}
self.cookies = {}
self.body = ""
def getHe... | 39.440536 | 80 | 0.499193 |
4a11377d66d8a74156993558b043b46f32fa7b97 | 2,818 | py | Python | main.py | prasanthr/sftp-transfer | 984020501f91265053894998ff0aec93836dab3f | [
"Apache-2.0"
] | null | null | null | main.py | prasanthr/sftp-transfer | 984020501f91265053894998ff0aec93836dab3f | [
"Apache-2.0"
] | null | null | null | main.py | prasanthr/sftp-transfer | 984020501f91265053894998ff0aec93836dab3f | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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 agreed to in writing, ... | 31.662921 | 86 | 0.683109 |
4a11378f4378e739a228a6b5adfb1fd57ae39f3c | 1,580 | py | Python | luta/text_finder.py | keremkoseoglu/luta | 380b83ed9536dd69a573d5b7d34be63573a147fa | [
"MIT"
] | null | null | null | luta/text_finder.py | keremkoseoglu/luta | 380b83ed9536dd69a573d5b7d34be63573a147fa | [
"MIT"
] | 2 | 2022-03-13T06:40:56.000Z | 2022-03-31T09:55:37.000Z | luta/text_finder.py | keremkoseoglu/luta | 380b83ed9536dd69a573d5b7d34be63573a147fa | [
"MIT"
] | null | null | null | """ Text finder module """
import re
class FoundText():
_UNCLEANS = ["\n"]
_ESCAPES = [{"from": "&", "to": "&"},
{"from": "<", "to": "<"},
{"from": ">", "to": ">"}]
""" Found text class """
def __init__(self, value: str = "", start: int = 0, end: int = 0, fo... | 31.6 | 91 | 0.551266 |
4a1137f2740c9aa0ad33c6947ee1133f26a81ad0 | 1,055 | py | Python | wntr/tests/test_minor_loss.py | algchyhao/WNTR | dd4db188a8641a4da16cf80a1557c908fa48c17d | [
"BSD-3-Clause"
] | null | null | null | wntr/tests/test_minor_loss.py | algchyhao/WNTR | dd4db188a8641a4da16cf80a1557c908fa48c17d | [
"BSD-3-Clause"
] | null | null | null | wntr/tests/test_minor_loss.py | algchyhao/WNTR | dd4db188a8641a4da16cf80a1557c908fa48c17d | [
"BSD-3-Clause"
] | null | null | null | import unittest
from nose import SkipTest
import wntr
class TestMinorLosses(unittest.TestCase):
@classmethod
def setUpClass(self):
pass
@classmethod
def tearDownClass(self):
pass
def test_pipe_minor_loss(self):
wn = wntr.network.WaterNetworkModel()
wn.options.tim... | 28.513514 | 90 | 0.621801 |
4a11395b341a127c81515040bf8a9225dfcfd84a | 2,455 | py | Python | load_reward_figure.py | ganggit/rlexp | d4600df8db260f6d79132e7dc5156d8b5a86d845 | [
"MIT"
] | null | null | null | load_reward_figure.py | ganggit/rlexp | d4600df8db260f6d79132e7dc5156d8b5a86d845 | [
"MIT"
] | null | null | null | load_reward_figure.py | ganggit/rlexp | d4600df8db260f6d79132e7dc5156d8b5a86d845 | [
"MIT"
] | null | null | null | import pickle
# libraries
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
makerList = ['o', '*', '+', 'D', 's', '-']
#labelList= ["greedy", "random", "e-greedy", "boltzmann", "bayesian"]
labelList = ["vallina actor-critic", "active actor-critic",
"e-greedy", "boltzmann", "b... | 30.308642 | 111 | 0.664766 |
4a113a90d3c77f2bfac116c336170bde2b874dba | 107 | py | Python | dbconfig.py | thenriq/data-representation-project | 37bce3978be94bc8eec896c19e3ee3bdf90c8b35 | [
"MIT"
] | 1 | 2021-12-27T22:11:41.000Z | 2021-12-27T22:11:41.000Z | dbconfig.py | thenriq/data-representation-project | 37bce3978be94bc8eec896c19e3ee3bdf90c8b35 | [
"MIT"
] | null | null | null | dbconfig.py | thenriq/data-representation-project | 37bce3978be94bc8eec896c19e3ee3bdf90c8b35 | [
"MIT"
] | null | null | null | mysql={
'host':"localhost",
'user':'root',
'password':'',
'database':'datarepresentation'
} | 17.833333 | 35 | 0.560748 |
4a113c2689e6e193e6d4ea431911caf493c421cd | 2,859 | py | Python | grasp_python/src/grasp.py | dandmetal/Grasp-Based-On-Lateral-Curvatures-and-Geometric-Primitives | d07f7110739435f1760694d96d8eae51681edd5d | [
"MIT"
] | null | null | null | grasp_python/src/grasp.py | dandmetal/Grasp-Based-On-Lateral-Curvatures-and-Geometric-Primitives | d07f7110739435f1760694d96d8eae51681edd5d | [
"MIT"
] | null | null | null | grasp_python/src/grasp.py | dandmetal/Grasp-Based-On-Lateral-Curvatures-and-Geometric-Primitives | d07f7110739435f1760694d96d8eae51681edd5d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
import pcl
import grasp_filters
import grasp_helper
from obj_parts import ObjParts
import operator
def grasp(cloud, g_h = 0.04, g_w = 0.14, n = 6):
"""
Estimate the best grasp and return the best grasp location.
Pa... | 28.306931 | 74 | 0.583771 |
4a113c6bacb51f68108c17e9310b6ac6420cbea9 | 12,473 | py | Python | glom/mutation.py | yomagroup/glom | d4e2f2c5469db5fb8f727d44b4742d5e143d2874 | [
"BSD-3-Clause"
] | 1,470 | 2018-04-30T22:58:39.000Z | 2022-03-30T13:05:44.000Z | glom/mutation.py | yomagroup/glom | d4e2f2c5469db5fb8f727d44b4742d5e143d2874 | [
"BSD-3-Clause"
] | 230 | 2018-05-01T12:28:37.000Z | 2022-02-10T06:47:16.000Z | glom/mutation.py | yomagroup/glom | d4e2f2c5469db5fb8f727d44b4742d5e143d2874 | [
"BSD-3-Clause"
] | 56 | 2018-05-09T23:11:39.000Z | 2022-02-12T01:36:31.000Z | """By default, glom aims to safely return a transformed copy of your
data. But sometimes you really need to transform an existing object.
When you already have a large or complex bit of nested data that you
are sure you want to modify in-place, glom has you covered, with the
:func:`~glom.assign` function, and the :fun... | 34.455801 | 103 | 0.598974 |
4a113daf13e31932187c94eff9ba76b5d56969f1 | 5,920 | py | Python | weibo/settings.py | YiChengCai1999/SinaWeiboCrawler | 0f65c6c96926ee0a599b7833a95ef2cc77420683 | [
"Apache-2.0"
] | null | null | null | weibo/settings.py | YiChengCai1999/SinaWeiboCrawler | 0f65c6c96926ee0a599b7833a95ef2cc77420683 | [
"Apache-2.0"
] | null | null | null | weibo/settings.py | YiChengCai1999/SinaWeiboCrawler | 0f65c6c96926ee0a599b7833a95ef2cc77420683 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for weibo project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/topics/d... | 41.985816 | 244 | 0.710642 |
4a113db1cef94cd177808f09f4048cc170999085 | 760 | bzl | Python | third_party/tf_runtime/workspace.bzl | triper1022/tensorflow | 18c576ac70b7995e0390db80e067cd9b0305e984 | [
"Apache-2.0"
] | 1 | 2021-06-04T04:02:31.000Z | 2021-06-04T04:02:31.000Z | third_party/tf_runtime/workspace.bzl | triper1022/tensorflow | 18c576ac70b7995e0390db80e067cd9b0305e984 | [
"Apache-2.0"
] | null | null | null | third_party/tf_runtime/workspace.bzl | triper1022/tensorflow | 18c576ac70b7995e0390db80e067cd9b0305e984 | [
"Apache-2.0"
] | null | null | null | """Provides the repository macro to import TFRT."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo():
"""Imports TFRT."""
# Attention: tools parse and update these lines.
TFRT_COMMIT = "ef99b130971cbbc43b8201d3545e9198c1be5ae0"
TFRT_SHA256 = "c8db5cd07d49f8f7fd60ac3bcf8cb29a7922858a6114fa... | 36.190476 | 126 | 0.680263 |
4a11401d3d190472c0f0006fb77a1f01bf01a010 | 1,484 | py | Python | batch_rl/fixed_replay/agents/incrementalwrbetting.py | pmineiro/batch_rl | 21ae1411107616bdcdd4f785075d75392623a9e4 | [
"Apache-2.0"
] | null | null | null | batch_rl/fixed_replay/agents/incrementalwrbetting.py | pmineiro/batch_rl | 21ae1411107616bdcdd4f785075d75392623a9e4 | [
"Apache-2.0"
] | null | null | null | batch_rl/fixed_replay/agents/incrementalwrbetting.py | pmineiro/batch_rl | 21ae1411107616bdcdd4f785075d75392623a9e4 | [
"Apache-2.0"
] | null | null | null | class IncrementalWRBetting:
def __init__(self, decay, taumax=0.99):
from math import floor, log
assert 0 < decay <= 1
self.decay = decay
self.n = 0
self.sumwr = 0
self.sumwrsq = 0
assert 0 <= taumax < 1
self.taumax = taumax
def tfhook(self, gamma... | 28 | 92 | 0.506065 |
4a1141543e20ea44282b9af00f47d9f7c644bdfa | 337 | py | Python | APICanalLuciernaga/programacion/migrations/0002_remove_horaprogramacion_categoria_p.py | ErickMurillo/canal-luciernaga | 3839b2bf03aea4f5336e0b2899845dc6ec38ee04 | [
"MIT"
] | null | null | null | APICanalLuciernaga/programacion/migrations/0002_remove_horaprogramacion_categoria_p.py | ErickMurillo/canal-luciernaga | 3839b2bf03aea4f5336e0b2899845dc6ec38ee04 | [
"MIT"
] | null | null | null | APICanalLuciernaga/programacion/migrations/0002_remove_horaprogramacion_categoria_p.py | ErickMurillo/canal-luciernaga | 3839b2bf03aea4f5336e0b2899845dc6ec38ee04 | [
"MIT"
] | 1 | 2019-09-09T22:29:07.000Z | 2019-09-09T22:29:07.000Z | # Generated by Django 2.2.3 on 2019-10-22 19:17
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('programacion', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='horaprogramacion',
name='categoria_p',
... | 18.722222 | 47 | 0.602374 |
4a11417b2f71f8981ffa465f27360923690a18f8 | 7,740 | py | Python | qa/rpc-tests/abandonconflict.py | Patrick-W-McMahon/MagMellDollar | cb5a139e3a1d8f3196d7f1d25321d9839b51295b | [
"MIT"
] | null | null | null | qa/rpc-tests/abandonconflict.py | Patrick-W-McMahon/MagMellDollar | cb5a139e3a1d8f3196d7f1d25321d9839b51295b | [
"MIT"
] | null | null | null | qa/rpc-tests/abandonconflict.py | Patrick-W-McMahon/MagMellDollar | cb5a139e3a1d8f3196d7f1d25321d9839b51295b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Magmelldollar Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import MagmelldollarTestFramework
from test_framework.util impo... | 48.074534 | 135 | 0.653101 |
4a11419472acfdfe69dbbb4d01827d914943fe4a | 3,036 | py | Python | isi_sdk_8_2_0/isi_sdk_8_2_0/models/nfs_check_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_0/isi_sdk_8_2_0/models/nfs_check_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_0/isi_sdk_8_2_0/models/nfs_check_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 7
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_2_0.models.nfs_che... | 26.4 | 80 | 0.561924 |
4a1141e093de87b828047b78f1def262d361d6b1 | 1,029 | py | Python | ug_term/ugopen.py | peteigel/ug-term | 8394ec8364131c88ed4194ba473d34d62794399d | [
"MIT"
] | null | null | null | ug_term/ugopen.py | peteigel/ug-term | 8394ec8364131c88ed4194ba473d34d62794399d | [
"MIT"
] | null | null | null | ug_term/ugopen.py | peteigel/ug-term | 8394ec8364131c88ed4194ba473d34d62794399d | [
"MIT"
] | null | null | null | import requests
import re
import sys
from . import app_parser
class UGTabData:
def __init__(self, data=None):
self.content = None
if data is not None:
self.parse(data)
def parse(self, data):
try:
self.content = data['data']['tab_view']['wiki_tab']['content... | 23.930233 | 74 | 0.594752 |
4a11420c8d81adc257958818db7d5c3668785cab | 807 | py | Python | examples/dot3k/basic/ipaddr.py | axelsimon/displayotron | 42315c47eb50d2f95d1fcade389ff57ad73e1b83 | [
"MIT"
] | 49 | 2017-06-07T05:09:23.000Z | 2021-10-08T14:32:05.000Z | examples/dot3k/basic/ipaddr.py | axelsimon/displayotron | 42315c47eb50d2f95d1fcade389ff57ad73e1b83 | [
"MIT"
] | 19 | 2017-08-07T21:17:00.000Z | 2022-01-07T09:02:42.000Z | examples/dot3k/basic/ipaddr.py | axelsimon/displayotron | 42315c47eb50d2f95d1fcade389ff57ad73e1b83 | [
"MIT"
] | 22 | 2017-06-07T05:09:25.000Z | 2021-08-17T10:52:58.000Z | #!/usr/bin/env python
import fcntl
import socket
import struct
import dot3k.lcd as lcd
def get_addr(ifname):
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.fileno(),
0x8915, # SIOCGIFADDR
struct.pack('256s', i... | 19.682927 | 60 | 0.63197 |
4a11420e81fa7a330540cc4b9656aa8eec2af167 | 1,801 | py | Python | tests/conftest.py | pbdtools/xfds | 37c527c4ee5b1f6e2c0b9faa2e403fd49b1cc379 | [
"MIT"
] | null | null | null | tests/conftest.py | pbdtools/xfds | 37c527c4ee5b1f6e2c0b9faa2e403fd49b1cc379 | [
"MIT"
] | 16 | 2022-02-20T18:56:35.000Z | 2022-03-02T17:35:27.000Z | tests/conftest.py | pbdtools/xfds | 37c527c4ee5b1f6e2c0b9faa2e403fd49b1cc379 | [
"MIT"
] | null | null | null | """Tests for command line interface."""
from pathlib import Path
from typing import Generator
import pytest
from xfds import core
@pytest.fixture
def xfds_datadir() -> Path:
"""Return the path to the xfds data directory."""
return Path(__file__).parent / "data"
@pytest.fixture
def latest() -> str:
"""... | 23.38961 | 69 | 0.674625 |
4a11424247cd4f3cc156c9f16c2ee2cc74536fa5 | 1,450 | py | Python | superset/db_engine_specs/dremio.py | AmritaTech/superset | c685c9ea8fa70ba6646617d0a272c11e1130081c | [
"Apache-2.0"
] | 44 | 2021-04-14T10:53:36.000Z | 2021-09-11T00:29:50.000Z | superset/db_engine_specs/dremio.py | AmritaTech/superset | c685c9ea8fa70ba6646617d0a272c11e1130081c | [
"Apache-2.0"
] | 77 | 2020-02-02T07:54:13.000Z | 2022-03-23T18:22:04.000Z | superset/db_engine_specs/dremio.py | AmritaTech/superset | c685c9ea8fa70ba6646617d0a272c11e1130081c | [
"Apache-2.0"
] | 11 | 2021-06-09T08:30:57.000Z | 2021-11-30T03:16:14.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... | 36.25 | 62 | 0.673793 |
4a11429bfb96fc6b65cb25754bf7a1a17666361a | 17,003 | py | Python | systemrdl/compiler.py | jasonpjacobs/systemrdl-compiler | e3fdaf53b6c605a24d6e1149817f3636a85aed09 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | systemrdl/compiler.py | jasonpjacobs/systemrdl-compiler | e3fdaf53b6c605a24d6e1149817f3636a85aed09 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | systemrdl/compiler.py | jasonpjacobs/systemrdl-compiler | e3fdaf53b6c605a24d6e1149817f3636a85aed09 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | from typing import Set, Type, Any, List, Dict, Optional, Iterable
from antlr4 import InputStream
from . import messages
from . import warnings
from .parser import sa_systemrdl
from .core.ComponentVisitor import RootVisitor
from .core.ExprVisitor import ExprVisitor
from .core.properties import PropertyRuleBook, Builti... | 35.130165 | 158 | 0.62489 |
4a1142d258868188817280bbcf4be830bb9513fa | 1,906 | py | Python | tests/h/services/delete_group_test.py | pombredanne/h | 9c4c2dc0d53ed5bed5183936c24b4c27b23070b4 | [
"BSD-2-Clause"
] | 2,103 | 2015-01-07T12:47:49.000Z | 2022-03-29T02:38:25.000Z | tests/h/services/delete_group_test.py | pombredanne/h | 9c4c2dc0d53ed5bed5183936c24b4c27b23070b4 | [
"BSD-2-Clause"
] | 4,322 | 2015-01-04T17:18:01.000Z | 2022-03-31T17:06:02.000Z | tests/h/services/delete_group_test.py | admariner/h | 25ef1b8d94889df86ace5a084f1aa0effd9f4e25 | [
"BSD-2-Clause"
] | 389 | 2015-01-24T04:10:02.000Z | 2022-03-28T08:00:16.000Z | from unittest import mock
import pytest
from h.services.annotation_delete import AnnotationDeleteService
from h.services.delete_group import (
DeleteGroupService,
DeletePublicGroupError,
delete_group_service_factory,
)
@pytest.mark.usefixtures("annotation_delete_service")
class TestDeleteGroupService:
... | 28.878788 | 85 | 0.727702 |
4a1142e3012cdf87b79ac8fa303c0ac3700f64d1 | 1,761 | py | Python | app/libs/quest_queue.py | Jiubei0408/jiudge-backend | c743274d76fdfe2be8b16b5bcf5a68c64fbc4272 | [
"Apache-2.0"
] | null | null | null | app/libs/quest_queue.py | Jiubei0408/jiudge-backend | c743274d76fdfe2be8b16b5bcf5a68c64fbc4272 | [
"Apache-2.0"
] | 1 | 2021-08-02T09:49:15.000Z | 2021-08-02T09:57:27.000Z | app/libs/quest_queue.py | Jiubei0408/jiudge-backend | c743274d76fdfe2be8b16b5bcf5a68c64fbc4272 | [
"Apache-2.0"
] | null | null | null | import json
import redis as Redis
from app.config.secure import REDIS_PASSWORD, REDIS_HOST, REDIS_PORT
redis = Redis.StrictRedis(host=REDIS_HOST, port=REDIS_PORT, password=REDIS_PASSWORD, decode_responses=True)
def send_crawl_contest_info(contest_id, oj_id, oj_name, remote_contest_id):
send_quest(oj_name, {
... | 30.362069 | 107 | 0.682567 |
4a1143a16d301811d84dff797fb211099e379dd2 | 11,550 | py | Python | fattureincloud_python_sdk/model/create_issued_document_response.py | fattureincloud/fattureincloud-python-sdk | f3a40fac345751014ea389680efdaef90f03bac1 | [
"MIT"
] | 2 | 2022-02-17T08:33:17.000Z | 2022-03-22T09:27:00.000Z | fattureincloud_python_sdk/model/create_issued_document_response.py | fattureincloud/fattureincloud-python-sdk | f3a40fac345751014ea389680efdaef90f03bac1 | [
"MIT"
] | null | null | null | fattureincloud_python_sdk/model/create_issued_document_response.py | fattureincloud/fattureincloud-python-sdk | f3a40fac345751014ea389680efdaef90f03bac1 | [
"MIT"
] | null | null | null | """
Fatture in Cloud API v2 - API Reference
Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. # noq... | 43.91635 | 278 | 0.579654 |
4a1143d9f3f074942e4f8f2da84c948131c466b2 | 649 | py | Python | packages/pyre/units/time.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/units/time.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/units/time.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2018 all rights reserved
#
from .SI import second
from .SI import pico, nano, micro, milli
#
# definitions of common time units
# data taken from Appendix F of Halliday, Resnick, Walker, "Fundamentals of Physics",
# fourth edition, John Wi... | 16.225 | 85 | 0.705701 |
4a1145a90062c41570540e8600b61964e602c7bb | 1,045 | py | Python | test_rbd.py | lyqgenius/openstack-test-script | b3234001e531dbaeddfab8be1b439b7e06f519d1 | [
"Apache-2.0"
] | null | null | null | test_rbd.py | lyqgenius/openstack-test-script | b3234001e531dbaeddfab8be1b439b7e06f519d1 | [
"Apache-2.0"
] | null | null | null | test_rbd.py | lyqgenius/openstack-test-script | b3234001e531dbaeddfab8be1b439b7e06f519d1 | [
"Apache-2.0"
] | null | null | null | import rados
import rbd
import imp
rbd = imp.load_source('rbd', '/usr/lib/python2.7/site-packages/rbd.py')
image_name = 'volume-a4f4daca-2b35-45a5-9e45-a145452050b1'
client = rados.Rados(
rados_id='cinder',
clustername='ceph',
conffile='/etc/ceph/ceph.conf')
pool = 'volumes'
client.connect(timeout=60)
ioc... | 21.770833 | 71 | 0.737799 |
4a1145cca789b44ae14a78b26084452f81e57ef5 | 2,450 | py | Python | ref/hb_bop19.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 33 | 2021-12-15T07:11:47.000Z | 2022-03-29T08:58:32.000Z | ref/hb_bop19.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 3 | 2021-12-15T11:39:54.000Z | 2022-03-29T07:24:23.000Z | ref/hb_bop19.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
"""This file includes necessary params, info."""
import os.path as osp
import numpy as np
# ---------------------------------------------------------------- #
# ROOT PATH INFO
# ---------------------------------------------------------------- #
cur_dir = osp.abspath(osp.dirname(__file__))
root_dir =... | 30.625 | 112 | 0.545714 |
4a114647a2353294078287d13ce05c6f06dd8cfc | 304 | py | Python | articles/serializers.py | Uncensored-Developer/django-elastic-drf-example | bddd5bc2c869425eef4c940228e7a8a122aa5500 | [
"MIT"
] | 2 | 2020-02-23T11:17:39.000Z | 2021-01-11T13:20:47.000Z | articles/serializers.py | Uncensored-Developer/django-elastic-drf-example | bddd5bc2c869425eef4c940228e7a8a122aa5500 | [
"MIT"
] | 2 | 2019-12-05T14:03:53.000Z | 2019-12-05T14:03:53.000Z | articles/serializers.py | Uncensored-Developer/django-elastic-drf-example | bddd5bc2c869425eef4c940228e7a8a122aa5500 | [
"MIT"
] | null | null | null | from django_elasticsearch_dsl_drf.serializers import DocumentSerializer
from .documents import ArticleDocument
class ArticleDocumentSerializer(DocumentSerializer):
class Meta:
document = ArticleDocument
fields = ('id', 'title', 'body', 'author', 'created', 'modified', 'pub_date',)
| 33.777778 | 86 | 0.746711 |
4a11469dd4b17d19a4b39ea50414887a535e4e10 | 4,576 | py | Python | tensorflow/core/function/trace_type/trace_type_builder.py | Stevanus-Christian/tensorflow | d44afcf5ca16c5d704c66f891b99eac804e7cd14 | [
"Apache-2.0"
] | 2 | 2016-09-27T05:37:33.000Z | 2019-11-22T06:41:12.000Z | tensorflow/core/function/trace_type/trace_type_builder.py | Stevanus-Christian/tensorflow | d44afcf5ca16c5d704c66f891b99eac804e7cd14 | [
"Apache-2.0"
] | null | null | null | tensorflow/core/function/trace_type/trace_type_builder.py | Stevanus-Christian/tensorflow | d44afcf5ca16c5d704c66f891b99eac804e7cd14 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 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... | 33.40146 | 80 | 0.702579 |
4a1146fb194c68b3742804abd36edf8ac40c030b | 39,261 | py | Python | src/werkzeug/urls.py | pieterb/werkzeug | c78b97998f4a6a27c3a9bf2b419573c620b3a64d | [
"BSD-3-Clause"
] | null | null | null | src/werkzeug/urls.py | pieterb/werkzeug | c78b97998f4a6a27c3a9bf2b419573c620b3a64d | [
"BSD-3-Clause"
] | null | null | null | src/werkzeug/urls.py | pieterb/werkzeug | c78b97998f4a6a27c3a9bf2b419573c620b3a64d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
werkzeug.urls
~~~~~~~~~~~~~
``werkzeug.urls`` used to provide several wrapper functions for Python 2
urlparse, whose main purpose were to work around the behavior of the Py2
stdlib and its lack of unicode support. While this was already a somewhat
inconvenient situat... | 34.591189 | 86 | 0.609027 |
4a11470e520ed2b842718bf275b728a4642e06ea | 473 | py | Python | test/test_phones.py | kovernik/python_training | 533630873e1c2a8662cebd18fdf26a9bbc8f7fdf | [
"Apache-2.0"
] | null | null | null | test/test_phones.py | kovernik/python_training | 533630873e1c2a8662cebd18fdf26a9bbc8f7fdf | [
"Apache-2.0"
] | 1 | 2017-12-06T10:25:34.000Z | 2017-12-06T10:26:12.000Z | test/test_phones.py | kovernik/python_training | 533630873e1c2a8662cebd18fdf26a9bbc8f7fdf | [
"Apache-2.0"
] | null | null | null | def test_phones_on_home_page(app):
user_from_home_page = app.user.get_user_list()[0]
user_from_edit_page = app.user.get_user_info_from_edit_page(0)
assert user_from_home_page.homephone == user_from_edit_page.homephone
assert user_from_home_page.workphone == user_from_edit_page.workphone
assert ... | 59.125 | 84 | 0.818182 |
4a114736618cd71dfa900120d3d9396f3357dc58 | 872 | py | Python | Code/Python/tests/testAngleCom.py | antoinejulien/Level-US_GRO400_H21 | 9db779ea0c6c231599254e29d1d6429fee9019a4 | [
"MIT"
] | 1 | 2021-01-26T23:08:44.000Z | 2021-01-26T23:08:44.000Z | Code/Python/tests/testAngleCom.py | antoinejulien/Level-US_GRO400_H21 | 9db779ea0c6c231599254e29d1d6429fee9019a4 | [
"MIT"
] | 62 | 2021-01-23T23:57:18.000Z | 2021-04-15T01:37:11.000Z | Code/Python/tests/testAngleCom.py | antoinejulien/Level-US_GRO400_H21 | 9db779ea0c6c231599254e29d1d6429fee9019a4 | [
"MIT"
] | 1 | 2022-01-06T20:46:49.000Z | 2022-01-06T20:46:49.000Z | import sys
import os.path
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
from modules.anglePlaqueToAngleMoteur_c import getAngles_cffi
from modules.anglePlaqueToAngleMoteur_c.getAngles import getAngles
import time
if __name__ == '__main__':
## asking user for valu... | 28.129032 | 77 | 0.658257 |
4a1148d15ede07d9289dbe997b3b9603d2eaf320 | 6,047 | py | Python | jhu_primitives/core/JHUGraph.py | youngser/D3M | a9998ca12644264d61e8ce5258a54f25b5f9f726 | [
"Apache-2.0"
] | null | null | null | jhu_primitives/core/JHUGraph.py | youngser/D3M | a9998ca12644264d61e8ce5258a54f25b5f9f726 | [
"Apache-2.0"
] | 10 | 2017-09-12T05:45:43.000Z | 2017-09-18T15:26:43.000Z | jhu_primitives/core/JHUGraph.py | youngser/D3M | a9998ca12644264d61e8ce5258a54f25b5f9f726 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# JHUGraph.py
# Created on 2017-09-13.
from typing import NamedTuple, Sequence, Optional
from primitive_interfaces.clustering import ClusteringPrimitiveBase
from jhu_primitives.wrapper.read_graph_r import read_graph
from jhu_primitives.wrapper.ig_wrapper_r import ig_get_adjacency_matrix
from jh... | 40.313333 | 130 | 0.696213 |
4a114a5e5ba8c0207293866a07a0c1b864934e20 | 2,588 | py | Python | preprocessing/walk_generation.py | marlin-github/CTGCN | e37ecd89afaf24f94213944e87a217a808468f43 | [
"MIT"
] | 60 | 2020-03-24T14:37:11.000Z | 2022-03-22T00:33:59.000Z | preprocessing/walk_generation.py | marlin-github/CTGCN | e37ecd89afaf24f94213944e87a217a808468f43 | [
"MIT"
] | 7 | 2020-06-01T12:45:12.000Z | 2022-01-05T12:39:42.000Z | preprocessing/walk_generation.py | jhljx/CTGCN | e37ecd89afaf24f94213944e87a217a808468f43 | [
"MIT"
] | 19 | 2020-05-14T09:34:15.000Z | 2022-03-22T00:34:02.000Z | # coding: utf-8
import pandas as pd
import os
import time
import multiprocessing
import preprocessing.random_walk as rw
from utils import check_and_make_path, get_sp_adj_mat
# Random Walk Generator
class WalkGenerator:
base_path: str
origin_base_path: str
walk_pair_base_path: str
node_freq_base_path: ... | 41.741935 | 133 | 0.681607 |
4a114b8e9120b543dd3a6030d7cb5668bd7d4e19 | 1,089 | py | Python | test_margins.py | Patrick22414/SROIE-dev | 621ab191c3cd25ffaf664ae50f76b8d3d616faf8 | [
"MIT"
] | 1 | 2019-09-02T19:06:54.000Z | 2019-09-02T19:06:54.000Z | test_margins.py | Patrick22414/SROIE-dev | 621ab191c3cd25ffaf664ae50f76b8d3d616faf8 | [
"MIT"
] | 1 | 2019-08-25T17:09:30.000Z | 2019-08-26T06:07:38.000Z | test_margins.py | Patrick22414/SROIE-dev | 621ab191c3cd25ffaf664ae50f76b8d3d616faf8 | [
"MIT"
] | 2 | 2019-08-05T03:30:22.000Z | 2020-04-07T22:58:46.000Z | import os
import glob
import numpy
import torch
from PIL import Image
from src import LineModel, draw_pred_line
DATA_PATH = "../sroie-data/"
RESO_H = 768
RESO_w = RESO_H // 2
GRID_H = 16
def test():
filenames = [os.path.splitext(f)[0] for f in glob.glob(DATA_PATH + "data_tmp/*.jpg")]
samples = random.sample... | 28.657895 | 89 | 0.654729 |
4a114ba60a2f10f464e0e654c3fb5a347e3bc958 | 202 | py | Python | Python/tdw/FBOutput/MachineType.py | felixbinder/tdw | eb2b00b74b9fcf8ef2dcba1baa62424640c520b1 | [
"BSD-2-Clause"
] | 307 | 2020-05-20T18:08:49.000Z | 2022-03-21T19:55:08.000Z | Python/tdw/FBOutput/MachineType.py | felixbinder/tdw | eb2b00b74b9fcf8ef2dcba1baa62424640c520b1 | [
"BSD-2-Clause"
] | 92 | 2020-07-21T18:29:13.000Z | 2022-03-28T07:25:54.000Z | Python/tdw/FBOutput/MachineType.py | felixbinder/tdw | eb2b00b74b9fcf8ef2dcba1baa62424640c520b1 | [
"BSD-2-Clause"
] | 53 | 2020-07-14T15:55:17.000Z | 2022-03-20T16:20:01.000Z | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: FBOutput
class MachineType(object):
none = 1
motor = 2
hinge = 3
spring = 4
light = 5
| 16.833333 | 69 | 0.623762 |
4a114c91ff77ec066b52400f35f2adb0fcdff857 | 4,006 | py | Python | PriceTracker.py | mustang519/STOCK-MARKET-PRICE-TRACKER-AND-NOTIFIER | 99da472a13bbd94439d9005a79b265fd053e7f3e | [
"MIT",
"Unlicense"
] | 1 | 2021-07-06T13:10:41.000Z | 2021-07-06T13:10:41.000Z | PriceTracker.py | mustang519/STOCK-MARKET-PRICE-TRACKER-AND-NOTIFIER | 99da472a13bbd94439d9005a79b265fd053e7f3e | [
"MIT",
"Unlicense"
] | null | null | null | PriceTracker.py | mustang519/STOCK-MARKET-PRICE-TRACKER-AND-NOTIFIER | 99da472a13bbd94439d9005a79b265fd053e7f3e | [
"MIT",
"Unlicense"
] | null | null | null | import string
import time
from bs4 import BeautifulSoup
from selenium import webdriver
import html5lib
import pandas as pd
import datetime
import smtplib
import ssl
def stockPrice(s):
url = "https://finance.yahoo.com/quote/" + s + "?p=" + s + "&guccounter=1&guce_referrer=aHR0cHM6Ly93d3cueW91dHViZS5j... | 28.013986 | 321 | 0.625312 |
4a115116c7f1b7b791fcfac441ef77d9deaee435 | 1,764 | py | Python | tests/utils.py | Evpok/camphr | d062e5694de6aac99a8ce3236caca62fba087570 | [
"Apache-2.0"
] | null | null | null | tests/utils.py | Evpok/camphr | d062e5694de6aac99a8ce3236caca62fba087570 | [
"Apache-2.0"
] | null | null | null | tests/utils.py | Evpok/camphr | d062e5694de6aac99a8ce3236caca62fba087570 | [
"Apache-2.0"
] | null | null | null | import json
import os
import tempfile
from itertools import zip_longest
from pathlib import Path
from typing import Any, Tuple
import spacy
from spacy.tests.util import assert_docs_equal
def check_juman() -> bool:
try:
import pyknp # noqa
except ImportError:
return False
return True
de... | 22.05 | 86 | 0.64229 |
4a1151aa3bcb2b46151d6e7eea14f0941f6a5628 | 13,686 | py | Python | master-node-docker/sentinel/client/vpn.py | zhou0/sentinel | 93760961a098b32fb6f39d3ec52ac2ff9200866a | [
"MIT"
] | 1 | 2019-05-03T06:15:25.000Z | 2019-05-03T06:15:25.000Z | master-node-docker/sentinel/client/vpn.py | robDAO/sentinel | 93760961a098b32fb6f39d3ec52ac2ff9200866a | [
"MIT"
] | null | null | null | master-node-docker/sentinel/client/vpn.py | robDAO/sentinel | 93760961a098b32fb6f39d3ec52ac2ff9200866a | [
"MIT"
] | 1 | 2019-05-03T06:15:29.000Z | 2019-05-03T06:15:29.000Z | # coding=utf-8
import json
import time
from uuid import uuid4
import falcon
import requests
from ..config import COINBASE_ADDRESS
from ..config import DECIMALS
from ..config import REFERRAL_DUMMY
from ..db import db
from ..eth import vpn_service_manager
from ..helpers import eth_helper
def get_vpns_list(vpn_type):
... | 34.824427 | 118 | 0.498977 |
4a1152dd0f6a42e713c89ecca2561b47fe9198e5 | 538 | py | Python | atividade036.py | henrikysena/Atividades_CursosEmVideo_Python | 2890c67ea4be2cde6f42c2489d4c96b47d7b597e | [
"MIT"
] | null | null | null | atividade036.py | henrikysena/Atividades_CursosEmVideo_Python | 2890c67ea4be2cde6f42c2489d4c96b47d7b597e | [
"MIT"
] | null | null | null | atividade036.py | henrikysena/Atividades_CursosEmVideo_Python | 2890c67ea4be2cde6f42c2489d4c96b47d7b597e | [
"MIT"
] | null | null | null | print('Olá, Seja bem vindo ao Programa de Financiamento de Imóveis!')
print('')
valor = float(input('Qual o valor total do imóvel? '))
salario = float(input('Qual o valor do seu salário? '))
ano = int(input('Em quantos anos você pretende pagar o imóvel? '))
print('')
parcela = valor / (ano * 12)
totalsal = salario * ... | 29.888889 | 69 | 0.697026 |
4a11537d2b7ca9ca184c0362c2faa0c9417d21c3 | 789 | py | Python | setup.py | hachiken/report_for_erpn | b6b0145e4dfddd503174dc2bc2a764b23b50e754 | [
"MIT"
] | null | null | null | setup.py | hachiken/report_for_erpn | b6b0145e4dfddd503174dc2bc2a764b23b50e754 | [
"MIT"
] | null | null | null | setup.py | hachiken/report_for_erpn | b6b0145e4dfddd503174dc2bc2a764b23b50e754 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from pip.req import parse_requirements
import re, ast
# get version from __version__ variable in my_reports/__init__.py
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('my_reports/__init__.py', 'rb') as f:
version = str(ast.literal_... | 29.222222 | 68 | 0.736375 |
4a115398f27df3123510743da8e3597b83564111 | 6,272 | py | Python | sdk/python/pulumi_azure_nextgen/migrate/v20191001preview/move_collection.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/migrate/v20191001preview/move_collection.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/migrate/v20191001preview/move_collection.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 39.696203 | 250 | 0.639987 |
4a11542117a6db1ed7ad05aae1a35744a0f27716 | 322 | py | Python | dataModels/GlusterFSVolume.py | micv-dev/DeepKubeGPUCluster | b1f674ea3c251a5287ee83d582b193248e04f9d6 | [
"Apache-2.0"
] | 2 | 2021-01-22T05:56:40.000Z | 2021-07-03T17:50:49.000Z | dataModels/GlusterFSVolume.py | micv-dev/DeepKubeGPUCluster | b1f674ea3c251a5287ee83d582b193248e04f9d6 | [
"Apache-2.0"
] | null | null | null | dataModels/GlusterFSVolume.py | micv-dev/DeepKubeGPUCluster | b1f674ea3c251a5287ee83d582b193248e04f9d6 | [
"Apache-2.0"
] | null | null | null | from peewee import *
import datetime
from dataModels.BaseModel import BaseModel
class GlusterFSVolume(BaseModel):
pvcName=TextField()
name = TextField(default="")
size=IntegerField()
createdOn = DateTimeField(default=datetime.datetime.now)
modifiedOn = DateTimeField(default=datetime.datetime.now)... | 23 | 61 | 0.763975 |
4a115433cfdee78fcda636ebeb3a725caf17ed61 | 14,894 | py | Python | test/test_e2e_asr_transducer.py | shaun95/espnet | afa8f8ec5b8ec77deb1a3c1531915ebbee7b80e6 | [
"Apache-2.0"
] | null | null | null | test/test_e2e_asr_transducer.py | shaun95/espnet | afa8f8ec5b8ec77deb1a3c1531915ebbee7b80e6 | [
"Apache-2.0"
] | null | null | null | test/test_e2e_asr_transducer.py | shaun95/espnet | afa8f8ec5b8ec77deb1a3c1531915ebbee7b80e6 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import argparse
from packaging.version import parse as V
import tempfile
import json
import numpy as np
import pytest
import torch
from espnet.asr.pytorch_backend.asr_init import load_trained_model
import espnet.lm.pytorch_backend.extlm as extlm_pytorch
from espnet.nets.beam_search_transducer import ... | 29.847695 | 88 | 0.594535 |
4a115483c1d4f88d275bca67cce20ad2e551a77a | 7,239 | py | Python | midonet/neutron/db/migration/cli.py | NeCTAR-RC/networking-midonet | 7a69af3eab25f57e77738fd8398b6f4854346fd9 | [
"Apache-2.0"
] | null | null | null | midonet/neutron/db/migration/cli.py | NeCTAR-RC/networking-midonet | 7a69af3eab25f57e77738fd8398b6f4854346fd9 | [
"Apache-2.0"
] | null | null | null | midonet/neutron/db/migration/cli.py | NeCTAR-RC/networking-midonet | 7a69af3eab25f57e77738fd8398b6f4854346fd9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Midokura SARL
#
# 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 agre... | 34.636364 | 78 | 0.698715 |
4a1154e1a5bd03a241effb8e4ef05bc4d8636929 | 6,201 | py | Python | PaddleCV/image_classification/models/mobilenet.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 3 | 2019-08-23T06:34:46.000Z | 2021-06-08T01:42:29.000Z | PaddleCV/image_classification/models/mobilenet.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | null | null | null | PaddleCV/image_classification/models/mobilenet.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 5 | 2019-07-18T03:38:39.000Z | 2021-05-22T16:27:38.000Z | #copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
#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... | 29.388626 | 77 | 0.501532 |
4a115544fca4256d2650ca981ec3fb6956ba82ca | 17,906 | py | Python | max7219/led.py | clickworkorange/max7219 | 8c5eeec16cb2b53973b3d2e01d7ae9f1d307c130 | [
"MIT"
] | null | null | null | max7219/led.py | clickworkorange/max7219 | 8c5eeec16cb2b53973b3d2e01d7ae9f1d307c130 | [
"MIT"
] | null | null | null | max7219/led.py | clickworkorange/max7219 | 8c5eeec16cb2b53973b3d2e01d7ae9f1d307c130 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
from max7219.font import DEFAULT_FONT
from max7219.rotate8x8 import rotate
class constants(object):
MAX7219_REG_NOOP = 0x0
MAX7219_REG_DIGIT0 = 0x1
MAX7219_REG_DIGIT1 = 0x2
MAX7219_REG_DIGIT2 = 0x3
MAX7219_REG_DIGIT3 = 0x4
MAX7219_REG... | 33.721281 | 133 | 0.578019 |
4a115565aa0c6dd82894ac350ce43ef44d3e11a5 | 610 | py | Python | wrappers/python/tests/pairwise/test_pairwise_exists.py | sklump/indy-sdk | ee05a89ddf60b42f7483bebf2d89a936e12730df | [
"Apache-2.0"
] | 636 | 2017-05-25T07:45:43.000Z | 2022-03-23T22:30:34.000Z | wrappers/python/tests/pairwise/test_pairwise_exists.py | Nick-1979/indy-sdk | e5f812e14962f0d51cf96f843033754ff841ce30 | [
"Apache-2.0"
] | 731 | 2017-05-29T07:15:08.000Z | 2022-03-31T07:55:58.000Z | wrappers/python/tests/pairwise/test_pairwise_exists.py | Nick-1979/indy-sdk | e5f812e14962f0d51cf96f843033754ff841ce30 | [
"Apache-2.0"
] | 904 | 2017-05-25T07:45:49.000Z | 2022-03-31T07:43:31.000Z | import pytest
from indy import pairwise
@pytest.mark.asyncio
async def test_is_pairwise_exists_works(wallet_handle, identity_my2, identity_trustee1):
(my_did, _) = identity_my2
(their_did, _) = identity_trustee1
await pairwise.create_pairwise(wallet_handle, their_did, my_did, None)
assert await pairw... | 35.882353 | 104 | 0.813115 |
4a115591a0d42f2a434a462fa400a4f74403e55c | 5,074 | py | Python | run.py | DavideA/machine-learning-dgm | bb70ce09a86a549fc85e55a9b8f2364f73841e38 | [
"RSA-MD"
] | null | null | null | run.py | DavideA/machine-learning-dgm | bb70ce09a86a549fc85e55a9b8f2364f73841e38 | [
"RSA-MD"
] | null | null | null | run.py | DavideA/machine-learning-dgm | bb70ce09a86a549fc85e55a9b8f2364f73841e38 | [
"RSA-MD"
] | null | null | null | # Copyright 2019 SAP SE
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
#... | 33.381579 | 119 | 0.638155 |
4a1156278c12c092d19227850c57362fa9204aee | 693 | py | Python | mysite/polls/models.py | KarolBautrel/Django-Docs-Tutorial | 7da5bdb5369ad9cb14d66e5f2f4c18472b26811f | [
"MIT"
] | null | null | null | mysite/polls/models.py | KarolBautrel/Django-Docs-Tutorial | 7da5bdb5369ad9cb14d66e5f2f4c18472b26811f | [
"MIT"
] | null | null | null | mysite/polls/models.py | KarolBautrel/Django-Docs-Tutorial | 7da5bdb5369ad9cb14d66e5f2f4c18472b26811f | [
"MIT"
] | null | null | null | import datetime
from django.db import models
from django.utils import timezone
# Create your models here.
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __str__(self):
return self.question_text
def was_publ... | 25.666667 | 71 | 0.720058 |
4a1156f534fa38002b05774568644e61e49c29e9 | 36,094 | py | Python | tensorflow/python/eager/forwardprop_test.py | deepmedia/tensorflow | ac8aad5c55838566a26ed6725c966d399319c831 | [
"Apache-2.0"
] | 78 | 2020-08-04T12:36:25.000Z | 2022-03-25T04:23:40.000Z | tensorflow/python/eager/forwardprop_test.py | deepmedia/tensorflow | ac8aad5c55838566a26ed6725c966d399319c831 | [
"Apache-2.0"
] | 10 | 2021-08-03T08:42:38.000Z | 2022-01-03T03:29:12.000Z | tensorflow/python/eager/forwardprop_test.py | deepmedia/tensorflow | ac8aad5c55838566a26ed6725c966d399319c831 | [
"Apache-2.0"
] | 28 | 2020-02-10T07:03:06.000Z | 2022-01-12T11:19:20.000Z | # Copyright 2019 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... | 36.830612 | 99 | 0.674572 |
4a115762be40b04fc530319cd6dc838932529d3c | 9,792 | py | Python | homeassistant/data_entry_flow.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 4 | 2016-12-23T10:36:36.000Z | 2021-04-22T12:38:16.000Z | homeassistant/data_entry_flow.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 9 | 2022-01-27T06:32:10.000Z | 2022-03-31T07:07:51.000Z | homeassistant/data_entry_flow.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 1 | 2020-02-17T07:44:24.000Z | 2020-02-17T07:44:24.000Z | """Classes to help gather user submissions."""
import abc
import logging
from typing import Any, Dict, List, Optional, cast
import uuid
import voluptuous as vol
from .core import HomeAssistant, callback
from .exceptions import HomeAssistantError
_LOGGER = logging.getLogger(__name__)
RESULT_TYPE_FORM = "form"
RESULT... | 30.88959 | 88 | 0.59998 |
4a1157b3a29586ba74c7327a5c058745401e9ad0 | 1,554 | py | Python | bonus_top_interview_questions/395. Longest Substring with At Least K Repeating Characters.py | JacopoPan/leetcode-top100-liked-questions | 03dc05f087d05805d54b7585ce740338f3128833 | [
"MIT"
] | null | null | null | bonus_top_interview_questions/395. Longest Substring with At Least K Repeating Characters.py | JacopoPan/leetcode-top100-liked-questions | 03dc05f087d05805d54b7585ce740338f3128833 | [
"MIT"
] | null | null | null | bonus_top_interview_questions/395. Longest Substring with At Least K Repeating Characters.py | JacopoPan/leetcode-top100-liked-questions | 03dc05f087d05805d54b7585ce740338f3128833 | [
"MIT"
] | null | null | null | """
Runtime: 86 ms, faster than 53.12% of Python3 online submissions for Longest Substring with At Least K Repeating Characters.
Memory Usage: 14.4 MB, less than 16.35% of Python3 online submissions for Longest Substring with At Least K Repeating Characters.
"""
from typing import List
from typing import Optional
clas... | 32.375 | 129 | 0.517375 |
4a1158870bacfce849fe91319126d6f16ec5cec2 | 5,276 | py | Python | src/mpi4py/__init__.py | dmitry-kabanov/mpi4py | 91711bd7e7d72df7a68137080ace15595c681ef8 | [
"BSD-2-Clause"
] | null | null | null | src/mpi4py/__init__.py | dmitry-kabanov/mpi4py | 91711bd7e7d72df7a68137080ace15595c681ef8 | [
"BSD-2-Clause"
] | null | null | null | src/mpi4py/__init__.py | dmitry-kabanov/mpi4py | 91711bd7e7d72df7a68137080ace15595c681ef8 | [
"BSD-2-Clause"
] | null | null | null | # Author: Lisandro Dalcin
# Contact: dalcinl@gmail.com
"""
This is the **MPI for Python** package.
What is *MPI*?
==============
The *Message Passing Interface*, is a standardized and portable
message-passing system designed to function on a wide variety of
parallel computers. The standard defines the syntax and sem... | 31.975758 | 70 | 0.646513 |
4a11592dbe02d6e3c4b32e1fa32f9e5c83af7335 | 13,608 | py | Python | ui_games/gui_games.py | ikathuria/PythonGames | 2f3df15c495ddf4ab7d61dbe9bd7f79432a9ac0d | [
"MIT"
] | null | null | null | ui_games/gui_games.py | ikathuria/PythonGames | 2f3df15c495ddf4ab7d61dbe9bd7f79432a9ac0d | [
"MIT"
] | null | null | null | ui_games/gui_games.py | ikathuria/PythonGames | 2f3df15c495ddf4ab7d61dbe9bd7f79432a9ac0d | [
"MIT"
] | null | null | null | """Different one player games made with python.
The user interface is designed with PyQt5.
"""
import os
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
# personal modules
import rulebook
from blackjack import Ui_blackjack
from hangman import Ui_hangman
from num_guess import Ui_num_guess
from rps import Ui_rp... | 35.810526 | 87 | 0.618533 |
4a115961ba66d8cbd4f0cd1bdf81dcadaad6a11c | 104 | py | Python | _/0349_08_Code/04.py | paullewallencom/javascript-978-1-8495-1034-9 | 7e539d042c644931a9ef2418f66d260a1c6892eb | [
"Apache-2.0"
] | null | null | null | _/0349_08_Code/04.py | paullewallencom/javascript-978-1-8495-1034-9 | 7e539d042c644931a9ef2418f66d260a1c6892eb | [
"Apache-2.0"
] | null | null | null | _/0349_08_Code/04.py | paullewallencom/javascript-978-1-8495-1034-9 | 7e539d042c644931a9ef2418f66d260a1c6892eb | [
"Apache-2.0"
] | null | null | null | (ur'^create/Entity', views.modelform_Entity),
(ur'^create/Location', views.modelform_Location),
| 34.666667 | 53 | 0.711538 |
4a115a1568e651c02c6d4ae512ddd33a4b18907d | 2,433 | py | Python | var/spack/repos/builtin/packages/fbgemm/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/fbgemm/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/fbgemm/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Fbgemm(CMakePackage):
"""FBGEMM (Facebook GEneral Matrix Multiplication) is a low-precisio... | 51.765957 | 111 | 0.726675 |
4a115a80a20c6f9a952e8a8e371ed8074f8e8312 | 1,431 | py | Python | ykdl/extractors/acfun/acbase.py | panda-mute/ykdl | 56cea24f1513f21aedbe80b75c25f7c3b1e07704 | [
"MIT"
] | null | null | null | ykdl/extractors/acfun/acbase.py | panda-mute/ykdl | 56cea24f1513f21aedbe80b75c25f7c3b1e07704 | [
"MIT"
] | null | null | null | ykdl/extractors/acfun/acbase.py | panda-mute/ykdl | 56cea24f1513f21aedbe80b75c25f7c3b1e07704 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .._common import *
class AcBase(VideoExtractor):
quality_2_id = {
2160: '4K',
1080: 'BD',
720: 'TD',
540: 'HD',
360: 'SD',
270: 'LD'
}
def prepare(self):
info = VideoInfo(self.name)
html = get_content(self.... | 28.62 | 79 | 0.502446 |
4a115b310f561ef8bd8657550fe933583c4778d5 | 107 | py | Python | output/models/ms_data/additional/isdefault076_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/additional/isdefault076_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/additional/isdefault076_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ms_data.additional.isdefault076_xsd.isdefault076 import Root
__all__ = [
"Root",
]
| 17.833333 | 79 | 0.766355 |
4a115bd1073d52ce0fd7b4fc4218bc5e3bdea887 | 2,064 | py | Python | discordCommandRegistry.py | adassimo25/audio-wizzard-service | 88b3b5e73a7a8a20f5a405811551c9124f1a63d9 | [
"MIT"
] | null | null | null | discordCommandRegistry.py | adassimo25/audio-wizzard-service | 88b3b5e73a7a8a20f5a405811551c9124f1a63d9 | [
"MIT"
] | 17 | 2021-05-01T18:35:47.000Z | 2021-05-24T12:00:44.000Z | discordCommandRegistry.py | adassimo25/audio-wizzard-service | 88b3b5e73a7a8a20f5a405811551c9124f1a63d9 | [
"MIT"
] | 2 | 2021-05-15T07:40:38.000Z | 2021-05-23T14:17:30.000Z | import requests
import os
from dotenv import load_dotenv
load_dotenv()
APP_ID = os.getenv('APP_ID')
BOT_TOKEN = os.getenv('BOT_TOKEN')
url = f"https://discord.com/api/v8/applications/{APP_ID}/commands"
def register_command(reg_url, reg_headers, reg_json):
response = requests.post(reg_url, headers=reg_headers,... | 23.191011 | 73 | 0.489341 |
4a115c7fb6227693c955216edff084845b49b0ee | 6,083 | py | Python | scripts/relative_planner.py | COHRINT/minau | 52ce74792c2df806c3456c81578e91a5225696a6 | [
"MIT"
] | null | null | null | scripts/relative_planner.py | COHRINT/minau | 52ce74792c2df806c3456c81578e91a5225696a6 | [
"MIT"
] | 1 | 2019-04-22T19:37:55.000Z | 2019-04-24T15:39:12.000Z | scripts/relative_planner.py | COHRINT/minau | 52ce74792c2df806c3456c81578e91a5225696a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import division
"""
STILL IN DEVELOPMENT, NOT USABLE YETx
"""
import rospy
import random
from geometry_msgs.msg import TwistStamped, Vector3, PoseStamped
import numpy as np
from minau.srv import ArmControl, SetHeadingVelocity
from nav_msgs.msg import Odometry
import tf
class Plan... | 37.091463 | 119 | 0.617294 |
4a115db308e5adfff1d930b60c0e8b526f88b5e6 | 5,434 | py | Python | compile.py | jasperla/slae64 | d564ac7b5dc85a17c141abd0978a22d5b0a04ec0 | [
"MIT"
] | null | null | null | compile.py | jasperla/slae64 | d564ac7b5dc85a17c141abd0978a22d5b0a04ec0 | [
"MIT"
] | null | null | null | compile.py | jasperla/slae64 | d564ac7b5dc85a17c141abd0978a22d5b0a04ec0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2019 Jasper Lievisse Adriaanse <j@jasper.la>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS... | 31.051429 | 116 | 0.653846 |
4a115f71ab72f264013a4ab7abe313ef98d79972 | 1,403 | py | Python | models.py | agavgavi/py4web-blog-app | 8b1301a23fe109a738489ae427973dc2b34f6eec | [
"MIT"
] | 9 | 2020-09-18T03:30:33.000Z | 2021-07-13T17:47:24.000Z | models.py | agavgavi/py4web-blog-app | 8b1301a23fe109a738489ae427973dc2b34f6eec | [
"MIT"
] | 1 | 2021-12-27T15:09:44.000Z | 2021-12-27T18:32:36.000Z | models.py | agavgavi/py4web-blog-app | 8b1301a23fe109a738489ae427973dc2b34f6eec | [
"MIT"
] | 4 | 2020-09-18T05:50:50.000Z | 2021-03-12T07:44:46.000Z | """
This file defines the database models
"""
from .common import db, Field, auth
from py4web import URL
from pydal.validators import IS_NOT_EMPTY
import datetime
from . import settings
# Define your table below
#
# db.define_table('thing', Field('name'))
#
# always commit your models to avoid problems later
#
# db.c... | 21.257576 | 87 | 0.675695 |
4a1160e8bdb82e280507107a4a511b7c69a783f7 | 7,977 | py | Python | pysmartthings/subscription.py | north3221/pysmartthings | 2707d18709cd966a9d4ea51abdb3dea3daeaccc4 | [
"Apache-2.0"
] | 82 | 2018-12-28T17:54:21.000Z | 2022-02-18T17:31:23.000Z | pysmartthings/subscription.py | north3221/pysmartthings | 2707d18709cd966a9d4ea51abdb3dea3daeaccc4 | [
"Apache-2.0"
] | 38 | 2019-01-30T15:42:13.000Z | 2022-01-23T13:27:43.000Z | pysmartthings/subscription.py | north3221/pysmartthings | 2707d18709cd966a9d4ea51abdb3dea3daeaccc4 | [
"Apache-2.0"
] | 28 | 2019-02-17T16:47:41.000Z | 2022-03-18T03:05:45.000Z | """Define the subscription module."""
from enum import Enum
from typing import Any, Optional
from .api import Api
from .entity import Entity
class SourceType(Enum):
"""Define the source type of a subscription."""
UNKNOWN = "UNKNOWN"
DEVICE = "DEVICE"
CAPABILITY = "CAPABILITY"
cla... | 36.095023 | 79 | 0.600727 |
4a11619112b5167a1961128a08df47c8c7e5aa31 | 119,144 | py | Python | tensorflow/python/data/ops/dataset_ops.py | wenming2014/tensorflow | a102a6a71844e194f3946f6318768c5367f1f16b | [
"Apache-2.0"
] | 5 | 2018-07-04T22:14:02.000Z | 2018-07-04T22:21:43.000Z | tensorflow/python/data/ops/dataset_ops.py | wenming2014/tensorflow | a102a6a71844e194f3946f6318768c5367f1f16b | [
"Apache-2.0"
] | null | null | null | tensorflow/python/data/ops/dataset_ops.py | wenming2014/tensorflow | a102a6a71844e194f3946f6318768c5367f1f16b | [
"Apache-2.0"
] | 1 | 2018-11-30T01:35:01.000Z | 2018-11-30T01:35:01.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.775523 | 109 | 0.690148 |
4a116191c21392d76edf277406ec4c7d5774d028 | 600 | py | Python | Assingments/module03/week02/monday/sulfaroa.inclass.py | tonysulfaro/MI-250 | e746fd261107531e100a5cb98d6b6c90bd9234d8 | [
"MIT"
] | null | null | null | Assingments/module03/week02/monday/sulfaroa.inclass.py | tonysulfaro/MI-250 | e746fd261107531e100a5cb98d6b6c90bd9234d8 | [
"MIT"
] | null | null | null | Assingments/module03/week02/monday/sulfaroa.inclass.py | tonysulfaro/MI-250 | e746fd261107531e100a5cb98d6b6c90bd9234d8 | [
"MIT"
] | null | null | null | # use the imgur API and get the most popular cat picture
"""
sulfaroa
9/10/18
In-class activity
"""
from imgurpython import ImgurClient
import requests
client_id = '82d55c3dec952aa'
client_secret = '3e2e0865723e9a6b94100702980b58ca95a0fd25'
client = ImgurClient(client_id, client_secret)
# get images with cat
tag_co... | 24 | 80 | 0.775 |
4a11631ee3b04428f0166309f92fd9cdb264257a | 187 | py | Python | project_template/submodule1/example_submodule.py | tomaskala/python-template | 0b4ea38425fa432092d388530224240dc9c46854 | [
"Unlicense"
] | null | null | null | project_template/submodule1/example_submodule.py | tomaskala/python-template | 0b4ea38425fa432092d388530224240dc9c46854 | [
"Unlicense"
] | null | null | null | project_template/submodule1/example_submodule.py | tomaskala/python-template | 0b4ea38425fa432092d388530224240dc9c46854 | [
"Unlicense"
] | null | null | null | from project_template.submodule1.subsubmodule.example_subsubmodule import (
example as sub_example,
)
def example():
print("Example submodule 1")
sub_example("submodule 1")
| 20.777778 | 75 | 0.754011 |
4a1163218f0de99a21635c413e2a0f025eb0746c | 2,137 | py | Python | tests/test_app/models.py | crazyscientist/django-admin-view-permission | e6385622e2a708f23c5041ec031e32891e7e267e | [
"BSD-2-Clause"
] | null | null | null | tests/test_app/models.py | crazyscientist/django-admin-view-permission | e6385622e2a708f23c5041ec031e32891e7e267e | [
"BSD-2-Clause"
] | null | null | null | tests/test_app/models.py | crazyscientist/django-admin-view-permission | e6385622e2a708f23c5041ec031e32891e7e267e | [
"BSD-2-Clause"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from parler.models import TranslatableModel, TranslatedFields
class TestModel0(models.Model):
var1 = models.CharField(max_length=200)
var2 = models.TextField()
var3 = models.IntegerField()
class TestModel1(models.Model):
var1 = mo... | 27.753247 | 66 | 0.722508 |
4a116353f68e1495d84e07ad19415a1580342eee | 101 | py | Python | allennlp_models/tokenizers/spacy_tokenizer.py | alvinwatner/allennlp-models | 7e767f00da836c5af59e39dc74852b484b45ef46 | [
"Apache-2.0"
] | null | null | null | allennlp_models/tokenizers/spacy_tokenizer.py | alvinwatner/allennlp-models | 7e767f00da836c5af59e39dc74852b484b45ef46 | [
"Apache-2.0"
] | null | null | null | allennlp_models/tokenizers/spacy_tokenizer.py | alvinwatner/allennlp-models | 7e767f00da836c5af59e39dc74852b484b45ef46 | [
"Apache-2.0"
] | null | null | null | # from allennlp.data.tokenizers import Token, Tokenizer, SpacyTokenizer
#
# SpacyTokenizer(language=) | 33.666667 | 71 | 0.811881 |
4a1164f1cd085474cf62d8182e7ba6eb37e9b95f | 26,135 | py | Python | msgraph/cli/command_modules/groups/azext_groups/vendored_sdks/groups/aio/operations/_groups_events_calendar_calendar_view_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | msgraph/cli/command_modules/groups/azext_groups/vendored_sdks/groups/aio/operations/_groups_events_calendar_calendar_view_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | 22 | 2022-03-29T22:54:37.000Z | 2022-03-29T22:55:27.000Z | msgraph/cli/command_modules/groups/azext_groups/vendored_sdks/groups/aio/operations/_groups_events_calendar_calendar_view_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.586453 | 193 | 0.670901 |
4a116616f1dc8b47b1cfbd310e858127e6794149 | 898 | py | Python | mythirdpjt.py | helloworldtang/python-spider-study | b65bc646e716bd3cd421aa9c395507fded7aff06 | [
"Apache-2.0"
] | null | null | null | mythirdpjt.py | helloworldtang/python-spider-study | b65bc646e716bd3cd421aa9c395507fded7aff06 | [
"Apache-2.0"
] | null | null | null | mythirdpjt.py | helloworldtang/python-spider-study | b65bc646e716bd3cd421aa9c395507fded7aff06 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = ''
__author__ = 'tangcheng'
__mtime__ = '12/12/2017'
"""
import urllib.request
import re
from db.DBUtil import persist
def getContent(url):
headers = ("User-Agent",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, ... | 24.944444 | 132 | 0.640312 |
4a1166498ba471b211847412d2dd18859e9d4b82 | 3,944 | py | Python | Datasets/mat2csv.py | fyancy/Meta-Learning-in-Fault-Diagnosis | 8ac907fe67984552c2ca18db760338a29d30a11c | [
"MIT"
] | 20 | 2021-09-22T08:31:04.000Z | 2022-03-28T12:28:52.000Z | Datasets/mat2csv.py | fyancy/Meta-Learning-in-Fault-Diagnosis | 8ac907fe67984552c2ca18db760338a29d30a11c | [
"MIT"
] | 2 | 2021-11-26T02:55:01.000Z | 2022-03-28T04:56:55.000Z | Datasets/mat2csv.py | fyancy/Meta-Learning-in-Fault-Diagnosis | 8ac907fe67984552c2ca18db760338a29d30a11c | [
"MIT"
] | 8 | 2021-10-31T19:50:57.000Z | 2022-03-17T00:54:51.000Z | import csv
import numpy as np
import pandas as pd
import scipy
from scipy import io
import os
def get_filename(file_dir):
"""
:param file_dir:
"""
file_name = os.listdir(file_dir)
if len(file_name) != 1:
print('===========!!!===========!!!===========')
print('There are {} files in ... | 29.878788 | 107 | 0.629817 |
4a1166ee51226b95a296db3864794065fc084d65 | 1,803 | py | Python | week_11_DS_N_Algorithm/02_Data_Structure/03_DS_LinkedList_Q_Stack/실습2_연결 리스트에서 노드 삭제하기.py | bky373/elice-racer-1st | ddea8079a1083796ed4f59c38650ff8f4333e6ef | [
"FSFAP"
] | 1 | 2021-11-03T18:27:37.000Z | 2021-11-03T18:27:37.000Z | week_11_DS_N_Algorithm/02_Data_Structure/03_DS_LinkedList_Q_Stack/실습2_연결 리스트에서 노드 삭제하기.py | bky373/elice-racer-1st | ddea8079a1083796ed4f59c38650ff8f4333e6ef | [
"FSFAP"
] | null | null | null | week_11_DS_N_Algorithm/02_Data_Structure/03_DS_LinkedList_Q_Stack/실습2_연결 리스트에서 노드 삭제하기.py | bky373/elice-racer-1st | ddea8079a1083796ed4f59c38650ff8f4333e6ef | [
"FSFAP"
] | 1 | 2021-02-10T15:21:53.000Z | 2021-02-10T15:21:53.000Z | # 연결 리스트의 노드. 단일 연결 리스트의 경우입니다.
class Node:
def __init__(self, val):
self.val = val
self.next = None
def __str__(self):
return str(self.val)
# 연결 리스트 클래스. head 와 tail을 가지고 있으며, 가장 뒤에 새로운 노드를 추가하는 addToEnd 함수가 있습니다.
class LinkedList:
def __init__(self, head):
self.he... | 24.04 | 132 | 0.49695 |
4a11670c8314150cff3688cb0347e0e67441bcb7 | 3,868 | py | Python | scripts/val_pseudo.py | IssamLaradji/affinity_lcfcn | 2c38500c83dc9c063ea2c910aadc94f14a18f3a5 | [
"Apache-2.0"
] | 15 | 2020-09-30T14:28:29.000Z | 2022-03-16T11:53:15.000Z | scripts/val_pseudo.py | IssamLaradji/affinity_lcfcn | 2c38500c83dc9c063ea2c910aadc94f14a18f3a5 | [
"Apache-2.0"
] | 2 | 2020-11-25T00:57:55.000Z | 2021-06-16T20:07:08.000Z | scripts/val_pseudo.py | IssamLaradji/affinity_lcfcn | 2c38500c83dc9c063ea2c910aadc94f14a18f3a5 | [
"Apache-2.0"
] | 2 | 2020-11-06T22:38:56.000Z | 2020-12-02T04:45:05.000Z | import sys, os
path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.insert(0, path)
from haven import haven_chk as hc
from haven import haven_results as hr
from haven import haven_utils as hu
import torch
import torchvision
import tqdm
import pandas as pd
import pprint
import itertools
import ... | 35.486239 | 126 | 0.613237 |
4a1167176648517b5437e89201bdbf56157a2c8e | 789 | py | Python | setup.py | ezeportela/pydoge-ds | 842bb5d4e242565fde484965da23eae91b38973f | [
"MIT"
] | null | null | null | setup.py | ezeportela/pydoge-ds | 842bb5d4e242565fde484965da23eae91b38973f | [
"MIT"
] | null | null | null | setup.py | ezeportela/pydoge-ds | 842bb5d4e242565fde484965da23eae91b38973f | [
"MIT"
] | null | null | null | import setuptools
__version__ = '0.1.1'
with open('README.md', 'r') as fh:
long_description = fh.read()
with open('requirements.txt', 'r') as f:
install_requires = f.read().splitlines()
setuptools.setup(
name='PyDoge-ds',
version=__version__,
author='Ezequiel Portela',
author_email='eportela... | 27.206897 | 50 | 0.674271 |
4a11681d8927ead4525bb5251c024b3abe0dd90d | 1,090 | py | Python | pyghelpers_test/Dodger/Main_Dodger.py | IrvKalb/pyghelpers | 0c1f11f8f779fe3b1a249ac6704fd4689a45fc4f | [
"BSD-2-Clause"
] | 38 | 2021-11-16T03:04:42.000Z | 2022-03-27T05:57:50.000Z | pyghelpers_test/Dodger/Main_Dodger.py | IrvKalb/pyghelpers | 0c1f11f8f779fe3b1a249ac6704fd4689a45fc4f | [
"BSD-2-Clause"
] | null | null | null | pyghelpers_test/Dodger/Main_Dodger.py | IrvKalb/pyghelpers | 0c1f11f8f779fe3b1a249ac6704fd4689a45fc4f | [
"BSD-2-Clause"
] | 22 | 2021-11-11T15:57:58.000Z | 2022-03-18T12:58:07.000Z | # Dodger main program
#
# Instantiates 3 scenes, creates and starts the scene manager
#
# Original version by Al Sweigart from his book "Invent With Python"
# (concept, graphics, and sounds used by permission from Al Sweigart)
# 1 - Import packages
import os
# The next line is here just in case you are running fr... | 27.948718 | 74 | 0.738532 |
4a1168bfa013c83977d4d4d5af1433d8eab87ad1 | 30,752 | py | Python | dragonchain/lib/authorization_utest.py | deanshelton913/dragonchain | 36f93192b6679b703edbf643f6913292df9be953 | [
"Apache-2.0"
] | null | null | null | dragonchain/lib/authorization_utest.py | deanshelton913/dragonchain | 36f93192b6679b703edbf643f6913292df9be953 | [
"Apache-2.0"
] | null | null | null | dragonchain/lib/authorization_utest.py | deanshelton913/dragonchain | 36f93192b6679b703edbf643f6913292df9be953 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Dragonchain, Inc.
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
# 6. Tr... | 52.033841 | 150 | 0.7061 |
4a1169ab051b84dcf054319b9638f7c182fc3dcb | 130 | py | Python | application/server/main/config.py | Barometre-de-la-Science-Ouverte/bso3-harvest-publication | 06c729a1e44ed87e8f73b4c2bd456f5e09a73e34 | [
"MIT"
] | null | null | null | application/server/main/config.py | Barometre-de-la-Science-Ouverte/bso3-harvest-publication | 06c729a1e44ed87e8f73b4c2bd456f5e09a73e34 | [
"MIT"
] | 5 | 2021-06-04T07:12:06.000Z | 2021-08-25T15:17:41.000Z | application/server/main/config.py | Barometre-de-la-Science-Ouverte/bso3-harvest-publication | 06c729a1e44ed87e8f73b4c2bd456f5e09a73e34 | [
"MIT"
] | null | null | null | import os
# Load the application environment
APP_ENV = os.getenv('APP_ENV')
# Export config
config = {
'APP_ENV': APP_ENV
}
| 13 | 34 | 0.7 |
4a1169b7b24f0298833951ed328b4198a5025ea2 | 87,442 | py | Python | src/olympia/addons/models.py | zjzh/addons-server | bbac7ff70f94443336f5fb0543ab8126a6adf76a | [
"BSD-3-Clause"
] | null | null | null | src/olympia/addons/models.py | zjzh/addons-server | bbac7ff70f94443336f5fb0543ab8126a6adf76a | [
"BSD-3-Clause"
] | null | null | null | src/olympia/addons/models.py | zjzh/addons-server | bbac7ff70f94443336f5fb0543ab8126a6adf76a | [
"BSD-3-Clause"
] | null | null | null | import hashlib
import itertools
import os
import re
import time
import uuid
from datetime import datetime
from urllib.parse import urlsplit
from django.conf import settings
from django.contrib.staticfiles.storage import staticfiles_storage
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
fr... | 36.833193 | 92 | 0.637634 |
4a1169f28477173ae5d519367943ff17a57d7bc4 | 51,781 | py | Python | dialogflow_v2/gapic/entity_types_client.py | onurtimur/dialogflow-python-client-v2 | 94e025232ab10459a844a853e75142a666581668 | [
"Apache-2.0"
] | 2 | 2019-10-29T14:39:57.000Z | 2019-11-01T11:49:04.000Z | dialogflow_v2/gapic/entity_types_client.py | onurtimur/dialogflow-python-client-v2 | 94e025232ab10459a844a853e75142a666581668 | [
"Apache-2.0"
] | null | null | null | dialogflow_v2/gapic/entity_types_client.py | onurtimur/dialogflow-python-client-v2 | 94e025232ab10459a844a853e75142a666581668 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 43.007475 | 154 | 0.609644 |
4a116a170640d63f8b19da0b7757b435111b8cc5 | 645 | py | Python | code/merge_intervals.py | shenhuaze/leetcode-python | b81bdb27d0f9da5620e83e2476c9ef585f4a0001 | [
"MIT"
] | 1 | 2019-06-17T04:37:39.000Z | 2019-06-17T04:37:39.000Z | code/merge_intervals.py | shenhuaze/leetcode-python | b81bdb27d0f9da5620e83e2476c9ef585f4a0001 | [
"MIT"
] | null | null | null | code/merge_intervals.py | shenhuaze/leetcode-python | b81bdb27d0f9da5620e83e2476c9ef585f4a0001 | [
"MIT"
] | null | null | null | """
@author Huaze Shen
@date 2019-08-07
"""
def merge(intervals):
if intervals is None or len(intervals) == 0 or intervals[0] is None or len(intervals[0]) == 0:
return []
intervals = sorted(intervals, key=lambda d: d[0])
results = [intervals[0]]
for i in range(1, len(intervals)):
if in... | 28.043478 | 98 | 0.582946 |
4a116b1a4b2666ba5166ce30f47dbc3afe5d98ba | 408 | py | Python | instagram/notifications/serializers.py | bbamsa/instagramCloning | 199df9f7b3376ef35b91032ceee578bdcc0d0b82 | [
"MIT"
] | null | null | null | instagram/notifications/serializers.py | bbamsa/instagramCloning | 199df9f7b3376ef35b91032ceee578bdcc0d0b82 | [
"MIT"
] | 15 | 2020-06-05T19:05:57.000Z | 2022-03-08T22:50:35.000Z | instagram/notifications/serializers.py | shkimroy/instagram-clone | f711d82d94b4de92d1bea05fae4706b0ba496d64 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from . import models
from instagram.users import serializers as user_serializers
from instagram.images import serializers as image_serializers
class NotificationSerializer(serializers.ModelSerializer):
creator = user_serializers.ListUserSerializer()
image = image_serializers... | 31.384615 | 61 | 0.821078 |
4a116bb2f56fba3dd4f5e73822dffbacaf0a55bc | 3,182 | py | Python | generate_data.py | awsalialem/aws-datalake-glue-studio | 3185b15d4f747a1f4f42a245edb2914486ae362c | [
"MIT"
] | null | null | null | generate_data.py | awsalialem/aws-datalake-glue-studio | 3185b15d4f747a1f4f42a245edb2914486ae362c | [
"MIT"
] | null | null | null | generate_data.py | awsalialem/aws-datalake-glue-studio | 3185b15d4f747a1f4f42a245edb2914486ae362c | [
"MIT"
] | null | null | null | import os
import io
import sys
import json
import random
import boto3
import argparse
import datetime as dt
from faker import *
from faker import Faker, providers
# Create a client with aws service and region
def create_client(service, region):
return boto3.client(service, region_name=region)
class Ventilator(pro... | 28.666667 | 182 | 0.691389 |
4a116c11aac46628f2bfb46d7d919eb74311697b | 876 | py | Python | test/test_customer_input.py | altoyield/python-beanieclient | 448b8dd328054eaf32dd7d0bdff700e603b5c27d | [
"Apache-2.0"
] | null | null | null | test/test_customer_input.py | altoyield/python-beanieclient | 448b8dd328054eaf32dd7d0bdff700e603b5c27d | [
"Apache-2.0"
] | null | null | null | test/test_customer_input.py | altoyield/python-beanieclient | 448b8dd328054eaf32dd7d0bdff700e603b5c27d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Beanie ERP API
An API specification for interacting with the Beanie ERP system # noqa: E501
OpenAPI spec version: 0.2
Contact: dev@bean.ie
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import be... | 21.365854 | 81 | 0.694064 |
4a116eb3a1730797224586d8204021779c9708e8 | 19,437 | py | Python | camkes/runner/Context.py | aisamanra/camkes-tool | 4bcf3f22ef7e73f8755ca1b5e7165dd6a23e89f3 | [
"BSD-2-Clause"
] | null | null | null | camkes/runner/Context.py | aisamanra/camkes-tool | 4bcf3f22ef7e73f8755ca1b5e7165dd6a23e89f3 | [
"BSD-2-Clause"
] | null | null | null | camkes/runner/Context.py | aisamanra/camkes-tool | 4bcf3f22ef7e73f8755ca1b5e7165dd6a23e89f3 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2017, Data61
# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# ABN 41 687 119 230.
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE... | 42.346405 | 132 | 0.666821 |
4a116ecfd8681b240766859ac4029218d363d6d9 | 5,573 | py | Python | handlers/users/new_list.py | Ilya-koala/VSL_Bot | 03399a49a2bc8baa97cc5d6f84a7406dbaafd262 | [
"MIT"
] | null | null | null | handlers/users/new_list.py | Ilya-koala/VSL_Bot | 03399a49a2bc8baa97cc5d6f84a7406dbaafd262 | [
"MIT"
] | 1 | 2021-06-25T18:53:54.000Z | 2021-06-30T16:15:54.000Z | handlers/users/new_list.py | Ilya-koala/VSL_Bot | 03399a49a2bc8baa97cc5d6f84a7406dbaafd262 | [
"MIT"
] | 3 | 2021-04-18T09:39:59.000Z | 2021-05-18T16:47:19.000Z | from os import path
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
from aiogram.types import CallbackQuery, Message
from aiogram.dispatcher import FSMContext
from loader import dp, db
from states.new_list import NewList
from keyboards.inline.lists_markups import start_page_keybo... | 33.981707 | 303 | 0.695317 |
4a116f08198cf67388009caa49a582965bb9e6be | 2,942 | py | Python | proxypool/db.py | linearxian/ProxyPool | eee64e8a6ca8908d78f428edfc9f8e0b7cbaf90e | [
"Apache-2.0"
] | null | null | null | proxypool/db.py | linearxian/ProxyPool | eee64e8a6ca8908d78f428edfc9f8e0b7cbaf90e | [
"Apache-2.0"
] | null | null | null | proxypool/db.py | linearxian/ProxyPool | eee64e8a6ca8908d78f428edfc9f8e0b7cbaf90e | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.append("/Users/xianwu1/Documents/crawler/ProxyPool")
import redis
from proxypool.error import PoolEmptyError
from proxypool.setting import REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, REDIS_KEY
from proxypool.setting import MAX_SCORE, MIN_SCORE, INITIAL_SCORE
from random import choice
import re
class R... | 27.240741 | 99 | 0.551666 |
4a116f34c49e66a7c55bc34d425d0b46954c7907 | 1,870 | py | Python | displ/build/submit_pw_post.py | tflovorn/displ | 094c194c54f02d463353075c6ca82f457f1247fa | [
"MIT"
] | 4 | 2018-04-09T20:39:24.000Z | 2021-06-19T12:21:52.000Z | displ/build/submit_pw_post.py | tflovorn/displ | 094c194c54f02d463353075c6ca82f457f1247fa | [
"MIT"
] | null | null | null | displ/build/submit_pw_post.py | tflovorn/displ | 094c194c54f02d463353075c6ca82f457f1247fa | [
"MIT"
] | 4 | 2018-04-09T20:39:41.000Z | 2021-06-19T12:21:53.000Z | import argparse
import os
from copy import deepcopy
from displ.build.util import _global_config
from displ.build.build import get_prefix_groups
from displ.queue.queuefile import mpi_procs_per_node
from displ.queue.internal import enqueue
def submit_pw_post(base_path, config, prefix_groups):
config["base_path"] = b... | 35.961538 | 90 | 0.689305 |
4a11700ef6f5275e0dd2b0804ac93ae058787fab | 2,689 | py | Python | src/discurses/ui/member_list.py | StarlitGhost/Discurses | 7ba4882aab9cd8e1de1e089d02877942c9b70a16 | [
"MIT"
] | 168 | 2016-07-25T17:04:37.000Z | 2022-01-23T22:49:36.000Z | src/discurses/ui/member_list.py | StarlitGhost/Discurses | 7ba4882aab9cd8e1de1e089d02877942c9b70a16 | [
"MIT"
] | 68 | 2016-07-26T14:00:43.000Z | 2019-11-05T10:36:16.000Z | src/discurses/ui/member_list.py | StarlitGhost/Discurses | 7ba4882aab9cd8e1de1e089d02877942c9b70a16 | [
"MIT"
] | 29 | 2016-10-06T08:51:18.000Z | 2021-06-14T17:48:47.000Z | import os
import urwid
import discord
import discurses.keymaps as keymaps
class MemberList(urwid.WidgetWrap):
def __init__(self, chat_widget):
self.chat_widget = chat_widget
self.list_walker = urwid.SimpleListWalker([])
self.w_listbox = urwid.ListBox(self.list_walker)
self.update... | 37.347222 | 79 | 0.566753 |
4a117118b3b382f4d488fd4e6208e3f2bf4c240f | 754 | py | Python | test/model/financeiroservicovalor.py | robertons/dbmodel | 628c4d6a2d0b23d9137015e5b0ea4551b20943bd | [
"MIT"
] | null | null | null | test/model/financeiroservicovalor.py | robertons/dbmodel | 628c4d6a2d0b23d9137015e5b0ea4551b20943bd | [
"MIT"
] | null | null | null | test/model/financeiroservicovalor.py | robertons/dbmodel | 628c4d6a2d0b23d9137015e5b0ea4551b20943bd | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*-
from dbmodel.entity import *
class FinanceiroServicoValor(Entity):
__primary_key__ = ['id']
# FIELDS
@Int(pk=True, auto_increment=True, not_null=True, precision = 10, scale=0)
def id(self): pass
@String(not_null=True, max=45)
def fin_srv_nome(self): pass
@String(not_null=True, max=25... | 24.322581 | 98 | 0.725464 |
4a117119facf8ec83a747be7eaa59f91bb31a1e9 | 158 | py | Python | about/admin.py | aduuna/edsa-ug | 70fae3cd10ed0139c8a3523154e52db86fa7bb72 | [
"MIT"
] | null | null | null | about/admin.py | aduuna/edsa-ug | 70fae3cd10ed0139c8a3523154e52db86fa7bb72 | [
"MIT"
] | null | null | null | about/admin.py | aduuna/edsa-ug | 70fae3cd10ed0139c8a3523154e52db86fa7bb72 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Position, Person
# Register your models here.
admin.site.register(Position)
admin.site.register(Person)
| 22.571429 | 36 | 0.810127 |
4a1172064d7fcc4545c445e392461f6b3018e534 | 1,349 | py | Python | var/spack/repos/builtin/packages/voropp/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/voropp/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/voropp/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Voropp(MakefilePackage):
"""Voro++ is a open source software library for the computation o... | 36.459459 | 95 | 0.610082 |
4a1172400043038d53cc5722c4902ea20be12c36 | 22,936 | py | Python | examples/dmm/dmm.py | cweniger/pyro | ba104f07ca17865d2600e8765d920d549fcb3fbc | [
"MIT"
] | 10 | 2020-03-18T14:41:25.000Z | 2021-07-04T08:49:57.000Z | examples/dmm/dmm.py | cweniger/pyro | ba104f07ca17865d2600e8765d920d549fcb3fbc | [
"MIT"
] | 19 | 2018-10-30T13:45:31.000Z | 2019-09-27T14:16:57.000Z | examples/dmm/dmm.py | cweniger/pyro | ba104f07ca17865d2600e8765d920d549fcb3fbc | [
"MIT"
] | 5 | 2020-06-21T23:40:35.000Z | 2021-11-09T16:18:42.000Z | """
An implementation of a Deep Markov Model in Pyro based on reference [1].
This is essentially the DKS variant outlined in the paper. The primary difference
between this implementation and theirs is that in our version any KL divergence terms
in the ELBO are estimated via sampling, while they make use of the analytic... | 49.645022 | 115 | 0.650113 |
4a11737af2ce14dacb94be951b8e3bb38eeeebec | 252 | py | Python | training/mtcnn_config.py | thaiph99/MTCNN | d6acfcdba972beb47751d63a34f3cf168d0488d2 | [
"MIT"
] | 50 | 2017-09-18T16:11:01.000Z | 2022-03-28T15:54:04.000Z | training/mtcnn_config.py | thaiph99/MTCNN | d6acfcdba972beb47751d63a34f3cf168d0488d2 | [
"MIT"
] | 7 | 2017-09-18T16:11:36.000Z | 2018-05-05T01:39:24.000Z | training/mtcnn_config.py | thaiph99/MTCNN | d6acfcdba972beb47751d63a34f3cf168d0488d2 | [
"MIT"
] | 22 | 2018-03-22T06:31:14.000Z | 2020-03-10T07:20:04.000Z | #coding:utf-8
from easydict import EasyDict as edict
config = edict()
config.BATCH_SIZE = 384
config.CLS_OHEM = True
config.CLS_OHEM_RATIO = 0.7
config.BBOX_OHEM = False
config.BBOX_OHEM_RATIO = 0.7
config.EPS = 1e-14
config.LR_EPOCH = [6, 14, 20]
| 16.8 | 38 | 0.746032 |
4a117444d278335cb1e43fb1e5ee405647c2a97a | 685 | py | Python | app/core/migrations/0003_ingredient.py | nabeelmehmood/recipe-app-api | 2bca83f50e291a5c484c5ff8aef2122ba9c6492a | [
"MIT"
] | null | null | null | app/core/migrations/0003_ingredient.py | nabeelmehmood/recipe-app-api | 2bca83f50e291a5c484c5ff8aef2122ba9c6492a | [
"MIT"
] | null | null | null | app/core/migrations/0003_ingredient.py | nabeelmehmood/recipe-app-api | 2bca83f50e291a5c484c5ff8aef2122ba9c6492a | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2020-02-28 08:53
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0002_tag'),
]
operations = [
migrations.CreateModel(
n... | 28.541667 | 118 | 0.617518 |
4a11759e6d223573d843c45e825ba3d11be7ae10 | 1,776 | py | Python | Mundo3/Desafio092.py | Marcoakira/Desafios_Python_do_Curso_Guanabara | c49b774148a2232f8f3c21b83e3dc97610480757 | [
"MIT"
] | null | null | null | Mundo3/Desafio092.py | Marcoakira/Desafios_Python_do_Curso_Guanabara | c49b774148a2232f8f3c21b83e3dc97610480757 | [
"MIT"
] | null | null | null | Mundo3/Desafio092.py | Marcoakira/Desafios_Python_do_Curso_Guanabara | c49b774148a2232f8f3c21b83e3dc97610480757 | [
"MIT"
] | null | null | null | # Desasfio092 esse programa le: o nome, ano de nascimento CTPS. no dicionario vai guardar nome, idade, CTPS, ano de contratação, e ano que ira se aposentar.
from datetime import date
cadastro_unico = []
cadastro_temporario = {}
#atual = date.today().year
while True:
cadastro_temporario['nome'] = str(input('Nome:... | 45.538462 | 156 | 0.712275 |
4a11762dd8532188555ccf405132f24eb8760d37 | 1,512 | py | Python | temboardagent/postgres.py | pierrehilbert/temboard-agent | 40c670dd607c6fea651630a353ebe639f4ba661e | [
"PostgreSQL"
] | null | null | null | temboardagent/postgres.py | pierrehilbert/temboard-agent | 40c670dd607c6fea651630a353ebe639f4ba661e | [
"PostgreSQL"
] | null | null | null | temboardagent/postgres.py | pierrehilbert/temboard-agent | 40c670dd607c6fea651630a353ebe639f4ba661e | [
"PostgreSQL"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
from .spc import connector
from .spc import error as PostgresError
from .errors import UserError
class ConnectionManager(object):
def __init__(self, postgres):
self.postgres = postgres
def __enter__(self):
self.conn = connector(
... | 26.526316 | 78 | 0.594577 |
4a1176370c3ee01ea5f92526c2405a08b2c25bc6 | 2,793 | py | Python | PyQuante/GridPoint.py | certik/pyquante | f5cae27f519b1c1b70afbebfe8b5c83cb4b3c2a6 | [
"DOC"
] | null | null | null | PyQuante/GridPoint.py | certik/pyquante | f5cae27f519b1c1b70afbebfe8b5c83cb4b3c2a6 | [
"DOC"
] | null | null | null | PyQuante/GridPoint.py | certik/pyquante | f5cae27f519b1c1b70afbebfe8b5c83cb4b3c2a6 | [
"DOC"
] | 1 | 2022-01-07T19:20:27.000Z | 2022-01-07T19:20:27.000Z | """\
GridPoint.py: A class to hold grid point data
This program is part of the PyQuante quantum chemistry program suite.
Copyright (c) 2004, Richard P. Muller. All Rights Reserved.
PyQuante version 1.2 and later is covered by the modified BSD
license. Please see the file LICENSE that is part of this
distribut... | 36.272727 | 76 | 0.588256 |
4a1176e1a256fe0632b6ab69175271cf738c8fd2 | 12,139 | py | Python | simulation-ros/src/turtlebot2i/turtlebot2i_safety/tools/Labeling_tools/3ApplyRulesOnData/label_dataset.py | EricssonResearch/scott-eu | aad7fd2f767a3c5e7d89223a593fd979ad596db3 | [
"Apache-2.0"
] | 19 | 2017-06-29T07:41:26.000Z | 2021-11-03T18:48:48.000Z | simulation-ros/src/turtlebot2i/turtlebot2i_safety/tools/Labeling_tools/3ApplyRulesOnData/label_dataset.py | EricssonResearch/scott-eu | aad7fd2f767a3c5e7d89223a593fd979ad596db3 | [
"Apache-2.0"
] | 175 | 2017-06-29T09:37:43.000Z | 2021-07-09T12:55:28.000Z | simulation-ros/src/turtlebot2i/turtlebot2i_safety/tools/Labeling_tools/3ApplyRulesOnData/label_dataset.py | EricssonResearch/scott-eu | aad7fd2f767a3c5e7d89223a593fd979ad596db3 | [
"Apache-2.0"
] | 8 | 2017-10-31T08:53:12.000Z | 2021-07-21T06:14:43.000Z | #!/usr/bin/env python
'''-------------------------------------------
--We will not label the data set in this way--
-------------------------------------------'''
import os
import re
import csv
''' #Disable images
import matplotlib.pyplot as plt # plt to show img
#%matplotlib inline
plt.ion() # Don't forget this
plt.a... | 43.046099 | 149 | 0.629871 |
4a117899f1d841d1e5671a721c66e6d805699216 | 3,047 | py | Python | tests/protocol/test_protocol_util.py | koifans/WALinuxAgent | 236c6c12d89757589411651ae015640d371251a4 | [
"Apache-2.0"
] | 1 | 2020-11-23T10:48:28.000Z | 2020-11-23T10:48:28.000Z | tests/protocol/test_protocol_util.py | koifans/WALinuxAgent | 236c6c12d89757589411651ae015640d371251a4 | [
"Apache-2.0"
] | 1 | 2019-06-06T13:24:55.000Z | 2019-06-06T13:24:55.000Z | tests/protocol/test_protocol_util.py | koifans/WALinuxAgent | 236c6c12d89757589411651ae015640d371251a4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Microsoft Corporation
#
# 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... | 37.158537 | 74 | 0.72235 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.