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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b75c6574e042d458875f91ce4cc51743e7f1252f | 280 | py | Python | src/MetaDataPKG/Generic/SizeMeta.py | codexgigassys/codex-backend | 1e6b946f05e2fd9ce80b207046fe168f49cc2db2 | [
"MIT"
] | 161 | 2016-08-03T14:25:20.000Z | 2021-08-11T03:18:35.000Z | src/MetaDataPKG/Generic/SizeMeta.py | codexgigassys/codex-backend | 1e6b946f05e2fd9ce80b207046fe168f49cc2db2 | [
"MIT"
] | 115 | 2016-08-08T09:24:08.000Z | 2020-03-07T06:48:02.000Z | src/MetaDataPKG/Generic/SizeMeta.py | codexgigassys/codex-backend | 1e6b946f05e2fd9ce80b207046fe168f49cc2db2 | [
"MIT"
] | 46 | 2016-08-04T08:25:28.000Z | 2021-09-05T23:46:55.000Z | # Copyright (C) 2016 Deloitte Argentina.
# This file is part of CodexGigas - https://github.com/codexgigassys/
# See the file 'LICENSE' for copying permission.
from MetaDataPKG.Metadata import *
class SizeMeta(Metadata):
def __init__(self):
Metadata.__init__(self)
| 25.454545 | 69 | 0.735714 |
b64dbcfb9c2fa9816054002ecec789117f11a746 | 18,730 | py | Python | lib-python/3/json/encoder.py | pymtl/pypy-pymtl3 | d2f66f87686e48aeb1eecabeaa3de1381a149f2c | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2021-06-02T23:02:09.000Z | 2021-06-02T23:02:09.000Z | lib-python/3/json/encoder.py | pymtl/pypy-pymtl3 | d2f66f87686e48aeb1eecabeaa3de1381a149f2c | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2021-03-30T18:08:41.000Z | 2021-03-30T18:08:41.000Z | lib-python/3/json/encoder.py | pymtl/pypy-pymtl3 | d2f66f87686e48aeb1eecabeaa3de1381a149f2c | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | """Implementation of JSONEncoder
"""
import re
from __pypy__.builders import StringBuilder
ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]')
ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')
HAS_UTF8 = re.compile(b'[\x80-\xff]')
ESCAPE_DCT = {
'\\': '\\\\',
'"': '\\"',
'\b': '\\b',
'\f': '\\f',
'\n': ... | 36.870079 | 80 | 0.536572 |
1aaa76c1fc1b7c53ff1e53cc8177db7c497de1a7 | 11,978 | py | Python | poetry/puzzle/solver.py | vanyakosmos/poetry | b218969107e49dc57e65dbc0d349e83cbe1f44a8 | [
"MIT"
] | null | null | null | poetry/puzzle/solver.py | vanyakosmos/poetry | b218969107e49dc57e65dbc0d349e83cbe1f44a8 | [
"MIT"
] | null | null | null | poetry/puzzle/solver.py | vanyakosmos/poetry | b218969107e49dc57e65dbc0d349e83cbe1f44a8 | [
"MIT"
] | null | null | null | import time
from typing import Any
from typing import Dict
from typing import List
from poetry.mixology import resolve_version
from poetry.mixology.failure import SolveFailure
from poetry.packages import DependencyPackage
from poetry.packages import Package
from poetry.semver import parse_constraint
from poetry.versi... | 35.755224 | 90 | 0.499416 |
b0be2ec56b30cc4260299b4ca5814008a365a7a3 | 1,212 | py | Python | tests/common/test_op/batch_matmul.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | tests/common/test_op/batch_matmul.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | tests/common/test_op/batch_matmul.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 41.793103 | 135 | 0.747525 |
334a5ac901cdb59825b6a40d3fe6f448a601e5d6 | 21,589 | py | Python | descarteslabs/workflows/interactive/map_.py | descarteslabs/descarteslabs-python | efc874d6062603dc424c9646287a9b1f8636e7ac | [
"Apache-2.0"
] | 167 | 2017-03-23T22:16:58.000Z | 2022-03-08T09:19:30.000Z | descarteslabs/workflows/interactive/map_.py | descarteslabs/descarteslabs-python | efc874d6062603dc424c9646287a9b1f8636e7ac | [
"Apache-2.0"
] | 93 | 2017-03-23T22:11:40.000Z | 2021-12-13T18:38:53.000Z | descarteslabs/workflows/interactive/map_.py | descarteslabs/descarteslabs-python | efc874d6062603dc424c9646287a9b1f8636e7ac | [
"Apache-2.0"
] | 46 | 2017-03-25T19:12:14.000Z | 2021-08-15T18:04:29.000Z | import textwrap
import math
import ipyleaflet
import IPython
import ipywidgets as widgets
import traitlets
from .clearable import ClearableOutput
from .inspector import PixelInspector
from .layer import WorkflowsLayer
from .lonlat import LonLatInput
from .utils import tuple_move
EARTH_EQUATORIAL_RADIUS_WGS84_M = 637... | 35.276144 | 117 | 0.577563 |
e55b6d5067dac0dbb69dcb0bb0d3d9aca76aa487 | 25,592 | py | Python | grmpy/estimate/estimate_semipar.py | SeBecker/grmpy | 3ff5ec9cd108582c23cb61e6b8d87f4db6ceaee1 | [
"MIT"
] | 1 | 2018-05-28T06:11:14.000Z | 2018-05-28T06:11:14.000Z | grmpy/estimate/estimate_semipar.py | SeBecker/grmpy | 3ff5ec9cd108582c23cb61e6b8d87f4db6ceaee1 | [
"MIT"
] | 6 | 2018-05-14T20:44:51.000Z | 2018-07-04T16:36:49.000Z | grmpy/estimate/estimate_semipar.py | SeBecker/grmpy | 3ff5ec9cd108582c23cb61e6b8d87f4db6ceaee1 | [
"MIT"
] | null | null | null | """
This module contains the semiparametric estimation process.
"""
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import statsmodels.api as sm
from skmisc.loess import loess
from grmpy.KernReg.locpoly import locpoly
lowess = sm.nonparametric.lowess
def semipar_fit(dict_, data):
""""
... | 30.870929 | 88 | 0.635628 |
8aca2bdc06afe19f61312aa827659269501a4e05 | 18,859 | py | Python | SaraChatBot/Sara.py | MuMuShy/SaraChatBot | 4c9acf1b6deda5ffec74a1235807a48d0317026e | [
"MIT"
] | 1 | 2019-03-20T03:42:57.000Z | 2019-03-20T03:42:57.000Z | SaraChatBot/Sara.py | MuMuShy/SaraChatBot | 4c9acf1b6deda5ffec74a1235807a48d0317026e | [
"MIT"
] | null | null | null | SaraChatBot/Sara.py | MuMuShy/SaraChatBot | 4c9acf1b6deda5ffec74a1235807a48d0317026e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import command_dictionary
#包裝純文字格式
def package_text(unpackage_text):
unpackage_text = 'text;'+unpackage_text
return str(unpackage_text)
#包裝圖片格式
def package_img(unpackage_text):
unpackage_text='img;'+unpackage_text
return str(unpackage_text)
#包裝按鈕回應格式
def pack... | 39.2079 | 267 | 0.624476 |
184b83bc54a0f32ba3a7dce83a4af01801d97fb9 | 1,582 | py | Python | snappy_wrappers/wrappers/cnvetti/wgs/merge_genotypes/wrapper.py | PotatoThrone/snappy-pipeline | 31200eba84bff8e459e9e210d6d95e2984627f5c | [
"MIT"
] | 5 | 2021-02-26T10:39:56.000Z | 2021-12-23T07:53:26.000Z | snappy_wrappers/wrappers/cnvetti/wgs/merge_genotypes/wrapper.py | PotatoThrone/snappy-pipeline | 31200eba84bff8e459e9e210d6d95e2984627f5c | [
"MIT"
] | 93 | 2021-02-22T11:23:59.000Z | 2022-03-31T09:58:39.000Z | snappy_wrappers/wrappers/cnvetti/wgs/merge_genotypes/wrapper.py | PotatoThrone/snappy-pipeline | 31200eba84bff8e459e9e210d6d95e2984627f5c | [
"MIT"
] | 3 | 2021-02-22T11:44:59.000Z | 2021-06-21T19:33:53.000Z | # -*- coding: utf-8 -*-
"""Wrapper for running CNVetti WGS merge_genotypes step."""
from snakemake.shell import shell
__author__ = "Manuel Holtgrewe <manuel.holtgrewe@bihealth.de>"
shell(
r"""
set -x
# Write out information about conda installation --------------------------------------------------
conda list ... | 31.019608 | 99 | 0.510746 |
a696ea601af1c393d314ab2df22c1ba37c919083 | 616 | py | Python | app/main/hs_model_forms.py | RRRoger/MyWebserver-flask | 0a49d4f7b592b7e27c55f343d58c9dd08ceda3aa | [
"MIT"
] | 20 | 2020-08-18T08:46:16.000Z | 2022-02-09T09:56:36.000Z | app/main/hs_model_forms.py | RRRoger/MyWebserver-flask | 0a49d4f7b592b7e27c55f343d58c9dd08ceda3aa | [
"MIT"
] | null | null | null | app/main/hs_model_forms.py | RRRoger/MyWebserver-flask | 0a49d4f7b592b7e27c55f343d58c9dd08ceda3aa | [
"MIT"
] | 8 | 2021-04-08T05:44:51.000Z | 2022-02-09T06:44:01.000Z | from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, SelectField, PasswordField, IntegerField
from wtforms.validators import DataRequired, EqualTo, Length
class HsModelSearch(FlaskForm):
methods = [('name', '名称')]
method = SelectField(choices=methods, validators=[DataRequired(message=... | 34.222222 | 99 | 0.743506 |
2115d1e0615de999e89bee857d0c02cf9338a70d | 387 | py | Python | tests/test_heartbeat.py | dymaxionlabs/nb_workflows | 336e4d83dd5f8a7edfbaacfa426b23a42c0a68a9 | [
"Apache-2.0"
] | 4 | 2022-02-17T19:47:52.000Z | 2022-02-17T20:11:06.000Z | tests/test_heartbeat.py | dymaxionlabs/nb_workflows | 336e4d83dd5f8a7edfbaacfa426b23a42c0a68a9 | [
"Apache-2.0"
] | 2 | 2022-03-26T00:07:05.000Z | 2022-03-30T21:20:00.000Z | tests/test_heartbeat.py | dymaxionlabs/nb_workflows | 336e4d83dd5f8a7edfbaacfa426b23a42c0a68a9 | [
"Apache-2.0"
] | 1 | 2022-02-18T13:33:00.000Z | 2022-02-18T13:33:00.000Z | import time
from labfunctions.control_plane import heartbeat
def test_heartbeat_run(redis):
ht = heartbeat.HeartbeatThread(redis, name="test")
ht.setDaemon(True)
ht.start()
time.sleep(0.3)
key = redis.get("nb.ag.heart.test")
ht.unregister()
time.sleep(0.3)
not_key = redis.get("nb.ag.h... | 21.5 | 54 | 0.674419 |
780d759975343bed07f09119f8e1605f061522d1 | 3,261 | py | Python | djangosaml2idp/forms.py | FKD13/djangosaml2idp | ca93eea45a60cb34ea1624e1afc9b6903a824751 | [
"Apache-2.0"
] | null | null | null | djangosaml2idp/forms.py | FKD13/djangosaml2idp | ca93eea45a60cb34ea1624e1afc9b6903a824751 | [
"Apache-2.0"
] | null | null | null | djangosaml2idp/forms.py | FKD13/djangosaml2idp | ca93eea45a60cb34ea1624e1afc9b6903a824751 | [
"Apache-2.0"
] | null | null | null | import json
from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import gettext as _
from django.conf import settings
from .models import ServiceProvider
from .processors import instantiate_processor, validate_processor_path
from .utils import validate_metadata
bo... | 43.48 | 131 | 0.699479 |
e2b00c7be2eefa033add45492cb514bba89af3fe | 2,261 | py | Python | protonets/engine.py | Sophiaaaaaa/prototypical-networks | d5bd26478c427a2b7f9ca0f57a2874d78bd89c73 | [
"MIT"
] | null | null | null | protonets/engine.py | Sophiaaaaaa/prototypical-networks | d5bd26478c427a2b7f9ca0f57a2874d78bd89c73 | [
"MIT"
] | null | null | null | protonets/engine.py | Sophiaaaaaa/prototypical-networks | d5bd26478c427a2b7f9ca0f57a2874d78bd89c73 | [
"MIT"
] | null | null | null | from tqdm import tqdm
class Engine(object):
def __init__(self):
hook_names = ['on_start', 'on_start_epoch', 'on_sample', 'on_forward',
'on_backward', 'on_end_epoch', 'on_update', 'on_end']
self.hooks = { }
for hook_name in hook_names:
self.hooks[hook_name]... | 34.784615 | 104 | 0.500221 |
dfcb980109328a18ce452427f3979640fbe94ceb | 2,689 | py | Python | tests/components/litejet/test_switch.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | tests/components/litejet/test_switch.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 79 | 2020-07-23T07:13:37.000Z | 2022-03-22T06:02:37.000Z | tests/components/litejet/test_switch.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """The tests for the litejet component."""
import logging
from homeassistant.components import switch
from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON
from . import async_init_integration
_LOGGER = logging.getLogger(__name__)
ENTITY_SWITCH = "switch.mock_switch_1"
ENTITY_SWITCH_NUMB... | 33.197531 | 87 | 0.76534 |
03f0aebc82dc44a8a4aa1c581abf9718ba2e1c21 | 13,479 | py | Python | core/tests/test_models.py | judeakinwale/SMS-backup | 30636591b43bec94e7406f4c02fde402a5a2e38f | [
"MIT"
] | null | null | null | core/tests/test_models.py | judeakinwale/SMS-backup | 30636591b43bec94e7406f4c02fde402a5a2e38f | [
"MIT"
] | null | null | null | core/tests/test_models.py | judeakinwale/SMS-backup | 30636591b43bec94e7406f4c02fde402a5a2e38f | [
"MIT"
] | null | null | null | import tempfile
from PIL import Image
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.utils import timezone
from user import models as umodels
from information import models as imodels
from assessment import models as amodels
from academics import models as acmodels
def sam... | 35.944 | 104 | 0.612434 |
750f004088292d36618746b846fd08ca73529936 | 842 | py | Python | experimental_scripts/experiment12.py | w4k2/AWAE | fa5c5d8dca1a6bc46d9819a42fa92d1120639b58 | [
"MIT"
] | null | null | null | experimental_scripts/experiment12.py | w4k2/AWAE | fa5c5d8dca1a6bc46d9819a42fa92d1120639b58 | [
"MIT"
] | null | null | null | experimental_scripts/experiment12.py | w4k2/AWAE | fa5c5d8dca1a6bc46d9819a42fa92d1120639b58 | [
"MIT"
] | null | null | null | import numpy as np
import strlearn as sl
import config12 as config
from sklearn.base import clone
from tabulate import tabulate
import matplotlib.pyplot as plt
from strlearn.ensembles import WAE
from strlearn.evaluators import TestThenTrain
np.set_printoptions(suppress=True)
replications = config.replications()
for re... | 30.071429 | 82 | 0.726841 |
902cbc5196b7abee4aee3cf07bdf37d10cc9d99a | 20,519 | py | Python | synapse/storage/databases/main/account_data.py | eachchat/synapse | 889a5f3e011a859a0b2fe432429933f3aba1a8ce | [
"Apache-2.0"
] | null | null | null | synapse/storage/databases/main/account_data.py | eachchat/synapse | 889a5f3e011a859a0b2fe432429933f3aba1a8ce | [
"Apache-2.0"
] | null | null | null | synapse/storage/databases/main/account_data.py | eachchat/synapse | 889a5f3e011a859a0b2fe432429933f3aba1a8ce | [
"Apache-2.0"
] | null | null | null | # Copyright 2014-2016 OpenMarket Ltd
# Copyright 2018 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 37.375228 | 88 | 0.600955 |
0187a8b1a428d80ba213d2d93c0975ca56f1081b | 44,479 | py | Python | neutron/tests/functional/pecan_wsgi/test_controllers.py | iiscsahoo/Neutron | 2bf91b2f1036e62a6d76bb0f7a82304f15dce1f3 | [
"Apache-2.0"
] | null | null | null | neutron/tests/functional/pecan_wsgi/test_controllers.py | iiscsahoo/Neutron | 2bf91b2f1036e62a6d76bb0f7a82304f15dce1f3 | [
"Apache-2.0"
] | null | null | null | neutron/tests/functional/pecan_wsgi/test_controllers.py | iiscsahoo/Neutron | 2bf91b2f1036e62a6d76bb0f7a82304f15dce1f3 | [
"Apache-2.0"
] | null | null | null | # 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
# d... | 44.257711 | 79 | 0.614807 |
e975dc85d40789a817f8c8ba7c20f05cda9b35ce | 445 | py | Python | django/Lib/BookManagement/migrations/0002_auto_20190218_0751.py | pythontrainernag/python_7 | eaff90ac6885f3c1e1db91d885215040b32d8f0f | [
"MIT"
] | null | null | null | django/Lib/BookManagement/migrations/0002_auto_20190218_0751.py | pythontrainernag/python_7 | eaff90ac6885f3c1e1db91d885215040b32d8f0f | [
"MIT"
] | null | null | null | django/Lib/BookManagement/migrations/0002_auto_20190218_0751.py | pythontrainernag/python_7 | eaff90ac6885f3c1e1db91d885215040b32d8f0f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-02-18 02:21
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('BookManagement', '0001_initial'),
]
operations = [
migrations.Rename... | 21.190476 | 50 | 0.575281 |
a35cead6c0787d4eaedc3fb3004814d3e05d257c | 1,264 | py | Python | feedback/audio_interpreter.py | team8/outdoor-blind-navigation | 78b99fe1a193161c4b809990c71940fbed719785 | [
"MIT"
] | 6 | 2021-05-18T16:46:04.000Z | 2022-01-08T02:49:27.000Z | feedback/audio_interpreter.py | aoberai/outdoor-blind-navigation | 78b99fe1a193161c4b809990c71940fbed719785 | [
"MIT"
] | 15 | 2021-05-19T23:40:50.000Z | 2021-07-06T08:24:40.000Z | feedback/audio_interpreter.py | aoberai/outdoor-blind-navigation | 78b99fe1a193161c4b809990c71940fbed719785 | [
"MIT"
] | 4 | 2021-05-26T02:10:43.000Z | 2021-09-04T17:59:51.000Z | import audio_player
import math
def create_audio_cue(object_name, object_pixel_x, object_pixel_y, image_width, image_height):
quadrant_width = image_width/3
quadrant_height = image_height/3
pixel_quadrant_x = math.floor((object_pixel_x/image_width) * 3)
pixel_quadrant_y = math.floor((object_pixel_y/im... | 36.114286 | 93 | 0.670886 |
587e37fcfaeb451ce98111daae6f027a60695115 | 21,543 | py | Python | Drug_Generation/chemprop/data/data.py | iamchosenlee/reinvent-scaffold-decorator | 1bdda26dceece7716916cd6e8a5135893fd63b05 | [
"MIT"
] | 1 | 2022-02-18T23:54:56.000Z | 2022-02-18T23:54:56.000Z | Drug_Generation/chemprop/data/data.py | iamchosenlee/reinvent-scaffold-decorator | 1bdda26dceece7716916cd6e8a5135893fd63b05 | [
"MIT"
] | null | null | null | Drug_Generation/chemprop/data/data.py | iamchosenlee/reinvent-scaffold-decorator | 1bdda26dceece7716916cd6e8a5135893fd63b05 | [
"MIT"
] | null | null | null | import threading
from collections import OrderedDict
from random import Random
from typing import Dict, Iterator, List, Optional, Union
import numpy as np
from torch.utils.data import DataLoader, Dataset, Sampler
from rdkit import Chem
from .scaler import StandardScaler
from chemprop.features import get_features_gene... | 39.601103 | 120 | 0.629857 |
bbad1ea3dbbf503284d58f6a2a24fb4b6fa9934a | 2,493 | py | Python | filer/models/imagemodels.py | oubiga/django-filero | 561f7b2c7f926a802c8dd5c05756c8d92d9f4350 | [
"BSD-3-Clause"
] | 1 | 2019-04-15T10:28:46.000Z | 2019-04-15T10:28:46.000Z | filer/models/imagemodels.py | vstoykov/django-filer | c693b03f9d80b40d193f021475ffa5655a6a0342 | [
"BSD-3-Clause"
] | 1 | 2018-01-31T12:08:48.000Z | 2018-01-31T12:08:48.000Z | filer/models/imagemodels.py | vstoykov/django-filer | c693b03f9d80b40d193f021475ffa5655a6a0342 | [
"BSD-3-Clause"
] | 3 | 2016-12-28T03:32:44.000Z | 2018-05-28T15:13:38.000Z | #-*- coding: utf-8 -*-
from datetime import datetime
import logging
try:
from PIL import Image as PILImage
except ImportError:
try:
import Image as PILImage
except ImportError:
raise ImportError("The Python Imaging Library was not found.")
from django.conf import settings
from django.db imp... | 40.868852 | 118 | 0.584838 |
6ae70ec2980f149caad691d2a4d046d6ab990ccf | 1,480 | py | Python | integration/run.py | quartictech/dilectic | 61421850212a7fda947f59da2e535c106b891e5c | [
"BSD-3-Clause"
] | null | null | null | integration/run.py | quartictech/dilectic | 61421850212a7fda947f59da2e535c106b891e5c | [
"BSD-3-Clause"
] | null | null | null | integration/run.py | quartictech/dilectic | 61421850212a7fda947f59da2e535c106b891e5c | [
"BSD-3-Clause"
] | null | null | null | import os.path
from doit.doit_cmd import DoitMain
from dilectic.utils import *
import sys
config_file = os.path.join(os.path.dirname(__file__), 'config.yml')
cfg = Config(config_file)
if __name__ == "__main__":
import integrations.jamcams
import integrations.preprocess
import integrations.migration
im... | 30.833333 | 67 | 0.737162 |
6a676976763b047906b6d9978f6a006f838435d2 | 6,190 | py | Python | smdebug/tensorflow/collection.py | NRauschmayr/sagemaker-debugger | 24ed65631143fcc0457fb325a102500ebd69adfc | [
"Apache-2.0"
] | null | null | null | smdebug/tensorflow/collection.py | NRauschmayr/sagemaker-debugger | 24ed65631143fcc0457fb325a102500ebd69adfc | [
"Apache-2.0"
] | null | null | null | smdebug/tensorflow/collection.py | NRauschmayr/sagemaker-debugger | 24ed65631143fcc0457fb325a102500ebd69adfc | [
"Apache-2.0"
] | null | null | null | # Third Party
import tensorflow.compat.v1 as tf
from tensorflow.python.distribute import values
# First Party
from smdebug.core.collection import DEFAULT_TF_COLLECTIONS
from smdebug.core.collection import Collection as BaseCollection
from smdebug.core.collection import CollectionKeys
from smdebug.core.collection_manag... | 37.065868 | 100 | 0.648142 |
4034795475c3ca2732366e5065dccc06414fd40f | 1,229 | py | Python | notes/iterator.py | aliciawyy/sheep | b21231dfdaee63d3f868421cba2a50be26c513f4 | [
"MIT"
] | null | null | null | notes/iterator.py | aliciawyy/sheep | b21231dfdaee63d3f868421cba2a50be26c513f4 | [
"MIT"
] | 73 | 2018-06-13T14:50:51.000Z | 2022-03-07T23:04:38.000Z | notes/iterator.py | aliciawyy/sheep | b21231dfdaee63d3f868421cba2a50be26c513f4 | [
"MIT"
] | null | null | null | """
# Iterable vs Iterator vs Generator
- s is an iterable whose method __iter__ instantiates a new iterator every time.
- t is an iterator for whom the method __iter__ returns self
## Generator
Any Python function that has the `yield` keyword in its body is a generator
function, which, when called, returns a genera... | 32.342105 | 83 | 0.760781 |
3c45e2d27d7c3eb6140c272a4711a0d92333556f | 838 | py | Python | toontown/parties/DistributedPartyTeamActivityAI.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | 1 | 2020-09-27T22:12:47.000Z | 2020-09-27T22:12:47.000Z | toontown/parties/DistributedPartyTeamActivityAI.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | 1 | 2021-06-08T17:16:48.000Z | 2021-06-08T17:16:48.000Z | toontown/parties/DistributedPartyTeamActivityAI.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | 3 | 2021-06-03T05:36:36.000Z | 2021-06-22T15:07:31.000Z | from direct.directnotify import DirectNotifyGlobal
from toontown.parties.DistributedPartyActivityAI import DistributedPartyActivityAI
class DistributedPartyTeamActivityAI(DistributedPartyActivityAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedPartyTeamActivityAI")
def toonJoinRequest(sel... | 22.648649 | 90 | 0.704057 |
435776b422b614dc151defe5e1ab961649202297 | 590 | py | Python | examples/research/CBVN/embed/CBVN.py | fishjojo/pydmfe | 93cfc655314933d3531b5733521a1f95a044f6cb | [
"MIT"
] | 3 | 2021-02-26T06:26:00.000Z | 2022-02-20T08:58:20.000Z | examples/research/CBVN/embed/CBVN.py | fishjojo/pydmfet | 93cfc655314933d3531b5733521a1f95a044f6cb | [
"MIT"
] | null | null | null | examples/research/CBVN/embed/CBVN.py | fishjojo/pydmfet | 93cfc655314933d3531b5733521a1f95a044f6cb | [
"MIT"
] | null | null | null | from pydmfet import proj_ao
from pydmfet.qcwrap.pyscf_rks_ao import rks_ao
from pyscf import gto,scf
import numpy as np
from pyscf.tools import molden
from pyscf import lo
from pyscf.lo import iao,orth
from functools import reduce
import math
bas ='stuttgartdz'
ecp = 'stuttgartdz'
temp = 0.005
mol = gto.Mole()
mol.at... | 19.666667 | 53 | 0.722034 |
e7b3f8a4e402b0523507af9d60627709ae908a05 | 30,887 | py | Python | lib/transaction.py | fallingknife/electrum-uno | dbaeb251c0d32fe2502011c4721c0a34c68ac02d | [
"MIT"
] | null | null | null | lib/transaction.py | fallingknife/electrum-uno | dbaeb251c0d32fe2502011c4721c0a34c68ac02d | [
"MIT"
] | null | null | null | lib/transaction.py | fallingknife/electrum-uno | dbaeb251c0d32fe2502011c4721c0a34c68ac02d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2011 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without... | 35.831787 | 137 | 0.572959 |
36d282a3d06f77369024d5c08e3f5d467d0a76d4 | 1,821 | py | Python | python/paddle/fluid/tests/unittests/npu/test_elementwise_floordiv_op_npu.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 17,085 | 2016-11-18T06:40:52.000Z | 2022-03-31T22:52:32.000Z | python/paddle/fluid/tests/unittests/npu/test_elementwise_floordiv_op_npu.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 29,769 | 2016-11-18T06:35:22.000Z | 2022-03-31T16:46:15.000Z | python/paddle/fluid/tests/unittests/npu/test_elementwise_floordiv_op_npu.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 4,641 | 2016-11-18T07:43:33.000Z | 2022-03-31T15:15:02.000Z | # Copyright (c) 2021 PaddlePaddle 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 appli... | 28.453125 | 74 | 0.684789 |
41819373c3bf47b15768b37772dfec8e36584d39 | 41,021 | py | Python | senior project/code and resources/tetris_code.py | amiel445566/my-tetris | e738d791b685dbf6356e252450d366c747205087 | [
"MIT"
] | null | null | null | senior project/code and resources/tetris_code.py | amiel445566/my-tetris | e738d791b685dbf6356e252450d366c747205087 | [
"MIT"
] | null | null | null | senior project/code and resources/tetris_code.py | amiel445566/my-tetris | e738d791b685dbf6356e252450d366c747205087 | [
"MIT"
] | null | null | null | # import statements
import shelve
import pygame
from math import *
from sys import *
from copy import *
from random import *
import os
# GLOBAL VARIABLES
background_pattern = [
[9, 8, 9, 8, 9, 8, 9, 8, 9, 8],
[8, 9, 8, 9, 8, 9, 8, 9, 8, 9],
[9, 8, 9, 8, 9, 8, 9, 8, 9, 8],
[8, 9, 8, 9, 8, 9, 8, 9, 8, 9]... | 45.078022 | 190 | 0.577948 |
315cb7f288f541043e304e7f3f4b4fc160c983e1 | 4,642 | py | Python | official/cv/simple_pose/eval.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/simple_pose/eval.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/simple_pose/eval.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.707692 | 109 | 0.662861 |
b92f5c84b36a64ae053c36bf406c22258f95be61 | 19,269 | py | Python | gbpservice/neutron/tests/unit/services/grouppolicy/test_implicit_policy.py | ansao-aci/group-based-policy | d80a94dcb51bfce6994cd18339d3c79a7cb54bfe | [
"Apache-2.0"
] | 2 | 2017-12-13T10:33:28.000Z | 2019-07-03T19:01:42.000Z | gbpservice/neutron/tests/unit/services/grouppolicy/test_implicit_policy.py | ansao-aci/group-based-policy | d80a94dcb51bfce6994cd18339d3c79a7cb54bfe | [
"Apache-2.0"
] | 4 | 2015-04-14T00:27:44.000Z | 2020-08-31T11:20:17.000Z | gbpservice/neutron/tests/unit/services/grouppolicy/test_implicit_policy.py | ansao-aci/group-based-policy | d80a94dcb51bfce6994cd18339d3c79a7cb54bfe | [
"Apache-2.0"
] | 4 | 2015-04-10T16:03:47.000Z | 2020-08-31T06:06:32.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 46.883212 | 79 | 0.667497 |
a2baddc54484da8a42612889829159646de98e38 | 1,574 | py | Python | python/lbann/modules/graph/dense/DenseGraphConv.py | jonesholger/lbann | 3214f189a1438565d695542e076c4fa8e7332d34 | [
"Apache-2.0"
] | 194 | 2016-07-19T15:40:21.000Z | 2022-03-19T08:06:10.000Z | python/lbann/modules/graph/dense/DenseGraphConv.py | jonesholger/lbann | 3214f189a1438565d695542e076c4fa8e7332d34 | [
"Apache-2.0"
] | 1,021 | 2016-07-19T12:56:31.000Z | 2022-03-29T00:41:47.000Z | python/lbann/modules/graph/dense/DenseGraphConv.py | jonesholger/lbann | 3214f189a1438565d695542e076c4fa8e7332d34 | [
"Apache-2.0"
] | 74 | 2016-07-28T18:24:00.000Z | 2022-01-24T19:41:04.000Z | import lbann
from lbann.modules import Module
from lbann.util import str_list
import math
class DenseGraphConv(Module):
global_count = 0
def __init__(self, input_channels, output_channels, name=None):
super().__init__()
self.name = (name if name else 'DenseGraph_{}'.format(DenseGraphConv.glob... | 44.971429 | 103 | 0.589581 |
c090a78f348f28e4a6fa76631cf6f988ec13bc0b | 1,723 | py | Python | helper_run/ans_compare.py | jamaalhay/Final_Proj | 3f524a90fee5a3cb21466ab76f630d060792045d | [
"MIT"
] | 104 | 2018-05-16T07:15:29.000Z | 2022-03-08T09:28:02.000Z | helper_run/ans_compare.py | jamaalhay/Final_Proj | 3f524a90fee5a3cb21466ab76f630d060792045d | [
"MIT"
] | 4 | 2018-08-02T17:13:31.000Z | 2020-09-16T05:01:09.000Z | helper_run/ans_compare.py | jamaalhay/Final_Proj | 3f524a90fee5a3cb21466ab76f630d060792045d | [
"MIT"
] | 22 | 2018-05-30T10:13:49.000Z | 2021-12-14T15:43:12.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import matplotlib.pyplot as plt
from matplotlib_venn import venn2
import argparse
import json
import seaborn as sns
import pandas as pd
import numpy as np
sys.path.append(os.getcwd())
def set_diff(s1, s2):
a = set(s1)
b = set(s2)
diff1 ... | 21.271605 | 68 | 0.593732 |
51459749880791f9f88986f069f60281c2a48a80 | 16,021 | py | Python | armi/settings/tests/test_settings.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | armi/settings/tests/test_settings.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | armi/settings/tests/test_settings.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 TerraPower, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 35.761161 | 101 | 0.639036 |
d2d28921b8b398863b494109fa5b367d56e3d40e | 2,781 | py | Python | tools/tm2hints.py | mhaukness-ucsc/Comparative-Annotation-Toolkit | 1cc2c0e4fabccc2977c15b531d86ae6cadaddfe0 | [
"Apache-2.0"
] | null | null | null | tools/tm2hints.py | mhaukness-ucsc/Comparative-Annotation-Toolkit | 1cc2c0e4fabccc2977c15b531d86ae6cadaddfe0 | [
"Apache-2.0"
] | null | null | null | tools/tm2hints.py | mhaukness-ucsc/Comparative-Annotation-Toolkit | 1cc2c0e4fabccc2977c15b531d86ae6cadaddfe0 | [
"Apache-2.0"
] | 1 | 2021-01-20T23:30:06.000Z | 2021-01-20T23:30:06.000Z | """
Converts transMap genePred entries into Augustus hints
TODO: This uses different logic from calculate_num_missing_introns in the classify module. This could be confusing.
The challenge here is that transMap PSL objects may be negative stranded, may have indels at gaps, and have a
chromosomal target.
This process ... | 44.142857 | 116 | 0.730672 |
01d4edba0d5c1d6f97d65562a6d1005b2dc362c2 | 21,868 | py | Python | bc/standardpages/migrations/0023_area_links_compulsory.py | Buckinghamshire-Digital-Service/buckinghamshire-council | bbbdb52b515bcdfc79a2bd9198dfa4828405370e | [
"BSD-3-Clause"
] | 1 | 2021-02-27T07:27:17.000Z | 2021-02-27T07:27:17.000Z | bc/standardpages/migrations/0023_area_links_compulsory.py | Buckinghamshire-Digital-Service/buckinghamshire-council | bbbdb52b515bcdfc79a2bd9198dfa4828405370e | [
"BSD-3-Clause"
] | null | null | null | bc/standardpages/migrations/0023_area_links_compulsory.py | Buckinghamshire-Digital-Service/buckinghamshire-council | bbbdb52b515bcdfc79a2bd9198dfa4828405370e | [
"BSD-3-Clause"
] | 1 | 2021-06-09T15:56:54.000Z | 2021-06-09T15:56:54.000Z | # Generated by Django 2.2.24 on 2021-09-28 16:20
from django.db import migrations
import wagtail.contrib.table_block.blocks
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.embeds.blocks
import wagtail.images.blocks
import bc.utils.blocks
class Migration(migrations.Migration):
dependencies... | 62.125 | 254 | 0.190049 |
3d866424db27aca4b510bdef00522e97cf8d536d | 23,164 | py | Python | src/toil/fileStores/abstractFileStore.py | Jessime/toil | 6e19e3ba831f365d805ec4a4bf047b5ff67f1ffd | [
"Apache-2.0"
] | null | null | null | src/toil/fileStores/abstractFileStore.py | Jessime/toil | 6e19e3ba831f365d805ec4a4bf047b5ff67f1ffd | [
"Apache-2.0"
] | null | null | null | src/toil/fileStores/abstractFileStore.py | Jessime/toil | 6e19e3ba831f365d805ec4a4bf047b5ff67f1ffd | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015-2021 Regents of the University of California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 43.541353 | 114 | 0.660421 |
eb23a7009ab19cbc0f74dc9533857dddcef7a37d | 3,026 | py | Python | scripts/run.py | Brittany-Reid/NeuralCodeSum | db519614c28a1abcead30dd5518aaecf5326f8fc | [
"MIT"
] | null | null | null | scripts/run.py | Brittany-Reid/NeuralCodeSum | db519614c28a1abcead30dd5518aaecf5326f8fc | [
"MIT"
] | null | null | null | scripts/run.py | Brittany-Reid/NeuralCodeSum | db519614c28a1abcead30dd5518aaecf5326f8fc | [
"MIT"
] | null | null | null | #summarizes java from a file
# python run.py file
# file = file in data/java, by default code.java
# if json, will extract multiple, use format in code.json
import sys
import javalang
import nltk
import re
import subprocess
import json
from types import SimpleNamespace
nltk.download('punkt')
#point to the data direc... | 27.017857 | 112 | 0.630535 |
605129ba22f919a5d285a256bf0a56957c181cd9 | 289 | py | Python | tests/settings.py | kptac/django-measurement | 8b1fb7adb6059277f2a69dbdd05dc5e62e9ab895 | [
"MIT"
] | 118 | 2015-05-12T22:26:28.000Z | 2022-03-15T15:52:46.000Z | tests/settings.py | kptac/django-measurement | 8b1fb7adb6059277f2a69dbdd05dc5e62e9ab895 | [
"MIT"
] | 63 | 2015-01-08T04:36:21.000Z | 2022-02-28T08:21:05.000Z | tests/settings.py | kptac/django-measurement | 8b1fb7adb6059277f2a69dbdd05dc5e62e9ab895 | [
"MIT"
] | 42 | 2015-04-22T14:29:58.000Z | 2022-02-15T08:31:07.000Z | DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}}
INSTALLED_APPS = (
"django.contrib.auth",
"django.contrib.contenttypes",
"django_measurement",
"tests",
)
SITE_ID = 1
ROOT_URLCONF = "core.urls"
SECRET_KEY = "foobar"
USE_L10N = True
| 18.0625 | 85 | 0.657439 |
e070235b294b015987b23eca0b2477167889bd01 | 164 | py | Python | finch/settings.py | pterk/finch-cms | 75d8accbc75b0b6348d71e0eb94df997b1ed2ef1 | [
"BSD-3-Clause"
] | 1 | 2019-12-29T16:22:54.000Z | 2019-12-29T16:22:54.000Z | finch/settings.py | pterk/finch-cms | 75d8accbc75b0b6348d71e0eb94df997b1ed2ef1 | [
"BSD-3-Clause"
] | 3 | 2020-02-11T21:08:03.000Z | 2021-06-10T17:22:57.000Z | finch/settings.py | pterk/finch-cms | 75d8accbc75b0b6348d71e0eb94df997b1ed2ef1 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
TEMPLATE_CHOICES = [("content.html", "default")]
TEMPLATE_CHOICES = getattr(settings, 'FINCH_TEMPLATE_CHOICES', TEMPLATE_CHOICES)
| 32.8 | 80 | 0.79878 |
9b0f0c875689ae2a48de8bb4382baeb086b42a42 | 8,450 | py | Python | certbot/plugins/dns_common_test.py | tsrivishnu/certbot | 81f02e5578819220e0b4e15a9ceca9b77fff436e | [
"Apache-2.0"
] | 4 | 2020-04-09T21:57:23.000Z | 2020-04-11T13:26:54.000Z | certbot/plugins/dns_common_test.py | tsrivishnu/certbot | 81f02e5578819220e0b4e15a9ceca9b77fff436e | [
"Apache-2.0"
] | 808 | 2018-11-09T05:14:26.000Z | 2021-08-03T05:26:10.000Z | certbot/plugins/dns_common_test.py | tsrivishnu/certbot | 81f02e5578819220e0b4e15a9ceca9b77fff436e | [
"Apache-2.0"
] | 3 | 2018-02-09T21:05:38.000Z | 2019-06-10T00:39:00.000Z | """Tests for certbot.plugins.dns_common."""
import collections
import logging
import os
import unittest
import mock
from certbot import errors
from certbot.display import util as display_util
from certbot.plugins import dns_common
from certbot.plugins import dns_test_common
from certbot.tests import util
class DNS... | 36.111111 | 96 | 0.648639 |
963c9d4f301fd2e4bf3b8aa98261b10c2fcbb2d2 | 543 | py | Python | scripts/go_mod.py | NouemanKHAL/steps | 74929af9a343e206f319296a6b800aefa81e425e | [
"BSD-3-Clause"
] | null | null | null | scripts/go_mod.py | NouemanKHAL/steps | 74929af9a343e206f319296a6b800aefa81e425e | [
"BSD-3-Clause"
] | null | null | null | scripts/go_mod.py | NouemanKHAL/steps | 74929af9a343e206f319296a6b800aefa81e425e | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
"""
Runs
- go get ./...
- go mod download
- go mod tidy
in every go step directory
"""
import os
import steps
import sys
def main():
for step in steps.get_go_steps():
cur_dir = os.getcwd()
print("> Running in: %s" % (step,))
os.chd... | 19.392857 | 43 | 0.52302 |
978f0f690a7d8875b13e8d297168d3be25d0ca1f | 1,347 | py | Python | clingox/tests/test_solving.py | jorgefandinno/python-clingox | 279f35bad138ee06f7e4f63feaafb54f1083fef5 | [
"MIT"
] | null | null | null | clingox/tests/test_solving.py | jorgefandinno/python-clingox | 279f35bad138ee06f7e4f63feaafb54f1083fef5 | [
"MIT"
] | 3 | 2020-09-26T16:38:20.000Z | 2020-09-28T21:45:28.000Z | clingox/tests/test_solving.py | jorgefandinno/python-clingox | 279f35bad138ee06f7e4f63feaafb54f1083fef5 | [
"MIT"
] | null | null | null | """
Simple tests for solving.
"""
from unittest import TestCase
from clingo.control import Control
from ..solving import approximate
class TestSolving(TestCase):
'''
Tests for solving module.
'''
def approximate(self, prg: str, expected_res):
'''
Auxiliary function to test approxim... | 23.631579 | 59 | 0.426132 |
532d87e9775717315af045e83c836532bf50034b | 6,780 | py | Python | pdfminer3/pdfdevice.py | 3stack-software/pdfminer | f5cfe9371a0d74279775025e6049bbc0f828c565 | [
"MIT"
] | null | null | null | pdfminer3/pdfdevice.py | 3stack-software/pdfminer | f5cfe9371a0d74279775025e6049bbc0f828c565 | [
"MIT"
] | null | null | null | pdfminer3/pdfdevice.py | 3stack-software/pdfminer | f5cfe9371a0d74279775025e6049bbc0f828c565 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .pdffont import PDFUnicodeNotDefined
from . import utils
## PDFDevice
##
class PDFDevice(object):
def __init__(self, rsrcmgr):
self.rsrcmgr = rsrcmgr
self.ctm = None
return
def __repr__(self):
return '<PDFDevice>'
def __enter__(self):
... | 25.877863 | 75 | 0.467257 |
10e8ddd709b01aa7d3b1406e14bc33cb655132a2 | 1,213 | py | Python | python/13-import-kullanimi.py | emrecoban/examples | 5d41a665331e4771f6fd62d4abb1d58ae60dbd22 | [
"MIT"
] | null | null | null | python/13-import-kullanimi.py | emrecoban/examples | 5d41a665331e4771f6fd62d4abb1d58ae60dbd22 | [
"MIT"
] | null | null | null | python/13-import-kullanimi.py | emrecoban/examples | 5d41a665331e4771f6fd62d4abb1d58ae60dbd22 | [
"MIT"
] | null | null | null | ### MODÜLLER
#--------------------------------------
os #--> işletim sistemi
sys #--> python
math #--> matematiksel
time #--> zaman, tarih
random #--> rastgele sayı
#--------------------------------------
Kullanımı: import os
#--------------------------------------
print os.name #--> işletim sistemi adı
print os.listdi... | 27.568182 | 41 | 0.520198 |
28e0121c88ed7a2b24579aa9a42e30928c598b0b | 2,558 | py | Python | Quiz2/coordenadasPolares.py | alejoso76/Computaci-n-gr-fica | 474a498a328b8951aa0bfa1db2d0d1f3d8cc914b | [
"MIT"
] | null | null | null | Quiz2/coordenadasPolares.py | alejoso76/Computaci-n-gr-fica | 474a498a328b8951aa0bfa1db2d0d1f3d8cc914b | [
"MIT"
] | null | null | null | Quiz2/coordenadasPolares.py | alejoso76/Computaci-n-gr-fica | 474a498a328b8951aa0bfa1db2d0d1f3d8cc914b | [
"MIT"
] | null | null | null | import pygame
import math
#Theta 0->360
#
ANCHO=600
ALTO=480
def dibujarPunto(p, pant):
pygame.draw.circle(pant, [0, 255, 0], p, 5, 0)
pygame.display.flip()
def dibujarPlano(o, pantalla):
pygame.draw.line(pantalla, [0, 255, 0], [o[0], 0], [o[0], 480] )
pygame.draw.line(pantalla, [0, 255, 0], [0, o[1... | 24.132075 | 69 | 0.554339 |
449674e999c64178506853039426a08195debcaf | 206 | py | Python | chekpoint/form.py | beatum/perxtestcase | c91f36553b3934204311e4e93c4e2f09bd2b1b8e | [
"MIT"
] | null | null | null | chekpoint/form.py | beatum/perxtestcase | c91f36553b3934204311e4e93c4e2f09bd2b1b8e | [
"MIT"
] | null | null | null | chekpoint/form.py | beatum/perxtestcase | c91f36553b3934204311e4e93c4e2f09bd2b1b8e | [
"MIT"
] | null | null | null | from django import forms
class ChekActivationForm(forms.Form):
code = forms.CharField(max_length=4)
class KeyCodeActivator(forms.Form):
check_sum = forms.CharField(max_length=32, min_length=32)
| 20.6 | 61 | 0.771845 |
3b6944f16d6dc72c73a67b9683b179a9b2f767fc | 1,175 | py | Python | qaforum/utils.py | UREDDY616/IIITVforum | ad377f26a2869761a998062202b584fc03f78cfa | [
"MIT"
] | 117 | 2016-03-18T19:17:24.000Z | 2021-08-31T20:37:33.000Z | qaforum/utils.py | UREDDY616/IIITVforum | ad377f26a2869761a998062202b584fc03f78cfa | [
"MIT"
] | 70 | 2016-03-17T14:32:14.000Z | 2021-10-21T14:24:28.000Z | qaforum/utils.py | UREDDY616/IIITVforum | ad377f26a2869761a998062202b584fc03f78cfa | [
"MIT"
] | 42 | 2016-04-16T04:47:06.000Z | 2021-05-31T12:57:49.000Z | import pytz
from datetime import datetime
from django.utils import timezone
from math import log
# uses a version of reddit score algorithm
# https://medium.com/hacking-and-gonzo/how-reddit-ranking-algorithms-work-ef111e33d0d9#.aef67efq1
def question_score(question):
creation_date = question.pub_date
score =... | 40.517241 | 97 | 0.72 |
97eece64f1028f1ace925dd062c256aaa9e476f3 | 403 | py | Python | EventNotifier/SubscriberManager.py | vitalij555/basic-notifier | f0dbac224ed4c043a3fd36f7801b61088b0a39fe | [
"MIT"
] | 5 | 2020-03-18T10:21:31.000Z | 2021-05-23T09:53:12.000Z | EventNotifier/SubscriberManager.py | vitalij555/event-notifier | ca244f94e67c126d55643d14c0b55208a1f0775b | [
"MIT"
] | null | null | null | EventNotifier/SubscriberManager.py | vitalij555/event-notifier | ca244f94e67c126d55643d14c0b55208a1f0775b | [
"MIT"
] | null | null | null | '''
Created on 2019-03-20
@author: Vitalij Gotovskij (Lithuania)
'''
class SubscriberManager(object):
def __init__(self, eventName):
self.subscribers = []
self.__eventName = eventName
def notify(self, *args, **kwargs):
for subscriber in self.subscribers:
subsc... | 22.388889 | 44 | 0.612903 |
c23154ad814133ea31810a0660c83e92448acead | 742 | py | Python | epicteller/web/handler/misc.py | KawashiroNitori/epicteller | 264b11e7e6eb58beb0f67ecbbb811d268a533f7a | [
"MIT"
] | null | null | null | epicteller/web/handler/misc.py | KawashiroNitori/epicteller | 264b11e7e6eb58beb0f67ecbbb811d268a533f7a | [
"MIT"
] | null | null | null | epicteller/web/handler/misc.py | KawashiroNitori/epicteller | 264b11e7e6eb58beb0f67ecbbb811d268a533f7a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import base64
from fastapi import APIRouter
from pydantic import BaseModel
from epicteller.core.util import imghosting
from epicteller.web.error.misc import BadRequestError
from epicteller.web.model import BasicResponse
router = APIRouter()
class UploadForm(BaseModel):... | 22.484848 | 74 | 0.743935 |
72f17c7d45a50c164399c9101efc4b79ea4144b1 | 610 | py | Python | ley_pesca/wsgi.py | lfalvarez/votaciones_ley_pesca | 99b74c4b7e353efd0d4f8c0edd41a636cfe9702e | [
"MIT",
"BSD-3-Clause"
] | null | null | null | ley_pesca/wsgi.py | lfalvarez/votaciones_ley_pesca | 99b74c4b7e353efd0d4f8c0edd41a636cfe9702e | [
"MIT",
"BSD-3-Clause"
] | null | null | null | ley_pesca/wsgi.py | lfalvarez/votaciones_ley_pesca | 99b74c4b7e353efd0d4f8c0edd41a636cfe9702e | [
"MIT",
"BSD-3-Clause"
] | null | null | null | """
WSGI config for ley_pesca project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import os
from os.path import abspath, dirname
from sys import path
SITE_ROOT = dirname(dirname... | 23.461538 | 80 | 0.795082 |
eb7e7cbcaed58307c9019ab5ba69e4fab11e1288 | 6,876 | py | Python | docs/conf.py | louispotok/great_expectations | b91a3ce10f771742f49ccad9c403bda03f318515 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | louispotok/great_expectations | b91a3ce10f771742f49ccad9c403bda03f318515 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | louispotok/great_expectations | b91a3ce10f771742f49ccad9c403bda03f318515 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# great_expectations documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 8 23:00:19 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated ... | 31.541284 | 81 | 0.699389 |
00963dbc05e7acd050cd8cfe12b34e5aa1b40e30 | 1,015 | py | Python | RaspberryPi/setup.py | bmoix/ardupi-weather | 9c8a6bd5708241b30ee8c2b37b0c2d15977e84cd | [
"MIT"
] | 2 | 2016-04-13T20:35:48.000Z | 2016-12-15T11:21:54.000Z | RaspberryPi/setup.py | bmoix/ardupi-weather | 9c8a6bd5708241b30ee8c2b37b0c2d15977e84cd | [
"MIT"
] | null | null | null | RaspberryPi/setup.py | bmoix/ardupi-weather | 9c8a6bd5708241b30ee8c2b37b0c2d15977e84cd | [
"MIT"
] | 2 | 2016-04-16T09:34:15.000Z | 2016-06-11T08:13:16.000Z | #!/usr/bin/env python3
from setuptools import setup
packages = [
'ardupi_weather',
'ardupi_weather.arduino',
'ardupi_weather.database',
'ardupi_weather.flaskfiles.app'
]
extras = {
'rpi':['RPI.GPIO>=0.6.1']
}
setup(
name='ardupi_weather',
url='https://github.com/jordivila... | 24.756098 | 64 | 0.617734 |
989055296a9a72a705d0beee5239a64751f39fdb | 11,388 | py | Python | tfrecorder.py | tenghaha/tf_speech_recog | 35d36239c0644a07fc7d09e29546cdcb37d44962 | [
"Apache-2.0"
] | 108 | 2018-02-12T06:05:16.000Z | 2022-02-15T02:52:09.000Z | tfrecorder.py | tenghaha/tf_speech_recog | 35d36239c0644a07fc7d09e29546cdcb37d44962 | [
"Apache-2.0"
] | 3 | 2018-04-14T18:14:46.000Z | 2018-10-09T02:28:20.000Z | tfrecorder.py | tenghaha/tf_speech_recog | 35d36239c0644a07fc7d09e29546cdcb37d44962 | [
"Apache-2.0"
] | 40 | 2018-03-28T08:29:04.000Z | 2022-02-23T02:40:11.000Z | import pandas as pd
import numpy as np
import tensorflow as tf
import os
class TFrecorder(object):
'''
helper function for write and read TFrecord files
Args:
path: where to write and read
'''
def __init__(self, length_type ='fixed',retrieve_shape = False):
'''
... | 44.139535 | 186 | 0.519055 |
dd284862ad7ee950130ebc43d22ead5dcc07d751 | 6,369 | py | Python | test/functional/feature_blockindexstats.py | PassionCash/PassionCashCoin | 389a2fce7458cb400b900b0e816ed24db90f3c92 | [
"MIT"
] | null | null | null | test/functional/feature_blockindexstats.py | PassionCash/PassionCashCoin | 389a2fce7458cb400b900b0e816ed24db90f3c92 | [
"MIT"
] | null | null | null | test/functional/feature_blockindexstats.py | PassionCash/PassionCashCoin | 389a2fce7458cb400b900b0e816ed24db90f3c92 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2021 The Passion developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
from test_framework.test_framework import PassionTestFramework
from test_framework.util import (
assert_equal... | 43.623288 | 107 | 0.577642 |
6cefee8a7c45edca1eeda5e66918db47ed07da38 | 15,124 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/module_utils/network/vyos/config/lldp_interfaces/lldp_interfaces.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/venv/lib/python2.7/site-packages/ansible/module_utils/network/vyos/config/lldp_interfaces/lldp_interfaces.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/venv/lib/python2.7/site-packages/ansible/module_utils/network/vyos/config/lldp_interfaces/lldp_interfaces.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The vyos_lldp_interfaces class
It is in this file where the current configuration (as dict)
is compared to the provided configuration (as dict) and the command set
necess... | 38.095718 | 99 | 0.57055 |
957b8411b11c6c185f5df5701c0316539fdefefa | 3,595 | py | Python | examples/parallel/run_parallel_advection.py | GeoscienceAustralia/anuga_core | 372e21a5c1c88867437374c851f1ff629bd3dab3 | [
"Python-2.0",
"OLDAP-2.7"
] | 136 | 2015-05-07T05:47:43.000Z | 2022-02-16T03:07:40.000Z | examples/parallel/run_parallel_advection.py | GeoscienceAustralia/anuga_core | 372e21a5c1c88867437374c851f1ff629bd3dab3 | [
"Python-2.0",
"OLDAP-2.7"
] | 184 | 2015-05-03T09:27:54.000Z | 2021-12-20T04:22:48.000Z | examples/parallel/run_parallel_advection.py | GeoscienceAustralia/anuga_core | 372e21a5c1c88867437374c851f1ff629bd3dab3 | [
"Python-2.0",
"OLDAP-2.7"
] | 70 | 2015-03-18T07:35:22.000Z | 2021-11-01T07:07:29.000Z | #!/usr/bin/env python
#########################################################
#
# Main file for parallel mesh testing. Runs an advection
# flow simulation using a rectangular mesh
#
#
# Authors: Steve Roberts June 2005
# Modified by Linda Stals April 2006
#
#
#######################################################... | 21.787879 | 78 | 0.615021 |
a360caeb1dbbb8ff7896fedfc39623909e850df3 | 1,750 | py | Python | banking_database.py | fifmazurkiewicz/SimpleBankingSystem_pycharmacademy | 361e7f1668cc3bd207ef997a6d354ba11a1796fa | [
"MIT"
] | null | null | null | banking_database.py | fifmazurkiewicz/SimpleBankingSystem_pycharmacademy | 361e7f1668cc3bd207ef997a6d354ba11a1796fa | [
"MIT"
] | null | null | null | banking_database.py | fifmazurkiewicz/SimpleBankingSystem_pycharmacademy | 361e7f1668cc3bd207ef997a6d354ba11a1796fa | [
"MIT"
] | null | null | null | # source of this solution https://github.com/pyxelr/simple-banking-system
import sqlite3
create_query = ('''CREATE TABLE IF NOT EXISTS card (id INTEGER PRIMARY KEY, number TEXT,
pin TEXT, balance INTEGER DEFAULT 0);''')
class BankDB:
def __init__(self):
self.conn = sqlite3.connect('car... | 33.653846 | 89 | 0.604 |
93cbfc357fc4ea0393730a1813f90cc03fc5bde7 | 93 | py | Python | src/rendafixa/apps.py | caiotaniguchi/meus-investimentos | 204f922d2664fb10918ba5e4c2fef57143a0ef58 | [
"MIT"
] | null | null | null | src/rendafixa/apps.py | caiotaniguchi/meus-investimentos | 204f922d2664fb10918ba5e4c2fef57143a0ef58 | [
"MIT"
] | null | null | null | src/rendafixa/apps.py | caiotaniguchi/meus-investimentos | 204f922d2664fb10918ba5e4c2fef57143a0ef58 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class RendafixaConfig(AppConfig):
name = 'rendafixa'
| 15.5 | 33 | 0.763441 |
fd4205eb4c6ac949808f4b741bcc397a17956eae | 4,934 | py | Python | src/YouTube_services.py | FischiTheDev/POSI-SW | b1912daf045402528992a686363c8bc9077dfeee | [
"Apache-2.0"
] | null | null | null | src/YouTube_services.py | FischiTheDev/POSI-SW | b1912daf045402528992a686363c8bc9077dfeee | [
"Apache-2.0"
] | null | null | null | src/YouTube_services.py | FischiTheDev/POSI-SW | b1912daf045402528992a686363c8bc9077dfeee | [
"Apache-2.0"
] | null | null | null | import pytube
import requests
import urllib.request
import os
import colors
import utils
CWD = os.getcwd()
def GetInfoAboutVideo(url):
if url == None:
return False
elif url.replace(" ", "") == "":
return "Error: Invalid YouTube video link."
Video = pytube.YouTube(url=url)
... | 51.395833 | 236 | 0.616133 |
77f83ba9048e21344f31ac6c9283d242ae326e40 | 307 | py | Python | andrew_is_hungry_for_py/eat.py | Anu9518/andrew-is-hungry-for-py | 0eae3223e82bc439bde499dbd1f48ba43af2f0b3 | [
"MIT"
] | null | null | null | andrew_is_hungry_for_py/eat.py | Anu9518/andrew-is-hungry-for-py | 0eae3223e82bc439bde499dbd1f48ba43af2f0b3 | [
"MIT"
] | null | null | null | andrew_is_hungry_for_py/eat.py | Anu9518/andrew-is-hungry-for-py | 0eae3223e82bc439bde499dbd1f48ba43af2f0b3 | [
"MIT"
] | null | null | null | from dateutil.parser import parse
def feedme(inputdate):
datetime = parse(inputdate).date()
day = datetime.day
month = datetime.month
if day == 31 and month == 10:
return "Birthday Cake"
if day == 1 and month == 11:
return "Leftover Birthday Cake"
return "Cake"
| 19.1875 | 39 | 0.625407 |
e33d9990e94b49d01042c24e0c86db44e6922c16 | 4,578 | py | Python | demo/BERT/helpers/calibrator.py | martellz/TensorRT | f182e83b30b5d45aaa3f9a041ff8b3ce83e366f4 | [
"Apache-2.0"
] | 5,249 | 2019-06-17T17:20:34.000Z | 2022-03-31T17:56:05.000Z | demo/BERT/helpers/calibrator.py | martellz/TensorRT | f182e83b30b5d45aaa3f9a041ff8b3ce83e366f4 | [
"Apache-2.0"
] | 1,721 | 2019-06-17T18:13:29.000Z | 2022-03-31T16:09:53.000Z | demo/BERT/helpers/calibrator.py | martellz/TensorRT | f182e83b30b5d45aaa3f9a041ff8b3ce83e366f4 | [
"Apache-2.0"
] | 1,414 | 2019-06-18T04:01:17.000Z | 2022-03-31T09:16:53.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2021, NVIDIA CORPORATION. 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
#
# ... | 40.875 | 173 | 0.683705 |
80fb7fdfdbb6ebf43f3ee69d530e25913b2865b8 | 1,540 | py | Python | herbie/models/gfs_wave.py | gitter-badger/Herbie | a20ca571226d33a20105d5cf562a0d0eb3263748 | [
"MIT"
] | null | null | null | herbie/models/gfs_wave.py | gitter-badger/Herbie | a20ca571226d33a20105d5cf562a0d0eb3263748 | [
"MIT"
] | null | null | null | herbie/models/gfs_wave.py | gitter-badger/Herbie | a20ca571226d33a20105d5cf562a0d0eb3263748 | [
"MIT"
] | null | null | null | ## Added by Brian Blaylock
## July 26, 2021
class gfs_wave:
def template(self):
self.DESCRIPTION = 'Global Forecast System - Wave Products'
self.DETAILS = {
'nomads product description': 'https://www.nco.ncep.noaa.gov/pmb/products/gfs/#GFSwave',
}
self.PRODUCTS = {
... | 57.037037 | 182 | 0.614286 |
e0e96bfeb041d9b4ff2d39864c4bee9bb16a71c2 | 1,248 | py | Python | src/pynumerals/number_parser.py | numeralbank/pynumerals | 7c827ba7e7892b2779573cd3047ab44da027243d | [
"Apache-2.0"
] | null | null | null | src/pynumerals/number_parser.py | numeralbank/pynumerals | 7c827ba7e7892b2779573cd3047ab44da027243d | [
"Apache-2.0"
] | 5 | 2020-07-06T13:53:57.000Z | 2020-10-23T13:33:18.000Z | src/pynumerals/number_parser.py | numeralbank/pynumerals | 7c827ba7e7892b2779573cd3047ab44da027243d | [
"Apache-2.0"
] | null | null | null | import re
# For pattern and application see: https://is.gd/IPf2pL.
PATTERN = r"""(?x)
^
\s*
(?P<number>
(?P<sign>[+-])?
(?P<integer_part>
\d{1,3}
(?P<sep>
[ ,.]
)
\d{3}
(?:
(?P=sep)
... | 20.8 | 73 | 0.396635 |
b1795b0025443f4846db24deca6027a3f4a3d80e | 2,037 | py | Python | 58_ML_06_03_what_is_gabor_filter.py | Data-Laboratory/WorkExamples | 27e58207e664da7813673e6792c0c30c0a5bf74c | [
"MIT"
] | 1 | 2021-12-15T22:27:27.000Z | 2021-12-15T22:27:27.000Z | 58_ML_06_03_what_is_gabor_filter.py | Data-Laboratory/WorkExamples | 27e58207e664da7813673e6792c0c30c0a5bf74c | [
"MIT"
] | null | null | null | 58_ML_06_03_what_is_gabor_filter.py | Data-Laboratory/WorkExamples | 27e58207e664da7813673e6792c0c30c0a5bf74c | [
"MIT"
] | null | null | null |
"""
#Ref: Sreenivas Sarwar Anik
What are features?
s
"""
##############################################
#Gabor filter, multiple filters in one. Generate fiter bank.
"""
For image processing and computer vision, Gabor filters are generally
used in texture analysis, edge detection, feature extraction, etc.
Gabor f... | 31.828125 | 94 | 0.730977 |
9d1fbda0d736bfd9f266248517d0fda1e598afb5 | 11,562 | py | Python | userbot/modules/afk.py | cuplis21/stvv | a3db2d3e2eda69e24da44fd70b55e79b95614106 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/afk.py | cuplis21/stvv | a3db2d3e2eda69e24da44fd70b55e79b95614106 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/afk.py | cuplis21/stvv | a3db2d3e2eda69e24da44fd70b55e79b95614106 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
# Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
# Ported by @azrim
""" Userbot module which contains afk-related commands """
from datetime import datetime
import ti... | 41.44086 | 273 | 0.567462 |
d7a914d5ca0b08d91232e270028745fa9124a4b7 | 2,435 | py | Python | L2J_DataPack/data/scripts/quests/284_MuertosFeather/__init__.py | Vladislav-Zolotaryov/L2J_Levelless_Custom | fb9fd3d22209679258cddc60cec104d740f13b8c | [
"MIT"
] | null | null | null | L2J_DataPack/data/scripts/quests/284_MuertosFeather/__init__.py | Vladislav-Zolotaryov/L2J_Levelless_Custom | fb9fd3d22209679258cddc60cec104d740f13b8c | [
"MIT"
] | null | null | null | L2J_DataPack/data/scripts/quests/284_MuertosFeather/__init__.py | Vladislav-Zolotaryov/L2J_Levelless_Custom | fb9fd3d22209679258cddc60cec104d740f13b8c | [
"MIT"
] | null | null | null | # Contributed by t0rm3nt0r (tormentor2000@mail.ru) to the Official L2J Datapack Project.
# Visit http://www.l2jdp.com/forum/ for more details.
import sys
from com.l2jserver.gameserver.model.quest import State
from com.l2jserver.gameserver.model.quest import QuestState
from com.l2jserver.gameserver.model.quest.jython i... | 29.695122 | 154 | 0.650513 |
9f5bccc509fc94fa8382cc28866271da17e524a1 | 9,151 | py | Python | audio_attack.py | sab747/adversarial_audio | b146da47c1d913611cd4e2a3e9718e7c5de135d7 | [
"MIT"
] | 1 | 2021-10-07T22:00:43.000Z | 2021-10-07T22:00:43.000Z | audio_attack.py | sab747/adversarial_audio | b146da47c1d913611cd4e2a3e9718e7c5de135d7 | [
"MIT"
] | null | null | null | audio_attack.py | sab747/adversarial_audio | b146da47c1d913611cd4e2a3e9718e7c5de135d7 | [
"MIT"
] | null | null | null | """
Original Author: Moustafa Alzantot (malzantot@ucla.edu)
All rights reserved.
Modified for use in project by Tommy White (tommy.white.gr@dartmouth.edu) and Sabrina Jain in CS87 at Dartmouth
"""
import argparse
import os, sys
import numpy as np
import random
import sys
import time
import tensorflow as tf... | 38.611814 | 162 | 0.610753 |
dbffbc4458cc288cb45fbadbd8a9237b06bfe165 | 447 | py | Python | 2015/day13/pytest.py | CheyenneWills/adventofcode | 7ab9e57420225df121c1702a144e659c4aa93abb | [
"MIT"
] | null | null | null | 2015/day13/pytest.py | CheyenneWills/adventofcode | 7ab9e57420225df121c1702a144e659c4aa93abb | [
"MIT"
] | null | null | null | 2015/day13/pytest.py | CheyenneWills/adventofcode | 7ab9e57420225df121c1702a144e659c4aa93abb | [
"MIT"
] | null | null | null | from sys import stdin
from re import findall
from itertools import permutations
m = {}
ppl = set()
for line in stdin.readlines():
a, s, n, b = findall(r'(\w+) \w+ (\w+) (\d+) .* (\w+)\.', line)[0]
m[a+b] = int(n) * (1 if s == 'gain' else -1)
ppl.add(a)
def c(p):
L = len(p)
t = 0
for i in rang... | 21.285714 | 70 | 0.501119 |
bbef85de4dce78dac5186f7079f44cddc9a09ac4 | 250 | py | Python | thunder/manage.py | liuansen/django-demo | 7f13e723a7ec1f0689e40de67cc6a6b308f44ba9 | [
"Apache-2.0"
] | 1 | 2019-06-15T14:59:42.000Z | 2019-06-15T14:59:42.000Z | thunder/manage.py | liuansen/django-demo | 7f13e723a7ec1f0689e40de67cc6a6b308f44ba9 | [
"Apache-2.0"
] | 7 | 2020-06-05T21:23:18.000Z | 2022-03-11T23:50:34.000Z | thunder/manage.py | liuansen/django-demo | 7f13e723a7ec1f0689e40de67cc6a6b308f44ba9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "thunder.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 22.727273 | 71 | 0.772 |
9a026a2ebbe463fcada532dfd6047612aee00d1e | 4,597 | py | Python | pr_syncthing.py | timburbank/pr_syncthing | d23b3a409f95e4896f620d202216c5fd9b41fa5d | [
"MIT"
] | null | null | null | pr_syncthing.py | timburbank/pr_syncthing | d23b3a409f95e4896f620d202216c5fd9b41fa5d | [
"MIT"
] | null | null | null | pr_syncthing.py | timburbank/pr_syncthing | d23b3a409f95e4896f620d202216c5fd9b41fa5d | [
"MIT"
] | null | null | null | #!/bin/python
import requests
import os
import json
# awkward system to get config parser for python 2 or 3
from sys import version_info
py3 = version_info[0] > 2
if py3:
import configparser
else:
import ConfigParser as configparser
def terminal_input(prompt=''):
from sys import version_info
py3 = version_in... | 26.119318 | 85 | 0.698281 |
7efc8a8de32e0ea8d71d6c81f4ac52f54faeaf0d | 3,476 | py | Python | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/types/user_data_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/types/user_data_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/types/user_data_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 29.709402 | 111 | 0.661105 |
38470dd9464a9caba7d96026fe78740c02ceee56 | 12,720 | py | Python | SimPEG/potential_fields/gravity/simulation.py | prisae/simpeg | 5cdd1b496bddcf3d9acd714b901a57bad6fb1ef9 | [
"MIT"
] | 3 | 2021-08-04T02:27:41.000Z | 2022-01-12T00:20:07.000Z | SimPEG/potential_fields/gravity/simulation.py | thast/simpeg | 8021082b8b53f3c08fa87fc085547bdd56437c6b | [
"MIT"
] | 2 | 2020-06-16T00:11:37.000Z | 2020-07-10T19:45:09.000Z | SimPEG/potential_fields/gravity/simulation.py | thast/simpeg | 8021082b8b53f3c08fa87fc085547bdd56437c6b | [
"MIT"
] | 1 | 2021-12-29T00:06:07.000Z | 2021-12-29T00:06:07.000Z | from __future__ import print_function
from ...utils.code_utils import deprecate_class
from SimPEG import utils
from SimPEG.utils import mkvc, sdiag
from SimPEG import props
from ...simulation import BaseSimulation
from ..base import BasePFSimulation
import scipy.constants as constants
import numpy as np
class Simulat... | 31.02439 | 122 | 0.371305 |
8042719a577b27b4fe2766a64d79fe501dcb67b5 | 8,960 | py | Python | tests/test_generate_interfaces.py | silviogutierrez/react-django-rest-framework | 5734813eea0006520465a1230bd6c921ac708a47 | [
"MIT"
] | null | null | null | tests/test_generate_interfaces.py | silviogutierrez/react-django-rest-framework | 5734813eea0006520465a1230bd6c921ac708a47 | [
"MIT"
] | null | null | null | tests/test_generate_interfaces.py | silviogutierrez/react-django-rest-framework | 5734813eea0006520465a1230bd6c921ac708a47 | [
"MIT"
] | null | null | null | from django.db import models
from django.test import TestCase
from enum import IntEnum, Enum, EnumMeta
from rest_framework import serializers, renderers, generics
import json
def foo(enum):
def __iter__(self):
for index, (x, y) in enumerate(self.__members__.items()):
yield x, y.value
en... | 32.114695 | 105 | 0.57846 |
6cb756fdf96ecbb718bc68e6a38d0e48117f8c33 | 3,029 | py | Python | infra/bots/assets/mips64el_toolchain_linux/create.py | pospx/external_skia | 7a135275c9fc2a4b3cbdcf9a96e7102724752234 | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | infra/bots/assets/mips64el_toolchain_linux/create.py | pospx/external_skia | 7a135275c9fc2a4b3cbdcf9a96e7102724752234 | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | infra/bots/assets/mips64el_toolchain_linux/create.py | pospx/external_skia | 7a135275c9fc2a4b3cbdcf9a96e7102724752234 | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
#
# Copyright 2018 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Create the asset."""
import argparse
import common
import os
import shutil
import subprocess
import utils
# This is basically all the deps of g++-multilib-... | 32.923913 | 80 | 0.694289 |
226e1c889ad081b015b55477b6310a577442307b | 5,304 | py | Python | addons/account/models/res_bank.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/account/models/res_bank.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/account/models/res_bank.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from odoo import api, models, fields, _
from odoo.exceptions import UserError
class ResPartnerBank(models.Model):
_inherit = 'res.partner.bank'
def build_qr_code_url(self, amount, free_communication, structured_communication, currency, debtor_partner, qr_method=None, silent_errors=Tru... | 55.25 | 160 | 0.707579 |
bea34738c8c22445721f181e00b0fee512439d36 | 63,871 | py | Python | python/ccxt/bitvavo.py | kecheon/ccxt | 72a1d05553d2bfca659d50829726eb3e4fa1882a | [
"MIT"
] | 2 | 2022-02-09T11:06:30.000Z | 2022-02-09T11:06:34.000Z | python/ccxt/bitvavo.py | z7-btc/ccxt | e58d4b49c78a5e20a0c7187b1668fe253c59b225 | [
"MIT"
] | null | null | null | python/ccxt/bitvavo.py | z7-btc/ccxt | e58d4b49c78a5e20a0c7187b1668fe253c59b225 | [
"MIT"
] | 1 | 2022-03-15T22:47:05.000Z | 2022-03-15T22:47:05.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError
from cc... | 43.538514 | 340 | 0.49218 |
ae7b76a102cd32f972aeb65d97254684d248c6e3 | 6,006 | py | Python | software/python/simple_pendulum/trajectory_optimization/ilqr/pendulum.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 15 | 2021-10-16T04:50:34.000Z | 2022-03-26T23:54:19.000Z | software/python/simple_pendulum/trajectory_optimization/ilqr/pendulum.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 17 | 2021-11-30T22:17:28.000Z | 2022-03-21T12:28:45.000Z | software/python/simple_pendulum/trajectory_optimization/ilqr/pendulum.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 13 | 2021-10-18T07:45:29.000Z | 2022-03-22T12:56:33.000Z | """
Pendulum Dynamics
=================
"""
import numpy as np
import sympy as smp
try:
import pydrake.symbolic as sym
pydrake_available = True
except ModuleNotFoundError:
pydrake_available = False
sym = None
def check_type(x):
"""
checks the type of x and returns the suitable library
(p... | 35.329412 | 79 | 0.480186 |
e48e4982de3d0a2f1f71982ab64e440b2b524652 | 2,550 | py | Python | oscar/lib/python3.6/site-packages/pytest_cov/embed.py | bcruz97/django-oscar | df3dc1d99e70765a6c95a67f5b076644cd482852 | [
"BSD-3-Clause"
] | 1 | 2019-10-16T07:56:31.000Z | 2019-10-16T07:56:31.000Z | env/lib/python2.7/site-packages/pytest_cov/embed.py | fabzer0/FastFoodAPI | 492f0bdaaeadf12089a200a9b64bdfc22cd03d0c | [
"MIT"
] | null | null | null | env/lib/python2.7/site-packages/pytest_cov/embed.py | fabzer0/FastFoodAPI | 492f0bdaaeadf12089a200a9b64bdfc22cd03d0c | [
"MIT"
] | null | null | null | """Activate coverage at python startup if appropriate.
The python site initialisation will ensure that anything we import
will be removed and not visible at the end of python startup. However
we minimise all work by putting these init actions in this separate
module and only importing what is needed when needed.
For... | 26.020408 | 90 | 0.687059 |
f82f299d827864661ea84e171d182398f24ee70b | 8,203 | py | Python | tests/events/test_event.py | Hengle/Houdini-Toolbox | a1fd7d3dd73d3fc4cea78e29aeff1d190c41bae3 | [
"MIT"
] | 136 | 2015-01-03T04:03:23.000Z | 2022-02-07T11:08:57.000Z | tests/events/test_event.py | Hengle/Houdini-Toolbox | a1fd7d3dd73d3fc4cea78e29aeff1d190c41bae3 | [
"MIT"
] | 11 | 2017-02-09T20:05:04.000Z | 2021-01-24T22:25:59.000Z | tests/events/test_event.py | Hengle/Houdini-Toolbox | a1fd7d3dd73d3fc4cea78e29aeff1d190c41bae3 | [
"MIT"
] | 26 | 2015-08-18T12:11:02.000Z | 2020-12-19T01:53:31.000Z | """Tests for ht.events.event module."""
# =============================================================================
# IMPORTS
# =============================================================================
# Third Party
import pytest
# Houdini Toolbox
import ht.events.event
import ht.events.item
import ht.events... | 31.671815 | 86 | 0.611606 |
1698975da6e621fe6301c8c7ebd8aa35effc27b0 | 2,999 | py | Python | subviews/cesar/EncodeGui.py | rafaaseddik/Cesar-Vigenere-GUI | 3266cdbd818a7f0b92308edf2ed26371ac6ec030 | [
"MIT"
] | null | null | null | subviews/cesar/EncodeGui.py | rafaaseddik/Cesar-Vigenere-GUI | 3266cdbd818a7f0b92308edf2ed26371ac6ec030 | [
"MIT"
] | null | null | null | subviews/cesar/EncodeGui.py | rafaaseddik/Cesar-Vigenere-GUI | 3266cdbd818a7f0b92308edf2ed26371ac6ec030 | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import filedialog
from tkinter.filedialog import askopenfilename,asksaveasfilename
from PIL import Image, ImageTk
from dependencies.Cesar import *
class EncodeGui(Frame):
def __init__(self, master=None):
self.frame = Toplevel(master)
self.master = master
... | 40.527027 | 171 | 0.622207 |
49a40a9f7c3c3b10ce6e0e8daa1ea86a586dae4f | 320 | py | Python | SC/Twitter/models.py | lendoly/djangoF1 | 6fd089e9812648dbe3637816c87c858fba9a21ca | [
"Apache-2.0"
] | null | null | null | SC/Twitter/models.py | lendoly/djangoF1 | 6fd089e9812648dbe3637816c87c858fba9a21ca | [
"Apache-2.0"
] | null | null | null | SC/Twitter/models.py | lendoly/djangoF1 | 6fd089e9812648dbe3637816c87c858fba9a21ca | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class UsuarioTwitter (models.Model):
user = models.ForeignKey(User)
id_twitter = models.IntegerField()
token = models.TextField()
token_secret = models.TextField()
screen_name = models.TextField()
| 24.615385 | 43 | 0.7375 |
e3a5a18186225bd1d53deb011d06c2a14e9eb64b | 5,724 | py | Python | a10_octavia/controller/worker/flows/a10_l7rule_flows.py | richuc/a10-octavia | dddb3e4695c38cbb72ecf7f99a8e746869590ae2 | [
"Apache-2.0"
] | null | null | null | a10_octavia/controller/worker/flows/a10_l7rule_flows.py | richuc/a10-octavia | dddb3e4695c38cbb72ecf7f99a8e746869590ae2 | [
"Apache-2.0"
] | null | null | null | a10_octavia/controller/worker/flows/a10_l7rule_flows.py | richuc/a10-octavia | dddb3e4695c38cbb72ecf7f99a8e746869590ae2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, A10 Networks
#
# 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 a... | 45.792 | 85 | 0.726939 |
23321cc70c444d7fa7f31029a83c1132c1588949 | 831 | py | Python | plotly/validators/sankey/link/_line.py | fcollonval/plotly.py | 5c7f100db1af8c82bb740a38ef684955a8ed6d0e | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/sankey/link/_line.py | fcollonval/plotly.py | 5c7f100db1af8c82bb740a38ef684955a8ed6d0e | [
"MIT"
] | null | null | null | plotly/validators/sankey/link/_line.py | fcollonval/plotly.py | 5c7f100db1af8c82bb740a38ef684955a8ed6d0e | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class LineValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name='line', parent_name='sankey.link', **kwargs
):
super(LineValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name... | 28.655172 | 69 | 0.523466 |
acd5f557e7ba06cb02ede79bbbc618da81f144b1 | 948 | py | Python | util/validate_phone.py | jstjyoti/covid_assistance | 1261c633125270c6752a23a1cca62d91f6090ac3 | [
"MIT"
] | 1 | 2020-03-24T18:45:35.000Z | 2020-03-24T18:45:35.000Z | util/validate_phone.py | jstjyoti/covid_assistance | 1261c633125270c6752a23a1cca62d91f6090ac3 | [
"MIT"
] | 1 | 2020-03-27T14:05:03.000Z | 2020-03-27T16:13:43.000Z | util/validate_phone.py | jstjyoti/covid_assistance | 1261c633125270c6752a23a1cca62d91f6090ac3 | [
"MIT"
] | 4 | 2020-03-24T18:20:11.000Z | 2020-05-05T09:17:15.000Z | from read_sheet import get_sheet
import time
otp_index=3
time_index=1
number_index=2
# above in the sheet
# in code subtract 1
def validate_phone(user_phone,user_given_otp):
# correct_otp = get_otp(user_phone)
# check if the user number exists in the list
sheetname="OTP_Record"
status,sheet=get_sheet(she... | 18.96 | 49 | 0.701477 |
4498f1acc957fe3f7536aae20b23d5609e89d8b4 | 667 | py | Python | Q7.py | Naro-Usmany/CP19_38 | 7a20cd2b8998552c7598f58b936375602158bc9c | [
"MIT"
] | null | null | null | Q7.py | Naro-Usmany/CP19_38 | 7a20cd2b8998552c7598f58b936375602158bc9c | [
"MIT"
] | null | null | null | Q7.py | Naro-Usmany/CP19_38 | 7a20cd2b8998552c7598f58b936375602158bc9c | [
"MIT"
] | null | null | null | # Question No 7
test1=int(input("Enter Your Score For Test 1: "))
test2=int(input("Enter Your Score For Test 2: "))
Mainexam=int(input("Enter Your Score For The Main Exam: "))
Total_score=test1+test2+Mainexam
if test1>25 or test1<0:
print("Invalid Score")
elif test2>25 or test2<0:
print("Inval... | 21.516129 | 60 | 0.646177 |
1be51079275fa818d53dd29fabc41f8fb4e385fc | 498 | py | Python | scavenger/routes.py | Gulats/scavenger | ba8a712a60ae9f4f4ebdbc8111369c9a5954aa05 | [
"MIT"
] | null | null | null | scavenger/routes.py | Gulats/scavenger | ba8a712a60ae9f4f4ebdbc8111369c9a5954aa05 | [
"MIT"
] | null | null | null | scavenger/routes.py | Gulats/scavenger | ba8a712a60ae9f4f4ebdbc8111369c9a5954aa05 | [
"MIT"
] | null | null | null | from aiohttp import web
from scavenger.api import apps, scraper
routes = [
# apps services
web.get('/apps', apps.apps),
web.get('/apps/{app_id}/detail', apps.detail),
web.get('/apps/{app_id}/similar', apps.similar),
# scraper services
web.post('/scraper/{pid}', scraper.flush),
web.get('/scraper/{pid}', scraper... | 29.294118 | 49 | 0.684739 |
e756609e97af5cd5569f1b87d8cbc6f54867225d | 477 | py | Python | reporting/migrations/0003_event_category.py | goncalopalaio/event-server | 4a1c53c1f244037fbab6e23003a047d35678e271 | [
"MIT"
] | null | null | null | reporting/migrations/0003_event_category.py | goncalopalaio/event-server | 4a1c53c1f244037fbab6e23003a047d35678e271 | [
"MIT"
] | null | null | null | reporting/migrations/0003_event_category.py | goncalopalaio/event-server | 4a1c53c1f244037fbab6e23003a047d35678e271 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.4 on 2018-05-01 02:21
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('reporting', '0002_category'),
]
operations = [
migrations.AddField(
model_name='event',
... | 23.85 | 117 | 0.637317 |
791c207ed7028fa54f2d75337cd98b5870a2f6f5 | 5,614 | py | Python | intersight/models/boot_local_cdd_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | intersight/models/boot_local_cdd_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | intersight/models/boot_local_cdd_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight OpenAPI specification.
The Cisco Intersight OpenAPI specification.
OpenAPI spec version: 1.0.9-1461
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class BootLocalCddRef(o... | 30.846154 | 576 | 0.599394 |
2b8e74628a9bbc73f9541d1b19123a1e67cc2114 | 333 | py | Python | core/tf_pose/pafprocess/setup.py | kmh4321/MAX-Human-Pose-Estimator | 68adc9220dde1cc15f5b6552a2934bc5f0d74e12 | [
"Apache-2.0"
] | 63 | 2018-12-05T20:15:04.000Z | 2021-12-08T11:49:41.000Z | core/tf_pose/pafprocess/setup.py | kmh4321/MAX-Human-Pose-Estimator | 68adc9220dde1cc15f5b6552a2934bc5f0d74e12 | [
"Apache-2.0"
] | 20 | 2018-12-06T15:59:53.000Z | 2022-02-10T00:07:40.000Z | core/tf_pose/pafprocess/setup.py | kmh4321/MAX-Human-Pose-Estimator | 68adc9220dde1cc15f5b6552a2934bc5f0d74e12 | [
"Apache-2.0"
] | 23 | 2018-12-14T05:10:37.000Z | 2021-09-24T03:38:16.000Z | from distutils.core import setup, Extension
import numpy
setup(name='pafprocess_ext', version='1.0',
ext_modules=[Extension('_pafprocess', ['pafprocess.cpp', 'pafprocess.i'], swig_opts=['-c++'],
depends=["pafprocess.h"], include_dirs=[numpy.get_include(), '.'])],
py_modules=["p... | 41.625 | 99 | 0.633634 |
e4e5090cf94af7c72be64f057bcd6d9b3b3aabbc | 4,176 | py | Python | test/filters/test_blur_pool.py | ChristophReich1996/kornia | 35f955b46e8015da1cb9faa28c6943ec2b09cc2a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/filters/test_blur_pool.py | ChristophReich1996/kornia | 35f955b46e8015da1cb9faa28c6943ec2b09cc2a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/filters/test_blur_pool.py | ChristophReich1996/kornia | 35f955b46e8015da1cb9faa28c6943ec2b09cc2a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import pytest
import torch
from torch.autograd import gradcheck
from torch.testing import assert_allclose
import kornia
import kornia.testing as utils # test utils
class TestMaxBlurPool:
@pytest.mark.parametrize("ceil_mode", [True, False])
def test_shape(self, ceil_mode, device, dtype):
inp = torch... | 36 | 92 | 0.632423 |
0cf5e8148185f0800f104e9d37660bb3cbf5de2a | 7,909 | py | Python | namd_xtb.py | fhh2626/NAMD-xtb-QMMM-interface | 81aaac97791ffd6d7baaa162ab3d31684fe986bf | [
"MIT"
] | 5 | 2018-01-10T20:59:42.000Z | 2021-08-23T12:49:50.000Z | namd_xtb.py | fhh2626/NAMD-xtb-QMMM-interface | 81aaac97791ffd6d7baaa162ab3d31684fe986bf | [
"MIT"
] | null | null | null | namd_xtb.py | fhh2626/NAMD-xtb-QMMM-interface | 81aaac97791ffd6d7baaa162ab3d31684fe986bf | [
"MIT"
] | 4 | 2019-03-15T14:55:54.000Z | 2020-03-05T03:34:38.000Z | #!/usr/bin/python3
"""
NAMD-xtb interface v0.11 beta
by Haohao Fu
fhh2626_at_gmail.com
"""
"""
Readme:
this script enables NAMD-xtb QM/MM simulation and non-periodic
semi-emperial BOMD.
Electrostatic embedding was implemented. GFN-xtb hamiltonian
is used by default. If one wants to use othe... | 38.580488 | 107 | 0.56265 |
5808158fba643e7fbafb6ce137e5da0eba398588 | 16,988 | py | Python | pyscripts/train/train_stanford_scenes.py | Twofyw/Adversarial_Structure_Matching | e2941f6833f376f2113b25cc4742dfb1c8f1a13a | [
"MIT"
] | null | null | null | pyscripts/train/train_stanford_scenes.py | Twofyw/Adversarial_Structure_Matching | e2941f6833f376f2113b25cc4742dfb1c8f1a13a | [
"MIT"
] | null | null | null | pyscripts/train/train_stanford_scenes.py | Twofyw/Adversarial_Structure_Matching | e2941f6833f376f2113b25cc4742dfb1c8f1a13a | [
"MIT"
] | null | null | null | """Training scripts for iid structured predictor on 2D3DS dataset.
"""
import argparse
import os
import time
import tensorflow as tf
import numpy as np
from tqdm import tqdm
import sys,os
sys.path.append(os.getcwd())
from stanford_scenes.models.structured_predictor import structured_predictor
from stanford_scenes.ima... | 40.447619 | 81 | 0.61461 |
e6192eada67f9009632bff2b2486c5e19b47b088 | 811 | py | Python | lib/nms/build.py | koba35/retinanet | 99820cde438a2fc14e38973437766de6fe6a94a3 | [
"Apache-2.0"
] | 203 | 2018-09-23T04:46:05.000Z | 2021-12-03T13:47:17.000Z | lib/nms/build.py | koba35/retinanet | 99820cde438a2fc14e38973437766de6fe6a94a3 | [
"Apache-2.0"
] | 31 | 2018-10-11T09:28:42.000Z | 2020-10-30T07:24:49.000Z | lib/nms/build.py | koba35/retinanet | 99820cde438a2fc14e38973437766de6fe6a94a3 | [
"Apache-2.0"
] | 34 | 2018-09-23T18:41:29.000Z | 2021-09-17T07:33:04.000Z | import os
import torch
from torch.utils.ffi import create_extension
sources = ['src/nms.c']
headers = ['src/nms.h']
defines = []
with_cuda = False
if torch.cuda.is_available():
print('Including CUDA code.')
sources += ['src/nms_cuda.c']
headers += ['src/nms_cuda.h']
defines += [('WITH_CUDA', None)]
... | 22.527778 | 75 | 0.691739 |
f6bd95dd79a1fbfa7da3c651c88be16dc555fa0f | 341 | py | Python | networkx/algorithms/shortest_paths/__init__.py | federicopasqui/networkx | bdc41c466e20da41f83ea34e19d184843b0e9bef | [
"BSD-3-Clause"
] | null | null | null | networkx/algorithms/shortest_paths/__init__.py | federicopasqui/networkx | bdc41c466e20da41f83ea34e19d184843b0e9bef | [
"BSD-3-Clause"
] | null | null | null | networkx/algorithms/shortest_paths/__init__.py | federicopasqui/networkx | bdc41c466e20da41f83ea34e19d184843b0e9bef | [
"BSD-3-Clause"
] | null | null | null | from networkx.algorithms.shortest_paths.generic import *
from networkx.algorithms.shortest_paths.unweighted import *
from networkx.algorithms.shortest_paths.weighted import *
from networkx.algorithms.shortest_paths.astar import *
from networkx.algorithms.shortest_paths.dense import *
from networkx.algorithms.shortest_p... | 48.714286 | 59 | 0.859238 |
908192920580a5d01d9462c69f66b4a7c5617c75 | 2,401 | py | Python | src/duckie_bot/cars/rpi_car.py | gregjhansell97/DuckieBot | 2ed1f1579431b96ed18e062e57cf1675ef515295 | [
"MIT"
] | null | null | null | src/duckie_bot/cars/rpi_car.py | gregjhansell97/DuckieBot | 2ed1f1579431b96ed18e062e57cf1675ef515295 | [
"MIT"
] | 6 | 2019-01-02T02:10:36.000Z | 2019-01-07T20:59:13.000Z | src/duckie_bot/cars/rpi_car.py | gregjhansell97/DuckieBot | 2ed1f1579431b96ed18e062e57cf1675ef515295 | [
"MIT"
] | null | null | null | try:
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor
except ImportError:
pass
import time
import atexit
from duckie_bot.cars.car import Car
#unicycle model
class RPiCar(Car):
'''
Controls the speed of the car based on desired tangential and rotational speed.
Motors are ramped ra... | 37.515625 | 111 | 0.670554 |
023e906ed6427421c8c038f55c15b2c994a0944f | 1,816 | py | Python | App BLX/src/infra/providers/token_provider.py | matheusduarte96/APP-BLX | efdb8475e944be33d246dccb0adeb238a46b20c3 | [
"MIT"
] | null | null | null | App BLX/src/infra/providers/token_provider.py | matheusduarte96/APP-BLX | efdb8475e944be33d246dccb0adeb238a46b20c3 | [
"MIT"
] | null | null | null | App BLX/src/infra/providers/token_provider.py | matheusduarte96/APP-BLX | efdb8475e944be33d246dccb0adeb238a46b20c3 | [
"MIT"
] | null | null | null | #Define a validade, fazendo operações com datas.
from datetime import datetime, timedelta
#Serve para gerar e verificar o JWT token.
from jose import jwt
#CONFIG
SECRET_KEY = 'caa9c8f8620cbb30679026bb6427e11f'
ALGORITHM = 'HS256'
#Validade do token é 3000 minutos.
EXPIRES_IN_MIN = 3000 ... | 41.272727 | 154 | 0.741189 |
ef31973c2e3b47d531010927292479b243c218e4 | 9,173 | py | Python | venv/Lib/site-packages/gevent/_semaphore.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | 6 | 2020-08-04T13:12:42.000Z | 2020-08-16T13:26:19.000Z | venv/Lib/site-packages/gevent/_semaphore.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/gevent/_semaphore.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | null | null | null | # cython: auto_pickle=False,embedsignature=True,always_allow_keywords=False
###
# This file is ``gevent._semaphore`` so that it can be compiled by Cython
# individually. However, this is not the place to import from. Everyone,
# gevent internal code included, must import from ``gevent.lock``.
# The only exception are .... | 37.288618 | 98 | 0.660962 |
d37725c1c4cb680c1b397550e68dfeb18973efd4 | 3,127 | py | Python | python/kserve/test/test_v1beta1_tf_serving_spec.py | ittus/kserve | 922a9b7e8a9a86b5ae65faf4ce863927873fd456 | [
"Apache-2.0"
] | 1,146 | 2019-03-27T21:14:34.000Z | 2021-09-22T08:36:46.000Z | python/kserve/test/test_v1beta1_tf_serving_spec.py | ittus/kserve | 922a9b7e8a9a86b5ae65faf4ce863927873fd456 | [
"Apache-2.0"
] | 1,803 | 2019-03-27T22:16:02.000Z | 2021-09-22T15:27:44.000Z | python/kserve/test/test_v1beta1_tf_serving_spec.py | ittus/kserve | 922a9b7e8a9a86b5ae65faf4ce863927873fd456 | [
"Apache-2.0"
] | 573 | 2019-03-27T21:14:58.000Z | 2021-09-20T21:15:52.000Z | # Copyright 2021 The KServe Authors.
#
# 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 wr... | 29.780952 | 92 | 0.541733 |
821e66b5c8f9bfe07881cfa40922ee1e99cf83be | 1,754 | py | Python | tests/test_modules/test_demo/test_scantickerpart.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_demo/test_scantickerpart.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_demo/test_scantickerpart.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | import unittest
from mock import MagicMock, call
from scanpointgenerator import LineGenerator, CompoundGenerator
from malcolm.modules.demo.parts import ScanTickerPart
from malcolm.core import Context, PartRegistrar
class AlmostFloat(object):
def __init__(self, val, delta):
self.val = val
self.de... | 33.730769 | 74 | 0.647662 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.