hexsha stringlengths 40 40 | size int64 2 1.02M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 245 | max_stars_repo_name stringlengths 6 130 | 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 245 | max_issues_repo_name stringlengths 6 130 | 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 245 | max_forks_repo_name stringlengths 6 130 | 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 2 1.02M | avg_line_length float64 1 958k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c447439820c7450726bb3a1955016d4b5b8390e | 7,579 | py | Python | homeassistant/components/scrape/sensor.py | mib1185/core | b17d4ac65cde9a27ff6032d70b148792e5eba8df | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/scrape/sensor.py | mib1185/core | b17d4ac65cde9a27ff6032d70b148792e5eba8df | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/scrape/sensor.py | mib1185/core | b17d4ac65cde9a27ff6032d70b148792e5eba8df | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Support for getting data from websites with scraping."""
from __future__ import annotations
import logging
from typing import Any
from bs4 import BeautifulSoup
import voluptuous as vol
from homeassistant.components.rest.data import RestData
from homeassistant.components.sensor import (
CONF_STATE_CLASS,
D... | 33.535398 | 89 | 0.65312 | from __future__ import annotations
import logging
from typing import Any
from bs4 import BeautifulSoup
import voluptuous as vol
from homeassistant.components.rest.data import RestData
from homeassistant.components.sensor import (
CONF_STATE_CLASS,
DEVICE_CLASSES_SCHEMA,
PLATFORM_SCHEMA as PARENT_PLATFORM... | true | true |
1c44747e85ccb4efd346c533db7efda9c279aaae | 142 | py | Python | python-pyqt/Section02/finplot_mod/01.py | sharebook-kr/learningspoons-bootcamp-finance | 0288f3f3b39f54420e4e9987f1de12892dc680ea | [
"MIT"
] | 9 | 2020-10-25T15:13:32.000Z | 2022-03-26T11:27:21.000Z | python-pyqt/Section02/finplot_mod/01.py | sharebook-kr/learningspoons-bootcamp-finance | 0288f3f3b39f54420e4e9987f1de12892dc680ea | [
"MIT"
] | null | null | null | python-pyqt/Section02/finplot_mod/01.py | sharebook-kr/learningspoons-bootcamp-finance | 0288f3f3b39f54420e4e9987f1de12892dc680ea | [
"MIT"
] | 7 | 2021-03-01T11:06:45.000Z | 2022-03-14T07:06:04.000Z | import finplot as fplt
import yfinance
df = yfinance.download('AAPL')
fplt.candlestick_ochl(df[['Open', 'Close', 'High', 'Low']])
fplt.show() | 23.666667 | 59 | 0.711268 | import finplot as fplt
import yfinance
df = yfinance.download('AAPL')
fplt.candlestick_ochl(df[['Open', 'Close', 'High', 'Low']])
fplt.show() | true | true |
1c44752cff7dde1bc65d8065a410394ce0f2c6ff | 3,306 | py | Python | code/spatial_embedding.py | guangyizhangbci/EEG_Riemannian | 2d301bf3d06a192da2829c1c54b24d388ddea1dd | [
"MIT"
] | 12 | 2022-02-22T17:15:04.000Z | 2022-03-19T11:41:15.000Z | code/spatial_embedding.py | guangyizhangbci/RFNet | 2d301bf3d06a192da2829c1c54b24d388ddea1dd | [
"MIT"
] | null | null | null | code/spatial_embedding.py | guangyizhangbci/RFNet | 2d301bf3d06a192da2829c1c54b24d388ddea1dd | [
"MIT"
] | null | null | null | from __future__ import print_function, division
import numpy as np
from sklearn.preprocessing import StandardScaler
import pyriemann
from pyriemann.estimation import Covariances
from library.spfiltering import ProjCommonSpace
from library.featuring import Riemann
class spatial_features():
def __init__(self, conf... | 34.8 | 158 | 0.645796 | from __future__ import print_function, division
import numpy as np
from sklearn.preprocessing import StandardScaler
import pyriemann
from pyriemann.estimation import Covariances
from library.spfiltering import ProjCommonSpace
from library.featuring import Riemann
class spatial_features():
def __init__(self, conf... | true | true |
1c4475e321d4980d398c6000935266e034bebe6a | 18,502 | py | Python | data/ntu/get_raw_denoised_data.py | mhrah7495/View-Adaptive-Neural-Networks-for-Skeleton-based-Human-Action-Recognition | 4b91b79dff7363010300ef5fb1564a57a65ea7cf | [
"MIT"
] | 111 | 2019-09-19T08:07:17.000Z | 2022-03-09T07:19:07.000Z | data/ntu/get_raw_denoised_data.py | Jagadish-Kumaran/View-Adaptive-Neural-Networks-for-Skeleton-based-Human-Action-Recognition | b2113aa6295d7292516d5a74582b619d775a5b3d | [
"MIT"
] | 14 | 2019-10-18T08:45:42.000Z | 2021-11-04T06:38:40.000Z | data/ntu/get_raw_denoised_data.py | Jagadish-Kumaran/View-Adaptive-Neural-Networks-for-Skeleton-based-Human-Action-Recognition | b2113aa6295d7292516d5a74582b619d775a5b3d | [
"MIT"
] | 52 | 2019-09-18T11:54:47.000Z | 2022-01-17T09:12:19.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
import os.path as osp
import numpy as np
import pickle
import logging
root_path = './'
raw_data_file = osp.join(root_path, 'raw_data', 'raw_skes_data.pkl')
save_path = osp.join(root_path, 'denoised_data')
if not os... | 42.242009 | 101 | 0.649822 |
import os
import os.path as osp
import numpy as np
import pickle
import logging
root_path = './'
raw_data_file = osp.join(root_path, 'raw_data', 'raw_skes_data.pkl')
save_path = osp.join(root_path, 'denoised_data')
if not osp.exists(save_path):
os.mkdir(save_path)
rgb_ske_path = osp.join(save_path, 'rgb+ske')
... | true | true |
1c4475fc251df59a1ea19899348e75bfc2eaad85 | 2,340 | py | Python | pythonclubproject/club/tests.py | elb-dev/ITC-172 | df7acdad309c44cfd3b7580132d28d2d7b9713c4 | [
"Apache-2.0"
] | null | null | null | pythonclubproject/club/tests.py | elb-dev/ITC-172 | df7acdad309c44cfd3b7580132d28d2d7b9713c4 | [
"Apache-2.0"
] | null | null | null | pythonclubproject/club/tests.py | elb-dev/ITC-172 | df7acdad309c44cfd3b7580132d28d2d7b9713c4 | [
"Apache-2.0"
] | null | null | null | from django.test import TestCase
from .models import Meeting, MeetingMinutes, Resource, Event
from django.urls import reverse
# Create your tests here.
class MeetingTest(TestCase):
def test_stringOutput(self):
meeting = Meeting(meetingtitle = 'Test Meeting Title')
self.assertEqual(str(meeting), mee... | 41.052632 | 71 | 0.723077 | from django.test import TestCase
from .models import Meeting, MeetingMinutes, Resource, Event
from django.urls import reverse
class MeetingTest(TestCase):
def test_stringOutput(self):
meeting = Meeting(meetingtitle = 'Test Meeting Title')
self.assertEqual(str(meeting), meeting.meetingtitle)
de... | true | true |
1c447619baa04676cb0b078af9721d81d9d35a55 | 3,654 | py | Python | sitch/tests/integration/test_integration_cgi_correlator.py | codecuisine/sensor | 06fb0908178af1ab673b95e7f435b873cc62e61b | [
"ECL-2.0",
"Apache-2.0",
"BSD-2-Clause"
] | 68 | 2016-08-08T17:28:59.000Z | 2021-11-26T09:31:52.000Z | sitch/tests/integration/test_integration_cgi_correlator.py | codecuisine/sensor | 06fb0908178af1ab673b95e7f435b873cc62e61b | [
"ECL-2.0",
"Apache-2.0",
"BSD-2-Clause"
] | 61 | 2016-08-20T21:01:01.000Z | 2020-07-22T06:10:45.000Z | sitch/tests/integration/test_integration_cgi_correlator.py | codecuisine/sensor | 06fb0908178af1ab673b95e7f435b873cc62e61b | [
"ECL-2.0",
"Apache-2.0",
"BSD-2-Clause"
] | 40 | 2017-01-28T23:06:22.000Z | 2021-08-13T15:09:43.000Z | import imp
import os
modulename = 'sitchlib'
modulepath = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"../../")
feedpath = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"../fixture/feed/")
file, pathname, description = imp.find_module(modulenam... | 38.0625 | 77 | 0.522167 | import imp
import os
modulename = 'sitchlib'
modulepath = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"../../")
feedpath = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"../fixture/feed/")
file, pathname, description = imp.find_module(modulenam... | false | true |
1c44766d9a91f957d9c525b9dbed78e8c36349e9 | 4,029 | py | Python | skactiveml/pool/tests/test_discriminative_al.py | LukasLuehrs/scikit-activeml | 04d7107272ef0438070808475599131d8726f547 | [
"BSD-3-Clause"
] | null | null | null | skactiveml/pool/tests/test_discriminative_al.py | LukasLuehrs/scikit-activeml | 04d7107272ef0438070808475599131d8726f547 | [
"BSD-3-Clause"
] | null | null | null | skactiveml/pool/tests/test_discriminative_al.py | LukasLuehrs/scikit-activeml | 04d7107272ef0438070808475599131d8726f547 | [
"BSD-3-Clause"
] | null | null | null | import unittest
import numpy as np
from sklearn.datasets import load_breast_cancer
from sklearn.gaussian_process import GaussianProcessClassifier
from sklearn.preprocessing import StandardScaler
from skactiveml.classifier import ParzenWindowClassifier
from skactiveml.pool import DiscriminativeAL
class TestDiscrimin... | 39.116505 | 77 | 0.518739 | import unittest
import numpy as np
from sklearn.datasets import load_breast_cancer
from sklearn.gaussian_process import GaussianProcessClassifier
from sklearn.preprocessing import StandardScaler
from skactiveml.classifier import ParzenWindowClassifier
from skactiveml.pool import DiscriminativeAL
class TestDiscrimin... | true | true |
1c4476a7a8651046cc68c24e7902545fbb45d44e | 9,207 | py | Python | src/ea/libs/FileModels/TestResult.py | dmachard/extensivetesting | a5c3d2648aebcfaf1d0352a7aff8728ab843b73f | [
"MIT"
] | 9 | 2019-09-01T04:56:28.000Z | 2021-04-08T19:45:52.000Z | src/ea/libs/FileModels/TestResult.py | dmachard/extensivetesting | a5c3d2648aebcfaf1d0352a7aff8728ab843b73f | [
"MIT"
] | 5 | 2020-10-27T15:05:12.000Z | 2021-12-13T13:48:11.000Z | src/ea/libs/FileModels/TestResult.py | dmachard/extensivetesting | a5c3d2648aebcfaf1d0352a7aff8728ab843b73f | [
"MIT"
] | 2 | 2019-10-01T06:12:06.000Z | 2020-04-29T13:28:20.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------
# Copyright (c) 2010-2021 Denis Machard
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# ... | 31.530822 | 84 | 0.528185 |
import sys
import zlib
import base64
import re
from ea.libs import Logger
from ea.libs.PyXmlDict import Dict2Xml as PyDictXml
from ea.libs.PyXmlDict import Xml2Dict as PyXmlDict
if sys.version_info > (3,):
unicode = str
r = re.compile(
u"[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\xFF\u0100-... | true | true |
1c4477483962ec1dcb79e2cdf6424d5181cb6433 | 5,514 | py | Python | contrib/seeds/makeseeds.py | masternodecoin/Masternodecoin-NEW | 2c1e745dc371268af8b21a9b1b1ef99f1e31f059 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | masternodecoin/Masternodecoin-NEW | 2c1e745dc371268af8b21a9b1b1ef99f1e31f059 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | masternodecoin/Masternodecoin-NEW | 2c1e745dc371268af8b21a9b1b1ef99f1e31f059 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2013-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 615801
#... | 32.05814 | 186 | 0.566921 |
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 615801
# These are hosts that have been observed to be behaving strangely (e.g.
# aggressively connecting to every node).
SUSPICIOUS_HOSTS = {
""
}
import re
import sys
import dns.resolver
import collections
PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})... | true | true |
1c447808e077aaa4205e3b4d55649bde5820daca | 1,533 | py | Python | venv/Lib/site-packages/statsmodels/emplike/tests/test_aft.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 76 | 2019-12-28T08:37:10.000Z | 2022-03-29T02:19:41.000Z | venv/Lib/site-packages/statsmodels/emplike/tests/test_aft.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 7 | 2020-12-04T04:10:42.000Z | 2021-03-16T00:53:09.000Z | venv/Lib/site-packages/statsmodels/emplike/tests/test_aft.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 35 | 2020-02-04T14:46:25.000Z | 2022-03-24T03:56:17.000Z | import numpy as np
from numpy.testing import assert_almost_equal
import pytest
from statsmodels.datasets import heart
from statsmodels.tools import add_constant
from statsmodels.emplike.aft_el import emplikeAFT
from .results.el_results import AFTRes
class GenRes(object):
@classmethod
def setup_class(cls):
... | 31.285714 | 70 | 0.622309 | import numpy as np
from numpy.testing import assert_almost_equal
import pytest
from statsmodels.datasets import heart
from statsmodels.tools import add_constant
from statsmodels.emplike.aft_el import emplikeAFT
from .results.el_results import AFTRes
class GenRes(object):
@classmethod
def setup_class(cls):
... | true | true |
1c44780d3720b0a7ebaf9faf8a7f24a94a06d947 | 37,598 | py | Python | tests/backends/aiida_django/migrations/test_migrations_many.py | louisponet/aiida-core | 3214236df66a3792ee57fe38a06c0c3bb65861ab | [
"MIT",
"BSD-3-Clause"
] | null | null | null | tests/backends/aiida_django/migrations/test_migrations_many.py | louisponet/aiida-core | 3214236df66a3792ee57fe38a06c0c3bb65861ab | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-07-14T07:59:44.000Z | 2021-08-01T10:31:09.000Z | tests/backends/aiida_django/migrations/test_migrations_many.py | louisponet/aiida-core | 3214236df66a3792ee57fe38a06c0c3bb65861ab | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 44.653207 | 120 | 0.655088 |
g_update(self):
DbGroup = self.apps.get_model('db', 'DbGroup')
group_user = DbGroup.objects.get(pk=self.group_user_pk)
self.assertEqual(group_user.type_string, 'user')
group_data_upf = DbGroup.objects.get(pk=self.group_data_upf_pk)
self.assertEqual(group_data... | true | true |
1c4478138375cda3bf6bd2ae41a6f112bb318389 | 3,278 | py | Python | email_auth/models.py | vaibhavantil2/django-shop | 10d82a0ae9096f501b90ad9fd585a378c789ee51 | [
"BSD-3-Clause"
] | null | null | null | email_auth/models.py | vaibhavantil2/django-shop | 10d82a0ae9096f501b90ad9fd585a378c789ee51 | [
"BSD-3-Clause"
] | null | null | null | email_auth/models.py | vaibhavantil2/django-shop | 10d82a0ae9096f501b90ad9fd585a378c789ee51 | [
"BSD-3-Clause"
] | 3 | 2021-11-16T12:28:49.000Z | 2021-12-22T06:55:30.000Z | """
Alternative implementation of Django's authentication User model, which allows to authenticate
against the email field in addition to the username fields.
This alternative implementation is activated by setting ``AUTH_USER_MODEL = 'shop.User'`` in
settings.py, otherwise the default Django or another customized impl... | 40.469136 | 112 | 0.672971 | from django.contrib.auth import get_user_model
from django.contrib.auth.models import AbstractUser, UserManager as BaseUserManager
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
class UserManager(BaseUserManager):
def get_by_natural_key(self, username):
... | true | true |
1c447889e46bd8bd1a68d4e798cf6caad0b6017a | 2,433 | py | Python | log_casp_act/run_model_377.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_casp_act/run_model_377.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_casp_act/run_model_377.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null |
import numpy as np
from math import *
import pymultinest
import sys
sys.path.insert(0, '/home/kochenma/pysb')
from pysb.integrate import Solver
import csv
import datetime
import time as tm
from model_377 import model
from pysb.pathfinder import set_path
set_path('bng', '/home/kochenma/BioNetGen')
data_object = []
wi... | 25.610526 | 237 | 0.671599 |
import numpy as np
from math import *
import pymultinest
import sys
sys.path.insert(0, '/home/kochenma/pysb')
from pysb.integrate import Solver
import csv
import datetime
import time as tm
from model_377 import model
from pysb.pathfinder import set_path
set_path('bng', '/home/kochenma/BioNetGen')
data_object = []
wi... | false | true |
1c4478af5b4323e7f53c00718f04e2f863c49e2b | 857 | py | Python | server/services/service_alert_notification.py | Hamoudi96/Pick_Up | 48503fb1c582d85ae0b791052a17171ea8194e79 | [
"MIT"
] | null | null | null | server/services/service_alert_notification.py | Hamoudi96/Pick_Up | 48503fb1c582d85ae0b791052a17171ea8194e79 | [
"MIT"
] | null | null | null | server/services/service_alert_notification.py | Hamoudi96/Pick_Up | 48503fb1c582d85ae0b791052a17171ea8194e79 | [
"MIT"
] | null | null | null | from ibmcloudenv import IBMCloudEnv
import requests
class Alert:
def __init__(self, url, user, password):
self.url = url
self.user = user
self.password = password
self.auth = (user, password)
def sendAlert(self, payload):
res = requests.post(self.url, auth=self.auth, json=payload)
response = res.json()
... | 27.645161 | 70 | 0.725788 | from ibmcloudenv import IBMCloudEnv
import requests
class Alert:
def __init__(self, url, user, password):
self.url = url
self.user = user
self.password = password
self.auth = (user, password)
def sendAlert(self, payload):
res = requests.post(self.url, auth=self.auth, json=payload)
response = res.json()
... | false | true |
1c4478cf27279c1b3b6d9d53a0f12f63325505c6 | 711 | py | Python | stubs/micropython-v1_12-esp32/urandom.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_12-esp32/urandom.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_12-esp32/urandom.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | """
Module: 'urandom' on micropython-v1.12-esp32
"""
# MCU: {'ver': 'v1.12', 'port': 'esp32', 'arch': 'xtensawin', 'sysname': 'esp32', 'release': '1.12.0', 'name': 'micropython', 'mpy': 10757, 'version': '1.12.0', 'machine': 'ESP32 module (spiram) with ESP32', 'build': '', 'nodename': 'esp32', 'platform': 'esp32', 'fam... | 20.314286 | 287 | 0.556962 |
from typing import Any
def choice(*args, **kwargs) -> Any:
...
def getrandbits(*args, **kwargs) -> Any:
...
def randint(*args, **kwargs) -> Any:
...
def random(*args, **kwargs) -> Any:
...
def randrange(*args, **kwargs) -> Any:
...
def seed(*args, **kwargs) -> Any:
...
def unifor... | true | true |
1c4478e8f37c4dcc3ce6658c1bbadfe574f5833e | 597 | py | Python | Ch_7_Mangle Data Like a Pro/demo_of_re_findall.py | brianchiang-tw/Introducing_Python | 557fcddb6329741a177d6ee1d24122b36e106235 | [
"MIT"
] | 1 | 2020-07-21T08:34:08.000Z | 2020-07-21T08:34:08.000Z | Ch_7_Mangle Data Like a Pro/demo_of_re_findall.py | brianchiang-tw/Introducing_Python | 557fcddb6329741a177d6ee1d24122b36e106235 | [
"MIT"
] | null | null | null | Ch_7_Mangle Data Like a Pro/demo_of_re_findall.py | brianchiang-tw/Introducing_Python | 557fcddb6329741a177d6ee1d24122b36e106235 | [
"MIT"
] | null | null | null | import re
source = 'Young Frankenstein'
m = re.findall('n', source)
if m:
# Found 4 matches
# ['n', 'n', 'n', 'n']
print(f'Found {len(m)} matches')
print( m )
# ---------------------------------
source = 'Young Frankenstein'
m = re.findall('n.', source)
if m:
# Found 3 matches
# ['ng', 'nk'... | 18.65625 | 36 | 0.463987 | import re
source = 'Young Frankenstein'
m = re.findall('n', source)
if m:
print(f'Found {len(m)} matches')
print( m )
source = 'Young Frankenstein'
m = re.findall('n.', source)
if m:
print(f'Found {len(m)} matches')
print( m )
source = 'Young Frankenstein'
m = re.findall('n.... | true | true |
1c4479a1081509e9c8cd3fe5ea7ce84bc8532189 | 6,919 | py | Python | test/drivers/gaussiand/test_driver_gaussian_log.py | divshacker/qiskit-nature | 08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb | [
"Apache-2.0"
] | 1 | 2021-06-20T15:31:01.000Z | 2021-06-20T15:31:01.000Z | test/drivers/gaussiand/test_driver_gaussian_log.py | divshacker/qiskit-nature | 08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb | [
"Apache-2.0"
] | 1 | 2021-08-25T13:31:41.000Z | 2021-08-25T13:31:41.000Z | test/drivers/gaussiand/test_driver_gaussian_log.py | divshacker/qiskit-nature | 08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb | [
"Apache-2.0"
] | 3 | 2021-07-02T06:57:58.000Z | 2021-07-06T12:32:38.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 39.3125 | 95 | 0.533459 |
import unittest
from test import QiskitNatureTestCase
from qiskit_nature.drivers import GaussianLogDriver, GaussianLogResult
from qiskit_nature import QiskitNatureError
class TestDriverGaussianLog(QiskitNatureTestCase):
def setUp(self):
super().setUp()
self.logfile = self.get_resou... | true | true |
1c447a30344894966ddbd67d7e8299c130481086 | 391 | py | Python | mediaman/services/drive/experiments/serviceaccounttest.py | MattCCS/MediaMan | 388c0d16da437b0ede4f0903a01e41dc8e927ae6 | [
"BSD-3-Clause-Clear"
] | 1 | 2019-05-06T19:51:08.000Z | 2019-05-06T19:51:08.000Z | mediaman/services/drive/experiments/serviceaccounttest.py | MattCCS/MediaMan | 388c0d16da437b0ede4f0903a01e41dc8e927ae6 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-02-08T20:22:34.000Z | 2021-02-08T20:22:34.000Z | mediaman/services/drive/experiments/serviceaccounttest.py | MattCCS/MediaMan | 388c0d16da437b0ede4f0903a01e41dc8e927ae6 | [
"BSD-3-Clause-Clear"
] | null | null | null | # service account basic example
import googleapiclient
from apiclient.discovery import build
drive = build("drive", "v3")
drive.files().list().execute()
file_metadata = {'name': 'test.txt'}
media = googleapiclient.http.MediaFileUpload("test.txt")
file_receipt = drive.files().create(body=file_metadata, media_body=medi... | 27.928571 | 96 | 0.757033 |
import googleapiclient
from apiclient.discovery import build
drive = build("drive", "v3")
drive.files().list().execute()
file_metadata = {'name': 'test.txt'}
media = googleapiclient.http.MediaFileUpload("test.txt")
file_receipt = drive.files().create(body=file_metadata, media_body=media, fields="id").execute()
file_... | true | true |
1c447aa8d452648be1850d869567b6b283f8f840 | 681 | py | Python | tests_integration/helpers/archive_order_by_name.py | kmjennison/dfp-prebid-setup | d965f9a70e56a8444ecd80566028f09964b51d04 | [
"MIT"
] | 111 | 2017-03-09T02:05:25.000Z | 2022-03-14T21:03:00.000Z | tests_integration/helpers/archive_order_by_name.py | kmjennison/dfp-prebid-setup | d965f9a70e56a8444ecd80566028f09964b51d04 | [
"MIT"
] | 81 | 2017-03-10T08:07:02.000Z | 2022-03-02T04:44:06.000Z | tests_integration/helpers/archive_order_by_name.py | kmjennison/dfp-prebid-setup | d965f9a70e56a8444ecd80566028f09964b51d04 | [
"MIT"
] | 87 | 2017-03-16T21:38:53.000Z | 2022-02-04T11:48:29.000Z | #!/usr/bin/env python
import logging
from googleads import ad_manager
from dfp.client import get_client
# from tests_integration.helpers.get_order_by_name import get_order_by_name
def archive_order_by_name(order_name):
"""
Archives an order by name in DFP.
Args:
order_name (str): the name of the DFP orde... | 24.321429 | 75 | 0.734214 |
import logging
from googleads import ad_manager
from dfp.client import get_client
def archive_order_by_name(order_name):
client = get_client()
order_service = client.GetService('OrderService', version='v202108')
statement = (ad_manager.StatementBuilder()
.Where('name = :name')
.WithBindVariable('na... | true | true |
1c447be720a241ddbbc7be776decca7269ad922b | 3,708 | py | Python | scripts/classifier.py | michaelhalim168/GiftFinder | 7fda99be827a06e5ef2d112174ded93ad1d3b7b1 | [
"MIT"
] | null | null | null | scripts/classifier.py | michaelhalim168/GiftFinder | 7fda99be827a06e5ef2d112174ded93ad1d3b7b1 | [
"MIT"
] | null | null | null | scripts/classifier.py | michaelhalim168/GiftFinder | 7fda99be827a06e5ef2d112174ded93ad1d3b7b1 | [
"MIT"
] | 1 | 2021-08-02T07:49:01.000Z | 2021-08-02T07:49:01.000Z | import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from sklearn.multiclass import OneVsRestClassifier
from sklearn.svm import LinearSVC
from sklearn.preprocessing import LabelEncoder
from vaderSentiment... | 41.2 | 132 | 0.677994 | import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from sklearn.multiclass import OneVsRestClassifier
from sklearn.svm import LinearSVC
from sklearn.preprocessing import LabelEncoder
from vaderSentiment... | true | true |
1c447ccae06de96876bb5c45dbe5c87ce36a611e | 11,319 | py | Python | RPLCD/i2c.py | sphh/RPLCD | c4dc451623da5e02292046388be5201cbc25321e | [
"MIT"
] | 2 | 2020-09-06T17:05:06.000Z | 2021-03-04T14:41:37.000Z | RPLCD/i2c.py | sphh/RPLCD | c4dc451623da5e02292046388be5201cbc25321e | [
"MIT"
] | 6 | 2018-03-13T18:41:29.000Z | 2020-08-29T11:41:52.000Z | RPLCD/i2c.py | sphh/RPLCD | c4dc451623da5e02292046388be5201cbc25321e | [
"MIT"
] | 2 | 2020-08-05T04:01:34.000Z | 2020-08-09T15:12:23.000Z | # -*- coding: utf-8 -*-
"""
Copyright (C) 2013-2017 Danilo Bargen
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 limitation the rights to
use, copy, modify,... | 42.235075 | 99 | 0.616044 |
from __future__ import print_function, division, absolute_import, unicode_literals
from smbus import SMBus
from . import common as c
from .lcd import BaseCharLCD
PCF8574_BACKLIGHT = 0x08
PCF8574_NOBACKLIGHT = 0x00
PCF8574_E = 0x4
PIN_READ_WRITE = 0x2
PIN_REGISTER_SELECT = 0x1
MCP230XX_BACKLIGHT = 0x80
MCP2... | true | true |
1c447cd652110e5c98f244fcb259d5250072d56d | 10,423 | py | Python | Agenda Pessoal/src/views/views_classes/view_principal/classeTelaPrincipal.py | jao-victor/Agenda-Pessoal | 39c9d1a61ff36c93daf49b799d45c665330b7155 | [
"MIT"
] | 1 | 2022-01-29T16:27:50.000Z | 2022-01-29T16:27:50.000Z | Agenda Pessoal/src/views/views_classes/view_principal/classeTelaPrincipal.py | jao-victor/Agenda-Pessoal | 39c9d1a61ff36c93daf49b799d45c665330b7155 | [
"MIT"
] | null | null | null | Agenda Pessoal/src/views/views_classes/view_principal/classeTelaPrincipal.py | jao-victor/Agenda-Pessoal | 39c9d1a61ff36c93daf49b799d45c665330b7155 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'telaPrincipal.ui'
#
# Created by: PyQt5 UI code generator 5.14.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
... | 43.610879 | 87 | 0.694905 |
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(950, 650)
MainWindow.setMinimumSize(QtCore.QSize(950, 650))
MainWindow.setMaximumSize(QtCore.QSize(16777215, 1677... | true | true |
1c447e118ee71765a18a3343c88e0fc0fd12ee27 | 555 | py | Python | service-workers/service-worker/resources/update-missing-import-scripts-main-worker.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | service-workers/service-worker/resources/update-missing-import-scripts-main-worker.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 7,642 | 2018-05-28T09:38:03.000Z | 2022-03-31T20:55:48.000Z | service-workers/service-worker/resources/update-missing-import-scripts-main-worker.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | from wptserve.utils import isomorphic_decode
def main(request, response):
key = request.GET[b'key']
already_requested = request.server.stash.take(key)
header = [(b'Content-Type', b'application/javascript')]
initial_script = u'importScripts("./update-missing-import-scripts-imported-worker.py?key={0}")'... | 34.6875 | 130 | 0.722523 | from wptserve.utils import isomorphic_decode
def main(request, response):
key = request.GET[b'key']
already_requested = request.server.stash.take(key)
header = [(b'Content-Type', b'application/javascript')]
initial_script = u'importScripts("./update-missing-import-scripts-imported-worker.py?key={0}")'... | true | true |
1c447e3673bf441602a3991a418258f9af63b818 | 1,055 | py | Python | manage.py | Zamy97/Algorithms_Explained | 048022903da4199b3d245997e95c172cfbea508f | [
"MIT"
] | 1 | 2020-09-22T14:29:46.000Z | 2020-09-22T14:29:46.000Z | manage.py | Zamy97/Algorithms_Explained | 048022903da4199b3d245997e95c172cfbea508f | [
"MIT"
] | null | null | null | manage.py | Zamy97/Algorithms_Explained | 048022903da4199b3d245997e95c172cfbea508f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure tha... | 34.032258 | 77 | 0.664455 |
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
try:
from django.core.management import execute_from_command_line
except ImportError:
try:
import django
except ImportE... | true | true |
1c447e6400e709ae86806edfead5fe49bd6a8135 | 1,374 | py | Python | examples/async/exchange_client/spot_exchange_rpc/5_Orders.py | InjectiveLabs/sdk-python | d98382d450f4e6043d8fc34b621215fb14f958f2 | [
"Apache-2.0"
] | 10 | 2021-09-07T08:03:52.000Z | 2022-03-08T08:39:30.000Z | examples/async/exchange_client/spot_exchange_rpc/5_Orders.py | InjectiveLabs/sdk-python | d98382d450f4e6043d8fc34b621215fb14f958f2 | [
"Apache-2.0"
] | 39 | 2021-08-19T20:09:35.000Z | 2022-03-22T19:51:59.000Z | examples/async/exchange_client/spot_exchange_rpc/5_Orders.py | InjectiveLabs/sdk-python | d98382d450f4e6043d8fc34b621215fb14f958f2 | [
"Apache-2.0"
] | 5 | 2021-11-02T16:23:48.000Z | 2022-01-20T22:30:05.000Z | # Copyright 2021 Injective Labs
#
# 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 writin... | 36.157895 | 88 | 0.762009 |
import asyncio
import logging
from pyinjective.async_client import AsyncClient
from pyinjective.constant import Network
async def main() -> None:
network = Network.testnet()
client = AsyncClient(network, insecure=False)
market_id = "0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e95... | true | true |
1c447eb7147743f31a6feffd42b5ffac2e5fe09c | 24,457 | py | Python | language/google/cloud/language_v1/gapic/language_service_client.py | nielm/google-cloud-python | fd126fdea34206109eb00d675374ff7dc4dcc5ef | [
"Apache-2.0"
] | 1 | 2019-01-23T21:54:51.000Z | 2019-01-23T21:54:51.000Z | language/google/cloud/language_v1/gapic/language_service_client.py | nielm/google-cloud-python | fd126fdea34206109eb00d675374ff7dc4dcc5ef | [
"Apache-2.0"
] | 1 | 2018-04-06T19:51:23.000Z | 2018-04-06T19:51:23.000Z | language/google/cloud/language_v1/gapic/language_service_client.py | nielm/google-cloud-python | fd126fdea34206109eb00d675374ff7dc4dcc5ef | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 43.517794 | 138 | 0.623339 |
import pkg_resources
import warnings
from google.oauth2 import service_account
import google.api_core.gapic_v1.client_info
import google.api_core.gapic_v1.config
import google.api_core.gapic_v1.method
import google.api_core.grpc_helpers
import grpc
from google.cloud.language_v1.gapic import enums
from... | true | true |
1c447f987b088894b1ea955c47d379681276d285 | 935 | py | Python | h2o-py/tests/testdir_munging/pyunit_insert_missing.py | kyoren/https-github.com-h2oai-h2o-3 | 77b27109c84c4739f9f1b7a3078f8992beefc813 | [
"Apache-2.0"
] | 1 | 2016-09-30T05:58:18.000Z | 2016-09-30T05:58:18.000Z | h2o-py/tests/testdir_munging/pyunit_insert_missing.py | kyoren/https-github.com-h2oai-h2o-3 | 77b27109c84c4739f9f1b7a3078f8992beefc813 | [
"Apache-2.0"
] | null | null | null | h2o-py/tests/testdir_munging/pyunit_insert_missing.py | kyoren/https-github.com-h2oai-h2o-3 | 77b27109c84c4739f9f1b7a3078f8992beefc813 | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.insert(1, "../../")
import h2o, tests
def insert_missing():
# Connect to a pre-existing cluster
data = [[1, 2, 3, 1, 'a', 1, 9],
[1, 6, 4, 2, 'a', 1, 9],
[2, 3, 8, 6, 'b', 1, 9],
[3, 4, 3, 2, 'b', 3, 8],
[4, 5, 9, 5, 'c', 2, 8],
... | 33.392857 | 118 | 0.581818 | import sys
sys.path.insert(1, "../../")
import h2o, tests
def insert_missing():
data = [[1, 2, 3, 1, 'a', 1, 9],
[1, 6, 4, 2, 'a', 1, 9],
[2, 3, 8, 6, 'b', 1, 9],
[3, 4, 3, 2, 'b', 3, 8],
[4, 5, 9, 5, 'c', 2, 8],
[5, 7, 10,7, 'b', 8, 8]]
h2... | true | true |
1c447fa72332939a5d75336dc1a60c443e14a033 | 29,734 | py | Python | pacu/modules/detection__disruption/main.py | damienjburks/pacu | 5853f9668a7d78945c40d403bf88a47101ba2b3d | [
"BSD-3-Clause"
] | 1 | 2021-12-22T22:39:49.000Z | 2021-12-22T22:39:49.000Z | pacu/modules/detection__disruption/main.py | damienjburks/pacu | 5853f9668a7d78945c40d403bf88a47101ba2b3d | [
"BSD-3-Clause"
] | null | null | null | pacu/modules/detection__disruption/main.py | damienjburks/pacu | 5853f9668a7d78945c40d403bf88a47101ba2b3d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import argparse
from copy import deepcopy
module_info = {
# Name of the module (should be the same as the filename)
"name": "detection__disruption",
# Name and any other notes about the author
"author": "Spencer Gietzen of Rhino Security Labs",
# Category of the module. Make... | 41.997175 | 760 | 0.438723 |
import argparse
from copy import deepcopy
module_info = {
"name": "detection__disruption",
"author": "Spencer Gietzen of Rhino Security Labs",
"category": "EVADE",
"one_liner": "Disables, deletes, or minimizes various logging/monitoring services.",
"description": "This mo... | true | true |
1c4481625ea42757e76faf57067bad00031d262c | 6,458 | py | Python | src/qt/gui_tabRewards.py | Fuzzbawls/PIVX-SPMT | 4d5157e452dc43894805c7149b897849dc900029 | [
"MIT"
] | null | null | null | src/qt/gui_tabRewards.py | Fuzzbawls/PIVX-SPMT | 4d5157e452dc43894805c7149b897849dc900029 | [
"MIT"
] | null | null | null | src/qt/gui_tabRewards.py | Fuzzbawls/PIVX-SPMT | 4d5157e452dc43894805c7149b897849dc900029 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os.path
sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
from PyQt5.QtCore import Qt
from PyQt5.Qt import QLabel, QFormLayout, QDoubleSpinBox, QTableWidget, QTableWidgetItem, QAbstractItemView, QHeaderView,\
QCheckBox
from PyQt5... | 45.478873 | 123 | 0.658873 |
import sys
import os.path
sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
from PyQt5.QtCore import Qt
from PyQt5.Qt import QLabel, QFormLayout, QDoubleSpinBox, QTableWidget, QTableWidgetItem, QAbstractItemView, QHeaderView,\
QCheckBox
from PyQt5.QtWidgets import QWidget, QPushButton, QHBoxLa... | true | true |
1c44828ab8ac3c3d9d148eb2ff2de1a5e2d9b4cb | 611 | py | Python | fastrunner/management/commands/cli.py | wss1029681084/FasterRunner | 79f0c9ec00a6aa020c1fc48c5a257775412cd570 | [
"MIT"
] | 1 | 2018-12-18T06:07:39.000Z | 2018-12-18T06:07:39.000Z | fastrunner/management/commands/cli.py | wss1029681084/FasterRunner | 79f0c9ec00a6aa020c1fc48c5a257775412cd570 | [
"MIT"
] | null | null | null | fastrunner/management/commands/cli.py | wss1029681084/FasterRunner | 79f0c9ec00a6aa020c1fc48c5a257775412cd570 | [
"MIT"
] | null | null | null | # encoding: utf-8
# -*- coding:utf-8 -*-
from django.core.management.base import BaseCommand
from httprunner import logger
from FasterRunner.__about__ import __version__
class Command(BaseCommand):
def add_arguments(self, parser):
""" API test: parse command line options and run commands.
"... | 26.565217 | 67 | 0.621931 |
from django.core.management.base import BaseCommand
from httprunner import logger
from FasterRunner.__about__ import __version__
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'-V', '--Version', dest='version', action='store_true',
help="show... | true | true |
1c4482d3efed66b2dcba6ba7a251c16ecf685d36 | 1,606 | py | Python | twilio/rest/resources/recordings.py | ProGamerCode/workshop | a45a7e9a0982e1b0d183ce2787d6cbb069acf03d | [
"MIT"
] | 3 | 2015-07-04T07:23:32.000Z | 2016-04-06T21:51:37.000Z | twilio/rest/resources/recordings.py | ProGamerCode/workshop | a45a7e9a0982e1b0d183ce2787d6cbb069acf03d | [
"MIT"
] | null | null | null | twilio/rest/resources/recordings.py | ProGamerCode/workshop | a45a7e9a0982e1b0d183ce2787d6cbb069acf03d | [
"MIT"
] | 8 | 2015-07-04T07:24:08.000Z | 2020-04-27T02:23:49.000Z | from twilio.rest.resources.util import normalize_dates
from twilio.rest.resources import InstanceResource, ListResource
class Transcription(InstanceResource):
pass
class Transcriptions(ListResource):
name = "Transcriptions"
instance = Transcription
def list(self, **kwargs):
"""
Re... | 25.09375 | 76 | 0.625156 | from twilio.rest.resources.util import normalize_dates
from twilio.rest.resources import InstanceResource, ListResource
class Transcription(InstanceResource):
pass
class Transcriptions(ListResource):
name = "Transcriptions"
instance = Transcription
def list(self, **kwargs):
return self.ge... | true | true |
1c44840024dc6589b681daa749547890a83a74f1 | 72,269 | py | Python | core/controllers/suggestion_test.py | prayutsu/oppia | e82da7653f7bbfb9ded0e1ba16cd9f481ff5a786 | [
"Apache-2.0"
] | 2 | 2020-03-28T18:32:45.000Z | 2021-02-07T18:29:31.000Z | core/controllers/suggestion_test.py | prayutsu/oppia | e82da7653f7bbfb9ded0e1ba16cd9f481ff5a786 | [
"Apache-2.0"
] | 35 | 2019-02-23T20:31:21.000Z | 2019-08-19T12:32:13.000Z | core/controllers/suggestion_test.py | prayutsu/oppia | e82da7653f7bbfb9ded0e1ba16cd9f481ff5a786 | [
"Apache-2.0"
] | 1 | 2021-01-28T05:20:56.000Z | 2021-01-28T05:20:56.000Z | # coding: utf-8
#
# Copyright 2018 The Oppia 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 requi... | 41.249429 | 111 | 0.602195 |
from __future__ import absolute_import
from __future__ import unicode_literals
import os
from constants import constants
from core.domain import exp_domain
from core.domain import exp_fetchers
from core.domain import exp_services
from core.domain import feedback_services
from core.domain import f... | true | true |
1c4484ec00c3b5a988f8610e8065d78bbfbd8918 | 5,672 | py | Python | test/functional/wallet_dump.py | Nugetzrul3/dogecash | f09a4ed70e9ea6f5599c8a20fe255cbe24373cc1 | [
"MIT"
] | 52 | 2018-10-08T07:17:35.000Z | 2021-11-29T22:53:08.000Z | test/functional/wallet_dump.py | Nugetzrul3/dogecash | f09a4ed70e9ea6f5599c8a20fe255cbe24373cc1 | [
"MIT"
] | 50 | 2018-10-20T10:42:54.000Z | 2021-02-15T21:53:51.000Z | test/functional/wallet_dump.py | Nugetzrul3/dogecash | f09a4ed70e9ea6f5599c8a20fe255cbe24373cc1 | [
"MIT"
] | 53 | 2018-11-03T16:42:43.000Z | 2021-12-11T03:55:21.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the dumpwallet RPC."""
import os
from test_framework.test_framework import DogeCashTestFramework... | 42.646617 | 192 | 0.603491 |
import os
from test_framework.test_framework import DogeCashTestFramework
from test_framework.util import (assert_equal, assert_raises_rpc_error)
def read_dump(file_name, addrs, hd_master_addr_old):
with open(file_name, encoding='utf8') as inputfile:
found_addr = 0
found_addr_chg = 0
... | true | true |
1c4485f443652f42f9ae85bde81f45cc658539e0 | 16,941 | py | Python | python/GafferTest/CompoundDataPlugTest.py | sebaDesmet/gaffer | 47b2d093c40452bd77947e3b5bd0722a366c8d59 | [
"BSD-3-Clause"
] | null | null | null | python/GafferTest/CompoundDataPlugTest.py | sebaDesmet/gaffer | 47b2d093c40452bd77947e3b5bd0722a366c8d59 | [
"BSD-3-Clause"
] | null | null | null | python/GafferTest/CompoundDataPlugTest.py | sebaDesmet/gaffer | 47b2d093c40452bd77947e3b5bd0722a366c8d59 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2012, John Haddon. All rights reserved.
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that ... | 34.432927 | 143 | 0.648309 | nge(16) ) ) )
self.assertEqual( n, "a" )
def testTransformPlugData( self ) :
p = Gaffer.CompoundDataPlug()
m1 = Gaffer.NameValuePlug( "a", Gaffer.TransformPlug() )
p.addChild( m1 )
m1["value"]["translate"].setValue( imath.V3f( 1,2,3 ) )
self.failUnless( isinstance( m1, Gaffer.ValuePlug ) )
d, n = p.m... | true | true |
1c4487923cc10926d95b12ba8c29699382d7d631 | 68,540 | py | Python | src/sage/algebras/hecke_algebras/ariki_koike_algebra.py | dcoudert/sage | c349c87d0dea805c92d589a259c4ed1a20407ca5 | [
"BSL-1.0"
] | null | null | null | src/sage/algebras/hecke_algebras/ariki_koike_algebra.py | dcoudert/sage | c349c87d0dea805c92d589a259c4ed1a20407ca5 | [
"BSL-1.0"
] | null | null | null | src/sage/algebras/hecke_algebras/ariki_koike_algebra.py | dcoudert/sage | c349c87d0dea805c92d589a259c4ed1a20407ca5 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Ariki-Koike Algebras
The *Ariki-Koike algebras* were introduced by Ariki and Koike [AK1994]_ as
a natural generalization of the Iwahori-Hecke algebras of types `A` and `B`
(see :class:`~sage.algebras.iwahori_hecke_algebra.IwahoriHeckeAlgebra`).
Soon afterwards, Broué and Malle defined ana... | 38.876914 | 115 | 0.442048 |
from sage.misc.cachefunc import cached_method
from sage.misc.lazy_attribute import lazy_attribute
from sage.misc.misc_c import prod
from sage.misc.bindable_class import BindableClass
from sage.structure.parent import Parent
from sage.structure.unique_representation import UniqueRepresentation
from sage.ca... | true | true |
1c4488741e7017b609ea544ddd3f3c1aae65f69f | 3,703 | py | Python | src/sima/simo/wasimresultexport.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/simo/wasimresultexport.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/simo/wasimresultexport.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | # This an autogenerated file
#
# Generated with WasimResultExport
from __future__ import annotations
from typing import Dict,Sequence,List
from dmt.entity import Entity
from dmt.blueprint import Blueprint
from .blueprints.wasimresultexport import WasimResultExportBlueprint
from typing import Dict
from sima.sima.moao i... | 29.15748 | 96 | 0.649473 |
from __future__ import annotations
from typing import Dict,Sequence,List
from dmt.entity import Entity
from dmt.blueprint import Blueprint
from .blueprints.wasimresultexport import WasimResultExportBlueprint
from typing import Dict
from sima.sima.moao import MOAO
from sima.sima.scriptablevalue import ScriptableValue... | true | true |
1c4488e1a483c60aa43bdc2ef73a7cb25713757e | 7,609 | py | Python | tf_agents/environments/atari_preprocessing.py | wookayin/tensorflow-agents | ae3751dfeed52422a350227047648dd82297960b | [
"Apache-2.0"
] | 2 | 2018-12-20T01:49:33.000Z | 2019-12-09T13:17:05.000Z | tf_agents/environments/atari_preprocessing.py | Akshay22121995/agents | 1455410dffed3cfdede793b87c179965cdd27d22 | [
"Apache-2.0"
] | null | null | null | tf_agents/environments/atari_preprocessing.py | Akshay22121995/agents | 1455410dffed3cfdede793b87c179965cdd27d22 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The TF-Agents 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... | 32.939394 | 80 | 0.697858 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from gym.spaces.box import Box
import numpy as np
import gin.tf
import cv2
@gin.configurable
class AtariPreprocessing(object):
def __init__(self,
environment,
... | true | true |
1c448ad0afaccfbc61915a4250834d2e0132d2f5 | 38 | py | Python | complute.py | liukuan127/HelloGitHub | 54802e44e3feae5d292d9b68817ce4d9107d214a | [
"Apache-2.0"
] | null | null | null | complute.py | liukuan127/HelloGitHub | 54802e44e3feae5d292d9b68817ce4d9107d214a | [
"Apache-2.0"
] | null | null | null | complute.py | liukuan127/HelloGitHub | 54802e44e3feae5d292d9b68817ce4d9107d214a | [
"Apache-2.0"
] | null | null | null | add = lambda a,b:a+b
print(add(2,5))
| 9.5 | 20 | 0.605263 | add = lambda a,b:a+b
print(add(2,5))
| true | true |
1c448b851bdb5f9d335383f735e2b275471ee8fb | 521 | py | Python | aptly_api/parts/db.py | masselstine/aptly-api-client | dc8034a2b624b42f54d2e55ce2ad90e2fe165a33 | [
"BSD-3-Clause"
] | null | null | null | aptly_api/parts/db.py | masselstine/aptly-api-client | dc8034a2b624b42f54d2e55ce2ad90e2fe165a33 | [
"BSD-3-Clause"
] | null | null | null | aptly_api/parts/db.py | masselstine/aptly-api-client | dc8034a2b624b42f54d2e55ce2ad90e2fe165a33 | [
"BSD-3-Clause"
] | null | null | null | # -* encoding: utf-8 *-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from typing import cast
from aptly_api.base import BaseAPIClient
from aptly_api.parts.tasks imp... | 32.5625 | 69 | 0.731286 |
from typing import cast
from aptly_api.base import BaseAPIClient
from aptly_api.parts.tasks import TaskAPISection, Task
class DbAPISection(BaseAPIClient):
def cleanup(self) -> Task:
resp = self.do_post("api/db/cleanup")
return TaskAPISection.task_from_response(resp.json())
| true | true |
1c448be188fe77732f9991217edb9ad012e025a7 | 20 | py | Python | tvlibre/settings/prod.py | mjroson/tvlibre | b0ac862710c7f22242e2adb29c4fef32d604daf3 | [
"MIT"
] | null | null | null | tvlibre/settings/prod.py | mjroson/tvlibre | b0ac862710c7f22242e2adb29c4fef32d604daf3 | [
"MIT"
] | 3 | 2016-04-01T20:48:54.000Z | 2016-04-02T16:06:20.000Z | tvlibre/settings/__init__.py | mjroson/tvlibre | b0ac862710c7f22242e2adb29c4fef32d604daf3 | [
"MIT"
] | 1 | 2019-05-07T20:34:07.000Z | 2019-05-07T20:34:07.000Z | __author__ = 'docn'
| 10 | 19 | 0.7 | __author__ = 'docn'
| true | true |
1c448c7c722c4c7389efd5f9e82ed4dd6eb3774d | 538 | py | Python | manage.py | kirega/stocks | 11b0d86054bb54feca5a59d40ddd50f11ce216da | [
"MIT"
] | 1 | 2020-07-16T08:12:27.000Z | 2020-07-16T08:12:27.000Z | manage.py | pankleshwaria/Django-REST-API | 3844234036e3d6906f0ca8656d559be3dd8bcc95 | [
"MIT"
] | 6 | 2019-03-19T12:16:29.000Z | 2020-06-05T20:08:39.000Z | manage.py | kirega/stocks | 11b0d86054bb54feca5a59d40ddd50f11ce216da | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'stocks.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are y... | 33.625 | 73 | 0.685874 |
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'stocks.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installe... | true | true |
1c448ce9fdfe3ff6f29e0154046191dddead72a0 | 381 | py | Python | tests/test_vis.py | scott-trinkle/fiberorient | 306cf2741008eb46a97cfccdcf81e9ec33189a8d | [
"MIT"
] | null | null | null | tests/test_vis.py | scott-trinkle/fiberorient | 306cf2741008eb46a97cfccdcf81e9ec33189a8d | [
"MIT"
] | null | null | null | tests/test_vis.py | scott-trinkle/fiberorient | 306cf2741008eb46a97cfccdcf81e9ec33189a8d | [
"MIT"
] | null | null | null | import pytest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from context import fiberorient as fo
def test_img_to_dec(img, vectors):
true_dec = np.zeros_like(vectors)
true_dec[..., 0] = fo.util.rescale(img, scale=255).astype(np.uint8)
test_dec = fo.vis.img_to_... | 29.307692 | 71 | 0.766404 | import pytest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from context import fiberorient as fo
def test_img_to_dec(img, vectors):
true_dec = np.zeros_like(vectors)
true_dec[..., 0] = fo.util.rescale(img, scale=255).astype(np.uint8)
test_dec = fo.vis.img_to_... | true | true |
1c448d527ba265f27954470348b0ff3bc8772d49 | 25,215 | py | Python | ansible/modules/network/nxos/nxos_igmp_interface.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | ansible/modules/network/nxos/nxos_igmp_interface.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | ansible/modules/network/nxos/nxos_igmp_interface.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | 36.072961 | 79 | 0.608209 |
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: nxos_igmp_interface
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Manages IGMP interface configura... | true | true |
1c448dbcb82a77112b5b4abec69896d7f3d2a467 | 664 | py | Python | tests/pymath/test_expanded_form.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | tests/pymath/test_expanded_form.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | tests/pymath/test_expanded_form.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | import unittest
from pymath.expanded_form import expanded_form, expanded_form_2
class ExpandedFormTests(unittest.TestCase):
def test_12(self):
self.assertEqual("10 + 2", expanded_form(12))
def test_42(self):
self.assertEqual('40 + 2', expanded_form(42))
def test_70304(self):
se... | 26.56 | 67 | 0.683735 | import unittest
from pymath.expanded_form import expanded_form, expanded_form_2
class ExpandedFormTests(unittest.TestCase):
def test_12(self):
self.assertEqual("10 + 2", expanded_form(12))
def test_42(self):
self.assertEqual('40 + 2', expanded_form(42))
def test_70304(self):
se... | true | true |
1c448e3b094d67eacf7c5e088b00bbf10ceaeef8 | 479 | py | Python | scatterplot.py | daithimarkham/pands-project | f3d6dcb82fda1db851a3d78571a9d4a48f908eba | [
"Apache-2.0"
] | null | null | null | scatterplot.py | daithimarkham/pands-project | f3d6dcb82fda1db851a3d78571a9d4a48f908eba | [
"Apache-2.0"
] | null | null | null | scatterplot.py | daithimarkham/pands-project | f3d6dcb82fda1db851a3d78571a9d4a48f908eba | [
"Apache-2.0"
] | 1 | 2021-01-24T01:21:57.000Z | 2021-01-24T01:21:57.000Z | # David Markham
# Fisher Iris Data set
# Use a Multivariate scatter-plot to distinguish the relationship between the flowers.
# Import Libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sn
from pandas.plotting import scatter_matrix
# Load dataset
data = ("iris.csv")... | 21.772727 | 86 | 0.753653 |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sn
from pandas.plotting import scatter_matrix
data = ("iris.csv")
names = ['sepal-length', 'sepal-width', 'petal-length', 'petal-width', 'species']
dataset = pd.read_csv(data, header = 0)
scatter_matrix(dataset)
plt.sho... | true | true |
1c448fbc518db24521418d3b53a5690ab14edbbd | 583 | py | Python | docassemble/setup.py | ttamg/docassemble | 1429fbbddfeb60b9f8fe74c928a479236d6a6113 | [
"MIT"
] | 1 | 2020-06-01T15:46:11.000Z | 2020-06-01T15:46:11.000Z | docassemble/setup.py | ttamg/docassemble | 1429fbbddfeb60b9f8fe74c928a479236d6a6113 | [
"MIT"
] | null | null | null | docassemble/setup.py | ttamg/docassemble | 1429fbbddfeb60b9f8fe74c928a479236d6a6113 | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='docassemble',
version='1.1.15',
python_requires='>=3.5',
description=('The namespace package for the docassemble system.'),
long_description... | 29.15 | 72 | 0.665523 | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='docassemble',
version='1.1.15',
python_requires='>=3.5',
description=('The namespace package for the docassemble system.'),
long_description... | true | true |
1c4490d3bc0bfdfa9fc91679f196a39d1ed17257 | 81,315 | py | Python | python/pyspark/tests.py | bopopescu/wso2-spark | 6982456ded39a8fef0ad26600218f8f575aac2a5 | [
"Apache-2.0",
"MIT"
] | 11 | 2016-05-26T12:06:38.000Z | 2020-07-06T20:37:07.000Z | python/pyspark/tests.py | bopopescu/wso2-spark | 6982456ded39a8fef0ad26600218f8f575aac2a5 | [
"Apache-2.0",
"MIT"
] | null | null | null | python/pyspark/tests.py | bopopescu/wso2-spark | 6982456ded39a8fef0ad26600218f8f575aac2a5 | [
"Apache-2.0",
"MIT"
] | 9 | 2016-07-29T01:13:50.000Z | 2020-07-23T16:16:17.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 us... | 40.902918 | 99 | 0.59465 |
from array import array
from glob import glob
import os
import re
import shutil
import subprocess
import sys
import tempfile
import time
import zipfile
import random
import threading
import hashlib
from py4j.protocol import Py4JJavaError
if sys.version_info[:2] <= (2, 6):
try:
import uni... | true | true |
1c44913b32f366f87742a6a4c2126b81e0bf5d8f | 1,632 | py | Python | Module2/Day17/module2_day17_userInput.py | sydneybeal/100DaysPython | d1b004bd27a0644983f3af100172f394ee039f30 | [
"MIT"
] | 2 | 2019-06-02T12:17:18.000Z | 2019-07-12T16:55:55.000Z | Module2/Day17/module2_day17_userInput.py | sydneybeal/100DaysPython | d1b004bd27a0644983f3af100172f394ee039f30 | [
"MIT"
] | null | null | null | Module2/Day17/module2_day17_userInput.py | sydneybeal/100DaysPython | d1b004bd27a0644983f3af100172f394ee039f30 | [
"MIT"
] | null | null | null | """
Author: <REPLACE>
Project: 100DaysPython
File: module1_day16_userInput.py
Creation Date: <REPLACE>
Description: <REPLACE>
"""
# print(input())
# print(input("How many questions will you get asked?"))
name = input("What is your name?")
print(name)
resp = input("Do ... | 45.333333 | 137 | 0.664216 |
name = input("What is your name?")
print(name)
resp = input("Do you approach the bridge keeper? (y/n)")
if "y" in resp.lower():
print("Those who approach the Bridge of Death must answer me these questions three. There the other side he see.")
print(input("How do you respond?"))
name = input("What is you n... | true | true |
1c44914fc1c38f634cff5b91eb98ea2a6b442953 | 1,029 | py | Python | day-13/problem.py | mkemp/aoc-2021 | 03573a0e865ff86324245896e26260b14650d2ba | [
"MIT"
] | 1 | 2021-12-04T15:18:56.000Z | 2021-12-04T15:18:56.000Z | day-13/problem.py | mkemp/aoc-2021 | 03573a0e865ff86324245896e26260b14650d2ba | [
"MIT"
] | null | null | null | day-13/problem.py | mkemp/aoc-2021 | 03573a0e865ff86324245896e26260b14650d2ba | [
"MIT"
] | null | null | null | with open('input') as f:
coordinates, creases = f.read().strip().split('\n\n')
dots = [tuple(map(int, line.split(','))) for line in coordinates.split('\n')]
folds = [(line[11:12], int(line[13:])) for line in creases.split('\n')]
def do_fold(dots, x_or_y, at):
new_dots = set()
if x_or_y == 'x':
... | 22.866667 | 81 | 0.489796 | with open('input') as f:
coordinates, creases = f.read().strip().split('\n\n')
dots = [tuple(map(int, line.split(','))) for line in coordinates.split('\n')]
folds = [(line[11:12], int(line[13:])) for line in creases.split('\n')]
def do_fold(dots, x_or_y, at):
new_dots = set()
if x_or_y == 'x':
... | true | true |
1c44930d11306e39af7a6ffbd3814e73e7a26fb9 | 521 | py | Python | Famcy/_elements_/span/span.py | nexuni/Famcy | 80f8f18fe1614ab3c203ca3466b9506b494470bf | [
"Apache-2.0"
] | null | null | null | Famcy/_elements_/span/span.py | nexuni/Famcy | 80f8f18fe1614ab3c203ca3466b9506b494470bf | [
"Apache-2.0"
] | 12 | 2022-02-05T04:56:44.000Z | 2022-03-30T09:59:26.000Z | Famcy/_elements_/span/span.py | nexuni/Famcy | 80f8f18fe1614ab3c203ca3466b9506b494470bf | [
"Apache-2.0"
] | null | null | null | import Famcy
import json
class span(Famcy.FamcyElement):
def __init__(self):
super(span, self).__init__()
def render_element(self):
html = ""
if self.innerHTML and self.innerHTML != "":
html += self.innerHTML
self.children = []
else:
for chi... | 27.421053 | 67 | 0.539347 | import Famcy
import json
class span(Famcy.FamcyElement):
def __init__(self):
super(span, self).__init__()
def render_element(self):
html = ""
if self.innerHTML and self.innerHTML != "":
html += self.innerHTML
self.children = []
else:
for chi... | true | true |
1c4497e7978fbbf7db672a1f8b3185fdccee9f54 | 1,473 | py | Python | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/ns/__init__.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/ns/__init__.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/ns/__init__.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | __all__ = ['nsacl', 'nsacl6', 'nsacls', 'nsacls6', 'nsappflowcollector', 'nsappflowparam', 'nsaptlicense', 'nsassignment', 'nscapacity', 'nscentralmanagementserver', 'nsconfig', 'nsconnectiontable', 'nsconsoleloginprompt', 'nsdhcpip', 'nsdhcpparams', 'nsdiameter', 'nsencryptionparams', 'nsevents', 'nsextension', 'nsext... | 1,473 | 1,473 | 0.783435 | __all__ = ['nsacl', 'nsacl6', 'nsacls', 'nsacls6', 'nsappflowcollector', 'nsappflowparam', 'nsaptlicense', 'nsassignment', 'nscapacity', 'nscentralmanagementserver', 'nsconfig', 'nsconnectiontable', 'nsconsoleloginprompt', 'nsdhcpip', 'nsdhcpparams', 'nsdiameter', 'nsencryptionparams', 'nsevents', 'nsextension', 'nsext... | true | true |
1c4498665b8aae85e1fcc79ae9ad664e8e4f74fe | 2,454 | py | Python | script/map_design_layer.py | matteli/histemul | 61f1ea8e1263b92fd2bead0c808f67940faad802 | [
"BSD-2-Clause"
] | 1 | 2019-07-05T09:40:50.000Z | 2019-07-05T09:40:50.000Z | script/map_design_layer.py | matteli/histemul | 61f1ea8e1263b92fd2bead0c808f67940faad802 | [
"BSD-2-Clause"
] | null | null | null | script/map_design_layer.py | matteli/histemul | 61f1ea8e1263b92fd2bead0c808f67940faad802 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python3
'''
Copyright (c) 2012-2015, Matthieu Nué
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 copyright notice,
this list of con... | 40.9 | 154 | 0.765689 |
import shlex, subprocess
print("1/5")
p = subprocess.Popen(shlex.split("convert worldid.png -morphology Edge Disk:1.0 -threshold 0.1 -negate worldedge.png"))
p.wait()
print("2/5")
p = subprocess.Popen(shlex.split("convert worldedge.png -blur 0x2 -shade 115x30 worldtemp1.png"))
p.wait()
print("3/5")
p = subproces... | true | true |
1c449b22c9baf8b37615b192cc1ac043d84ca6f0 | 4,960 | py | Python | arviz/plots/energyplot.py | aseyboldt/arviz | 1fb40ff442f5ba4b8d11ceeaef27e6c339eb1685 | [
"Apache-2.0"
] | null | null | null | arviz/plots/energyplot.py | aseyboldt/arviz | 1fb40ff442f5ba4b8d11ceeaef27e6c339eb1685 | [
"Apache-2.0"
] | null | null | null | arviz/plots/energyplot.py | aseyboldt/arviz | 1fb40ff442f5ba4b8d11ceeaef27e6c339eb1685 | [
"Apache-2.0"
] | null | null | null | """Plot energy transition distribution in HMC inference."""
from itertools import cycle
from matplotlib.pyplot import rcParams
import numpy as np
from ..data import convert_to_dataset
from .plot_utils import _scale_fig_size, get_plotting_function
def plot_energy(
data,
kind="kde",
bfmi=True,
figsize=... | 33.066667 | 99 | 0.644355 | from itertools import cycle
from matplotlib.pyplot import rcParams
import numpy as np
from ..data import convert_to_dataset
from .plot_utils import _scale_fig_size, get_plotting_function
def plot_energy(
data,
kind="kde",
bfmi=True,
figsize=None,
legend=True,
fill_alpha=(1, 0.75),
fill_co... | true | true |
1c449b7027e666e7274fd83f44ad36f1462257cb | 7,573 | py | Python | addons/house_location/models/house_location.py | nathanbangwa243/house-location | fa38203b2c92dd97f253fc3b4354af228f1b0338 | [
"MIT"
] | 1 | 2021-11-17T18:49:44.000Z | 2021-11-17T18:49:44.000Z | addons/house_location/models/house_location.py | nathanbangwa243/house-location | fa38203b2c92dd97f253fc3b4354af228f1b0338 | [
"MIT"
] | null | null | null | addons/house_location/models/house_location.py | nathanbangwa243/house-location | fa38203b2c92dd97f253fc3b4354af228f1b0338 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# odoo imports
from odoo import models
from odoo import fields
from odoo import api
from odoo import exceptions
# others imports
import datetime
class HouseLocation(models.Model):
_name = 'house.location'
_description = 'House Location'
name = fields.Char(string="Title", require... | 28.469925 | 105 | 0.589727 |
from odoo import models
from odoo import fields
from odoo import api
from odoo import exceptions
import datetime
class HouseLocation(models.Model):
_name = 'house.location'
_description = 'House Location'
name = fields.Char(string="Title", required=True, help="",)
description = fields.Text(stri... | true | true |
1c449c41e70e7280767ce5dd935f25659bbe4897 | 2,825 | py | Python | salt/modules/scsi.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 19 | 2016-01-29T14:37:52.000Z | 2022-03-30T18:08:01.000Z | salt/modules/scsi.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 223 | 2016-03-02T16:39:41.000Z | 2022-03-03T12:26:35.000Z | salt/modules/scsi.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 64 | 2016-02-04T19:45:26.000Z | 2021-12-15T02:02:31.000Z | # -*- coding: utf-8 -*-
"""
SCSI administration module
"""
from __future__ import absolute_import, print_function, unicode_literals
import logging
import os.path
import salt.utils.path
log = logging.getLogger(__name__)
__func_alias__ = {"ls_": "ls"}
def ls_(get_size=True):
"""
List SCSI devices, with deta... | 27.427184 | 88 | 0.513274 |
from __future__ import absolute_import, print_function, unicode_literals
import logging
import os.path
import salt.utils.path
log = logging.getLogger(__name__)
__func_alias__ = {"ls_": "ls"}
def ls_(get_size=True):
if not salt.utils.path.which("lsscsi"):
__context__["retcode"] = 1
return "sc... | true | true |
1c449cfee90b6a41e6c2ac62cbebd76da108bf37 | 241 | py | Python | approxhaynet/runsinglecellLFP.py | ModelDBRepository/237469 | 15f71106b4f99577ee503178aaedbf2781ec61f6 | [
"CC-BY-4.0"
] | null | null | null | approxhaynet/runsinglecellLFP.py | ModelDBRepository/237469 | 15f71106b4f99577ee503178aaedbf2781ec61f6 | [
"CC-BY-4.0"
] | null | null | null | approxhaynet/runsinglecellLFP.py | ModelDBRepository/237469 | 15f71106b4f99577ee503178aaedbf2781ec61f6 | [
"CC-BY-4.0"
] | null | null | null | import simseedburst_func_withLFP
data = simseedburst_func_withLFP.simseedburst_func(Nmc=1, tstop=11000,mutID=0,rdSeed=1,Econ=0.00039,Icon=0.0006,nseg=5,rateCoeff=1.0,gNoiseCoeff=1.07,gSynCoeff=1.07,Ncells2save=1,sparsedt=1.0,Nsyns2save=1)
| 48.2 | 205 | 0.821577 | import simseedburst_func_withLFP
data = simseedburst_func_withLFP.simseedburst_func(Nmc=1, tstop=11000,mutID=0,rdSeed=1,Econ=0.00039,Icon=0.0006,nseg=5,rateCoeff=1.0,gNoiseCoeff=1.07,gSynCoeff=1.07,Ncells2save=1,sparsedt=1.0,Nsyns2save=1)
| true | true |
1c449dd14a675bb11a5d0b4e04f1b1f2dd18faf5 | 1,083 | py | Python | poptimizer/data/adapters/gateways/tests/test_cbr.py | poliyev/poptimizer | 71935c4365b0572e65b6d3172f925701dda283db | [
"Unlicense"
] | 94 | 2018-12-04T13:14:16.000Z | 2022-03-31T17:53:11.000Z | poptimizer/data/adapters/gateways/tests/test_cbr.py | poliyev/poptimizer | 71935c4365b0572e65b6d3172f925701dda283db | [
"Unlicense"
] | 55 | 2019-11-25T21:18:50.000Z | 2022-02-16T07:06:50.000Z | poptimizer/data/adapters/gateways/tests/test_cbr.py | poliyev/poptimizer | 71935c4365b0572e65b6d3172f925701dda283db | [
"Unlicense"
] | 25 | 2019-05-14T19:04:09.000Z | 2022-03-21T05:22:28.000Z | """Тесты загрузки данных о максимальных ставках депозитов с сайта ЦБР."""
from datetime import datetime
import pandas as pd
import pytest
from poptimizer.data.adapters.gateways import cbr
from poptimizer.data.adapters.html import parser
from poptimizer.shared import col
def test_date_parser():
"""Проверка обраб... | 27.769231 | 73 | 0.689751 | from datetime import datetime
import pandas as pd
import pytest
from poptimizer.data.adapters.gateways import cbr
from poptimizer.data.adapters.html import parser
from poptimizer.shared import col
def test_date_parser():
assert cbr.date_parser("III.05.2021") == datetime(2021, 5, 21)
assert cbr.date_parser("... | true | true |
1c449e1964a8cbe044f07acdc9c0bc3aa308f42c | 2,810 | py | Python | setup.py | NarekA/olmos | 740c1ec6351d96bcea4969ab87afdfb4686efbaf | [
"MIT"
] | null | null | null | setup.py | NarekA/olmos | 740c1ec6351d96bcea4969ab87afdfb4686efbaf | [
"MIT"
] | null | null | null | setup.py | NarekA/olmos | 740c1ec6351d96bcea4969ab87afdfb4686efbaf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. currentmodule:: setup.py
.. moduleauthor:: NarekA <my_email>
This file is used to create the package we'll publish to PyPI.
"""
import importlib.util
import os
from pathlib import Path
from setuptools import setup, find_packages, Command
from codecs import open #... | 29.893617 | 79 | 0.649466 |
import importlib.util
import os
from pathlib import Path
from setuptools import setup, find_packages, Command
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
# file in the ... | true | true |
1c449e4c0f9b6812e2ad6eb27f9fcdb6e97545d0 | 9,541 | py | Python | Gabarito FlappyBird.py | eduardomoraespy/flappy_bird_with_neural-network | d394b9a5dea6eef684ed7a0179cfe8272c1e3bdc | [
"MIT"
] | null | null | null | Gabarito FlappyBird.py | eduardomoraespy/flappy_bird_with_neural-network | d394b9a5dea6eef684ed7a0179cfe8272c1e3bdc | [
"MIT"
] | null | null | null | Gabarito FlappyBird.py | eduardomoraespy/flappy_bird_with_neural-network | d394b9a5dea6eef684ed7a0179cfe8272c1e3bdc | [
"MIT"
] | null | null | null | import pygame
import os
import random
import neat
ai_jogando = True
geracao = 0
TELA_LARGURA = 500
TELA_ALTURA = 700
IMAGEM_CANO = pygame.transform.scale2x(pygame.image.load(os.path.join('imgs', 'pipe.png')))
IMAGEM_CHAO = pygame.transform.scale2x(pygame.image.load(os.path.join('imgs', 'base.png')))
IMAGEM_BACKGROUN... | 31.281967 | 96 | 0.579289 | import pygame
import os
import random
import neat
ai_jogando = True
geracao = 0
TELA_LARGURA = 500
TELA_ALTURA = 700
IMAGEM_CANO = pygame.transform.scale2x(pygame.image.load(os.path.join('imgs', 'pipe.png')))
IMAGEM_CHAO = pygame.transform.scale2x(pygame.image.load(os.path.join('imgs', 'base.png')))
IMAGEM_BACKGROUN... | true | true |
1c449f9ed77b754c5bdb3a79fb6a5638a020d7b7 | 10,053 | py | Python | pyjsviz/lib/python3.4/site-packages/pip/vcs/git.py | Geege/dataviz-with-python-and-js | 2cb40ae243298d22ee98675692b44e8da950a812 | [
"MIT"
] | null | null | null | pyjsviz/lib/python3.4/site-packages/pip/vcs/git.py | Geege/dataviz-with-python-and-js | 2cb40ae243298d22ee98675692b44e8da950a812 | [
"MIT"
] | null | null | null | pyjsviz/lib/python3.4/site-packages/pip/vcs/git.py | Geege/dataviz-with-python-and-js | 2cb40ae243298d22ee98675692b44e8da950a812 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import logging
import tempfile
import os.path
from pip.compat import samefile
from pip.exceptions import BadCommand
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.six.moves.urllib import request as urllib_request
from pip.utils import display_pa... | 36.556364 | 78 | 0.562718 | from __future__ import absolute_import
import logging
import tempfile
import os.path
from pip.compat import samefile
from pip.exceptions import BadCommand
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.six.moves.urllib import request as urllib_request
from pip.utils import display_pa... | true | true |
1c449ff6839fb7088eca4a84f73092fc0c50bfd1 | 51,092 | py | Python | tests/core/test_Transaction.py | ademcan/QRL | 8eed7305c8a055758343ea414d8183f21b2bf6aa | [
"MIT"
] | 1 | 2020-07-11T15:32:52.000Z | 2020-07-11T15:32:52.000Z | tests/core/test_Transaction.py | ademcan/QRL | 8eed7305c8a055758343ea414d8183f21b2bf6aa | [
"MIT"
] | null | null | null | tests/core/test_Transaction.py | ademcan/QRL | 8eed7305c8a055758343ea414d8183f21b2bf6aa | [
"MIT"
] | null | null | null | from unittest import TestCase
import simplejson as json
from mock import Mock
from pyqrllib.pyqrllib import bin2hstr
from qrl.core.misc import logger
from qrl.core.BlockHeader import BlockHeader
from qrl.core.Transaction import Transaction, TransferTransaction, CoinBase, TokenTransaction, \
TransferTokenTransacti... | 61.779927 | 145 | 0.630627 | from unittest import TestCase
import simplejson as json
from mock import Mock
from pyqrllib.pyqrllib import bin2hstr
from qrl.core.misc import logger
from qrl.core.BlockHeader import BlockHeader
from qrl.core.Transaction import Transaction, TransferTransaction, CoinBase, TokenTransaction, \
TransferTokenTransacti... | true | true |
1c44a1470ed6157280477e07c867ba2749afc4e3 | 8,947 | py | Python | aggregate-reconstruction/reconstruct_aggregates.py | joncdavid/pymol-extras | 89a6a85e442892bd3c3c4e69d738673798d02efb | [
"MIT"
] | null | null | null | aggregate-reconstruction/reconstruct_aggregates.py | joncdavid/pymol-extras | 89a6a85e442892bd3c3c4e69d738673798d02efb | [
"MIT"
] | null | null | null | aggregate-reconstruction/reconstruct_aggregates.py | joncdavid/pymol-extras | 89a6a85e442892bd3c3c4e69d738673798d02efb | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
## #!/usr/bin/env python3
# filename: reconstruct_aggregates.py
# author: Jon David
# date: Wednesday, March 21, 2018
# description:
# Reads a vizmo path file are renders a subset of those
# configurations in PyMOL.
#--------------------------------------------------------------------
# notes... | 44.735 | 105 | 0.627473 |
hData(object):
def __init__(self, fname, numModels):
self.stepDict = {}
self.readFile(fname, numModels)
def readFile(self, fname, numModels):
stepID = 0
with open(fname, 'r') as f:
for line in f:
modelConfigList = self.parse(line, numModels)
... | true | true |
1c44a236c91b224f4e6cf8cf92d6dda93dbb02b4 | 341 | py | Python | lib/pool.py | Lufedi/reaper | bdf56b499e5b704c27b9f6c053d798c2a10fa4cf | [
"Apache-2.0"
] | 106 | 2015-07-21T16:18:26.000Z | 2022-03-31T06:45:34.000Z | lib/pool.py | Kowndinya2000/enhanced_repo_reaper | 744f794ba53bde5667b3b0f99b07273d0e32a495 | [
"Apache-2.0"
] | 21 | 2015-07-11T03:48:28.000Z | 2022-01-18T12:57:30.000Z | lib/pool.py | Kowndinya2000/enhanced_repo_reaper | 744f794ba53bde5667b3b0f99b07273d0e32a495 | [
"Apache-2.0"
] | 26 | 2015-07-22T22:38:21.000Z | 2022-03-14T10:11:56.000Z | import multiprocessing
import multiprocessing.pool
class NonDaemonicProcess(multiprocessing.Process):
def _get_daemon(self):
return False
def _set_daemon(self, value):
pass
daemon = property(_get_daemon, _set_daemon)
class NonDaemonicProcessPool(multiprocessing.pool.Pool):
Process ... | 20.058824 | 56 | 0.756598 | import multiprocessing
import multiprocessing.pool
class NonDaemonicProcess(multiprocessing.Process):
def _get_daemon(self):
return False
def _set_daemon(self, value):
pass
daemon = property(_get_daemon, _set_daemon)
class NonDaemonicProcessPool(multiprocessing.pool.Pool):
Process ... | true | true |
1c44a23a3372712f8db5d46c920eaa64d7901173 | 621 | py | Python | download_skipthought.py | prakashpandey9/Text2Image-PyTorch | 1cafacdc284590c30c635e7e519a5acaabd4463c | [
"MIT"
] | 28 | 2018-11-25T18:40:33.000Z | 2021-07-30T03:17:29.000Z | download_skipthought.py | prakashpandey9/Text2Image-PyTorch | 1cafacdc284590c30c635e7e519a5acaabd4463c | [
"MIT"
] | 1 | 2019-07-22T15:28:33.000Z | 2019-07-22T15:28:33.000Z | download_skipthought.py | prakashpandey9/Text2Image-PyTorch | 1cafacdc284590c30c635e7e519a5acaabd4463c | [
"MIT"
] | 4 | 2020-04-18T08:48:33.000Z | 2021-04-15T10:00:36.000Z | import os
print ('Downloading Skip-Thought Model ...........')
os.sysytem('wget http://www.cs.toronto.edu/~rkiros/models/dictionary.txt')
os.sysytem('wget http://www.cs.toronto.edu/~rkiros/models/utable.npy')
os.sysytem('wget http://www.cs.toronto.edu/~rkiros/models/btable.npy')
os.sysytem('wget http://www.cs.toronto.... | 51.75 | 76 | 0.723027 | import os
print ('Downloading Skip-Thought Model ...........')
os.sysytem('wget http://www.cs.toronto.edu/~rkiros/models/dictionary.txt')
os.sysytem('wget http://www.cs.toronto.edu/~rkiros/models/utable.npy')
os.sysytem('wget http://www.cs.toronto.edu/~rkiros/models/btable.npy')
os.sysytem('wget http://www.cs.toronto.... | true | true |
1c44a2f703726e0b57034ec9391f3a3d4cc34e07 | 5,464 | py | Python | meiduo03/meiduo03/settings/dev.py | physili/django_test | 09aa61f36e5d32f98af11057ea206dde8d082ac7 | [
"MIT"
] | 1 | 2020-04-25T04:50:30.000Z | 2020-04-25T04:50:30.000Z | meiduo03/meiduo03/settings/dev.py | physili/django_test | 09aa61f36e5d32f98af11057ea206dde8d082ac7 | [
"MIT"
] | null | null | null | meiduo03/meiduo03/settings/dev.py | physili/django_test | 09aa61f36e5d32f98af11057ea206dde8d082ac7 | [
"MIT"
] | null | null | null | """
Django settings for meiduo03 project.
Generated by 'django-admin startproject' using Django 2.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
i... | 27.32 | 91 | 0.625 |
import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, os.path.join(BASE_DIR,'apps'))
SECRET_KEY = 's5(_7x3_(ls=$_sts_6g*$arw1l7wj!yha2hz)t_$$^ua!!n!+'
DEBUG = True
ALLOWED_HOSTS = ['127.0.0.1','localhost','www.meiduo.site',]
AUTH_USER_MODEL = 'users.U... | true | true |
1c44a300424e00e2d85f0ffb0cabd4407222539d | 1,290 | py | Python | setup.py | tfiers/piprelease | 37bbea7788bb55408a10156e9d113a7532f20e29 | [
"MIT"
] | null | null | null | setup.py | tfiers/piprelease | 37bbea7788bb55408a10156e9d113a7532f20e29 | [
"MIT"
] | null | null | null | setup.py | tfiers/piprelease | 37bbea7788bb55408a10156e9d113a7532f20e29 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
GITHUB_URL = "https://github.com/tfiers/puprelease"
with open("ReadMe.md", mode="r", encoding="utf-8") as f:
readme = f.read()
setup(
name="puprelease",
description="Publishing a new version of your Python package has never been easier",
author="Tomas Fier... | 31.463415 | 90 | 0.627907 | from setuptools import find_packages, setup
GITHUB_URL = "https://github.com/tfiers/puprelease"
with open("ReadMe.md", mode="r", encoding="utf-8") as f:
readme = f.read()
setup(
name="puprelease",
description="Publishing a new version of your Python package has never been easier",
author="Tomas Fier... | true | true |
1c44a48fdd16495155236d2c05304496a7bd5de7 | 840 | py | Python | Oauth/app/routers/templates.py | 837477/Oauth | 8d01a84d71563d9d510950cdb77ae67de0da2a40 | [
"MIT"
] | 2 | 2022-01-09T09:26:50.000Z | 2022-01-16T15:56:10.000Z | Oauth/app/routers/templates.py | 837477/Oauth | 8d01a84d71563d9d510950cdb77ae67de0da2a40 | [
"MIT"
] | null | null | null | Oauth/app/routers/templates.py | 837477/Oauth | 8d01a84d71563d9d510950cdb77ae67de0da2a40 | [
"MIT"
] | 1 | 2022-03-02T05:30:13.000Z | 2022-03-02T05:30:13.000Z | from fastapi import APIRouter, Request
from fastapi.templating import Jinja2Templates
from config import config
from controller.google import GoogleOauth
from controller.kakao import KakaoOauth
from controller.naver import NaverOauth
from controller.facebook import FacebookOauth
router = APIRouter()
templates = Jinja... | 27.096774 | 60 | 0.70119 | from fastapi import APIRouter, Request
from fastapi.templating import Jinja2Templates
from config import config
from controller.google import GoogleOauth
from controller.kakao import KakaoOauth
from controller.naver import NaverOauth
from controller.facebook import FacebookOauth
router = APIRouter()
templates = Jinja... | true | true |
1c44a6cdf5d3d9445c99399658fd28df0e8e2d8b | 96 | py | Python | python3/help/set1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | python3/help/set1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | python3/help/set1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#!/usr/bin/python
import apihelper
set1 = set()
apihelper.info(set1)
| 9.6 | 22 | 0.697917 |
import apihelper
set1 = set()
apihelper.info(set1)
| true | true |
1c44a7936b88cb93c79a780c2dc47a1095d6da76 | 1,356 | py | Python | PyEngine3D/Render/RenderOptions.py | ubuntunux/PyEngine3D | e5542b5b185e8b9b56fc4669a6f22eb06c386c4f | [
"BSD-2-Clause"
] | 121 | 2017-06-07T19:42:30.000Z | 2022-03-31T04:42:29.000Z | PyEngine3D/Render/RenderOptions.py | MatthewPChapdelaine/PyEngine3D | e5542b5b185e8b9b56fc4669a6f22eb06c386c4f | [
"BSD-2-Clause"
] | 16 | 2015-12-21T16:57:55.000Z | 2017-03-06T15:22:37.000Z | PyEngine3D/Render/RenderOptions.py | ubuntunux/GuineaPig | f32852ecbfa3ebdbba00afc466719fc78e37361c | [
"BSD-2-Clause"
] | 16 | 2018-01-15T03:12:13.000Z | 2022-03-31T04:42:41.000Z | from enum import Enum
from PyEngine3D.Common import logger
from PyEngine3D.Utilities import *
class BlendMode(Enum):
BLEND = 0
ADDITIVE = 1
MULTIPLY = 2
SUBTRACT = 3
class RenderOption:
RENDER_LIGHT_PROBE = False
RENDER_ONLY_ATMOSPHERE = False
RENDER_FONT = True
RENDER_STATIC_ACTOR ... | 21.1875 | 81 | 0.679941 | from enum import Enum
from PyEngine3D.Common import logger
from PyEngine3D.Utilities import *
class BlendMode(Enum):
BLEND = 0
ADDITIVE = 1
MULTIPLY = 2
SUBTRACT = 3
class RenderOption:
RENDER_LIGHT_PROBE = False
RENDER_ONLY_ATMOSPHERE = False
RENDER_FONT = True
RENDER_STATIC_ACTOR ... | true | true |
1c44a7add9bb2ee186aadb91834062e0c8e8fe58 | 18,039 | py | Python | r2r_src/speaker.py | MarSaKi/NvEM | a636245c96c07f3b507b69f2a9837a4ff127f4aa | [
"MIT"
] | 16 | 2021-07-16T02:00:33.000Z | 2022-03-28T03:57:11.000Z | r2r_src/speaker.py | MarSaKi/NvEM | a636245c96c07f3b507b69f2a9837a4ff127f4aa | [
"MIT"
] | null | null | null | r2r_src/speaker.py | MarSaKi/NvEM | a636245c96c07f3b507b69f2a9837a4ff127f4aa | [
"MIT"
] | 1 | 2022-01-18T09:16:46.000Z | 2022-01-18T09:16:46.000Z | import torch
import numpy as np
from param import args
import os
import utils
import model
import torch.nn.functional as F
import time
class Speaker():
env_actions = {
'left': (0,-1, 0), # left
'right': (0, 1, 0), # right
'up': (0, 0, 1), # up
'down': (0, 0,-1), # down
'for... | 43.890511 | 144 | 0.543489 | import torch
import numpy as np
from param import args
import os
import utils
import model
import torch.nn.functional as F
import time
class Speaker():
env_actions = {
'left': (0,-1, 0),
'right': (0, 1, 0),
'up': (0, 0, 1),
'down': (0, 0,-1),
'forward': (1, 0, 0),
... | true | true |
1c44a87a151e7c36edf8003106e7947c0ba32f65 | 48,907 | py | Python | promgen/views.py | XILEF-Labs/promgen | f93b395df6e17a387edb9c4fcb431b10ce0a80cc | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | promgen/views.py | XILEF-Labs/promgen | f93b395df6e17a387edb9c4fcb431b10ce0a80cc | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | promgen/views.py | XILEF-Labs/promgen | f93b395df6e17a387edb9c4fcb431b10ce0a80cc | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017 LINE Corporation
# These sources are released under the terms of the MIT license: see LICENSE
import collections
import concurrent.futures
import datetime
import json
import logging
import platform
import time
from itertools import chain
import prometheus_client
import requests
from prometheus_cl... | 36.79985 | 147 | 0.631566 |
import collections
import concurrent.futures
import datetime
import json
import logging
import platform
import time
from itertools import chain
import prometheus_client
import requests
from prometheus_client.core import CounterMetricFamily, GaugeMetricFamily
from django.contrib import messages
from django.contrib.... | true | true |
1c44a983770db16ec1a6f33dad6de70d9d9f5c16 | 5,443 | py | Python | build/update_version.py | ruanyijian/QRCodeScanner | de3df01dec09a662d035dd43091dd024b322daf0 | [
"MIT"
] | 1 | 2019-03-07T14:07:59.000Z | 2019-03-07T14:07:59.000Z | build/update_version.py | ruanyijian/QRCodeScanner | de3df01dec09a662d035dd43091dd024b322daf0 | [
"MIT"
] | null | null | null | build/update_version.py | ruanyijian/QRCodeScanner | de3df01dec09a662d035dd43091dd024b322daf0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import xml.etree.cElementTree as etree
import datetime
TARGET_SRC_ROOT = "../src"
TARGET_PROJECT_NAMES = ["organic"]
TARGET_PLIST_FILES = ["Info.plist"]
DEBUG_ENABLE = False
def get_value_node_by_key(dict_node, key):
key_node = None
value_node = None
... | 28.497382 | 107 | 0.693184 |
import os
import xml.etree.cElementTree as etree
import datetime
TARGET_SRC_ROOT = "../src"
TARGET_PROJECT_NAMES = ["organic"]
TARGET_PLIST_FILES = ["Info.plist"]
DEBUG_ENABLE = False
def get_value_node_by_key(dict_node, key):
key_node = None
value_node = None
for key_value_node in dict_node:
t... | true | true |
1c44aa3d721e63405060a14d3289a34802de3b56 | 336 | py | Python | Python/widest-vertical-area-between-two-points-containing-no-points.py | sm2774us/leetcode_interview_prep_2021 | 33b41bea66c266b733372d9a8b9d2965cd88bf8c | [
"Fair"
] | null | null | null | Python/widest-vertical-area-between-two-points-containing-no-points.py | sm2774us/leetcode_interview_prep_2021 | 33b41bea66c266b733372d9a8b9d2965cd88bf8c | [
"Fair"
] | null | null | null | Python/widest-vertical-area-between-two-points-containing-no-points.py | sm2774us/leetcode_interview_prep_2021 | 33b41bea66c266b733372d9a8b9d2965cd88bf8c | [
"Fair"
] | null | null | null | # Time: O(nlogn)
# Space: O(n)
import itertools
class Solution(object):
def maxWidthOfVerticalArea(self, points):
"""
:type points: List[List[int]]
:rtype: int
"""
sorted_x = sorted({x for x, y in points})
return max([b-a for a, b in itertools.zip(sorted_x, sorted... | 22.4 | 81 | 0.568452 |
import itertools
class Solution(object):
def maxWidthOfVerticalArea(self, points):
sorted_x = sorted({x for x, y in points})
return max([b-a for a, b in itertools.zip(sorted_x, sorted_x[1:])] + [0])
| true | true |
1c44aa96dbe8157f19e95301eb7b709329e47002 | 380 | py | Python | engine/src/hopeit/testing/__init__.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | 15 | 2020-07-09T17:41:14.000Z | 2021-10-04T20:13:08.000Z | engine/src/hopeit/testing/__init__.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | 48 | 2020-07-10T15:16:17.000Z | 2022-03-03T19:46:46.000Z | engine/src/hopeit/testing/__init__.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | 3 | 2020-07-08T20:12:58.000Z | 2021-01-10T15:57:21.000Z | """
hopeit.engine testing module
Provides utilities to test and write unit or integration tests for App Events:
* **apps**: load config and execute app events for testing behaviour. Allows execution
of events without starting a server.
* **encryption**: provides data encryption for tests. Useful to test... | 31.666667 | 90 | 0.705263 | __all__ = ['apps',
'encryption']
| true | true |
1c44ab3987f668f224f7607d88fa170256a0b39a | 661 | py | Python | 6 Web Page with Flask/basic page/script1.py | mself9/pythonteachingcode | 45da22291ef38fa4cc971bc196e9bba968b9fe9e | [
"MIT"
] | null | null | null | 6 Web Page with Flask/basic page/script1.py | mself9/pythonteachingcode | 45da22291ef38fa4cc971bc196e9bba968b9fe9e | [
"MIT"
] | null | null | null | 6 Web Page with Flask/basic page/script1.py | mself9/pythonteachingcode | 45da22291ef38fa4cc971bc196e9bba968b9fe9e | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
app=Flask(__name__)
@app.route('/greet', methods=['POST'])
def greet():
inputName = request.form['myName']
ip = request.remote_addr
#write data to file or to DB
inputName = inputName.upper()+" hi! Visiting from " + str(ip)
return render_temp... | 26.44 | 67 | 0.652042 | from flask import Flask, render_template, request
app=Flask(__name__)
@app.route('/greet', methods=['POST'])
def greet():
inputName = request.form['myName']
ip = request.remote_addr
inputName = inputName.upper()+" hi! Visiting from " + str(ip)
return render_template("home.html",myName=input... | true | true |
1c44adf778926c615954fa37210f146b492819bd | 573 | py | Python | active_directory2/log.py | tjguk/active_directory2 | 0338ea9ea168fd37869689c108fe08f716408c95 | [
"MIT"
] | 2 | 2016-05-30T14:15:42.000Z | 2021-05-15T03:26:22.000Z | active_directory2/log.py | tjguk/active_directory2 | 0338ea9ea168fd37869689c108fe08f716408c95 | [
"MIT"
] | null | null | null | active_directory2/log.py | tjguk/active_directory2 | 0338ea9ea168fd37869689c108fe08f716408c95 | [
"MIT"
] | null | null | null | import os, sys
import logging
formatter = logging.Formatter ("[%(levelname)s] %(module)s.%(funcName)s: %(message)s")
logger = logging.getLogger ("active_directory2")
logger.setLevel (logging.DEBUG)
stderr_handler = logging.StreamHandler (sys.stderr)
stderr_handler.setLevel (logging.WARN)
stderr_handler.setFo... | 33.705882 | 87 | 0.77836 | import os, sys
import logging
formatter = logging.Formatter ("[%(levelname)s] %(module)s.%(funcName)s: %(message)s")
logger = logging.getLogger ("active_directory2")
logger.setLevel (logging.DEBUG)
stderr_handler = logging.StreamHandler (sys.stderr)
stderr_handler.setLevel (logging.WARN)
stderr_handler.setFo... | true | true |
1c44ae6d5a623af6a8eb72eb8c395b5f3d6c50e0 | 146 | py | Python | travis_test/__init__.py | Fixdq/Pagination | 3497bc72f1a010c382c7ca686d50dc95566f0a96 | [
"MIT"
] | 1 | 2019-02-19T06:04:50.000Z | 2019-02-19T06:04:50.000Z | travis_test/__init__.py | Fixdq/pagination | 3497bc72f1a010c382c7ca686d50dc95566f0a96 | [
"MIT"
] | null | null | null | travis_test/__init__.py | Fixdq/pagination | 3497bc72f1a010c382c7ca686d50dc95566f0a96 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 18-7-26 上午12:01
# @Author : fixdq
# @File : __init__.py.py
# @Software: PyCharm
| 16.222222 | 28 | 0.568493 | true | true | |
1c44aeadb7721c811d2848f1f8dd459a92307775 | 294 | py | Python | rss_scrapper/tasks/dummy.py | abrioy/rss_scrapper | b4778ae922ca7e2ef3a7720dc1c69eafffccf0af | [
"MIT"
] | null | null | null | rss_scrapper/tasks/dummy.py | abrioy/rss_scrapper | b4778ae922ca7e2ef3a7720dc1c69eafffccf0af | [
"MIT"
] | null | null | null | rss_scrapper/tasks/dummy.py | abrioy/rss_scrapper | b4778ae922ca7e2ef3a7720dc1c69eafffccf0af | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
from rss_scrapper.tasks.task import Task
logger = logging.getLogger(__name__)
class DummyTask(Task):
name = "dummy"
def init(self):
pass
def init_conf(self, conf):
pass
def do_execute(self, data):
yield data
| 14.7 | 40 | 0.62585 |
import logging
from rss_scrapper.tasks.task import Task
logger = logging.getLogger(__name__)
class DummyTask(Task):
name = "dummy"
def init(self):
pass
def init_conf(self, conf):
pass
def do_execute(self, data):
yield data
| true | true |
1c44aec2f19d1cb0ee064b23305e2fcaf8df3269 | 10,034 | py | Python | test/data/test_modules.py | abhinavarora/text | 69f67f3a775f3d3c6f85cfaa4ac3819500b90696 | [
"BSD-3-Clause"
] | 1 | 2022-01-03T17:30:57.000Z | 2022-01-03T17:30:57.000Z | test/data/test_modules.py | abhinavarora/text | 69f67f3a775f3d3c6f85cfaa4ac3819500b90696 | [
"BSD-3-Clause"
] | null | null | null | test/data/test_modules.py | abhinavarora/text | 69f67f3a775f3d3c6f85cfaa4ac3819500b90696 | [
"BSD-3-Clause"
] | null | null | null | import torch
from torch.nn import Linear
from torch.nn.functional import multi_head_attention_forward as mha_forward
from torchtext.nn import InProjContainer, MultiheadAttentionContainer, ScaledDotProduct
from ..common.torchtext_test_case import TorchtextTestCase
class TestModels(TorchtextTestCase):
def test_mul... | 44.794643 | 119 | 0.607435 | import torch
from torch.nn import Linear
from torch.nn.functional import multi_head_attention_forward as mha_forward
from torchtext.nn import InProjContainer, MultiheadAttentionContainer, ScaledDotProduct
from ..common.torchtext_test_case import TorchtextTestCase
class TestModels(TorchtextTestCase):
def test_mul... | true | true |
1c44af7b481705d54dd67e7ed0c411ed35f66a39 | 9,372 | py | Python | docs/conf.py | MasterScott/pem | 9d910ab8b5d1b965ad696ddb19060d100dd6aba6 | [
"MIT"
] | 89 | 2015-01-31T20:54:34.000Z | 2022-03-09T08:24:43.000Z | docs/conf.py | MasterScott/pem | 9d910ab8b5d1b965ad696ddb19060d100dd6aba6 | [
"MIT"
] | 41 | 2015-01-13T14:46:20.000Z | 2021-04-07T15:01:29.000Z | docs/conf.py | MasterScott/pem | 9d910ab8b5d1b965ad696ddb19060d100dd6aba6 | [
"MIT"
] | 32 | 2015-01-09T20:45:11.000Z | 2021-04-23T13:30:54.000Z | # -*- coding: utf-8 -*-
#
# pem documentation build configuration file, created by
# sphinx-quickstart on Thu Jul 9 13:12:00 2015.
#
# 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 file.
#
# All c... | 31.662162 | 79 | 0.705079 |
import pem
try:
import sphinx_rtd_theme
except ImportError:
sphinx_rtd_theme = None
linkcheck_ignore = [
r"https://github.com/.*/(issues|pull)/\d+",
]
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
]
templates_path = ["_temp... | true | true |
1c44afe65f59be39bef35bdf6165a67aa4f650fc | 92 | py | Python | app/auth/__init__.py | Bernicetwili/Pitch | 35d49df19eaff05bff77af1e4c71e155165c74ad | [
"MIT"
] | null | null | null | app/auth/__init__.py | Bernicetwili/Pitch | 35d49df19eaff05bff77af1e4c71e155165c74ad | [
"MIT"
] | null | null | null | app/auth/__init__.py | Bernicetwili/Pitch | 35d49df19eaff05bff77af1e4c71e155165c74ad | [
"MIT"
] | null | null | null | from flask import Blueprint
from . import views,forms
auth = Blueprint('auth',__name__)
| 11.5 | 33 | 0.75 | from flask import Blueprint
from . import views,forms
auth = Blueprint('auth',__name__)
| true | true |
1c44b02f6ceca7ed58c6127bce66e10cd451cce5 | 3,984 | py | Python | CLIDice.py | DNEAVES/CLIDice | d1cd7b069ea892f4747fc21da3e6623f2ecdacc7 | [
"MIT"
] | null | null | null | CLIDice.py | DNEAVES/CLIDice | d1cd7b069ea892f4747fc21da3e6623f2ecdacc7 | [
"MIT"
] | null | null | null | CLIDice.py | DNEAVES/CLIDice | d1cd7b069ea892f4747fc21da3e6623f2ecdacc7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.10
import sys
import random
import re
from pprint import pprint
from Print.help import dice_help
from Print.help2 import dice_help_two
from Print.credits import dice_credits
standard_dice = [2, 4, 6, 8, 10, 00, 12, 20, 30, 100]
def roll(dice: int, idv_mod: int, ignore_zero: bool = False):
... | 30.181818 | 91 | 0.490462 |
import sys
import random
import re
from pprint import pprint
from Print.help import dice_help
from Print.help2 import dice_help_two
from Print.credits import dice_credits
standard_dice = [2, 4, 6, 8, 10, 00, 12, 20, 30, 100]
def roll(dice: int, idv_mod: int, ignore_zero: bool = False):
if dice != 00:
... | true | true |
1c44b16a40d680be969d40f8ef3debeda1405080 | 7,935 | py | Python | 2019-2020/Lato/Sztuczna Inteligencja/Lista01/zad5.py | ldept/University | f5ec29dd1daa1c9dc2d1592c0ddab575146e80ee | [
"FTL"
] | null | null | null | 2019-2020/Lato/Sztuczna Inteligencja/Lista01/zad5.py | ldept/University | f5ec29dd1daa1c9dc2d1592c0ddab575146e80ee | [
"FTL"
] | null | null | null | 2019-2020/Lato/Sztuczna Inteligencja/Lista01/zad5.py | ldept/University | f5ec29dd1daa1c9dc2d1592c0ddab575146e80ee | [
"FTL"
] | null | null | null | import random
from zad4 import opt_dist
def print_nonogram(nonogram):
print(" ", end='')
for i in range(len(nonogram)):
print(col_numbers[i], end='')
print()
for index, row in enumerate(nonogram):
print(row_numbers[index], end='')
for col in row:
print("#" if col==1 ... | 40.075758 | 148 | 0.616761 | import random
from zad4 import opt_dist
def print_nonogram(nonogram):
print(" ", end='')
for i in range(len(nonogram)):
print(col_numbers[i], end='')
print()
for index, row in enumerate(nonogram):
print(row_numbers[index], end='')
for col in row:
print("#" if col==1 ... | true | true |
1c44b1733cd51ce1847605ee462170363bfdd49d | 1,671 | py | Python | post/models.py | bluesky0960/MiniProject1-DjangoWebApp_n | 368457dfde8ba6601b82ff218aa3bb3eed639a5a | [
"MIT"
] | null | null | null | post/models.py | bluesky0960/MiniProject1-DjangoWebApp_n | 368457dfde8ba6601b82ff218aa3bb3eed639a5a | [
"MIT"
] | null | null | null | post/models.py | bluesky0960/MiniProject1-DjangoWebApp_n | 368457dfde8ba6601b82ff218aa3bb3eed639a5a | [
"MIT"
] | null | null | null | from email.policy import default
from django.db import models
from ckeditor.fields import RichTextField
from tagging.fields import TagField
from django.conf import settings
class Post(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
author = models.CharField(m... | 34.102041 | 100 | 0.701376 | from email.policy import default
from django.db import models
from ckeditor.fields import RichTextField
from tagging.fields import TagField
from django.conf import settings
class Post(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
author = models.CharField(m... | true | true |
1c44b2b95aa8c78f49081c3ed36d75f8f3b16d67 | 4,321 | py | Python | data/process_data.py | akiaohk/Udacity-Disaster-Response-Pipelines | 9a6042a0d288381c1310de1948121bccf647f418 | [
"RSA-MD"
] | null | null | null | data/process_data.py | akiaohk/Udacity-Disaster-Response-Pipelines | 9a6042a0d288381c1310de1948121bccf647f418 | [
"RSA-MD"
] | null | null | null | data/process_data.py | akiaohk/Udacity-Disaster-Response-Pipelines | 9a6042a0d288381c1310de1948121bccf647f418 | [
"RSA-MD"
] | null | null | null | """
Project: Disaster Response Pipeline
Script Syntax for execution:
> python process_data.py <path to messages csv file> <path to categories csv file> <path to sqllite destination db>
> python process_data.py disaster_messages.csv disaster_categories.csv DisasterResponse.db
"""
# Import libraries
import sys
import ... | 35.130081 | 124 | 0.674612 |
import sys
import pandas as pd
import sqlite3
from sqlalchemy import create_engine
def load_data(messages_filepath, categories_filepath):
messages = pd.read_csv(messages_filepath)
categories = pd.read_csv(categories_filepath)
df = messages.merge(categories, on = ['id'])
return... | true | true |
1c44b2d75035252cf0824ee80a4607398785d535 | 148 | py | Python | tests/context.py | tetio/green_snake | 014d5cf4c96858abb09ee1a4bda0ee84b80b5666 | [
"BSD-2-Clause"
] | null | null | null | tests/context.py | tetio/green_snake | 014d5cf4c96858abb09ee1a4bda0ee84b80b5666 | [
"BSD-2-Clause"
] | null | null | null | tests/context.py | tetio/green_snake | 014d5cf4c96858abb09ee1a4bda0ee84b80b5666 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import green_snake | 21.142857 | 82 | 0.689189 |
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import green_snake | true | true |
1c44b32a5d9cf46b962dd89bdbf7c6993962dd46 | 9,077 | py | Python | convokit/politeness_collections/politeness_api/features/politeness_strategies.py | CornellNLP/Cornell-Conversational-Analysis-Toolkit | 0bc4d1a4baf25eec0861440dc3166c60d4cbe339 | [
"MIT"
] | 371 | 2016-07-19T22:10:13.000Z | 2022-03-28T08:04:32.000Z | convokit/politeness_collections/politeness_api/features/politeness_strategies.py | CornellNLP/Cornell-Conversational-Analysis-Toolkit | 0bc4d1a4baf25eec0861440dc3166c60d4cbe339 | [
"MIT"
] | 92 | 2017-07-25T22:04:11.000Z | 2022-03-29T13:46:07.000Z | convokit/politeness_collections/politeness_api/features/politeness_strategies.py | CornellNLP/Cornell-Conversational-Analysis-Toolkit | 0bc4d1a4baf25eec0861440dc3166c60d4cbe339 | [
"MIT"
] | 105 | 2016-07-04T15:04:53.000Z | 2022-03-30T01:36:38.000Z | import pkg_resources
import os
#####
# Word lists
hedges = [
"think", "thought", "thinking", "almost",
"apparent", "apparently", "appear", "appeared", "appears", "approximately", "around",
"assume", "assumed", "certain amount", "certain extent", "certain level", "claim",
"claimed", "doubt", "doubtful"... | 39.125 | 157 | 0.577393 | import pkg_resources
import os
= [
"think", "thought", "thinking", "almost",
"apparent", "apparently", "appear", "appeared", "appears", "approximately", "around",
"assume", "assumed", "certain amount", "certain extent", "certain level", "claim",
"claimed", "doubt", "doubtful", "essentially", "estimate"... | true | true |
1c44b3943158b819f95a2467b6baf9a67b1af264 | 4,385 | py | Python | 33RL/02maze/maze_env.py | cheerfulwang/python-tutorial | d0f7348e1da4ff954e3add66e1aae55d599283ee | [
"Apache-2.0"
] | 2 | 2021-01-04T10:44:44.000Z | 2022-02-13T07:53:41.000Z | 33RL/02maze/maze_env.py | zm79287/python-tutorial | d0f7348e1da4ff954e3add66e1aae55d599283ee | [
"Apache-2.0"
] | null | null | null | 33RL/02maze/maze_env.py | zm79287/python-tutorial | d0f7348e1da4ff954e3add66e1aae55d599283ee | [
"Apache-2.0"
] | 2 | 2020-11-23T08:58:51.000Z | 2022-02-13T07:53:42.000Z | # -*- coding: utf-8 -*-
"""
@author:XuMing(xuming624@qq.com)
@description:
"""
"""
Reinforcement learning maze example.
Red rectangle: explorer.
Black rectangles: hells [reward = -1].
Yellow bin circle: paradise [reward = +1].
All other states: ground [reward = 0].
This script ... | 29.039735 | 84 | 0.51927 |
import numpy as np
import time
import sys
if sys.version_info.major == 2:
import Tkinter as tk
else:
import tkinter as tk
UNIT = 40
MAZE_H = 4
MAZE_W = 4
class Maze(tk.Tk, object):
def __init__(self):
super(Maze, self).__init__()
self.action_space = ['u', 'd', 'l', 'r']
... | true | true |
1c44b5b492fbfda587fd4612218f612dc17333a7 | 1,124 | py | Python | fuzzysort.py | TylerZeroMaster/Fuzzysorting | fc894707dd3af001e809fcdad83170b1963fbab4 | [
"MIT"
] | null | null | null | fuzzysort.py | TylerZeroMaster/Fuzzysorting | fc894707dd3af001e809fcdad83170b1963fbab4 | [
"MIT"
] | null | null | null | fuzzysort.py | TylerZeroMaster/Fuzzysorting | fc894707dd3af001e809fcdad83170b1963fbab4 | [
"MIT"
] | null | null | null | from random import randint
from time import time
from array import array
def clock():
start = time()
while 1:
yield time() - start
def bubble_sort(a):
n = len(a)
while n != 0:
newn = 0
i = 1
while i < n:
fir = a[i - 1]
if fir > a[i]:
... | 22.039216 | 67 | 0.456406 | from random import randint
from time import time
from array import array
def clock():
start = time()
while 1:
yield time() - start
def bubble_sort(a):
n = len(a)
while n != 0:
newn = 0
i = 1
while i < n:
fir = a[i - 1]
if fir > a[i]:
... | true | true |
1c44b6516f38798433717035c3debbc803b324b5 | 1,566 | py | Python | src/rl/AtariAgent.py | fronovics/AI_playground | ac302c0694fa2182af343c257b28a033bc4cf5b9 | [
"Apache-2.0"
] | null | null | null | src/rl/AtariAgent.py | fronovics/AI_playground | ac302c0694fa2182af343c257b28a033bc4cf5b9 | [
"Apache-2.0"
] | null | null | null | src/rl/AtariAgent.py | fronovics/AI_playground | ac302c0694fa2182af343c257b28a033bc4cf5b9 | [
"Apache-2.0"
] | null | null | null | import random
import numpy as np
import gym
import cv2
from random import random
from src.rl.ReplayMemory import ReplayMemory
class AtariAgent(object):
def __init__(self, env: gym.Env, net, config):
self.mem = ReplayMemory(config)
self.env = env
self.net = net
self.eps = config['e... | 27.964286 | 78 | 0.57599 | import random
import numpy as np
import gym
import cv2
from random import random
from src.rl.ReplayMemory import ReplayMemory
class AtariAgent(object):
def __init__(self, env: gym.Env, net, config):
self.mem = ReplayMemory(config)
self.env = env
self.net = net
self.eps = config['e... | true | true |
1c44b8d5c17ebb7a41d93d6912bd998e1d2841bf | 4,284 | py | Python | src/models/model_lightning.py | granatb/mlops_handin | b0992be9667bf7f1e226efd0174289327a548efb | [
"MIT"
] | null | null | null | src/models/model_lightning.py | granatb/mlops_handin | b0992be9667bf7f1e226efd0174289327a548efb | [
"MIT"
] | null | null | null | src/models/model_lightning.py | granatb/mlops_handin | b0992be9667bf7f1e226efd0174289327a548efb | [
"MIT"
] | null | null | null | import os
import sys
from typing import Callable, List, Optional, Tuple, Union
import matplotlib.pyplot as plt # type: ignore
import pytorch_lightning as pl
import torch
import torch.nn.functional as F
from pytorch_lightning import loggers
from torch import nn
from torch.utils.data import Dataset
sys.path.insert(1, ... | 31.733333 | 88 | 0.65056 | import os
import sys
from typing import Callable, List, Optional, Tuple, Union
import matplotlib.pyplot as plt
import pytorch_lightning as pl
import torch
import torch.nn.functional as F
from pytorch_lightning import loggers
from torch import nn
from torch.utils.data import Dataset
sys.path.insert(1, os.path.join(s... | true | true |
1c44b965ae0544a2d5f9e1d40e2c8c42d789fbb0 | 13,724 | py | Python | models/resnet.py | eyov7/CV_LTH_Pre-training-LLNL | bb18ba2093328aeb4e5ab3929f2749264ef3c981 | [
"MIT"
] | 47 | 2020-12-15T03:40:50.000Z | 2022-03-30T03:38:29.000Z | models/resnet.py | eyov7/CV_LTH_Pre-training-LLNL | bb18ba2093328aeb4e5ab3929f2749264ef3c981 | [
"MIT"
] | null | null | null | models/resnet.py | eyov7/CV_LTH_Pre-training-LLNL | bb18ba2093328aeb4e5ab3929f2749264ef3c981 | [
"MIT"
] | 10 | 2021-03-17T01:28:57.000Z | 2022-02-24T20:23:57.000Z | import torch
import torch.nn as nn
from advertorch.utils import NormalizeByChannelMeanStd
from torchvision.models.utils import load_state_dict_from_url
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152', 'resnext50_32x4d', 'resnext101_32x8d',
'wide_resnet50_2', 'wide_res... | 38.659155 | 107 | 0.634509 | import torch
import torch.nn as nn
from advertorch.utils import NormalizeByChannelMeanStd
from torchvision.models.utils import load_state_dict_from_url
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152', 'resnext50_32x4d', 'resnext101_32x8d',
'wide_resnet50_2', 'wide_res... | true | true |
1c44ba1d050a5c452efb2e0f80a6341a0cd138e5 | 13,908 | py | Python | open_spiel/python/rl_environment.py | antonevenepoel/open_spiel | f2f0c786410018675fc40e9a5b82c40814555fa8 | [
"Apache-2.0"
] | null | null | null | open_spiel/python/rl_environment.py | antonevenepoel/open_spiel | f2f0c786410018675fc40e9a5b82c40814555fa8 | [
"Apache-2.0"
] | null | null | null | open_spiel/python/rl_environment.py | antonevenepoel/open_spiel | f2f0c786410018675fc40e9a5b82c40814555fa8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 DeepMind Technologies Ltd. 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 appl... | 36.124675 | 80 | 0.704774 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
from absl import logging
import enum
import numpy as np
import pyspiel
SIMULTANEOUS_PLAYER_ID = pyspiel.PlayerId.SIMULTANEOUS
class TimeStep(
collections.namedtuple(
... | true | true |
1c44bc896af0886897c2340327fd5e82882c9c91 | 467 | py | Python | malcolm/modules/builtin/parts/float64part.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | malcolm/modules/builtin/parts/float64part.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | malcolm/modules/builtin/parts/float64part.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | from malcolm.core import method_also_takes
from malcolm.modules.builtin.vmetas import NumberMeta
from .attributepart import AttributePart
@method_also_takes(
"initialValue", NumberMeta("float64", "Initial value of attribute"), 0.0,
)
class Float64Part(AttributePart):
def get_initial_value(self):
retur... | 31.133333 | 77 | 0.768737 | from malcolm.core import method_also_takes
from malcolm.modules.builtin.vmetas import NumberMeta
from .attributepart import AttributePart
@method_also_takes(
"initialValue", NumberMeta("float64", "Initial value of attribute"), 0.0,
)
class Float64Part(AttributePart):
def get_initial_value(self):
retur... | true | true |
1c44bc91b5ba84c01e22b26aeee62ac21ef1981b | 59,408 | py | Python | BD09.py | bdjahied/BD09 | 1cf50087a839b35261311cd95a9725e365ff1b90 | [
"Unlicense"
] | null | null | null | BD09.py | bdjahied/BD09 | 1cf50087a839b35261311cd95a9725e365ff1b90 | [
"Unlicense"
] | null | null | null | BD09.py | bdjahied/BD09 | 1cf50087a839b35261311cd95a9725e365ff1b90 | [
"Unlicense"
] | null | null | null | ó
8N6ac @ sƒ d Z d „ Z e e j ƒ Z e d d d d d d d d d e f d
d d d
d d d f f d d d d f f ƒ e _ e ƒ d S( sh‡
CODED BY BD JAHIED
FACEBOOK : BD JAHIED
CONTACT : https://www.facebook.com/jahied.bau
hunterboy = ['+++++++++++++++++++++++++++++++++++',
'--------... | 58.587771 | 24,162 | 0.395267 | ó
8N6ac @ sƒ d Z d „ Z e e j ƒ Z e d d d d d d d d d e f d
d d d
d d d f f d d d d f f ƒ e _ e ƒ d S( sh‡
CODED BY BD JAHIED
FACEBOOK : BD JAHIED
CONTACT : https://www.facebook.com/jahied.bau
hunterboy = ['+++++++++++++++++++++++++++++++++++',
'--------... | false | true |
1c44bde50b8bbe235553d6be40f12534a7ddeb26 | 15,857 | py | Python | test_reporting/junit_xml_parser.py | vkuma82/sonic-mgmt | 131764317fe590141b6fa38fc60f243b43bf616c | [
"Apache-2.0"
] | 1 | 2021-09-15T17:06:16.000Z | 2021-09-15T17:06:16.000Z | test_reporting/junit_xml_parser.py | vkuma82/sonic-mgmt | 131764317fe590141b6fa38fc60f243b43bf616c | [
"Apache-2.0"
] | null | null | null | test_reporting/junit_xml_parser.py | vkuma82/sonic-mgmt | 131764317fe590141b6fa38fc60f243b43bf616c | [
"Apache-2.0"
] | null | null | null | """Utilities for validating and parsing JUnit XML files generated by Pytest and Spytest.
This library/script should work for any test result XML file generated by Pytest or Spytest.
CLI Usage:
% python3 junit_xml_parser.py -h
usage: junit_xml_parser.py [-h] [--validate-only] [--compact] [--output-file OUTPUT_FILE] fi... | 32.627572 | 122 | 0.648483 | import argparse
import glob
import json
import sys
import os
from collections import defaultdict
from datetime import datetime
import defusedxml.ElementTree as ET
TEST_REPORT_CLIENT_VERSION = (1, 1, 0)
MAXIMUM_XML_SIZE = 20e7
MAXIMUM_SUMMARY_SIZE = 1024
TESTSUITE_TAG = "testsuite"
REQUIRED_TESTSUITE_ATTRIBUT... | true | true |
1c44be78f0de124dc36c88eff98e426707185e4e | 614 | py | Python | src/coincheck/withdraw.py | coincheckjp/coincheck-python | 85e8f9a9b9245e047a95cd33615284259e9ba399 | [
"MIT"
] | 46 | 2017-03-29T00:18:00.000Z | 2022-03-19T12:55:43.000Z | coincheck/withdraw.py | gamma-github/cryptCurrency | efb67f3a4ba0819224f73fefec53dfadcc2cbf78 | [
"MIT"
] | 3 | 2017-08-04T05:31:29.000Z | 2018-08-09T06:42:25.000Z | coincheck/withdraw.py | gamma-github/cryptCurrency | efb67f3a4ba0819224f73fefec53dfadcc2cbf78 | [
"MIT"
] | 21 | 2017-03-11T14:31:09.000Z | 2021-01-07T02:07:41.000Z | from coincheck.servicebase import ServiceBase
class Withdraw(ServiceBase):
baseUrl = '/api/withdraws'
def create(self, params = {}):
return self.coinCheck.request(ServiceBase.METHOD_POST, self.baseUrl, params)
def all(self, params = {}):
return self.coinCheck.request(ServiceBase.METHO... | 34.111111 | 112 | 0.640065 | from coincheck.servicebase import ServiceBase
class Withdraw(ServiceBase):
baseUrl = '/api/withdraws'
def create(self, params = {}):
return self.coinCheck.request(ServiceBase.METHOD_POST, self.baseUrl, params)
def all(self, params = {}):
return self.coinCheck.request(ServiceBase.METHO... | true | true |
1c44c0e71ba8b171137bece871c14f3ee1b13891 | 592 | py | Python | qingmi/__about__.py | xiongxianzhu/qingmi | ae5a446abec3982ebf2c5dde8546ef72f9453137 | [
"BSD-3-Clause"
] | 20 | 2018-05-22T09:29:40.000Z | 2020-12-11T04:53:15.000Z | qingmi/__about__.py | xiongxianzhu/qingmi | ae5a446abec3982ebf2c5dde8546ef72f9453137 | [
"BSD-3-Clause"
] | 65 | 2019-03-07T02:43:06.000Z | 2021-01-07T03:43:52.000Z | qingmi/__about__.py | xiongxianzhu/qingmi | ae5a446abec3982ebf2c5dde8546ef72f9453137 | [
"BSD-3-Clause"
] | 6 | 2019-03-08T06:39:47.000Z | 2021-07-01T11:02:56.000Z | __name__ = 'qingmi'
__description__ = 'Common modules and toolsets for rapid and efficient development of flask Web.'
__url__ = 'https://github.com/xiongxianzhu/qingmi'
__version_info__ = ('0', '1', '4')
__version__ = '.'.join(__version_info__)
__fullname__ = '-'.join((__name__, __version__))
__author__ = 'zhuxiongxian... | 42.285714 | 97 | 0.765203 | __name__ = 'qingmi'
__description__ = 'Common modules and toolsets for rapid and efficient development of flask Web.'
__url__ = 'https://github.com/xiongxianzhu/qingmi'
__version_info__ = ('0', '1', '4')
__version__ = '.'.join(__version_info__)
__fullname__ = '-'.join((__name__, __version__))
__author__ = 'zhuxiongxian... | true | true |
1c44c145c66898134fa0294e53de15df16edc466 | 3,992 | py | Python | youtube_dl/extractor/veoh.py | hackarada/youtube-dl | 2ba46715a41fe074eab2221170b2ac78fab93fad | [
"Unlicense"
] | 66,635 | 2019-03-10T21:34:18.000Z | 2022-03-31T23:50:31.000Z | youtube_dl/extractor/veoh.py | hackarada/youtube-dl | 2ba46715a41fe074eab2221170b2ac78fab93fad | [
"Unlicense"
] | 10,936 | 2019-03-10T21:35:47.000Z | 2022-03-31T23:46:52.000Z | youtube_dl/extractor/veoh.py | hackarada/youtube-dl | 2ba46715a41fe074eab2221170b2ac78fab93fad | [
"Unlicense"
] | 15,194 | 2019-03-10T21:09:27.000Z | 2022-03-31T22:13:49.000Z | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
int_or_none,
parse_duration,
qualities,
)
class VeohIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?veoh\.com/(?:watch|embed|iphone/#_Watch)/(?P<id>(?:v|e|yapi-)[\da-zA-Z]+)'
_TESTS = [{
... | 38.384615 | 270 | 0.549098 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
int_or_none,
parse_duration,
qualities,
)
class VeohIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?veoh\.com/(?:watch|embed|iphone/#_Watch)/(?P<id>(?:v|e|yapi-)[\da-zA-Z]+)'
_TESTS = [{
... | true | true |
1c44c19e674fd96d888109c3073edd9787436023 | 3,193 | py | Python | annotation/management/commands/fix_annotation_link_transcripts.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 5 | 2021-01-14T03:34:42.000Z | 2022-03-07T15:34:18.000Z | annotation/management/commands/fix_annotation_link_transcripts.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 551 | 2020-10-19T00:02:38.000Z | 2022-03-30T02:18:22.000Z | annotation/management/commands/fix_annotation_link_transcripts.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | null | null | null | #!/usr/bin/env python3
import logging
from django.core.management.base import BaseCommand
from django.db.models import Q, Func, Value, F
from annotation.models import VariantAnnotation, VariantTranscriptAnnotation, VariantAnnotationVersion, \
TranscriptVersion, defaultdict
from snpdb.models.models_genome import ... | 54.118644 | 122 | 0.656123 |
import logging
from django.core.management.base import BaseCommand
from django.db.models import Q, Func, Value, F
from annotation.models import VariantAnnotation, VariantTranscriptAnnotation, VariantAnnotationVersion, \
TranscriptVersion, defaultdict
from snpdb.models.models_genome import GenomeBuild
class Co... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.