hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f47ed8fe6020022d7b1589221f9e2222859d8ce5 | 4,785 | py | Python | sagas/ofbiz/schema_testing.py | samlet/stack | 47db17fd4fdab264032f224dca31a4bb1d19b754 | [
"Apache-2.0"
] | 3 | 2020-01-11T13:55:38.000Z | 2020-08-25T22:34:15.000Z | sagas/ofbiz/schema_testing.py | samlet/stack | 47db17fd4fdab264032f224dca31a4bb1d19b754 | [
"Apache-2.0"
] | null | null | null | sagas/ofbiz/schema_testing.py | samlet/stack | 47db17fd4fdab264032f224dca31a4bb1d19b754 | [
"Apache-2.0"
] | 1 | 2021-01-01T05:21:44.000Z | 2021-01-01T05:21:44.000Z | import json
import graphene
from sagas.ofbiz.schema_queries_g import *
from sagas.ofbiz.connector import OfbizConnector
from sagas.ofbiz.finder import Finder
from sagas.ofbiz.util import QueryHelper
oc=OfbizConnector()
finder=Finder(oc)
helper=QueryHelper(oc, finder)
class Query(graphene.ObjectType):
testing = gr... | 40.550847 | 120 | 0.694671 |
495eff15908c618c61d080dde8bbabe3ef2c3139 | 1,582 | py | Python | speedo_server/database/tables.py | nokx5/speedo | 23d42bd6148eef845d7f11c992b17ae1bc2fbd6d | [
"MIT"
] | null | null | null | speedo_server/database/tables.py | nokx5/speedo | 23d42bd6148eef845d7f11c992b17ae1bc2fbd6d | [
"MIT"
] | null | null | null | speedo_server/database/tables.py | nokx5/speedo | 23d42bd6148eef845d7f11c992b17ae1bc2fbd6d | [
"MIT"
] | null | null | null | # mypy: ignore-errors
from sqlalchemy import MetaData, Table, Column, ForeignKey, DateTime, String, Integer
from sqlalchemy import UniqueConstraint
from sqlalchemy.sql.functions import now
metadata = MetaData()
User = Table(
"speedo_user",
metadata,
Column("id", Integer, primary_key=True),
Column("na... | 26.813559 | 88 | 0.66182 |
bc7e6b08e087ade969eb9b21b4c4b55be082e45d | 1,668 | py | Python | xpresso/binders/_openapi_providers/params/query.py | graingert/xpresso | 217ae3ca0e1f2d1d69bbb0376e8aab6decd64d6c | [
"MIT"
] | null | null | null | xpresso/binders/_openapi_providers/params/query.py | graingert/xpresso | 217ae3ca0e1f2d1d69bbb0376e8aab6decd64d6c | [
"MIT"
] | null | null | null | xpresso/binders/_openapi_providers/params/query.py | graingert/xpresso | 217ae3ca0e1f2d1d69bbb0376e8aab6decd64d6c | [
"MIT"
] | null | null | null | from pydantic.schema import field_schema, get_flat_models_from_field, get_model_name_map
from xpresso.binders._openapi_providers.api import ModelNameMap, Schemas
from xpresso.binders._openapi_providers.params.base import (
OpenAPIParameterBase,
OpenAPIParameterMarkerBase,
)
from xpresso.openapi import models a... | 34.75 | 104 | 0.648082 |
684a12b8d278b7fdf8787369bccbe080e6ba8c53 | 137 | py | Python | tests/__init__.py | hawkeone/PlexTraktSync | cc5505c2035244d4b0ef83b8488d9ab45c007ac0 | [
"MIT"
] | null | null | null | tests/__init__.py | hawkeone/PlexTraktSync | cc5505c2035244d4b0ef83b8488d9ab45c007ac0 | [
"MIT"
] | 24 | 2021-08-11T08:19:09.000Z | 2022-03-31T08:23:56.000Z | tests/__init__.py | 7a6163/PlexTraktSync | 74319e4750343ef37107e96d92ff8bdb3aac95cc | [
"MIT"
] | null | null | null | import sys
from os.path import dirname, abspath
# Add our module to system path
sys.path.insert(0, dirname(dirname(abspath(__file__))))
| 22.833333 | 55 | 0.773723 |
5290b1c725f5250df8c1285abd33e81faa6905a0 | 295 | py | Python | app/auth/serializers.py | AuFeld/COAG | 3874a9c1c6ceb908a6bbabfb49e2c701d8e54f20 | [
"MIT"
] | 1 | 2021-06-03T10:29:12.000Z | 2021-06-03T10:29:12.000Z | app/auth/serializers.py | AuFeld/COAG | 3874a9c1c6ceb908a6bbabfb49e2c701d8e54f20 | [
"MIT"
] | 45 | 2021-06-05T14:47:09.000Z | 2022-03-30T06:16:44.000Z | app/auth/serializers.py | AuFeld/COAG | 3874a9c1c6ceb908a6bbabfb49e2c701d8e54f20 | [
"MIT"
] | null | null | null | from app.auth.models import Token
from app.serializers.common import ModelSerializer
class TokenSerializer(ModelSerializer):
"""
Serializer for the default `Token` model.
Use it if you use default model.
"""
class Meta:
model = Token
exclude = {"user_id"}
| 21.071429 | 50 | 0.674576 |
6b3b12eccc299d4ecf872ef389337441d725f401 | 16,671 | py | Python | Lib/test/test_zlib.py | deadsnakes/python2.5 | d5dbcd8556f1e45094bd383b50727e248d9de1bf | [
"PSF-2.0"
] | null | null | null | Lib/test/test_zlib.py | deadsnakes/python2.5 | d5dbcd8556f1e45094bd383b50727e248d9de1bf | [
"PSF-2.0"
] | 1 | 2021-04-11T15:01:12.000Z | 2021-04-11T15:01:12.000Z | Lib/test/test_zlib.py | deadsnakes/python2.5 | d5dbcd8556f1e45094bd383b50727e248d9de1bf | [
"PSF-2.0"
] | 2 | 2016-04-04T14:31:33.000Z | 2018-03-09T22:39:02.000Z | import unittest
from test import test_support
import zlib
import random
# print test_support.TESTFN
def getbuf():
# This was in the original. Avoid non-repeatable sources.
# Left here (unused) in case something wants to be done with it.
import imp
try:
t = imp.find_module('test_zlib')
... | 34.232033 | 79 | 0.589707 |
2ec9d30b34678f43aaf792500e05455e545ca98b | 8,509 | py | Python | utils.py | xxchenxx/classifier-balancing | 9ffa6046a64bcac4b8b98ec93f2095900ec6b03b | [
"BSD-3-Clause"
] | 734 | 2020-03-19T20:25:47.000Z | 2022-03-30T03:37:28.000Z | utils.py | xxchenxx/classifier-balancing | 9ffa6046a64bcac4b8b98ec93f2095900ec6b03b | [
"BSD-3-Clause"
] | 21 | 2020-03-25T07:00:40.000Z | 2022-01-11T11:52:07.000Z | utils.py | xxchenxx/classifier-balancing | 9ffa6046a64bcac4b8b98ec93f2095900ec6b03b | [
"BSD-3-Clause"
] | 112 | 2020-03-20T02:05:52.000Z | 2022-03-28T06:15:27.000Z | """Copyright (c) Facebook, Inc. and its affiliates.
All rights reserved.
This source code is licensed under the license found in the
LICENSE file in the root directory of this source tree.
Portions of the source code are from the OLTR project which
notice below and in LICENSE in the root directory of
this source tree... | 34.172691 | 106 | 0.624868 |
bbcd73ff8eecaa1d1ad8dc5acfadc55c89c176d0 | 3,197 | py | Python | poet/modules/exec.py | packetgeek/poet | f76e8a0e289c18edc410d64f1bb31d9a3da4765f | [
"MIT"
] | 189 | 2015-02-12T08:42:38.000Z | 2019-10-21T07:12:58.000Z | Post-Exploitation/poet/poet/modules/exec.py | bhattsameer/TID3xploits | b57d8bae454081a3883a5684679e2a329e72d6e5 | [
"MIT"
] | 37 | 2015-01-22T02:41:45.000Z | 2016-03-20T03:27:33.000Z | Post-Exploitation/poet/poet/modules/exec.py | bhattsameer/TID3xploits | b57d8bae454081a3883a5684679e2a329e72d6e5 | [
"MIT"
] | 51 | 2015-02-12T08:42:26.000Z | 2019-05-20T14:30:17.000Z | import module
import config as CFG
import re
import zlib
REGEX = re.compile('^exec(\s+-o(\s+[\w.]+)?)?\s+(("[^"]+")\s+)+$')
EXEC = 'exec'
RECON = 'recon'
USAGE = """Execute commands on target.
usage: exec [-o [filename]] "cmd1" ["cmd2" "cmd3" ...]
\nExecute given commands and optionally log to file with optional file... | 25.99187 | 93 | 0.598686 |
76046511be47f584603ab1de9fa2a3294d4ec2b8 | 14,346 | py | Python | tests/test_session_manager.py | yabov/hermes_fix | 0a5e89fd15903a7ee0929e82b39879362e2e1008 | [
"Apache-2.0"
] | 2 | 2020-02-20T15:00:35.000Z | 2020-02-21T19:27:53.000Z | tests/test_session_manager.py | yabov/hermes_fix | 0a5e89fd15903a7ee0929e82b39879362e2e1008 | [
"Apache-2.0"
] | 3 | 2020-02-21T03:25:35.000Z | 2020-02-21T18:37:42.000Z | tests/test_session_manager.py | yabov/hermes_fix | 0a5e89fd15903a7ee0929e82b39879362e2e1008 | [
"Apache-2.0"
] | null | null | null | import asyncio
import logging
import queue
import time
import unittest
from datetime import datetime, timedelta
from dateutil.tz import gettz
import hermes_fix as fix
from hermes_fix import fix_engine, fix_errors
from hermes_fix.message_lib.FIX_4_2 import \
fix_messages as fix_messages_4_2_0_base
logging.basicCon... | 54.340909 | 171 | 0.51659 |
c29ba62541bb2a86d1de9a3636faa6afc9546869 | 1,057 | py | Python | server/utils.py | githubalvin/pandorabox | 4bca09ea6df9c91fd2344a4346d037f5a1be643b | [
"MIT"
] | null | null | null | server/utils.py | githubalvin/pandorabox | 4bca09ea6df9c91fd2344a4346d037f5a1be643b | [
"MIT"
] | null | null | null | server/utils.py | githubalvin/pandorabox | 4bca09ea6df9c91fd2344a4346d037f5a1be643b | [
"MIT"
] | null | null | null |
if "_SINGLE_OBJ" not in globals():
_SINGLE_OBJ = {}
class SingletonMeta(type):
def __new__(cls, name ,bases, attrs):
init_func = attrs.get("__init__", None)
if init_func is None and bases:
init_func = getattr(bases[0], "__init__", None)
if init_func is not None:
... | 31.088235 | 73 | 0.591296 |
306feb44c1d6e62d79092d6c5d931fe32d4887ff | 20,099 | py | Python | meetings/flask_main.py | pahunter90/proj8-FreeTimes | 2812d16b6c1839a681a42e90b5539f10d7df24f5 | [
"Artistic-2.0"
] | null | null | null | meetings/flask_main.py | pahunter90/proj8-FreeTimes | 2812d16b6c1839a681a42e90b5539f10d7df24f5 | [
"Artistic-2.0"
] | null | null | null | meetings/flask_main.py | pahunter90/proj8-FreeTimes | 2812d16b6c1839a681a42e90b5539f10d7df24f5 | [
"Artistic-2.0"
] | null | null | null | import flask
from flask import render_template
from flask import request
from flask import url_for
import uuid
import heapq
from available import Available
from event import Event
import json
import logging
# Date handling
import arrow # Replacement for datetime, based on moment.js
# import datetime # But we still n... | 35.138112 | 116 | 0.639833 |
0e5b9c9178eb5cfe62e5e608dfc019dd257e6670 | 10,689 | py | Python | kubernetes/client/models/io_xk8s_cluster_v1alpha3_machine_deployment_spec_template_metadata_owner_references.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/io_xk8s_cluster_v1alpha3_machine_deployment_spec_template_metadata_owner_references.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/io_xk8s_cluster_v1alpha3_machine_deployment_spec_template_metadata_owner_references.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... | 40.033708 | 322 | 0.67939 |
acf9f02907c9158399c5ea5352441cec5acd7d6e | 58,647 | py | Python | src/bin/visitdiff.py | eddieTest/visit | ae7bf6f5f16b01cf6b672d34e2d293fa7170616b | [
"BSD-3-Clause"
] | null | null | null | src/bin/visitdiff.py | eddieTest/visit | ae7bf6f5f16b01cf6b672d34e2d293fa7170616b | [
"BSD-3-Clause"
] | null | null | null | src/bin/visitdiff.py | eddieTest/visit | ae7bf6f5f16b01cf6b672d34e2d293fa7170616b | [
"BSD-3-Clause"
] | 1 | 2020-03-18T23:17:43.000Z | 2020-03-18T23:17:43.000Z | ###############################################################################
#
# Purpose: Sets up a 2x2 layout of vis windows and expressions for database
# differencing of scalar variables (vector variables are still to
# be added). The intersection of the scalar variable names is
# calcu... | 37.570147 | 129 | 0.564462 |
ce0c39c8ce02953e9ad51bf9f31dd13082d8c747 | 8,992 | py | Python | agent.py | workofart/brawlstars-ai | df5f7855bf0c0bfe68d2eaf4a9e3a916c7d7189c | [
"MIT"
] | 12 | 2020-01-10T16:08:26.000Z | 2022-02-03T12:10:59.000Z | agent.py | workofart/brawlstars-ai | df5f7855bf0c0bfe68d2eaf4a9e3a916c7d7189c | [
"MIT"
] | 1 | 2020-07-09T01:48:17.000Z | 2020-07-21T18:22:37.000Z | agent.py | workofart/brawlstars-ai | df5f7855bf0c0bfe68d2eaf4a9e3a916c7d7189c | [
"MIT"
] | 5 | 2021-02-21T08:44:17.000Z | 2022-02-03T12:11:02.000Z | import tensorflow as tf
import random, time
import numpy as np
from experiencebuffer import Experience_Buffer
from net.dqnet import DQN_NNET
from utilities.utilities import take_action, get_latest_run_count
from utilities.window import WindowMgr
# Hyper Parameters for DQN
LEARNING_RATE = 1e-3
INITIAL_EPSILON = 0.7 # s... | 48.344086 | 141 | 0.658474 |
85b53f9bf5a613e008af6b1cf773c3ab6d0fa1c6 | 41,526 | py | Python | test/integration/test_integration_basics.py | zhaomoy/nighthawk | 8e8d925f193d1787dff31b4d401745505803641b | [
"Apache-2.0"
] | null | null | null | test/integration/test_integration_basics.py | zhaomoy/nighthawk | 8e8d925f193d1787dff31b4d401745505803641b | [
"Apache-2.0"
] | null | null | null | test/integration/test_integration_basics.py | zhaomoy/nighthawk | 8e8d925f193d1787dff31b4d401745505803641b | [
"Apache-2.0"
] | null | null | null | """Tests Nighthawk's basic functionality."""
import json
import logging
import math
import os
import pytest
import subprocess
import sys
import time
from threading import Thread
from test.integration.common import IpVersion
from test.integration.integration_test_fixtures import (
http_test_server_fixture, https_t... | 50.641463 | 128 | 0.746737 |
c075f94675358fe5634d9652eddecd36ee31c4eb | 10,894 | py | Python | api/base/exceptions.py | birdbrained/osf.io | ca70cf9fdacc2f3771038c8e5bc1c19e7126fd50 | [
"Apache-2.0"
] | 1 | 2019-12-23T04:30:20.000Z | 2019-12-23T04:30:20.000Z | api/base/exceptions.py | birdbrained/osf.io | ca70cf9fdacc2f3771038c8e5bc1c19e7126fd50 | [
"Apache-2.0"
] | 16 | 2020-03-24T16:30:32.000Z | 2022-03-03T22:39:45.000Z | api/base/exceptions.py | birdbrained/osf.io | ca70cf9fdacc2f3771038c8e5bc1c19e7126fd50 | [
"Apache-2.0"
] | null | null | null | import httplib as http
from django.utils.translation import ugettext_lazy as _
from rest_framework import status
from rest_framework.exceptions import APIException, AuthenticationFailed
def get_resource_object_member(error_key, context):
from api.base.serializers import RelationshipField
field = context['vie... | 39.32852 | 205 | 0.705985 |
1664cdfcc1db200e3bfacc4ac7f36145a606fc00 | 233 | py | Python | Module 2/Chapter02/borg_singleton_2.py | real-slim-chadi/Python_Master-the-Art-of-Design-Patterns | 95ec92272374e330b04d931208abbb184c7c7908 | [
"MIT"
] | 73 | 2016-09-15T23:07:04.000Z | 2022-03-05T15:09:48.000Z | Module 2/Chapter02/borg_singleton_2.py | real-slim-chadi/Python_Master-the-Art-of-Design-Patterns | 95ec92272374e330b04d931208abbb184c7c7908 | [
"MIT"
] | null | null | null | Module 2/Chapter02/borg_singleton_2.py | real-slim-chadi/Python_Master-the-Art-of-Design-Patterns | 95ec92272374e330b04d931208abbb184c7c7908 | [
"MIT"
] | 51 | 2016-10-07T20:47:51.000Z | 2021-12-22T21:00:24.000Z | __author__ = 'Chetan'
class Borg(object):
_shared_state = {}
def __new__(cls, *args, **kwargs):
obj = super(Borg, cls).__new__(cls, *args, **kwargs)
obj.__dict__ = cls._shared_state
return obj
| 25.888889 | 60 | 0.592275 |
3db9eb2d293ccb980c59e54891bd8a24756dd6c7 | 47,707 | py | Python | hiproc/resolve_jitter.py | AndrewAnnex/hiproc | c6c2bbdfa1d421e28d497bb6bfd70a5cde28b4f8 | [
"Apache-2.0"
] | null | null | null | hiproc/resolve_jitter.py | AndrewAnnex/hiproc | c6c2bbdfa1d421e28d497bb6bfd70a5cde28b4f8 | [
"Apache-2.0"
] | null | null | null | hiproc/resolve_jitter.py | AndrewAnnex/hiproc | c6c2bbdfa1d421e28d497bb6bfd70a5cde28b4f8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Perform the jitter derivation for a HiRISE observation.
Outputs are the jitter in the x (sample) and y (line) directions in
pixels, and the time (ephemeris time at that translation), average error
between the derived jitter function and the original data, linerate
(line time read from flat fi... | 30.898316 | 80 | 0.609093 |
4704b37e9c30f87eefa31ab9211601949e6a2ec9 | 24,811 | py | Python | safe.py | bjboyd02/repy_v2 | 18538558117287ddd801429ace5e47f52926343c | [
"MIT"
] | null | null | null | safe.py | bjboyd02/repy_v2 | 18538558117287ddd801429ace5e47f52926343c | [
"MIT"
] | null | null | null | safe.py | bjboyd02/repy_v2 | 18538558117287ddd801429ace5e47f52926343c | [
"MIT"
] | null | null | null | """
Authors: Phil Hassey, Armon Dadgar, Moshe Kaplan
Start Date: March 2007
Description:
There are 3 main components to this code:
Code safety analysis
This is done by creating an AST for the code, walking
through it node by node, and checking that only safe nodes
are used and that no ... | 32.263979 | 98 | 0.69711 |
13fdb6f7e51bbf8ba730b49c4f30553457f69db7 | 37 | py | Python | week5/keys.py | shiqin-liu/ppua6202-python-policy | 353b5e0044bfa9d6cef62bb436297ff0197e651d | [
"MIT"
] | 1 | 2021-12-30T20:06:57.000Z | 2021-12-30T20:06:57.000Z | week5/keys.py | shiqin-liu/ppua6202-python-policy | 353b5e0044bfa9d6cef62bb436297ff0197e651d | [
"MIT"
] | null | null | null | week5/keys.py | shiqin-liu/ppua6202-python-policy | 353b5e0044bfa9d6cef62bb436297ff0197e651d | [
"MIT"
] | null | null | null | census_api_key = 'your-key-code-here' | 37 | 37 | 0.783784 |
6635178e29909170d7e2e2463db467eebf4a7925 | 1,852 | py | Python | plab/smu/sweep_voltage.py | joamatab/photonic-coupling-drivers | c12581d8e2158a292e1c585e45c0207c8129c0f1 | [
"MIT"
] | null | null | null | plab/smu/sweep_voltage.py | joamatab/photonic-coupling-drivers | c12581d8e2158a292e1c585e45c0207c8129c0f1 | [
"MIT"
] | null | null | null | plab/smu/sweep_voltage.py | joamatab/photonic-coupling-drivers | c12581d8e2158a292e1c585e45c0207c8129c0f1 | [
"MIT"
] | null | null | null | from typing import Iterable, Union, Callable
from time import strftime, localtime
import pandas as pd
import numpy as np
from tqdm import tqdm
import qontrol
from plab.config import logger, CONFIG
from plab.measurement import measurement, Measurement
from plab.smu.smu_qontrol import smu_qontrol
@measurement
def sweep... | 24.051948 | 77 | 0.636609 |
3a7edc74eb6c3105f275b385479351086c5bd056 | 895 | py | Python | texts/migrations/0003_auto_20150908_2049.py | ben174/showertexts | b05e43dc2f0336f006a219ee7e30b94d4afd1311 | [
"MIT"
] | 13 | 2015-08-13T19:38:52.000Z | 2021-04-07T18:52:26.000Z | texts/migrations/0003_auto_20150908_2049.py | ben174/showertexts | b05e43dc2f0336f006a219ee7e30b94d4afd1311 | [
"MIT"
] | 2 | 2015-09-14T17:50:17.000Z | 2021-06-10T17:58:37.000Z | texts/migrations/0003_auto_20150908_2049.py | ben174/showertexts | b05e43dc2f0336f006a219ee7e30b94d4afd1311 | [
"MIT"
] | 3 | 2018-09-10T10:04:57.000Z | 2021-04-07T18:52:34.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('texts', '0002_auto_20150811_0432'),
]
operations = [
migrations.AddFie... | 27.121212 | 128 | 0.605587 |
f1d8b82e587d465011be35d70a452fab21c1d7fa | 5,688 | py | Python | rllib/examples/remote_envs_with_inference_done_on_main_node.py | jianoaix/ray | 1701b923bc83905f8961c06a6a173e3eba46a936 | [
"Apache-2.0"
] | null | null | null | rllib/examples/remote_envs_with_inference_done_on_main_node.py | jianoaix/ray | 1701b923bc83905f8961c06a6a173e3eba46a936 | [
"Apache-2.0"
] | null | null | null | rllib/examples/remote_envs_with_inference_done_on_main_node.py | jianoaix/ray | 1701b923bc83905f8961c06a6a173e3eba46a936 | [
"Apache-2.0"
] | null | null | null | """
This script demonstrates how one can specify n (vectorized) envs
as ray remote (actors), such that stepping through these occurs in parallel.
Also, actions for each env step will be calculated on the "main" node.
This can be useful if the "main" node is a GPU machine and we would like to
speed up batched action ca... | 35.111111 | 83 | 0.627461 |
facfc3179406c042f3c52506b5741ddfbbdf0e4b | 1,643 | py | Python | allure-pytest/setup.py | reinaldorossetti/allure-python | 76c1bf80714cb95f69f9fed401e564ef055f37de | [
"Apache-2.0"
] | 1 | 2021-04-25T16:44:40.000Z | 2021-04-25T16:44:40.000Z | allure-pytest/setup.py | reinaldorossetti/allure-python | 76c1bf80714cb95f69f9fed401e564ef055f37de | [
"Apache-2.0"
] | null | null | null | allure-pytest/setup.py | reinaldorossetti/allure-python | 76c1bf80714cb95f69f9fed401e564ef055f37de | [
"Apache-2.0"
] | null | null | null | import os,sys
from setuptools import setup
from pkg_resources import require, DistributionNotFound, VersionConflict
try:
require('pytest-allure-adaptor')
print("""
You have pytest-allure-adaptor installed.
You need to remove pytest-allure-adaptor from your site-packages
before installing allure-pyt... | 27.383333 | 76 | 0.664638 |
8ad266f6f86e7b4bba9f3eb9a32812c60d45de7f | 2,901 | py | Python | nostocalean/est/fixest.py | jiafengkevinchen/nostocalean | e666dd980009bc42abb46d474bcc74c01b94617a | [
"MIT"
] | null | null | null | nostocalean/est/fixest.py | jiafengkevinchen/nostocalean | e666dd980009bc42abb46d474bcc74c01b94617a | [
"MIT"
] | null | null | null | nostocalean/est/fixest.py | jiafengkevinchen/nostocalean | e666dd980009bc42abb46d474bcc74c01b94617a | [
"MIT"
] | 1 | 2021-11-19T14:55:20.000Z | 2021-11-19T14:55:20.000Z | """Methods for calling fixest using rpy2."""
import re
from typing import Optional
from rpy2 import robjects
from rpy2.robjects import packages
import pandas as pd
from nostocalean.functions import clean_name, suppress
RegressionResult = robjects.vectors.ListVector
base = packages.importr("base")
fixest = packages.... | 26.614679 | 88 | 0.613237 |
3656cab44b971cc68a2561efdd667d02fb35d8b4 | 442 | py | Python | areaofrectangle.py | Ahmad-Aiman/Calculate-Area-of-Rectangle | ff33a2eab14bffc1a8c29a9134cabea48b69538b | [
"MIT"
] | null | null | null | areaofrectangle.py | Ahmad-Aiman/Calculate-Area-of-Rectangle | ff33a2eab14bffc1a8c29a9134cabea48b69538b | [
"MIT"
] | null | null | null | areaofrectangle.py | Ahmad-Aiman/Calculate-Area-of-Rectangle | ff33a2eab14bffc1a8c29a9134cabea48b69538b | [
"MIT"
] | null | null | null | #Area of a rectangle = width x length
#Perimeter of a rectangle = 2 x [length + width#
width_input = float (input("\nPlease enter width: "))
length_input = float (input("Please enter length: "))
areaofRectangle = width_input * length_input
perimeterofRectangle = 2 * (width_input * length_input)
print ("\n... | 29.466667 | 67 | 0.70362 |
fcafdb6c9f73a76e9be42a2bc4387b6a0ece7631 | 145 | py | Python | Server/evaluate_model.py | TomerGibor/Final-Project-OCR | 826fc471a528ca4e8ab0a54c7921723b58f01485 | [
"MIT"
] | 8 | 2021-01-04T20:01:16.000Z | 2022-02-16T21:36:02.000Z | Server/evaluate_model.py | TomerGibor/Final-Project-OCR | 826fc471a528ca4e8ab0a54c7921723b58f01485 | [
"MIT"
] | null | null | null | Server/evaluate_model.py | TomerGibor/Final-Project-OCR | 826fc471a528ca4e8ab0a54c7921723b58f01485 | [
"MIT"
] | 3 | 2021-01-07T08:23:31.000Z | 2022-01-03T21:03:25.000Z | """Module used to run the evaluation of the OCR model."""
from ocr_model import OCRModel
model = OCRModel()
model.load_model()
model.evaluate()
| 20.714286 | 57 | 0.751724 |
d75b538645ae85fe9adab4e8079ec96835ff9748 | 1,239 | py | Python | serializer.py | JucianoC/emotion-biosignal-collector | 9a5c9554c3885ef50178f6f94d32a5d8fd881515 | [
"MIT"
] | null | null | null | serializer.py | JucianoC/emotion-biosignal-collector | 9a5c9554c3885ef50178f6f94d32a5d8fd881515 | [
"MIT"
] | null | null | null | serializer.py | JucianoC/emotion-biosignal-collector | 9a5c9554c3885ef50178f6f94d32a5d8fd881515 | [
"MIT"
] | null | null | null | import traceback
from typing import List
from typing import Tuple
from datetime import datetime
from loguru import logger
from models.engine import Session
from models.signals import Signals
class Serializer:
def __init__(self, id_subject: int, id_session: int) -> None:
self.session = Session()
... | 30.219512 | 79 | 0.588378 |
33836902897ca675faa94c5619774f73aa6dca3b | 759 | py | Python | src/compas_rv2/ui/Rhino/RV2/dev/RV2settings_cmd.py | selinabitting/compas-RV2 | 0884cc00d09c8f4a75eb2b97614105e4c8bfd818 | [
"MIT"
] | 34 | 2020-04-27T13:54:38.000Z | 2022-01-17T19:16:27.000Z | src/compas_rv2/ui/Rhino/RV2/dev/RV2settings_cmd.py | selinabitting/compas-RV2 | 0884cc00d09c8f4a75eb2b97614105e4c8bfd818 | [
"MIT"
] | 306 | 2020-04-27T12:00:54.000Z | 2022-03-23T22:28:54.000Z | src/compas_rv2/ui/Rhino/RV2/dev/RV2settings_cmd.py | selinabitting/compas-RV2 | 0884cc00d09c8f4a75eb2b97614105e4c8bfd818 | [
"MIT"
] | 11 | 2020-06-30T08:23:40.000Z | 2022-02-01T20:47:39.000Z | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from compas_rv2.rhino import get_scene
from compas_rv2.rhino import SettingsForm
from compas_rv2.rhino import rv2_error
__commandname__ = "RV2settings"
@rv2_error()
def RunCommand(is_interactive):
scen... | 23.71875 | 147 | 0.594203 |
69955ebe3f3faa5115d8834dabfe0570f2f4ddb0 | 479 | py | Python | custom_components/hacs/repositories/removed.py | constructorfleet/HomeAssistant-Config-Security | af6aec51fc7534cc21a7ab20b1af4d8052f737af | [
"MIT"
] | 297 | 2018-02-12T09:36:12.000Z | 2022-03-25T22:14:06.000Z | custom_components/hacs/repositories/removed.py | ludeeus/integration | 05c05291de5c938ce122f1d48c542938bceef83e | [
"MIT"
] | 55 | 2019-07-05T01:06:44.000Z | 2020-06-08T02:20:50.000Z | custom_components/hacs/repositories/removed.py | elsingaa/Home-Assistant-Config | d20a2dabf5deeef8f087fa6d34a371617da9c4cd | [
"MIT"
] | 64 | 2018-10-31T13:39:20.000Z | 2022-03-29T10:55:30.000Z | """Object for removed repositories."""
import attr
@attr.s(auto_attribs=True)
class RemovedRepository:
repository: str = None
reason: str = None
link: str = None
removal_type: str = None # archived, not_compliant, critical, dev, broken
acknowledged: bool = False
def update_data(self, data: d... | 26.611111 | 78 | 0.632568 |
56aea732e0bcce795f86daac14b950553c315fbd | 5,039 | py | Python | google/ads/google_ads/v6/proto/errors/change_status_error_pb2.py | jphanwebstaurant/google-ads-python | 600812b2afcc4d57f00b47dfe436620ce50bfe9b | [
"Apache-2.0"
] | 1 | 2021-04-09T04:28:47.000Z | 2021-04-09T04:28:47.000Z | google/ads/google_ads/v6/proto/errors/change_status_error_pb2.py | jphanwebstaurant/google-ads-python | 600812b2afcc4d57f00b47dfe436620ce50bfe9b | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v6/proto/errors/change_status_error_pb2.py | jphanwebstaurant/google-ads-python | 600812b2afcc4d57f00b47dfe436620ce50bfe9b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v6/proto/errors/change_status_error.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from go... | 41.644628 | 834 | 0.789045 |
b0ccfa9326cd0708f5672ef9427882b76268f291 | 2,934 | py | Python | App/gui/avatar_dialog.py | Wizard-collab/wizard | c2ec623fe011626716493c232b895fb0513f68ff | [
"MIT"
] | null | null | null | App/gui/avatar_dialog.py | Wizard-collab/wizard | c2ec623fe011626716493c232b895fb0513f68ff | [
"MIT"
] | null | null | null | App/gui/avatar_dialog.py | Wizard-collab/wizard | c2ec623fe011626716493c232b895fb0513f68ff | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\leo\Documents\Script\Wizard\App\gui\ui_files\avatar_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(obje... | 45.84375 | 125 | 0.74199 |
2d00c96de6db76b86755306a3089ba17411ef559 | 6,016 | py | Python | plot_publication.py | FLAMEGPU/circles-benchmark-vis | c96973e28f2732999d3eba245e9e518bf51b6852 | [
"MIT"
] | null | null | null | plot_publication.py | FLAMEGPU/circles-benchmark-vis | c96973e28f2732999d3eba245e9e518bf51b6852 | [
"MIT"
] | null | null | null | plot_publication.py | FLAMEGPU/circles-benchmark-vis | c96973e28f2732999d3eba245e9e518bf51b6852 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import matplotlib.image as mpimg
import argparse
import pathlib
# Default DPI
DEFAULT_DPI = 300
# Default directory for visualisation images
DEFAULT_INPUT_DIR="."
# Default direct... | 32.518919 | 101 | 0.625997 |
bbf0c2c22f53ebbbc02e692a263960a049427722 | 5,280 | py | Python | adder.py | shazada-shariar/tele.add | 02279107d0e30f605e7868dfc1d048fe5f3061d9 | [
"MIT"
] | null | null | null | adder.py | shazada-shariar/tele.add | 02279107d0e30f605e7868dfc1d048fe5f3061d9 | [
"MIT"
] | null | null | null | adder.py | shazada-shariar/tele.add | 02279107d0e30f605e7868dfc1d048fe5f3061d9 | [
"MIT"
] | null | null | null | import base64
exec(base64.b64decode('ZnJvbSB0ZWxldGhvbi5zeW5jIGltcG9ydCBUZWxlZ3JhbUNsaWVudApmcm9tIHRlbGV0aG9uLnRsLmZ1bmN0aW9ucy5tZXNzYWdlcyBpbXBvcnQgR2V0RGlhbG9nc1JlcXVlc3QKZnJvbSB0ZWxldGhvbi50bC50eXBlcyBpbXBvcnQgSW5wdXRQZWVyRW1wdHksIElucHV0UGVlckNoYW5uZWwsIElucHV0UGVlclVzZXIKZnJvbSB0ZWxldGhvbi5lcnJvcnMucnBjZXJyb3JsaXN... | 2,640 | 5,266 | 0.998106 |
7c3ad35e214411b9b656f97c70c68dc12515e8af | 3,553 | py | Python | tutorials/positional_tracking.py | aflyingnoob/zed-python | 1674098e27377554dc250c69fa44510ec1c13f5b | [
"MIT"
] | 1 | 2020-01-07T05:19:51.000Z | 2020-01-07T05:19:51.000Z | tutorials/positional_tracking.py | LMAInspectionCrawler/LMA_ZED_Subtraction_Python | 24a48ea6e8a2e1a47a0663e4ba8bbfa36d6ffe91 | [
"MIT"
] | null | null | null | tutorials/positional_tracking.py | LMAInspectionCrawler/LMA_ZED_Subtraction_Python | 24a48ea6e8a2e1a47a0663e4ba8bbfa36d6ffe91 | [
"MIT"
] | 1 | 2020-11-04T08:42:05.000Z | 2020-11-04T08:42:05.000Z | ########################################################################
#
# Copyright (c) 2017, STEREOLABS.
#
# All rights reserved.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHA... | 43.329268 | 115 | 0.673234 |
1d08780545bbab5356821f5668014fdccebab596 | 1,090 | py | Python | Sketches/RJL/Util/Lagger.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 12 | 2015-10-20T10:22:01.000Z | 2021-07-19T10:09:44.000Z | Sketches/RJL/Util/Lagger.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 2 | 2015-10-20T10:22:55.000Z | 2017-02-13T11:05:25.000Z | Sketches/RJL/Util/Lagger.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 6 | 2015-03-09T12:51:59.000Z | 2020-03-01T13:06:21.000Z | # -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Version 2.0 (the "Lic... | 33.030303 | 78 | 0.721101 |
466fc64423919a8115999ecc03cc41371a7302a6 | 2,145 | py | Python | sinchSMS/main.py | msdeep14/stayUpdated | b4165743b9bc6f03cb4c1b70e5c4a1a68e5eb667 | [
"MIT"
] | 16 | 2017-09-13T17:19:41.000Z | 2022-01-01T07:44:50.000Z | sinchSMS/main.py | msdeep14/stayUpdated | b4165743b9bc6f03cb4c1b70e5c4a1a68e5eb667 | [
"MIT"
] | null | null | null | sinchSMS/main.py | msdeep14/stayUpdated | b4165743b9bc6f03cb4c1b70e5c4a1a68e5eb667 | [
"MIT"
] | 7 | 2017-11-15T10:18:01.000Z | 2021-08-28T21:09:38.000Z | import urllib, urllib2, cookielib
import requests
from lxml import html
import time
from time import sleep
from sinchsms import SinchSMS
import sched
# set your credentials
username = 'your_username'
password = 'your_password'
number = 'your_mobile_number'
app_key = 'your_app_key'
app_secret = 'your_app_secret'
titlel... | 27.151899 | 70 | 0.662937 |
365d7542ce36a6408cb8adcaf4b1681f3e2cf310 | 8,391 | py | Python | utilities.py | mheen/ocean_data | 2db23bc63f8fd6405c9347da4783fa13a2adabe3 | [
"MIT"
] | 1 | 2020-09-24T09:43:12.000Z | 2020-09-24T09:43:12.000Z | utilities.py | mheen/ocean_data | 2db23bc63f8fd6405c9347da4783fa13a2adabe3 | [
"MIT"
] | null | null | null | utilities.py | mheen/ocean_data | 2db23bc63f8fd6405c9347da4783fa13a2adabe3 | [
"MIT"
] | null | null | null | from datetime import datetime,timedelta
import numpy as np
import json
from urllib.request import urlopen
from html.parser import HTMLParser
import os
# -----------------------------------------------
# General
# -----------------------------------------------
def get_dir(dirname,json_file='input/dirs.json'):
with... | 35.858974 | 114 | 0.633298 |
1ef2e40260455b0ce348728bcae959b226253484 | 8,126 | py | Python | src/pymordemos/analyze_pickle.py | TiKeil/pymor | 5c6b3b6e1714b5ede11ce7cf03399780ab29d252 | [
"Unlicense"
] | null | null | null | src/pymordemos/analyze_pickle.py | TiKeil/pymor | 5c6b3b6e1714b5ede11ce7cf03399780ab29d252 | [
"Unlicense"
] | null | null | null | src/pymordemos/analyze_pickle.py | TiKeil/pymor | 5c6b3b6e1714b5ede11ce7cf03399780ab29d252 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# This file is part of the pyMOR project (http://www.pymor.org).
# Copyright 2013-2020 pyMOR developers and contributors. All rights reserved.
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
import sys
import time
import numpy as np
import matplotlib.pyplot as plt
f... | 31.866667 | 108 | 0.603495 |
bd298e40c6fe8349aaa6a346c16159494396cfc9 | 3,261 | py | Python | tracker/tracker_tiny.py | DJT777/Tensorrt_Detection_With-SQL | 7762eb832af926861f9a6116f9dbc79280e177f3 | [
"MIT"
] | null | null | null | tracker/tracker_tiny.py | DJT777/Tensorrt_Detection_With-SQL | 7762eb832af926861f9a6116f9dbc79280e177f3 | [
"MIT"
] | null | null | null | tracker/tracker_tiny.py | DJT777/Tensorrt_Detection_With-SQL | 7762eb832af926861f9a6116f9dbc79280e177f3 | [
"MIT"
] | null | null | null | import tensorrt as trt
from utils import common
from utils.data_processing import *
from utils.draw import draw_boxes
from deep_sort import build_tracker
TRT_LOGGER = trt.Logger()
def get_engine(engine_file_path):
# If a serialized engine exists, use it instead of building an engine.
print("Reading engine fr... | 39.768293 | 113 | 0.604722 |
e7fc5508cdccd5e934053ee40ff49c692daaa841 | 2,502 | py | Python | src/forecastmgmt/model/forecast_originator.py | vvladych/forecastmgmt | 9eea272d00bb42031f49b5bb5af01388ecce31cf | [
"Unlicense"
] | null | null | null | src/forecastmgmt/model/forecast_originator.py | vvladych/forecastmgmt | 9eea272d00bb42031f49b5bb5af01388ecce31cf | [
"Unlicense"
] | 37 | 2015-07-01T22:18:51.000Z | 2016-03-11T21:17:12.000Z | src/forecastmgmt/model/forecast_originator.py | vvladych/forecastmgmt | 9eea272d00bb42031f49b5bb5af01388ecce31cf | [
"Unlicense"
] | null | null | null | '''
Created on 14.05.2015
@author: vvladych
'''
from MDO import MDO
class ForecastOriginator(MDO):
sql_dict={"get_all":"SELECT sid, forecast_sid, originator_sid FROM fc_forecast_originator",
#"get_all_foreign_key":"SELECT sid, forecast_sid, originator_sid FROM fc_forecast_originator WHERE fore... | 51.061224 | 169 | 0.645883 |
e5469e3550215bea4b069a3c0f3d89d7cd69237e | 2,236 | py | Python | dfa/server/services/firewall/native/drivers/base.py | CiscoSystems/fabric_enabler | d5318624dd15692197a7212ecd4b0ceea42dc73e | [
"Apache-2.0"
] | 1 | 2015-03-05T02:48:15.000Z | 2015-03-05T02:48:15.000Z | dfa/server/services/firewall/native/drivers/base.py | CiscoSystems/fabric_enabler | d5318624dd15692197a7212ecd4b0ceea42dc73e | [
"Apache-2.0"
] | 1 | 2016-05-25T22:13:43.000Z | 2016-07-21T20:49:48.000Z | dfa/server/services/firewall/native/drivers/base.py | CiscoSystems/fabric_enabler | d5318624dd15692197a7212ecd4b0ceea42dc73e | [
"Apache-2.0"
] | 2 | 2017-05-02T21:32:46.000Z | 2018-08-22T16:52:40.000Z | # Copyright 2015 Cisco Systems, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 25.409091 | 78 | 0.653399 |
1f09094421945b6bf3c989b90b22520b00313b24 | 794 | py | Python | gallery/urls.py | nadineuwineza/my_gallery | fa51ffb2ed0f53ff285fd2241150e5aad414c20f | [
"MIT"
] | null | null | null | gallery/urls.py | nadineuwineza/my_gallery | fa51ffb2ed0f53ff285fd2241150e5aad414c20f | [
"MIT"
] | null | null | null | gallery/urls.py | nadineuwineza/my_gallery | fa51ffb2ed0f53ff285fd2241150e5aad414c20f | [
"MIT"
] | null | null | null | """gallery URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 33.083333 | 77 | 0.70403 |
db97aedbcec5ac0129e464eee910562e2732791f | 1,808 | py | Python | utilities/composite_data_npy_to_csv.py | JoeyTeng/topology-and-meta-learning | 61fe5a231a0062d9939d1ccdfc0babcbe9562867 | [
"MIT"
] | 2 | 2017-06-07T15:59:58.000Z | 2019-05-24T14:00:33.000Z | utilities/composite_data_npy_to_csv.py | JoeyTeng/Algorithm-Selection-for-Classification-Problems-via-Cluster-based-Meta-features | 61fe5a231a0062d9939d1ccdfc0babcbe9562867 | [
"MIT"
] | null | null | null | utilities/composite_data_npy_to_csv.py | JoeyTeng/Algorithm-Selection-for-Classification-Problems-via-Cluster-based-Meta-features | 61fe5a231a0062d9939d1ccdfc0babcbe9562867 | [
"MIT"
] | 2 | 2020-04-09T10:50:50.000Z | 2021-09-28T00:50:23.000Z |
# @Author: Joey Teng
# @Email: joey.teng.dev@gmail.com
# @Filename: composite_data_npy_to_csv.py
# @Last modified by: Joey Teng
# @Last modified time: 11-Apr-2018
import csv
import os
import sys
import numpy
CLUSTER_FEATURES = [
"Average Size",
"Standard Deviation of Size",
"Average of Natural Logari... | 31.719298 | 76 | 0.587389 |
ea170acfd02801138d1ccb2d4c03e4fc7df6f44f | 728 | py | Python | src/hpilo_exporter/main.py | wardellc/hpilo-exporter | 20e69b723cb76f3f77b1a49d48c1ef479a2613e6 | [
"MIT"
] | null | null | null | src/hpilo_exporter/main.py | wardellc/hpilo-exporter | 20e69b723cb76f3f77b1a49d48c1ef479a2613e6 | [
"MIT"
] | null | null | null | src/hpilo_exporter/main.py | wardellc/hpilo-exporter | 20e69b723cb76f3f77b1a49d48c1ef479a2613e6 | [
"MIT"
] | null | null | null | """
Entrypoint for the application
"""
import argparse
from hpilo_exporter.exporter import ILOExporterServer
def main():
parser = argparse.ArgumentParser(description='Exports ilo heath_at_a_glance state to Prometheus')
parser.add_argument('--address', type=str, dest='address', default='0.0.0.0', help='addr... | 29.12 | 109 | 0.686813 |
30636c16821e201f2d511fc46c9525c0b05d78a7 | 2,348 | py | Python | tests/base/test_DataMisfit.py | kimjaed/simpeg | b8d716f86a4ea07ba3085fabb24c2bc974788040 | [
"MIT"
] | 1 | 2021-02-13T18:15:12.000Z | 2021-02-13T18:15:12.000Z | tests/base/test_DataMisfit.py | kimjaed/simpeg | b8d716f86a4ea07ba3085fabb24c2bc974788040 | [
"MIT"
] | null | null | null | tests/base/test_DataMisfit.py | kimjaed/simpeg | b8d716f86a4ea07ba3085fabb24c2bc974788040 | [
"MIT"
] | 1 | 2020-05-26T17:00:53.000Z | 2020-05-26T17:00:53.000Z | from __future__ import print_function
import unittest
import numpy as np
import scipy.sparse as sp
from SimPEG import Mesh, DataMisfit, Maps, Utils
from SimPEG.EM.Static import DC
np.random.seed(17)
class DataMisfitTest(unittest.TestCase):
def setUp(self):
mesh = Mesh.TensorMesh([30, 30], x0=[-0.5, -... | 26.382022 | 78 | 0.587734 |
e84fef20d3bd47063f542c205af48ac54ae8cbb9 | 625 | py | Python | tests/test_all.py | odra/pyco | 2c85fa0d74e7ef891815400c301a2bf55e9638ac | [
"MIT"
] | null | null | null | tests/test_all.py | odra/pyco | 2c85fa0d74e7ef891815400c301a2bf55e9638ac | [
"MIT"
] | null | null | null | tests/test_all.py | odra/pyco | 2c85fa0d74e7ef891815400c301a2bf55e9638ac | [
"MIT"
] | null | null | null | import inspect
import pyco
def test_from_fn(hello_world_fn):
fn = pyco.from_fn(hello_world_fn)
assert fn() == 'hello world'
def test_from_code(hello_world_fn):
fn = pyco.from_code(hello_world_fn.__code__)
assert fn() == 'hello world'
def test_from_fn_defaults(complex_fn):
fn = pyco.from_fn(complex_fn)
... | 25 | 87 | 0.7456 |
2e4df589ee38c0092c49e0acc516fabfc4625208 | 6,850 | py | Python | python/examples/plasma/sorting/sort_df.py | danielcompton/arrow | bce0ca40922278644ce9c610fc87c0761a95f2c4 | [
"Apache-2.0"
] | 3 | 2018-11-19T13:38:21.000Z | 2019-08-28T14:56:37.000Z | python/examples/plasma/sorting/sort_df.py | danielcompton/arrow | bce0ca40922278644ce9c610fc87c0761a95f2c4 | [
"Apache-2.0"
] | 1 | 2021-01-21T01:33:30.000Z | 2021-01-21T01:33:30.000Z | python/examples/plasma/sorting/sort_df.py | danielcompton/arrow | bce0ca40922278644ce9c610fc87c0761a95f2c4 | [
"Apache-2.0"
] | 1 | 2019-11-17T00:46:32.000Z | 2019-11-17T00:46:32.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... | 33.578431 | 79 | 0.685255 |
dc4f00c589df14b2663772070ce1a1c79cf450d6 | 44,628 | py | Python | lib-python/3/test/test_warnings/__init__.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | lib-python/3/test/test_warnings/__init__.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | lib-python/3/test/test_warnings/__init__.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | from contextlib import contextmanager
import linecache
import os
from io import StringIO
import sys
import unittest
from test import support
from test.support.script_helper import assert_python_ok, assert_python_failure
from test.test_warnings.data import stacklevel as warning_tests
import warnings as original_warnin... | 42.422053 | 87 | 0.607063 |
6a735bcb522a8084052248e0855ded6de1600af9 | 1,830 | py | Python | plotlog/datacut.py | s-naoya/plotlog | 278c7e1d6f2af90a55bb9fa121051e00e976c1c0 | [
"MIT"
] | null | null | null | plotlog/datacut.py | s-naoya/plotlog | 278c7e1d6f2af90a55bb9fa121051e00e976c1c0 | [
"MIT"
] | null | null | null | plotlog/datacut.py | s-naoya/plotlog | 278c7e1d6f2af90a55bb9fa121051e00e976c1c0 | [
"MIT"
] | null | null | null | import sys
import pandas as pd
class DataCut:
df = None
x_axis = None
__log_file_path = list()
__x_col = None
def __init__(self):
pass
def dispose(self):
self.__log_file_path = None
self.df = None
self.x_axis = None
def import_file(self, path, header=0, ... | 30.5 | 101 | 0.552459 |
4d79fa5c11f358e2b8be2dcc9cb595f1e284c9aa | 1,556 | py | Python | tests/sar_common.py | danielsc/Recommenders | e81620d5415c38ba146370c79121899eb1947e75 | [
"MIT"
] | 1 | 2019-01-20T11:55:23.000Z | 2019-01-20T11:55:23.000Z | tests/sar_common.py | eisber/Recommenders | 8389b63e412520af0cea8e1cefbdf7b6cce727b3 | [
"MIT"
] | null | null | null | tests/sar_common.py | eisber/Recommenders | 8389b63e412520af0cea8e1cefbdf7b6cce727b3 | [
"MIT"
] | 1 | 2019-01-22T05:54:30.000Z | 2019-01-22T05:54:30.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import numpy as np
import urllib.request
import csv
import codecs
import logging
log = logging.getLogger(__name__)
def _csv_reader_url(url, delimiter=",", encoding="utf-8"):
ftpstream = urllib.request.urlopen(url)
... | 27.298246 | 85 | 0.658098 |
b36d1483c1b224cc84286e06bf506164479046dc | 828 | py | Python | domaintools/komand_domaintools/actions/reverse_name_server/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | domaintools/komand_domaintools/actions/reverse_name_server/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | domaintools/komand_domaintools/actions/reverse_name_server/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
from .schema import ReverseNameServerInput, ReverseNameServerOutput
# Custom imports below
from komand_domaintools.util import util
class ReverseNameServer(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='reverse_name_server',
de... | 34.5 | 115 | 0.669082 |
7441d9ec0f320f3855765f5ce5b7b51f9f0fa211 | 7,101 | py | Python | .dev_scripts/benchmark_filter.py | skymanaditya1/mmdetection_modifications | 0030b884b691ff6d6429a3024f4e080063b7f1df | [
"Apache-2.0"
] | 20,190 | 2018-09-10T01:11:53.000Z | 2022-03-31T22:31:33.000Z | .dev_scripts/benchmark_filter.py | skymanaditya1/mmdetection_modifications | 0030b884b691ff6d6429a3024f4e080063b7f1df | [
"Apache-2.0"
] | 6,736 | 2018-09-17T09:45:51.000Z | 2022-03-31T22:54:10.000Z | .dev_scripts/benchmark_filter.py | skymanaditya1/mmdetection_modifications | 0030b884b691ff6d6429a3024f4e080063b7f1df | [
"Apache-2.0"
] | 7,837 | 2018-09-11T02:58:23.000Z | 2022-03-31T22:31:38.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os
import os.path as osp
def parse_args():
parser = argparse.ArgumentParser(description='Filter configs to train')
parser.add_argument(
'--basic-arch',
action='store_true',
help='to train models in basic arch')
... | 42.267857 | 92 | 0.732714 |
c61e0c44fa1cb8930611eeb8476139e49c9a096f | 337 | py | Python | python-leetcode/sw_06.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | 12 | 2020-01-16T08:55:27.000Z | 2021-12-02T14:52:39.000Z | python-leetcode/sw_06.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | null | null | null | python-leetcode/sw_06.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | 1 | 2019-12-11T12:00:38.000Z | 2019-12-11T12:00:38.000Z | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def reversePrint(self, head: ListNode) -> List[int]:
result, cur = [], head
while cur:
result.append(cur.val)
cur = cur.next
result.reverse()
... | 22.466667 | 54 | 0.602374 |
6424fba76be8cc3443bd7237a9028f1dee1b8f56 | 3,934 | py | Python | utils/layers.py | Fisher33318/yolov3-motebus | 96bf731cda088a18ebdc2e5a863adfef812e1095 | [
"MIT"
] | null | null | null | utils/layers.py | Fisher33318/yolov3-motebus | 96bf731cda088a18ebdc2e5a863adfef812e1095 | [
"MIT"
] | null | null | null | utils/layers.py | Fisher33318/yolov3-motebus | 96bf731cda088a18ebdc2e5a863adfef812e1095 | [
"MIT"
] | 1 | 2021-05-05T07:55:29.000Z | 2021-05-05T07:55:29.000Z | import torch.nn.functional as F
from utils.utils import *
class FeatureConcat(nn.Module):
def __init__(self, layers):
super(FeatureConcat, self).__init__()
self.layers = layers # layer indices
self.multiple = len(layers) > 1 # multiple layers flag
def forward(self, x, outputs):
... | 38.568627 | 120 | 0.534316 |
858483b63438f69f45d92ac72a18ad26eaa4995f | 3,926 | py | Python | src/sunstruck/db/migrations/versions/20200810_26a58067e4fa.py | la-mar/sunstruck-api | 90074a55d3b243f7f0eee6e897a98699d2cebc43 | [
"MIT"
] | 3 | 2021-04-04T07:48:48.000Z | 2022-02-19T17:42:12.000Z | src/sunstruck/db/migrations/versions/20200810_26a58067e4fa.py | la-mar/sunstruck-api | 90074a55d3b243f7f0eee6e897a98699d2cebc43 | [
"MIT"
] | null | null | null | src/sunstruck/db/migrations/versions/20200810_26a58067e4fa.py | la-mar/sunstruck-api | 90074a55d3b243f7f0eee6e897a98699d2cebc43 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 26a58067e4fa
Revises:
Create Date: 2020-08-10 17:37:04.436524+00:00
"""
import sqlalchemy as sa
import sqlalchemy_utils
import sqlalchemy_utils.types.email
from alembic import op
# revision identifiers, used by Alembic.
revision = "26a58067e4fa"
down_revision = None
branch_labels = None... | 38.116505 | 87 | 0.637799 |
4fe87ffae8a889c0c09f7501344687ce08188fd6 | 11,563 | py | Python | whyattend/constants.py | chipsi007/World-of-Tanks-Attendance-Tracker | 576b32586c402a843b88c49bf432a3e8cb3c62dd | [
"BSD-2-Clause"
] | null | null | null | whyattend/constants.py | chipsi007/World-of-Tanks-Attendance-Tracker | 576b32586c402a843b88c49bf432a3e8cb3c62dd | [
"BSD-2-Clause"
] | null | null | null | whyattend/constants.py | chipsi007/World-of-Tanks-Attendance-Tracker | 576b32586c402a843b88c49bf432a3e8cb3c62dd | [
"BSD-2-Clause"
] | null | null | null | """
Constants
~~~~~~~~~
Constants and translations used in WoT replay files and the API.
"""
MAP_EN_NAME_BY_ID = {
"01_karelia": "Karelia",
"02_malinovka": "Malinovka",
"04_himmelsdorf": "Himmelsdorf",
"05_prohorovka": "Prokhorovka",
"07_lakeville": "Lakeville",
"06_ensk": "Ensk",
... | 27.795673 | 68 | 0.540517 |
665334f6b0e61fa1674cb06c282d3f2e79daf5dd | 35,266 | py | Python | src/ircmsgs.py | elieux-contrib/Limnoria | 2f49362510b0f17dff056af7fc24a11d5e7f975f | [
"BSD-3-Clause"
] | null | null | null | src/ircmsgs.py | elieux-contrib/Limnoria | 2f49362510b0f17dff056af7fc24a11d5e7f975f | [
"BSD-3-Clause"
] | null | null | null | src/ircmsgs.py | elieux-contrib/Limnoria | 2f49362510b0f17dff056af7fc24a11d5e7f975f | [
"BSD-3-Clause"
] | null | null | null | ###
# Copyright (c) 2002-2005, Jeremiah Fincher
# Copyright (c) 2010, James McCoy
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyr... | 38.924945 | 101 | 0.588527 |
1284cce51c8fcb93142c64b7650b7c61c4f0e9cc | 16,738 | py | Python | repgen/data/value.py | DanielTOsborne/repgen5 | a13e0005dc2a471bb9c112b53ab5e2e0d2596f72 | [
"MIT"
] | null | null | null | repgen/data/value.py | DanielTOsborne/repgen5 | a13e0005dc2a471bb9c112b53ab5e2e0d2596f72 | [
"MIT"
] | 1 | 2021-12-17T16:45:56.000Z | 2022-02-02T20:40:57.000Z | repgen/data/value.py | DanielTOsborne/repgen5 | a13e0005dc2a471bb9c112b53ab5e2e0d2596f72 | [
"MIT"
] | 1 | 2021-03-31T21:38:55.000Z | 2021-03-31T21:38:55.000Z | import pytz,datetime,sys
import operator
from inspect import isfunction
# types
string_types = ("".__class__,u"".__class__)
number_types = (int,float,complex)
class Value:
shared = {
"picture" : "NNZ",
"misstr" : "-M-",
"undef" : "-?-",
# shared and updated between calls
"host" : None, # ip address/host... | 29.059028 | 147 | 0.634962 |
c41d9633d90f8254b48c7ff0a74b20ddd4339bce | 7,302 | py | Python | sentence_fluency/train.py | gdyp/bert-awesome | f0836aadaa23e95b82449570a39768bfe24bdadd | [
"Apache-2.0"
] | null | null | null | sentence_fluency/train.py | gdyp/bert-awesome | f0836aadaa23e95b82449570a39768bfe24bdadd | [
"Apache-2.0"
] | null | null | null | sentence_fluency/train.py | gdyp/bert-awesome | f0836aadaa23e95b82449570a39768bfe24bdadd | [
"Apache-2.0"
] | null | null | null | #! -*- coding: utf-8 -*-
import os
import logging
from tqdm import tqdm
import random
import numpy as np
import argparse
import torch
from torch.nn import CrossEntropyLoss
from torch.utils.data import DataLoader, TensorDataset, RandomSampler, DistributedSampler
from pytorch_pretrained_bert.modeling import BertForSequen... | 39.684783 | 124 | 0.712271 |
a67296037cfced5a16dfe15a91a35b053913c317 | 2,270 | py | Python | aligner/check-alignments.py | anoopsarkar/nlp-class-hw-archive | 04c92930ae0be9c5cdf3c41234604af97335e943 | [
"MIT"
] | null | null | null | aligner/check-alignments.py | anoopsarkar/nlp-class-hw-archive | 04c92930ae0be9c5cdf3c41234604af97335e943 | [
"MIT"
] | null | null | null | aligner/check-alignments.py | anoopsarkar/nlp-class-hw-archive | 04c92930ae0be9c5cdf3c41234604af97335e943 | [
"MIT"
] | 1 | 2021-01-27T01:20:00.000Z | 2021-01-27T01:20:00.000Z | #!/usr/bin/env python
import optparse, sys, os, logging
optparser = optparse.OptionParser()
optparser.add_option("-d", "--datadir", dest="datadir", default="data", help="data directory (default=data)")
optparser.add_option("-p", "--prefix", dest="fileprefix", default="hansards", help="prefix of parallel data files (de... | 47.291667 | 148 | 0.677533 |
a0aa6adb70668b43243a5a98551e3de271c5b451 | 12,087 | py | Python | flexget/plugins/input/from_imdb.py | fotile96/Flexget | 0f7f805a43e25e27fce195b91228f911bf4c6b1e | [
"MIT"
] | 1 | 2021-03-24T11:54:01.000Z | 2021-03-24T11:54:01.000Z | flexget/plugins/input/from_imdb.py | fotile96/Flexget | 0f7f805a43e25e27fce195b91228f911bf4c6b1e | [
"MIT"
] | null | null | null | flexget/plugins/input/from_imdb.py | fotile96/Flexget | 0f7f805a43e25e27fce195b91228f911bf4c6b1e | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
from past.builtins import basestring
import collections
import logging
from jsonschema.compat import str_types
from flexget import plugin
from flexget.config_schema impor... | 40.29 | 114 | 0.590717 |
2108522aa15900f28d1b7455bfd24ddc4545056f | 66 | py | Python | info/examples/example/source/hello.py | ADicksonLab/openmm_systems | ae6e0acb0d55f93de8b68f48b43d3df40311a2e3 | [
"MIT"
] | 2 | 2020-04-30T19:58:50.000Z | 2021-06-30T05:39:02.000Z | info/examples/example/source/hello.py | ADicksonLab/openmm_systems | ae6e0acb0d55f93de8b68f48b43d3df40311a2e3 | [
"MIT"
] | null | null | null | info/examples/example/source/hello.py | ADicksonLab/openmm_systems | ae6e0acb0d55f93de8b68f48b43d3df40311a2e3 | [
"MIT"
] | null | null | null |
with open("../input/hello.txt", 'r') as rf:
print(rf.read())
| 16.5 | 43 | 0.560606 |
76d9585dfcd35e0034c29a5144bc566819e09611 | 4,372 | py | Python | oaoo_oa_meeting_manage/models/meeting_summary.py | niulinlnc/odooOaModels | 7204b44d734b221f89f0a6d1eccaeb1b79474d3b | [
"Apache-2.0"
] | 8 | 2020-03-23T06:58:56.000Z | 2021-09-13T02:19:13.000Z | oaoo_oa_meeting_manage/models/meeting_summary.py | ty1539/odooOaModels | 4afc2f7dc36a8d3bcb02a20ec75e67af9af2a154 | [
"Apache-2.0"
] | null | null | null | oaoo_oa_meeting_manage/models/meeting_summary.py | ty1539/odooOaModels | 4afc2f7dc36a8d3bcb02a20ec75e67af9af2a154 | [
"Apache-2.0"
] | 13 | 2019-10-13T08:46:59.000Z | 2022-02-24T02:47:45.000Z | # -*- coding: utf-8 -*-
###################################################################################
# Copyright (C) 2019 SuXueFeng
# 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
#
# ... | 41.245283 | 110 | 0.618253 |
3146d8b623ce45d9a412f257b34ef2659f902545 | 922 | py | Python | isi_sdk_8_2_1/test/test_auth_log_level_level.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_1/test/test_auth_log_level_level.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_1/test/test_auth_log_level_level.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: 8
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_1
from i... | 22.487805 | 93 | 0.711497 |
a3ac0cb3ef6078714c488a1db9e03657289507bc | 3,254 | py | Python | avscript/avs/regex.py | kenlowrie/avscript | 7e3550adc46a01785ea89cdcd9ddaa5ac35bdbdd | [
"Apache-2.0"
] | 1 | 2021-09-30T19:29:30.000Z | 2021-09-30T19:29:30.000Z | avscript/avs/regex.py | kenlowrie/avscript | 7e3550adc46a01785ea89cdcd9ddaa5ac35bdbdd | [
"Apache-2.0"
] | 7 | 2018-07-16T22:52:55.000Z | 2020-05-20T23:48:36.000Z | avscript/avs/regex.py | kenlowrie/avscript | 7e3550adc46a01785ea89cdcd9ddaa5ac35bdbdd | [
"Apache-2.0"
] | 1 | 2018-05-24T22:58:44.000Z | 2018-05-24T22:58:44.000Z | #!/usr/bin/env python
from re import compile, match, error
class Regex(object):
"""Wrapper class for regular expressions."""
def __init__(self, regex, flags=0):
"""Regex class constructor.
Compiles the regex string with any required flags for efficiency.
"""
self.regex = comp... | 38.738095 | 125 | 0.675169 |
47da826bee5db616df50cf1aff4ad073337cc5a5 | 777 | py | Python | xpipe/template/template.py | Scotchy/XPipe | 723317ab7029725cc58c4fa74c41cf6b3e3151de | [
"MIT"
] | null | null | null | xpipe/template/template.py | Scotchy/XPipe | 723317ab7029725cc58c4fa74c41cf6b3e3151de | [
"MIT"
] | 8 | 2021-11-26T20:28:30.000Z | 2022-03-26T23:50:45.000Z | xpipe/template/template.py | Scotchy/XPipe | 723317ab7029725cc58c4fa74c41cf6b3e3151de | [
"MIT"
] | null | null | null |
import yaml
from .utils import is_param
from .parameter import Parameters
try:
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
from yaml import Loader, Dumper
__all__ = ["Template"]
class Template():
def __init__(self, yaml_dict):
self.yaml_dict = yaml_dict
... | 26.793103 | 65 | 0.647362 |
2881070b76215da3f75f4057eb5c8d22274999df | 923 | py | Python | oop/Enum.py | Alpha-chen/PythonStudy | f067b29c9512f2fb074010f7e77778790e748474 | [
"Apache-2.0"
] | 4 | 2019-01-06T09:45:11.000Z | 2021-06-29T10:07:54.000Z | oop/Enum.py | Alpha-chen/PythonStudy | f067b29c9512f2fb074010f7e77778790e748474 | [
"Apache-2.0"
] | null | null | null | oop/Enum.py | Alpha-chen/PythonStudy | f067b29c9512f2fb074010f7e77778790e748474 | [
"Apache-2.0"
] | 1 | 2021-02-25T02:43:15.000Z | 2021-02-25T02:43:15.000Z | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
'枚举类'
__author__ = 'click'
__date__ = '2018/7/13 下午4:28'
from enum import unique, Enum
@unique
class GenderEnum(Enum):
MALE = 0,
FAMALE = 1
class Student(object):
def __init__(self, name, gender):
self.__name = name
self.__gender = gender... | 20.065217 | 61 | 0.617551 |
ad3f66711df730ff28411b14162cc55ec9d6009d | 2,514 | py | Python | vqeparser/geom_parser.py | robagl9695/vqedriver | 899aab46aff78a288207fd82602e11fd8dfa0bfa | [
"Apache-2.0"
] | null | null | null | vqeparser/geom_parser.py | robagl9695/vqedriver | 899aab46aff78a288207fd82602e11fd8dfa0bfa | [
"Apache-2.0"
] | null | null | null | vqeparser/geom_parser.py | robagl9695/vqedriver | 899aab46aff78a288207fd82602e11fd8dfa0bfa | [
"Apache-2.0"
] | 1 | 2021-10-01T23:22:51.000Z | 2021-10-01T23:22:51.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 16 21:36:20 2021
@author: rgonzalez
"""
from qiskit.chemistry.drivers import UnitsType
import os
import sys
def read_xyzfile(filename):
prefix = os.getcwd()
xyzcoords = open(prefix + '/' + filename, 'r')
if xyzcoords.mode == ... | 28.247191 | 129 | 0.579952 |
26b163490343cb225ee975122ac9c83ba1fc56da | 661 | py | Python | manage.py | colombia-immap/unicef-school-mapping-back | 76e93f0b177756ea29e45c2c3564e4894d93f004 | [
"BSD-3-Clause"
] | null | null | null | manage.py | colombia-immap/unicef-school-mapping-back | 76e93f0b177756ea29e45c2c3564e4894d93f004 | [
"BSD-3-Clause"
] | null | null | null | manage.py | colombia-immap/unicef-school-mapping-back | 76e93f0b177756ea29e45c2c3564e4894d93f004 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mapa.settings')
try:
from django.core.management import execute_from_command_line
except Import... | 27.541667 | 73 | 0.676248 |
1b884d3efcc2c12f71e7935112420e5267858ed8 | 75 | py | Python | gridworld/agents/buildings/__init__.py | NREL/PowerGridworld | 2f72ac5bb663092ca806c6fff9c7cf70f94fd775 | [
"BSD-3-Clause"
] | 24 | 2021-11-12T03:42:38.000Z | 2022-02-27T17:22:30.000Z | gridworld/agents/buildings/__init__.py | NREL/PowerGridworld | 2f72ac5bb663092ca806c6fff9c7cf70f94fd775 | [
"BSD-3-Clause"
] | 4 | 2021-11-11T03:27:58.000Z | 2021-11-15T23:12:05.000Z | gridworld/agents/buildings/__init__.py | NREL/PowerGridworld | 2f72ac5bb663092ca806c6fff9c7cf70f94fd775 | [
"BSD-3-Clause"
] | 2 | 2022-02-09T09:15:41.000Z | 2022-02-24T14:56:40.000Z | from .five_zone_rom_env import FiveZoneROMEnv, FiveZoneROMThermalEnergyEnv
| 37.5 | 74 | 0.906667 |
47b62f7782562683e946758d39a54a958eb73dd7 | 28,230 | py | Python | ckan/lib/dictization/model_dictize.py | mkuder/ckan | 592b65f2538ae88fbc3b0c3155cf9fcd77a0458c | [
"Apache-2.0"
] | 2 | 2015-07-17T19:09:52.000Z | 2017-08-30T20:23:44.000Z | ckan/lib/dictization/model_dictize.py | mkuder/ckan | 592b65f2538ae88fbc3b0c3155cf9fcd77a0458c | [
"Apache-2.0"
] | 12 | 2015-01-19T18:03:56.000Z | 2016-04-11T16:40:33.000Z | ckan/lib/dictization/model_dictize.py | mkuder/ckan | 592b65f2538ae88fbc3b0c3155cf9fcd77a0458c | [
"Apache-2.0"
] | 3 | 2015-03-31T06:19:42.000Z | 2016-06-27T15:32:28.000Z | '''
These dictize functions generally take a domain object (such as Package) and
convert it to a dictionary, including related objects (e.g. for Package it
includes PackageTags, PackageExtras, PackageGroup etc).
The basic recipe is to call:
dictized = ckan.lib.dictization.table_dictize(domain_object)
which build... | 36.853786 | 86 | 0.643464 |
22de9c14c08544243c93c7f160045a674120d1f7 | 1,838 | py | Python | chatbot_nlu/tokenizers/mitie_tokenizer.py | charlesXu86/Chatbot_NLU | 29bc3ead75ddca74b9c41662fb1a77501cc09cf9 | [
"MIT"
] | 6 | 2020-03-11T03:14:41.000Z | 2021-12-02T02:30:01.000Z | chatbot_nlu/tokenizers/mitie_tokenizer.py | charlesXu86/Chatbot_CN_Component | 29bc3ead75ddca74b9c41662fb1a77501cc09cf9 | [
"MIT"
] | 1 | 2020-06-24T23:36:16.000Z | 2020-06-25T03:49:49.000Z | chatbot_nlu/tokenizers/mitie_tokenizer.py | charlesXu86/Chatbot_CN_Component | 29bc3ead75ddca74b9c41662fb1a77501cc09cf9 | [
"MIT"
] | 9 | 2020-02-11T06:57:39.000Z | 2020-12-01T09:53:34.000Z | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import str
import re
from typing import Any
from typing import Dict
from typing import List
from typing import Text
from typing import Tuple
from chatbot_n... | 30.633333 | 74 | 0.710555 |
668098528a6af9956770d9a014374e25185ebde7 | 3,433 | py | Python | pysparkbasics/L02_DataFrame/UDFExample.py | pengfei99/PySparkCommonFunc | 8238949f52a8e0d2c30c42d9f4002941f43db466 | [
"MIT"
] | null | null | null | pysparkbasics/L02_DataFrame/UDFExample.py | pengfei99/PySparkCommonFunc | 8238949f52a8e0d2c30c42d9f4002941f43db466 | [
"MIT"
] | null | null | null | pysparkbasics/L02_DataFrame/UDFExample.py | pengfei99/PySparkCommonFunc | 8238949f52a8e0d2c30c42d9f4002941f43db466 | [
"MIT"
] | null | null | null | """ UDF is called user define function
UDF is very useful when you want to transform your data frame, and there is no pre-defined
Spark sql functions already available.
To define a spark udf, you have three options:
1. use pyspark.sql.functions.udf, this works for select, withColumn.
udf(lambda_function, return_typ... | 27.910569 | 99 | 0.676959 |
489193c5c51809216b9061ad6b5c622cdf83d717 | 94 | py | Python | src/exoplanet/theano_ops/interp/__init__.py | christinahedges/exoplanet | 55d2252c71191044613fabb9c8bd3062aca3bc1b | [
"MIT"
] | 2 | 2021-10-01T12:46:09.000Z | 2022-03-24T10:25:20.000Z | src/exoplanet/theano_ops/interp/__init__.py | christinahedges/exoplanet | 55d2252c71191044613fabb9c8bd3062aca3bc1b | [
"MIT"
] | null | null | null | src/exoplanet/theano_ops/interp/__init__.py | christinahedges/exoplanet | 55d2252c71191044613fabb9c8bd3062aca3bc1b | [
"MIT"
] | 1 | 2021-12-04T22:27:14.000Z | 2021-12-04T22:27:14.000Z | # -*- coding: utf-8 -*-
__all__ = ["RegularGridOp"]
from .regular_grid import RegularGridOp
| 15.666667 | 39 | 0.691489 |
03feb2596ab7b039453aedad52a6838553df36bc | 65 | py | Python | run.py | abrenaut/geofinder | 5f3b22f97e81b251af8efac539de0ff1a8c41686 | [
"Apache-2.0"
] | 1 | 2017-10-23T04:34:27.000Z | 2017-10-23T04:34:27.000Z | run.py | abrenaut/geofinder | 5f3b22f97e81b251af8efac539de0ff1a8c41686 | [
"Apache-2.0"
] | null | null | null | run.py | abrenaut/geofinder | 5f3b22f97e81b251af8efac539de0ff1a8c41686 | [
"Apache-2.0"
] | null | null | null | from app import socketio, app
socketio.run(app, host='0.0.0.0')
| 16.25 | 33 | 0.707692 |
2090624521e5fa3a5899522fef1f444c0c14817b | 5,296 | py | Python | egs2/jkac/tts1/local/prep_segments.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 5,053 | 2017-12-13T06:21:41.000Z | 2022-03-31T13:38:29.000Z | egs2/jkac/tts1/local/prep_segments.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 3,666 | 2017-12-14T05:58:50.000Z | 2022-03-31T22:11:49.000Z | egs2/jkac/tts1/local/prep_segments.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 1,709 | 2017-12-13T01:02:42.000Z | 2022-03-31T11:57:45.000Z | #!/usr/bin/env python3
# Copyright 2021 Nagoya University (Yusuke Yasuda)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
import argparse
from collections import namedtuple
import os
import re
import sys
import yaml
class JKACPath(namedtuple("JKACPath", ["label_path", "wav_path", "category", "title"])):... | 35.072848 | 88 | 0.578927 |
3e0654b107ed3ec9d8569fd9a846447f3a34cc1f | 7,913 | py | Python | wechatpy/pay/api/withhold.py | myuanz/wechatpy | f131e1808ffd51f61881188fc080c36523063c2b | [
"MIT"
] | 2 | 2020-04-12T17:28:01.000Z | 2020-04-12T17:28:08.000Z | wechatpy/pay/api/withhold.py | myuanz/wechatpy | f131e1808ffd51f61881188fc080c36523063c2b | [
"MIT"
] | null | null | null | wechatpy/pay/api/withhold.py | myuanz/wechatpy | f131e1808ffd51f61881188fc080c36523063c2b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import time
import random
from datetime import datetime
from optionaldict import optionaldict
from wechatpy.utils import timezone
from wechatpy.pay.utils import get_external_ip, calculate_signature
from wechatpy.pay.base import BaseWeChatPayAPI
class WeChatWithhold(BaseWeChatPayAPI):
de... | 34.107759 | 117 | 0.588272 |
cff9f8d3067f20cbb6d7b6e2832fe1c9284f4ef1 | 468 | py | Python | python/p14.py | tonyfg/project_euler | 3a9e6352a98faaa506056b42160c91bffe93838c | [
"WTFPL"
] | null | null | null | python/p14.py | tonyfg/project_euler | 3a9e6352a98faaa506056b42160c91bffe93838c | [
"WTFPL"
] | null | null | null | python/p14.py | tonyfg/project_euler | 3a9e6352a98faaa506056b42160c91bffe93838c | [
"WTFPL"
] | null | null | null | #Q: Which Collatz conjecture starting number, under one million, produces the longest chain?
#A: 837799
def collatz(n):
n_iterations = 1
while n > 1:
if n%2: #atencao impar!
n = 3*n +1
else:
n = n//2
n_iterations += 1
return n_iterations
n = -1
max_seq = 0
f... | 21.272727 | 92 | 0.544872 |
6d118889f48d14fde7ba0fe3afe31838fd433f01 | 2,303 | py | Python | tools/Vitis-AI-Library/graph_runner/test/run_graph.py | hito0512/Vitis-AI | 996459fb96cb077ed2f7e789d515893b1cccbc95 | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tools/Vitis-AI-Library/graph_runner/test/run_graph.py | wangyifan778/Vitis-AI | f61061eef7550d98bf02a171604c9a9f283a7c47 | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tools/Vitis-AI-Library/graph_runner/test/run_graph.py | wangyifan778/Vitis-AI | f61061eef7550d98bf02a171604c9a9f283a7c47 | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | #
# Copyright 2019 Xilinx Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 34.893939 | 79 | 0.661311 |
5de75e33c25902f3619bc1e382ba15dbdb2ce4df | 866 | py | Python | openprocurement/tender/esco/tests/document.py | openprocurement/openprocurement.tender.esco | ea9732cb22b82997a0d8c0bf413d59e988d0600d | [
"Apache-2.0"
] | 1 | 2020-07-14T05:19:43.000Z | 2020-07-14T05:19:43.000Z | openprocurement/tender/esco/tests/document.py | openprocurement/openprocurement.tender.esco | ea9732cb22b82997a0d8c0bf413d59e988d0600d | [
"Apache-2.0"
] | 39 | 2017-05-12T13:08:46.000Z | 2018-08-13T08:26:04.000Z | openprocurement/tender/esco/tests/document.py | ProzorroUKR/openprocurement.tender.esco | 9e6a3a00d9ad43a81f3b3415bc023a14088980a2 | [
"Apache-2.0"
] | 17 | 2017-05-11T11:32:28.000Z | 2018-06-15T14:39:18.000Z | # -*- coding: utf-8 -*-
import unittest
from openprocurement.tender.belowthreshold.tests.document import (
TenderDocumentResourceTestMixin,
TenderDocumentWithDSResourceTestMixin
)
from openprocurement.tender.esco.tests.base import BaseESCOContentWebTest
class TenderDocumentResourceTest(BaseESCOContentWebTes... | 27.935484 | 90 | 0.756351 |
d231740bc7b662efda97c02d2083625e002baec4 | 1,519 | py | Python | examples/plot_square_h2_poincare_half_plane.py | PabloJ-1/geomstats | b53f62b745b21972b80bd7222df9af2549b66d64 | [
"MIT"
] | null | null | null | examples/plot_square_h2_poincare_half_plane.py | PabloJ-1/geomstats | b53f62b745b21972b80bd7222df9af2549b66d64 | [
"MIT"
] | null | null | null | examples/plot_square_h2_poincare_half_plane.py | PabloJ-1/geomstats | b53f62b745b21972b80bd7222df9af2549b66d64 | [
"MIT"
] | null | null | null | """Plot a square on H2 with Poincare half-plane visualization."""
import logging
import os
import matplotlib.pyplot as plt
import numpy as np
import geomstats.visualization as visualization
from geomstats.geometry.hyperbolic import Hyperbolic
H2 = Hyperbolic(dimension=2)
METRIC = H2.metric
SQUARE_SIZE = 50
def m... | 28.12963 | 73 | 0.606978 |
9ac537a4e311a6ff3cced086eadcce54a2fc144f | 4,290 | py | Python | weblogo/seq_io/plain_io.py | ghuls/weblogo | 7eab5d1b8a8ec38786fa426af84bd77950835524 | [
"MIT"
] | 108 | 2015-08-21T10:39:22.000Z | 2022-03-04T22:10:49.000Z | weblogo/seq_io/plain_io.py | ghuls/weblogo | 7eab5d1b8a8ec38786fa426af84bd77950835524 | [
"MIT"
] | 60 | 2015-07-21T22:55:52.000Z | 2022-03-24T21:20:00.000Z | weblogo/seq_io/plain_io.py | ghuls/weblogo | 7eab5d1b8a8ec38786fa426af84bd77950835524 | [
"MIT"
] | 40 | 2015-08-04T00:18:23.000Z | 2021-12-30T13:41:54.000Z | #!/usr/bin/env python
# Copyright (c) 2005 Gavin E. Crooks <gec@threeplusone.com>
#
# This software is distributed under the MIT Open Source License.
# <http://www.opensource.org/licenses/mit-license.html>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and asso... | 33.515625 | 80 | 0.654079 |
c8e460af4f20184579e9b18b91012925fb5ff898 | 7,494 | py | Python | bot.py | MrPickless/Discord-Bot | 0bbbf234e6689b6cc1d02690903242f5c6c50022 | [
"MIT"
] | null | null | null | bot.py | MrPickless/Discord-Bot | 0bbbf234e6689b6cc1d02690903242f5c6c50022 | [
"MIT"
] | null | null | null | bot.py | MrPickless/Discord-Bot | 0bbbf234e6689b6cc1d02690903242f5c6c50022 | [
"MIT"
] | 1 | 2018-09-23T01:29:16.000Z | 2018-09-23T01:29:16.000Z | import discord
from discord.ext import commands
import aiohttp
import re
from datetime import timedelta
import traceback
import os
from random import choice, randint
from config import token
owner = ["222526329109741568", "252084047264743428"]
version = "Ver. 0.1.29.3"
bot = commands.Bot(command_prefix='p!', descript... | 37.47 | 178 | 0.678409 |
93aebc583d9845c9c74bcb30384461e61a5f5136 | 14,907 | py | Python | examples/advanced_operations/add_dynamic_page_feed.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | null | null | null | examples/advanced_operations/add_dynamic_page_feed.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | null | null | null | examples/advanced_operations/add_dynamic_page_feed.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# 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 or ... | 41.179558 | 80 | 0.692762 |
6bb4bb04757f9e3d94072131489d6bc24a50acfa | 1,192 | py | Python | test_ufile/test_bucket.py | luxiaobai/ufile-sdk-python | be1d88a328ff8a815a9a47a3ae5a0035f4d9e2e7 | [
"MIT"
] | null | null | null | test_ufile/test_bucket.py | luxiaobai/ufile-sdk-python | be1d88a328ff8a815a9a47a3ae5a0035f4d9e2e7 | [
"MIT"
] | null | null | null | test_ufile/test_bucket.py | luxiaobai/ufile-sdk-python | be1d88a328ff8a815a9a47a3ae5a0035f4d9e2e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
test bucket
"""
from ufile import bucketmanager
public_key = '<your public key>' #添加自己的账户公钥(UCloud账户的API密钥公钥,此密钥权限较高,仅bucket操作使用)
private_key = '<your private key>' #添加自己的账户私钥(UCloud账户的API密钥私钥,此密钥权限较高,仅bucket操作使用)
public_bucket = '<your public bucket name>' #添加公共... | 32.216216 | 94 | 0.755872 |
a4b36276781ccc48e732d21909f965ae26715f88 | 96 | py | Python | siptrackdlib/storage/stsqlite/__init__.py | sii/siptrackd | f124f750c5c826156c31ae8699e90ff95a964a02 | [
"Apache-2.0"
] | null | null | null | siptrackdlib/storage/stsqlite/__init__.py | sii/siptrackd | f124f750c5c826156c31ae8699e90ff95a964a02 | [
"Apache-2.0"
] | 14 | 2016-03-18T13:28:16.000Z | 2019-06-02T21:11:29.000Z | siptrackdlib/storage/stsqlite/__init__.py | sii/siptrackd | f124f750c5c826156c31ae8699e90ff95a964a02 | [
"Apache-2.0"
] | 7 | 2016-03-18T13:04:54.000Z | 2021-06-22T10:39:04.000Z | """An sqlite based storage backend."""
from siptrackdlib.storage.stsqlite.base import Storage
| 19.2 | 54 | 0.78125 |
744f70ba95d0cf8a4165146159b7719e937c172b | 12,484 | py | Python | reversialphazero/batch_norm/neural_network.py | FritzFlorian/bachelor-thesis-code | 609bc82ab6ac9879eed82f9a2968ae8ee2ef1ebb | [
"MIT"
] | null | null | null | reversialphazero/batch_norm/neural_network.py | FritzFlorian/bachelor-thesis-code | 609bc82ab6ac9879eed82f9a2968ae8ee2ef1ebb | [
"MIT"
] | null | null | null | reversialphazero/batch_norm/neural_network.py | FritzFlorian/bachelor-thesis-code | 609bc82ab6ac9879eed82f9a2968ae8ee2ef1ebb | [
"MIT"
] | null | null | null | import tensorflow as tf
import hometrainer.neural_network as neural_network
import reversialphazero.batch_norm.input_output_conversion as input_output_conversion
BOARD_SIZE = 12
BOARD_HEIGHT = BOARD_SIZE
BOARD_WIDTH = BOARD_SIZE
# Number of different possible states/contents of a
# single field on the board.
N_RAW_V... | 52.453782 | 136 | 0.670138 |
27abc82848e0fe920a72f2faa1caa9d8e23c87f8 | 133,402 | py | Python | astropy/wcs/wcs.py | emirkmo/astropy | d96cd45b25ae55117d1bcc9c40e83a82037fc815 | [
"BSD-3-Clause"
] | null | null | null | astropy/wcs/wcs.py | emirkmo/astropy | d96cd45b25ae55117d1bcc9c40e83a82037fc815 | [
"BSD-3-Clause"
] | null | null | null | astropy/wcs/wcs.py | emirkmo/astropy | d96cd45b25ae55117d1bcc9c40e83a82037fc815 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# Under the hood, there are 3 separate classes that perform different
# parts of the transformation:
#
# - `~astropy.wcs.Wcsprm`: Is a direct wrapper of the core WCS
# functionality in `wcslib`_. (This includes TPV and TPD
# polynomial disto... | 37.984624 | 153 | 0.548875 |
b89cf2a3e9ab463fea34b6311814c6078b5f833d | 12,998 | py | Python | graphql/core/execution/executor.py | defrex/graphql-core | 9c8450fa5b2e3dd0a8ea015ac3b9b5f24028ac91 | [
"MIT"
] | null | null | null | graphql/core/execution/executor.py | defrex/graphql-core | 9c8450fa5b2e3dd0a8ea015ac3b9b5f24028ac91 | [
"MIT"
] | null | null | null | graphql/core/execution/executor.py | defrex/graphql-core | 9c8450fa5b2e3dd0a8ea015ac3b9b5f24028ac91 | [
"MIT"
] | 1 | 2019-08-23T12:52:58.000Z | 2019-08-23T12:52:58.000Z | import collections
import functools
import logging
from ..error import GraphQLError
from ..language import ast
from ..language.parser import parse
from ..language.source import Source
from ..pyutils.default_ordered_dict import DefaultOrderedDict
from ..pyutils.defer import Deferred, DeferredDict, DeferredList, defer, ... | 39.628049 | 119 | 0.645484 |
76ef27ba301050e82c5a70805ab4382f0c1558a2 | 9,792 | py | Python | torch/distributed/optim/optimizer.py | xiaohanhuang/pytorch | a31aea8eaa99a5ff72b5d002c206cd68d5467a5e | [
"Intel"
] | 183 | 2018-04-06T21:10:36.000Z | 2022-03-30T15:05:24.000Z | torch/distributed/optim/optimizer.py | xiaohanhuang/pytorch | a31aea8eaa99a5ff72b5d002c206cd68d5467a5e | [
"Intel"
] | 818 | 2020-02-07T02:36:44.000Z | 2022-03-31T23:49:44.000Z | torch/distributed/optim/optimizer.py | xiaohanhuang/pytorch | a31aea8eaa99a5ff72b5d002c206cd68d5467a5e | [
"Intel"
] | 58 | 2018-06-05T16:40:18.000Z | 2022-03-16T15:37:29.000Z | from typing import List, Optional
import logging
import torch
import torch.distributed.rpc as rpc
import torch.jit as jit
import torch.nn as nn
from torch import Tensor
from torch.distributed.rpc import RRef
from torch.distributed.optim import functional_optim_map
import torch.distributed.autograd as dist_autograd
f... | 38.551181 | 90 | 0.683517 |
a5e89099c344887da5fe3df04ffbe54445589245 | 929 | py | Python | tests/utils.py | broadinstitute/annmas | 79da783acf41e5aaca4a14ef991c9ab0aac3c59a | [
"BSD-3-Clause"
] | 11 | 2021-10-04T16:25:20.000Z | 2022-03-08T16:55:24.000Z | tests/utils.py | broadinstitute/longbow | 5ff6e5f62bb4a5a8206ec0299e1467de33a96eda | [
"BSD-3-Clause"
] | 23 | 2021-04-22T07:02:42.000Z | 2022-03-31T20:23:29.000Z | tests/utils.py | broadinstitute/annmas | 79da783acf41e5aaca4a14ef991c9ab0aac3c59a | [
"BSD-3-Clause"
] | null | null | null | import pysam
import filecmp
def assert_bam_files_equal(file1, file2, order_matters=False, compare_header=False):
"""Assert that the contents of the two given bam files are equivalent."""
if order_matters and compare_header:
assert filecmp.cmp(file1, file2)
return
with pysam.AlignmentFile... | 25.805556 | 89 | 0.590958 |
710f5e01f57cc5967a68c0625abac0e20e4a88c4 | 27,778 | py | Python | tests/functional/coercers/test_coercer_non_null_list_with_default_string_field.py | matt-koevort/tartiflette | 5777866b133d846ce4f8aa03f735fa81832896cd | [
"MIT"
] | 530 | 2019-06-04T11:45:36.000Z | 2022-03-31T09:29:56.000Z | tests/functional/coercers/test_coercer_non_null_list_with_default_string_field.py | matt-koevort/tartiflette | 5777866b133d846ce4f8aa03f735fa81832896cd | [
"MIT"
] | 242 | 2019-06-04T11:53:08.000Z | 2022-03-28T07:06:27.000Z | tests/functional/coercers/test_coercer_non_null_list_with_default_string_field.py | matt-koevort/tartiflette | 5777866b133d846ce4f8aa03f735fa81832896cd | [
"MIT"
] | 36 | 2019-06-21T06:40:27.000Z | 2021-11-04T13:11:16.000Z | import pytest
from tests.functional.coercers.common import resolve_list_field
@pytest.mark.asyncio
@pytest.mark.ttftt_engine(
name="coercion",
resolvers={"Query.nonNullListWithDefaultStringField": resolve_list_field},
)
@pytest.mark.parametrize(
"query,variables,expected",
[
(
"""... | 37.896317 | 166 | 0.419073 |
6151410b04fa38422ffbe469c4231ff8b723ca63 | 2,261 | py | Python | pytezos/tools/docstring.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2021-05-20T16:52:08.000Z | 2021-05-20T16:52:08.000Z | pytezos/tools/docstring.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-12-30T16:44:56.000Z | 2020-12-30T16:44:56.000Z | pytezos/tools/docstring.py | tqtezos/pytezos | a4ac0b022d35d4c9f3062609d8ce09d584b5faa8 | [
"MIT"
] | 1 | 2022-03-20T19:01:00.000Z | 2022-03-20T19:01:00.000Z | import re
import inspect
import types
from functools import update_wrapper
def is_interactive():
import __main__ as main
return not hasattr(main, '__file__')
__interactive_mode__ = is_interactive()
def get_attr_docstring(class_type, attr_name):
if attr_name == 'get':
attr_name = '__call__'... | 26.290698 | 103 | 0.586466 |
afc46753d633bdebf137ab246b88112dcde8da9a | 54,847 | py | Python | DistributeCralwerSpecialInstitution/Spiders/wuba/tmp.py | xiaoshicae/suanhua | b7724bff14bf205c00f405bf6fe7af6d8fecd61f | [
"Apache-2.0"
] | 3 | 2018-12-14T08:16:22.000Z | 2019-04-23T01:30:56.000Z | DistributeCralwerSpecialInstitution/Spiders/wuba/tmp.py | xiaoshicae/suanhua | b7724bff14bf205c00f405bf6fe7af6d8fecd61f | [
"Apache-2.0"
] | null | null | null | DistributeCralwerSpecialInstitution/Spiders/wuba/tmp.py | xiaoshicae/suanhua | b7724bff14bf205c00f405bf6fe7af6d8fecd61f | [
"Apache-2.0"
] | 1 | 2018-09-04T09:48:06.000Z | 2018-09-04T09:48:06.000Z | # --*-- encoding=utf-8 --*--#
from lxml import etree
content = """
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<... | 52.839114 | 2,599 | 0.602622 |
7a568feb46a7051d274396209b37a564030c7ba7 | 14,082 | py | Python | sdk/python/pulumi_azure_native/network/v20181201/get_security_rule.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20181201/get_security_rule.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20181201/get_security_rule.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # 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, overload
from ... import _utilities
fro... | 46.322368 | 481 | 0.697912 |
d6e67b0ed8ce521fcb8e74c3461dd7ab936e4f0d | 4,403 | py | Python | dailyfresh/dailyfresh/settings.py | sunxiao01/dailyfresh_01 | 844e87027a9c0ac82da74e515508eb0a2e66b74d | [
"MIT"
] | 1 | 2018-03-10T02:27:59.000Z | 2018-03-10T02:27:59.000Z | dailyfresh/dailyfresh/settings.py | sunxiao01/dailyfresh_01 | 844e87027a9c0ac82da74e515508eb0a2e66b74d | [
"MIT"
] | null | null | null | dailyfresh/dailyfresh/settings.py | sunxiao01/dailyfresh_01 | 844e87027a9c0ac82da74e515508eb0a2e66b74d | [
"MIT"
] | null | null | null | """
Django settings for dailyfresh project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build p... | 26.053254 | 71 | 0.693164 |
ebd16685fbf4b075d43635cee62fb573745c74ad | 8,613 | py | Python | reproman/resource/ssh.py | chaselgrove/reproman | 7af2e407fb60d782dc049e62082744600eff0574 | [
"MIT"
] | 13 | 2017-03-02T16:33:08.000Z | 2019-01-12T19:19:08.000Z | reproman/resource/ssh.py | chaselgrove/reproman | 7af2e407fb60d782dc049e62082744600eff0574 | [
"MIT"
] | 313 | 2017-01-13T03:36:30.000Z | 2019-01-24T19:16:08.000Z | reproman/resource/ssh.py | chaselgrove/reproman | 7af2e407fb60d782dc049e62082744600eff0574 | [
"MIT"
] | 6 | 2017-01-12T19:44:01.000Z | 2019-01-12T19:19:18.000Z | # ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the reproman package for the
# copyright and license terms.
#
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
"""Resource sub-cl... | 31.665441 | 99 | 0.577964 |
c34dcd0c3d2f0ab4cf5bfbb3deb994debdff732d | 8,661 | py | Python | tests/tests_domain/test_domain2D_shapely.py | uwe-iben/torchphysics | f0a56539cff331d49caaa90bc2fdd0d238b298f8 | [
"Apache-2.0"
] | null | null | null | tests/tests_domain/test_domain2D_shapely.py | uwe-iben/torchphysics | f0a56539cff331d49caaa90bc2fdd0d238b298f8 | [
"Apache-2.0"
] | null | null | null | tests/tests_domain/test_domain2D_shapely.py | uwe-iben/torchphysics | f0a56539cff331d49caaa90bc2fdd0d238b298f8 | [
"Apache-2.0"
] | null | null | null | import pytest
import torch
import shapely.geometry as s_geo
from shapely.ops import triangulate
from torchphysics.problem.domains.domain2D.shapely_polygon import ShapelyPolygon
from torchphysics.problem.spaces import R2, R1
from torchphysics.problem.spaces.points import Points
# Test ShapelyPolygon
def test_create_p... | 36.855319 | 93 | 0.609745 |
4bf5aa4b204fd6ae028a22b9eb191a9d3f74d87c | 1,376 | py | Python | src/abp_sim/scripts/record_distance.py | koverman47/ABP-Simulation-Platform | ccaf5591fbf1967ae8df5cf3efd4a7e8e64ddd10 | [
"MIT"
] | 3 | 2020-11-14T02:21:34.000Z | 2020-11-14T02:23:30.000Z | src/abp_sim/scripts/record_distance.py | koverman47/ABP-Simulation-Platform | ccaf5591fbf1967ae8df5cf3efd4a7e8e64ddd10 | [
"MIT"
] | null | null | null | src/abp_sim/scripts/record_distance.py | koverman47/ABP-Simulation-Platform | ccaf5591fbf1967ae8df5cf3efd4a7e8e64ddd10 | [
"MIT"
] | 2 | 2020-12-03T01:50:22.000Z | 2022-03-22T22:18:49.000Z | #!/usr/bin/env python
import sys
import rospy
import rospkg
from tf.transformations import euler_from_quaternion
from gazebo_msgs.srv import GetModelState, GetModelStateRequest
s1 = [None, None, None]
s2= [None, None, None]
def record():
rospy.init_node('abp_recorder_dist')
rospy.wait_for_service('/gazebo/... | 25.962264 | 80 | 0.616279 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.