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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c15a8a72a21b270b6e69fc778470237ec8c8d8a | 767 | py | Python | django-vue/djangoAPI/api/views/temp.py | BeautifulBeer/Youflix | 751dcf257ce36b7ac597eaabcf4e67ab237f1eff | [
"Apache-2.0"
] | 3 | 2021-09-05T14:25:29.000Z | 2021-12-13T05:06:24.000Z | django-vue/djangoAPI/api/views/temp.py | BeautifulBeer/Youflix | 751dcf257ce36b7ac597eaabcf4e67ab237f1eff | [
"Apache-2.0"
] | 11 | 2020-06-06T00:51:00.000Z | 2022-02-26T20:43:16.000Z | django-vue/djangoAPI/api/views/temp.py | BeautifulBeer/Youflix | 751dcf257ce36b7ac597eaabcf4e67ab237f1eff | [
"Apache-2.0"
] | 3 | 2019-11-28T03:19:42.000Z | 2019-12-04T06:22:33.000Z | from rest_framework import status
from rest_framework.decorators import api_view
from django.db.models import F
from django.http import JsonResponse
from api.models import Movie, User, Genre, Rating, Crew, Cast, UserCluster,Profile
from api.serializers import MovieSerializer, CrewSerializer, CastSerializer
@api_view([... | 36.52381 | 82 | 0.676662 | from rest_framework import status
from rest_framework.decorators import api_view
from django.db.models import F
from django.http import JsonResponse
from api.models import Movie, User, Genre, Rating, Crew, Cast, UserCluster,Profile
from api.serializers import MovieSerializer, CrewSerializer, CastSerializer
@api_view([... | true | true |
1c15ac902cf993e69c6d99eff85e24e2009daee7 | 3,094 | py | Python | admin/release.py | laymonage/vws-python | 75082c6f8f130975fbe1a9497664af94c4212f3b | [
"MIT"
] | 32 | 2018-11-16T11:01:10.000Z | 2022-03-24T07:36:00.000Z | admin/release.py | laymonage/vws-python | 75082c6f8f130975fbe1a9497664af94c4212f3b | [
"MIT"
] | 420 | 2020-05-18T21:49:55.000Z | 2022-03-31T05:28:33.000Z | admin/release.py | laymonage/vws-python | 75082c6f8f130975fbe1a9497664af94c4212f3b | [
"MIT"
] | 12 | 2019-04-16T10:10:59.000Z | 2021-12-26T09:29:45.000Z | """
Release the next version.
"""
import datetime
import os
import subprocess
from pathlib import Path
from github import Github
from github.ContentFile import ContentFile
from github.Repository import Repository
def get_version(github_repository: Repository) -> str:
"""
Return the next version.
This is... | 30.333333 | 78 | 0.661603 |
import datetime
import os
import subprocess
from pathlib import Path
from github import Github
from github.ContentFile import ContentFile
from github.Repository import Repository
def get_version(github_repository: Repository) -> str:
utc_now = datetime.datetime.utcnow()
date_format = '%Y.%m.%d'
date_str... | true | true |
1c15ae273a5b56ff489e76a3ccef30b6a35462c8 | 4,572 | py | Python | grr/core/grr_response_core/lib/parsers/chrome_history.py | magnologan/grr | 06eeb071e9a925b34f67caf776c3330b39154850 | [
"Apache-2.0"
] | null | null | null | grr/core/grr_response_core/lib/parsers/chrome_history.py | magnologan/grr | 06eeb071e9a925b34f67caf776c3330b39154850 | [
"Apache-2.0"
] | null | null | null | grr/core/grr_response_core/lib/parsers/chrome_history.py | magnologan/grr | 06eeb071e9a925b34f67caf776c3330b39154850 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Parser for Google chrome/chromium History files."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import itertools
from future.moves.urllib import parse as urlparse
from past.builtins impor... | 37.47541 | 79 | 0.671916 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import itertools
from future.moves.urllib import parse as urlparse
from past.builtins import long
from grr_response_core.lib import parser
from grr_response_core.lib.p... | true | true |
1c15ae7bcf377cfb7c59893b36672da5ad952f88 | 434 | py | Python | test/workflows/nesting.py | BvB93/noodles | 7547471baa18a11b8020c017388a7e208d194ef4 | [
"Apache-2.0"
] | 22 | 2016-07-26T20:42:08.000Z | 2022-02-08T16:04:25.000Z | test/workflows/nesting.py | BvB93/noodles | 7547471baa18a11b8020c017388a7e208d194ef4 | [
"Apache-2.0"
] | 71 | 2015-12-24T18:44:32.000Z | 2022-02-11T11:31:08.000Z | test/workflows/nesting.py | BvB93/noodles | 7547471baa18a11b8020c017388a7e208d194ef4 | [
"Apache-2.0"
] | 8 | 2016-12-22T10:14:28.000Z | 2020-06-05T21:01:51.000Z | from .workflow_factory import workflow_factory
import noodles
@noodles.schedule
def sqr(a):
return a*a
@noodles.schedule
def sum(a, buildin_sum=sum):
return buildin_sum(a)
@noodles.schedule
def map(f, lst):
return noodles.gather_all(f(x) for x in lst)
@noodles.schedule
def num_range(a, b):
retur... | 15.5 | 48 | 0.718894 | from .workflow_factory import workflow_factory
import noodles
@noodles.schedule
def sqr(a):
return a*a
@noodles.schedule
def sum(a, buildin_sum=sum):
return buildin_sum(a)
@noodles.schedule
def map(f, lst):
return noodles.gather_all(f(x) for x in lst)
@noodles.schedule
def num_range(a, b):
retur... | true | true |
1c15af6fdca3c613c1aac264eda6dc37d049d0d7 | 973 | py | Python | setup.py | bradmontgomery/django-commen5 | 014e624d49dba0d4ef676db3ea635abf84462a65 | [
"MIT"
] | 1 | 2017-03-02T13:45:47.000Z | 2017-03-02T13:45:47.000Z | setup.py | bradmontgomery/django-commen5 | 014e624d49dba0d4ef676db3ea635abf84462a65 | [
"MIT"
] | null | null | null | setup.py | bradmontgomery/django-commen5 | 014e624d49dba0d4ef676db3ea635abf84462a65 | [
"MIT"
] | null | null | null | from setuptools import setup
from commen5 import __version__
setup(
name='django-commen5',
version=__version__,
description="django-commen5 creates a comment template tag named: commen5",
long_description=open('README.rst').read(),
author='Brad Montgomery',
author_email='brad@bradmontgomery.net... | 32.433333 | 79 | 0.642343 | from setuptools import setup
from commen5 import __version__
setup(
name='django-commen5',
version=__version__,
description="django-commen5 creates a comment template tag named: commen5",
long_description=open('README.rst').read(),
author='Brad Montgomery',
author_email='brad@bradmontgomery.net... | true | true |
1c15afa18f4a09251f00366725276fc6e9cb2bd7 | 148 | py | Python | pycon_multitenant/tenants/models.py | MiltonLn/pycon-multitenant | d3c875b5beca4ffbeb7c8a58fe58dab7896252aa | [
"MIT"
] | 5 | 2018-03-25T18:43:57.000Z | 2020-05-16T15:43:19.000Z | pycon_multitenant/tenants/models.py | MiltonLn/pycon-multitenant | d3c875b5beca4ffbeb7c8a58fe58dab7896252aa | [
"MIT"
] | null | null | null | pycon_multitenant/tenants/models.py | MiltonLn/pycon-multitenant | d3c875b5beca4ffbeb7c8a58fe58dab7896252aa | [
"MIT"
] | 2 | 2019-03-27T15:55:21.000Z | 2021-02-19T20:20:55.000Z | from django.db import models
from tenant_schemas.models import TenantMixin
class Tenant(TenantMixin):
name = models.CharField(max_length=100)
| 21.142857 | 45 | 0.804054 | from django.db import models
from tenant_schemas.models import TenantMixin
class Tenant(TenantMixin):
name = models.CharField(max_length=100)
| true | true |
1c15b0045b09de4ca53eee9c584353159c784c54 | 700 | py | Python | utils.py | Pomaru/simple-credentials | 565c1b1e23ec30c64eb5f5eea67c04e6f3311ed5 | [
"MIT"
] | null | null | null | utils.py | Pomaru/simple-credentials | 565c1b1e23ec30c64eb5f5eea67c04e6f3311ed5 | [
"MIT"
] | null | null | null | utils.py | Pomaru/simple-credentials | 565c1b1e23ec30c64eb5f5eea67c04e6f3311ed5 | [
"MIT"
] | null | null | null | import json
import os
class Credentials:
def __init__(self, argv):
for key, val in argv.items():
self.__dict__[key] = val
def __repr__(self):
return f"These are the available keys: {list(self.__dict__.keys()}."
@classmethod
def from_json(cls, json_data, f... | 26.923077 | 77 | 0.548571 | import json
import os
class Credentials:
def __init__(self, argv):
for key, val in argv.items():
self.__dict__[key] = val
def __repr__(self):
return f"These are the available keys: {list(self.__dict__.keys()}."
@classmethod
def from_json(cls, json_data, f... | false | true |
1c15b095d1ed1e505b0ad012b15723b3727f30ed | 704 | py | Python | pypro/aperitivos/views.py | guyrux/django_again | 4dfe6ff75e566035b5fd5ff8da6a5c640e02da8b | [
"MIT"
] | null | null | null | pypro/aperitivos/views.py | guyrux/django_again | 4dfe6ff75e566035b5fd5ff8da6a5c640e02da8b | [
"MIT"
] | 469 | 2021-02-23T03:01:52.000Z | 2022-03-31T22:19:42.000Z | pypro/aperitivos/views.py | guyrux/django_again | 4dfe6ff75e566035b5fd5ff8da6a5c640e02da8b | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.urls import reverse
class Video:
def __init__(self, slug, titulo, youtube_id) -> None:
self.slug = slug
self.titulo = titulo
def get_absolut_url(self):
return reverse('aperitivos:video', args=(self.slug,))
videos = [
Video('01', 'C... | 24.275862 | 80 | 0.666193 | from django.shortcuts import render
from django.urls import reverse
class Video:
def __init__(self, slug, titulo, youtube_id) -> None:
self.slug = slug
self.titulo = titulo
def get_absolut_url(self):
return reverse('aperitivos:video', args=(self.slug,))
videos = [
Video('01', 'C... | true | true |
1c15b0ed8c388d4d5903e220a06f8486ab96e39c | 24,853 | py | Python | venv/lib/python2.7/site-packages/ansible/modules/system/hostname.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | venv/lib/python2.7/site-packages/ansible/modules/system/hostname.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | venv/lib/python2.7/site-packages/ansible/modules/system/hostname.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2013, Hiroaki Nakamura <hnakamur@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_versi... | 30.988778 | 133 | 0.594335 |
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: hostname
author:
- Adrian Likins (@alikins)
- Hidek... | true | true |
1c15b10b05bd7c21d1dfa3875ccc5f241063ea6d | 7,332 | py | Python | shared.py | abdulsalaam/contractsV2 | 862d44ae5782263f6d99e32bfc270d58e7c2dd56 | [
"Apache-2.0"
] | null | null | null | shared.py | abdulsalaam/contractsV2 | 862d44ae5782263f6d99e32bfc270d58e7c2dd56 | [
"Apache-2.0"
] | null | null | null | shared.py | abdulsalaam/contractsV2 | 862d44ae5782263f6d99e32bfc270d58e7c2dd56 | [
"Apache-2.0"
] | 1 | 2021-06-20T08:45:03.000Z | 2021-06-20T08:45:03.000Z | #!/usr/bin/python3
from munch import Munch
def Constants():
return Munch({
"ZERO_ADDRESS": "0x0000000000000000000000000000000000000000",
"ONE_ADDRESS": "0x0000000000000000000000000000000000000001",
"MAX_UINT": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
})
def... | 68.523364 | 354 | 0.736088 |
from munch import Munch
def Constants():
return Munch({
"ZERO_ADDRESS": "0x0000000000000000000000000000000000000000",
"ONE_ADDRESS": "0x0000000000000000000000000000000000000001",
"MAX_UINT": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
})
def Addresses():
r... | true | true |
1c15b14333b33aa70956dc222723cb12321e56f7 | 2,344 | py | Python | examples/dfp/v201511/custom_targeting_service/update_custom_targeting_keys.py | wbrp/googleads-python-lib | c0f8ce6c4acfe88ce8f913a4f0e0e92b548e1022 | [
"Apache-2.0"
] | 1 | 2020-05-23T11:32:32.000Z | 2020-05-23T11:32:32.000Z | examples/dfp/v201511/custom_targeting_service/update_custom_targeting_keys.py | wbrp/googleads-python-lib | c0f8ce6c4acfe88ce8f913a4f0e0e92b548e1022 | [
"Apache-2.0"
] | null | null | null | examples/dfp/v201511/custom_targeting_service/update_custom_targeting_keys.py | wbrp/googleads-python-lib | c0f8ce6c4acfe88ce8f913a4f0e0e92b548e1022 | [
"Apache-2.0"
] | 2 | 2018-04-20T02:16:33.000Z | 2020-11-12T20:58:54.000Z | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 33.014085 | 80 | 0.699232 |
"""This example updates the display name of a single custom targeting key.
To determine which custom targeting keys exist, run
get_all_custom_targeting_keys_and_values.py."""
from googleads import dfp
CUSTOM_TARGETING_KEY_ID = 'INSERT_CUSTOM_TARGETING_KEY_ID_HERE'
def main(client, key_id):
custom_targeting_s... | false | true |
1c15b1a6c5746ce820337ef3726bd039a5df1340 | 4,693 | py | Python | env/Lib/site-packages/jwt/jwt.py | iamagoogler/crud_flask | 42280fd33b7c34ee3bb24cf3fe6e0f830a8408ef | [
"MIT"
] | 112 | 2016-01-13T09:27:06.000Z | 2022-01-24T04:06:41.000Z | env/Lib/site-packages/jwt/jwt.py | iamagoogler/crud_flask | 42280fd33b7c34ee3bb24cf3fe6e0f830a8408ef | [
"MIT"
] | 44 | 2017-01-31T06:36:34.000Z | 2022-03-14T22:04:27.000Z | env/Lib/site-packages/jwt/jwt.py | iamagoogler/crud_flask | 42280fd33b7c34ee3bb24cf3fe6e0f830a8408ef | [
"MIT"
] | 30 | 2017-05-08T20:04:31.000Z | 2021-12-22T14:28:21.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2017 Gehirn Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 39.108333 | 79 | 0.611123 |
import json
from datetime import datetime, timezone
from typing import AbstractSet, Any, Dict, Optional
from jwt.utils import (
get_time_from_int,
)
from .exceptions import (
JWSEncodeError,
JWSDecodeError,
JWTEncodeError,
JWTDecodeError,
)
from .jwk import AbstractJWKBase
from .jws import JWS
c... | true | true |
1c15b32d7db0b019357bfe396ed8f6cc35eb6250 | 19 | py | Python | jobslib/version.py | dimexid/jobslib | 1eff64b266b6da71abf8874d94181dfbc569fe41 | [
"BSD-3-Clause"
] | null | null | null | jobslib/version.py | dimexid/jobslib | 1eff64b266b6da71abf8874d94181dfbc569fe41 | [
"BSD-3-Clause"
] | 1 | 2020-09-02T07:57:33.000Z | 2020-09-02T07:57:33.000Z | jobslib/version.py | dimexid/jobslib | 1eff64b266b6da71abf8874d94181dfbc569fe41 | [
"BSD-3-Clause"
] | 3 | 2020-08-18T07:56:59.000Z | 2020-10-22T08:49:54.000Z |
VERSION = '3.1.0'
| 6.333333 | 17 | 0.526316 |
VERSION = '3.1.0'
| true | true |
1c15b5d71b1062e8e09bb71e34139d093ff0cddb | 4,254 | py | Python | WarpDrive/WarpDriveLib/Effects/Effect.py | jamesobutler/SlicerNetstim | f13c8eb8996f9cd04375cf3ec845c919b12b87ae | [
"BSD-3-Clause"
] | 9 | 2021-04-19T15:29:19.000Z | 2022-01-18T11:53:46.000Z | WarpDrive/WarpDriveLib/Effects/Effect.py | jamesobutler/SlicerNetstim | f13c8eb8996f9cd04375cf3ec845c919b12b87ae | [
"BSD-3-Clause"
] | 5 | 2021-07-01T21:44:19.000Z | 2022-02-07T08:14:33.000Z | WarpDrive/WarpDriveLib/Effects/Effect.py | jamesobutler/SlicerNetstim | f13c8eb8996f9cd04375cf3ec845c919b12b87ae | [
"BSD-3-Clause"
] | 9 | 2021-06-30T20:04:09.000Z | 2022-02-06T17:43:11.000Z | import vtk, qt, slicer
class AbstractEffect():
"""
One instance of this will be created per-view when the effect
is selected. It is responsible for implementing feedback and
label map changes in response to user input.
This class observes the editor parameter node to configure itself
and queries the curr... | 36.050847 | 85 | 0.720263 | import vtk, qt, slicer
class AbstractEffect():
def __init__(self,sliceWidget):
self.sliceWidget = sliceWidget
self.sliceLogic = sliceWidget.sliceLogic()
self.sliceView = self.sliceWidget.sliceView()
self.interactor = self.sliceView.interactorStyle().GetInteractor()
self.renderWindow = ... | true | true |
1c15b634ddb263d20add136ebc95c1405585f3a8 | 14,133 | py | Python | stumpy/mpdist.py | mexxexx/stumpy | dcfa14b98aee375da4239363c1d2a6520fb54e80 | [
"BSD-3-Clause"
] | null | null | null | stumpy/mpdist.py | mexxexx/stumpy | dcfa14b98aee375da4239363c1d2a6520fb54e80 | [
"BSD-3-Clause"
] | null | null | null | stumpy/mpdist.py | mexxexx/stumpy | dcfa14b98aee375da4239363c1d2a6520fb54e80 | [
"BSD-3-Clause"
] | null | null | null | # STUMPY
# Copyright 2019 TD Ameritrade. Released under the terms of the 3-Clause BSD license.
# STUMPY is a trademark of TD Ameritrade IP Company, Inc. All rights reserved.
import numpy as np
import math
from . import stump, stumped, core
from .core import _mass_distance_matrix
from .aampdist import aampdist, aampdi... | 35.870558 | 88 | 0.675157 |
import numpy as np
import math
from . import stump, stumped, core
from .core import _mass_distance_matrix
from .aampdist import aampdist, aampdisted
def _compute_P_ABBA(
T_A, T_B, m, P_ABBA, dask_client=None, device_id=None, mp_func=stump
):
n_A = T_A.shape[0]
partial_mp_func = core._get_partial_mp_func... | true | true |
1c15b67075e26a55e6027671f27fec8912158fb7 | 121,521 | py | Python | src/oci/email/email_client.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2020-09-10T22:09:45.000Z | 2021-12-24T17:00:07.000Z | src/oci/email/email_client.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/email/email_client.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 48.051008 | 261 | 0.645205 |
from __future__ import absolute_import
from oci._vendor import requests from oci._vendor import six
from oci import retry, circuit_breaker from oci.base_client import BaseClient
from oci.config import get_config_value_or_default, validate_config
from oci.signer import Signer
from oci.util import Sentinel, get_sign... | true | true |
1c15b6d62324a7a29be460f7a59c6c67a0f8f2f0 | 441 | py | Python | Lab 3/ScorePressed/ScoreBoard.py | Cheezegami/HKU-ECTTP | 1bfeefbb6ed372128edd2e62602fe5c8d35bd0bd | [
"MIT"
] | null | null | null | Lab 3/ScorePressed/ScoreBoard.py | Cheezegami/HKU-ECTTP | 1bfeefbb6ed372128edd2e62602fe5c8d35bd0bd | [
"MIT"
] | null | null | null | Lab 3/ScorePressed/ScoreBoard.py | Cheezegami/HKU-ECTTP | 1bfeefbb6ed372128edd2e62602fe5c8d35bd0bd | [
"MIT"
] | null | null | null | from Controls import Controls
class ScoreBoard():
def __init__(self,int_score) : # Constructor
self.int_score=int_score
def update(self):
self.countScoreBoard()
self.drawScoreBoard()
def countScoreBoard(self):
if(mousePressed):
self.int_... | 25.941176 | 49 | 0.582766 | from Controls import Controls
class ScoreBoard():
def __init__(self,int_score) : self.int_score=int_score
def update(self):
self.countScoreBoard()
self.drawScoreBoard()
def countScoreBoard(self):
if(mousePressed):
self.int_score += 10
... | true | true |
1c15b8526e36438511f7ba21491e2beadd89f237 | 73 | py | Python | python/338.counting-bits.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | python/338.counting-bits.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | python/338.counting-bits.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | class Solution:
def countBits(self, num: int) -> List[int]:
| 18.25 | 47 | 0.575342 | class Solution:
def countBits(self, num: int) -> List[int]:
| false | true |
1c15b8a26ad9e3d9d233939a0977159dac2b46f2 | 2,555 | py | Python | TamTamBotDj/TamTamBotDj.py | asvbkr/ttBotDevHelper | 9c2cd7cd3bdd8d331285411d1187d7df8afe56ab | [
"Apache-2.0"
] | 1 | 2019-10-22T10:42:08.000Z | 2019-10-22T10:42:08.000Z | TamTamBotDj/TamTamBotDj.py | asvbkr/ttBotDevHelper | 9c2cd7cd3bdd8d331285411d1187d7df8afe56ab | [
"Apache-2.0"
] | null | null | null | TamTamBotDj/TamTamBotDj.py | asvbkr/ttBotDevHelper | 9c2cd7cd3bdd8d331285411d1187d7df8afe56ab | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
from django.utils.timezone import now
from TamTamBot import UpdateCmn
from TamTamBot.TamTamBot import TamTamBot
from djh_app.models import TtbUser, TtbPrevStep
from openapi_client import Update
class TamTamBotDj(TamTamBot):
@property
def description(self):
# type: () -> str
... | 34.527027 | 126 | 0.639922 | from django.utils.timezone import now
from TamTamBot import UpdateCmn
from TamTamBot.TamTamBot import TamTamBot
from djh_app.models import TtbUser, TtbPrevStep
from openapi_client import Update
class TamTamBotDj(TamTamBot):
@property
def description(self):
raise NotImplementedError
@pro... | true | true |
1c15b9ae803bf91a937a21d242f513217edab9ac | 10,408 | py | Python | src/coreclr/scripts/superpmi_benchmarks.py | pyracanda/runtime | 72bee25ab532a4d0636118ec2ed3eabf3fd55245 | [
"MIT"
] | 9,402 | 2019-11-25T23:26:24.000Z | 2022-03-31T23:19:41.000Z | src/coreclr/scripts/superpmi_benchmarks.py | pyracanda/runtime | 72bee25ab532a4d0636118ec2ed3eabf3fd55245 | [
"MIT"
] | 37,522 | 2019-11-25T23:30:32.000Z | 2022-03-31T23:58:30.000Z | src/coreclr/scripts/superpmi_benchmarks.py | pyracanda/runtime | 72bee25ab532a4d0636118ec2ed3eabf3fd55245 | [
"MIT"
] | 3,629 | 2019-11-25T23:29:16.000Z | 2022-03-31T21:52:28.000Z | #!/usr/bin/env python3
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
#
#
# Title: superpmi_benchmarks.py
#
# Notes:
#
# Script to perform the superpmi collection while executing the Microbenchmarks present
# in https://github.com... | 38.405904 | 158 | 0.65565 |
import argparse
import re
import sys
import stat
from os import path
from os.path import isfile
from shutil import copyfile
from coreclr_arguments import *
from jitutil import run_command, ChangeDir, TempDir
is_windows = platform.system() == "Windows"
parser = argparse.ArgumentParser(description="description")
pars... | true | true |
1c15bbc74ad295c8bfee184492cd1d83eb8f09fe | 476 | py | Python | rusentrel/rusentrel_ds_cv/mi/ian_ends.py | nicolay-r/attitude-extraction-with-attention-and-ds | fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d | [
"MIT"
] | null | null | null | rusentrel/rusentrel_ds_cv/mi/ian_ends.py | nicolay-r/attitude-extraction-with-attention-and-ds | fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d | [
"MIT"
] | 1 | 2020-12-16T18:21:11.000Z | 2020-12-30T10:08:27.000Z | rusentrel/rusentrel_ds_cv/mi/ian_ends.py | nicolay-r/attitude-extraction-with-attention-and-ds | fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d | [
"MIT"
] | 1 | 2021-03-29T20:58:26.000Z | 2021-03-29T20:58:26.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
sys.path.append('../../../')
from rusentrel.rusentrel_ds.mi.ian_ends import run_testing_mi_ian_ends
from rusentrel.rusentrel_ds_cv.common import CV_COUNT, \
ds_cv_common_callback_modification_func, \
CV_DS_NAME_PREFIX
if __name__ == "__main__":
run_t... | 25.052632 | 70 | 0.747899 | import sys
sys.path.append('../../../')
from rusentrel.rusentrel_ds.mi.ian_ends import run_testing_mi_ian_ends
from rusentrel.rusentrel_ds_cv.common import CV_COUNT, \
ds_cv_common_callback_modification_func, \
CV_DS_NAME_PREFIX
if __name__ == "__main__":
run_testing_mi_ian_ends(
cv_count=CV_CO... | true | true |
1c15be44c969543f04da310d12ba1f1082ebb1b8 | 1,160 | py | Python | src/accounts/models.py | TolgaKara/prodai | a858d39226a072a2a52513d942dd046bb3787da8 | [
"Apache-2.0"
] | null | null | null | src/accounts/models.py | TolgaKara/prodai | a858d39226a072a2a52513d942dd046bb3787da8 | [
"Apache-2.0"
] | 7 | 2020-10-09T09:24:28.000Z | 2022-03-12T00:14:07.000Z | src/accounts/models.py | TolgaKara/prodai | a858d39226a072a2a52513d942dd046bb3787da8 | [
"Apache-2.0"
] | null | null | null | import random
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Account(models.Model):
def __str__(self):
return self.name
def generate_activation_key(self):
activation_key = ''
length_activation_key = 6
alphabet_and_l... | 32.222222 | 95 | 0.731897 | import random
from django.db import models
from django.contrib.auth.models import User
class Account(models.Model):
def __str__(self):
return self.name
def generate_activation_key(self):
activation_key = ''
length_activation_key = 6
alphabet_and_letters = 'aAbBcCdDeEfFgGhHi... | true | true |
1c15bea933ad3c633acbdfd5fe4b763f6d364ec9 | 33,261 | py | Python | test/v2_1/test1.py | SungbinChoi/w4c_st1 | 5acdedf3c6278cd7239a6beb605c3e16821f7c86 | [
"Apache-2.0"
] | null | null | null | test/v2_1/test1.py | SungbinChoi/w4c_st1 | 5acdedf3c6278cd7239a6beb605c3e16821f7c86 | [
"Apache-2.0"
] | null | null | null | test/v2_1/test1.py | SungbinChoi/w4c_st1 | 5acdedf3c6278cd7239a6beb605c3e16821f7c86 | [
"Apache-2.0"
] | null | null | null | import random
from random import shuffle
import numpy as np
from datetime import datetime
import time
import queue
import threading
import logging
from PIL import Image
import itertools
import re
import os
import glob
import shutil
import sys
import copy
import h5py
from netCDF4 import Dataset
import torch
import torch... | 32.260912 | 153 | 0.504976 | import random
from random import shuffle
import numpy as np
from datetime import datetime
import time
import queue
import threading
import logging
from PIL import Image
import itertools
import re
import os
import glob
import shutil
import sys
import copy
import h5py
from netCDF4 import Dataset
import torch
import torch... | true | true |
1c15bf736e55a2fa37df79643b4120a17e411204 | 130,513 | py | Python | test/pharma/supply_chain/pharma/pharmaplotlymanager.py | IBM/dse-do-dashboard | 30348da5414ef03890e6f3b92a36afc77757a021 | [
"Apache-2.0"
] | 1 | 2022-03-24T13:05:22.000Z | 2022-03-24T13:05:22.000Z | test/pharma/supply_chain/pharma/pharmaplotlymanager.py | IBM/dse-do-dashboard | 30348da5414ef03890e6f3b92a36afc77757a021 | [
"Apache-2.0"
] | 18 | 2022-01-13T15:14:52.000Z | 2022-03-09T22:58:36.000Z | test/pharma/supply_chain/pharma/pharmaplotlymanager.py | IBM/dse-do-dashboard | 30348da5414ef03890e6f3b92a36afc77757a021 | [
"Apache-2.0"
] | 2 | 2022-01-19T21:34:58.000Z | 2022-01-19T21:35:20.000Z | from typing import List, Dict, Tuple, Optional
import pandas as pd
from supply_chain.pharma.pharmadatamanager import PharmaDataManager
from supply_chain.scnfo.scnfoplotlymanager import ScnfoPlotlyManager
import plotly.express as px
import plotly.graph_objs as go
import numpy as np
from dse_do_dashboard.utils.dash_co... | 44.635089 | 204 | 0.550857 | from typing import List, Dict, Tuple, Optional
import pandas as pd
from supply_chain.pharma.pharmadatamanager import PharmaDataManager
from supply_chain.scnfo.scnfoplotlymanager import ScnfoPlotlyManager
import plotly.express as px
import plotly.graph_objs as go
import numpy as np
from dse_do_dashboard.utils.dash_co... | true | true |
1c15bfb2cffd0d346beaffae0a146cc90140e477 | 1,938 | py | Python | aliyun-python-sdk-kms/aliyunsdkkms/request/v20160120/AsymmetricEncryptRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-kms/aliyunsdkkms/request/v20160120/AsymmetricEncryptRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 1 | 2020-05-31T14:51:47.000Z | 2020-05-31T14:51:47.000Z | aliyun-python-sdk-kms/aliyunsdkkms/request/v20160120/AsymmetricEncryptRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 1 | 2020-03-08T16:36:25.000Z | 2020-03-08T16:36:25.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.607143 | 76 | 0.762642 |
from aliyunsdkcore.request import RpcRequest
from aliyunsdkkms.endpoint import endpoint_data
class AsymmetricEncryptRequest(RpcRequest):
def __init__(self):
RpcRequest.__init__(self, 'Kms', '2016-01-20', 'AsymmetricEncrypt','kms')
self.set_protocol_type('https')
if hasattr(self, "endpoint_map"):
setattr(s... | true | true |
1c15c064f0b50904f5b0775e23f3369ab17fc7a9 | 4,526 | py | Python | r8/cli/sql.py | mhils/r8 | b5b0cfa5045213abe896eea450012924d3e1fe9c | [
"MIT"
] | 14 | 2018-09-19T15:17:38.000Z | 2022-01-14T10:59:55.000Z | r8/cli/sql.py | mhils/r8 | b5b0cfa5045213abe896eea450012924d3e1fe9c | [
"MIT"
] | 3 | 2019-05-29T16:47:36.000Z | 2020-05-02T18:16:17.000Z | r8/cli/sql.py | mhils/r8 | b5b0cfa5045213abe896eea450012924d3e1fe9c | [
"MIT"
] | 3 | 2020-12-19T01:12:15.000Z | 2021-02-27T21:29:43.000Z | import json
import os
import secrets
import sqlite3
from pathlib import Path
import click
import r8
from r8 import util
@click.group("sql")
def cli():
"""Database commands."""
pass
@cli.command()
@click.option("--origin", required=True,
help="Origin for absolute URLs generated by r8. Use htt... | 31.213793 | 112 | 0.595007 | import json
import os
import secrets
import sqlite3
from pathlib import Path
import click
import r8
from r8 import util
@click.group("sql")
def cli():
pass
@cli.command()
@click.option("--origin", required=True,
help="Origin for absolute URLs generated by r8. Use http://localhost:8000 for local ... | true | true |
1c15c0d18a9959163111baaed2dbea277a3ea656 | 13,772 | py | Python | nikola/plugins/task/authors.py | seanpue/nikola | efd366e6ad6435d2368ee9fd9ca2fd8cdd702e4b | [
"MIT"
] | null | null | null | nikola/plugins/task/authors.py | seanpue/nikola | efd366e6ad6435d2368ee9fd9ca2fd8cdd702e4b | [
"MIT"
] | null | null | null | nikola/plugins/task/authors.py | seanpue/nikola | efd366e6ad6435d2368ee9fd9ca2fd8cdd702e4b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2015-2016 Juanjo Conti and others.
# 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 ... | 42.506173 | 154 | 0.593668 |
from __future__ import unicode_literals
import os
import natsort
try:
from urlparse import urljoin
except ImportError:
from urllib.parse import urljoin from collections import defaultdict
from blinker import signal
from nikola.plugin_categories import Task
from nikola import utils
class RenderAuthors(T... | true | true |
1c15c0f00e30ae8eb61a5a13bebe22530fcdd057 | 7,861 | py | Python | glycan_profiling/chromatogram_tree/relation_graph.py | mstim/glycresoft | 1d305c42c7e6cba60326d8246e4a485596a53513 | [
"Apache-2.0"
] | null | null | null | glycan_profiling/chromatogram_tree/relation_graph.py | mstim/glycresoft | 1d305c42c7e6cba60326d8246e4a485596a53513 | [
"Apache-2.0"
] | null | null | null | glycan_profiling/chromatogram_tree/relation_graph.py | mstim/glycresoft | 1d305c42c7e6cba60326d8246e4a485596a53513 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from collections import deque, defaultdict
import itertools
from .grouping import ChromatogramRetentionTimeInterval, IntervalTreeNode
from ms_deisotope.peak_dependency_network.intervals import SpanningMixin
from .index import ChromatogramFilter
from glypy.structure.glycan_composition import Frozen... | 33.168776 | 119 | 0.631726 | import numpy as np
from collections import deque, defaultdict
import itertools
from .grouping import ChromatogramRetentionTimeInterval, IntervalTreeNode
from ms_deisotope.peak_dependency_network.intervals import SpanningMixin
from .index import ChromatogramFilter
from glypy.structure.glycan_composition import Frozen... | true | true |
1c15c137cce51679d9173293266041311309ca03 | 2,935 | py | Python | rasa_core/actions/factories.py | manslogic/rasa_core | 17c82e6be052fc147caef9a9914d06f79a944687 | [
"Apache-2.0"
] | 1 | 2017-12-27T04:07:24.000Z | 2017-12-27T04:07:24.000Z | rasa_core/actions/factories.py | jenish-cj/botnlufoodrest | b41aa2c7a1f6e492e10f07e67562b612b5b13a53 | [
"Apache-2.0"
] | null | null | null | rasa_core/actions/factories.py | jenish-cj/botnlufoodrest | b41aa2c7a1f6e492e10f07e67562b612b5b13a53 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from rasa_core.actions.action import UtterAction
from typing import Text, Optional, List
from rasa_core.actions import Action
from rasa_core import utils... | 31.902174 | 78 | 0.646678 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from rasa_core.actions.action import UtterAction
from typing import Text, Optional, List
from rasa_core.actions import Action
from rasa_core import utils... | true | true |
1c15c1f6dd7ef550d938f7ea2bbdf703dbf621b4 | 30,565 | py | Python | custom/icds_reports/migrations/0016_aggawcmonthly_aggccsrecordmonthly_aggchildhealthmonthly_aggdailyusageview_aggthrmonthly_awclocation_.py | dannyroberts/commcare-hq | 4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598 | [
"BSD-3-Clause"
] | null | null | null | custom/icds_reports/migrations/0016_aggawcmonthly_aggccsrecordmonthly_aggchildhealthmonthly_aggdailyusageview_aggthrmonthly_awclocation_.py | dannyroberts/commcare-hq | 4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598 | [
"BSD-3-Clause"
] | null | null | null | custom/icds_reports/migrations/0016_aggawcmonthly_aggccsrecordmonthly_aggchildhealthmonthly_aggdailyusageview_aggthrmonthly_awclocation_.py | dannyroberts/commcare-hq | 4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-05-11 09:50
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('icds_reports', '0015_add_aggregat... | 70.264368 | 139 | 0.604744 | from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('icds_reports', '0015_add_aggregation_level'),
]
operations = [
migrations.CreateModel(
... | true | true |
1c15c2f25fa737983fa0fb25c5b9197574f6239e | 585 | py | Python | sveske/sources/09_OOPII/bear1.py | milica325/unibl_radionica | 34a753a663f9ad6a3f1031cd6755748526046376 | [
"BSD-3-Clause"
] | 2 | 2019-09-18T19:21:44.000Z | 2019-09-19T00:00:25.000Z | sveske/sources/09_OOPII/bear1.py | milica325/unibl_radionica | 34a753a663f9ad6a3f1031cd6755748526046376 | [
"BSD-3-Clause"
] | null | null | null | sveske/sources/09_OOPII/bear1.py | milica325/unibl_radionica | 34a753a663f9ad6a3f1031cd6755748526046376 | [
"BSD-3-Clause"
] | 34 | 2019-09-18T14:39:38.000Z | 2019-09-20T06:45:07.000Z |
class Bear:
"""
class to show off addition (and multiplication)
"""
bear_num = 0
def __init__(self,name):
self.name = name
print(" made a bear called %s" % (name))
Bear.bear_num += 1
self.my_num = Bear.bear_num
def __add__(self,other):
## spawn a little ... | 27.857143 | 80 | 0.582906 |
class Bear:
bear_num = 0
def __init__(self,name):
self.name = name
print(" made a bear called %s" % (name))
Bear.bear_num += 1
self.my_num = Bear.bear_num
def __add__(self,other):
cub = Bear("progeny_of_%s_and_%s" % (self.name,other.name))
cub.parent... | true | true |
1c15c4a001298cbe488cc16edc86b02128ffc2a6 | 3,126 | py | Python | data/p2DJ/New/program/qiskit/simulator/startQiskit207.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/qiskit/simulator/startQiskit207.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/qiskit/simulator/startQiskit207.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=2
# total number=12
import cirq
import qiskit
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy a... | 28.418182 | 82 | 0.62476 | import cirq
import qiskit
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy as np
import networkx as nx
def bui... | true | true |
1c15c4f707dc847ae8fbdc29ecfbca2623b2faed | 50 | py | Python | bot/plugins/chat/__init__.py | best-coloc-ever/globibot | a4c4dd8bb3b71bff09bd2e1c4c5ce58ab1bad176 | [
"MIT"
] | 14 | 2016-02-03T16:47:01.000Z | 2019-12-09T14:24:25.000Z | bot/plugins/chat/__init__.py | best-coloc-ever/globibot | a4c4dd8bb3b71bff09bd2e1c4c5ce58ab1bad176 | [
"MIT"
] | 11 | 2016-08-19T22:00:25.000Z | 2022-01-13T00:39:48.000Z | bot/plugins/chat/__init__.py | best-coloc-ever/globibot | a4c4dd8bb3b71bff09bd2e1c4c5ce58ab1bad176 | [
"MIT"
] | 6 | 2016-08-19T21:30:58.000Z | 2019-09-27T05:24:08.000Z | from .plugin import ChatBot
plugin_cls = ChatBot
| 12.5 | 27 | 0.8 | from .plugin import ChatBot
plugin_cls = ChatBot
| true | true |
1c15c58d0aba7209fce17e4b8f7276fb27b3d0f0 | 3,310 | py | Python | src/weixin/tnm_cate.py | jack139/cnnc | c32611ec01af50bedb67dcd4c8a28e4b0c7a9aef | [
"BSD-2-Clause"
] | null | null | null | src/weixin/tnm_cate.py | jack139/cnnc | c32611ec01af50bedb67dcd4c8a28e4b0c7a9aef | [
"BSD-2-Clause"
] | null | null | null | src/weixin/tnm_cate.py | jack139/cnnc | c32611ec01af50bedb67dcd4c8a28e4b0c7a9aef | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import web
import json
from bson.objectid import ObjectId
from config import setting
import app_helper
from app_settings import CANCER_CATEGORY
db = setting.db_web
# 分期病种分类入口(根目录)
url = ('/wx/tnm_cate')
GEN_SIGN = {
0 : '',
1 : '● ',
2 : ' ► ',
3 : ' ... | 22.066667 | 88 | 0.457704 | import web
import json
from bson.objectid import ObjectId
from config import setting
import app_helper
from app_settings import CANCER_CATEGORY
db = setting.db_web
url = ('/wx/tnm_cate')
GEN_SIGN = {
0 : '',
1 : '● ',
2 : ' ► ',
3 : ' ★ ',
4 : ' ◆ ',
}
def get_list(gen=0):
cancer_categor... | false | true |
1c15c75cc8fc16923d989e55c8916fd40800dbc9 | 2,061 | py | Python | test/test_bit4id_pathgroup_notifications_api.py | signingtoday/signingtoday-sdk-python | ed267279622fb59f2ad8fa289157fc9cdf9d8a5b | [
"MIT"
] | null | null | null | test/test_bit4id_pathgroup_notifications_api.py | signingtoday/signingtoday-sdk-python | ed267279622fb59f2ad8fa289157fc9cdf9d8a5b | [
"MIT"
] | null | null | null | test/test_bit4id_pathgroup_notifications_api.py | signingtoday/signingtoday-sdk-python | ed267279622fb59f2ad8fa289157fc9cdf9d8a5b | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Signing Today Web
*Signing Today* is the perfect Digital Signature Gateway. Whenever in Your workflow You need to add one or more Digital Signatures to Your document, *Signing Today* is the right choice. You prepare Your documents, *Signing Today* takes care of all the rest: send invitatio... | 33.241935 | 557 | 0.731684 |
from __future__ import absolute_import
import unittest
import signing_today_client
from signing_today_client.api.bit4id_pathgroup_notifications_api import Bit4idPathgroupNotificationsApi from signing_today_client.rest import ApiException
class TestBit4idPathgroupNotificationsApi(unittest.TestCase):
def set... | true | true |
1c15c8b7c59843aa19fdaad90d92ae1109d787ef | 45,768 | py | Python | serverless/old-cdk-serverless-0.96/lambda/s3_migration_lib.py | raginwombat/amazon-s3-resumable-upload | 4af6609b095582bc62977336ff95a94fc88973cc | [
"MIT-0"
] | null | null | null | serverless/old-cdk-serverless-0.96/lambda/s3_migration_lib.py | raginwombat/amazon-s3-resumable-upload | 4af6609b095582bc62977336ff95a94fc88973cc | [
"MIT-0"
] | null | null | null | serverless/old-cdk-serverless-0.96/lambda/s3_migration_lib.py | raginwombat/amazon-s3-resumable-upload | 4af6609b095582bc62977336ff95a94fc88973cc | [
"MIT-0"
] | null | null | null | # PROJECT LONGBOW - LIB FOR TRANSMISSION BETWEEN AMAZON S3
import datetime
import logging
import hashlib
import concurrent.futures
import threading
import base64
import urllib.request
import urllib.parse
import boto3
from botocore.config import Config
from botocore.exceptions import ClientError
import json
import os
i... | 42.974648 | 133 | 0.546474 |
import datetime
import logging
import hashlib
import concurrent.futures
import threading
import base64
import urllib.request
import urllib.parse
import boto3
from botocore.config import Config
from botocore.exceptions import ClientError
import json
import os
import sys
import time
from fnmatch import fnmatchcase
from ... | true | true |
1c15c96a143d3e43eeabb4d024cadf7c4dc74974 | 2,240 | py | Python | data/cirq_new/cirq_program/startCirq_noisy636.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy636.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy636.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=19
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
def make_circuit(n: int, input_qubit):
c = cirq.Ci... | 32.941176 | 77 | 0.689732 |
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
def make_circuit(n: int, input_qubit):
c = cirq.Circuit()
c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) c.append(cirq.rx(1.6147786239451536).on(input_qubit... | true | true |
1c15cd3b0707967b6ce52338caf9149fa819af29 | 762 | py | Python | Midterm Exam Program 2.py | ZaldyMejia/OOP-58001 | 389faf4d49e89b0c210ce9558a56b3c774ea666f | [
"Apache-2.0"
] | 1 | 2022-02-16T11:35:37.000Z | 2022-02-16T11:35:37.000Z | Midterm Exam Program 2.py | ZaldyMejia/OOP-58001 | 389faf4d49e89b0c210ce9558a56b3c774ea666f | [
"Apache-2.0"
] | null | null | null | Midterm Exam Program 2.py | ZaldyMejia/OOP-58001 | 389faf4d49e89b0c210ce9558a56b3c774ea666f | [
"Apache-2.0"
] | null | null | null | from tkinter import *
from tkinter import ttk
window = Tk()
class person:
def __init__(self, win):
self.lbl1 =Label(win, text = "Enter your full name: ", fg = "red")
self.lbl1.place(x=100, y=125)
self.t1 = Entry(bd = 3)
self.t1.place(x=275, y=125)
self.t2 = Entry... | 29.307692 | 107 | 0.582677 | from tkinter import *
from tkinter import ttk
window = Tk()
class person:
def __init__(self, win):
self.lbl1 =Label(win, text = "Enter your full name: ", fg = "red")
self.lbl1.place(x=100, y=125)
self.t1 = Entry(bd = 3)
self.t1.place(x=275, y=125)
self.t2 = Entry... | true | true |
1c15cd3f4b2805dda45d73907ef86afa836463a6 | 2,908 | py | Python | multiarchy/distributions/gaussian.py | mlberkeley/multiarchy | 18ceae308efe67ad3e575a3e76a784af036b25a6 | [
"MIT"
] | null | null | null | multiarchy/distributions/gaussian.py | mlberkeley/multiarchy | 18ceae308efe67ad3e575a3e76a784af036b25a6 | [
"MIT"
] | 3 | 2019-12-04T09:21:08.000Z | 2022-02-09T23:32:41.000Z | multiarchy/distributions/gaussian.py | brandontrabucco/multiarchy | 18ceae308efe67ad3e575a3e76a784af036b25a6 | [
"MIT"
] | 1 | 2020-02-12T02:56:40.000Z | 2020-02-12T02:56:40.000Z | """Author: Brandon Trabucco, Copyright 2019, MIT License"""
from multiarchy.distributions.distribution import Distribution
import tensorflow as tf
import math
class Gaussian(Distribution):
def __init__(
self,
model,
std=1.0,
tau=0.01,
optimizer_class=... | 29.979381 | 81 | 0.571183 |
from multiarchy.distributions.distribution import Distribution
import tensorflow as tf
import math
class Gaussian(Distribution):
def __init__(
self,
model,
std=1.0,
tau=0.01,
optimizer_class=tf.keras.optimizers.Adam,
optimizer_kwargs=None,... | true | true |
1c15ce56276d71d7e48a5720353c440a9326d42b | 1,711 | py | Python | src/crkeng/app/integration_tests/test_paradigm_manager.py | aarppe/cree-intelligent-dictionary | 79717a08f95827a024061a5a27000bbd3d684363 | [
"Apache-2.0"
] | null | null | null | src/crkeng/app/integration_tests/test_paradigm_manager.py | aarppe/cree-intelligent-dictionary | 79717a08f95827a024061a5a27000bbd3d684363 | [
"Apache-2.0"
] | null | null | null | src/crkeng/app/integration_tests/test_paradigm_manager.py | aarppe/cree-intelligent-dictionary | 79717a08f95827a024061a5a27000bbd3d684363 | [
"Apache-2.0"
] | null | null | null | """
Integration tests for paradigms in the itwêwina (crkeng) dictionary.
"""
from pathlib import Path
import pytest
from more_itertools import first, ilen
from CreeDictionary.CreeDictionary.paradigm.generation import default_paradigm_manager
from CreeDictionary.CreeDictionary.paradigm.manager import ParadigmManager
... | 32.903846 | 88 | 0.760374 |
from pathlib import Path
import pytest
from more_itertools import first, ilen
from CreeDictionary.CreeDictionary.paradigm.generation import default_paradigm_manager
from CreeDictionary.CreeDictionary.paradigm.manager import ParadigmManager
def test_generates_personal_pronoun_paradigm(paradigm_manager) -> None:
... | true | true |
1c15ce9d189c61b70d54013fa4d23474d435fae0 | 23,895 | py | Python | test/functional/wallet_bumpfee.py | vpubchain/syscoin | 72af49f24d2f4dd3628fd3ca8f7e3415534f55c8 | [
"MIT"
] | 1 | 2020-02-09T21:15:36.000Z | 2020-02-09T21:15:36.000Z | test/functional/wallet_bumpfee.py | vpubchain/syscoin | 72af49f24d2f4dd3628fd3ca8f7e3415534f55c8 | [
"MIT"
] | null | null | null | test/functional/wallet_bumpfee.py | vpubchain/syscoin | 72af49f24d2f4dd3628fd3ca8f7e3415534f55c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2019 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 bumpfee RPC.
Verifies that the bumpfee RPC creates replacement transactions successfully when... | 48.567073 | 257 | 0.726261 | from decimal import Decimal
import io
from test_framework.blocktools import add_witness_commitment, create_block, create_coinbase, send_to_witness
from test_framework.messages import BIP125_SEQUENCE_NUMBER, CTransaction
from test_framework.test_framework import SyscoinTestFramework
from test_framework.util import (
... | true | true |
1c15cf8142bcb0710c5842ac3ea2dadadf2268bb | 1,368 | py | Python | src/world_map_displayer.py | Loodoor/UnamedPy | 7d154c3a652992b3c1f28050f0353451f57b2a2d | [
"MIT"
] | 1 | 2017-02-21T16:46:21.000Z | 2017-02-21T16:46:21.000Z | src/world_map_displayer.py | Loodoor/UnamedPy | 7d154c3a652992b3c1f28050f0353451f57b2a2d | [
"MIT"
] | 1 | 2017-02-21T17:57:05.000Z | 2017-02-22T11:28:51.000Z | src/world_map_displayer.py | Loodoor/UnamedPy | 7d154c3a652992b3c1f28050f0353451f57b2a2d | [
"MIT"
] | null | null | null | __author__ = 'Folaefolc'
"""
Code par Folaefolc
Licence MIT
"""
from carte import CarteRenderer
from constantes import *
import ree
ree.init()
class A:
def __init__(self):
self.villes_vues = [
"Chemin no 1",
"Chemin no 2",
"Chemin no 3",
"Chemin no 4",
... | 20.727273 | 78 | 0.510965 | __author__ = 'Folaefolc'
from carte import CarteRenderer
from constantes import *
import ree
ree.init()
class A:
def __init__(self):
self.villes_vues = [
"Chemin no 1",
"Chemin no 2",
"Chemin no 3",
"Chemin no 4",
"Chemin no 5",
"C... | true | true |
1c15cfddfa0c4c0821642455a6343da16b775be7 | 1,308 | py | Python | py_solutions_51-60/Euler_51.py | tijko/Project-Euler | d953a2bf6932c2c4e1235409fedf760add65a0ba | [
"MIT"
] | null | null | null | py_solutions_51-60/Euler_51.py | tijko/Project-Euler | d953a2bf6932c2c4e1235409fedf760add65a0ba | [
"MIT"
] | 1 | 2022-03-15T02:49:09.000Z | 2022-03-15T02:49:09.000Z | py_solutions_51-60/Euler_51.py | tijko/Project-Euler | d953a2bf6932c2c4e1235409fedf760add65a0ba | [
"MIT"
] | null | null | null | # smallest prime for which replacing part of the number you can form 8 different primes
# Example: 189-00-37, 189-33-37, 189-44-37, 189-55-37, 189-66-37, 189-77-37, 189-88-37, 189-99-37
# the replacement digits do not have to be adjacent or consecutive but, have to be the same
import timeit
import math
start = ti... | 28.434783 | 98 | 0.60474 |
import timeit
import math
start = timeit.default_timer()
def is_prime(x):
if x == 2:
return True
if x == 1 or x % 2 == 0:
return False
for i in xrange(3, int(math.sqrt(x)) + 1, 2):
if x % i == 0:
return False
return True
def prime_gen():
replace_number = 1000... | false | true |
1c15d005e782881f1e6af438c4678a6a61326f02 | 12,441 | py | Python | bot/cogs/ext/commands/tags.py | JustAnyones/Pidroid | 22a2938df114e009fe13a66445ef0d0361b0a6be | [
"MIT"
] | 2 | 2021-08-09T22:16:35.000Z | 2021-08-10T16:43:18.000Z | bot/cogs/ext/commands/tags.py | JustAnyones/Pidroid | 22a2938df114e009fe13a66445ef0d0361b0a6be | [
"MIT"
] | 14 | 2021-08-09T22:16:25.000Z | 2022-03-14T18:34:54.000Z | bot/cogs/ext/commands/tags.py | JustAnyones/Pidroid | 22a2938df114e009fe13a66445ef0d0361b0a6be | [
"MIT"
] | 1 | 2021-08-10T16:31:44.000Z | 2021-08-10T16:31:44.000Z | from __future__ import annotations
from bson.int64 import Int64
from bson.objectid import ObjectId
from discord.ext import commands
from discord.ext.commands import Context
from discord.ext.commands.errors import BadArgument
from discord.member import Member
from discord.mentions import AllowedMentions
from discord.me... | 37.81459 | 106 | 0.640945 | from __future__ import annotations
from bson.int64 import Int64
from bson.objectid import ObjectId
from discord.ext import commands
from discord.ext.commands import Context
from discord.ext.commands.errors import BadArgument
from discord.member import Member
from discord.mentions import AllowedMentions
from discord.me... | true | true |
1c15d0502df44c756c543fb99574f1c3bcc8150a | 11,612 | py | Python | instagram_private_api_extensions/media.py | mdpe-ir/instagram_private_api_extensions | f7b85880525dd7484834ae3bb7800dd9543471ce | [
"MIT"
] | 120 | 2017-04-03T09:06:04.000Z | 2022-03-31T10:20:14.000Z | instagram_private_api_extensions/media.py | mdpe-ir/instagram_private_api_extensions | f7b85880525dd7484834ae3bb7800dd9543471ce | [
"MIT"
] | 19 | 2017-03-21T05:55:38.000Z | 2021-06-10T10:30:48.000Z | instagram_private_api_extensions/media.py | mdpe-ir/instagram_private_api_extensions | f7b85880525dd7484834ae3bb7800dd9543471ce | [
"MIT"
] | 38 | 2017-03-06T08:28:14.000Z | 2021-12-07T00:38:55.000Z | # Copyright (c) 2017 https://github.com/ping
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
import os
import io
import re
import tempfile
import shutil
from PIL import Image
import requests
def calc_resize(max_size, curr_size, min_size=(0, 0)):
"""
Calculate if re... | 38.450331 | 113 | 0.645453 |
import os
import io
import re
import tempfile
import shutil
from PIL import Image
import requests
def calc_resize(max_size, curr_size, min_size=(0, 0)):
max_width, max_height = max_size or (0, 0)
min_width, min_height = min_size or (0, 0)
if (max_width and min_width > max_width) or (max_height and min_... | true | true |
1c15d069fad742a7145cdae4dd0183c6529040a0 | 380 | py | Python | TRANSFORM/Resources/Scripts/jModelica/Units/Conversions/Functions/Time_s/Examples/check_yr.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 29 | 2018-04-24T17:06:19.000Z | 2021-11-21T05:17:28.000Z | TRANSFORM/Resources/Scripts/jModelica/Units/Conversions/Functions/Time_s/Examples/check_yr.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 13 | 2018-04-05T08:34:27.000Z | 2021-10-04T14:24:41.000Z | TRANSFORM/Resources/Scripts/jModelica/Units/Conversions/Functions/Time_s/Examples/check_yr.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 17 | 2018-08-06T22:18:01.000Z | 2022-01-29T21:38:17.000Z | from pymodelica import compile_fmu
from pyfmi import load_fmu
libPath = r'C:\Users\vmg\Documents\Modelica\TRANSFORM-Library/TRANSFORM'
modelName = 'TRANSFORM.Units.Conversions.Functions.Time_s.Examples.check_yr'
fmu = compile_fmu(modelName,libPath,target='cs')
model = load_fmu(fmu)
opts = model.simulate_options()
op... | 27.142857 | 76 | 0.8 | from pymodelica import compile_fmu
from pyfmi import load_fmu
libPath = r'C:\Users\vmg\Documents\Modelica\TRANSFORM-Library/TRANSFORM'
modelName = 'TRANSFORM.Units.Conversions.Functions.Time_s.Examples.check_yr'
fmu = compile_fmu(modelName,libPath,target='cs')
model = load_fmu(fmu)
opts = model.simulate_options()
op... | true | true |
1c15d0ae55d9d3d7316c5d11fa64ca133a29dd7e | 22,650 | py | Python | pytest_ibutsu.py | john-dupuy/pytest-ibutsu | ab02345282ebe862d9e2642fd6afd402228965c0 | [
"MIT"
] | null | null | null | pytest_ibutsu.py | john-dupuy/pytest-ibutsu | ab02345282ebe862d9e2642fd6afd402228965c0 | [
"MIT"
] | null | null | null | pytest_ibutsu.py | john-dupuy/pytest-ibutsu | ab02345282ebe862d9e2642fd6afd402228965c0 | [
"MIT"
] | null | null | null | import json
import os
import shutil
import tarfile
import time
import uuid
from tempfile import gettempdir
from tempfile import NamedTemporaryFile
import pytest
from ibutsu_client import ApiClient
from ibutsu_client import ApiException
from ibutsu_client import ArtifactApi
from ibutsu_client import Configuration
from ... | 35.838608 | 100 | 0.598146 | import json
import os
import shutil
import tarfile
import time
import uuid
from tempfile import gettempdir
from tempfile import NamedTemporaryFile
import pytest
from ibutsu_client import ApiClient
from ibutsu_client import ApiException
from ibutsu_client import ArtifactApi
from ibutsu_client import Configuration
from ... | true | true |
1c15d1bc62f55a9bd8cf496f46b3d02735eb08be | 3,889 | py | Python | examples/vn_trader/run.py | tumixk301/vnpy | ee1b4f7b15d80e64869d3f78eba0b7e521b43528 | [
"MIT"
] | 1 | 2019-11-27T08:10:36.000Z | 2019-11-27T08:10:36.000Z | examples/vn_trader/run.py | tumixk301/vnpy | ee1b4f7b15d80e64869d3f78eba0b7e521b43528 | [
"MIT"
] | null | null | null | examples/vn_trader/run.py | tumixk301/vnpy | ee1b4f7b15d80e64869d3f78eba0b7e521b43528 | [
"MIT"
] | null | null | null | # flake8: noqa
from vnpy.event import EventEngine
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import MainWindow, create_qapp
# from vnpy.gateway.binance import BinanceGateway
from vnpy.gateway.bitmex import BitmexGateway
# from vnpy.gateway.futu import FutuGateway
# from vnpy.gateway.ib import IbGat... | 37.394231 | 58 | 0.795577 | from vnpy.event import EventEngine
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import MainWindow, create_qapp
from vnpy.gateway.bitmex import BitmexGateway
from vnpy.gateway.bybit import BybitGateway
from vnpy.app.cta_backtester import CtaBacktesterApp
from vnpy.app.portfolio_manager import Portfol... | true | true |
1c15d200c675e9d9e2977d6f7ff2fc1e5cd27f1b | 412 | py | Python | plugins/polio/migrations/0039_round_preparedness_spreadsheet_url.py | BLSQ/iaso-copy | 85fb17f408c15e8c2d730416d1312f58f8db39b7 | [
"MIT"
] | null | null | null | plugins/polio/migrations/0039_round_preparedness_spreadsheet_url.py | BLSQ/iaso-copy | 85fb17f408c15e8c2d730416d1312f58f8db39b7 | [
"MIT"
] | null | null | null | plugins/polio/migrations/0039_round_preparedness_spreadsheet_url.py | BLSQ/iaso-copy | 85fb17f408c15e8c2d730416d1312f58f8db39b7 | [
"MIT"
] | 1 | 2022-03-23T16:44:12.000Z | 2022-03-23T16:44:12.000Z | # Generated by Django 3.1.14 on 2022-01-19 12:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("polio", "0038_campaign_deleted_at"),
]
operations = [
migrations.AddField(
model_name="round",
name="preparedness_s... | 21.684211 | 57 | 0.616505 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("polio", "0038_campaign_deleted_at"),
]
operations = [
migrations.AddField(
model_name="round",
name="preparedness_spreadsheet_url",
field=models.URLFiel... | true | true |
1c15d2151af19895dc36f06ce098eaa645f28c3c | 1,556 | py | Python | html_parsing/get_comments__russianfood_com.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 117 | 2015-12-18T07:18:27.000Z | 2022-03-28T00:25:54.000Z | html_parsing/get_comments__russianfood_com.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 8 | 2018-10-03T09:38:46.000Z | 2021-12-13T19:51:09.000Z | html_parsing/get_comments__russianfood_com.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 28 | 2016-08-02T17:43:47.000Z | 2022-03-21T08:31:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
from urllib.parse import urljoin
import re
from bs4 import BeautifulSoup
import requests
PATTERN_NEXT = re.compile('Следующая →')
def get_comments(url: str, no_quote=False) -> list:
items = []
while True:
rs = requests.get(u... | 25.508197 | 82 | 0.57455 |
__author__ = 'ipetrash'
from urllib.parse import urljoin
import re
from bs4 import BeautifulSoup
import requests
PATTERN_NEXT = re.compile('Следующая →')
def get_comments(url: str, no_quote=False) -> list:
items = []
while True:
rs = requests.get(url)
root = BeautifulSoup(rs.content, 'h... | true | true |
1c15d2f99f7976454c79c09d7f3f2793f6209a34 | 18 | py | Python | tests/type/good/augassign.py | Nakrez/RePy | 057db55a99eac2c5cb3d622fa1f2e29f6083d8d6 | [
"MIT"
] | 1 | 2020-11-24T05:24:26.000Z | 2020-11-24T05:24:26.000Z | tests/type/good/augassign.py | Nakrez/RePy | 057db55a99eac2c5cb3d622fa1f2e29f6083d8d6 | [
"MIT"
] | null | null | null | tests/type/good/augassign.py | Nakrez/RePy | 057db55a99eac2c5cb3d622fa1f2e29f6083d8d6 | [
"MIT"
] | null | null | null | y=0
y+=1
print(y)
| 4.5 | 8 | 0.555556 | y=0
y+=1
print(y)
| true | true |
1c15d30d911e0955af82732c08559bf08f86a79d | 68,661 | py | Python | lib/galaxy/managers/workflows.py | lesperry/Metagenomics | a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/managers/workflows.py | lesperry/Metagenomics | a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/managers/workflows.py | lesperry/Metagenomics | a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6 | [
"CC-BY-3.0"
] | null | null | null | import json
import logging
import os
import uuid
from collections import namedtuple
from gxformat2 import (
from_galaxy_native,
ImporterGalaxyInterface,
ImportOptions,
python_to_workflow,
)
from sqlalchemy import and_
from sqlalchemy.orm import joinedload, subqueryload
from galaxy import (
excepti... | 49.71832 | 165 | 0.611745 | import json
import logging
import os
import uuid
from collections import namedtuple
from gxformat2 import (
from_galaxy_native,
ImporterGalaxyInterface,
ImportOptions,
python_to_workflow,
)
from sqlalchemy import and_
from sqlalchemy.orm import joinedload, subqueryload
from galaxy import (
excepti... | true | true |
1c15d47d1a580d8c16f1239398fa12737a4542cc | 3,883 | py | Python | avalanche/evaluation/metric_results.py | TimmHess/avalanche | 1f2c56e9c21d5d29d49f367a361fb95b6f814c47 | [
"MIT"
] | 3 | 2021-09-20T11:43:25.000Z | 2022-03-31T09:04:34.000Z | avalanche/evaluation/metric_results.py | NickLucche/avalanche | 627be32a0a5178bf255a53ada5413fec3df1642f | [
"MIT"
] | null | null | null | avalanche/evaluation/metric_results.py | NickLucche/avalanche | 627be32a0a5178bf255a53ada5413fec3df1642f | [
"MIT"
] | null | null | null | ################################################################################
# Copyright (c) 2021 ContinualAI. #
# Copyrights licensed under the MIT License. #
# See the accompanying LICENSE file for terms. ... | 42.206522 | 80 | 0.578161 |
from typing import Union, List, Tuple, Optional, TYPE_CHECKING
from PIL.Image import Image
from torch import Tensor
if TYPE_CHECKING:
from .metric_definitions import Metric
MetricType = Union[float, int, Tensor, Image]
MetricResult = Optional[List['MetricValue']]
class AlternativeValues:
def __init__(self... | true | true |
1c15d4c817f126ff36a89a5408a4f4e60cc8e664 | 7,466 | py | Python | tools/plaso_extract_search_history.py | cvandeplas/plaso | b625a2c267ed09505cfac84c9593d8c0922852b1 | [
"Apache-2.0"
] | 3 | 2016-03-11T02:47:08.000Z | 2016-12-24T03:19:27.000Z | tools/plaso_extract_search_history.py | cvandeplas/plaso | b625a2c267ed09505cfac84c9593d8c0922852b1 | [
"Apache-2.0"
] | null | null | null | tools/plaso_extract_search_history.py | cvandeplas/plaso | b625a2c267ed09505cfac84c9593d8c0922852b1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2013 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual 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 Lic... | 30.72428 | 79 | 0.677739 | import argparse
import locale
import logging
import os
import sys
import urllib
from plaso import filters
from plaso import formatters
from plaso.lib import output
from plaso.lib import storage
FILTERS = (
(('source is "WEBHIST" and url iregexp "(www.|encrypted.|/)google." and '
'url contains "search"'), '... | true | true |
1c15d5b0279e441f139de71585a13bfe60ce3eaa | 710 | py | Python | test/cases/nested_class.in.py | eirikurt/sdsort | beb7bf00aad2255daeb3cc6440c5036bc6e6ee02 | [
"MIT"
] | null | null | null | test/cases/nested_class.in.py | eirikurt/sdsort | beb7bf00aad2255daeb3cc6440c5036bc6e6ee02 | [
"MIT"
] | 4 | 2021-05-02T21:41:21.000Z | 2021-05-02T21:47:57.000Z | test/cases/nested_class.in.py | eirikurt/sdsort | beb7bf00aad2255daeb3cc6440c5036bc6e6ee02 | [
"MIT"
] | null | null | null | # create a Color class
class Color:
# constructor method
def __init__(self):
# object attributes
self.name = 'Green'
self.lg = self.Lightgreen()
def show(self):
print("Name:", self.name)
def __repr__(self):
self.show()
# create Lightgreen class
class L... | 18.205128 | 37 | 0.585915 | class Color:
def __init__(self):
self.name = 'Green'
self.lg = self.Lightgreen()
def show(self):
print("Name:", self.name)
def __repr__(self):
self.show()
class Lightgreen:
def __init__(self):
self.name = 'Light Green'
s... | true | true |
1c15d6136633de905e8d7641855d296674bbf77d | 14,952 | py | Python | Lib/site-packages/mutagen/asf/_objects.py | Kronos3/pyexec | c9e76a0302dee047ed137bc38aa669cec04c24cd | [
"bzip2-1.0.6"
] | 21 | 2018-12-12T11:19:02.000Z | 2021-05-28T05:26:36.000Z | Lib/site-packages/mutagen/asf/_objects.py | Kronos3/pyexec | c9e76a0302dee047ed137bc38aa669cec04c24cd | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/mutagen/asf/_objects.py | Kronos3/pyexec | c9e76a0302dee047ed137bc38aa669cec04c24cd | [
"bzip2-1.0.6"
] | 1 | 2021-04-18T17:28:30.000Z | 2021-04-18T17:28:30.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2005-2006 Joe Wreschnig
# Copyright (C) 2006-2007 Lukas Lalinsky
#
# This program 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 2 of the License, or
#... | 32.363636 | 78 | 0.590824 |
import struct
from mutagen._util import cdata, get_size
from mutagen._compat import text_type, xrange, izip
from mutagen._tags import PaddingInfo
from ._util import guid2bytes, bytes2guid, CODECS, ASFError, ASFHeaderError
from ._attrs import ASFBaseAttribute, ASFUnicodeAttribute
class BaseObject(object):
GUID... | true | true |
1c15d6c71adea67834955272be39879b51d894ab | 1,698 | py | Python | meraki_v0/api/netflow_settings.py | GameMaster47/dashboard-api-python | 0a8fdf5d2757453f6d01f505ec235cc20055f553 | [
"MIT"
] | 236 | 2017-09-29T06:52:11.000Z | 2022-03-26T17:32:59.000Z | meraki_v0/api/netflow_settings.py | GameMaster47/dashboard-api-python | 0a8fdf5d2757453f6d01f505ec235cc20055f553 | [
"MIT"
] | 140 | 2017-10-04T19:37:02.000Z | 2022-03-14T10:51:42.000Z | meraki_v0/api/netflow_settings.py | GameMaster47/dashboard-api-python | 0a8fdf5d2757453f6d01f505ec235cc20055f553 | [
"MIT"
] | 152 | 2017-10-31T14:46:59.000Z | 2022-03-23T23:23:33.000Z | class NetFlowSettings(object):
def __init__(self, session):
super(NetFlowSettings, self).__init__()
self._session = session
def getNetworkNetflowSettings(self, networkId: str):
"""
**Return the NetFlow traffic reporting settings for a network**
https://developer.cisc... | 36.913043 | 129 | 0.630153 | class NetFlowSettings(object):
def __init__(self, session):
super(NetFlowSettings, self).__init__()
self._session = session
def getNetworkNetflowSettings(self, networkId: str):
metadata = {
'tags': ['NetFlow settings'],
'operation': 'getNetworkNetflowSetting... | true | true |
1c15d850aae8e78d534b5f5b3fff2ba4afe9f6a8 | 3,355 | py | Python | app/app/settings.py | jonatan-parra/recipe-app-api | 2c61122c2b6433c5df174371c191536456fff9f9 | [
"MIT"
] | null | null | null | app/app/settings.py | jonatan-parra/recipe-app-api | 2c61122c2b6433c5df174371c191536456fff9f9 | [
"MIT"
] | null | null | null | app/app/settings.py | jonatan-parra/recipe-app-api | 2c61122c2b6433c5df174371c191536456fff9f9 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.1.15.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Bu... | 25.807692 | 91 | 0.68465 |
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '2h#nq(4y1zo!vbi9cbq8-96kl8w*_$hf58gi@r*j%gh7(=p13n'
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes... | true | true |
1c15d8e2dd52c44dd3c9fb57eb0bcd28ef27104e | 1,826 | py | Python | quadpy/enr/_stroud_secrest.py | dariusarnold/quadpy | 9dc7c1ebff99d15ae57ed9195cde94d97a599be8 | [
"MIT"
] | null | null | null | quadpy/enr/_stroud_secrest.py | dariusarnold/quadpy | 9dc7c1ebff99d15ae57ed9195cde94d97a599be8 | [
"MIT"
] | null | null | null | quadpy/enr/_stroud_secrest.py | dariusarnold/quadpy | 9dc7c1ebff99d15ae57ed9195cde94d97a599be8 | [
"MIT"
] | null | null | null | import numpy
from sympy import Rational as frac
from sympy import gamma, pi, sqrt
from ..enr2._stroud_secrest import _nsimplex
from ..helpers import article, fsd, pm, untangle
from ._helpers import EnrScheme
citation = article(
authors=["A.H. Stroud", "D. Secrest"],
title="Approximate integration formulas for... | 33.814815 | 87 | 0.578861 | import numpy
from sympy import Rational as frac
from sympy import gamma, pi, sqrt
from ..enr2._stroud_secrest import _nsimplex
from ..helpers import article, fsd, pm, untangle
from ._helpers import EnrScheme
citation = article(
authors=["A.H. Stroud", "D. Secrest"],
title="Approximate integration formulas for... | true | true |
1c15d908c403b6d5e719b3b0091b7da6a159fce6 | 1,278 | py | Python | config.py | JasonMFry/FlaskMegaTutorial | f27c98bba87e62bf766151cd1361093d51ce43e5 | [
"BSD-3-Clause"
] | null | null | null | config.py | JasonMFry/FlaskMegaTutorial | f27c98bba87e62bf766151cd1361093d51ce43e5 | [
"BSD-3-Clause"
] | null | null | null | config.py | JasonMFry/FlaskMegaTutorial | f27c98bba87e62bf766151cd1361093d51ce43e5 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os
basedir = os.path.abspath(os.path.dirname(__file__))
CSRF_ENABLED = True
SECRET_KEY = 'you-will-never-guess'
SQLALCHEMY_TRACK_MODIFICATIONS = False
OAUTH_CREDENTIALS = { #tutorial has app.config['OAUTH_CRED...']' but that's unnecessary
'facebook': {
'id': '1837196166539923',
'... | 27.191489 | 87 | 0.741784 | import os
basedir = os.path.abspath(os.path.dirname(__file__))
CSRF_ENABLED = True
SECRET_KEY = 'you-will-never-guess'
SQLALCHEMY_TRACK_MODIFICATIONS = False
OAUTH_CREDENTIALS = { 'facebook': {
'id': '1837196166539923',
'secret': 'b686b5a304e204587536042acc1fc566'
},
'twitter': {
'id': '5AX8vQD41aF7btSPLJk... | true | true |
1c15dca71ca1218c7d3643455dc0a42db496f961 | 28,304 | py | Python | yt_dlp/extractor/niconico.py | colethedj/yt-dlp | bc97cdae67b292a4d807e07d65cae345a2f41dbd | [
"Unlicense"
] | 5 | 2021-08-24T17:08:12.000Z | 2022-03-03T13:06:09.000Z | yt_dlp/extractor/niconico.py | colethedj/yt-dlp | bc97cdae67b292a4d807e07d65cae345a2f41dbd | [
"Unlicense"
] | 1 | 2021-07-01T13:07:07.000Z | 2021-07-01T13:07:07.000Z | yt_dlp/extractor/niconico.py | colethedj/yt-dlp | bc97cdae67b292a4d807e07d65cae345a2f41dbd | [
"Unlicense"
] | 1 | 2022-02-05T11:57:47.000Z | 2022-02-05T11:57:47.000Z | # coding: utf-8
from __future__ import unicode_literals
import re
import json
import datetime
from .common import InfoExtractor
from ..postprocessor.ffmpeg import FFmpegPostProcessor
from ..compat import (
compat_str,
compat_parse_qs,
compat_urllib_parse_urlparse,
)
from ..utils import (
dict_get,
... | 40.492132 | 131 | 0.531833 | from __future__ import unicode_literals
import re
import json
import datetime
from .common import InfoExtractor
from ..postprocessor.ffmpeg import FFmpegPostProcessor
from ..compat import (
compat_str,
compat_parse_qs,
compat_urllib_parse_urlparse,
)
from ..utils import (
dict_get,
ExtractorError,... | true | true |
1c15dcd0ecf3d835c62e8b75e8f9511a9e161cb0 | 34,055 | py | Python | model_zoo/official/nlp/bert/src/bert_for_pre_training.py | ysh329/mindspore | 754e253466a77ba5335c38a3ec7598db8ee4990a | [
"Apache-2.0"
] | null | null | null | model_zoo/official/nlp/bert/src/bert_for_pre_training.py | ysh329/mindspore | 754e253466a77ba5335c38a3ec7598db8ee4990a | [
"Apache-2.0"
] | null | null | null | model_zoo/official/nlp/bert/src/bert_for_pre_training.py | ysh329/mindspore | 754e253466a77ba5335c38a3ec7598db8ee4990a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 42.147277 | 115 | 0.6111 | import numpy as np
import mindspore.nn as nn
from mindspore.common.initializer import initializer, TruncatedNormal
from mindspore.ops import operations as P
from mindspore.ops import functional as F
from mindspore.ops import composite as C
from mindspore.common.tensor import Tensor
from mindspore.common.parameter impo... | true | true |
1c15dcef6726b2f864337a789dc316d4f3d854ad | 10,934 | py | Python | evaluation.py | bzhai/Ubi-SleepNet | 27837827dec608d06659421d073872fb1f68453e | [
"MIT"
] | 3 | 2022-01-22T15:55:31.000Z | 2022-01-28T16:09:02.000Z | evaluation.py | bzhai/Ubi-SleepNet | 27837827dec608d06659421d073872fb1f68453e | [
"MIT"
] | null | null | null | evaluation.py | bzhai/Ubi-SleepNet | 27837827dec608d06659421d073872fb1f68453e | [
"MIT"
] | null | null | null | # import pandas as pd
# import numpy as np
# #from sleep_wake_benchmark_replication.traditional_scoring_methods import *
# from imblearn.metrics import specificity_score
# import sklearn.metrics as skm
# from skmultilearn.utils import measure_per_label
# from sklearn import metrics
from evaluation_metrics import *
fro... | 42.053846 | 123 | 0.652277 |
from evaluation_metrics import *
from utilities.utils import *
EVAL_METRICS = ["accuracy", "precision", "recall", "specificity", "f1-score", "cohen-kappa"]
LABEL_EVAL_METRIC = ["accuracy", "precision", "recall", "specificity", "f1-score"]
def evaluate_scoring_algorithm(df, alg, eval_method):
print... | true | true |
1c15dcf5daa3ac6a63c1b48c913c576106445835 | 2,431 | py | Python | ping-pong.py | SpaceCat13352/pingpong | d9f62be96bcde0104c3624470c4ff2b78153d9dd | [
"CC0-1.0"
] | null | null | null | ping-pong.py | SpaceCat13352/pingpong | d9f62be96bcde0104c3624470c4ff2b78153d9dd | [
"CC0-1.0"
] | null | null | null | ping-pong.py | SpaceCat13352/pingpong | d9f62be96bcde0104c3624470c4ff2b78153d9dd | [
"CC0-1.0"
] | null | null | null | from pygame import *
'''Необходимые классы'''
class GameSprite(sprite.Sprite):
def __init__(self, player_image, player_x, player_y, player_speed, wight, height):
super().__init__()
self.image = transform.scale(image.load(player_image), (wight, height))
self.speed = player_speed
... | 27.942529 | 86 | 0.564788 | from pygame import *
class GameSprite(sprite.Sprite):
def __init__(self, player_image, player_x, player_y, player_speed, wight, height):
super().__init__()
self.image = transform.scale(image.load(player_image), (wight, height))
self.speed = player_speed
self.rect = self.image.get... | true | true |
1c15dd726a1577e8d56ec970faca9e272aea862c | 212 | py | Python | master_plot/setup.py | lasso-sustech/master_multirobot | bb4cf14d5f7f8d60c8c6c7af9e25ca777eb6abcf | [
"MIT"
] | null | null | null | master_plot/setup.py | lasso-sustech/master_multirobot | bb4cf14d5f7f8d60c8c6c7af9e25ca777eb6abcf | [
"MIT"
] | null | null | null | master_plot/setup.py | lasso-sustech/master_multirobot | bb4cf14d5f7f8d60c8c6c7af9e25ca777eb6abcf | [
"MIT"
] | null | null | null | from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
setup_args = generate_distutils_setup(
packages=['plot_lib'],
package_dir={'':''}
)
setup(**setup_args) | 23.555556 | 61 | 0.754717 | from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
setup_args = generate_distutils_setup(
packages=['plot_lib'],
package_dir={'':''}
)
setup(**setup_args) | true | true |
1c15df8c4af2f3a2eb68aa7ef386dfd399c9185e | 2,032 | py | Python | sdk/python/pulumi_azure_native/machinelearningservices/v20200301/_enums.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_native/machinelearningservices/v20200301/_enums.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_native/machinelearningservices/v20200301/_enums.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from enum import Enum
__all__ = [
'ComputeType',
'EncryptionStatus',
'PrivateEndpointServiceConnectionStatus',
'RemoteLoginPortPublicA... | 28.619718 | 467 | 0.693406 |
from enum import Enum
__all__ = [
'ComputeType',
'EncryptionStatus',
'PrivateEndpointServiceConnectionStatus',
'RemoteLoginPortPublicAccess',
'ResourceIdentityType',
'VmPriority',
]
class ComputeType(str, Enum):
AKS = "AKS"
AML_COMPUTE = "AmlCompute"
DATA_FACTORY = "DataFactory"
... | true | true |
1c15e1661d1c3921a2f752708b64ed15d8360a27 | 108 | py | Python | CodeWars/7 Kyu/Center yourself, says the monk..py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | CodeWars/7 Kyu/Center yourself, says the monk..py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | CodeWars/7 Kyu/Center yourself, says the monk..py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | def center(str, width, fill=' '):
return fill*((width+1-len(str))//2) + str + fill*((width-len(str))//2) | 54 | 74 | 0.583333 | def center(str, width, fill=' '):
return fill*((width+1-len(str))//2) + str + fill*((width-len(str))//2) | true | true |
1c15e2254c378b11688af1b6995a32a33f5b5de3 | 21,392 | py | Python | accounts/views.py | maminh/Django-CRM | f27819b20551d7d808b7ba907a4702fb80938ef9 | [
"MIT"
] | null | null | null | accounts/views.py | maminh/Django-CRM | f27819b20551d7d808b7ba907a4702fb80938ef9 | [
"MIT"
] | null | null | null | accounts/views.py | maminh/Django-CRM | f27819b20551d7d808b7ba907a4702fb80938ef9 | [
"MIT"
] | null | null | null | from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import JsonResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.views.generic import (
CreateView, UpdateView, DetailView, TemplateView, View, DeleteView, FormView)
from accounts.forms import AccountForm, Acc... | 40.362264 | 122 | 0.624907 | from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import JsonResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.views.generic import (
CreateView, UpdateView, DetailView, TemplateView, View, DeleteView, FormView)
from accounts.forms import AccountForm, Acc... | true | true |
1c15e22c1b55169facbfea1c9b19b140613da14e | 61,133 | py | Python | src/help.py | ada5588/MoilApp | 0ae7eae7f3236ff30306db9f819e829ce480548d | [
"MIT"
] | null | null | null | src/help.py | ada5588/MoilApp | 0ae7eae7f3236ff30306db9f819e829ce480548d | [
"MIT"
] | 6 | 2021-06-20T13:27:57.000Z | 2022-01-24T02:45:20.000Z | src/help.py | ada5588/MoilApp | 0ae7eae7f3236ff30306db9f819e829ce480548d | [
"MIT"
] | 5 | 2021-06-18T07:28:26.000Z | 2021-11-09T06:58:35.000Z | from help_source.ui_help import Ui_Help
from help_source import MoilApp_help
import webbrowser
from PyQt5 import QtWidgets, QtGui
from moilutils import ResourceIcon
class Help(Ui_Help):
def __init__(self, MainWindow, recentWindow):
"""
>> Main window is the the inheritance from the main UI this p... | 150.203931 | 717 | 0.665189 | from help_source.ui_help import Ui_Help
from help_source import MoilApp_help
import webbrowser
from PyQt5 import QtWidgets, QtGui
from moilutils import ResourceIcon
class Help(Ui_Help):
def __init__(self, MainWindow, recentWindow):
self.parent_win = MainWindow
self.parent_dialog = recentWindow
... | true | true |
1c15e31c655d91f54ef49947e487d28ee64ee475 | 110,322 | py | Python | software/HaasoscopeLibQt.py | kinlead/Haasoscope | 9eefa1df383f24ed844bc113bb5e52d963dc34b5 | [
"MIT"
] | null | null | null | software/HaasoscopeLibQt.py | kinlead/Haasoscope | 9eefa1df383f24ed844bc113bb5e52d963dc34b5 | [
"MIT"
] | null | null | null | software/HaasoscopeLibQt.py | kinlead/Haasoscope | 9eefa1df383f24ed844bc113bb5e52d963dc34b5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
#print("Loading HaasoscopeLibQt.py")
# You might adjust these, just override them before calling construct()
num_board = 1 # Number of Haasoscope boards to read out
max_ram_width = 13 # max size of the buffer rams (2*13=8096 bytes)
max_slowadc_ram_width = 11 # max size of the adc ra... | 58.003155 | 242 | 0.610966 | import sys
num_board = 1 max_ram_width = 13 max_slowadc_ram_width = 11 ram_width = 9 max10adcchans = []sendincrement=0 num_chan_per_board = 4
from serial import Serial, SerialException
from struct import unpack
import numpy as np
import time, json, os
from scipy.signal import resample
import serial.tools.list_ports... | true | true |
1c15e38fc069685af270e6bca18f6636e459fc40 | 1,432 | py | Python | kolibri/utils/i18n.py | AksharFoundation/kolibri | 9e999a151a9d91b2ddf4b28a99fec5c0f28f1cb3 | [
"MIT"
] | null | null | null | kolibri/utils/i18n.py | AksharFoundation/kolibri | 9e999a151a9d91b2ddf4b28a99fec5c0f28f1cb3 | [
"MIT"
] | null | null | null | kolibri/utils/i18n.py | AksharFoundation/kolibri | 9e999a151a9d91b2ddf4b28a99fec5c0f28f1cb3 | [
"MIT"
] | 1 | 2021-08-02T05:21:17.000Z | 2021-08-02T05:21:17.000Z | # -*- coding: utf-8 -*-
import importlib
import io
import json
import os
import kolibri
def get_installed_app_locale_path(appname):
"""
Load the app given by appname and return its locale folder path, if it exists.
Note that the module is imported to determine its location.
"""
try:
m = ... | 19.351351 | 82 | 0.581006 | import importlib
import io
import json
import os
import kolibri
def get_installed_app_locale_path(appname):
try:
m = importlib.import_module(appname)
module_path = os.path.dirname(m.__file__)
module_locale_path = os.path.join(module_path, "locale")
if os.path.isdir(module_locale_... | true | true |
1c15e4020438cf82a23706894c787ceae052d4a5 | 249 | py | Python | projects/simple-python-launcher/app.py | iam-jjintta/python-tutorial | 7465c4ff9cf0a766fd016ccf0fdb48fd01d2677a | [
"Apache-2.0"
] | null | null | null | projects/simple-python-launcher/app.py | iam-jjintta/python-tutorial | 7465c4ff9cf0a766fd016ccf0fdb48fd01d2677a | [
"Apache-2.0"
] | null | null | null | projects/simple-python-launcher/app.py | iam-jjintta/python-tutorial | 7465c4ff9cf0a766fd016ccf0fdb48fd01d2677a | [
"Apache-2.0"
] | null | null | null |
import sys
import tkinter as tk
from pyide.editor import Editor
if __name__ == '__main__':
root = tk.Tk()
root.iconbitmap('icon.ico')
editor = Editor(root, title='흔한 찐따의 파이썬 실행기')
editor.mainloop()
sys.exit(0)
| 16.6 | 50 | 0.618474 |
import sys
import tkinter as tk
from pyide.editor import Editor
if __name__ == '__main__':
root = tk.Tk()
root.iconbitmap('icon.ico')
editor = Editor(root, title='흔한 찐따의 파이썬 실행기')
editor.mainloop()
sys.exit(0)
| true | true |
1c15e452aa420d2647cd7580902b3cd19b3665fc | 1,550 | py | Python | Company_Con_past/min_pro2017/B.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | Company_Con_past/min_pro2017/B.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | Company_Con_past/min_pro2017/B.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bis... | 46.969697 | 117 | 0.625161 | import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bis... | true | true |
1c15e49474d85143e97b299b7013955c5bce0daf | 22,312 | py | Python | test/functional/feature_pruning.py | ngocviet/lotusd | 769802c5db7302aa1c23cf81cf42b2e861c45732 | [
"MIT"
] | null | null | null | test/functional/feature_pruning.py | ngocviet/lotusd | 769802c5db7302aa1c23cf81cf42b2e861c45732 | [
"MIT"
] | null | null | null | test/functional/feature_pruning.py | ngocviet/lotusd | 769802c5db7302aa1c23cf81cf42b2e861c45732 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2019 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 pruning code.
WARNING:
This test uses 4GB of disk space.
This test takes 30 mins or more (up ... | 42.907692 | 123 | 0.589414 |
import os
from test_framework.blocktools import create_coinbase
from test_framework.messages import CBlock, ToHex
from test_framework.script import CScript, OP_RETURN, OP_NOP
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
assert_greater_than,
... | true | true |
1c15e4f9e58da6ff00a6162e1ae7e0c1715b6baf | 2,202 | py | Python | open_spiel/python/utils/replay_buffer_test.py | mcx/open_spiel | 062cbfc07621343e7d77209cb421ba690328142b | [
"Apache-2.0"
] | null | null | null | open_spiel/python/utils/replay_buffer_test.py | mcx/open_spiel | 062cbfc07621343e7d77209cb421ba690328142b | [
"Apache-2.0"
] | null | null | null | open_spiel/python/utils/replay_buffer_test.py | mcx/open_spiel | 062cbfc07621343e7d77209cb421ba690328142b | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 DeepMind Technologies Limited
#
# 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 agr... | 31.457143 | 74 | 0.747956 |
from absl.testing import absltest
from open_spiel.python.utils.replay_buffer import ReplayBuffer
class ReplayBufferTest(absltest.TestCase):
def test_replay_buffer_add(self):
replay_buffer = ReplayBuffer(replay_buffer_capacity=10)
self.assertEqual(len(replay_buffer), 0)
replay_buffer.add("entry1"... | true | true |
1c15e5429579915be1c51ce97e9aa426118e2677 | 369 | py | Python | katas/kyu_6/the_book_of_mormon.py | the-zebulan/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 40 | 2016-03-09T12:26:20.000Z | 2022-03-23T08:44:51.000Z | katas/kyu_6/the_book_of_mormon.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | null | null | null | katas/kyu_6/the_book_of_mormon.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 36 | 2016-11-07T19:59:58.000Z | 2022-03-31T11:18:27.000Z | def mormons(starting_number, reach, target):
missions = 0
while starting_number < target:
starting_number += starting_number * reach
missions += 1
return missions
# def mormons(start, reach, target, missions=0):
# if start >= target:
# return missions
# return mormons(start... | 28.384615 | 74 | 0.647696 | def mormons(starting_number, reach, target):
missions = 0
while starting_number < target:
starting_number += starting_number * reach
missions += 1
return missions
| true | true |
1c15e55588ca68cb7232050148c9b5b233c52682 | 5,836 | py | Python | Multiprocess/Process.py | ervin-meng/pyspider | cb98eed7f61a9ebde39a42d469e7fd93b06e15aa | [
"MIT"
] | null | null | null | Multiprocess/Process.py | ervin-meng/pyspider | cb98eed7f61a9ebde39a42d469e7fd93b06e15aa | [
"MIT"
] | null | null | null | Multiprocess/Process.py | ervin-meng/pyspider | cb98eed7f61a9ebde39a42d469e7fd93b06e15aa | [
"MIT"
] | null | null | null | # -*- coding=UTF-8 -*-
import os,sys,signal,time
sys.path.append("..")
from Utils.Hook import Hook
from setproctitle import *
class Process:
_STATUS = 0 #0 初始值 1 开始 2 运行中 3 结束
_name = ''
_pid = 0
_ppid = 0
_pidfile = ''
_stdoutfile = ''
_stderrfile = ''
_workers = {}
_commands = [... | 28.891089 | 108 | 0.541295 | import os,sys,signal,time
sys.path.append("..")
from Utils.Hook import Hook
from setproctitle import *
class Process:
_STATUS = 0 _name = ''
_pid = 0
_ppid = 0
_pidfile = ''
_stdoutfile = ''
_stderrfile = ''
_workers = {}
_commands = ['start','stop','restart','reload','help']
... | false | true |
1c15e5acd95b27f70a27dd4d7f19e567d4cd0233 | 4,366 | py | Python | apps/courses/models.py | WeiSanJin/MxOnline | e210030a00d7837c135504be618ac3744f8e4356 | [
"MIT"
] | 1 | 2021-04-05T14:43:25.000Z | 2021-04-05T14:43:25.000Z | apps/courses/models.py | WeiSanJin/MxOnline | e210030a00d7837c135504be618ac3744f8e4356 | [
"MIT"
] | null | null | null | apps/courses/models.py | WeiSanJin/MxOnline | e210030a00d7837c135504be618ac3744f8e4356 | [
"MIT"
] | null | null | null | # 规范 1.python自带方法、库 2.第三方库 3.自定义方法
from datetime import datetime
from django.db import models
from apps.users.models import BaseModel
from apps.organizations.models import Teacher, CourseOrg
from DjangoUeditor.models import UEditorField
# 1.设计表结构注意的点
'''
实体1 <关系> 实体2
课程 章节 视频 课程资源
'''
# 2.实体的具体字段
# 3.每个... | 33.328244 | 115 | 0.69629 | from datetime import datetime
from django.db import models
from apps.users.models import BaseModel
from apps.organizations.models import Teacher, CourseOrg
from DjangoUeditor.models import UEditorField
class Course(BaseModel):
teacher = models.ForeignKey(Teacher, on_delete=models.CASCADE, verbose_name="讲师")... | true | true |
1c15e66425c00f6d61edb54a921c839d30c3637a | 7,780 | py | Python | buildscripts/mongosymb.py | SunguckLee/real-mongodb | fef0e44fafc6d3709a84101327e7d2f54dd18d88 | [
"Apache-2.0"
] | 4 | 2018-02-06T01:53:12.000Z | 2018-02-20T01:47:36.000Z | buildscripts/mongosymb.py | SunguckLee/real-mongodb | fef0e44fafc6d3709a84101327e7d2f54dd18d88 | [
"Apache-2.0"
] | null | null | null | buildscripts/mongosymb.py | SunguckLee/real-mongodb | fef0e44fafc6d3709a84101327e7d2f54dd18d88 | [
"Apache-2.0"
] | 3 | 2018-02-06T01:53:18.000Z | 2021-07-28T09:48:15.000Z | #!/usr/bin/env python
"""Script and library for symbolizing MongoDB stack traces.
To use as a script, paste the JSON object on the line after ----- BEGIN BACKTRACE ----- into the
standard input of this script. There are numerous caveats. In the default mode, you need
to pass in the path to the executable being sy... | 41.604278 | 101 | 0.62365 |
import json
import optparse
import os
import subprocess
import sys
def symbolize_frames(trace_doc, dbg_path_resolver, symbolizer_path=None, dsym_hint=None):
if symbolizer_path is None:
symbolizer_path = os.environ.get("MONGOSYMB_SYMBOLIZER_PATH", "llvm-symbolizer")
if dsym_hint is None:
... | true | true |
1c15e70de3c914a05c361f88b91c6085c3d9e822 | 652 | py | Python | Makerates/speciesnetwork.py | jonholdship/UCLCHEM | a946815b2e6ab275f658ed64463dcd4e32fcdc17 | [
"MIT"
] | null | null | null | Makerates/speciesnetwork.py | jonholdship/UCLCHEM | a946815b2e6ab275f658ed64463dcd4e32fcdc17 | [
"MIT"
] | null | null | null | Makerates/speciesnetwork.py | jonholdship/UCLCHEM | a946815b2e6ab275f658ed64463dcd4e32fcdc17 | [
"MIT"
] | null | null | null | #simple python script that reads a Makerates produced reaction file and prints every reaction that forms or destroys a chosen species.
from __future__ import print_function
import csv
species='HCN'
f=open('outputFiles/reactions.csv')
reader=csv.reader(f, delimiter=',', quotechar='|')
forms='Species Formed in: \n'
de... | 32.6 | 134 | 0.645706 | from __future__ import print_function
import csv
species='HCN'
f=open('outputFiles/reactions.csv')
reader=csv.reader(f, delimiter=',', quotechar='|')
forms='Species Formed in: \n'
dest='Species Destroyed in: \n'
for row in reader:
if len(row)>1:
if species in [row[0],row[1],row[2]]:
dest=dest+row[0]+' + '+row[... | true | true |
1c15e75e09765002801a510caa2b7f76dde6c19e | 182 | py | Python | src/lib/trains/train_factory.py | EvelynYihuiYang/MCMOT | 8ea20b57d836cc8f8efe1b13dead3e5d8511c16d | [
"MIT"
] | 306 | 2020-05-29T06:59:37.000Z | 2022-03-23T06:00:55.000Z | src/lib/trains/train_factory.py | EvelynYihuiYang/MCMOT | 8ea20b57d836cc8f8efe1b13dead3e5d8511c16d | [
"MIT"
] | 92 | 2020-06-26T10:15:25.000Z | 2022-03-27T11:46:31.000Z | src/lib/trains/train_factory.py | EvelynYihuiYang/MCMOT | 8ea20b57d836cc8f8efe1b13dead3e5d8511c16d | [
"MIT"
] | 79 | 2020-06-22T03:14:34.000Z | 2022-03-17T08:09:13.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .mot import MotTrainer
train_factory = {
'mot': MotTrainer,
}
| 18.2 | 38 | 0.802198 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .mot import MotTrainer
train_factory = {
'mot': MotTrainer,
}
| true | true |
1c15e77783a4ac610b16a54bb8e26d934b6c6555 | 365 | py | Python | src/aiida_ro_crate/cli/cli.py | sphuber/aiida-rocrate | 1bce832be7ef7b6f03b2d2c682df9b0d3e9b24af | [
"MIT"
] | null | null | null | src/aiida_ro_crate/cli/cli.py | sphuber/aiida-rocrate | 1bce832be7ef7b6f03b2d2c682df9b0d3e9b24af | [
"MIT"
] | null | null | null | src/aiida_ro_crate/cli/cli.py | sphuber/aiida-rocrate | 1bce832be7ef7b6f03b2d2c682df9b0d3e9b24af | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Command line interface for ``aiida-ro-crate``."""
from aiida.cmdline.params import options, types
import click
@click.group()
@options.PROFILE(type=types.ProfileParamType(load_profile=True), expose_value=False)
@options.VERBOSITY()
def cmd_root():
"""Command line interface for Research ... | 30.416667 | 87 | 0.745205 | from aiida.cmdline.params import options, types
import click
@click.group()
@options.PROFILE(type=types.ProfileParamType(load_profile=True), expose_value=False)
@options.VERBOSITY()
def cmd_root():
| true | true |
1c15e8c96c25a5c5a19da34eb66a9904633f7739 | 1,226 | py | Python | gcloud/google-cloud-sdk/lib/googlecloudsdk/command_lib/remote_build_execution/workerpool_update_util.py | bopopescu/JobSniperRails | 39e7f871887176770de0f4fc6789e9ddc7f32b1f | [
"MIT"
] | null | null | null | gcloud/google-cloud-sdk/lib/googlecloudsdk/command_lib/remote_build_execution/workerpool_update_util.py | bopopescu/JobSniperRails | 39e7f871887176770de0f4fc6789e9ddc7f32b1f | [
"MIT"
] | 11 | 2020-02-29T02:51:12.000Z | 2022-03-30T23:20:08.000Z | gcloud/google-cloud-sdk/lib/googlecloudsdk/command_lib/remote_build_execution/workerpool_update_util.py | bopopescu/JobSniperRails | 39e7f871887176770de0f4fc6789e9ddc7f32b1f | [
"MIT"
] | 1 | 2020-07-24T18:47:35.000Z | 2020-07-24T18:47:35.000Z | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. 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 requir... | 42.275862 | 180 | 0.804241 |
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
def RemoveAcceleratorConfig(ref, args, request):
del ref
if args.IsSpecified('clear_accelerator_config'):
request.googleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest.workerPool.wo... | true | true |
1c15e915e822f92cadd204a91e26ad31716576e3 | 20,748 | py | Python | archive/first_level.py | cnlab/cnlab_pipeline | 979e2fcdfe9113deec1bc9bad17c2624c1e516bb | [
"MIT"
] | null | null | null | archive/first_level.py | cnlab/cnlab_pipeline | 979e2fcdfe9113deec1bc9bad17c2624c1e516bb | [
"MIT"
] | 1 | 2022-03-25T20:40:02.000Z | 2022-03-25T20:40:02.000Z | archive/first_level.py | cnlab/cnlab_pipeline | 979e2fcdfe9113deec1bc9bad17c2624c1e516bb | [
"MIT"
] | null | null | null |
# coding: utf-8
# # Building first level models using `nipype` and `SPM` with parametric modulation
#
# ## Parametric modulator setup from BIDS events tsv for _megameta_ tasks
#
# ### Multiple run task setup (testing on P1 Image Task)
#
# -------
# #### History
#
# * 1/21/19 mbod - modify notebook from P1 Banner... | 33.25 | 195 | 0.541594 |
import os
import nipype.interfaces.io as nio import nipype.interfaces.spm as spm import nipype.interfaces.matlab as mlab import nipype.interfaces.utility as util import nipype.pipeline.engine as pe import nipype.algorithms.modelgen as model from nipype.interfaces.base impor... | true | true |
1c15e9f858227105fe90bbe9cef3233cc3bde3f6 | 491 | py | Python | BasicOperations/01_01_PyQt4/01_Signal_02_UserDefined.py | UpSea/midProjects | ed6086e74f68b1b89f725abe0b270e67cf8993a8 | [
"MIT"
] | 1 | 2018-07-02T13:54:49.000Z | 2018-07-02T13:54:49.000Z | BasicOperations/01_01_PyQt4/01_Signal_02_UserDefined.py | UpSea/midProjects | ed6086e74f68b1b89f725abe0b270e67cf8993a8 | [
"MIT"
] | null | null | null | BasicOperations/01_01_PyQt4/01_Signal_02_UserDefined.py | UpSea/midProjects | ed6086e74f68b1b89f725abe0b270e67cf8993a8 | [
"MIT"
] | 3 | 2016-05-28T15:13:02.000Z | 2021-04-10T06:04:25.000Z | from PyQt4 import QtGui, QtCore
class MyButton(QtGui.QPushButton):
myclicked = QtCore.pyqtSignal()
def __init__(self, *args, **kwargs):
QtGui.QPushButton.__init__(self, *args, **kwargs)
self.connect(self, QtCore.SIGNAL("clicked()"), self.myclicked.emit)
app = QtGui.QApplication([])
w = QtGui.QWi... | 35.071429 | 75 | 0.688391 | from PyQt4 import QtGui, QtCore
class MyButton(QtGui.QPushButton):
myclicked = QtCore.pyqtSignal()
def __init__(self, *args, **kwargs):
QtGui.QPushButton.__init__(self, *args, **kwargs)
self.connect(self, QtCore.SIGNAL("clicked()"), self.myclicked.emit)
app = QtGui.QApplication([])
w = QtGui.QWi... | true | true |
1c15ea297044763916aa73491f31642e87786310 | 11,077 | py | Python | renderer.py | yeongjoonJu/Occlusion-Robust-3D-Face-CFR-GAN | 1966faf9bfe8d8afd6bc2cea88e5400ce3be54d5 | [
"MIT"
] | 15 | 2021-11-01T08:09:39.000Z | 2022-03-24T06:45:14.000Z | renderer.py | yeongjoonJu/Occlusion-Robust-3D-Face-CFR-GAN | 1966faf9bfe8d8afd6bc2cea88e5400ce3be54d5 | [
"MIT"
] | 1 | 2022-03-10T11:08:20.000Z | 2022-03-10T11:23:13.000Z | renderer.py | yeongjoonJu/Occlusion-Robust-3D-Face-CFR-GAN | 1966faf9bfe8d8afd6bc2cea88e5400ce3be54d5 | [
"MIT"
] | 8 | 2021-11-03T07:11:34.000Z | 2022-03-24T06:45:16.000Z | #!/usr/bin/python
# -*- encoding: utf-8 -*-
from ctypes import ArgumentError
import os ; import sys
os.chdir( os.path.split( os.path.realpath( sys.argv[0] ) )[0] )
from mmRegressor.network.resnet50_task import *
from mmRegressor.preprocess_img import Preprocess
from mmRegressor.load_data import *
from mmRegressor.re... | 39.702509 | 139 | 0.617496 | from ctypes import ArgumentError
import os ; import sys
os.chdir( os.path.split( os.path.realpath( sys.argv[0] ) )[0] )
from mmRegressor.network.resnet50_task import *
from mmRegressor.preprocess_img import Preprocess
from mmRegressor.load_data import *
from mmRegressor.reconstruct_mesh import Reconstruction, Comput... | true | true |
1c15eae23769855db501cfd1ff1d40b9b77b668f | 2,023 | py | Python | contents/tree_traversal/code/python/tree_traversal.py | alzawad26/algorithm-archive | 98ca4ab8115dd9013e6a5267cb757d61f0350ad7 | [
"MIT"
] | 1 | 2018-09-12T18:58:58.000Z | 2018-09-12T18:58:58.000Z | contents/tree_traversal/code/python/tree_traversal.py | alzawad26/algorithm-archive | 98ca4ab8115dd9013e6a5267cb757d61f0350ad7 | [
"MIT"
] | 1 | 2018-08-09T18:36:48.000Z | 2018-08-09T18:36:48.000Z | contents/tree_traversal/code/python/tree_traversal.py | alzawad26/algorithm-archive | 98ca4ab8115dd9013e6a5267cb757d61f0350ad7 | [
"MIT"
] | null | null | null | class Node:
def __init__(self):
self.data = None
self.children = []
def create_tree(node, num_row, num_child):
node.data = num_row
if num_row > 0:
for i in range(num_child):
child = create_tree(Node(), num_row-1, num_child)
node.children.append(child)
r... | 22.230769 | 68 | 0.611962 | class Node:
def __init__(self):
self.data = None
self.children = []
def create_tree(node, num_row, num_child):
node.data = num_row
if num_row > 0:
for i in range(num_child):
child = create_tree(Node(), num_row-1, num_child)
node.children.append(child)
r... | true | true |
1c15eb804d21a034e2d6ecd8b23cc2424d97adb9 | 2,872 | py | Python | setup.py | Fuzion24/mitmproxy | adae9c670b8a8e9238a2b2967e2f2ece11a28563 | [
"MIT"
] | 3 | 2016-10-08T05:19:11.000Z | 2020-05-29T20:08:56.000Z | setup.py | Fuzion24/mitmproxy | adae9c670b8a8e9238a2b2967e2f2ece11a28563 | [
"MIT"
] | null | null | null | setup.py | Fuzion24/mitmproxy | adae9c670b8a8e9238a2b2967e2f2ece11a28563 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from codecs import open
import os
from libmproxy import version
# Based on https://github.com/pypa/sampleproject/blob/master/setup.py
# and https://python-packaging-user-guide.readthedocs.org/
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, '... | 30.231579 | 125 | 0.582521 | from setuptools import setup, find_packages
from codecs import open
import os
from libmproxy import version
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.txt'), encoding='utf-8') as f:
long_description = f.read()
scripts = ["mitmdump", "mitmweb"]
if os.name != "nt":
... | true | true |
1c15ebf893a01d832c1f58a49794720d6141a6bb | 186 | py | Python | test/gen_primes.py | jeffro256/csce-410-project-1 | e037b8935bf27057856fe37c5335f27e48de1db9 | [
"MIT"
] | null | null | null | test/gen_primes.py | jeffro256/csce-410-project-1 | e037b8935bf27057856fe37c5335f27e48de1db9 | [
"MIT"
] | null | null | null | test/gen_primes.py | jeffro256/csce-410-project-1 | e037b8935bf27057856fe37c5335f27e48de1db9 | [
"MIT"
] | null | null | null | from sys import argv
from sympy import isprime
a = int(argv[1])
b = int(argv[2])
with open('py_prime_out.txt', 'w') as f:
for i in range(a, b):
f.write(str(int(isprime(i))) + '\n')
| 18.6 | 40 | 0.634409 | from sys import argv
from sympy import isprime
a = int(argv[1])
b = int(argv[2])
with open('py_prime_out.txt', 'w') as f:
for i in range(a, b):
f.write(str(int(isprime(i))) + '\n')
| true | true |
1c15ec7bcdf34c3e1d590aedaf9edca4ca98611e | 278 | py | Python | prettyqt/quick/quickrendercontrol.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 7 | 2019-05-01T01:34:36.000Z | 2022-03-08T02:24:14.000Z | prettyqt/quick/quickrendercontrol.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 141 | 2019-04-16T11:22:01.000Z | 2021-04-14T15:12:36.000Z | prettyqt/quick/quickrendercontrol.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 5 | 2019-04-17T11:48:19.000Z | 2021-11-21T10:30:19.000Z | from __future__ import annotations
from prettyqt import core
from prettyqt.qt import QtQuick
QtQuick.QQuickRenderControl.__bases__ = (core.Object,)
class QuickRenderControl(QtQuick.QQuickRenderControl):
pass
if __name__ == "__main__":
item = QuickRenderControl()
| 17.375 | 54 | 0.784173 | from __future__ import annotations
from prettyqt import core
from prettyqt.qt import QtQuick
QtQuick.QQuickRenderControl.__bases__ = (core.Object,)
class QuickRenderControl(QtQuick.QQuickRenderControl):
pass
if __name__ == "__main__":
item = QuickRenderControl()
| true | true |
1c15ece0028a50a5e845beffa234973d5e18ae6d | 842 | py | Python | app.py | ericauuu/get_the_foodies | 2abfae6a0f69a264866f10b8e9177e5b45681222 | [
"MIT"
] | 1 | 2019-10-22T19:44:24.000Z | 2019-10-22T19:44:24.000Z | app.py | ericauuu/get_the_foodies_demo | 2abfae6a0f69a264866f10b8e9177e5b45681222 | [
"MIT"
] | 3 | 2019-12-26T17:34:00.000Z | 2022-03-21T22:17:44.000Z | app.py | ericauuu/get_the_foodies_demo | 2abfae6a0f69a264866f10b8e9177e5b45681222 | [
"MIT"
] | null | null | null | from waitress import serve
import matplotlib
matplotlib.use('Agg')
from flask import Flask, render_template, request
import matplotlib.pyplot as plt
from python.functions import result_f1scr, result_table
app = Flask(__name__, static_url_path="/static")
@app.route("/")
def index():
"""Return the main page."""
... | 25.515152 | 89 | 0.718527 | from waitress import serve
import matplotlib
matplotlib.use('Agg')
from flask import Flask, render_template, request
import matplotlib.pyplot as plt
from python.functions import result_f1scr, result_table
app = Flask(__name__, static_url_path="/static")
@app.route("/")
def index():
restaurants = ["amelie_nyc",... | true | true |
1c15ee459ff25d940d672286d1b9cfecee99f451 | 1,336 | py | Python | ooobuild/lo/drawing/dash_table.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/drawing/dash_table.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/drawing/dash_table.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 31.809524 | 122 | 0.743263 | from ..container.x_name_container import XNameContainer as XNameContainer_cb90e47
class DashTable(XNameContainer_cb90e47):
__ooo_ns__: str = 'com.sun.star.drawing'
__ooo_full_ns__: str = 'com.sun.star.drawing.DashTable'
__ooo_type_name__: str = 'service'
__all__ = ['DashTable']
| true | true |
1c15ee9b5e2d3f60611ae6de75d6b5932dc4dacb | 580 | py | Python | supriya/ugens/PV_Diffuser.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/PV_Diffuser.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/PV_Diffuser.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import collections
from supriya.ugens.PV_ChainUGen import PV_ChainUGen
class PV_Diffuser(PV_ChainUGen):
"""
Shifts phases randomly.
::
>>> pv_chain = supriya.ugens.FFT(
... source=supriya.ugens.WhiteNoise.ar(),
... )
>>> pv_diffuser = supriya.ugens.PV_Diffuser.ne... | 21.481481 | 88 | 0.560345 | import collections
from supriya.ugens.PV_ChainUGen import PV_ChainUGen
class PV_Diffuser(PV_ChainUGen):
_ordered_input_names = collections.OrderedDict([("pv_chain", None), ("trigger", 0)])
| true | true |
1c15f0059aaca92bf883c5faadb7247304a49fb6 | 57,727 | py | Python | modules/s3db/hms.py | hitesh96db/eden | 8e1b22d7d4b92c0bce5b6172d57298949a2f0582 | [
"MIT"
] | null | null | null | modules/s3db/hms.py | hitesh96db/eden | 8e1b22d7d4b92c0bce5b6172d57298949a2f0582 | [
"MIT"
] | null | null | null | modules/s3db/hms.py | hitesh96db/eden | 8e1b22d7d4b92c0bce5b6172d57298949a2f0582 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Sahana Eden Hospital Management System Model
@copyright: 2009-2014 (c) Sahana Software Foundation
@license: MIT
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... | 43.765732 | 166 | 0.417361 |
__all__ = ("HospitalDataModel",
"CholeraTreatmentCapabilityModel",
"HospitalActivityReportModel",
"hms_hospital_rheader"
)
from gluon import *
from gluon.storage import Storage
from gluon.dal import Row
from ..s3 import *
from s3layouts import S3AddResourceLink
class Hosp... | true | true |
1c15f099e97571a136ebf8c9fed6412c4429cd05 | 3,421 | py | Python | twisted/python/urlpath.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 7 | 2015-04-28T13:26:11.000Z | 2020-02-09T17:01:04.000Z | twisted/python/urlpath.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 4 | 2017-02-19T23:58:13.000Z | 2019-11-01T15:31:22.000Z | twisted/python/urlpath.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 6 | 2017-02-13T09:11:02.000Z | 2021-06-29T11:22:18.000Z | # -*- test-case-name: twisted.test.test_paths -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
import urlparse
import urllib
class URLPath:
def __init__(self, scheme='', netloc='localhost', path='',
query='', fragment=''):
self.scheme = scheme or 'http'
... | 27.813008 | 83 | 0.505408 |
import urlparse
import urllib
class URLPath:
def __init__(self, scheme='', netloc='localhost', path='',
query='', fragment=''):
self.scheme = scheme or 'http'
self.netloc = netloc
self.path = path or '/'
self.query = query
self.fragment = fragment
_qp... | true | true |
1c15f1c3569df1010804f28b0176acd30f04a115 | 1,763 | py | Python | examples/voxel/process-maps.py | AndrewCapon/32blit-beta | 730d1517a6586bdd041812198a3ee5c708df01c0 | [
"MIT"
] | 88 | 2019-11-27T13:15:27.000Z | 2021-02-03T19:39:25.000Z | examples/voxel/process-maps.py | AndrewCapon/32blit-beta | 730d1517a6586bdd041812198a3ee5c708df01c0 | [
"MIT"
] | 496 | 2019-11-27T13:24:44.000Z | 2021-02-10T15:45:46.000Z | examples/voxel/process-maps.py | AndrewCapon/32blit-beta | 730d1517a6586bdd041812198a3ee5c708df01c0 | [
"MIT"
] | 57 | 2019-11-27T13:25:25.000Z | 2021-02-10T09:03:54.000Z | #!/usr/bin/env python3
# processes a colour map and a height map into the format needed
# for the voxel demo to stream map data on the fly from the
# SD card.
#
# colour map: should be a 256 colour indexed image (bmp, png, etc)
# height map: should be a greyscale image where "white" is higher
#
# both images must hav... | 29.383333 | 84 | 0.707317 |
from PIL import Image
import sys
import os.path
colour_map_filename = sys.argv[1]
height_map_filename = sys.argv[2]
output_filename = sys.argv[3]
colour_map_image = Image.open(colour_map_filename)
height_map_image = Image.open(height_map_filename)
width, height = colour_map_image.size
chunks = int(width / 32)
d... | true | true |
1c15f2e2836a2ca53ae0b8d7d5236f683813d717 | 102 | py | Python | trac_mattermost/__init__.py | alexschnapper/trac-mattermost | f3543ed06a9b0dfaeb928c25456c1e67c2d916a5 | [
"ISC"
] | 13 | 2016-01-07T21:05:55.000Z | 2019-10-14T12:22:00.000Z | trac_mattermost/__init__.py | alexschnapper/trac-mattermost | f3543ed06a9b0dfaeb928c25456c1e67c2d916a5 | [
"ISC"
] | 7 | 2016-02-10T12:26:37.000Z | 2017-06-30T13:49:33.000Z | trac_mattermost/__init__.py | alexschnapper/trac-mattermost | f3543ed06a9b0dfaeb928c25456c1e67c2d916a5 | [
"ISC"
] | 6 | 2016-06-22T16:04:52.000Z | 2021-04-06T16:40:10.000Z | from ticket_notifications import TicketNotifications
from wiki_notifications import WikiNotifications
| 34 | 52 | 0.921569 | from ticket_notifications import TicketNotifications
from wiki_notifications import WikiNotifications
| true | true |
1c15f2f1c1a091008ee1fa40726a9ac130c71ba8 | 394 | py | Python | data_loader/__init__.py | MahmoudTamam/Human-activity-Recoginition | 3951efc7f34bb9fde2e77db2a84627b6bcd48a8c | [
"MIT"
] | 696 | 2018-08-14T03:12:18.000Z | 2022-03-24T08:02:01.000Z | datasets/__init__.py | minghchen/MaxSquareLoss | 2fbc18fc4ee0a618bfb6a9c0e1318261c80541db | [
"MIT"
] | 82 | 2018-03-08T18:59:03.000Z | 2022-03-11T23:18:17.000Z | datasets/__init__.py | minghchen/MaxSquareLoss | 2fbc18fc4ee0a618bfb6a9c0e1318261c80541db | [
"MIT"
] | 182 | 2018-03-09T01:03:20.000Z | 2022-01-14T02:49:59.000Z | import os
import sys
path = os.path.dirname(os.path.abspath(__file__))
for py in [f[:-3] for f in os.listdir(path) if f.endswith('.py') and f != '__init__.py']:
mod = __import__('.'.join([__name__, py]), fromlist=[py])
classes = [getattr(mod, x) for x in dir(mod) if isinstance(getattr(mod, x), type)]
for ... | 35.818182 | 89 | 0.654822 | import os
import sys
path = os.path.dirname(os.path.abspath(__file__))
for py in [f[:-3] for f in os.listdir(path) if f.endswith('.py') and f != '__init__.py']:
mod = __import__('.'.join([__name__, py]), fromlist=[py])
classes = [getattr(mod, x) for x in dir(mod) if isinstance(getattr(mod, x), type)]
for ... | true | true |
1c15f30f7e2a120e1825833a7d6f287c8a1ba901 | 330 | py | Python | PycharmProjects/pythonProject1/lab11(find GCD using recursive).py | CS-Fourth-Stage/crypto | 9876e82183534df23dea6d0d6f3144e963f3e7e4 | [
"MIT"
] | null | null | null | PycharmProjects/pythonProject1/lab11(find GCD using recursive).py | CS-Fourth-Stage/crypto | 9876e82183534df23dea6d0d6f3144e963f3e7e4 | [
"MIT"
] | null | null | null | PycharmProjects/pythonProject1/lab11(find GCD using recursive).py | CS-Fourth-Stage/crypto | 9876e82183534df23dea6d0d6f3144e963f3e7e4 | [
"MIT"
] | null | null | null | # Find GCD between two numbers using recursive??
def gcd(a, b):
if b > a:
a, b = b, a # swap in python
if b == 0:
return a
else:
return gcd(b, a % b)
num1 = int(input("Enter the first number: "))
num2 = int(input("Enter the second number: "))
print(f"GCD({num1},{num2})={gcd(num1,... | 22 | 48 | 0.557576 |
def gcd(a, b):
if b > a:
a, b = b, a if b == 0:
return a
else:
return gcd(b, a % b)
num1 = int(input("Enter the first number: "))
num2 = int(input("Enter the second number: "))
print(f"GCD({num1},{num2})={gcd(num1, num2)}")
| true | true |
1c15f3892575789a7627f456d15d8815f0de4924 | 1,835 | py | Python | manipulators/lights_interface/scripts/lights_interface_node.py | vortexntnu/manta-AUV | c9e223c60cf0672e74b42aa2ea2dfe988de5d359 | [
"MIT"
] | null | null | null | manipulators/lights_interface/scripts/lights_interface_node.py | vortexntnu/manta-AUV | c9e223c60cf0672e74b42aa2ea2dfe988de5d359 | [
"MIT"
] | null | null | null | manipulators/lights_interface/scripts/lights_interface_node.py | vortexntnu/manta-AUV | c9e223c60cf0672e74b42aa2ea2dfe988de5d359 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import rospy
from sensor_msgs.msg import Joy
from vortex_msgs.msg import Pwm
from datetime import datetime
# TODO: have multiple light intensity lvls using pwm
pressed = 1
active = 1
inactive = 0
PWM_LOW = 1100
PWM_HIGH = 1900
class LightsInterfaceNode:
def __init__(self):
rospy.in... | 26.214286 | 75 | 0.592916 |
import rospy
from sensor_msgs.msg import Joy
from vortex_msgs.msg import Pwm
from datetime import datetime
pressed = 1
active = 1
inactive = 0
PWM_LOW = 1100
PWM_HIGH = 1900
class LightsInterfaceNode:
def __init__(self):
rospy.init_node("lights_interface")
self.js_sub = rospy.Subscriber(
... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.