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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f760748dbf64bd6b0551abb17ba39a3c9f09d7ba | 7,659 | py | Python | warp_mls.py | alwc/Text-Image-Augmentation-python | 20da2089280098d09069407f7da09eac78eb2eb7 | [
"Apache-2.0"
] | null | null | null | warp_mls.py | alwc/Text-Image-Augmentation-python | 20da2089280098d09069407f7da09eac78eb2eb7 | [
"Apache-2.0"
] | null | null | null | warp_mls.py | alwc/Text-Image-Augmentation-python | 20da2089280098d09069407f7da09eac78eb2eb7 | [
"Apache-2.0"
] | 1 | 2020-03-26T05:46:12.000Z | 2020-03-26T05:46:12.000Z | # -*- coding:utf-8 -*-
# Author: RubanSeven
import math
import numpy as np
class WarpMLS:
def __init__(self, src, src_pts, dst_pts, dst_w, dst_h, trans_ratio=1.):
self.src = src
self.src_pts = src_pts
self.dst_pts = dst_pts
self.pt_count = len(self.dst_pts)
se... | 44.017241 | 118 | 0.3648 | import math
import numpy as np
class WarpMLS:
def __init__(self, src, src_pts, dst_pts, dst_w, dst_h, trans_ratio=1.):
self.src = src
self.src_pts = src_pts
self.dst_pts = dst_pts
self.pt_count = len(self.dst_pts)
self.dst_w = dst_w
self.dst_h = dst_h
... | true | true |
f760754cbda40b218faf3595084be24ccfc88fc4 | 153 | py | Python | usersystem/models.py | sergioruizdavila/asanni-backend | b2da3f3a97dbd1ef46d65f13ee9b2098124d4fc4 | [
"MIT"
] | 8 | 2018-05-24T04:46:58.000Z | 2021-06-11T04:41:49.000Z | usersystem/models.py | sergioruizdavila/asanni-backend | b2da3f3a97dbd1ef46d65f13ee9b2098124d4fc4 | [
"MIT"
] | null | null | null | usersystem/models.py | sergioruizdavila/asanni-backend | b2da3f3a97dbd1ef46d65f13ee9b2098124d4fc4 | [
"MIT"
] | 4 | 2020-01-24T13:35:42.000Z | 2021-06-15T07:38:06.000Z | from django.db import models
from django.contrib.auth.models import User
# Enforce unique email addresses
User._meta.get_field('email')._unique = True
| 21.857143 | 44 | 0.797386 | from django.db import models
from django.contrib.auth.models import User
User._meta.get_field('email')._unique = True
| true | true |
f76076fab05fe1c3d63727f6017923c955d283f6 | 2,301 | py | Python | coro/log/asn1.py | amitdev/shrapnel | e9032fe6c906d8ebe55164c91a263c1ee7d7b045 | [
"BSD-2-Clause"
] | 98 | 2015-01-09T05:35:59.000Z | 2021-11-22T17:38:58.000Z | coro/log/asn1.py | amitdev/shrapnel | e9032fe6c906d8ebe55164c91a263c1ee7d7b045 | [
"BSD-2-Clause"
] | 22 | 2015-02-10T23:57:53.000Z | 2020-01-31T01:14:55.000Z | coro/log/asn1.py | amitdev/shrapnel | e9032fe6c906d8ebe55164c91a263c1ee7d7b045 | [
"BSD-2-Clause"
] | 22 | 2015-03-07T20:59:32.000Z | 2021-07-22T09:23:52.000Z |
from coro.asn1.python import encode, decode
import coro
import struct
# four bytes from os.urandom().
MAGIC = '%\xf1\xbfB'
class Logger:
magic = MAGIC
def __init__ (self, file):
self.encode = encode
self.file = file
def log (self, *data):
data = self.encode ((coro.now_usec, dat... | 23.01 | 70 | 0.447631 |
from coro.asn1.python import encode, decode
import coro
import struct
MAGIC = '%\xf1\xbfB'
class Logger:
magic = MAGIC
def __init__ (self, file):
self.encode = encode
self.file = file
def log (self, *data):
data = self.encode ((coro.now_usec, data))
self.file.write (
... | false | true |
f760782b12152bfd787456340daf8f77d8a567eb | 8,640 | py | Python | py/testdir_multi_jvm/test_KMeans_sphere100_fvec.py | gigliovale/h2o | be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1 | [
"Apache-2.0"
] | 882 | 2015-05-22T02:59:21.000Z | 2022-02-17T05:02:48.000Z | py/testdir_multi_jvm/test_KMeans_sphere100_fvec.py | VonRosenchild/h2o-2 | be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1 | [
"Apache-2.0"
] | 1 | 2022-02-22T12:15:02.000Z | 2022-02-22T12:15:02.000Z | py/testdir_multi_jvm/test_KMeans_sphere100_fvec.py | VonRosenchild/h2o-2 | be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1 | [
"Apache-2.0"
] | 392 | 2015-05-22T17:04:11.000Z | 2022-02-22T09:04:39.000Z | import unittest, time, sys, random, math
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_kmeans, h2o_browse as h2b, h2o_util, h2o_import as h2i
# a truly uniform sphere
# http://stackoverflow.com/questions/5408276/python-uniform-spherical-distribution
# he offers the exact solution: http://stackoverf... | 39.095023 | 150 | 0.592245 | import unittest, time, sys, random, math
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_kmeans, h2o_browse as h2b, h2o_util, h2o_import as h2i
CLUSTERS = 8
SPHERE_PTS = 10000
RANDOMIZE_SPHERE_PTS = True
DIMENSIONS = 4 JUMP_RANDOM_ALL_DIRS = True
SHUFFLE_SPHERES = True
R_NOISE = True
ALLOWED_CENTER_D... | false | true |
f76078c008cb54b68915194d39a7f2d4ccd12472 | 11,269 | py | Python | tests/models/test_renderedtifields.py | rliuamzn/airflow | 177dfbd12a42a5c229640c6c830f43f280ea5caa | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-07-30T16:29:58.000Z | 2021-08-03T13:52:31.000Z | tests/models/test_renderedtifields.py | rliuamzn/airflow | 177dfbd12a42a5c229640c6c830f43f280ea5caa | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 6 | 2020-12-22T17:43:49.000Z | 2021-04-27T13:41:10.000Z | tests/models/test_renderedtifields.py | rliuamzn/airflow | 177dfbd12a42a5c229640c6c830f43f280ea5caa | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-11-01T16:22:58.000Z | 2020-11-01T16:22:58.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... | 37.563333 | 110 | 0.613985 |
import os
import unittest
from datetime import date, timedelta
from unittest import mock
from parameterized import parameterized
from airflow import settings
from airflow.models import Variable
from airflow.models.dag import DAG
from airflow.models.renderedtifields import RenderedTaskInstanceFields as RTIF
from air... | true | true |
f760790017dc7df857f2dd12ee656f668b403a5e | 11,841 | py | Python | tfjs-converter/python/tensorflowjs/converters/fold_batch_norms.py | juancastillo0/tfjs | a53aae8fd99762ab41a25ac362ece95b4bbb8cf6 | [
"Apache-2.0"
] | 16,503 | 2018-03-29T18:58:18.000Z | 2022-03-31T09:49:13.000Z | tfjs-converter/python/tensorflowjs/converters/fold_batch_norms.py | juancastillo0/tfjs | a53aae8fd99762ab41a25ac362ece95b4bbb8cf6 | [
"Apache-2.0"
] | 4,304 | 2018-03-30T17:13:46.000Z | 2022-03-31T23:46:10.000Z | tfjs-converter/python/tensorflowjs/converters/fold_batch_norms.py | juancastillo0/tfjs | a53aae8fd99762ab41a25ac362ece95b4bbb8cf6 | [
"Apache-2.0"
] | 1,974 | 2018-03-30T16:50:25.000Z | 2022-03-30T21:06:35.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 43.373626 | 80 | 0.674267 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import numpy as np
from tensorflow.core.framework import attr_value_pb2
from tensorflow.core.framework import graph_pb2
from tensorflow.core.framework import node_def_pb2
from tensorflow.python.fr... | true | true |
f760790ca4126a43640f95402cf55c91a308d326 | 6,782 | py | Python | tests/core/util/test_keychain.py | Venidium-Network/venidium-blockchain | 600af545018e2cc03c808315239d57c74cffd57d | [
"Apache-2.0"
] | 7 | 2021-06-29T22:23:55.000Z | 2022-02-09T04:32:46.000Z | tests/core/util/test_keychain.py | Venidium-Network/venidium-blockchain | 600af545018e2cc03c808315239d57c74cffd57d | [
"Apache-2.0"
] | 2 | 2021-09-13T03:23:59.000Z | 2022-01-12T20:20:27.000Z | tests/core/util/test_keychain.py | Venidium-Network/venidium-blockchain | 600af545018e2cc03c808315239d57c74cffd57d | [
"Apache-2.0"
] | null | null | null | import json
import unittest
from secrets import token_bytes
from blspy import AugSchemeMPL, PrivateKey
from tests.util.keyring import using_temp_file_keyring
from venidium.util.keychain import Keychain, bytes_from_mnemonic, bytes_to_mnemonic, generate_mnemonic, mnemonic_to_seed
class TestKeychain(unittest.TestCase)... | 50.61194 | 278 | 0.702005 | import json
import unittest
from secrets import token_bytes
from blspy import AugSchemeMPL, PrivateKey
from tests.util.keyring import using_temp_file_keyring
from venidium.util.keychain import Keychain, bytes_from_mnemonic, bytes_to_mnemonic, generate_mnemonic, mnemonic_to_seed
class TestKeychain(unittest.TestCase)... | true | true |
f76079563aa6ad49463d0c17f0b634bd09e00763 | 3,781 | py | Python | foundation/www/conf/2019/talks.py | SantoshSrinivas79/foundation | dcfb6583b254d77535808593f24fb9166f497171 | [
"MIT"
] | null | null | null | foundation/www/conf/2019/talks.py | SantoshSrinivas79/foundation | dcfb6583b254d77535808593f24fb9166f497171 | [
"MIT"
] | null | null | null | foundation/www/conf/2019/talks.py | SantoshSrinivas79/foundation | dcfb6583b254d77535808593f24fb9166f497171 | [
"MIT"
] | null | null | null | import frappe
def get_context(context):
context.schedules = [
[
["October 17, 2019", "Enterprise + Open Source"],
["08:00 - 09:30", "Registrations & Breakfast"],
["09:45 - 10:00", "Opening Ceremony, Welcome"],
["10:00 - 10:30", "Dr. Kailash Nadh (CTO, Zerodha)"],
["", "<span class='text-muted'>Though... | 51.794521 | 104 | 0.599841 | import frappe
def get_context(context):
context.schedules = [
[
["October 17, 2019", "Enterprise + Open Source"],
["08:00 - 09:30", "Registrations & Breakfast"],
["09:45 - 10:00", "Opening Ceremony, Welcome"],
["10:00 - 10:30", "Dr. Kailash Nadh (CTO, Zerodha)"],
["", "<span class='text-muted'>Though... | true | true |
f7607989f1ee1960c450b07a0dfd54455d81b428 | 194 | py | Python | binarysearch/NLexicographicIntegers.py | Ry4nW/python-wars | 76e3fb24b7ae2abf35db592f1ad59cf8d5f9e508 | [
"MIT"
] | 1 | 2021-06-06T19:55:22.000Z | 2021-06-06T19:55:22.000Z | binarysearch/NLexicographicIntegers.py | Ry4nW/python-wars | 76e3fb24b7ae2abf35db592f1ad59cf8d5f9e508 | [
"MIT"
] | 1 | 2022-01-20T19:20:33.000Z | 2022-01-20T23:51:46.000Z | binarysearch/NLexicographicIntegers.py | Ry4nW/python-wars | 76e3fb24b7ae2abf35db592f1ad59cf8d5f9e508 | [
"MIT"
] | null | null | null | class Solution:
def solve(self, n):
stringElements = [str(num) for num in range(1, n + 1)]
stringElements.sort()
return [int(num) for num in stringElements]
| 27.714286 | 62 | 0.587629 | class Solution:
def solve(self, n):
stringElements = [str(num) for num in range(1, n + 1)]
stringElements.sort()
return [int(num) for num in stringElements]
| true | true |
f760798cb56bd0b46e2e05c4c6ff6489e1d707ed | 13,246 | py | Python | source/mq/dyccon.py | PYH-torder/robot-test | 381df1e8911d8ca43c2a57613a7a75e674fea7b6 | [
"MIT"
] | null | null | null | source/mq/dyccon.py | PYH-torder/robot-test | 381df1e8911d8ca43c2a57613a7a75e674fea7b6 | [
"MIT"
] | null | null | null | source/mq/dyccon.py | PYH-torder/robot-test | 381df1e8911d8ca43c2a57613a7a75e674fea7b6 | [
"MIT"
] | null | null | null | import sys
import time
import os
import config
import setmq
from socket import *
import numpy as np
import time
import binascii
#동양커피머신 상태 가져오기
host = "192.168.103.140"
gseq = 0
gcrc_16 = 0x8005
table_crc = []
def buildTable16(aPoly):
for i in range(0, 256):
data = np.uint16(i << 8)
accum = 0
... | 34.494792 | 170 | 0.435754 | import sys
import time
import os
import config
import setmq
from socket import *
import numpy as np
import time
import binascii
host = "192.168.103.140"
gseq = 0
gcrc_16 = 0x8005
table_crc = []
def buildTable16(aPoly):
for i in range(0, 256):
data = np.uint16(i << 8)
accum = 0
for j in ran... | true | true |
f7607a987b6bb2ced3f326f260ec9ff23b335003 | 2,988 | py | Python | pyhilo/util/state.py | dvd-dev/python-hilo | 6a31be13131485baa2ee4e05465bd3c184c1a1b0 | [
"Unlicense"
] | 8 | 2021-12-20T19:12:09.000Z | 2022-02-17T21:03:17.000Z | pyhilo/util/state.py | dvd-dev/python-hilo | 6a31be13131485baa2ee4e05465bd3c184c1a1b0 | [
"Unlicense"
] | 4 | 2021-12-19T14:02:48.000Z | 2022-01-16T17:51:25.000Z | pyhilo/util/state.py | dvd-dev/python-hilo | 6a31be13131485baa2ee4e05465bd3c184c1a1b0 | [
"Unlicense"
] | 2 | 2022-01-16T17:26:28.000Z | 2022-02-24T13:35:25.000Z | from datetime import datetime
from os.path import isfile
from typing import Any, Optional, Type, TypedDict, TypeVar, Union
import ruyaml as yaml
from pyhilo.const import LOG
class TokenDict(TypedDict):
access: Optional[str]
refresh: Optional[str]
expires_at: datetime
class AndroidDeviceDict(TypedDict)... | 27.163636 | 97 | 0.681727 | from datetime import datetime
from os.path import isfile
from typing import Any, Optional, Type, TypedDict, TypeVar, Union
import ruyaml as yaml
from pyhilo.const import LOG
class TokenDict(TypedDict):
access: Optional[str]
refresh: Optional[str]
expires_at: datetime
class AndroidDeviceDict(TypedDict)... | true | true |
f7607accc0b113b764fe5a8c969871b52c03fd9f | 3,194 | py | Python | veles/tests/test_velescli.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 1,007 | 2015-07-20T12:01:41.000Z | 2022-03-30T23:08:35.000Z | veles/tests/test_velescli.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 52 | 2015-07-21T10:26:24.000Z | 2019-01-24T05:46:43.000Z | veles/tests/test_velescli.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 235 | 2015-07-20T09:42:42.000Z | 2021-12-06T18:12:26.000Z | # -*- coding: utf-8 -*-
"""
.. invisible:
_ _ _____ _ _____ _____
| | | | ___| | | ___/ ___|
| | | | |__ | | | |__ \ `--.
| | | | __|| | | __| `--. \
\ \_/ / |___| |___| |___/\__/ /
\___/\____/\_____|____/\____/
Created on Jun 9, 2014
████████████████████████████████████████... | 29.850467 | 79 | 0.584847 |
import numpy
import os
import struct
import sys
import tempfile
import unittest
from veles.__main__ import Main
import veles.prng as rnd
from veles.workflow import Workflow
class Test(unittest.TestCase):
def setUp(self):
self.main = Main(True, "workflow", "config")
def testSeeding(self):
_... | true | true |
f7607b46f4ccf3495a92e4628bcc34436f39dbf1 | 1,824 | py | Python | src/riotwatcher/Handlers/RequestHandler.py | acgandhi/Riot-Watcher | f8a7ea144a00fc62f9ffaee5bad3158f41251589 | [
"MIT"
] | null | null | null | src/riotwatcher/Handlers/RequestHandler.py | acgandhi/Riot-Watcher | f8a7ea144a00fc62f9ffaee5bad3158f41251589 | [
"MIT"
] | null | null | null | src/riotwatcher/Handlers/RequestHandler.py | acgandhi/Riot-Watcher | f8a7ea144a00fc62f9ffaee5bad3158f41251589 | [
"MIT"
] | null | null | null | class RequestHandler:
def __init__(self):
pass
def preview_request(
self,
region: str,
endpoint_name: str,
method_name: str,
url: str,
query_params: dict,
):
"""
called before a request is processed.
:param string region: the ... | 34.415094 | 86 | 0.616776 | class RequestHandler:
def __init__(self):
pass
def preview_request(
self,
region: str,
endpoint_name: str,
method_name: str,
url: str,
query_params: dict,
):
def after_request(
self, region: str, endpoint_name: str, method_name: str, url:... | true | true |
f7607b79bd34aca8f7daf9cf8511167355e17c27 | 44,156 | py | Python | tests/unit/spanner_dbapi/test_cursor.py | rahul2393/python-spanner | 86d33905269accabfc6d68dae0f2b78bec96026a | [
"Apache-2.0"
] | null | null | null | tests/unit/spanner_dbapi/test_cursor.py | rahul2393/python-spanner | 86d33905269accabfc6d68dae0f2b78bec96026a | [
"Apache-2.0"
] | null | null | null | tests/unit/spanner_dbapi/test_cursor.py | rahul2393/python-spanner | 86d33905269accabfc6d68dae0f2b78bec96026a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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 required by applicable law or ag... | 38.835532 | 105 | 0.616881 |
import mock
import sys
import unittest
class TestCursor(unittest.TestCase):
INSTANCE = "test-instance"
DATABASE = "test-database"
def _get_target_class(self):
from google.cloud.spanner_dbapi import Cursor
return Cursor
def _make_one(self, *args, **kwargs):
return self._ge... | true | true |
f7607d23cf55b35d0730d090ebb274edc44715fa | 12,261 | py | Python | salt/modules/zk_concurrency.py | sacren/salt | 887336c6deaaad6f9ad4948b69472bd043962d56 | [
"Apache-2.0"
] | null | null | null | salt/modules/zk_concurrency.py | sacren/salt | 887336c6deaaad6f9ad4948b69472bd043962d56 | [
"Apache-2.0"
] | null | null | null | salt/modules/zk_concurrency.py | sacren/salt | 887336c6deaaad6f9ad4948b69472bd043962d56 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Concurrency controls in zookeeper
=========================================================================
:depends: kazoo
:configuration: See :py:mod:`salt.modules.zookeeper` for setup instructions.
This module allows you to acquire and release a slot. This is primarily useful
for ensure... | 33.591781 | 110 | 0.583721 | from __future__ import absolute_import
import logging
import sys
try:
import kazoo.client
from kazoo.retry import (
ForceRetryError
)
import kazoo.recipe.lock
import kazoo.recipe.barrier
import kazoo.recipe.party
from kazoo.exceptions import CancelledError
from kazoo.exception... | true | true |
f7607daba133a72b18b0996070513477addb724f | 11,431 | py | Python | simpleLogFilter.py | brraghav/simpleTools | 640b94fb4875173e7dbb8974296c46f09029cf99 | [
"MIT"
] | 15 | 2022-02-18T11:25:03.000Z | 2022-03-09T11:23:23.000Z | simpleLogFilter.py | brraghav/simpleTools | 640b94fb4875173e7dbb8974296c46f09029cf99 | [
"MIT"
] | 1 | 2022-02-18T11:31:20.000Z | 2022-02-19T14:01:31.000Z | simpleLogFilter.py | brraghav/simpleTools | 640b94fb4875173e7dbb8974296c46f09029cf99 | [
"MIT"
] | 1 | 2022-02-20T16:22:25.000Z | 2022-02-20T16:22:25.000Z | # MIT License
# Copyright (c) 2022 Raghavendra Basvan
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mod... | 40.679715 | 162 | 0.530662 |
import subprocess
import os
import platform
import PySimpleGUI as sg
from pathlib import Path
sg.theme("DarkTeal7")
keywords = ''
filename = ''
output_file = 'Filtered_Output.txt'
SUCCESS = 0
FAILURE = -1
font = ("Roboto", 10)
small_font = ("Roboto", 8)
form = sg.FlexForm('G... | true | true |
f7607e4ad06bb727470c9b91f2f2dbcdfffb24b3 | 6,689 | py | Python | xmlrpc_loewie_sz/bk/stock_loewie-test.py | lester-lees/extra_addons_sz | cddaf972cf4ea64c553bcff0006eb006a115d5ee | [
"Apache-2.0"
] | null | null | null | xmlrpc_loewie_sz/bk/stock_loewie-test.py | lester-lees/extra_addons_sz | cddaf972cf4ea64c553bcff0006eb006a115d5ee | [
"Apache-2.0"
] | null | null | null | xmlrpc_loewie_sz/bk/stock_loewie-test.py | lester-lees/extra_addons_sz | cddaf972cf4ea64c553bcff0006eb006a115d5ee | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from openerp.osv import fields, osv
import datetime
import xmlrpclib
from openerp.tools.translate import _
class stock_picking(osv.osv):
_inherit = "stock.picking"
_columns = {
'remote_picking_id': fields.integer( string='Remote Pick ID', readonly=True),
'picking_no'... | 49.183824 | 205 | 0.56421 | from openerp.osv import fields, osv
import datetime
import xmlrpclib
from openerp.tools.translate import _
class stock_picking(osv.osv):
_inherit = "stock.picking"
_columns = {
'remote_picking_id': fields.integer( string='Remote Pick ID', readonly=True),
'picking_no':fields.char(string='Rem... | true | true |
f7607e7b57351153b847812c29efd21c784ab8c1 | 3,862 | py | Python | FileNamePurifier/LexicalAnalyzerTest.py | dbpiper/FileNamePurifier | 620088ea3be1b8874609fa769cfb8e6b636d5e8b | [
"MIT"
] | null | null | null | FileNamePurifier/LexicalAnalyzerTest.py | dbpiper/FileNamePurifier | 620088ea3be1b8874609fa769cfb8e6b636d5e8b | [
"MIT"
] | null | null | null | FileNamePurifier/LexicalAnalyzerTest.py | dbpiper/FileNamePurifier | 620088ea3be1b8874609fa769cfb8e6b636d5e8b | [
"MIT"
] | null | null | null | from LexicalAnalyzer import LexicalAnalyzer
import unittest
class Test(unittest.TestCase):
def setUp(self):
self.testLexer1 = LexicalAnalyzer("[otakuFanSubs] animeName [1280x720][218C38]", ["[", "(", "{"], ["]", ")", "}"], [" "], False)
self.testLexer2 = LexicalAnalyzer("[otakuFanSubs] animeName... | 55.971014 | 167 | 0.592698 | from LexicalAnalyzer import LexicalAnalyzer
import unittest
class Test(unittest.TestCase):
def setUp(self):
self.testLexer1 = LexicalAnalyzer("[otakuFanSubs] animeName [1280x720][218C38]", ["[", "(", "{"], ["]", ")", "}"], [" "], False)
self.testLexer2 = LexicalAnalyzer("[otakuFanSubs] animeName... | true | true |
f7607ee67b3c4d31349dc6a3a775900dc8f072b4 | 2,238 | py | Python | var/spack/repos/builtin/packages/r-summarizedexperiment/package.py | robertsawko/spack | 135cf4835f5b646c4aaa0e2eb5552c80fc3a5ce8 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-11-28T10:14:14.000Z | 2019-11-28T10:14:14.000Z | var/spack/repos/builtin/packages/r-summarizedexperiment/package.py | robertsawko/spack | 135cf4835f5b646c4aaa0e2eb5552c80fc3a5ce8 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/r-summarizedexperiment/package.py | robertsawko/spack | 135cf4835f5b646c4aaa0e2eb5552c80fc3a5ce8 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2017-01-21T17:19:32.000Z | 2017-01-21T17:19:32.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RSummarizedexperiment(RPackage):
"""SummarizedExperiment container.
The Summarized... | 48.652174 | 82 | 0.666667 |
from spack import *
class RSummarizedexperiment(RPackage):
homepage = "https://bioconductor.org/packages/SummarizedExperiment"
git = "https://git.bioconductor.org/packages/SummarizedExperiment.git"
version('1.14.1', commit='2c68d99e11c7345e5ed388370822ea48395c64a4')
version('1.12.0', commit='5... | true | true |
f7607f3d0778923bd55637a1ba3b0166f74b9f0f | 349 | py | Python | shoptools/contrib/regions/forms.py | gregplaysguitar/django-shoptools | 7af9b69409d146b3627931430714b934122a2498 | [
"BSD-3-Clause"
] | 3 | 2015-09-11T01:24:25.000Z | 2018-08-19T16:47:09.000Z | shoptools/contrib/regions/forms.py | gregplaysguitar/django-shoptools | 7af9b69409d146b3627931430714b934122a2498 | [
"BSD-3-Clause"
] | 29 | 2015-10-06T22:15:50.000Z | 2017-12-14T20:50:52.000Z | shoptools/contrib/regions/forms.py | gregplaysguitar/django-shoptools | 7af9b69409d146b3627931430714b934122a2498 | [
"BSD-3-Clause"
] | 5 | 2015-10-05T23:33:51.000Z | 2019-01-14T19:49:40.000Z | from django import forms
class RegionSelectionForm(forms.Form):
region_id = forms.ChoiceField(choices=(), label='Region')
def __init__(self, *args, **kwargs):
region_choices = kwargs.pop('region_choices')
super(RegionSelectionForm, self).__init__(*args, **kwargs)
self.fields['region_i... | 31.727273 | 66 | 0.702006 | from django import forms
class RegionSelectionForm(forms.Form):
region_id = forms.ChoiceField(choices=(), label='Region')
def __init__(self, *args, **kwargs):
region_choices = kwargs.pop('region_choices')
super(RegionSelectionForm, self).__init__(*args, **kwargs)
self.fields['region_i... | true | true |
f76081ad2b59221e5a2d39dcb412d685cf1f2d1f | 1,543 | py | Python | tests/cppmodel/test_extend_model.py | FFIG/ffig | b45060d5835292a74661678872427e3eb5a89d0c | [
"MIT"
] | 31 | 2017-02-03T20:12:11.000Z | 2021-04-14T17:39:56.000Z | tests/cppmodel/test_extend_model.py | FFIG/ffig | b45060d5835292a74661678872427e3eb5a89d0c | [
"MIT"
] | 246 | 2017-02-03T17:51:24.000Z | 2019-02-14T10:30:19.000Z | tests/cppmodel/test_extend_model.py | FFIG/ffig | b45060d5835292a74661678872427e3eb5a89d0c | [
"MIT"
] | 9 | 2017-03-05T20:28:37.000Z | 2019-08-28T19:48:22.000Z | from util import get_named_tu
import ffig.cppmodel
import nose
from nose.tools import assert_equals
def test_new_class_is_added():
tu_a = get_named_tu('class A{};', 'a.cpp')
tu_b = get_named_tu('class B{};', 'b.cpp')
model = ffig.cppmodel.Model(tu_a)
model.extend(tu_b)
classes = model.classes
... | 23.738462 | 56 | 0.672715 | from util import get_named_tu
import ffig.cppmodel
import nose
from nose.tools import assert_equals
def test_new_class_is_added():
tu_a = get_named_tu('class A{};', 'a.cpp')
tu_b = get_named_tu('class B{};', 'b.cpp')
model = ffig.cppmodel.Model(tu_a)
model.extend(tu_b)
classes = model.classes
... | true | true |
f76083af7a5efe1d3407fd5e21f28b4ce65ddb60 | 46,780 | py | Python | py3status/module.py | oaken-source/py3status | e8ea159c74f19ddaaa799fc19c3e517105706190 | [
"BSD-3-Clause"
] | null | null | null | py3status/module.py | oaken-source/py3status | e8ea159c74f19ddaaa799fc19c3e517105706190 | [
"BSD-3-Clause"
] | null | null | null | py3status/module.py | oaken-source/py3status | e8ea159c74f19ddaaa799fc19c3e517105706190 | [
"BSD-3-Clause"
] | null | null | null | import inspect
import time
from collections import OrderedDict
from importlib.machinery import SourceFileLoader
from pathlib import Path
from random import randint
from py3status.composite import Composite
from py3status.constants import MARKUP_LANGUAGES, ON_ERROR_VALUES, POSITIONS
from py3status.py3 import Py3, Modu... | 42.878093 | 88 | 0.522959 | import inspect
import time
from collections import OrderedDict
from importlib.machinery import SourceFileLoader
from pathlib import Path
from random import randint
from py3status.composite import Composite
from py3status.constants import MARKUP_LANGUAGES, ON_ERROR_VALUES, POSITIONS
from py3status.py3 import Py3, Modu... | true | true |
f76085d5e3cb69e0f731b455173d6d2625ab5ccf | 2,230 | py | Python | observer/__init__.py | rafaelszt/observer | d69f462f8608c36ee9b5308c497b98ddfb3e4bab | [
"Apache-2.0"
] | null | null | null | observer/__init__.py | rafaelszt/observer | d69f462f8608c36ee9b5308c497b98ddfb3e4bab | [
"Apache-2.0"
] | 1 | 2019-07-12T08:13:17.000Z | 2019-07-12T08:13:17.000Z | observer/__init__.py | rafaelszt/observer | d69f462f8608c36ee9b5308c497b98ddfb3e4bab | [
"Apache-2.0"
] | null | null | null | import os
import uuid
import signal
import sys
from time import sleep
from flask import Flask, render_template, request
from flask_mail import Mail
from flask_security import utils, login_required
from flask_admin import Admin
from observer.processing.main import system_init, SystemMng
# create and configure the ap... | 30.972222 | 148 | 0.773094 | import os
import uuid
import signal
import sys
from time import sleep
from flask import Flask, render_template, request
from flask_mail import Mail
from flask_security import utils, login_required
from flask_admin import Admin
from observer.processing.main import system_init, SystemMng
app = Flask(__name__, static_... | true | true |
f76085f9889dd751556cffa5e43acec670b21e37 | 29,657 | py | Python | pandas/core/indexes/category.py | Xia-Sam/pandas | 74748b9967d102e8c91ad2ef96733c0c1dc98821 | [
"BSD-3-Clause"
] | 1 | 2019-02-26T09:29:48.000Z | 2019-02-26T09:29:48.000Z | pandas/core/indexes/category.py | Xia-Sam/pandas | 74748b9967d102e8c91ad2ef96733c0c1dc98821 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/indexes/category.py | Xia-Sam/pandas | 74748b9967d102e8c91ad2ef96733c0c1dc98821 | [
"BSD-3-Clause"
] | null | null | null | import operator
import warnings
import numpy as np
from pandas._libs import index as libindex
import pandas.compat as compat
from pandas.compat.numpy import function as nv
from pandas.util._decorators import Appender, cache_readonly
from pandas.core.dtypes.common import (
ensure_platform_int, is_categorical_dtyp... | 34.727166 | 79 | 0.592777 | import operator
import warnings
import numpy as np
from pandas._libs import index as libindex
import pandas.compat as compat
from pandas.compat.numpy import function as nv
from pandas.util._decorators import Appender, cache_readonly
from pandas.core.dtypes.common import (
ensure_platform_int, is_categorical_dtyp... | true | true |
f76086c7bee640d6698ba5bf8f09517d2fb4e737 | 3,599 | py | Python | python_modules/dagster/dagster/core/types/python_tuple.py | JPeer264/dagster-fork | 32cc87a36134be7c442fa85d6867eb1d3301aea0 | [
"Apache-2.0"
] | 3 | 2020-09-09T04:10:23.000Z | 2021-11-08T02:10:42.000Z | python_modules/dagster/dagster/core/types/python_tuple.py | JPeer264/dagster-fork | 32cc87a36134be7c442fa85d6867eb1d3301aea0 | [
"Apache-2.0"
] | 2 | 2021-05-11T13:36:27.000Z | 2021-09-03T01:53:11.000Z | python_modules/dagster/dagster/core/types/python_tuple.py | JPeer264/dagster-fork | 32cc87a36134be7c442fa85d6867eb1d3301aea0 | [
"Apache-2.0"
] | null | null | null | from dagster import check
from dagster.config.config_type import Array, ConfigAnyInstance
from dagster.core.types.dagster_type import DagsterTypeKind
from .config_schema import InputHydrationConfig
from .dagster_type import DagsterType, PythonObjectDagsterType, resolve_dagster_type
PythonTuple = PythonObjectDagsterTy... | 33.635514 | 100 | 0.655182 | from dagster import check
from dagster.config.config_type import Array, ConfigAnyInstance
from dagster.core.types.dagster_type import DagsterTypeKind
from .config_schema import InputHydrationConfig
from .dagster_type import DagsterType, PythonObjectDagsterType, resolve_dagster_type
PythonTuple = PythonObjectDagsterTy... | true | true |
f7608801a51335e4fb82f33739c9404e95576457 | 830 | py | Python | scripts/deploy_model2.py | pection/packnet-sfm | d5673567b649e6bfda292c894cacdeb06aa80913 | [
"MIT"
] | 1 | 2022-02-22T06:19:02.000Z | 2022-02-22T06:19:02.000Z | scripts/deploy_model2.py | pection/packnet-sfm | d5673567b649e6bfda292c894cacdeb06aa80913 | [
"MIT"
] | null | null | null | scripts/deploy_model2.py | pection/packnet-sfm | d5673567b649e6bfda292c894cacdeb06aa80913 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.optim as optim
import argparse
import numpy as np
import torch
import os
import sys
sys.path.append(os.getcwd())
from packnet_sfm.models.SelfSupModel import SelfSupModel
model = SelfSupModel()
PATH = '/home/ai/work/data/experiments/default_config-train_kitti-2022.03.1... | 23.055556 | 156 | 0.762651 | import torch
import torch.nn as nn
import torch.optim as optim
import argparse
import numpy as np
import torch
import os
import sys
sys.path.append(os.getcwd())
from packnet_sfm.models.SelfSupModel import SelfSupModel
model = SelfSupModel()
PATH = '/home/ai/work/data/experiments/default_config-train_kitti-2022.03.1... | true | true |
f76088a9cf1d32ce3a3b2727db96ed87f3ebfdc1 | 912 | py | Python | setup.py | zachary822/oboparse | d2bf90780faa5020dbced477217474697c4ea114 | [
"MIT"
] | null | null | null | setup.py | zachary822/oboparse | d2bf90780faa5020dbced477217474697c4ea114 | [
"MIT"
] | null | null | null | setup.py | zachary822/oboparse | d2bf90780faa5020dbced477217474697c4ea114 | [
"MIT"
] | null | null | null | import os.path as path
from setuptools import setup
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='oboparse',
version='0.0.3',
description='OBO file parser',
long_description=long_description,
... | 25.333333 | 63 | 0.620614 | import os.path as path
from setuptools import setup
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='oboparse',
version='0.0.3',
description='OBO file parser',
long_description=long_description,
... | true | true |
f76089a56413054ad0f6798ff497a5c9f7352acc | 8,311 | py | Python | idunn/api/places_list.py | bbecquet/idunn | 16a6225809180b5a92eca9cb63705f156542d4d9 | [
"Apache-2.0"
] | null | null | null | idunn/api/places_list.py | bbecquet/idunn | 16a6225809180b5a92eca9cb63705f156542d4d9 | [
"Apache-2.0"
] | null | null | null | idunn/api/places_list.py | bbecquet/idunn | 16a6225809180b5a92eca9cb63705f156542d4d9 | [
"Apache-2.0"
] | null | null | null | import os
import logging
from fastapi import HTTPException, Query
from idunn import settings
from idunn.utils.es_wrapper import get_elasticsearch
from idunn.utils.settings import _load_yaml_file
from idunn.utils.index_names import INDICES
from idunn.places import POI
from idunn.api.utils import (
fetch_bbox_place... | 31.60076 | 143 | 0.622308 | import os
import logging
from fastapi import HTTPException, Query
from idunn import settings
from idunn.utils.es_wrapper import get_elasticsearch
from idunn.utils.settings import _load_yaml_file
from idunn.utils.index_names import INDICES
from idunn.places import POI
from idunn.api.utils import (
fetch_bbox_place... | true | true |
f76089dca78596b60d371746de8fa9e66f5ff4e4 | 315 | py | Python | test_parser.py | Sando1/english-pybar-bot | ff44cc839dcdcf8d5293ec0ab5a850bc57bc20c1 | [
"MIT"
] | 6 | 2019-10-17T21:38:19.000Z | 2019-10-18T10:29:21.000Z | test_parser.py | Sando1/english-pybar-bot | ff44cc839dcdcf8d5293ec0ab5a850bc57bc20c1 | [
"MIT"
] | 13 | 2019-10-17T21:53:22.000Z | 2020-10-31T05:08:19.000Z | test_parser.py | Sando1/english-pybar-bot | ff44cc839dcdcf8d5293ec0ab5a850bc57bc20c1 | [
"MIT"
] | 3 | 2019-10-17T22:09:36.000Z | 2021-02-05T17:00:26.000Z | import pytest
from questions_parser import parser_list
@pytest.mark.parametrize(
"questions, expected_questions",
[(["\n\n", " \na \n\n", " "], ["a"]), ([" a", "a ", "a"], ["a", "a", "a"])],
)
def test_parser_list(questions, expected_questions):
assert parser_list(questions) == expected_questions
| 26.25 | 82 | 0.634921 | import pytest
from questions_parser import parser_list
@pytest.mark.parametrize(
"questions, expected_questions",
[(["\n\n", " \na \n\n", " "], ["a"]), ([" a", "a ", "a"], ["a", "a", "a"])],
)
def test_parser_list(questions, expected_questions):
assert parser_list(questions) == expected_questions
| true | true |
f76089f839104a0e239df495fd6b7ab2ebf87164 | 22,186 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/aio/operations/_bastion_hosts_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/aio/operations/_bastion_hosts_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/aio/operations/_bastion_hosts_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.125813 | 193 | 0.663211 | from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pi... | true | true |
f7608a4e729164314d6237fec13dc4d06056eede | 3,313 | py | Python | utils/profdata_merge/process.py | duydevelopers/swift | 2374a0e4b0be804d9eda99de1b4bb66b78dd338c | [
"Apache-2.0"
] | 10 | 2015-12-25T02:19:46.000Z | 2021-11-14T15:37:57.000Z | utils/profdata_merge/process.py | sophiebits/swift | 7f0caa22235680db82e0ada1af3f9306259f6f15 | [
"Apache-2.0"
] | 2 | 2016-02-01T08:51:00.000Z | 2017-04-07T09:04:30.000Z | utils/profdata_merge/process.py | sophiebits/swift | 7f0caa22235680db82e0ada1af3f9306259f6f15 | [
"Apache-2.0"
] | 3 | 2016-04-02T15:05:27.000Z | 2019-08-19T15:25:02.000Z | # utils/profdata_merge/process.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.o... | 41.936709 | 79 | 0.629641 |
from multiprocessing import Process
import pipes
import os
import subprocess
import logging
class ProfdataMergerProcess(Process):
def __init__(self, config, file_queue):
super(ProfdataMergerProcess, self).__init__()
self.config = config
self.file_queue = file_queue
self.filename_... | true | true |
f7608accbd066ab084802813bc3d452c8b294b30 | 218 | py | Python | setup.py | fierytermite/tmc | fde0d09e5a9566042fdfa56585f04c073104ad1b | [
"Unlicense"
] | 17 | 2020-12-11T18:18:57.000Z | 2022-03-22T23:04:26.000Z | setup.py | fierytermite/tmc | fde0d09e5a9566042fdfa56585f04c073104ad1b | [
"Unlicense"
] | 16 | 2020-07-23T05:13:45.000Z | 2021-08-10T00:13:39.000Z | setup.py | fierytermite/tmc | fde0d09e5a9566042fdfa56585f04c073104ad1b | [
"Unlicense"
] | 2 | 2020-12-11T18:09:14.000Z | 2022-03-22T23:04:30.000Z | from setuptools import find_packages, setup
setup(
name='tmc',
version='1.0.0',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=[
'flask',
],
) | 18.166667 | 43 | 0.637615 | from setuptools import find_packages, setup
setup(
name='tmc',
version='1.0.0',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=[
'flask',
],
) | true | true |
f7608ca86a64d630034e720d97e67718695205f2 | 1,123 | py | Python | expected_results/users/valid_users_templates/john_doe.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 4 | 2019-08-12T19:36:58.000Z | 2021-09-14T18:48:27.000Z | expected_results/users/valid_users_templates/john_doe.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 1 | 2021-06-02T00:01:00.000Z | 2021-06-02T00:01:00.000Z | expected_results/users/valid_users_templates/john_doe.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 2 | 2019-08-12T10:06:00.000Z | 2020-12-25T05:52:40.000Z | # Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
class JohnDoe:
FIRST_NAME = 'John'
LAST_NAME = 'Doe'
ADDRESS = '9805 Cambridge Street'
CITY = 'NY'
STATE = 'Brooklyn'
ZIP_CODE = '11235'
PHONE = '718-437-9185'
USERNAME = 'johndoe'
PASSWOR... | 27.390244 | 92 | 0.715049 |
class JohnDoe:
FIRST_NAME = 'John'
LAST_NAME = 'Doe'
ADDRESS = '9805 Cambridge Street'
CITY = 'NY'
STATE = 'Brooklyn'
ZIP_CODE = '11235'
PHONE = '718-437-9185'
USERNAME = 'johndoe'
PASSWORD = USERNAME + ZIP_CODE
SSN = '050–13-8035'
INIT_BALANCE = 5125.00
MIN_BALANCE = 100.00
| true | true |
f7608d1d24b663bb0892b53e94bc7b744038ad54 | 3,309 | py | Python | sdk/textanalytics/azure-ai-textanalytics/samples/sample_model_version.py | AlonsoMondal/azure-sdk-for-python | a7d7397dda62b2da778b973c9d1be3a05c559d2a | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/textanalytics/azure-ai-textanalytics/samples/sample_model_version.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/textanalytics/azure-ai-textanalytics/samples/sample_model_version.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | 42.423077 | 131 | 0.685403 |
import os
def sample_model_version():
print("--------------Choosing model_version sample--------------")
from azure.core.credentials import AzureKeyCredential
from azure.ai.textanalytics import TextAnalyticsClient, RecognizeEntitiesAction
endpoint = os.environ["AZURE_TEXT_ANALYTICS_ENDPOINT"]
... | true | true |
f7608dd39cee42e1b8e98a58763538fb820c92fd | 675 | py | Python | tests/journal.ext/help_file.py | pyre/pyre | 0f903836f52450bf81216c5dfdfdfebb16090177 | [
"BSD-3-Clause"
] | 25 | 2018-04-23T01:45:39.000Z | 2021-12-10T06:01:23.000Z | tests/journal.ext/help_file.py | pyre/pyre | 0f903836f52450bf81216c5dfdfdfebb16090177 | [
"BSD-3-Clause"
] | 53 | 2018-05-31T04:55:00.000Z | 2021-10-07T21:41:32.000Z | tests/journal.ext/help_file.py | pyre/pyre | 0f903836f52450bf81216c5dfdfdfebb16090177 | [
"BSD-3-Clause"
] | 12 | 2018-04-23T22:50:40.000Z | 2022-02-20T17:27:23.000Z | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis <michael.aivazis@para-sim.com>
# (c) 1998-2021 all rights reserved
def test():
"""
Send help channel output to a log file
"""
# get the channel
from journal.ext.journal import Help as help
# send all output to a file
... | 17.763158 | 53 | 0.607407 |
def test():
from journal.ext.journal import Help as help
help.logfile("help_file.log")
channel = help(name="tests.journal.help")
channel.notes["time"] = "now"
channel.line("help channel:")
channel.log(" hello world!")
return
if __name__ == "__main__":
... | true | true |
f7608fd257c18116373d8e91e9a5f89b2dc22acb | 1,220 | py | Python | docs/fpoutput.py | functionistic/firepyer | 1e5a8636d2a0748bc9a654541b412548618b19fb | [
"Apache-2.0"
] | 10 | 2021-06-02T14:11:30.000Z | 2021-09-21T17:23:20.000Z | docs/fpoutput.py | functionistic/firepyer | 1e5a8636d2a0748bc9a654541b412548618b19fb | [
"Apache-2.0"
] | 1 | 2021-12-19T13:39:42.000Z | 2021-12-21T11:36:58.000Z | docs/fpoutput.py | functionistic/firepyer | 1e5a8636d2a0748bc9a654541b412548618b19fb | [
"Apache-2.0"
] | 1 | 2021-08-17T09:12:41.000Z | 2021-08-17T09:12:41.000Z | from docutils.parsers.rst import Directive
from docutils import nodes
from sphinx.util.nodes import set_source_info
import os
import re
def setup(app):
app.add_directive('fp_output', OutputDirective)
class OutputDirective(Directive):
required_arguments = 1
optional_arguments = 1
def run(self):
... | 29.756098 | 76 | 0.595902 | from docutils.parsers.rst import Directive
from docutils import nodes
from sphinx.util.nodes import set_source_info
import os
import re
def setup(app):
app.add_directive('fp_output', OutputDirective)
class OutputDirective(Directive):
required_arguments = 1
optional_arguments = 1
def run(self):
... | true | true |
f7608ff5c521066a1588f69c43a059de28d0acdc | 33,741 | py | Python | magenta/music/performance_lib.py | dubreuia/magenta | 2679a1a096001808957ad99a1859181f3926cfdf | [
"Apache-2.0"
] | 1 | 2019-11-29T15:18:32.000Z | 2019-11-29T15:18:32.000Z | magenta/music/performance_lib.py | hdanak/magenta | acd6dedc315ea159c6f15750dd09aabdadc47515 | [
"Apache-2.0"
] | null | null | null | magenta/music/performance_lib.py | hdanak/magenta | acd6dedc315ea159c6f15750dd09aabdadc47515 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Magenta Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.835153 | 80 | 0.689339 |
from __future__ import division
import abc
import collections
import math
from magenta.music import constants
from magenta.music import events_lib
from magenta.music import sequences_lib
from magenta.music.protobuf import music_pb2
import tensorflow as tf
MAX_MIDI_PITCH = constants.MAX_MIDI_PITCH
MIN_MIDI_PITCH = ... | true | true |
f7609045ffe9a07a97c3bf78d39f342b934ddf3d | 1,458 | py | Python | darglint/strictness.py | thejcannon/darglint | 0b7f3be6e83f2b9e5b5676b071a3a16307b11004 | [
"MIT"
] | 405 | 2017-10-19T11:04:21.000Z | 2022-03-23T07:58:40.000Z | darglint/strictness.py | thejcannon/darglint | 0b7f3be6e83f2b9e5b5676b071a3a16307b11004 | [
"MIT"
] | 186 | 2018-03-26T20:33:37.000Z | 2022-03-20T22:47:54.000Z | darglint/strictness.py | thejcannon/darglint | 0b7f3be6e83f2b9e5b5676b071a3a16307b11004 | [
"MIT"
] | 43 | 2018-10-14T23:49:48.000Z | 2022-02-10T12:39:16.000Z | from enum import Enum
class Strictness(Enum):
"""The minimum strictness with which to apply checks.
Strictness does not describe whether or not a check
should be applied. Rather, if a check is done, strictness
describes how intense/strict/deep the check should be.
Each level here describes what ... | 31.695652 | 73 | 0.675583 | from enum import Enum
class Strictness(Enum):
SHORT_DESCRIPTION = 1
LONG_DESCRIPTION = 2
FULL_DESCRIPTION = 3
@classmethod
def from_string(cls, strictness):
strictness = strictness.lower().strip()
if strictness in {'short_description', 'short'}:
retu... | true | true |
f760925585a7a40d12f81d89a1c89a1ca2ddbc95 | 1,002 | py | Python | website/website/wsgi.py | SimonGreenhill/Language5 | c59f502dda7be27fc338f0338cc3b03e63bad9c8 | [
"MIT"
] | 2 | 2016-01-18T09:12:14.000Z | 2017-04-28T12:05:03.000Z | website/website/wsgi.py | SimonGreenhill/Language5 | c59f502dda7be27fc338f0338cc3b03e63bad9c8 | [
"MIT"
] | 5 | 2020-06-05T17:51:56.000Z | 2022-01-13T00:42:51.000Z | website/wsgi.py | shh-dlce/pulotu | 82acbb8a3b7f3ec3acc76baffd4047265a77f7d3 | [
"Apache-2.0"
] | 1 | 2015-02-23T22:54:00.000Z | 2015-02-23T22:54:00.000Z | """
WSGI config for website project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` ... | 40.08 | 79 | 0.804391 | import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "website.settings")
# setting points here.
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
| true | true |
f76092ac5ccbc31138a78b9210db6aa0f5d21889 | 14,450 | py | Python | lib/googlecloudsdk/third_party/apis/apigee/v1/resources.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/googlecloudsdk/third_party/apis/apigee/v1/resources.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/third_party/apis/apigee/v1/resources.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2015 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... | 26.130199 | 78 | 0.555502 |
import enum
BASE_URL = 'https://apigee.googleapis.com/v1/'
DOCS_URL = 'https://cloud.google.com/apigee-api-management/'
class Collections(enum.Enum):
ORGANIZATIONS = (
'organizations',
'{+name}',
{
'':
'organizations/{organizationsId}',
},
['name'],
Tr... | true | true |
f760937663960610b9013b332efa36994ad97d1a | 24,014 | py | Python | py/base/Sequence.py | Imperas/force-riscv | c15bc18e4d70e6c2f50bad1e9176e13575de6081 | [
"Apache-2.0"
] | null | null | null | py/base/Sequence.py | Imperas/force-riscv | c15bc18e4d70e6c2f50bad1e9176e13575de6081 | [
"Apache-2.0"
] | null | null | null | py/base/Sequence.py | Imperas/force-riscv | c15bc18e4d70e6c2f50bad1e9176e13575de6081 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) [2020] Futurewei Technologies, Inc.
#
# FORCE-RISCV is 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
#
# THIS SOFTWARE IS PRO... | 38.4224 | 135 | 0.658324 | from base.Macro import Macro
import base.UtilityFunctions as UtilityFunctions
from Config import Config
from Enums import EGlobalStateType, ELimitType
import Log
import RandomUtils
import traceback
import warnings
class Sequence(object):
def __init__(self, gen_thread, name=None):
self.genThread = gen_thre... | true | true |
f760939d2520e3f6d2c4c08a61a1c8008ec6430b | 909 | py | Python | test/test_utils_to_string.py | theteladras/py.validator | 624ace7973552c8ac9353f48acbf96ec0ecc24a9 | [
"MIT"
] | 15 | 2021-11-01T14:14:56.000Z | 2022-03-17T11:52:29.000Z | test/test_utils_to_string.py | theteladras/py.validator | 624ace7973552c8ac9353f48acbf96ec0ecc24a9 | [
"MIT"
] | 1 | 2022-03-16T13:39:16.000Z | 2022-03-17T09:16:00.000Z | test/test_utils_to_string.py | theteladras/py.validator | 624ace7973552c8ac9353f48acbf96ec0ecc24a9 | [
"MIT"
] | null | null | null | import unittest
import inspect
from pyvalidator.utils.to_string import to_string, obj_str
from . import print_test_ok
class TestIsUuid(unittest.TestCase):
def test_input_str(self):
self.assertEqual(to_string("x"), "x")
print_test_ok()
def test_input_int(self):
self.assertEqual(to_st... | 24.567568 | 58 | 0.662266 | import unittest
import inspect
from pyvalidator.utils.to_string import to_string, obj_str
from . import print_test_ok
class TestIsUuid(unittest.TestCase):
def test_input_str(self):
self.assertEqual(to_string("x"), "x")
print_test_ok()
def test_input_int(self):
self.assertEqual(to_st... | true | true |
f76093f75391c85e5fab7479178b77db543df1b0 | 4,724 | py | Python | neutron/objects/securitygroup.py | acdc-cloud/neutron | 2510836886555179f9e9e39b1fdbf94296befc51 | [
"Apache-2.0"
] | null | null | null | neutron/objects/securitygroup.py | acdc-cloud/neutron | 2510836886555179f9e9e39b1fdbf94296befc51 | [
"Apache-2.0"
] | null | null | null | neutron/objects/securitygroup.py | acdc-cloud/neutron | 2510836886555179f9e9e39b1fdbf94296befc51 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 36.338462 | 78 | 0.683108 |
from oslo_versionedobjects import fields as obj_fields
from neutron.common import utils
from neutron.db.models import securitygroup as sg_models
from neutron.objects import base
from neutron.objects import common_types
@base.NeutronObjectRegistry.register
class SecurityGroup(base.NeutronDbObject):
VERSION =... | true | true |
f760950467c411a5226f09f0f60c042a1cb6cd93 | 421 | py | Python | ASAConfigUsingREST/testASA.py | g-ser/pythonNetworking | 56081fbcfc8a45eb0645cd4cd19322acd2f42acd | [
"MIT"
] | null | null | null | ASAConfigUsingREST/testASA.py | g-ser/pythonNetworking | 56081fbcfc8a45eb0645cd4cd19322acd2f42acd | [
"MIT"
] | null | null | null | ASAConfigUsingREST/testASA.py | g-ser/pythonNetworking | 56081fbcfc8a45eb0645cd4cd19322acd2f42acd | [
"MIT"
] | null | null | null | #! /usr/bin/env python
from asa import (ASA,asa_login)
# Entry point for program
if __name__ == "__main__":
# Initialize Cisco ASA Object
asa = ASA(
address=asa_login['host'],
username=asa_login['username'],
password=asa_login['password']
)
print(asa.getAllPhysicalIfaces())
... | 17.541667 | 47 | 0.650831 |
from asa import (ASA,asa_login)
if __name__ == "__main__":
asa = ASA(
address=asa_login['host'],
username=asa_login['username'],
password=asa_login['password']
)
print(asa.getAllPhysicalIfaces())
asa.setDescMgmtIface("Very Ugly Interface")
asa.createLocalUsr("Georg... | true | true |
f760961ab822991b055e53e1f22ad135c047cbd7 | 19,350 | py | Python | weasyprint/__init__.py | gigaservices/WeasyPrint | 684170699becfd89c990f43f9591b91fd73724fd | [
"BSD-3-Clause"
] | null | null | null | weasyprint/__init__.py | gigaservices/WeasyPrint | 684170699becfd89c990f43f9591b91fd73724fd | [
"BSD-3-Clause"
] | null | null | null | weasyprint/__init__.py | gigaservices/WeasyPrint | 684170699becfd89c990f43f9591b91fd73724fd | [
"BSD-3-Clause"
] | null | null | null | """
WeasyPrint
==========
WeasyPrint converts web documents to PDF.
The public API is what is accessible from this "root" packages
without importing sub-modules.
:copyright: Copyright 2011-2019 Simon Sapin and contributors, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import... | 42.065217 | 79 | 0.632145 |
import contextlib
import os
import sys
from pathlib import Path
import cssselect2
import html5lib
import tinycss2
if sys.version_info.major < 3: raise RuntimeError(
'WeasyPrint does not support Python 2.x anymore. '
'Please use Python 3 or install an older version of WeasyPrint.')
if hasattr(sy... | true | true |
f7609666d489423b2e245c847282cdf102a0d63c | 715 | py | Python | Stack/4949.py | kjh9267/BOJ_Python | b4d2ae09c252cc9280df93ccecbd07880947827e | [
"Apache-2.0"
] | null | null | null | Stack/4949.py | kjh9267/BOJ_Python | b4d2ae09c252cc9280df93ccecbd07880947827e | [
"Apache-2.0"
] | null | null | null | Stack/4949.py | kjh9267/BOJ_Python | b4d2ae09c252cc9280df93ccecbd07880947827e | [
"Apache-2.0"
] | null | null | null | # https://www.acmicpc.net/problem/4949
if __name__ == '__main__':
input = __import__('sys').stdin.readline
bracket = {'(', ')', '[', ']'}
while True:
line = input().rstrip()
if line == '.':
break
stack = list()
for char in line:
if char not in brac... | 24.655172 | 70 | 0.415385 |
if __name__ == '__main__':
input = __import__('sys').stdin.readline
bracket = {'(', ')', '[', ']'}
while True:
line = input().rstrip()
if line == '.':
break
stack = list()
for char in line:
if char not in bracket:
continue
... | true | true |
f7609679e248a24fc2c5fe59904b88baf9292769 | 57,527 | py | Python | gae_proxy/server/lib/google/appengine/datastore/datastore_pbs.py | vanish87/XX-Net | fb7eb546d860277c485c3d47772f04fa9845886a | [
"BSD-2-Clause"
] | 1,463 | 2015-04-07T09:41:28.000Z | 2022-03-30T02:05:19.000Z | server/lib/google/appengine/datastore/datastore_pbs.py | Palsoso/GoAgent-Always-Available | 86c2fee6474890ff26b5a66b74a1306f7f31988b | [
"WTFPL",
"Apache-2.0"
] | 73 | 2015-04-08T05:08:52.000Z | 2019-06-05T06:38:21.000Z | server/lib/google/appengine/datastore/datastore_pbs.py | Palsoso/GoAgent-Always-Available | 86c2fee6474890ff26b5a66b74a1306f7f31988b | [
"WTFPL",
"Apache-2.0"
] | 698 | 2015-04-28T12:02:00.000Z | 2022-03-19T23:53:55.000Z | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | 33.563011 | 80 | 0.702227 |
from google.appengine.datastore import entity_pb
from google.appengine.datastore import datastore_v4_pb
from google.appengine.datastore import entity_v4_pb
_MIN_CLOUD_DATASTORE_VERSION = (4, 0, 0, 'b1')
_CLOUD_DATASTORE_ENABLED = False
try:
import googledatastore
if googledatastore.VER... | true | true |
f76096df6543ce18ca79a4bac454096d24b45e8c | 566 | py | Python | comments/migrations/0006_auto_20170606_0745.py | salazarpardo/redinnovacion | 3f7c13af0af1887112a0492aea7782871fba0129 | [
"CC-BY-3.0"
] | null | null | null | comments/migrations/0006_auto_20170606_0745.py | salazarpardo/redinnovacion | 3f7c13af0af1887112a0492aea7782871fba0129 | [
"CC-BY-3.0"
] | null | null | null | comments/migrations/0006_auto_20170606_0745.py | salazarpardo/redinnovacion | 3f7c13af0af1887112a0492aea7782871fba0129 | [
"CC-BY-3.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('comments', '0005_auto_20170605_1035'),
]
operations = [
migrations.RemoveField(
model_name='commentimage',
... | 23.583333 | 104 | 0.600707 | from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('comments', '0005_auto_20170605_1035'),
]
operations = [
migrations.RemoveField(
model_name='commentimage',
name='comment',
... | true | true |
f76098652541d3674058d712c6f103a4685e30ad | 10,987 | py | Python | keystone/models/revoke_model.py | Afkupuz/4jaewoo | fc69258feac7858f5af99d2feab39c86ceb70203 | [
"Apache-2.0"
] | null | null | null | keystone/models/revoke_model.py | Afkupuz/4jaewoo | fc69258feac7858f5af99d2feab39c86ceb70203 | [
"Apache-2.0"
] | null | null | null | keystone/models/revoke_model.py | Afkupuz/4jaewoo | fc69258feac7858f5af99d2feab39c86ceb70203 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 36.623333 | 79 | 0.64904 |
from oslo_log import log
from oslo_serialization import msgpackutils
from oslo_utils import timeutils
from keystone.common import cache
from keystone.common import utils
LOG = log.getLogger(__name__)
_NAMES = ['trust_id',
'consumer_id',
'access_token_id',
'audit_id',
'audit_... | true | true |
f76099b6f1048a79ba212c466173ac8e8f7d4403 | 8,066 | py | Python | scripts/devSetup/factories.py | ThatOtherPerson/codecombat | 991a374da2de6747ae7fa7339f2d0f29baefb24b | [
"MIT"
] | null | null | null | scripts/devSetup/factories.py | ThatOtherPerson/codecombat | 991a374da2de6747ae7fa7339f2d0f29baefb24b | [
"MIT"
] | null | null | null | scripts/devSetup/factories.py | ThatOtherPerson/codecombat | 991a374da2de6747ae7fa7339f2d0f29baefb24b | [
"MIT"
] | 1 | 2021-09-30T08:18:33.000Z | 2021-09-30T08:18:33.000Z | __author__ = u'schmatz'
import errors
import configuration
import mongo
import node
import repositoryInstaller
import ruby
import shutil
import os
import glob
import subprocess
def print_computer_information(os_name,address_width):
print(os_name + " detected, architecture: " + str(address_width) + " bit")
def constr... | 46.895349 | 132 | 0.539053 | __author__ = u'schmatz'
import errors
import configuration
import mongo
import node
import repositoryInstaller
import ruby
import shutil
import os
import glob
import subprocess
def print_computer_information(os_name,address_width):
print(os_name + " detected, architecture: " + str(address_width) + " bit")
def constr... | true | true |
f7609a1f2708f114ee821d35d92835f685df77c4 | 10,865 | py | Python | models/modules/cptconv.py | leliyliu/Fixed-Point-Training | 0f31512abbbab9216bd852c27be5c3774663d62e | [
"Apache-2.0"
] | 1 | 2021-09-27T06:25:08.000Z | 2021-09-27T06:25:08.000Z | models/modules/cptconv.py | leliyliu/Fixed-Point-Training | 0f31512abbbab9216bd852c27be5c3774663d62e | [
"Apache-2.0"
] | null | null | null | models/modules/cptconv.py | leliyliu/Fixed-Point-Training | 0f31512abbbab9216bd852c27be5c3774663d62e | [
"Apache-2.0"
] | null | null | null | from collections import namedtuple
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd.function import InplaceFunction, Function
__all__ = ['CPTConv2d']
QParams = namedtuple('QParams', ['range', 'zero_point', 'num_bits']) # 由三个部分组成的表示
_DEFAULT_FLATTEN = (1, -1)
_DEFAULT... | 41.311787 | 120 | 0.619604 | from collections import namedtuple
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd.function import InplaceFunction, Function
__all__ = ['CPTConv2d']
QParams = namedtuple('QParams', ['range', 'zero_point', 'num_bits'])
_DEFAULT_FLATTEN = (1, -1)
_DEFAULT_FLATTEN_GRAD... | true | true |
f7609b234c36af1d54de377f8e1c9c3e239d8e7b | 19,649 | py | Python | Value_Based/Rainbow/agent.py | kyunghoon-jung/MacaronRL | b95be35fc95be7eb5aede2315a714984b282587a | [
"MIT"
] | 20 | 2020-10-05T07:07:46.000Z | 2021-05-23T02:18:43.000Z | Value_Based/Rainbow/agent.py | kyunghoon-jung/RL_implementation | b95be35fc95be7eb5aede2315a714984b282587a | [
"MIT"
] | null | null | null | Value_Based/Rainbow/agent.py | kyunghoon-jung/RL_implementation | b95be35fc95be7eb5aede2315a714984b282587a | [
"MIT"
] | null | null | null | import gym
import numpy as np
import time
import os
import cv2
import matplotlib.pyplot as plt
from collections import deque
from IPython.display import clear_output
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.nn.utils import clip_grad_norm_
from qnetwor... | 50.904145 | 176 | 0.616265 | import gym
import numpy as np
import time
import os
import cv2
import matplotlib.pyplot as plt
from collections import deque
from IPython.display import clear_output
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.nn.utils import clip_grad_norm_
from qnetwor... | true | true |
f7609bd40e68701b7c520bfd8abd82106e560118 | 1,144 | py | Python | likebee/dashboards.py | klebercode/likebee | 0a0dd6368ef43b53fb8315eb5eb14663067ef07c | [
"MIT"
] | 1 | 2019-11-05T15:00:51.000Z | 2019-11-05T15:00:51.000Z | likebee/dashboards.py | klebercode/likebee | 0a0dd6368ef43b53fb8315eb5eb14663067ef07c | [
"MIT"
] | null | null | null | likebee/dashboards.py | klebercode/likebee | 0a0dd6368ef43b53fb8315eb5eb14663067ef07c | [
"MIT"
] | null | null | null | """
Dashboard para o admin com controlcenter.
Nesse arquivo estao todos os widgets e funcoes para
os graficos e listas.
"""
from controlcenter import Dashboard, widgets
from likebee.core.models import Task
class EmptyDashboard(Dashboard):
"""Funcao em branco."""
pass
class MyWidget0(widgets.Widget):
... | 19.724138 | 51 | 0.66521 |
from controlcenter import Dashboard, widgets
from likebee.core.models import Task
class EmptyDashboard(Dashboard):
pass
class MyWidget0(widgets.Widget):
template_name = 'chart.html'
class MyWidget1(widgets.Widget):
template_name = 'chart.html'
class ModelItemList(widgets.ItemList):
model = ... | true | true |
f7609c261f6a7fd6501b4ace4ee52175d7f35777 | 1,630 | py | Python | app/migrations/0004_auto_20210806_1216.py | lstipakov/toimitsijat | c49df722b9663aa052c63a1d2e8a7bdc511b592a | [
"BSD-3-Clause"
] | null | null | null | app/migrations/0004_auto_20210806_1216.py | lstipakov/toimitsijat | c49df722b9663aa052c63a1d2e8a7bdc511b592a | [
"BSD-3-Clause"
] | null | null | null | app/migrations/0004_auto_20210806_1216.py | lstipakov/toimitsijat | c49df722b9663aa052c63a1d2e8a7bdc511b592a | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2.12 on 2021-08-06 12:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0003_match_players'),
]
operations = [
migrations.AlterModelOptions(
name='arena',
options={'verbose_name': ... | 33.958333 | 215 | 0.564417 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0003_match_players'),
]
operations = [
migrations.AlterModelOptions(
name='arena',
options={'verbose_name': 'Pelikenttä', 'verbose_name_plural': 'Pelikentät'... | true | true |
f7609c9f7faf19666d08a07e1f1ed6f1f7497d30 | 5,748 | py | Python | tests/program/test_describe.py | Grandient/frictionless-py | 8c41b96f2047d573702fe7b34ff7ffbd32c3d815 | [
"MIT"
] | 247 | 2020-08-04T16:42:09.000Z | 2022-03-30T11:54:54.000Z | tests/program/test_describe.py | Grandient/frictionless-py | 8c41b96f2047d573702fe7b34ff7ffbd32c3d815 | [
"MIT"
] | 444 | 2020-07-29T09:13:59.000Z | 2022-03-31T14:54:57.000Z | tests/program/test_describe.py | Grandient/frictionless-py | 8c41b96f2047d573702fe7b34ff7ffbd32c3d815 | [
"MIT"
] | 60 | 2020-09-04T11:39:34.000Z | 2022-03-23T18:59:51.000Z | import json
import yaml
from typer.testing import CliRunner
from frictionless import program, describe, Detector, helpers
runner = CliRunner()
IS_UNIX = not helpers.is_platform("windows")
# General
def test_program_describe():
result = runner.invoke(program, "describe data/table.csv --stats")
assert resul... | 33.811765 | 89 | 0.689457 | import json
import yaml
from typer.testing import CliRunner
from frictionless import program, describe, Detector, helpers
runner = CliRunner()
IS_UNIX = not helpers.is_platform("windows")
def test_program_describe():
result = runner.invoke(program, "describe data/table.csv --stats")
assert result.exit_cod... | true | true |
f7609d46c6a1fe34854beaed690df6491e5b9bc3 | 162 | py | Python | tests/model_control/detailed/transf_None/model_control_one_enabled_None_MovingAverage_Seasonal_Minute_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/model_control/detailed/transf_None/model_control_one_enabled_None_MovingAverage_Seasonal_Minute_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/model_control/detailed/transf_None/model_control_one_enabled_None_MovingAverage_Seasonal_Minute_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['None'] , ['MovingAverage'] , ['Seasonal_Minute'] , ['MLP'] ); | 40.5 | 84 | 0.753086 | import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['None'] , ['MovingAverage'] , ['Seasonal_Minute'] , ['MLP'] ); | true | true |
f7609dc9726bd55875c79f80924ca4bea4db6946 | 183 | py | Python | Advance_Python/Class_&_Objects/default_constructor.py | siddharth-143/Python | 293f4643a3a13e3b82d23fd8922db54dbb0f12bc | [
"MIT"
] | null | null | null | Advance_Python/Class_&_Objects/default_constructor.py | siddharth-143/Python | 293f4643a3a13e3b82d23fd8922db54dbb0f12bc | [
"MIT"
] | null | null | null | Advance_Python/Class_&_Objects/default_constructor.py | siddharth-143/Python | 293f4643a3a13e3b82d23fd8922db54dbb0f12bc | [
"MIT"
] | null | null | null | class addition:
def __init__(self):
self.a=10
self.b=20
def add(self):
self.c=self.a+self.b
print('addition ;',self.c)
a1=addition()
a1.add()
| 16.636364 | 34 | 0.546448 | class addition:
def __init__(self):
self.a=10
self.b=20
def add(self):
self.c=self.a+self.b
print('addition ;',self.c)
a1=addition()
a1.add()
| true | true |
f7609e34b4f7f3d1244248d4ae02fc48ad015ead | 638 | py | Python | __init__.py | cxyboy/flask-shop | d7a93254298a6a9d0cefb5277deabb3a68ec04f8 | [
"Apache-2.0"
] | 2 | 2020-05-08T13:41:34.000Z | 2021-06-29T13:02:00.000Z | __init__.py | cxyboy/flask-shop | d7a93254298a6a9d0cefb5277deabb3a68ec04f8 | [
"Apache-2.0"
] | 5 | 2021-03-19T10:37:38.000Z | 2022-03-12T00:13:48.000Z | __init__.py | cxyboy/flask-shop | d7a93254298a6a9d0cefb5277deabb3a68ec04f8 | [
"Apache-2.0"
] | 2 | 2020-08-14T16:16:58.000Z | 2021-03-21T23:58:33.000Z | # _*_ Coding:utf-8 _*_
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_mail import Mail, Message
from config import config
db = SQLAlchemy()
mail = Mail()
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(config[config_name])
config[conf... | 21.266667 | 64 | 0.708464 |
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_mail import Mail, Message
from config import config
db = SQLAlchemy()
mail = Mail()
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(config[config_name])
config[config_name].init_app(app)
... | true | true |
f7609f887d777a803759b57f0d39f9f81ca80bdd | 4,109 | py | Python | server.py | phinguyenbstarsolutions/voice-quickstart-server-python | 9660fdf5ea42c9e45aff1a2916a5a7f697d2b62d | [
"MIT"
] | null | null | null | server.py | phinguyenbstarsolutions/voice-quickstart-server-python | 9660fdf5ea42c9e45aff1a2916a5a7f697d2b62d | [
"MIT"
] | null | null | null | server.py | phinguyenbstarsolutions/voice-quickstart-server-python | 9660fdf5ea42c9e45aff1a2916a5a7f697d2b62d | [
"MIT"
] | null | null | null | import os
from flask import Flask, request
from twilio.jwt.access_token import AccessToken
from twilio.jwt.access_token.grants import VoiceGrant
from twilio.rest import Client
from twilio.twiml.voice_response import VoiceResponse
ACCOUNT_SID = 'AC***'
API_KEY = 'SK***'
API_KEY_SECRET = '***'
PUSH_CREDENTIAL_SID = 'CR*... | 31.366412 | 109 | 0.705768 | import os
from flask import Flask, request
from twilio.jwt.access_token import AccessToken
from twilio.jwt.access_token.grants import VoiceGrant
from twilio.rest import Client
from twilio.twiml.voice_response import VoiceResponse
ACCOUNT_SID = 'AC***'
API_KEY = 'SK***'
API_KEY_SECRET = '***'
PUSH_CREDENTIAL_SID = 'CR*... | true | true |
f7609fb2a812b3b2986fc425f981ceb753b251e9 | 1,373 | py | Python | src/appliance-onboarding-script/appliance_setup/avs/avsarconboarder/exception.py | Azure/ArcOnAVS | 9ecd26ceb2f49953db1beda07beba55c15e773ce | [
"MIT"
] | null | null | null | src/appliance-onboarding-script/appliance_setup/avs/avsarconboarder/exception.py | Azure/ArcOnAVS | 9ecd26ceb2f49953db1beda07beba55c15e773ce | [
"MIT"
] | null | null | null | src/appliance-onboarding-script/appliance_setup/avs/avsarconboarder/exception.py | Azure/ArcOnAVS | 9ecd26ceb2f49953db1beda07beba55c15e773ce | [
"MIT"
] | null | null | null | class UnknownPathException(Exception):
pass
class ValidationFailedException(Exception):
pass
class InvalidDataException(Exception):
pass
class ValidationFailedException(Exception):
pass
class UnexpectedRetrievalException(Exception):
pass
class VCSADetailsNotFoundException(Exception):
p... | 14.010204 | 56 | 0.783685 | class UnknownPathException(Exception):
pass
class ValidationFailedException(Exception):
pass
class InvalidDataException(Exception):
pass
class ValidationFailedException(Exception):
pass
class UnexpectedRetrievalException(Exception):
pass
class VCSADetailsNotFoundException(Exception):
p... | true | true |
f760a00ea48b845773bfab8c424fef5fd6003cf6 | 1,445 | py | Python | src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/tests/latest/test_shell_progress.py | cmcclister/azure-cli | f30fa76380072da9754c222463ef20d28df5a8be | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/tests/latest/test_shell_progress.py | cmcclister/azure-cli | f30fa76380072da9754c222463ef20d28df5a8be | [
"MIT"
] | 3 | 2021-03-26T00:25:36.000Z | 2022-03-29T22:03:55.000Z | src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/tests/latest/test_shell_progress.py | cmcclister/azure-cli | f30fa76380072da9754c222463ef20d28df5a8be | [
"MIT"
] | 1 | 2020-07-13T22:28:09.000Z | 2020-07-13T22:28:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 38.026316 | 94 | 0.62699 |
import unittest
import os
from azure.cli.core.commands.progress import ProgressReporter, ProgressHook
import azure.cli.command_modules.interactive.azclishell.progress as prog
class ShellProgressViewTest(unittest.TestCase):
def init(self):
self.model = ProgressReporter()
self.view = prog.ShellPr... | true | true |
f760a051ba665133b016cfe71b813e1b12e5afb9 | 560 | py | Python | plugin/test_plugin/__main__.py | Joule4247532/CS-Army-World-Destroying-Discord-Bot | 277561ccc4290aece0495c0b6ee74fab681f4ccc | [
"Apache-2.0"
] | null | null | null | plugin/test_plugin/__main__.py | Joule4247532/CS-Army-World-Destroying-Discord-Bot | 277561ccc4290aece0495c0b6ee74fab681f4ccc | [
"Apache-2.0"
] | null | null | null | plugin/test_plugin/__main__.py | Joule4247532/CS-Army-World-Destroying-Discord-Bot | 277561ccc4290aece0495c0b6ee74fab681f4ccc | [
"Apache-2.0"
] | null | null | null | import os, sys
import typing
import discord
class TestPlugin:
async def ping_func(message, discord_client: object) -> str:
await discord_client.send_message(message.channel, "WE WUZ KINGS N SHIET")
async def echo_func( message, discord_client: object) -> str:
await discord_client.send_message(... | 37.333333 | 95 | 0.719643 | import os, sys
import typing
import discord
class TestPlugin:
async def ping_func(message, discord_client: object) -> str:
await discord_client.send_message(message.channel, "WE WUZ KINGS N SHIET")
async def echo_func( message, discord_client: object) -> str:
await discord_client.send_message(... | true | true |
f760a14dfe85a511a1fea2ad855f2365c164c38a | 2,421 | py | Python | tests/util/misc.py | Pipscoin-Network/pipscoin-blockchain | f400d26956881eb319786230506bb441f76f64d9 | [
"Apache-2.0"
] | 8 | 2021-08-29T15:13:45.000Z | 2022-03-30T17:23:04.000Z | tests/util/misc.py | Pipscoin-Network/pipscoin-blockchain | f400d26956881eb319786230506bb441f76f64d9 | [
"Apache-2.0"
] | 28 | 2021-08-29T02:08:07.000Z | 2022-03-24T23:32:00.000Z | tests/util/misc.py | Pipscoin-Network/pipscoin-blockchain | f400d26956881eb319786230506bb441f76f64d9 | [
"Apache-2.0"
] | 4 | 2021-08-29T12:59:05.000Z | 2022-03-15T08:38:29.000Z | import pytest
from pipscoin.util.misc import format_bytes
from pipscoin.util.misc import format_minutes
class TestMisc:
@pytest.mark.asyncio
async def test_format_bytes(self):
assert format_bytes(None) == "Invalid"
assert format_bytes(dict()) == "Invalid"
assert format_bytes("some byte... | 45.679245 | 64 | 0.622883 | import pytest
from pipscoin.util.misc import format_bytes
from pipscoin.util.misc import format_minutes
class TestMisc:
@pytest.mark.asyncio
async def test_format_bytes(self):
assert format_bytes(None) == "Invalid"
assert format_bytes(dict()) == "Invalid"
assert format_bytes("some byte... | true | true |
f760a17a4af7017af58610c33b8c819e32e94b7a | 34,585 | py | Python | algofi_amm/v0/pool.py | Algofiorg/algofi-amm-py-sdk | 08c8fed833805749c4a641d06f10ac080291ceb5 | [
"MIT"
] | 14 | 2022-02-02T19:56:52.000Z | 2022-03-28T20:42:20.000Z | algofi_amm/v0/pool.py | Algofiorg/algofi-amm-py-sdk | 08c8fed833805749c4a641d06f10ac080291ceb5 | [
"MIT"
] | 5 | 2022-02-24T22:01:33.000Z | 2022-03-28T15:50:51.000Z | algofi_amm/v0/pool.py | Algofiorg/algofi-amm-py-sdk | 08c8fed833805749c4a641d06f10ac080291ceb5 | [
"MIT"
] | 13 | 2022-02-02T23:26:37.000Z | 2022-03-27T07:20:00.000Z |
import time
import math
from algosdk.logic import get_application_address
from algosdk.future.transaction import LogicSigAccount, LogicSigTransaction, OnComplete, StateSchema, ApplicationCreateTxn, \
ApplicationOptInTxn, ApplicationNoOpTxn, OnComplete
from .config import PoolStatus, Network, get_validator_index, g... | 48.438375 | 167 | 0.665433 |
import time
import math
from algosdk.logic import get_application_address
from algosdk.future.transaction import LogicSigAccount, LogicSigTransaction, OnComplete, StateSchema, ApplicationCreateTxn, \
ApplicationOptInTxn, ApplicationNoOpTxn, OnComplete
from .config import PoolStatus, Network, get_validator_index, g... | true | true |
f760a1a5e53860565c63acf3001a1319503c6ee4 | 2,911 | py | Python | Regras.py | kevenLeandro/simula-oBancoImobiliario | d79fd91b94eb6f05c9088223f8ba4e4dc1c58b90 | [
"Apache-2.0"
] | null | null | null | Regras.py | kevenLeandro/simula-oBancoImobiliario | d79fd91b94eb6f05c9088223f8ba4e4dc1c58b90 | [
"Apache-2.0"
] | null | null | null | Regras.py | kevenLeandro/simula-oBancoImobiliario | d79fd91b94eb6f05c9088223f8ba4e4dc1c58b90 | [
"Apache-2.0"
] | null | null | null | import jogador
'''
Jogadores só podem comprar propriedades caso ela não tenha dono e o jogador tenha o dinheiro da venda.
Ao comprar uma propriedade, o jogador perde o dinheiro e ganha a posse da propriedade
'''
def verificaCompra(propriedade,jogador):
print(propriedade.get_propriedade(),jogador.get_person())
... | 29.11 | 104 | 0.702508 | import jogador
def verificaCompra(propriedade,jogador):
print(propriedade.get_propriedade(),jogador.get_person())
if (jogador.getSaldo() >= propriedade.valor):
print()
jogador.comportamento(propriedade,jogador)
def verificaJogador(jogador: jogador):
if (jogador.valido == False):
... | true | true |
f760a309b429b8485e4228c647862086a0775d4b | 42,167 | py | Python | test/dialect/postgresql/test_dialect.py | PhillCli/sqlalchemy | 44365e0d2190eecf7c006c9d41dbcab7b7925187 | [
"MIT"
] | null | null | null | test/dialect/postgresql/test_dialect.py | PhillCli/sqlalchemy | 44365e0d2190eecf7c006c9d41dbcab7b7925187 | [
"MIT"
] | 1 | 2021-01-25T09:53:34.000Z | 2021-01-25T09:53:35.000Z | test/dialect/postgresql/test_dialect.py | PhillCli/sqlalchemy | 44365e0d2190eecf7c006c9d41dbcab7b7925187 | [
"MIT"
] | 2 | 2021-01-10T10:49:52.000Z | 2021-01-13T09:34:27.000Z | # coding: utf-8
import datetime
import itertools
import logging
import logging.handlers
from sqlalchemy import BigInteger
from sqlalchemy import bindparam
from sqlalchemy import cast
from sqlalchemy import Column
from sqlalchemy import DateTime
from sqlalchemy import event
from sqlalchemy import exc
from sqlalchemy im... | 33.572452 | 79 | 0.529822 | import datetime
import itertools
import logging
import logging.handlers
from sqlalchemy import BigInteger
from sqlalchemy import bindparam
from sqlalchemy import cast
from sqlalchemy import Column
from sqlalchemy import DateTime
from sqlalchemy import event
from sqlalchemy import exc
from sqlalchemy import extract
fro... | true | true |
f760a34a9054800f460b66c18ce4df6edb1fff41 | 2,757 | py | Python | evalml/tests/pipeline_tests/classification_pipeline_tests/test_classification.py | BlockchainClimateInstitute/price_microservice | 11d1cff8965fe1befc997e9da3dc09efceed4579 | [
"BSD-3-Clause"
] | null | null | null | evalml/tests/pipeline_tests/classification_pipeline_tests/test_classification.py | BlockchainClimateInstitute/price_microservice | 11d1cff8965fe1befc997e9da3dc09efceed4579 | [
"BSD-3-Clause"
] | 13 | 2021-03-04T19:29:09.000Z | 2022-03-07T01:00:43.000Z | evalml/tests/pipeline_tests/classification_pipeline_tests/test_classification.py | RG4421/evalml | 33c62abe6d107d1da2f54e9e44a90f18aaf916a9 | [
"BSD-3-Clause"
] | null | null | null | from itertools import product
import pandas as pd
import pytest
from pandas.testing import assert_series_equal
from evalml.demos import load_breast_cancer, load_wine
@pytest.mark.parametrize("problem_type", ["binary", "multi"])
def test_new_unique_targets_in_score(X_y_binary, logistic_regression_binary_pipeline_cla... | 46.728814 | 126 | 0.690968 | from itertools import product
import pandas as pd
import pytest
from pandas.testing import assert_series_equal
from evalml.demos import load_breast_cancer, load_wine
@pytest.mark.parametrize("problem_type", ["binary", "multi"])
def test_new_unique_targets_in_score(X_y_binary, logistic_regression_binary_pipeline_cla... | true | true |
f760a4ebe7a99332c82b0efa4a4dd11914d9ca65 | 37,602 | py | Python | dallinger/recruiters.py | hawkrobe/Dallinger | c27f9e4027c6f123d71ce7c99c8f012e6f55b02c | [
"MIT"
] | null | null | null | dallinger/recruiters.py | hawkrobe/Dallinger | c27f9e4027c6f123d71ce7c99c8f012e6f55b02c | [
"MIT"
] | null | null | null | dallinger/recruiters.py | hawkrobe/Dallinger | c27f9e4027c6f123d71ce7c99c8f012e6f55b02c | [
"MIT"
] | null | null | null | """Recruiters manage the flow of participants to the experiment."""
import flask
import json
import logging
import os
import re
import requests
from rq import Queue
from sqlalchemy import func
from dallinger.config import get_config
from dallinger.db import redis_conn
from dallinger.db import session
from dallinger.... | 35.982775 | 88 | 0.65212 |
import flask
import json
import logging
import os
import re
import requests
from rq import Queue
from sqlalchemy import func
from dallinger.config import get_config
from dallinger.db import redis_conn
from dallinger.db import session
from dallinger.experiment_server.utils import success_response
from dallinger.exper... | true | true |
f760a62272611eec927d3c6767f03f7d551c2c3a | 4,216 | py | Python | openshift/test/test_unversioned_status_cause.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | openshift/test/test_unversioned_status_cause.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | openshift/test/test_unversioned_status_cause.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenShift API (with Kubernetes)
OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is... | 98.046512 | 3,380 | 0.791509 |
from __future__ import absolute_import
import os
import sys
import unittest
import openshift.client
from kubernetes.client.rest import ApiException
from openshift.client.models.unversioned_status_cause import UnversionedStatusCause
class TestUnversionedStatusCause(unittest.TestCase):
def setUp(self):
... | true | true |
f760a6bd20f76788873ed4354855cd183123499a | 1,739 | py | Python | test/test_miscellaneous.py | formazione/Cyberbrain | c135ee7879ef049e459e34be1756da8006430e24 | [
"MIT"
] | 2 | 2020-12-30T20:28:17.000Z | 2020-12-31T04:02:27.000Z | test/test_miscellaneous.py | formazione/Cyberbrain | c135ee7879ef049e459e34be1756da8006430e24 | [
"MIT"
] | null | null | null | test/test_miscellaneous.py | formazione/Cyberbrain | c135ee7879ef049e459e34be1756da8006430e24 | [
"MIT"
] | null | null | null | from cyberbrain import InitialValue, Binding, Mutation, Deletion, Symbol
g = 0
def test_miscellaneous(tracer, test_server):
a = "a"
b = "b"
c = "c"
d = "d"
e = [1, 2, 3]
tracer.start()
x = f"{a} {b:4} {c!r} {d!r:4}" # FORMAT_VALUE,BUILD_STRING
x = a == b == c # ROT_THREE,_COMPARE_... | 32.203704 | 86 | 0.537665 | from cyberbrain import InitialValue, Binding, Mutation, Deletion, Symbol
g = 0
def test_miscellaneous(tracer, test_server):
a = "a"
b = "b"
c = "c"
d = "d"
e = [1, 2, 3]
tracer.start()
x = f"{a} {b:4} {c!r} {d!r:4}" x = a == b == c e[0] += e.pop() del e global g
... | true | true |
f760a6cec2b3677061f9ab61ab44c715d1a6e99a | 720 | py | Python | jesse/strategies/Test05/__init__.py | discohead/jesse | 5f025cc72adb33132b75a516f74f96b52ca12af3 | [
"MIT"
] | 3,999 | 2018-11-09T10:38:51.000Z | 2022-03-31T12:29:12.000Z | jesse/strategies/Test05/__init__.py | discohead/jesse | 5f025cc72adb33132b75a516f74f96b52ca12af3 | [
"MIT"
] | 172 | 2020-04-16T16:19:08.000Z | 2022-03-28T13:28:55.000Z | jesse/strategies/Test05/__init__.py | discohead/jesse | 5f025cc72adb33132b75a516f74f96b52ca12af3 | [
"MIT"
] | 495 | 2019-03-01T21:48:53.000Z | 2022-03-30T15:35:19.000Z | from jesse.strategies import Strategy
# test_is_smart_enough_to_open_positions_via_market_orders
class Test05(Strategy):
def update(self):
pass
def should_long(self):
return self.time == 1547201100000 + 60_000
def should_short(self):
return self.time == 1547203560000 + 60_000
... | 22.5 | 58 | 0.622222 | from jesse.strategies import Strategy
class Test05(Strategy):
def update(self):
pass
def should_long(self):
return self.time == 1547201100000 + 60_000
def should_short(self):
return self.time == 1547203560000 + 60_000
def go_long(self):
qty = 10.204
self.buy ... | true | true |
f760a7d4204bf78db870396a1207fda366ee9ccd | 3,858 | py | Python | yeti/api/__init__.py | xiaoxubeii/yeti | 779484eecc56a86e12746a68f3fc0a01617d8a78 | [
"MIT"
] | 1 | 2018-01-27T05:44:56.000Z | 2018-01-27T05:44:56.000Z | yeti/api/__init__.py | xiaoxubeii/yeti | 779484eecc56a86e12746a68f3fc0a01617d8a78 | [
"MIT"
] | null | null | null | yeti/api/__init__.py | xiaoxubeii/yeti | 779484eecc56a86e12746a68f3fc0a01617d8a78 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'tim'
from flask import Flask
from flask.json import JSONEncoder
from flask_restful import Api
from flask_restful import Resource
import types
from datetime import datetime
from flask.ext.session import Session
from flask.ext.cache import Cache
from flask impo... | 28.160584 | 138 | 0.65578 | __author__ = 'tim'
from flask import Flask
from flask.json import JSONEncoder
from flask_restful import Api
from flask_restful import Resource
import types
from datetime import datetime
from flask.ext.session import Session
from flask.ext.cache import Cache
from flask import session
from flask_sqlalchemy import SQLAlc... | true | true |
f760a7e65d378eded94d89d828750b1a1d3efb5b | 409 | py | Python | taskbuster/urls.py | phillipjones2/DjangoTutorial | a52a0b465cad14e36ff1d87757c64776b9751ff5 | [
"MIT"
] | null | null | null | taskbuster/urls.py | phillipjones2/DjangoTutorial | a52a0b465cad14e36ff1d87757c64776b9751ff5 | [
"MIT"
] | null | null | null | taskbuster/urls.py | phillipjones2/DjangoTutorial | a52a0b465cad14e36ff1d87757c64776b9751ff5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.i18n import i18n_patterns
from .views import home, home_files
urlpatterns = [
url(r'^(?P<filename>(robots.txt)|(humans.txt))$',
home_files, name='home-files'),
]
urlpatterns += i18n_patte... | 24.058824 | 53 | 0.674817 | from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.i18n import i18n_patterns
from .views import home, home_files
urlpatterns = [
url(r'^(?P<filename>(robots.txt)|(humans.txt))$',
home_files, name='home-files'),
]
urlpatterns += i18n_patterns(
url(r'^$', home... | true | true |
f760a827705f2995fc4725713645a25082b8c714 | 2,596 | py | Python | src/DataClass/Scanner/MScanner.py | XiaoYaoNet/MPIRF | 45c6559fc2eeb51c52905fcc6dabe2075e7ffb2b | [
"MIT"
] | null | null | null | src/DataClass/Scanner/MScanner.py | XiaoYaoNet/MPIRF | 45c6559fc2eeb51c52905fcc6dabe2075e7ffb2b | [
"MIT"
] | null | null | null | src/DataClass/Scanner/MScanner.py | XiaoYaoNet/MPIRF | 45c6559fc2eeb51c52905fcc6dabe2075e7ffb2b | [
"MIT"
] | 1 | 2022-02-07T15:33:27.000Z | 2022-02-07T15:33:27.000Z | # coding=UTF-8
import numpy as np
from DataClass.BassClass.ScannerBase import *
class MScannerClass(ScannerBaseClass):
def __init__(self,
VirtualPhantom,
SelectGradietX=2.0,
SelectGradietY=2.0,
DriveFrequencyX=2500000.0 / 102.0,
... | 38.746269 | 106 | 0.552388 | import numpy as np
from DataClass.BassClass.ScannerBase import *
class MScannerClass(ScannerBaseClass):
def __init__(self,
VirtualPhantom,
SelectGradietX=2.0,
SelectGradietY=2.0,
DriveFrequencyX=2500000.0 / 102.0,
DriveFrequenc... | true | true |
f760a8f07d6d2720038d8f887ae44f6ebe78be2e | 2,487 | py | Python | Recommender_sys.py | Abezzam10/Recommender | af72672b22a2c716706afb3e8fc120b5d498ecc3 | [
"MIT"
] | null | null | null | Recommender_sys.py | Abezzam10/Recommender | af72672b22a2c716706afb3e8fc120b5d498ecc3 | [
"MIT"
] | null | null | null | Recommender_sys.py | Abezzam10/Recommender | af72672b22a2c716706afb3e8fc120b5d498ecc3 | [
"MIT"
] | null | null | null | import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
from sklearn.metrics.pairwise import pairwise_distances
import numpy as np
# pass in column names for each CSV as the column name is not given in the file and read them using pandas.
# You can check the column names from the readme file
#R... | 42.87931 | 125 | 0.694813 | import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
from sklearn.metrics.pairwise import pairwise_distances
import numpy as np
u_cols = ['user_id', 'age', 'sex', 'occupation', 'zip_code']
users = pd.read_csv('ml-100k/u.user', sep='|', names=u_cols,encoding='latin-1')
r_cols = ['user_id', ... | true | true |
f760a8fe3fb57b219bf2dd559de565e834ae6744 | 13,130 | py | Python | sdk/python/pulumi_aws_native/s3objectlambda/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/s3objectlambda/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/s3objectlambda/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 51.897233 | 382 | 0.709596 |
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'AccessPointObjectLambdaConfiguration',
'AccessPointPublicAccessBlockConfiguration',
'AccessPointTransformationConfiguration'... | true | true |
f760a9258927b7f930b0a8f7170fd50360fc3668 | 2,243 | py | Python | appleinvaders2/main.py | kantel/pygameprojects | 1ed7aa93fb882f77606c27668484e85c1af9a869 | [
"MIT"
] | null | null | null | appleinvaders2/main.py | kantel/pygameprojects | 1ed7aa93fb882f77606c27668484e85c1af9a869 | [
"MIT"
] | null | null | null | appleinvaders2/main.py | kantel/pygameprojects | 1ed7aa93fb882f77606c27668484e85c1af9a869 | [
"MIT"
] | null | null | null | # Apple Invaders Stage 2: Jumping
import pygame as pg
from settings import Settings
from sprites import Player, Block
import random
import os
class World:
def __init__ (self):
# Initialisiert die Spielewelt
pg.init()
pg.mixer.init()
self.screen = pg.display.set_mode((s.WIDTH, ... | 27.024096 | 96 | 0.546589 |
import pygame as pg
from settings import Settings
from sprites import Player, Block
import random
import os
class World:
def __init__ (self):
pg.init()
pg.mixer.init()
self.screen = pg.display.set_mode((s.WIDTH, s.HEIGHT))
pg.display.set_caption(s.TITLE)
self.c... | true | true |
f760aa5c2abb3a90df0ea399960193209c58e477 | 8,425 | py | Python | tests/test_switchd_container_ct_lag_trunk.py | ops-p4/ops-switchd-p4container-plugin | c8e7260b6a8c4a000e3936570d285288af57f6e2 | [
"Apache-2.0"
] | null | null | null | tests/test_switchd_container_ct_lag_trunk.py | ops-p4/ops-switchd-p4container-plugin | c8e7260b6a8c4a000e3936570d285288af57f6e2 | [
"Apache-2.0"
] | null | null | null | tests/test_switchd_container_ct_lag_trunk.py | ops-p4/ops-switchd-p4container-plugin | c8e7260b6a8c4a000e3936570d285288af57f6e2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
#
# 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
#
# U... | 42.984694 | 87 | 0.619703 |
from os.path import basename
import time
import pytest
from opsvsi.docker import *
from opsvsi.opsvsitest import *
from opsvsiutils.systemutil import *
class myTopo( Topo ):
def build(self, hsts=2, sws=2, **_opts):
self.hsts = hsts
self.sws = sws
for h in irange( 1, hsts):
... | true | true |
f760aab4530a3f47b99eaad62b23dd2b92867af5 | 1,390 | py | Python | tests/FasterSubsetSumTests/test_randomizedVariableLayers.py | joakiti/Benchmark-SubsetSums | a875b5adf7f800d26b73516452904031c73ec29d | [
"MIT"
] | null | null | null | tests/FasterSubsetSumTests/test_randomizedVariableLayers.py | joakiti/Benchmark-SubsetSums | a875b5adf7f800d26b73516452904031c73ec29d | [
"MIT"
] | null | null | null | tests/FasterSubsetSumTests/test_randomizedVariableLayers.py | joakiti/Benchmark-SubsetSums | a875b5adf7f800d26b73516452904031c73ec29d | [
"MIT"
] | null | null | null | from unittest import TestCase
from Implementations.FastIntegersFromGit import FastIntegersFromGit
from Implementations.helpers.Helper import ListToPolynomial, toNumbers
from Implementations.FasterSubsetSum.RandomizedVariableLayers import RandomizedVariableExponentialLayers
from benchmarks.test_distributions import Dist... | 40.882353 | 104 | 0.700719 | from unittest import TestCase
from Implementations.FastIntegersFromGit import FastIntegersFromGit
from Implementations.helpers.Helper import ListToPolynomial, toNumbers
from Implementations.FasterSubsetSum.RandomizedVariableLayers import RandomizedVariableExponentialLayers
from benchmarks.test_distributions import Dist... | true | true |
f760aabf5ace8949020e9d389c0b6c9910460399 | 11,633 | py | Python | pacing/model.py | eashanadhikarla/kibana-data-retrieval | 167c1595f2fbb622e4549f598b272a0fe2163089 | [
"MIT"
] | null | null | null | pacing/model.py | eashanadhikarla/kibana-data-retrieval | 167c1595f2fbb622e4549f598b272a0fe2163089 | [
"MIT"
] | null | null | null | pacing/model.py | eashanadhikarla/kibana-data-retrieval | 167c1595f2fbb622e4549f598b272a0fe2163089 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, print_function
# --- System ---
import os
import sys
import time
import warnings
# --- Utility ---
import pandas as pd
import numpy as np
import math
import random
import logging
import pickle
import warnings
warnings.filterwarnings('ignore')
from sklearn.model_selection import... | 32.313889 | 143 | 0.612654 | from __future__ import absolute_import, print_function
import os
import sys
import time
import warnings
import pandas as pd
import numpy as np
import math
import random
import logging
import pickle
import warnings
warnings.filterwarnings('ignore')
from sklearn.model_selection import train_test_split
from sklearn impo... | true | true |
f760aac5f502cc7b396032b1c2d838a8d06247ea | 41,159 | py | Python | imgaug/augmentables/batches.py | HubukiNinten/imgaug | 2570c5651ed1c90addbaffc0f8be226646c55334 | [
"MIT"
] | 1 | 2019-10-25T17:43:20.000Z | 2019-10-25T17:43:20.000Z | imgaug/augmentables/batches.py | HubukiNinten/imgaug | 2570c5651ed1c90addbaffc0f8be226646c55334 | [
"MIT"
] | null | null | null | imgaug/augmentables/batches.py | HubukiNinten/imgaug | 2570c5651ed1c90addbaffc0f8be226646c55334 | [
"MIT"
] | null | null | null | from __future__ import print_function, division, absolute_import
import copy
import collections
import numpy as np
from .. import imgaug as ia
from . import normalization as nlib
from . import utils as utils
DEFAULT = "DEFAULT"
_AUGMENTABLE_NAMES = [
"images", "heatmaps", "segmentation_maps", "keypoints",
... | 41.035892 | 724 | 0.645667 | from __future__ import print_function, division, absolute_import
import copy
import collections
import numpy as np
from .. import imgaug as ia
from . import normalization as nlib
from . import utils as utils
DEFAULT = "DEFAULT"
_AUGMENTABLE_NAMES = [
"images", "heatmaps", "segmentation_maps", "keypoints",
... | true | true |
f760aaca4d37d33de3f621cdbcacccdae4a8ac7f | 5,570 | py | Python | fedml_api/distributed/fedavg/MyModelTrainer.py | MichaelLee-ceo/FedSAUC | 8c00008772213562ff6a07bf9fa92c3831713118 | [
"Apache-2.0"
] | 1 | 2022-03-24T09:14:58.000Z | 2022-03-24T09:14:58.000Z | fedml_api/distributed/fedavg/MyModelTrainer.py | MichaelLee-ceo/FedSAUC | 8c00008772213562ff6a07bf9fa92c3831713118 | [
"Apache-2.0"
] | null | null | null | fedml_api/distributed/fedavg/MyModelTrainer.py | MichaelLee-ceo/FedSAUC | 8c00008772213562ff6a07bf9fa92c3831713118 | [
"Apache-2.0"
] | 1 | 2022-03-24T09:15:01.000Z | 2022-03-24T09:15:01.000Z | import logging
import colorama
import torch
from torch import nn
try:
from fedml_core.trainer.model_trainer import ModelTrainer
except ImportError:
from FedML.fedml_core.trainer.model_trainer import ModelTrainer
colorama.init()
class MyModelTrainer(ModelTrainer):
def get_model_params(self):
ret... | 39.225352 | 145 | 0.492819 | import logging
import colorama
import torch
from torch import nn
try:
from fedml_core.trainer.model_trainer import ModelTrainer
except ImportError:
from FedML.fedml_core.trainer.model_trainer import ModelTrainer
colorama.init()
class MyModelTrainer(ModelTrainer):
def get_model_params(self):
ret... | true | true |
f760acbda55096a0c310669caffd20f8b4423399 | 1,485 | py | Python | src/acs_limits.py | davidharvey1986/rrg | 26b4658f14279af21af1a61d57e9936daf315a71 | [
"MIT"
] | 2 | 2019-11-18T12:51:09.000Z | 2019-12-11T03:13:51.000Z | src/acs_limits.py | davidharvey1986/rrg | 26b4658f14279af21af1a61d57e9936daf315a71 | [
"MIT"
] | 5 | 2017-06-09T10:06:27.000Z | 2019-07-19T11:28:18.000Z | src/acs_limits.py | davidharvey1986/rrg | 26b4658f14279af21af1a61d57e9936daf315a71 | [
"MIT"
] | 2 | 2017-07-19T15:48:33.000Z | 2017-08-09T16:07:20.000Z | import numpy as np
from astropy.io import fits
def acs_limits( x, y, filename):
'''
;PURPOSE : TO RETURN THE INDEX OF THOSE X AND Y POSITIONS THAT
; ARE WITHIN THE FIELD OF VIEW AND NOT ZERO IN THE SINGLE
; IMAGE FRAM
;INPUTS :
; X : THE X POSITIONS of the sources in ... | 30.306122 | 99 | 0.616162 | import numpy as np
from astropy.io import fits
def acs_limits( x, y, filename):
image_obj=fits.open(filename)
imagedata = image_obj[0].data
header = image_obj[0].header
zeroarr = imagedata == 0
isin = (x > 0) & ( x < header['NAXIS1']) & \
(y > 0) & ( y < header['NAXIS2'])
... | true | true |
f760acbecea8908f2cc7464cb3bed77bac9802db | 19,106 | py | Python | nova/tests/test_linux_net.py | bopopescu/trusted-nova | b440afb89f6f170c0831f5d6318a08ec41bc8c0a | [
"Apache-2.0"
] | 1 | 2015-07-15T08:51:16.000Z | 2015-07-15T08:51:16.000Z | nova/tests/test_linux_net.py | bopopescu/trusted-nova | b440afb89f6f170c0831f5d6318a08ec41bc8c0a | [
"Apache-2.0"
] | null | null | null | nova/tests/test_linux_net.py | bopopescu/trusted-nova | b440afb89f6f170c0831f5d6318a08ec41bc8c0a | [
"Apache-2.0"
] | 2 | 2019-06-12T00:52:15.000Z | 2020-07-24T10:35:29.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 NTT
# 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
#
... | 38.442656 | 78 | 0.549095 |
import os
import mox
from nova import context
from nova import db
from nova import flags
from nova import log as logging
from nova import test
from nova import utils
from nova.network import linux_net
FLAGS = flags.FLAGS
LOG = logging.getLogger(__name__)
HOST = "testhost"
instances = [{'id': 0,
... | true | true |
f760ad0c749938970f9f6d35895d4d932d5da5b1 | 11,597 | py | Python | renpy/scriptedit.py | theizrael/renpy-7.4.10-sdk | 312192c87f92eb0ac29be78d26421856f767279e | [
"Apache-2.0"
] | null | null | null | renpy/scriptedit.py | theizrael/renpy-7.4.10-sdk | 312192c87f92eb0ac29be78d26421856f767279e | [
"Apache-2.0"
] | null | null | null | renpy/scriptedit.py | theizrael/renpy-7.4.10-sdk | 312192c87f92eb0ac29be78d26421856f767279e | [
"Apache-2.0"
] | null | null | null | # Copyright 2004-2021 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, m... | 26.297052 | 98 | 0.65448 |
from __future__ import division, absolute_import, with_statement, print_function, unicode_literals
from renpy.compat import *
import renpy
import re
import codecs
# A map from line loc (elided filename, line) to the Line object representing
# that line.
lines = { }
# The set of files that have been loaded.
files =... | true | true |
f760ad28df641059c9f72d500448ca8a8a25c1c7 | 5,289 | py | Python | tobias_tomatoes.py | tobiassernhede/Movie-Trailer-Website | 25affa4ab6af630f900c1b1d96b4948c0f5dd5d1 | [
"MIT"
] | null | null | null | tobias_tomatoes.py | tobiassernhede/Movie-Trailer-Website | 25affa4ab6af630f900c1b1d96b4948c0f5dd5d1 | [
"MIT"
] | null | null | null | tobias_tomatoes.py | tobiassernhede/Movie-Trailer-Website | 25affa4ab6af630f900c1b1d96b4948c0f5dd5d1 | [
"MIT"
] | null | null | null | import webbrowser
import os
import re
# Styles and scripting for the page
main_page_head = '''
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fresh Tomatoes!</title>
<!-- Bootstrap 3 -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.m... | 38.05036 | 218 | 0.626394 | import webbrowser
import os
import re
main_page_head = '''
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fresh Tomatoes!</title>
<!-- Bootstrap 3 -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK... | true | true |
f760aeac0bb989039c0b619577fbd9779ad48973 | 90 | py | Python | components/applescript.py | atfinke/Today-at-Me | e653c78a66aa883c3bd2ba7705caf1034a02043c | [
"MIT"
] | 1 | 2020-05-08T01:32:37.000Z | 2020-05-08T01:32:37.000Z | components/applescript.py | atfinke/Today-at-Me | e653c78a66aa883c3bd2ba7705caf1034a02043c | [
"MIT"
] | 1 | 2020-02-18T23:24:26.000Z | 2020-02-26T20:02:20.000Z | components/applescript.py | atfinke/Today-at-Me | e653c78a66aa883c3bd2ba7705caf1034a02043c | [
"MIT"
] | 2 | 2020-01-30T02:39:18.000Z | 2020-02-13T03:19:52.000Z | from subprocess import Popen
def run_sync(script):
Popen(['osascript', '-e', script]) | 22.5 | 38 | 0.7 | from subprocess import Popen
def run_sync(script):
Popen(['osascript', '-e', script]) | true | true |
f760aefd9a8a0f0b01d937621f42741411b78ab9 | 77 | py | Python | maxwell_slice/__init__.py | flatironinstitute/maxwell-slice | 5941ca10098070f7df7f44cf662174c598a7521c | [
"Apache-2.0"
] | 1 | 2021-09-23T01:11:18.000Z | 2021-09-23T01:11:18.000Z | maxwell_slice/__init__.py | flatironinstitute/maxwell-slice | 5941ca10098070f7df7f44cf662174c598a7521c | [
"Apache-2.0"
] | 9 | 2021-01-04T18:30:43.000Z | 2021-02-09T19:30:51.000Z | maxwell_slice/__init__.py | flatironinstitute/maxwell-slice | 5941ca10098070f7df7f44cf662174c598a7521c | [
"Apache-2.0"
] | 1 | 2021-09-23T01:11:19.000Z | 2021-09-23T01:11:19.000Z | from .test_function import test_function
from .sphere_scat import sphere_scat | 38.5 | 40 | 0.883117 | from .test_function import test_function
from .sphere_scat import sphere_scat | true | true |
f760af619f217d1a64d3025eaa72a9cf746b5287 | 1,602 | py | Python | src/pata/urls.py | krismwas/pata-app | 2c7e29b7801f17047ccfa0c824a77b0415a8f029 | [
"MIT"
] | null | null | null | src/pata/urls.py | krismwas/pata-app | 2c7e29b7801f17047ccfa0c824a77b0415a8f029 | [
"MIT"
] | null | null | null | src/pata/urls.py | krismwas/pata-app | 2c7e29b7801f17047ccfa0c824a77b0415a8f029 | [
"MIT"
] | null | null | null | """pata URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | 30.226415 | 97 | 0.710986 | from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.conf import settings
from django.conf.urls.static import static
from rating.views import DoctorRatingAjaxView
from doctor import views
urlpatterns = [
url(r'^accounts/', in... | true | true |
f760afb072ab88e245478af6deef5b63583672b0 | 873 | py | Python | Lab Tests/2019.1 Lab Test/Solutions/q4b_test.py | alphatrl/IS111 | f09fc47f5321dc4d79b9dde97399109e2a368443 | [
"MIT"
] | null | null | null | Lab Tests/2019.1 Lab Test/Solutions/q4b_test.py | alphatrl/IS111 | f09fc47f5321dc4d79b9dde97399109e2a368443 | [
"MIT"
] | null | null | null | Lab Tests/2019.1 Lab Test/Solutions/q4b_test.py | alphatrl/IS111 | f09fc47f5321dc4d79b9dde97399109e2a368443 | [
"MIT"
] | null | null | null | from q4b import get_grouping
########## TEST CASE 1 ##########
print()
print('-' * 20)
print()
print('Test 1')
expected_results1 = [('Snow White', 'Dopey'), ('Grumpy', 'Queen'), ('Sneezy', 'Sleepy')]
expected_results2 = [('Snow White', 'Grumpy'), ('Dopey', 'Queen'), ('Sneezy', 'Sleepy')]
print('Expected:', ex... | 36.375 | 151 | 0.579611 | from q4b import get_grouping
print()
print('-' * 20)
print()
print('Test 1')
expected_results1 = [('Snow White', 'Dopey'), ('Grumpy', 'Queen'), ('Sneezy', 'Sleepy')]
expected_results2 = [('Snow White', 'Grumpy'), ('Dopey', 'Queen'), ('Sneezy', 'Sleepy')]
print('Expected:', expected_results1, 'or')
print(' ... | true | true |
f760afd315634b348f715b79834f28a13e0b9f14 | 514 | py | Python | tests/test_iris.py | vivganes/devops-machine-learning-example | 9064a799f0eb5377a3f6839b475d1557448e8ef7 | [
"MIT"
] | null | null | null | tests/test_iris.py | vivganes/devops-machine-learning-example | 9064a799f0eb5377a3f6839b475d1557448e8ef7 | [
"MIT"
] | null | null | null | tests/test_iris.py | vivganes/devops-machine-learning-example | 9064a799f0eb5377a3f6839b475d1557448e8ef7 | [
"MIT"
] | null | null | null | import pytest
from click.testing import CliRunner
from irisvmpy import iris
class TestCLI(object):
@pytest.fixture()
def runner(self):
return CliRunner()
def test_print_help_succeeds(self, runner):
result = runner.invoke(iris.cli, ['--help'])
assert result.exit_code ... | 25.7 | 70 | 0.608949 | import pytest
from click.testing import CliRunner
from irisvmpy import iris
class TestCLI(object):
@pytest.fixture()
def runner(self):
return CliRunner()
def test_print_help_succeeds(self, runner):
result = runner.invoke(iris.cli, ['--help'])
assert result.exit_code ... | true | true |
f760b0f2cbfdc7d107e121d029e5f7aea769e2c2 | 16,285 | py | Python | FR-12x12-TAB/optimized/BiCAS.py | bidlom/Mendel2019-ES | 24632a8582e2b18bd8367ecb599c9d4b58e7d7da | [
"BSD-3-Clause"
] | null | null | null | FR-12x12-TAB/optimized/BiCAS.py | bidlom/Mendel2019-ES | 24632a8582e2b18bd8367ecb599c9d4b58e7d7da | [
"BSD-3-Clause"
] | null | null | null | FR-12x12-TAB/optimized/BiCAS.py | bidlom/Mendel2019-ES | 24632a8582e2b18bd8367ecb599c9d4b58e7d7da | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# ******************************************************************************
# ****** BiCAS - Bidlo's Cellular Automata Simulator *******
# ******************************************************************************
# This program requires the Python environment with N... | 37.872093 | 97 | 0.500154 | # ******************************************************************************
# This program requires the Python environment with NumPy and PyGame libraries.
#
# --------------------------------- Licence ------------------------------------
# BiCAS is provides under "The BSD 3-Clause License" the content of which is... | false | true |
f760b13bfae9a220778a5b6efcf02d5fb4b3b27c | 16,418 | py | Python | google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/grpc_asyncio.py | LaudateCorpus1/python-gke-connect-gateway | 19b0dddf8031a40ad01b2252c2399789d75d0be0 | [
"Apache-2.0"
] | 1 | 2021-12-30T02:19:19.000Z | 2021-12-30T02:19:19.000Z | google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/grpc_asyncio.py | LaudateCorpus1/python-gke-connect-gateway | 19b0dddf8031a40ad01b2252c2399789d75d0be0 | [
"Apache-2.0"
] | 29 | 2021-06-21T19:02:42.000Z | 2022-03-18T16:41:01.000Z | google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/grpc_asyncio.py | LaudateCorpus1/python-gke-connect-gateway | 19b0dddf8031a40ad01b2252c2399789d75d0be0 | [
"Apache-2.0"
] | 2 | 2021-07-14T19:32:28.000Z | 2022-01-29T08:11:13.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 43.781333 | 89 | 0.635948 | import warnings
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
from google.api_core import gapic_v1
from google.api_core import grpc_helpers_async
from google.auth import credentials as ga_credentials from google.auth.transport.grpc import SslCredentials
import grpc from grpc.experi... | true | true |
f760b564bcdb328162c756e1f0691d5a011c6201 | 3,305 | py | Python | plugins/modules/commissioning_api_v1_uap_6500_1.py | ciena/ciena.mcp | b266a7cbd912c547f6e4877597d67ea9254e5758 | [
"Apache-2.0"
] | 3 | 2021-07-19T23:56:34.000Z | 2021-11-08T14:23:53.000Z | plugins/modules/commissioning_api_v1_uap_6500_1.py | ciena/ciena.mcp | b266a7cbd912c547f6e4877597d67ea9254e5758 | [
"Apache-2.0"
] | 1 | 2022-01-19T22:06:49.000Z | 2022-01-24T15:16:53.000Z | plugins/modules/commissioning_api_v1_uap_6500_1.py | ciena/ciena.mcp | b266a7cbd912c547f6e4877597d67ea9254e5758 | [
"Apache-2.0"
] | 1 | 2021-11-08T14:25:29.000Z | 2021-11-08T14:25:29.000Z | #!/usr/bin/env python
# Info module template
#############################################
# WARNING #
#############################################
#
# This file is auto generated by
# https://github.com/jgroom33/vmware_rest_code_generator
#
# Do not edit this file manually.
#
# Ch... | 28.008475 | 85 | 0.63298 |
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import socket
import json
DOCUMENTATION = """
module: commissioning_api_v1_uap_6500_1
short_description: Handle resource of type commissioning_api_v1_uap_6500_1
description: Handle resource of type commissioning_api_v1_uap_6500_1
... | true | true |
f760b6267d6009ab0fdb0417e574e500071072c2 | 35,299 | py | Python | src/scorer.py | nobu-g/cohesion-analysis | bf2e22c1aff51f96fd2aaef6359839646548c3be | [
"MIT"
] | 12 | 2020-12-25T11:13:17.000Z | 2021-12-28T05:19:46.000Z | src/scorer.py | nobu-g/cohesion-analysis | bf2e22c1aff51f96fd2aaef6359839646548c3be | [
"MIT"
] | 1 | 2020-12-25T09:26:26.000Z | 2020-12-25T09:26:34.000Z | src/scorer.py | nobu-g/cohesion-analysis | bf2e22c1aff51f96fd2aaef6359839646548c3be | [
"MIT"
] | 1 | 2022-02-25T13:22:47.000Z | 2022-02-25T13:22:47.000Z | import argparse
import io
import logging
import sys
from collections import OrderedDict
from dataclasses import dataclass
from pathlib import Path
from typing import List, Dict, Set, Union, Optional, TextIO
import pandas as pd
from jinja2 import Template, Environment, FileSystemLoader
from kyoto_reader import KyotoRea... | 48.222678 | 120 | 0.575342 | import argparse
import io
import logging
import sys
from collections import OrderedDict
from dataclasses import dataclass
from pathlib import Path
from typing import List, Dict, Set, Union, Optional, TextIO
import pandas as pd
from jinja2 import Template, Environment, FileSystemLoader
from kyoto_reader import KyotoRea... | true | true |
f760b6c841e8f7bdb8dbe1caeb0ffa1151caf98c | 2,452 | py | Python | api/radiam-osf/osf_api/core.py | usask-rc/radiam | bfa38fd33e211b66e30e453a717c5f216e848cb2 | [
"MIT"
] | 2 | 2020-02-01T20:41:28.000Z | 2020-02-03T20:57:59.000Z | api/radiam-osf/osf_api/core.py | usask-rc/radiam | bfa38fd33e211b66e30e453a717c5f216e848cb2 | [
"MIT"
] | 10 | 2020-04-20T15:52:49.000Z | 2020-04-30T18:03:09.000Z | api/radiam-osf/osf_api/core.py | usask-rc/radiam | bfa38fd33e211b66e30e453a717c5f216e848cb2 | [
"MIT"
] | null | null | null | import numbers
from .session import OSFSession
# Base class for all models and the user facing API object
class OSFCore(object):
def __init__(self, json, session=None):
if session is None:
self.session = OSFSession()
else:
self.session = session
self._update_attri... | 31.037975 | 77 | 0.555057 | import numbers
from .session import OSFSession
class OSFCore(object):
def __init__(self, json, session=None):
if session is None:
self.session = OSFSession()
else:
self.session = session
self._update_attributes(json)
def _update_attributes(self, json):
... | true | true |
f760b72e973be57736bafdffa7e73e105324ef0c | 8,048 | py | Python | certbot_dns_shellrent/dns_shellrent_test.py | shellrent/certbot-dns-shellrent | 98539cc54dc296cee50e8c41811e37c3d7955067 | [
"Apache-2.0"
] | null | null | null | certbot_dns_shellrent/dns_shellrent_test.py | shellrent/certbot-dns-shellrent | 98539cc54dc296cee50e8c41811e37c3d7955067 | [
"Apache-2.0"
] | null | null | null | certbot_dns_shellrent/dns_shellrent_test.py | shellrent/certbot-dns-shellrent | 98539cc54dc296cee50e8c41811e37c3d7955067 | [
"Apache-2.0"
] | null | null | null | """Tests for certbot_dns_shellrent.dns_shellrent."""
import unittest
import mock
import json
import requests_mock
from certbot import errors
from certbot.compat import os
from certbot.errors import PluginError
from certbot.plugins import dns_test_common
from certbot.plugins.dns_test_common import DOMAIN
from certbot... | 43.978142 | 156 | 0.659791 |
import unittest
import mock
import json
import requests_mock
from certbot import errors
from certbot.compat import os
from certbot.errors import PluginError
from certbot.plugins import dns_test_common
from certbot.plugins.dns_test_common import DOMAIN
from certbot.tests import util as test_util
FAKE_USER = "remoteu... | true | true |
f760b78f59142e0904e905af518f67c0a449727a | 15,457 | py | Python | saleor/plugins/saleor_flat_tax_plugin/plugin.py | Anezka-Centrum/saleor | 37ce6bf41aadb3eb8c1b3e70de1cdfe6448c0c24 | [
"CC-BY-4.0"
] | null | null | null | saleor/plugins/saleor_flat_tax_plugin/plugin.py | Anezka-Centrum/saleor | 37ce6bf41aadb3eb8c1b3e70de1cdfe6448c0c24 | [
"CC-BY-4.0"
] | null | null | null | saleor/plugins/saleor_flat_tax_plugin/plugin.py | Anezka-Centrum/saleor | 37ce6bf41aadb3eb8c1b3e70de1cdfe6448c0c24 | [
"CC-BY-4.0"
] | null | null | null | import json
import numbers
from typing import TYPE_CHECKING, Any, Iterable, List, Optional, Union
from decimal import Decimal
from django.core.exceptions import ValidationError
from django_countries.fields import Country
from prices import Money, TaxedMoney, TaxedMoneyRange
from saleor.checkout import calculations
fro... | 34.891648 | 97 | 0.625412 | import json
import numbers
from typing import TYPE_CHECKING, Any, Iterable, List, Optional, Union
from decimal import Decimal
from django.core.exceptions import ValidationError
from django_countries.fields import Country
from prices import Money, TaxedMoney, TaxedMoneyRange
from saleor.checkout import calculations
fro... | true | true |
f760b7f6c4caac3991e271c5b62f1b2af67502fd | 643 | py | Python | ask_melnikov/ask/migrations/0008_auto_20171114_1527.py | BatrSens/ask_melnikov | 4aa6565fbc86454c168feec585f8abde5e30ab0b | [
"MIT"
] | null | null | null | ask_melnikov/ask/migrations/0008_auto_20171114_1527.py | BatrSens/ask_melnikov | 4aa6565fbc86454c168feec585f8abde5e30ab0b | [
"MIT"
] | null | null | null | ask_melnikov/ask/migrations/0008_auto_20171114_1527.py | BatrSens/ask_melnikov | 4aa6565fbc86454c168feec585f8abde5e30ab0b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-14 15:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ask', '0007_answer_author'),
]
operations = [
migrations.CreateModel(
... | 23.814815 | 94 | 0.566096 | from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ask', '0007_answer_author'),
]
operations = [
migrations.CreateModel(
name='Tag',
fields=[
('title', models.... | true | true |
f760b87e803ee209f381b3635d1d868ea5ab4db3 | 278 | py | Python | tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_12/ar_/test_artificial_128_RelativeDifference_MovingMedian_12__100.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_12/ar_/test_artificial_128_RelativeDifference_MovingMedian_12__100.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_12/ar_/test_artificial_128_RelativeDifference_MovingMedian_12__100.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 12, transform = "RelativeDifference", sigma = 0.0, exog_count = 100, ar_order = 0); | 39.714286 | 178 | 0.744604 | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 12, transform = "RelativeDifference", sigma = 0.0, exog_count = 100, ar_order = 0); | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.