hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4747776d908096882a8a9e84d7bd93098a2de6a8 | 1,399 | py | Python | DailyProgrammer/20120410B.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | 2 | 2020-12-23T18:59:22.000Z | 2021-04-14T13:16:09.000Z | DailyProgrammer/20120410B.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | DailyProgrammer/20120410B.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | """
Reverse Polish Notation(RPN) is a mathematical notation where every operator follows all of its operands. For instance,
to add three and four, one would write "3 4 +" rather than "3 + 4". If there are multiple operations, the operator is
given immediately after its second operand; so the expression written "3 ? 4 +... | 31.088889 | 119 | 0.654753 | """
Reverse Polish Notation(RPN) is a mathematical notation where every operator follows all of its operands. For instance,
to add three and four, one would write "3 4 +" rather than "3 + 4". If there are multiple operations, the operator is
given immediately after its second operand; so the expression written "3 ? 4 +... | 0 | 0 | 0 |
ba03b875f1a3ba108e73bbc56cfa6730a8dc9704 | 589 | py | Python | corehq/messaging/smsbackends/http/sms_sending.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | 471 | 2015-01-10T02:55:01.000Z | 2022-03-29T18:07:18.000Z | corehq/messaging/smsbackends/http/sms_sending.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | 14,354 | 2015-01-01T07:38:23.000Z | 2022-03-31T20:55:14.000Z | corehq/messaging/smsbackends/http/sms_sending.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | 175 | 2015-01-06T07:16:47.000Z | 2022-03-29T13:27:01.000Z | from corehq.util.urlvalidate.urlvalidate import (
PossibleSSRFAttempt,
validate_user_input_url,
)
from corehq.apps.sms.models import SMSBase
from corehq.util.metrics import metrics_counter
| 26.772727 | 72 | 0.689304 | from corehq.util.urlvalidate.urlvalidate import (
PossibleSSRFAttempt,
validate_user_input_url,
)
from corehq.apps.sms.models import SMSBase
from corehq.util.metrics import metrics_counter
def verify_sms_url(url, msg, backend):
try:
validate_user_input_url(url)
except PossibleSSRFAttempt as ... | 366 | 0 | 23 |
1d4c563ca6d7fbca06cb44be85b9076ebe241a61 | 5,083 | py | Python | origins/ontologies.py | cocoemily/paleocore2 | 34b9ba30358963a0a1c8ae7252ed7c5ef178a758 | [
"MIT"
] | null | null | null | origins/ontologies.py | cocoemily/paleocore2 | 34b9ba30358963a0a1c8ae7252ed7c5ef178a758 | [
"MIT"
] | null | null | null | origins/ontologies.py | cocoemily/paleocore2 | 34b9ba30358963a0a1c8ae7252ed7c5ef178a758 | [
"MIT"
] | null | null | null | # Origins Project Choice Lists, Vocabularies, Ontologies
# choice lists and vocabularies are defined with the following design template:
# variable_label1 = value # variable_labels are lowercase, values can be strings or numbers or codes
# variable_label2 = value
# CHOICES = (
# (variable_label1, 'string_represent... | 42.008264 | 119 | 0.744639 | # Origins Project Choice Lists, Vocabularies, Ontologies
# choice lists and vocabularies are defined with the following design template:
# variable_label1 = value # variable_labels are lowercase, values can be strings or numbers or codes
# variable_label2 = value
# CHOICES = (
# (variable_label1, 'string_represent... | 0 | 0 | 0 |
17714782ac90fa3f8a593cd5ecfbcd309fdb7f2c | 133 | py | Python | templates/text_handlers.py | Tsitko/drawyourbot | 87ce611a6aaba0dbcd02332edecf1dfe79dcae03 | [
"MIT"
] | 22 | 2021-04-22T08:00:08.000Z | 2021-08-11T00:30:30.000Z | templates/text_handlers.py | Tsitko/drawyourbot | 87ce611a6aaba0dbcd02332edecf1dfe79dcae03 | [
"MIT"
] | null | null | null | templates/text_handlers.py | Tsitko/drawyourbot | 87ce611a6aaba0dbcd02332edecf1dfe79dcae03 | [
"MIT"
] | 4 | 2021-08-10T08:36:12.000Z | 2022-03-27T15:21:30.000Z | if last_question[bot.message.chat_id] == '%block_name%' and not got_answer:
%get_answer%
%next_blocks%
got_answer = True
| 26.6 | 79 | 0.699248 | if last_question[bot.message.chat_id] == '%block_name%' and not got_answer:
%get_answer%
%next_blocks%
got_answer = True
| 0 | 0 | 0 |
5088bdcc2555dffb970cb2a2f2ba052473943cd3 | 11,536 | py | Python | core/utils.py | CAPTools/CAPCollector | 9d890b0f9a0d9a655e4042315ff94133621530e9 | [
"BSD-3-Clause"
] | 11 | 2015-01-24T03:04:31.000Z | 2022-01-12T23:33:49.000Z | core/utils.py | CAPTools/CAPCollector | 9d890b0f9a0d9a655e4042315ff94133621530e9 | [
"BSD-3-Clause"
] | null | null | null | core/utils.py | CAPTools/CAPCollector | 9d890b0f9a0d9a655e4042315ff94133621530e9 | [
"BSD-3-Clause"
] | 8 | 2015-04-19T18:22:53.000Z | 2021-12-15T11:21:02.000Z | # Copyright (c) 2013, Carnegie Mellon University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions... | 35.937695 | 80 | 0.692181 | # Copyright (c) 2013, Carnegie Mellon University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions... | 0 | 0 | 0 |
0abb359fcd3fa230f84c1d94f935a7561a18b43e | 104 | py | Python | reward_surfaces/experiments/__init__.py | weepingwillowben/reward-surfaces | f27211faf3784df3305972b7cad65002fd57d7bf | [
"MIT"
] | null | null | null | reward_surfaces/experiments/__init__.py | weepingwillowben/reward-surfaces | f27211faf3784df3305972b7cad65002fd57d7bf | [
"MIT"
] | null | null | null | reward_surfaces/experiments/__init__.py | weepingwillowben/reward-surfaces | f27211faf3784df3305972b7cad65002fd57d7bf | [
"MIT"
] | 2 | 2021-10-03T14:51:38.000Z | 2021-11-10T02:54:26.000Z | from .generate_eval_jobs import generate_eval_jobs
from .generate_plane_jobs import generate_plane_data
| 34.666667 | 52 | 0.903846 | from .generate_eval_jobs import generate_eval_jobs
from .generate_plane_jobs import generate_plane_data
| 0 | 0 | 0 |
8e2a9218dc15d719fba899fa20f53e298214c11a | 13,078 | py | Python | rain_api_core/urs_util.py | asfadmin/rain-api-core | 99985d4a346ab06449a42ed6b5b91f36d2bc760a | [
"Apache-2.0"
] | 1 | 2020-05-06T22:01:22.000Z | 2020-05-06T22:01:22.000Z | rain_api_core/urs_util.py | asfadmin/rain-api-core | 99985d4a346ab06449a42ed6b5b91f36d2bc760a | [
"Apache-2.0"
] | 87 | 2019-09-16T20:45:59.000Z | 2022-03-31T21:18:44.000Z | rain_api_core/urs_util.py | asfadmin/rain-api-core | 99985d4a346ab06449a42ed6b5b91f36d2bc760a | [
"Apache-2.0"
] | 2 | 2020-05-06T22:01:29.000Z | 2021-03-23T18:22:52.000Z |
import logging
import os
import urllib
from time import time
from json import loads
from rain_api_core.general_util import log_context, return_timing_object, duration
from rain_api_core.view_util import make_set_cookie_headers_jwt, get_exp_time, JWT_COOKIE_NAME
from rain_api_core.aws_util import retrieve_secret
log ... | 39.155689 | 156 | 0.658663 |
import logging
import os
import urllib
from time import time
from json import loads
from rain_api_core.general_util import log_context, return_timing_object, duration
from rain_api_core.view_util import make_set_cookie_headers_jwt, get_exp_time, JWT_COOKIE_NAME
from rain_api_core.aws_util import retrieve_secret
log ... | 11,746 | 0 | 252 |
6bc67b3877e6d543746b09d6c9a8ffaf05e2d6b6 | 979 | py | Python | source/lambda/solution_helper/lambda_function.py | aws-solutions/aws-devops-monitoring-dashboard | ce634d51c64118ba6716b1ffa19756d2e97ad4c8 | [
"Apache-2.0"
] | 9 | 2021-10-30T13:03:37.000Z | 2022-03-07T19:29:30.000Z | source/lambda/solution_helper/lambda_function.py | aws-solutions/aws-devops-monitoring-dashboard | ce634d51c64118ba6716b1ffa19756d2e97ad4c8 | [
"Apache-2.0"
] | 1 | 2022-01-03T20:18:32.000Z | 2022-01-13T00:44:51.000Z | source/lambda/solution_helper/lambda_function.py | aws-solutions/aws-devops-monitoring-dashboard | ce634d51c64118ba6716b1ffa19756d2e97ad4c8 | [
"Apache-2.0"
] | 5 | 2021-10-30T13:03:32.000Z | 2022-03-16T18:36:33.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import logging
import os
import uuid
import requests
import json
from copy import copy
from datetime import datetime
from crhelper import CfnResource
from util.solution_metrics import send_metrics
logger = loggi... | 26.459459 | 90 | 0.720123 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import logging
import os
import uuid
import requests
import json
from copy import copy
from datetime import datetime
from crhelper import CfnResource
from util.solution_metrics import send_metrics
logger = loggi... | 485 | 0 | 45 |
48e3d47332daa40f2b72af7bae81629a2d1002eb | 762 | py | Python | test/solution_tests/FIZ/test_fiz.py | DPNT-Sourcecode/FIZ-erqp01 | df4fc9abf63c9597352a4bfa5d3f97ac5aada0bc | [
"Apache-2.0"
] | null | null | null | test/solution_tests/FIZ/test_fiz.py | DPNT-Sourcecode/FIZ-erqp01 | df4fc9abf63c9597352a4bfa5d3f97ac5aada0bc | [
"Apache-2.0"
] | null | null | null | test/solution_tests/FIZ/test_fiz.py | DPNT-Sourcecode/FIZ-erqp01 | df4fc9abf63c9597352a4bfa5d3f97ac5aada0bc | [
"Apache-2.0"
] | null | null | null | from solutions.FIZ import fizz_buzz_solution
| 36.285714 | 74 | 0.66273 | from solutions.FIZ import fizz_buzz_solution
class TestHlo2():
def test_fiz(self):
assert fizz_buzz_solution.fizz_buzz(3) == 'fizz fake deluxe'
assert fizz_buzz_solution.fizz_buzz(12) == 'fizz'
assert fizz_buzz_solution.fizz_buzz(10) == 'buzz'
assert fizz_buzz_solution.fizz_buzz(15)... | 634 | -4 | 49 |
6d148d29c415b6451fce5bdddc781fcb51b3a959 | 9,755 | py | Python | Test/Mock/Component.py | paul-ollis/cleversheep3 | 86e6ca76ea4e8524f16e2348d38484dcfafb07d0 | [
"Apache-2.0"
] | null | null | null | Test/Mock/Component.py | paul-ollis/cleversheep3 | 86e6ca76ea4e8524f16e2348d38484dcfafb07d0 | [
"Apache-2.0"
] | null | null | null | Test/Mock/Component.py | paul-ollis/cleversheep3 | 86e6ca76ea4e8524f16e2348d38484dcfafb07d0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Classes to mock components for use in system testing.
The main class is the `Component`, which is intended to be used as the base
class for an object that plays the part of a separately running process.
However, a component is actually executed under the control of the
`cleversheep3.Test.PollM... | 37.810078 | 79 | 0.634341 | #!/usr/bin/env python
"""Classes to mock components for use in system testing.
The main class is the `Component`, which is intended to be used as the base
class for an object that plays the part of a separately running process.
However, a component is actually executed under the control of the
`cleversheep3.Test.PollM... | 683 | 0 | 131 |
6f7b106f7638421b8fd55db0ebf2169f0c928b89 | 2,415 | py | Python | src/ralph/signals.py | DoNnMyTh/ralph | 97b91639fa68965ad3fd9d0d2652a6545a2a5b72 | [
"Apache-2.0"
] | 1,668 | 2015-01-01T12:51:20.000Z | 2022-03-29T09:05:35.000Z | src/ralph/signals.py | hq-git/ralph | e2448caf02d6e5abfd81da2cff92aefe0a534883 | [
"Apache-2.0"
] | 2,314 | 2015-01-02T13:26:26.000Z | 2022-03-29T04:06:03.000Z | src/ralph/signals.py | hq-git/ralph | e2448caf02d6e5abfd81da2cff92aefe0a534883 | [
"Apache-2.0"
] | 534 | 2015-01-05T12:40:28.000Z | 2022-03-29T21:10:12.000Z | from django.db import connection
from django.db.models.signals import post_save
from django.dispatch import receiver
# TODO(mkurek): make this working as a decorator, example:
# @post_commit(MyModel)
# def my_handler(instance):
# ...
def post_commit(func, model, signal=post_save, single_call=True):
"""
Pos... | 41.637931 | 80 | 0.681159 | from django.db import connection
from django.db.models.signals import post_save
from django.dispatch import receiver
# TODO(mkurek): make this working as a decorator, example:
# @post_commit(MyModel)
# def my_handler(instance):
# ...
def post_commit(func, model, signal=post_save, single_call=True):
"""
Pos... | 562 | 0 | 26 |
585404588be51bc49193fe8046ecb213a7dc11b7 | 3,743 | py | Python | ai_modules/kcwu_short2.py | sgpritam/2048-python | 1366db6a712b6808699d6b71166487d7cc01a88c | [
"BSD-3-Clause"
] | 79 | 2016-01-01T17:41:11.000Z | 2022-02-21T18:18:13.000Z | ai_modules/kcwu_short2.py | sgpritam/2048-python | 1366db6a712b6808699d6b71166487d7cc01a88c | [
"BSD-3-Clause"
] | 4 | 2017-04-08T15:14:08.000Z | 2021-12-25T00:51:34.000Z | ai_modules/kcwu_short2.py | sgpritam/2048-python | 1366db6a712b6808699d6b71166487d7cc01a88c | [
"BSD-3-Clause"
] | 63 | 2017-02-25T13:54:44.000Z | 2022-01-17T18:04:59.000Z | # Copyright 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from multiprocessing import *
import sys
range4 = range(4)
job_table = {}
table = {}
# vim:sw=4:expandtab:softtabstop=4
| 26.174825 | 176 | 0.536468 | # Copyright 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from multiprocessing import *
import sys
range4 = range(4)
job_table = {}
def rotateRight(grid):
return [[grid[r][3-c] for r in range4] for c in range4]
def move_... | 3,073 | -12 | 398 |
51b3b5a2926120226b4c6ef9a3aa3313337a91df | 5,181 | py | Python | nengolib/networks/echo_state.py | ikajic/nengolib | bd30ec38ba656bedb94a267b5f86b51d1cec4954 | [
"MIT"
] | 27 | 2016-01-21T04:11:02.000Z | 2021-11-16T20:41:04.000Z | nengolib/networks/echo_state.py | ikajic/nengolib | bd30ec38ba656bedb94a267b5f86b51d1cec4954 | [
"MIT"
] | 178 | 2016-01-21T16:04:34.000Z | 2021-05-01T16:28:02.000Z | nengolib/networks/echo_state.py | ikajic/nengolib | bd30ec38ba656bedb94a267b5f86b51d1cec4954 | [
"MIT"
] | 4 | 2019-03-19T18:22:02.000Z | 2021-03-23T16:06:57.000Z | import numpy as np
from scipy.linalg import eig
from nengo.params import IntParam, NumberParam
from nengo.neurons import NeuronTypeParam
from nengo.synapses import SynapseParam
import nengo
from nengolib import Network
from nengolib.neurons import Tanh
from nengolib.networks.reservoir import Reservoir
__all__ = ['Ec... | 43.175 | 79 | 0.647365 | import numpy as np
from scipy.linalg import eig
from nengo.params import IntParam, NumberParam
from nengo.neurons import NeuronTypeParam
from nengo.synapses import SynapseParam
import nengo
from nengolib import Network
from nengolib.neurons import Tanh
from nengolib.networks.reservoir import Reservoir
__all__ = ['Ec... | 0 | 0 | 0 |
29f16302d911899d097a220dbe4d2244dad9298b | 427 | py | Python | tests/unit/test_k8s.py | lslebodn/conu | dee6fd958471f77d1c0511b031ea136dfaf8a77a | [
"MIT"
] | 95 | 2018-05-19T14:35:08.000Z | 2022-01-08T23:31:40.000Z | tests/unit/test_k8s.py | lslebodn/conu | dee6fd958471f77d1c0511b031ea136dfaf8a77a | [
"MIT"
] | 179 | 2017-09-12T11:14:30.000Z | 2018-04-26T05:36:13.000Z | tests/unit/test_k8s.py | lslebodn/conu | dee6fd958471f77d1c0511b031ea136dfaf8a77a | [
"MIT"
] | 16 | 2018-05-09T14:15:32.000Z | 2021-08-02T21:11:33.000Z | # -*- coding: utf-8 -*-
#
# Copyright Contributors to the Conu project.
# SPDX-License-Identifier: MIT
#
"""
Tests for Kubernetes backend
"""
from conu.backend.k8s.utils import k8s_ports_to_metadata_ports, metadata_ports_to_k8s_ports
| 21.35 | 91 | 0.754098 | # -*- coding: utf-8 -*-
#
# Copyright Contributors to the Conu project.
# SPDX-License-Identifier: MIT
#
"""
Tests for Kubernetes backend
"""
from conu.backend.k8s.utils import k8s_ports_to_metadata_ports, metadata_ports_to_k8s_ports
def test_port_conversion():
test_ports = ["8080/tcp", "12345"]
k8s_ports ... | 167 | 0 | 23 |
d7129155bec3bfc5f1ad8ebe45c9344c21663af1 | 7,468 | py | Python | research/rl/ppo.py | matwilso/boxLCD | 7505e27f47e6694026303aa6cf12477959fc9fba | [
"MIT"
] | 2 | 2021-05-17T14:33:54.000Z | 2021-09-09T07:14:03.000Z | research/rl/ppo.py | matwilso/boxLCD | 7505e27f47e6694026303aa6cf12477959fc9fba | [
"MIT"
] | null | null | null | research/rl/ppo.py | matwilso/boxLCD | 7505e27f47e6694026303aa6cf12477959fc9fba | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import yaml
from datetime import datetime
from collections import defaultdict
from copy import deepcopy
import itertools
import numpy as np
import torch as th
from torch.optim import Adam
import time
import numpy as np
import scipy.signal
import torch as th
import torch.nn as nn
import t... | 38.297436 | 157 | 0.638324 | import matplotlib.pyplot as plt
import yaml
from datetime import datetime
from collections import defaultdict
from copy import deepcopy
import itertools
import numpy as np
import torch as th
from torch.optim import Adam
import time
import numpy as np
import scipy.signal
import torch as th
import torch.nn as nn
import t... | 6,460 | 212 | 23 |
f25c24d909d80eb63ed1e25e177320b08bbc6edc | 1,542 | py | Python | tests/test_economy.py | Erogue-Lord/ancap-bot | cb2424627e27225a8e2396eaa465236d4e7b24bb | [
"MIT"
] | 1 | 2020-08-17T17:09:05.000Z | 2020-08-17T17:09:05.000Z | tests/test_economy.py | Erogue-Lord/ancap-bot | cb2424627e27225a8e2396eaa465236d4e7b24bb | [
"MIT"
] | null | null | null | tests/test_economy.py | Erogue-Lord/ancap-bot | cb2424627e27225a8e2396eaa465236d4e7b24bb | [
"MIT"
] | null | null | null | import asyncio
from datetime import datetime
from decimal import Decimal
from tortoise import Tortoise
import pytest
@pytest.fixture(autouse=True)
| 32.808511 | 66 | 0.702335 | import asyncio
from datetime import datetime
from decimal import Decimal
from tortoise import Tortoise
import pytest
@pytest.fixture(autouse=True)
def event_loop(monkeypatch):
global ancap_bot
monkeypatch.delattr("dotenv.load_dotenv")
import ancap_bot.cogs.economy
loop = asyncio.get_event_loop()
... | 1,322 | 0 | 68 |
b8bdbd0987c85f503a5658663124311935d26509 | 414 | py | Python | ABC/abc051-abc100/abc076/b.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | ABC/abc051-abc100/abc076/b.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | ABC/abc051-abc100/abc076/b.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | '''input
10
10
76
4
3
10
'''
# -*- coding: utf-8 -*-
# AtCoder Beginner Contest
# Problem B
if __name__ == '__main__':
operation_count = int(input())
incremental_value = int(input())
candidates = list()
for i in range(operation_count + 1):
result = 2 ** i + (operation_cou... | 16.56 | 68 | 0.586957 | '''input
10
10
76
4
3
10
'''
# -*- coding: utf-8 -*-
# AtCoder Beginner Contest
# Problem B
if __name__ == '__main__':
operation_count = int(input())
incremental_value = int(input())
candidates = list()
for i in range(operation_count + 1):
result = 2 ** i + (operation_cou... | 0 | 0 | 0 |
318c4aa7d390df96ab796a0470c35e596cc5b013 | 807 | py | Python | tests/test_parse_bytes_function.py | SethMMorton/natsor | 45c042ee849710fb45df6c3a9f980cdc0d7524f4 | [
"MIT"
] | null | null | null | tests/test_parse_bytes_function.py | SethMMorton/natsor | 45c042ee849710fb45df6c3a9f980cdc0d7524f4 | [
"MIT"
] | null | null | null | tests/test_parse_bytes_function.py | SethMMorton/natsor | 45c042ee849710fb45df6c3a9f980cdc0d7524f4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""These test the utils.py functions."""
import pytest
from hypothesis import given
from hypothesis.strategies import binary
from natsort.ns_enum import NSType, ns
from natsort.utils import BytesTransformer, parse_bytes_factory
@pytest.mark.parametrize(
"alg, example_func",
[
... | 29.888889 | 64 | 0.677819 | # -*- coding: utf-8 -*-
"""These test the utils.py functions."""
import pytest
from hypothesis import given
from hypothesis.strategies import binary
from natsort.ns_enum import NSType, ns
from natsort.utils import BytesTransformer, parse_bytes_factory
@pytest.mark.parametrize(
"alg, example_func",
[
... | 210 | 0 | 22 |
952747f2c41b0d1614d5d77fab4a7fa08c5f3565 | 285 | py | Python | music/distance/aural/diatonic/seventh/minor.py | jedhsu/music | dea68c4a82296cd4910e786f533b2cbf861377c3 | [
"MIT"
] | null | null | null | music/distance/aural/diatonic/seventh/minor.py | jedhsu/music | dea68c4a82296cd4910e786f533b2cbf861377c3 | [
"MIT"
] | null | null | null | music/distance/aural/diatonic/seventh/minor.py | jedhsu/music | dea68c4a82296cd4910e786f533b2cbf861377c3 | [
"MIT"
] | null | null | null | """
*minor 7th*
The minor 7th diatonic interval.
"""
from dataclasses import dataclass
from fivear.musical.scale import Diatonic
from ...simple import SimpleInterval
__all__ = ["MinorSeventh"]
@dataclass
| 11.875 | 41 | 0.708772 | """
*minor 7th*
The minor 7th diatonic interval.
"""
from dataclasses import dataclass
from fivear.musical.scale import Diatonic
from ...simple import SimpleInterval
__all__ = ["MinorSeventh"]
@dataclass
class MinorSeventh(
SimpleInterval,
Diatonic,
):
pass
| 0 | 44 | 22 |
4c2ac7fef64884be4cb9a8c8930be3a4e673d4f8 | 198 | py | Python | applications/baseapp/management/template_structures/application/__init__.py | ajitjasrotia/django-project-skeleton | 70e3e06384dfb018f59b1af8c7c3febf2bbcd47c | [
"MIT"
] | 48 | 2018-01-10T11:21:35.000Z | 2021-09-08T23:28:07.000Z | applications/baseapp/management/template_structures/application/__init__.py | ajitjasrotia/django-project-skeleton | 70e3e06384dfb018f59b1af8c7c3febf2bbcd47c | [
"MIT"
] | 26 | 2018-04-20T10:46:00.000Z | 2019-09-21T06:47:13.000Z | applications/baseapp/management/template_structures/application/__init__.py | ajitjasrotia/django-project-skeleton | 70e3e06384dfb018f59b1af8c7c3febf2bbcd47c | [
"MIT"
] | 20 | 2019-03-09T19:46:10.000Z | 2022-03-27T14:57:03.000Z | # isort:skip_file
# flake8: noqa
from .html import TEMPLATE_HTML
from .apps import TEMPLATE_APPS
from .urls import TEMPLATE_URLS
from .views import TEMPLATE_VIEWS
from .tests import TEMPLATE_TESTS
| 22 | 33 | 0.823232 | # isort:skip_file
# flake8: noqa
from .html import TEMPLATE_HTML
from .apps import TEMPLATE_APPS
from .urls import TEMPLATE_URLS
from .views import TEMPLATE_VIEWS
from .tests import TEMPLATE_TESTS
| 0 | 0 | 0 |
a50d3e313cf746148e5555ff3d2afcdb2bab96ec | 227 | py | Python | Python/6kyu/replace_with_alphabet_position/solution.py | petergouvoussis/codewars_challenges | 8800b2fcb0283838a828857f70e3b46169b7b184 | [
"MIT"
] | null | null | null | Python/6kyu/replace_with_alphabet_position/solution.py | petergouvoussis/codewars_challenges | 8800b2fcb0283838a828857f70e3b46169b7b184 | [
"MIT"
] | null | null | null | Python/6kyu/replace_with_alphabet_position/solution.py | petergouvoussis/codewars_challenges | 8800b2fcb0283838a828857f70e3b46169b7b184 | [
"MIT"
] | null | null | null | import string
| 22.7 | 52 | 0.581498 | import string
def alphabet_position(text):
abc = '0' + string.ascii_lowercase
output = []
for i in text:
if i.isalpha():
output.append(str(abc.index(i.lower())))
return ' '.join(output)
| 191 | 0 | 22 |
112cacdef9b3bf1094e329eebb6d2a5c6fff3abe | 997 | py | Python | app/server/models.py | A-A-Tyurin/test_smart_design | 25073debe89801cc23d7acc466263076be691733 | [
"MIT"
] | null | null | null | app/server/models.py | A-A-Tyurin/test_smart_design | 25073debe89801cc23d7acc466263076be691733 | [
"MIT"
] | null | null | null | app/server/models.py | A-A-Tyurin/test_smart_design | 25073debe89801cc23d7acc466263076be691733 | [
"MIT"
] | null | null | null | from typing import Dict, Optional
from pydantic import BaseModel, validator
| 29.323529 | 73 | 0.602808 | from typing import Dict, Optional
from pydantic import BaseModel, validator
class Product(BaseModel):
name: str
description: str
params: Optional[Dict[str, str]]
class Config:
min_anystr_length = 1
max_anystr_length = 250
error_msg_templates = {
'value_error.any_s... | 432 | 464 | 23 |
807e583cbe68257d26ee0f4d40e74fb8a9d64b95 | 1,203 | py | Python | unity.py | forever7410852/esvn | a8c5db2c46bf1dbaa30bc62f3cd7458f826e97b3 | [
"Apache-2.0"
] | 1 | 2017-04-16T14:19:28.000Z | 2017-04-16T14:19:28.000Z | unity.py | forever7410852/esvn | a8c5db2c46bf1dbaa30bc62f3cd7458f826e97b3 | [
"Apache-2.0"
] | null | null | null | unity.py | forever7410852/esvn | a8c5db2c46bf1dbaa30bc62f3cd7458f826e97b3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# run in python 3.5 and after
import fire
import subprocess
import os
import re
import signal
import time
import sys
class unity(object):
"""An enhanced unity cli."""
if __name__ == '__main__':
fire.Fire(unity)
| 30.075 | 124 | 0.588529 | #!/usr/bin/env python3
# run in python 3.5 and after
import fire
import subprocess
import os
import re
import signal
import time
import sys
class unity(object):
"""An enhanced unity cli."""
def open(self):
result = subprocess.run(
["defaults", "read", "/Users/HSH/Library/Preferences/com.un... | 908 | 0 | 50 |
0aa7901321d61c9a8020d316629398976cd486f9 | 11,827 | py | Python | texar/modules/embedders/position_embedders.py | Holmeswww/Text_Infilling | f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3 | [
"Apache-2.0"
] | 25 | 2019-01-03T09:15:20.000Z | 2022-02-12T04:20:59.000Z | texar/modules/embedders/position_embedders.py | Holmeswww/Text_Infilling | f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3 | [
"Apache-2.0"
] | 4 | 2019-03-28T11:02:20.000Z | 2022-02-15T04:57:33.000Z | texar/modules/embedders/position_embedders.py | Holmeswww/Text_Infilling | f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3 | [
"Apache-2.0"
] | 9 | 2019-01-03T02:20:37.000Z | 2022-02-12T04:20:50.000Z | #
"""
Various position embedders.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import tensorflow as tf
from texar.modules.embedders.embedder_base import EmbedderBase
from texar.modules.embedders import embedder_utils
from texar.utils.mo... | 39.033003 | 87 | 0.603196 | #
"""
Various position embedders.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import tensorflow as tf
from texar.modules.embedders.embedder_base import EmbedderBase
from texar.modules.embedders import embedder_utils
from texar.utils.mo... | 1,714 | 1,721 | 103 |
94f957f34ddd100883c7635dde7686fb84a58a99 | 4,691 | py | Python | rules-conv.py | beorn7/promhacks | 042fdd4e7d50589e7957220684d5f29864d95e03 | [
"MIT"
] | 4 | 2018-12-13T14:16:44.000Z | 2019-01-04T11:13:47.000Z | rules-conv.py | beorn7/promhacks | 042fdd4e7d50589e7957220684d5f29864d95e03 | [
"MIT"
] | null | null | null | rules-conv.py | beorn7/promhacks | 042fdd4e7d50589e7957220684d5f29864d95e03 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# Converts Prom1.x rule format into Prom2.x while keeping formatting
# and comments. This does not work in general. Some valid Prom1 rules
# files might not get converted properly.
import glob
import re
for rules_file in glob.iglob('*.rules'):
name = re.match(r'(.*)\.rules', rules_file)[1]
... | 36.084615 | 87 | 0.448305 | #!/usr/bin/python3
# Converts Prom1.x rule format into Prom2.x while keeping formatting
# and comments. This does not work in general. Some valid Prom1 rules
# files might not get converted properly.
import glob
import re
def convert(rules, yaml):
indent = 2
in_alert = False
in_record = False
in_expr... | 4,116 | 0 | 23 |
2d626d671dcd6abe298bfd3da9ff2103e85d3d2d | 4,182 | py | Python | pyt.py | ojhavijay/VIJAY-KUMAR-OJHA | d89224326cf89ac65da6b18aed71bbbb25c839d0 | [
"Unlicense"
] | null | null | null | pyt.py | ojhavijay/VIJAY-KUMAR-OJHA | d89224326cf89ac65da6b18aed71bbbb25c839d0 | [
"Unlicense"
] | null | null | null | pyt.py | ojhavijay/VIJAY-KUMAR-OJHA | d89224326cf89ac65da6b18aed71bbbb25c839d0 | [
"Unlicense"
] | null | null | null | from tkinter import*
from tkinter import ttk
#===================FUNCTION DECLARATION==============================================================================
if __name__ == '__main__':
root=Tk()
obj=C... | 34 | 365 | 0.549976 | from tkinter import*
from tkinter import ttk
class ChatBot:
def __init__(self,root):
self.root=root
self.root.title("UniBot")
self.root.geometry("730x620+0+0")
self.root.bind('<Return>',self.enter_func)
main_frame=Frame(self.root,bd=5,bg='orange',width=615)
... | 3,673 | -7 | 155 |
ec052e40881fff0e487807290780c7199d0dba38 | 33,017 | py | Python | tests/test_swiftclient.py | citrix-openstack-build/python-swiftclient | 68dde8dd514e4eef89aafa6c1c93e065045c3cbd | [
"Apache-2.0"
] | null | null | null | tests/test_swiftclient.py | citrix-openstack-build/python-swiftclient | 68dde8dd514e4eef89aafa6c1c93e065045c3cbd | [
"Apache-2.0"
] | null | null | null | tests/test_swiftclient.py | citrix-openstack-build/python-swiftclient | 68dde8dd514e4eef89aafa6c1c93e065045c3cbd | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2012 OpenStack, 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 ... | 37.181306 | 79 | 0.572856 | # Copyright (c) 2010-2012 OpenStack, 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 ... | 29,259 | 299 | 2,380 |
fbf53043effec4b990be99acf5f0238e010187d1 | 1,377 | py | Python | save_neutral_pose.py | johndpope/FacialRetargeting | 5fb0c1da6af6c3d59aef264f567bfa7a244d0764 | [
"MIT"
] | null | null | null | save_neutral_pose.py | johndpope/FacialRetargeting | 5fb0c1da6af6c3d59aef264f567bfa7a244d0764 | [
"MIT"
] | null | null | null | save_neutral_pose.py | johndpope/FacialRetargeting | 5fb0c1da6af6c3d59aef264f567bfa7a244d0764 | [
"MIT"
] | null | null | null | import numpy as np
import os
from utils.load_data import load_c3d_file
# declare variables
path = 'D:/MoCap_Data/David/NewSession_labeled/'
file = 'NeutralTrail14.c3d'
save_folder = 'data/'
save_name = 'David_neutral_pose'
neutral_frame = 900
template_labels = ['LeftBrow1', 'LeftBrow2', 'LeftBrow3', 'LeftBrow4', 'Righ... | 45.9 | 117 | 0.627451 | import numpy as np
import os
from utils.load_data import load_c3d_file
# declare variables
path = 'D:/MoCap_Data/David/NewSession_labeled/'
file = 'NeutralTrail14.c3d'
save_folder = 'data/'
save_name = 'David_neutral_pose'
neutral_frame = 900
template_labels = ['LeftBrow1', 'LeftBrow2', 'LeftBrow3', 'LeftBrow4', 'Righ... | 0 | 0 | 0 |
9ccbe38ce3cdfc09fc680af159046a22595d593a | 1,122 | py | Python | test/unit/SenseHATDisplay/run.py | rsm31/apama_GPIO | 06da24c5ede5bd036514aa214d8a5e914e0b988e | [
"Apache-2.0"
] | 2 | 2017-12-29T20:36:35.000Z | 2018-02-07T10:31:32.000Z | test/unit/SenseHATDisplay/run.py | rsm31/apama_GPIO | 06da24c5ede5bd036514aa214d8a5e914e0b988e | [
"Apache-2.0"
] | 1 | 2018-03-16T11:40:58.000Z | 2019-03-20T12:18:05.000Z | test/unit/SenseHATDisplay/run.py | rsm31/apama_GPIO | 06da24c5ede5bd036514aa214d8a5e914e0b988e | [
"Apache-2.0"
] | 2 | 2017-12-29T21:22:59.000Z | 2021-12-16T11:53:33.000Z | from senseHAT.BaseTest import SenseHATBaseTest
from random import randint
| 26.714286 | 64 | 0.637255 | from senseHAT.BaseTest import SenseHATBaseTest
from random import randint
class PySysTest(SenseHATBaseTest):
def execute(self):
self.clearPixels()
self.start()
self.correlator.injectMonitorscript(filenames=['display.mon'])
verifyArray = []
setterList = 'SetterList(['
for x in range(0, 7):
for y in ran... | 965 | 13 | 70 |
54db8109199fa0eec2d705d8f92645b132535acb | 1,173 | py | Python | tests/unit/test_config.py | outcastofmusic/jikken | 3d3a67b699c92790b48b84492e98662068e49374 | [
"MIT"
] | 5 | 2017-12-05T17:39:28.000Z | 2021-01-18T19:05:30.000Z | tests/unit/test_config.py | outcastofmusic/jikken | 3d3a67b699c92790b48b84492e98662068e49374 | [
"MIT"
] | 1 | 2021-03-25T21:45:41.000Z | 2021-03-25T21:45:41.000Z | tests/unit/test_config.py | outcastofmusic/jikken | 3d3a67b699c92790b48b84492e98662068e49374 | [
"MIT"
] | null | null | null | import pytest
import os
from jikken.database.config import get_config, write_default_config, JikkenConfig, read_config
@pytest.fixture()
| 30.076923 | 130 | 0.71185 | import pytest
import os
from jikken.database.config import get_config, write_default_config, JikkenConfig, read_config
@pytest.fixture()
def home_dir(tmpdir, monkeypatch):
home_dir = tmpdir.mkdir('home')
monkeypatch.setenv('HOME', str(home_dir))
return home_dir
def test_default_config_created(home_dir):... | 940 | 0 | 91 |
727fed69bd7418960e671b30d7bed67924a69d3f | 825 | py | Python | schedule/migrations/0024_auto_20141116_1234.py | yourcelf/masterschedule | e585df0e9edcaff5fa4f04f77a9452e3073b5db7 | [
"Unlicense"
] | 1 | 2015-02-11T04:08:36.000Z | 2015-02-11T04:08:36.000Z | schedule/migrations/0024_auto_20141116_1234.py | yourcelf/masterschedule | e585df0e9edcaff5fa4f04f77a9452e3073b5db7 | [
"Unlicense"
] | null | null | null | schedule/migrations/0024_auto_20141116_1234.py | yourcelf/masterschedule | e585df0e9edcaff5fa4f04f77a9452e3073b5db7 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
| 27.5 | 79 | 0.603636 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('schedule', '0023_conference_venue_random_slugs'),
]
operations = [
migrations.AlterField(
model_name='conference... | 0 | 695 | 23 |
1081def19677c92dd923288beb9c5df34d939976 | 928 | py | Python | corehq/motech/dhis2/management/commands/populate_sql_dhis2_connection.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 1 | 2020-07-14T13:00:23.000Z | 2020-07-14T13:00:23.000Z | corehq/motech/dhis2/management/commands/populate_sql_dhis2_connection.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 94 | 2020-12-11T06:57:31.000Z | 2022-03-15T10:24:06.000Z | corehq/motech/dhis2/management/commands/populate_sql_dhis2_connection.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | null | null | null | from corehq.apps.cleanup.management.commands.populate_sql_model_from_couch_model import PopulateSQLCommand
| 32 | 106 | 0.648707 | from corehq.apps.cleanup.management.commands.populate_sql_model_from_couch_model import PopulateSQLCommand
class Command(PopulateSQLCommand):
@classmethod
def couch_doc_type(cls):
return 'Dhis2Connection'
@classmethod
def sql_class(cls):
from corehq.motech.dhis2.models import Dhis2Con... | 626 | 171 | 23 |
d9969e3c638019ce1c670f7295db31d83f5b7653 | 100 | py | Python | OpenGLCffi/GL/EXT/GREMEDY/frame_terminator.py | cydenix/OpenGLCffi | c78f51ae5e6b655eb2ea98f072771cf69e2197f3 | [
"MIT"
] | null | null | null | OpenGLCffi/GL/EXT/GREMEDY/frame_terminator.py | cydenix/OpenGLCffi | c78f51ae5e6b655eb2ea98f072771cf69e2197f3 | [
"MIT"
] | null | null | null | OpenGLCffi/GL/EXT/GREMEDY/frame_terminator.py | cydenix/OpenGLCffi | c78f51ae5e6b655eb2ea98f072771cf69e2197f3 | [
"MIT"
] | null | null | null | from OpenGLCffi.GL import params
@params(api='gl', prms=[])
| 14.285714 | 32 | 0.74 | from OpenGLCffi.GL import params
@params(api='gl', prms=[])
def glFrameTerminatorGREMEDY():
pass
| 16 | 0 | 22 |
70270b2fa3b99e488be39abb00d56b72ca2b5297 | 3,039 | py | Python | dataviz/flagstriband.py | Udzu/pudzu | 5a0302830b052fc54feba891eb7bf634957a9d90 | [
"MIT"
] | 119 | 2017-07-22T15:02:30.000Z | 2021-08-02T10:42:59.000Z | dataviz/flagstriband.py | Udzu/pudzu | 5a0302830b052fc54feba891eb7bf634957a9d90 | [
"MIT"
] | null | null | null | dataviz/flagstriband.py | Udzu/pudzu | 5a0302830b052fc54feba891eb7bf634957a9d90 | [
"MIT"
] | 28 | 2017-08-04T14:28:41.000Z | 2019-11-27T23:46:14.000Z | from pudzu.charts import *
df = pd.read_csv("datasets/flagstriband.csv")
df = pd.concat([pd.DataFrame(df.colours.apply(list).tolist(), columns=list("TMB")), df], axis=1).set_index("colours")
FONT, SIZE = calibri, 24
fg, bg = "black", "#EEEEEE"
default_img = "https://s-media-cache-ak0.pinimg.com/736x/0d/36/e7/0d36e7a4... | 55.254545 | 173 | 0.659756 | from pudzu.charts import *
df = pd.read_csv("datasets/flagstriband.csv")
df = pd.concat([pd.DataFrame(df.colours.apply(list).tolist(), columns=list("TMB")), df], axis=1).set_index("colours")
FONT, SIZE = calibri, 24
fg, bg = "black", "#EEEEEE"
default_img = "https://s-media-cache-ak0.pinimg.com/736x/0d/36/e7/0d36e7a4... | 1,730 | 0 | 73 |
a1e0965849d574fe42bfa2715312122b0a5be353 | 1,156 | py | Python | nightcappackages/nightcappackages/classes/helpers/tmp_files.py | abaker2010/NightCAP | c58365a0e2ff1896ce0f8fbf2977b3e83feee1e2 | [
"MIT"
] | 2 | 2022-02-11T17:47:38.000Z | 2022-02-11T21:13:36.000Z | nightcappackages/nightcappackages/classes/helpers/tmp_files.py | abaker2010/NightCAP | c58365a0e2ff1896ce0f8fbf2977b3e83feee1e2 | [
"MIT"
] | null | null | null | nightcappackages/nightcappackages/classes/helpers/tmp_files.py | abaker2010/NightCAP | c58365a0e2ff1896ce0f8fbf2977b3e83feee1e2 | [
"MIT"
] | null | null | null | # Copyright 2020 by Aaron Baker.
# All rights reserved.
# This file is part of the Nightcap Project,
# and is released under the "MIT License Agreement". Please see the LICENSE
# file that should have been included as part of this package.
# region Imports
import tempfile
import shutil
from nightcapcore import Printer
... | 27.52381 | 75 | 0.649654 | # Copyright 2020 by Aaron Baker.
# All rights reserved.
# This file is part of the Nightcap Project,
# and is released under the "MIT License Agreement". Please see the LICENSE
# file that should have been included as part of this package.
# region Imports
import tempfile
import shutil
from nightcapcore import Printer
... | 595 | 15 | 184 |
89bbc81542526f853c976415f525c8b7b73f6e69 | 8,515 | py | Python | Client/FTP-Client.py | Junaid-D/FTP-py | 2b9ff7abb5e390fc91be370889a43eec9c2eb08c | [
"MIT"
] | null | null | null | Client/FTP-Client.py | Junaid-D/FTP-py | 2b9ff7abb5e390fc91be370889a43eec9c2eb08c | [
"MIT"
] | null | null | null | Client/FTP-Client.py | Junaid-D/FTP-py | 2b9ff7abb5e390fc91be370889a43eec9c2eb08c | [
"MIT"
] | null | null | null | import socket
from tkinter import *
ServerIP='127.0.0.1'
port = 4500
thisClient=FTPClient()
thisClient.run() | 32.011278 | 90 | 0.535878 | import socket
from tkinter import *
ServerIP='127.0.0.1'
port = 4500
class FTPClient():
def __init__(self):
self.conSoc=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
self.loggedIn=False
self.open=True
self.dataSoc=None
self.passiveIP=None
self.passivePort=None
... | 7,976 | -3 | 403 |
6a44978c2724514cf08af55c609ff36d4c533ac1 | 4,057 | py | Python | extensions/python/src/main/resources/jet_to_python_pb2.py | software-is-art/hazelcast | 7f785606f1093aa6f420147ca46dd0befe11c4b8 | [
"ECL-2.0",
"Apache-2.0"
] | 4,283 | 2015-01-02T03:56:10.000Z | 2022-03-29T23:07:45.000Z | extensions/python/src/main/resources/jet_to_python_pb2.py | software-is-art/hazelcast | 7f785606f1093aa6f420147ca46dd0befe11c4b8 | [
"ECL-2.0",
"Apache-2.0"
] | 14,014 | 2015-01-01T04:29:38.000Z | 2022-03-31T21:47:55.000Z | extensions/python/src/main/resources/jet_to_python_pb2.py | software-is-art/hazelcast | 7f785606f1093aa6f420147ca46dd0befe11c4b8 | [
"ECL-2.0",
"Apache-2.0"
] | 1,608 | 2015-01-04T09:57:08.000Z | 2022-03-31T12:05:26.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: jet-to-python.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protob... | 30.051852 | 407 | 0.761647 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: jet-to-python.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protob... | 0 | 0 | 0 |
cabd551c543209c2d843f34d3e05a150bfc258e9 | 159 | py | Python | setup.py | plang85/hackathon2017-11 | 717d93cbf6c0d0e71e6a2f427b2e22760eeebf5c | [
"Unlicense"
] | null | null | null | setup.py | plang85/hackathon2017-11 | 717d93cbf6c0d0e71e6a2f427b2e22760eeebf5c | [
"Unlicense"
] | null | null | null | setup.py | plang85/hackathon2017-11 | 717d93cbf6c0d0e71e6a2f427b2e22760eeebf5c | [
"Unlicense"
] | null | null | null | from setuptools import setup
setup(name='hackathon',
install_requires=['pandas'],
extras_require={'test': ['pytest'],},
packages=['hackathon'])
| 19.875 | 43 | 0.666667 | from setuptools import setup
setup(name='hackathon',
install_requires=['pandas'],
extras_require={'test': ['pytest'],},
packages=['hackathon'])
| 0 | 0 | 0 |
fcf128319027f0a57916c9329dcf3057b808a2af | 2,033 | py | Python | rectround.py | pgalatic/zeitgeist | 9c74ead7fd3870f3f6d9fbafd96946ce131c8bd8 | [
"MIT"
] | null | null | null | rectround.py | pgalatic/zeitgeist | 9c74ead7fd3870f3f6d9fbafd96946ce131c8bd8 | [
"MIT"
] | null | null | null | rectround.py | pgalatic/zeitgeist | 9c74ead7fd3870f3f6d9fbafd96946ce131c8bd8 | [
"MIT"
] | null | null | null | #
# author: Paul Galatic
#
# This program is JUST for drawing a rounded rectangle.
#
import pdb
from PIL import Image, ImageDraw
from extern import *
def sub_rectangle(draw, xy, corner_radius=25, fill=(255, 255, 255)):
'''
Source: https://stackoverflow.com/questions/7787375/python-imaging-library-pil-drawin... | 29.897059 | 151 | 0.616331 | #
# author: Paul Galatic
#
# This program is JUST for drawing a rounded rectangle.
#
import pdb
from PIL import Image, ImageDraw
from extern import *
def sub_rectangle(draw, xy, corner_radius=25, fill=(255, 255, 255)):
'''
Source: https://stackoverflow.com/questions/7787375/python-imaging-library-pil-drawin... | 409 | 0 | 23 |
86a6dbe707d06b0e60c73117110adb209c2be7ac | 7,823 | py | Python | data/myutils.py | vkazei/deeplogs | 4f6f853ce608a59e9d4b1a3160eb6b0035f333c0 | [
"MIT"
] | 25 | 2019-07-17T10:25:22.000Z | 2022-03-30T15:37:59.000Z | data/myutils.py | vkazei/deeplogs | 4f6f853ce608a59e9d4b1a3160eb6b0035f333c0 | [
"MIT"
] | null | null | null | data/myutils.py | vkazei/deeplogs | 4f6f853ce608a59e9d4b1a3160eb6b0035f333c0 | [
"MIT"
] | 16 | 2019-07-17T08:44:09.000Z | 2022-03-08T06:32:28.000Z | #%%
# utilities
import subprocess
import os
import matplotlib
import matplotlib.pyplot as plt
import time
import numpy as np
from numpy import linalg
import m8r as sf
from scipy.ndimage.filters import gaussian_filter
from scipy.ndimage.interpolation import map_coordinates
from tensorflow.python.ops.image_ops_impl impor... | 33.865801 | 122 | 0.613959 | #%%
# utilities
import subprocess
import os
import matplotlib
import matplotlib.pyplot as plt
import time
import numpy as np
from numpy import linalg
import m8r as sf
from scipy.ndimage.filters import gaussian_filter
from scipy.ndimage.interpolation import map_coordinates
from tensorflow.python.ops.image_ops_impl impor... | 1,722 | 0 | 241 |
157703ab428c8c027e5a117c3b1641d7f72605b0 | 2,024 | py | Python | analog/tests/test_main.py | sitedata/analog | 29d3d5f41e7a4479d99296032b278f526f0c748d | [
"MIT"
] | 11 | 2015-02-27T16:04:50.000Z | 2021-08-27T23:51:11.000Z | analog/tests/test_main.py | fabianbuechler/analog | 4ee7a045717d7e2051ebe92d06cee89701291bff | [
"MIT"
] | 1 | 2020-12-29T16:10:55.000Z | 2021-01-01T17:37:25.000Z | analog/tests/test_main.py | sitedata/analog | 29d3d5f41e7a4479d99296032b278f526f0c748d | [
"MIT"
] | 2 | 2016-05-22T02:54:32.000Z | 2020-06-09T21:38:38.000Z | """Test the analog.main module and CLI."""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
try:
from unittest import mock
except ImportError:
import mock
import pytest
import analog
@pytest.fixture
def tmp_logfile(tmpdir):
"""Fixture creating ... | 29.333333 | 73 | 0.617589 | """Test the analog.main module and CLI."""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
try:
from unittest import mock
except ImportError:
import mock
import pytest
import analog
@pytest.fixture
def tmp_logfile(tmpdir):
"""Fixture creating ... | 0 | 0 | 0 |
a8ee691e6c4c3958a199f2a0524a8fb707e64970 | 9,917 | py | Python | src/util/util.py | JARVIS-AI/The-Witcher-3-Mod-manager-1 | fdc4763e29bc3cef6f7b4df51a1c4e286da0fe06 | [
"BSD-2-Clause"
] | null | null | null | src/util/util.py | JARVIS-AI/The-Witcher-3-Mod-manager-1 | fdc4763e29bc3cef6f7b4df51a1c4e286da0fe06 | [
"BSD-2-Clause"
] | null | null | null | src/util/util.py | JARVIS-AI/The-Witcher-3-Mod-manager-1 | fdc4763e29bc3cef6f7b4df51a1c4e286da0fe06 | [
"BSD-2-Clause"
] | null | null | null | '''Global Helpers'''
# pylint: disable=invalid-name,superfluous-parens,missing-docstring,wildcard-import,unused-wildcard-import
from sys import platform
import os
import sys
import re
import traceback
import webbrowser
import subprocess
from shutil import copytree, rmtree
from platform import python_version
from confi... | 31.48254 | 106 | 0.609761 | '''Global Helpers'''
# pylint: disable=invalid-name,superfluous-parens,missing-docstring,wildcard-import,unused-wildcard-import
from sys import platform
import os
import sys
import re
import traceback
import webbrowser
import subprocess
from shutil import copytree, rmtree
from platform import python_version
from confi... | 5,965 | 0 | 421 |
eb3202558a1754995d72168519173bed7895d23a | 421 | py | Python | beagle/nodes/__init__.py | limkokhian/beagle | 791e83db94e5a8ab1965b155bb79d32bb259d2b3 | [
"MIT"
] | 1,139 | 2019-03-24T09:09:05.000Z | 2022-03-27T14:54:38.000Z | beagle/nodes/__init__.py | limkokhian/beagle | 791e83db94e5a8ab1965b155bb79d32bb259d2b3 | [
"MIT"
] | 78 | 2019-03-24T16:56:06.000Z | 2022-02-27T21:31:38.000Z | beagle/nodes/__init__.py | limkokhian/beagle | 791e83db94e5a8ab1965b155bb79d32bb259d2b3 | [
"MIT"
] | 149 | 2019-03-24T16:44:45.000Z | 2022-03-11T12:20:51.000Z | from __future__ import absolute_import
from .alert import Alert
from .domain import URI, Domain
from .file import File, FileOf
from .ip_address import IPAddress
from .node import Node
from .process import Process, SysMonProc
from .registry import RegistryKey
__all__ = [
"Node",
"URI",
"Domain",
"File... | 17.541667 | 40 | 0.679335 | from __future__ import absolute_import
from .alert import Alert
from .domain import URI, Domain
from .file import File, FileOf
from .ip_address import IPAddress
from .node import Node
from .process import Process, SysMonProc
from .registry import RegistryKey
__all__ = [
"Node",
"URI",
"Domain",
"File... | 0 | 0 | 0 |
6239dc1e86fe07389cf63df6392bc8d72a0e1825 | 111 | py | Python | hmt/build/update_mode.py | dfioravanti/hmt | df79404076ec7acea0cfb12b636d58e3ffc83bc5 | [
"MIT"
] | 25 | 2020-05-14T13:25:42.000Z | 2021-11-09T10:09:27.000Z | hmt/build/update_mode.py | dfioravanti/hmt | df79404076ec7acea0cfb12b636d58e3ffc83bc5 | [
"MIT"
] | 19 | 2020-05-05T19:47:41.000Z | 2021-02-05T17:06:53.000Z | hmt/build/update_mode.py | dfioravanti/hmt | df79404076ec7acea0cfb12b636d58e3ffc83bc5 | [
"MIT"
] | 6 | 2020-05-16T10:02:48.000Z | 2021-10-04T08:03:49.000Z | import enum
__all__ = ["UpdateMode"]
| 10.090909 | 28 | 0.603604 | import enum
class UpdateMode(enum.Enum):
GEN = 0
REPLAY = 1
MIXED = 2
__all__ = ["UpdateMode"]
| 0 | 48 | 23 |
23e6a1ec99527cce378215a514ba7467ba480ba4 | 720 | py | Python | py_convert/convertOfficeOsage.py | sven-oly/LanguageTools | 8c1e0bbae274232064e9796aa401c906797af452 | [
"Apache-2.0"
] | 3 | 2021-02-02T12:11:27.000Z | 2021-12-28T03:58:05.000Z | py_convert/convertOfficeOsage.py | sven-oly/LanguageTools | 8c1e0bbae274232064e9796aa401c906797af452 | [
"Apache-2.0"
] | 7 | 2020-12-11T00:44:52.000Z | 2022-03-01T18:00:00.000Z | py_convert/convertOfficeOsage.py | sven-oly/LanguageTools | 8c1e0bbae274232064e9796aa401c906797af452 | [
"Apache-2.0"
] | 3 | 2019-06-08T17:46:47.000Z | 2021-09-16T02:03:56.000Z | # -*- coding: utf-8 -*-
#
# Convert list of Office files (.docx, .xslx, .pptx) files from
# old text encoding to Unicode.
import os
import re
import sys
import convertOffice
import osageConversion
import convertUtil
if __name__ == "__main__":
main(sys.argv)
| 20 | 69 | 0.661111 | # -*- coding: utf-8 -*-
#
# Convert list of Office files (.docx, .xslx, .pptx) files from
# old text encoding to Unicode.
import os
import re
import sys
import convertOffice
import osageConversion
import convertUtil
def main(argv):
args = convertUtil.parseArgs()
newUnicodeFont = "NotoSans-Regular"
print '*... | 431 | 0 | 23 |
963d158b9ada3a6c66832e3fa7f7b6169041484c | 822 | py | Python | Cankaoxiaoxi/article_spider.py | StevenChaoo/WebCrawler | 74711ac15b934b2e5a0eb663a0a2b6dd35050428 | [
"MIT"
] | 1 | 2021-04-20T13:22:17.000Z | 2021-04-20T13:22:17.000Z | Cankaoxiaoxi/article_spider.py | StevenChaoo/WebCrawler | 74711ac15b934b2e5a0eb663a0a2b6dd35050428 | [
"MIT"
] | null | null | null | Cankaoxiaoxi/article_spider.py | StevenChaoo/WebCrawler | 74711ac15b934b2e5a0eb663a0a2b6dd35050428 | [
"MIT"
] | null | null | null | #-*- coding:utf-8 -*-
import time
from bs4 import BeautifulSoup
from user_agents import agents
import requests
import random
import re
def get_article(url):
'''
:param url: 指定日期的链接
:return content: 指定url的正文内容
'''
agent = random.choice(agents)
header = {'User-Agent': agent}
res = requests.g... | 28.344828 | 56 | 0.618005 | #-*- coding:utf-8 -*-
import time
from bs4 import BeautifulSoup
from user_agents import agents
import requests
import random
import re
def get_article(url):
'''
:param url: 指定日期的链接
:return content: 指定url的正文内容
'''
agent = random.choice(agents)
header = {'User-Agent': agent}
res = requests.g... | 0 | 0 | 0 |
985b36fc0c9644840ca80d083631e6ddadc4631c | 331 | py | Python | aplicacion/migrations/0009_remove_producto_ruta.py | jffc-dev/Python-Django-Tecshop | c26ab6da20eca0483b900d253eacc37d2e8b1f26 | [
"MIT"
] | null | null | null | aplicacion/migrations/0009_remove_producto_ruta.py | jffc-dev/Python-Django-Tecshop | c26ab6da20eca0483b900d253eacc37d2e8b1f26 | [
"MIT"
] | null | null | null | aplicacion/migrations/0009_remove_producto_ruta.py | jffc-dev/Python-Django-Tecshop | c26ab6da20eca0483b900d253eacc37d2e8b1f26 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-01-13 17:40
from django.db import migrations
| 18.388889 | 50 | 0.595166 | # Generated by Django 3.1.4 on 2021-01-13 17:40
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('aplicacion', '0008_auto_20210113_1701'),
]
operations = [
migrations.RemoveField(
model_name='producto',
name='ruta',
... | 0 | 225 | 23 |
bf9b5afa26e7111b3c8082256ea21298de72cc49 | 679 | py | Python | houdini/scripts/123.py | sashaouellet/SDMTools | edb529398b07a577a5492887fe840c6cfd891551 | [
"MIT"
] | 7 | 2017-11-27T20:51:11.000Z | 2020-07-18T22:51:46.000Z | houdini/scripts/123.py | tws0002/SDMTools | edb529398b07a577a5492887fe840c6cfd891551 | [
"MIT"
] | 7 | 2017-12-03T21:25:19.000Z | 2018-02-12T08:03:29.000Z | houdini/scripts/123.py | tws0002/SDMTools | edb529398b07a577a5492887fe840c6cfd891551 | [
"MIT"
] | 3 | 2018-04-27T02:45:28.000Z | 2020-02-15T14:12:45.000Z | import os, json
import hdefereval
import sdm.houdini
from sdm.houdini.dialog import checkForUpdates
from sdm.houdini.shelves import addShelf
from sdm.houdini.node import applyDefaultShapesAndColors
hdefereval.executeDeferred(checkUpdates)
hdefereval.executeDeferred(addShelf)
hdefereval.executeDeferred(applyDefaultSha... | 26.115385 | 66 | 0.799705 | import os, json
import hdefereval
import sdm.houdini
from sdm.houdini.dialog import checkForUpdates
from sdm.houdini.shelves import addShelf
from sdm.houdini.node import applyDefaultShapesAndColors
def checkUpdates():
settingsPath = os.path.join(sdm.houdini.folder, 'settings.json')
if os.path.exists(settingsPath):... | 322 | 0 | 23 |
1412e20f7e6942a0802707fbdf32833a07c7b7bc | 477 | py | Python | main/main.py | WonderSeven/DSDA | 88266ea5dd53d918ba3cd74c7d6bbf431a134e95 | [
"MIT"
] | 29 | 2020-04-15T09:24:56.000Z | 2021-09-18T04:04:55.000Z | main/main.py | WonderSeven/DSDA | 88266ea5dd53d918ba3cd74c7d6bbf431a134e95 | [
"MIT"
] | null | null | null | main/main.py | WonderSeven/DSDA | 88266ea5dd53d918ba3cd74c7d6bbf431a134e95 | [
"MIT"
] | 5 | 2020-04-14T05:49:16.000Z | 2021-05-16T05:04:12.000Z | '''
@ Author: Tiexin
@ email: tiexinqin@163.com
@Data: 2019-8-14
'''
from engine.configs.parser import BaseOptions
# import engine.fsl_trainer as trainer
import engine.ssl_trainer as trainer
import sys
sys.dont_write_bytecode = True
try:
from itertools import izip as zip
except ImportError: # will be 3.x series... | 17.666667 | 45 | 0.719078 | '''
@ Author: Tiexin
@ email: tiexinqin@163.com
@Data: 2019-8-14
'''
from engine.configs.parser import BaseOptions
# import engine.fsl_trainer as trainer
import engine.ssl_trainer as trainer
import sys
sys.dont_write_bytecode = True
try:
from itertools import izip as zip
except ImportError: # will be 3.x series... | 0 | 0 | 0 |
86ccc60f32ffaaf7bbedc36cb5aaff8ddc66686a | 284 | py | Python | q057.py | sjf/project_euler | 8514710e2018136ba8a087ae58cba35370700f6f | [
"MIT"
] | null | null | null | q057.py | sjf/project_euler | 8514710e2018136ba8a087ae58cba35370700f6f | [
"MIT"
] | null | null | null | q057.py | sjf/project_euler | 8514710e2018136ba8a087ae58cba35370700f6f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import lib
n=1
d=1
i=0
N=1000
count = 0
while i < N+1:
#print(i,str(n)+'/'+str(d),n/d)
if (lib.num_digits(n) >lib.num_digits(d)):
count += 1
#term' = 1 + 1/(1+term)
n+= d #1 + term
n,d=d,n #1/(1+term)
n+= d #1+1/(1+term)
i+=1
print(count)
| 14.2 | 44 | 0.53169 | #!/usr/bin/env python3
import lib
n=1
d=1
i=0
N=1000
count = 0
while i < N+1:
#print(i,str(n)+'/'+str(d),n/d)
if (lib.num_digits(n) >lib.num_digits(d)):
count += 1
#term' = 1 + 1/(1+term)
n+= d #1 + term
n,d=d,n #1/(1+term)
n+= d #1+1/(1+term)
i+=1
print(count)
| 0 | 0 | 0 |
e9e9d7ae49fb0318befe83eb1b65309eb9166fad | 7,052 | py | Python | Final.py | art-hack/Udemy_Coupon_Scraper | 19e5c1f3b1580524d7eef1d14fc0dfeb34a6bcb5 | [
"MIT"
] | 4 | 2019-03-04T21:32:06.000Z | 2020-05-23T16:43:55.000Z | Final.py | art-hack/Udemy_Coupon_Scraper | 19e5c1f3b1580524d7eef1d14fc0dfeb34a6bcb5 | [
"MIT"
] | 1 | 2019-03-04T21:34:52.000Z | 2019-04-19T14:58:45.000Z | Final.py | art-hack/Udemy_Coupon_Scraper | 19e5c1f3b1580524d7eef1d14fc0dfeb34a6bcb5 | [
"MIT"
] | 2 | 2019-04-20T10:39:34.000Z | 2020-11-24T19:45:32.000Z | import csv
from bs4 import BeautifulSoup
import requests
# function to scrape smartybro
# Code to scrape Anycouponcode.com
# function to scrape BuzzUdemy.com
# function to scrape Comidoc.com
# function to scrape coupontry.com
# function to scrape udemycoupon.learnviral
# function to scrape Udemycoupon.clu... | 32.953271 | 115 | 0.595576 | import csv
from bs4 import BeautifulSoup
import requests
# function to scrape smartybro
def smartybro(string):
page_response = requests.get(string, timeout=15)
if page_response.status_code == 200:
page_content = BeautifulSoup(page_response.content, "html.parser")
header = page_content.find_all... | 6,302 | 0 | 176 |
8869c65f358751230b27f2c8d14edbe6dee9aa3f | 780 | py | Python | app/hid/write.py | liuliu/tinypilot | af57e88303c4b9c8fbec0ff0102891829bbd98f1 | [
"MIT"
] | null | null | null | app/hid/write.py | liuliu/tinypilot | af57e88303c4b9c8fbec0ff0102891829bbd98f1 | [
"MIT"
] | null | null | null | app/hid/write.py | liuliu/tinypilot | af57e88303c4b9c8fbec0ff0102891829bbd98f1 | [
"MIT"
] | null | null | null | import threading
| 28.888889 | 79 | 0.683333 | import threading
class Error(Exception):
pass
class WriteError(Error):
pass
def _write_to_hid_interface_immediately(hid_path, buffer):
with open(hid_path, 'wb+') as hid_handle:
hid_handle.write(bytearray(buffer))
def write_to_hid_interface(hid_path, buffer):
# Writes can time out, so att... | 645 | 23 | 92 |
2e2ca5beb340b335f03d2f5021040e4b210ee236 | 1,068 | py | Python | radar_class/network.py | dishierweidu/LCR_1.0_Reappear | 329d4c80291c58d05fe3d6dab6dd09f41967ad08 | [
"MIT"
] | null | null | null | radar_class/network.py | dishierweidu/LCR_1.0_Reappear | 329d4c80291c58d05fe3d6dab6dd09f41967ad08 | [
"MIT"
] | null | null | null | radar_class/network.py | dishierweidu/LCR_1.0_Reappear | 329d4c80291c58d05fe3d6dab6dd09f41967ad08 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
default network class
给神经网络类的接口格式定义,神经网络具体需要自行添加
'''
import pickle as pkl
| 28.864865 | 131 | 0.650749 | # -*- coding: utf-8 -*-
'''
default network class
给神经网络类的接口格式定义,神经网络具体需要自行添加
'''
import pickle as pkl
class Predictor(object):
def __init__(self,weights = ""):
'''
对于示例类,不会提供神经网络预测功能,但对于我们提供的demo,可以加载pkl来获得实际的预测结果
:param weights:pkl文件的存放地址
'''
self._weights = weights
... | 0 | 1,368 | 23 |
070d03a595640cd657ae34d4b8d5115573a0f490 | 1,156 | py | Python | Chapter03/process_data.py | PacktPublishing/Practical-Data-Wrangling | a24caa61a2d5513947d79d78154699901ea75c3a | [
"MIT"
] | 12 | 2017-11-18T19:08:29.000Z | 2022-01-30T12:42:43.000Z | Chapter03/process_data.py | PacktPublishing/Practical-Data-Wrangling | a24caa61a2d5513947d79d78154699901ea75c3a | [
"MIT"
] | null | null | null | Chapter03/process_data.py | PacktPublishing/Practical-Data-Wrangling | a24caa61a2d5513947d79d78154699901ea75c3a | [
"MIT"
] | 10 | 2018-01-10T09:33:39.000Z | 2022-03-01T23:30:33.000Z | import json
import pprint
######### OPEN AND READ THE DATA FILE ###########
inFile = open("data/scf_data.json","r")
scf_data = json.load(inFile)
# print(scf_data)
inFile.close()
############ DATA EXPLORATION #############
# dataType = str(type(scf_data))
# print("type of data: " + dataType)
# print("dictionary keys: ... | 30.421053 | 81 | 0.657439 | import json
import pprint
######### OPEN AND READ THE DATA FILE ###########
inFile = open("data/scf_data.json","r")
scf_data = json.load(inFile)
# print(scf_data)
inFile.close()
############ DATA EXPLORATION #############
# dataType = str(type(scf_data))
# print("type of data: " + dataType)
# print("dictionary keys: ... | 0 | 0 | 0 |
07fe7f1caba5fdc28bcf5bfffb6d3bfc5316ec2e | 535 | py | Python | resources/migrations/0031_can_approve_reservation_permission.py | suutari-ai/respa | a944b1c13f855eaf5f883687b5fd025ece7c8176 | [
"MIT"
] | 1 | 2018-11-13T06:03:27.000Z | 2018-11-13T06:03:27.000Z | resources/migrations/0031_can_approve_reservation_permission.py | suutari-ai/respa | a944b1c13f855eaf5f883687b5fd025ece7c8176 | [
"MIT"
] | 10 | 2018-11-21T14:37:17.000Z | 2021-02-02T09:19:59.000Z | resources/migrations/0031_can_approve_reservation_permission.py | suutari-ai/respa | a944b1c13f855eaf5f883687b5fd025ece7c8176 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-24 11:51
from __future__ import unicode_literals
from django.db import migrations, models
| 26.75 | 151 | 0.650467 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-24 11:51
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('resources', '0030_add_reservation_extra_fields'),
]
operations = [
migration... | 0 | 357 | 23 |
67310797224dc8686504881cd9800c05e64aaada | 5,434 | py | Python | tests/libs/io_peripherals/test_io.py | izm51/obniz-python-sdk | 40a738b5fe2c0a415cdc09f46d28c143982bfb07 | [
"MIT"
] | 11 | 2019-03-22T12:02:11.000Z | 2021-01-21T04:57:18.000Z | tests/libs/io_peripherals/test_io.py | izm51/obniz-python-sdk | 40a738b5fe2c0a415cdc09f46d28c143982bfb07 | [
"MIT"
] | 5 | 2019-03-02T08:28:25.000Z | 2021-02-02T22:06:37.000Z | tests/libs/io_peripherals/test_io.py | izm51/obniz-python-sdk | 40a738b5fe2c0a415cdc09f46d28c143982bfb07 | [
"MIT"
] | 3 | 2019-07-20T06:55:09.000Z | 2019-12-04T05:05:00.000Z | from time import sleep
import pytest
from ...utils import assert_finished, assert_obniz, assert_send, receive_json
| 31.051429 | 88 | 0.505889 | from time import sleep
import pytest
from ...utils import assert_finished, assert_obniz, assert_send, receive_json
class TestPeripheralIO:
@pytest.mark.parametrize("input,expected", [(True, True), (1, True), (0, False)])
def test_output(self, obniz, input, expected):
obniz.io0.output(input)
... | 4,230 | 1,069 | 23 |
0a97ce568723f7a1e0016b1d3dbd189335dcdffa | 1,535 | py | Python | plgx-esp-ui/polylogyx/wrappers/v1/host_wrappers.py | eclecticiq/eiq-er-ce | ebb12d5c4e0ee144f8166576924b8ce8dc5dfc94 | [
"MIT"
] | null | null | null | plgx-esp-ui/polylogyx/wrappers/v1/host_wrappers.py | eclecticiq/eiq-er-ce | ebb12d5c4e0ee144f8166576924b8ce8dc5dfc94 | [
"MIT"
] | null | null | null | plgx-esp-ui/polylogyx/wrappers/v1/host_wrappers.py | eclecticiq/eiq-er-ce | ebb12d5c4e0ee144f8166576924b8ce8dc5dfc94 | [
"MIT"
] | 2 | 2021-11-12T10:25:02.000Z | 2022-03-30T06:33:52.000Z | from flask_restplus import fields
from polylogyx.blueprints.v1.external_api import api
# Node Wrappers
node_info_wrapper = api.model('node_info_wrapper', {
'computer_name': fields.String(),
'hardware_model': fields.String(),
'hardware_serial': fields.String(),
'hardware_vendor': fields.String(),
'p... | 34.111111 | 64 | 0.684039 | from flask_restplus import fields
from polylogyx.blueprints.v1.external_api import api
# Node Wrappers
node_info_wrapper = api.model('node_info_wrapper', {
'computer_name': fields.String(),
'hardware_model': fields.String(),
'hardware_serial': fields.String(),
'hardware_vendor': fields.String(),
'p... | 0 | 0 | 0 |
bfae2fc9aaa5732f8611fcd1cb8855def7a2b193 | 317 | py | Python | Taller_control_repeticion/Ejercicio_07.py | willingtonino/Algoritmos_programacion_C4G2 | 2a2c94678ae981974539a8019f17108775521e23 | [
"MIT"
] | null | null | null | Taller_control_repeticion/Ejercicio_07.py | willingtonino/Algoritmos_programacion_C4G2 | 2a2c94678ae981974539a8019f17108775521e23 | [
"MIT"
] | null | null | null | Taller_control_repeticion/Ejercicio_07.py | willingtonino/Algoritmos_programacion_C4G2 | 2a2c94678ae981974539a8019f17108775521e23 | [
"MIT"
] | 1 | 2021-10-31T22:54:45.000Z | 2021-10-31T22:54:45.000Z | """
Entradas
(X,M)-->int-->valores
Salida
Nueva experiencia Monster-->int-->E
"""
#Caja negra
while True:
#Entrada
valores=input("")
(X,M)=valores.split(" ")
X=int(X)
M=int(M)
#Caja negra
if (X==0) and M==0:
break
else:
E=X*M
#Salida
print(E) | 15.85 | 36 | 0.492114 | """
Entradas
(X,M)-->int-->valores
Salida
Nueva experiencia Monster-->int-->E
"""
#Caja negra
while True:
#Entrada
valores=input("")
(X,M)=valores.split(" ")
X=int(X)
M=int(M)
#Caja negra
if (X==0) and M==0:
break
else:
E=X*M
#Salida
print(E) | 0 | 0 | 0 |
abbe5fe994b9cb79caff3d7066a3820c28428e35 | 1,388 | py | Python | print_nodes.py | halfak/wikitax | acb084dc4f991d95dc08fdead19b50987ba968f4 | [
"MIT"
] | 5 | 2019-12-09T21:46:27.000Z | 2020-06-11T20:37:26.000Z | print_nodes.py | halfak/wikitax | acb084dc4f991d95dc08fdead19b50987ba968f4 | [
"MIT"
] | 1 | 2019-12-12T21:59:15.000Z | 2019-12-12T21:59:15.000Z | print_nodes.py | wikimedia/wikitax | acb084dc4f991d95dc08fdead19b50987ba968f4 | [
"MIT"
] | null | null | null | """
Print out the nodes of a taxonomy
Usage:
print_nodes (-h | help)
print_nodes <taxon>... [--debug]
Options:
-h --help Prints this documentation
<taxon> A yaml file containing partial or whole taxonomy. Multiple
files will be merged.
-d --debug Print log information... | 24.785714 | 77 | 0.643372 | """
Print out the nodes of a taxonomy
Usage:
print_nodes (-h | help)
print_nodes <taxon>... [--debug]
Options:
-h --help Prints this documentation
<taxon> A yaml file containing partial or whole taxonomy. Multiple
files will be merged.
-d --debug Print log information... | 791 | 0 | 69 |
223707c4094d91f8896a9078b5135ec648a3dfab | 7,166 | py | Python | django_project/app/machine_learning/main.py | ryoma-jp/AI_Dashboard | 840c6ea9ee1ec82e46c2d6470643031c79aaa1d4 | [
"MIT"
] | null | null | null | django_project/app/machine_learning/main.py | ryoma-jp/AI_Dashboard | 840c6ea9ee1ec82e46c2d6470643031c79aaa1d4 | [
"MIT"
] | null | null | null | django_project/app/machine_learning/main.py | ryoma-jp/AI_Dashboard | 840c6ea9ee1ec82e46c2d6470643031c79aaa1d4 | [
"MIT"
] | null | null | null | #! -*- coding: utf-8 -*-
'''DeepLearning学習処理の実装サンプル
引数に指定する設定ファイルで指定されたパラメータに従い,DeepLearningモデルの学習を実行する実装サンプル.
設定ファイルで指定するパラメータ:
* env: 環境設定
* fifo: 学習制御用のFIFOパス
* result_dir: 結果を格納するディレクトリ
* dataset: データセット関連の設定
* dataset_name: データセット名(Preset: MNIST, CIFAR-10)
* dataset_dir: データセットを格納したディレクトリ
... | 33.643192 | 106 | 0.695646 | #! -*- coding: utf-8 -*-
'''DeepLearning学習処理の実装サンプル
引数に指定する設定ファイルで指定されたパラメータに従い,DeepLearningモデルの学習を実行する実装サンプル.
設定ファイルで指定するパラメータ:
* env: 環境設定
* fifo: 学習制御用のFIFOパス
* result_dir: 結果を格納するディレクトリ
* dataset: データセット関連の設定
* dataset_name: データセット名(Preset: MNIST, CIFAR-10)
* dataset_dir: データセットを格納したディレクトリ
... | 5,396 | 0 | 68 |
1765ce72907a6de52506d4d106fa42031b5e1b1b | 11,580 | py | Python | MLApplication.py | sakthianand7/Visualise-ML-Algorithms-results | 6a2123c1387db0bf86bc2c9a715283383d47a6bc | [
"MIT"
] | null | null | null | MLApplication.py | sakthianand7/Visualise-ML-Algorithms-results | 6a2123c1387db0bf86bc2c9a715283383d47a6bc | [
"MIT"
] | null | null | null | MLApplication.py | sakthianand7/Visualise-ML-Algorithms-results | 6a2123c1387db0bf86bc2c9a715283383d47a6bc | [
"MIT"
] | null | null | null | import streamlit as slt
from sklearn.svm import SVC,SVR
from sklearn.naive_bayes import GaussianNB
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.ens... | 40.208333 | 123 | 0.69905 | import streamlit as slt
from sklearn.svm import SVC,SVR
from sklearn.naive_bayes import GaussianNB
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.ens... | 10,817 | 0 | 23 |
6d5562898a29341be645852f4693e6ca922f6165 | 6,234 | py | Python | pyaccords/pysrc/amazonEc2Act.py | MarouenMechtri/accords-platform-1 | 4f950fffd9fbbf911840cc5ad0fe5b5a331edf42 | [
"Apache-2.0"
] | 1 | 2015-02-28T21:25:54.000Z | 2015-02-28T21:25:54.000Z | pyaccords/pysrc/amazonEc2Act.py | MarouenMechtri/accords-platform-1 | 4f950fffd9fbbf911840cc5ad0fe5b5a331edf42 | [
"Apache-2.0"
] | null | null | null | pyaccords/pysrc/amazonEc2Act.py | MarouenMechtri/accords-platform-1 | 4f950fffd9fbbf911840cc5ad0fe5b5a331edf42 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
#copyright 2012, Hamid MEDJAHED (hmedjahed@prologue.fr) Prologue #
#Licensed under the Apache License, Version 2.0 (the "License"); #
#you may not use this file except in compliance with the License. #
#You... | 89.057143 | 602 | 0.691209 | ##############################################################################
#copyright 2012, Hamid MEDJAHED (hmedjahed@prologue.fr) Prologue #
#Licensed under the Apache License, Version 2.0 (the "License"); #
#you may not use this file except in compliance with the License. #
#You... | 4,798 | 0 | 115 |
bc82892d2888cd197b6a33ea660137008f599f15 | 37,920 | py | Python | bot_ls.py | NikitaMikhailov/bot_herobot | 4e462f622dd0ba67854b5e778efc86abab303bec | [
"MIT"
] | null | null | null | bot_ls.py | NikitaMikhailov/bot_herobot | 4e462f622dd0ba67854b5e778efc86abab303bec | [
"MIT"
] | 6 | 2020-03-24T17:23:25.000Z | 2021-12-13T20:04:34.000Z | bot_ls.py | NikitaMikhailov/bot_herobot_ls | 4e462f622dd0ba67854b5e778efc86abab303bec | [
"MIT"
] | null | null | null | #!/usr/bin/env bash
#!/bin/bash
#!/bin/sh
#!/bin/sh -
from vk_api.utils import get_random_id
from vk_api import VkUpload
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
from vk_api.keyboard import VkKeyboard, VkKeyboardColor
import random, requests, vk_api, os, bs4
from google_images_download import goog... | 52.303448 | 231 | 0.390454 | #!/usr/bin/env bash
#!/bin/bash
#!/bin/sh
#!/bin/sh -
from vk_api.utils import get_random_id
from vk_api import VkUpload
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
from vk_api.keyboard import VkKeyboard, VkKeyboardColor
import random, requests, vk_api, os, bs4
from google_images_download import goog... | 36,896 | 0 | 91 |
acd1fcf64129e702d8d0ca09af32951d757cb0c4 | 812 | py | Python | behavior_cloning/safety_backup_C/C/environment_models/pusher.py | chickert/reinforcement_learning | 473323f08b079004f27a7f0931e5e9a46bfad347 | [
"MIT"
] | null | null | null | behavior_cloning/safety_backup_C/C/environment_models/pusher.py | chickert/reinforcement_learning | 473323f08b079004f27a7f0931e5e9a46bfad347 | [
"MIT"
] | null | null | null | behavior_cloning/safety_backup_C/C/environment_models/pusher.py | chickert/reinforcement_learning | 473323f08b079004f27a7f0931e5e9a46bfad347 | [
"MIT"
] | null | null | null |
from environment_models.base import BaseEnv
from airobot_utils.pusher_simulator import PusherSimulator
import numpy as np
| 25.375 | 60 | 0.665025 |
from environment_models.base import BaseEnv
from airobot_utils.pusher_simulator import PusherSimulator
import numpy as np
class PusherEnv(BaseEnv):
def __init__(self):
self.simulator = PusherSimulator(render=False)
def transition_function(state, action):
self.simulator.apply_actio... | 606 | 4 | 77 |
9753e5f361d1334a73026196cb9f93a820bbcd37 | 183 | py | Python | passenger_wsgi.py | kevincornish/HeckGuide | eb974d6b589908f5fc2308d41032a48941cc3d21 | [
"MIT"
] | 4 | 2022-02-16T10:19:11.000Z | 2022-03-17T03:34:26.000Z | passenger_wsgi.py | kevincornish/HeckGuide | eb974d6b589908f5fc2308d41032a48941cc3d21 | [
"MIT"
] | 1 | 2022-02-17T14:02:31.000Z | 2022-03-31T03:56:42.000Z | passenger_wsgi.py | kevincornish/HeckGuide | eb974d6b589908f5fc2308d41032a48941cc3d21 | [
"MIT"
] | 3 | 2022-02-17T06:13:52.000Z | 2022-03-23T21:37:21.000Z | import heckguide.wsgi
from whitenoise import WhiteNoise
application = heckguide.wsgi.application
application = WhiteNoise(application, root='/home/heckkciy/dev.heckguide.com/static') | 36.6 | 85 | 0.836066 | import heckguide.wsgi
from whitenoise import WhiteNoise
application = heckguide.wsgi.application
application = WhiteNoise(application, root='/home/heckkciy/dev.heckguide.com/static') | 0 | 0 | 0 |
2443e0ae12a68ea13caba68dcda33ae496994aee | 6,619 | py | Python | stanford/sms-tools/software/transformations_interface/hpsTransformations_function.py | phunc20/dsp | e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886 | [
"MIT"
] | 1 | 2021-03-12T18:32:06.000Z | 2021-03-12T18:32:06.000Z | stanford/sms-tools/software/transformations_interface/hpsTransformations_function.py | phunc20/dsp | e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886 | [
"MIT"
] | null | null | null | stanford/sms-tools/software/transformations_interface/hpsTransformations_function.py | phunc20/dsp | e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886 | [
"MIT"
] | null | null | null | # function call to the transformation functions of relevance for the hpsModel
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import get_window
import sys, os
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../models/'))
sys.path.append(os.path.join(os.path.dirname(os.pa... | 35.586022 | 147 | 0.706149 | # function call to the transformation functions of relevance for the hpsModel
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import get_window
import sys, os
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../models/'))
sys.path.append(os.path.join(os.path.dirname(os.pa... | 0 | 0 | 0 |
1680e18896f6f4ae0a5b62b3d8827f6c5f5db509 | 153 | py | Python | files/seeking.py | janbodnar/Python-Course | 51705ab5a2adef52bcdb99a800e94c0d67144a38 | [
"BSD-2-Clause"
] | 13 | 2017-08-22T12:26:07.000Z | 2021-07-29T16:13:50.000Z | files/seeking.py | janbodnar/Python-Course | 51705ab5a2adef52bcdb99a800e94c0d67144a38 | [
"BSD-2-Clause"
] | 1 | 2021-02-08T10:24:33.000Z | 2021-02-08T10:24:33.000Z | files/seeking.py | janbodnar/Python-Course | 51705ab5a2adef52bcdb99a800e94c0d67144a38 | [
"BSD-2-Clause"
] | 17 | 2018-08-13T11:10:33.000Z | 2021-07-29T16:14:02.000Z | #!/usr/bin/python
with open('works.txt', 'r') as f:
data1 = f.read(22)
print(data1)
f.seek(0, 0)
data2 = f.read(22)
print(data2)
| 12.75 | 33 | 0.542484 | #!/usr/bin/python
with open('works.txt', 'r') as f:
data1 = f.read(22)
print(data1)
f.seek(0, 0)
data2 = f.read(22)
print(data2)
| 0 | 0 | 0 |
5b655e24ff3b19ff2d7e65b59eebd8e045ff7d9a | 8,016 | py | Python | django_snowflake/operations.py | cedar-team/django-snowflake | 7c5cff1299946af7b7b3c82944c9c9c5ace2a802 | [
"MIT"
] | 14 | 2021-12-10T03:08:17.000Z | 2022-03-12T10:18:08.000Z | django_snowflake/operations.py | cedar-team/django-snowflake | 7c5cff1299946af7b7b3c82944c9c9c5ace2a802 | [
"MIT"
] | 15 | 2021-10-29T23:48:22.000Z | 2022-03-30T11:52:28.000Z | django_snowflake/operations.py | cedar-team/django-snowflake | 7c5cff1299946af7b7b3c82944c9c9c5ace2a802 | [
"MIT"
] | 3 | 2022-01-26T17:07:28.000Z | 2022-03-02T08:05:16.000Z | import decimal
import uuid
from django.conf import settings
from django.db.backends.base.operations import BaseDatabaseOperations
from django.utils import timezone
| 41.319588 | 110 | 0.62238 | import decimal
import uuid
from django.conf import settings
from django.db.backends.base.operations import BaseDatabaseOperations
from django.utils import timezone
class DatabaseOperations(BaseDatabaseOperations):
cast_char_field_without_max_length = 'varchar'
cast_data_types = {
'AutoField': 'NUMBER... | 6,878 | 949 | 23 |
caabfd38ff62ea17041d4c129f3b961d4bd1e247 | 37 | py | Python | analysis/hello_world.py | goinvo/MAHealthIssues | d1f7e4cfeb1b48aa03f4cc2a8fa758afe3f6b8a5 | [
"MIT"
] | null | null | null | analysis/hello_world.py | goinvo/MAHealthIssues | d1f7e4cfeb1b48aa03f4cc2a8fa758afe3f6b8a5 | [
"MIT"
] | null | null | null | analysis/hello_world.py | goinvo/MAHealthIssues | d1f7e4cfeb1b48aa03f4cc2a8fa758afe3f6b8a5 | [
"MIT"
] | null | null | null | teststring ="hello"
print(teststring) | 18.5 | 19 | 0.810811 | teststring ="hello"
print(teststring) | 0 | 0 | 0 |
356e1b5e5b3c4424b8872304ce6c3695e3403f0f | 2,961 | py | Python | insights/parsers/tests/test_nfs_exports.py | sagaraivale/insights-core | 852a9669c998acf995e316bd407aeb4dbc6c485e | [
"Apache-2.0"
] | 1 | 2018-03-26T12:59:24.000Z | 2018-03-26T12:59:24.000Z | insights/parsers/tests/test_nfs_exports.py | sagaraivale/insights-core | 852a9669c998acf995e316bd407aeb4dbc6c485e | [
"Apache-2.0"
] | null | null | null | insights/parsers/tests/test_nfs_exports.py | sagaraivale/insights-core | 852a9669c998acf995e316bd407aeb4dbc6c485e | [
"Apache-2.0"
] | null | null | null | from insights.parsers.nfs_exports import NFSExports, NFSExportsD
from insights.tests import context_wrap
EXPORTS = """
/home/utcs/shared/ro @rhtttttttttttt(ro,sync) ins1.example.com(rw,sync,no_root_squash) ins2.example.com(rw,sync,no_root_squash)
/home/insights/shared/rw @rhtttttttttttt(rw,sync) ins1.example.com(r... | 41.125 | 142 | 0.65282 | from insights.parsers.nfs_exports import NFSExports, NFSExportsD
from insights.tests import context_wrap
EXPORTS = """
/home/utcs/shared/ro @rhtttttttttttt(ro,sync) ins1.example.com(rw,sync,no_root_squash) ins2.example.com(rw,sync,no_root_squash)
/home/insights/shared/rw @rhtttttttttttt(rw,sync) ins1.example.com(r... | 1,953 | 0 | 138 |
52d1d36ea29df25496029ae68d491bcbcc3e65fb | 1,596 | py | Python | DistributionTools/PEATDB/Linux/freeze.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | 3 | 2016-11-11T06:11:03.000Z | 2021-09-12T22:13:51.000Z | DistributionTools/PEATDB/Linux/freeze.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | null | null | null | DistributionTools/PEATDB/Linux/freeze.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | 2 | 2016-02-15T16:10:36.000Z | 2018-02-27T10:33:21.000Z | #!/usr/bin/env python
#bbfreeze setup file for PEAT_DB distribution on Windows
#Damien Farrell, #October 2009
"""
This script can be used to create a standalone executable for
either windows or linux. It must be run on the target platform.
You will need to install bbfreeze, see http://pypi.python.org/pypi/bbf... | 29.555556 | 77 | 0.657268 | #!/usr/bin/env python
#bbfreeze setup file for PEAT_DB distribution on Windows
#Damien Farrell, #October 2009
"""
This script can be used to create a standalone executable for
either windows or linux. It must be run on the target platform.
You will need to install bbfreeze, see http://pypi.python.org/pypi/bbf... | 0 | 0 | 0 |
38ceffbba3441d962dbd22cc8e0a2968b1cf2fc1 | 8,170 | py | Python | common/replay_buffer.py | schmidtdominik/Rainbow | 298c93d3d9322440d3a22cf24045b57af9c83fde | [
"MIT"
] | 28 | 2021-07-26T18:35:06.000Z | 2022-03-28T02:42:04.000Z | common/replay_buffer.py | schmidtdominik/Rainbow | 298c93d3d9322440d3a22cf24045b57af9c83fde | [
"MIT"
] | null | null | null | common/replay_buffer.py | schmidtdominik/Rainbow | 298c93d3d9322440d3a22cf24045b57af9c83fde | [
"MIT"
] | null | null | null | import collections
import random
from math import sqrt
import numpy as np
import torch
from gym.wrappers import LazyFrames
from common.utils import prep_observation_for_qnet
class PrioritizedReplayBuffer:
""" based on https://nn.labml.ai/rl/dqn, supports n-step bootstrapping and parallel environments,
remo... | 39.660194 | 148 | 0.614688 | import collections
import random
from math import sqrt
import numpy as np
import torch
from gym.wrappers import LazyFrames
from common.utils import prep_observation_for_qnet
class UniformReplayBuffer:
def __init__(self, burnin, capacity, gamma, n_step, parallel_envs, use_amp):
self.capacity = capacity
... | 6,084 | 866 | 371 |
82160d72d0eb2c7ce7a388b05819e810a8c85d97 | 3,457 | py | Python | controller/connectors/SCVMM.py | maybe-hello-world/tortilla-controller | 4bb6b9d893eacaec397357881843cd03037549e3 | [
"MIT"
] | null | null | null | controller/connectors/SCVMM.py | maybe-hello-world/tortilla-controller | 4bb6b9d893eacaec397357881843cd03037549e3 | [
"MIT"
] | null | null | null | controller/connectors/SCVMM.py | maybe-hello-world/tortilla-controller | 4bb6b9d893eacaec397357881843cd03037549e3 | [
"MIT"
] | null | null | null | import logging
import aiohttp
from typing import Tuple
from controller.data.VM import VM
from controller.connectors.Connector import Connector
| 33.563107 | 123 | 0.563494 | import logging
import aiohttp
from typing import Tuple
from controller.data.VM import VM
from controller.connectors.Connector import Connector
class SCVMMConnector(Connector):
def __init__(self, url: str, timeout: int = 30):
"""
Instatiate SCVMMConnector class
:param url: url of a SCVMM ... | 2,594 | 695 | 23 |
5ea8fc75b71ddaea968fa99dc4a47623684bb7ac | 706 | py | Python | estate/forms.py | apwao/neighborhood | b71028fb0e312a57776b8485c7bf8e43b8f6c5d5 | [
"Unlicense",
"MIT"
] | null | null | null | estate/forms.py | apwao/neighborhood | b71028fb0e312a57776b8485c7bf8e43b8f6c5d5 | [
"Unlicense",
"MIT"
] | 5 | 2020-06-05T22:06:38.000Z | 2021-09-08T01:07:31.000Z | estate/forms.py | apwao/neighborhood | b71028fb0e312a57776b8485c7bf8e43b8f6c5d5 | [
"Unlicense",
"MIT"
] | null | null | null | from .models import Business,Profile
from django import forms
class BusinessForm(forms.ModelForm):
"""
class BusinessForm to enable a user to register their businesses
with the application
"""
class ProfileForm(forms.ModelForm):
"""
class BusinessForm to enable a user to register their ... | 27.153846 | 90 | 0.637394 | from .models import Business,Profile
from django import forms
class BusinessForm(forms.ModelForm):
"""
class BusinessForm to enable a user to register their businesses
with the application
"""
class Meta:
model=Business
fields=('biz_name','email_address','description','image')
... | 0 | 283 | 52 |
33bcfb0072c2489f5ef8239ee411e6decf69324d | 17,393 | py | Python | code/tutorials/exp_somb/pre_tomos_seg.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 12 | 2020-01-08T01:33:02.000Z | 2022-03-16T00:25:34.000Z | code/tutorials/exp_somb/pre_tomos_seg.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 8 | 2019-12-19T19:34:56.000Z | 2022-03-10T10:11:28.000Z | code/tutorials/exp_somb/pre_tomos_seg.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 2 | 2022-03-30T13:12:22.000Z | 2022-03-30T18:12:10.000Z | """
Pre-processing for mb_graph_batch.py of oriented membranes from TomoSegMemTV output
Input: - STAR file with 3 columns:
+ _rlnMicrographName: tomogram original
+ _rlnImageName: TomoSegMemTV density map output
+ _psSegLabel: (optional) label for membrane segm... | 44.943152 | 126 | 0.605933 | """
Pre-processing for mb_graph_batch.py of oriented membranes from TomoSegMemTV output
Input: - STAR file with 3 columns:
+ _rlnMicrographName: tomogram original
+ _rlnImageName: TomoSegMemTV density map output
+ _psSegLabel: (optional) label for membrane segm... | 0 | 0 | 0 |
3f641e924d35cf45792a5ad1e2f2a00da473b0f4 | 4,841 | py | Python | LIBRAY_MANAGEMENT/Search.py | ShriyasnhAgarwl/Hacktoberfest | 5e8adf77a833f7b99dbddff92716e05641dac857 | [
"MIT"
] | null | null | null | LIBRAY_MANAGEMENT/Search.py | ShriyasnhAgarwl/Hacktoberfest | 5e8adf77a833f7b99dbddff92716e05641dac857 | [
"MIT"
] | null | null | null | LIBRAY_MANAGEMENT/Search.py | ShriyasnhAgarwl/Hacktoberfest | 5e8adf77a833f7b99dbddff92716e05641dac857 | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import sqlite3
from sqlite3 import Error
Sea().mainloop() | 50.957895 | 139 | 0.54121 | from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import sqlite3
from sqlite3 import Error
class Sea(Tk):
def __init__(self):
super().__init__()
f = StringVar()
g = StringVar()
self.title("Search Book")
self.maxsize(800,500)
... | 4,653 | -7 | 52 |
138d2ee0e84e4a165e40f633daacadbbb9845045 | 8,958 | py | Python | smartsheet/types.py | abhijitmamarde/smartsheet-python-sdk | d0120f13e8681a39b1012df6088999a64d3d0dda | [
"Apache-2.0"
] | null | null | null | smartsheet/types.py | abhijitmamarde/smartsheet-python-sdk | d0120f13e8681a39b1012df6088999a64d3d0dda | [
"Apache-2.0"
] | null | null | null | smartsheet/types.py | abhijitmamarde/smartsheet-python-sdk | d0120f13e8681a39b1012df6088999a64d3d0dda | [
"Apache-2.0"
] | null | null | null | # pylint: disable=C0111,R0902,R0913
# Smartsheet Python SDK.
#
# Copyright 2016 Smartsheet.com, 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/LICE... | 28.081505 | 102 | 0.59098 | # pylint: disable=C0111,R0902,R0913
# Smartsheet Python SDK.
#
# Copyright 2016 Smartsheet.com, 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/LICE... | 5,714 | 2,073 | 238 |
568a5b7446a765ab1575aff69cc8f331e6747a0a | 256 | py | Python | kora/install/orca.py | wannaphong/kora | 8a9034097d07b14094e077769c02a0b4857d179b | [
"MIT"
] | 91 | 2020-05-26T05:54:51.000Z | 2022-03-09T07:33:44.000Z | kora/install/orca.py | wannaphong/kora | 8a9034097d07b14094e077769c02a0b4857d179b | [
"MIT"
] | 12 | 2020-10-03T10:09:11.000Z | 2021-03-06T23:12:21.000Z | kora/install/orca.py | wannaphong/kora | 8a9034097d07b14094e077769c02a0b4857d179b | [
"MIT"
] | 16 | 2020-07-07T18:39:29.000Z | 2021-03-06T03:46:49.000Z | import os
from urllib.request import urlretrieve
url = "https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage"
orca = '/usr/local/bin/orca'
urlretrieve(url, orca)
os.chmod(orca, 0o755)
os.system("apt install xvfb libgconf-2-4") | 36.571429 | 90 | 0.761719 | import os
from urllib.request import urlretrieve
url = "https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage"
orca = '/usr/local/bin/orca'
urlretrieve(url, orca)
os.chmod(orca, 0o755)
os.system("apt install xvfb libgconf-2-4") | 0 | 0 | 0 |
9a2ec11c81c067688541d020aa744bc48be5df2a | 242 | py | Python | Graphs/topological ordering/testando.py | lucasEngdComp/graphs | da71f249c3ea0496f2a6a3695c66adeb4f3db43c | [
"MIT"
] | null | null | null | Graphs/topological ordering/testando.py | lucasEngdComp/graphs | da71f249c3ea0496f2a6a3695c66adeb4f3db43c | [
"MIT"
] | null | null | null | Graphs/topological ordering/testando.py | lucasEngdComp/graphs | da71f249c3ea0496f2a6a3695c66adeb4f3db43c | [
"MIT"
] | null | null | null | from grafo_adj import *
g = Grafo([],[])
for i in ['9','8','7','2','11','5','3', '10']:
g.adiciona_vertice(i)
for i in ['7-11', '5-8', '3-11', '7-8', '8-9','11-10','11-2', '5-10']:
g.adiciona_aresta(i)
print(g)
print(g.dfs('7'))
| 17.285714 | 70 | 0.495868 | from grafo_adj import *
g = Grafo([],[])
for i in ['9','8','7','2','11','5','3', '10']:
g.adiciona_vertice(i)
for i in ['7-11', '5-8', '3-11', '7-8', '8-9','11-10','11-2', '5-10']:
g.adiciona_aresta(i)
print(g)
print(g.dfs('7'))
| 0 | 0 | 0 |
826936876403864987eac829cc9201052b5fcae4 | 2,736 | py | Python | wordcount.py | conkytw/text-mining-wordcount | a10563bff9850eb5138c8c0d795ecb1ea3f846b9 | [
"MIT"
] | 2 | 2017-03-12T06:46:03.000Z | 2017-03-12T06:46:06.000Z | wordcount.py | conkytw/text-mining-wordcount | a10563bff9850eb5138c8c0d795ecb1ea3f846b9 | [
"MIT"
] | null | null | null | wordcount.py | conkytw/text-mining-wordcount | a10563bff9850eb5138c8c0d795ecb1ea3f846b9 | [
"MIT"
] | null | null | null | from collections import Counter
import nltk
from nltk.corpus import stopwords
stopwords = set(stopwords.words('english'))
# read sentence
lines = []
for line in open('building_global_community.txt'):
# delete the blank and line feed at the begining and end
line = line.strip()
# add processed line text in... | 30.4 | 102 | 0.684576 | from collections import Counter
import nltk
from nltk.corpus import stopwords
stopwords = set(stopwords.words('english'))
# read sentence
lines = []
for line in open('building_global_community.txt'):
# delete the blank and line feed at the begining and end
line = line.strip()
# add processed line text in... | 0 | 0 | 0 |
130b8dfa2bd0eeb1dd43758715ab9f4b20c54970 | 4,897 | py | Python | venv/Lib/site-packages/_TFL/Recordifier.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | 6 | 2016-12-10T17:51:10.000Z | 2021-10-11T07:51:48.000Z | venv/Lib/site-packages/_TFL/Recordifier.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/_TFL/Recordifier.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | 3 | 2020-03-29T07:37:03.000Z | 2021-01-21T16:08:40.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2016 Mag. Christian Tanzer. All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
# ****************************************************************************
#
# This module is licensed under the terms of the BSD 3-Clause License
# <http://www.... | 32.430464 | 79 | 0.506228 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2016 Mag. Christian Tanzer. All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
# ****************************************************************************
#
# This module is licensed under the terms of the BSD 3-Clause License
# <http://www.... | 1,934 | 18 | 208 |
cddf6a78be18c0a440d59e0141c19012bfa11448 | 9,965 | py | Python | df2onehot/utils.py | erdogant/df2onehot | 0595f4f96b478d498876885fc53473f1195458a2 | [
"MIT"
] | 2 | 2021-06-17T12:48:48.000Z | 2022-03-13T17:39:39.000Z | df2onehot/utils.py | erdogant/df2onehot | 0595f4f96b478d498876885fc53473f1195458a2 | [
"MIT"
] | null | null | null | df2onehot/utils.py | erdogant/df2onehot | 0595f4f96b478d498876885fc53473f1195458a2 | [
"MIT"
] | null | null | null | """Various helper functions to set the dtypes."""
# ----------------------------------------------------
# Name : df2onehot.py
# Author : E.Taskesen
# Contact : erdogant@gmail.com
# github : https://github.com/erdogant/df2onehot
# Licence : MIT
# ------------------------------------------------... | 39.701195 | 199 | 0.560863 | """Various helper functions to set the dtypes."""
# ----------------------------------------------------
# Name : df2onehot.py
# Author : E.Taskesen
# Contact : erdogant@gmail.com
# github : https://github.com/erdogant/df2onehot
# Licence : MIT
# ------------------------------------------------... | 5,491 | 0 | 66 |
6faaed9836f82883490ceb00ff9ecdba6a7b7435 | 4,121 | py | Python | src/prototype/server.py | Ultra-Seven/newStream | 6ae7c152d33c0a0d02b44b13a45f72b20ba8ef16 | [
"MIT"
] | null | null | null | src/prototype/server.py | Ultra-Seven/newStream | 6ae7c152d33c0a0d02b44b13a45f72b20ba8ef16 | [
"MIT"
] | null | null | null | src/prototype/server.py | Ultra-Seven/newStream | 6ae7c152d33c0a0d02b44b13a45f72b20ba8ef16 | [
"MIT"
] | null | null | null | import random
import struct
import json
import flask
import time
import numpy as np
from collections import defaultdict
from threading import Thread
from Queue import Queue
from StringIO import StringIO
from sqlalchemy import create_engine
from flask import Flask, render_template, Response, request, stream_with_context... | 26.248408 | 98 | 0.680175 | import random
import struct
import json
import flask
import time
import numpy as np
from collections import defaultdict
from threading import Thread
from Queue import Queue
from StringIO import StringIO
from sqlalchemy import create_engine
from flask import Flask, render_template, Response, request, stream_with_context... | 338 | 0 | 44 |
b0a76137ebb58a7a46f4264eb9d1190c8162f333 | 1,110 | py | Python | scripts/azAttrVisalizer.py | ejekt/rigging-system | dedf09cc832f56b310587b818deadfd4f8ca7b3b | [
"MIT"
] | 3 | 2019-12-12T03:46:41.000Z | 2021-01-16T06:29:45.000Z | scripts/azAttrVisalizer.py | ejekt/rigging-system | dedf09cc832f56b310587b818deadfd4f8ca7b3b | [
"MIT"
] | null | null | null | scripts/azAttrVisalizer.py | ejekt/rigging-system | dedf09cc832f56b310587b818deadfd4f8ca7b3b | [
"MIT"
] | null | null | null | import maya.cmds as mc
createVisualizerNodes()
| 34.6875 | 97 | 0.679279 | import maya.cmds as mc
def getAttrToGraph():
# returns attribute path if one is selected in the channelbox
selAttr = mc.channelBox('mainChannelBox', q=1, selectedMainAttributes=1)
if selAttr and len(selAttr) == 1:
selObj = mc.ls(sl=1)[-1]
attrPath = '{}.{}'.format(selObj, selAttr[0])
... | 1,013 | 0 | 46 |
ab546a4162bb56f06ce55dba8449286793acaa45 | 10,530 | py | Python | main.py | jeremysuh/Wikipedia-Article-Comparator | c37d289d5063761f713d42d3db0c8c2073252170 | [
"MIT"
] | null | null | null | main.py | jeremysuh/Wikipedia-Article-Comparator | c37d289d5063761f713d42d3db0c8c2073252170 | [
"MIT"
] | null | null | null | main.py | jeremysuh/Wikipedia-Article-Comparator | c37d289d5063761f713d42d3db0c8c2073252170 | [
"MIT"
] | null | null | null | import kivy
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty, StringProperty
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.image import Image, AsyncImage
from kivy.uix.textinput import TextInput
from kivy.conf... | 30.345821 | 129 | 0.596771 | import kivy
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty, StringProperty
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.image import Image, AsyncImage
from kivy.uix.textinput import TextInput
from kivy.conf... | 8,785 | 874 | 72 |
7f14c7b9add693eca4ea3f8926c5b41bca78b3f7 | 22,022 | py | Python | tests/test_internals.py | ccaruceru/slack-multireact | 08b9018c25802d440876516d3469ddd3ad42e260 | [
"MIT"
] | null | null | null | tests/test_internals.py | ccaruceru/slack-multireact | 08b9018c25802d440876516d3469ddd3ad42e260 | [
"MIT"
] | null | null | null | tests/test_internals.py | ccaruceru/slack-multireact | 08b9018c25802d440876516d3469ddd3ad42e260 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests for internals.py"""
from asyncio.tasks import Task
import os
import json
import sys
import unittest
import asyncio
import logging
from io import StringIO
from importlib import reload
from unittest.mock import AsyncMock, Mock, call, patch
from aiohttp.client_exceptions import ClientCon... | 45.219713 | 120 | 0.563164 | # -*- coding: utf-8 -*-
"""Tests for internals.py"""
from asyncio.tasks import Task
import os
import json
import sys
import unittest
import asyncio
import logging
from io import StringIO
from importlib import reload
from unittest.mock import AsyncMock, Mock, call, patch
from aiohttp.client_exceptions import ClientCon... | 20 | 0 | 30 |
2c7b34da71ec90cd5fdbc145e15b19d24623d2c5 | 812 | py | Python | api/api.py | idrissneumann/imalive | a5c4c9f34c9d2e2b24095a6558bcaca022297f26 | [
"Apache-2.0"
] | null | null | null | api/api.py | idrissneumann/imalive | a5c4c9f34c9d2e2b24095a6558bcaca022297f26 | [
"Apache-2.0"
] | null | null | null | api/api.py | idrissneumann/imalive | a5c4c9f34c9d2e2b24095a6558bcaca022297f26 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from flask_restful import Api
from multiprocessing import Process
from heartbit import heartbit
from api_health import HealthEndPoint
from api_manifest import ManifestEndPoint
from api_metrics import MetricsEndPoint
app = Flask(__name__)
api = Api(app)
async_process = Process(
target=hea... | 28 | 94 | 0.742611 | from flask import Flask
from flask_restful import Api
from multiprocessing import Process
from heartbit import heartbit
from api_health import HealthEndPoint
from api_manifest import ManifestEndPoint
from api_metrics import MetricsEndPoint
app = Flask(__name__)
api = Api(app)
async_process = Process(
target=hea... | 0 | 0 | 0 |
a5ca672ff6b58ca59e41f14bb06794c17d777769 | 1,531 | py | Python | Field_D_main.py | McJones/Text2SATB | adfefb05daacf5ecde2be39890dfcdca9f034c15 | [
"MIT"
] | null | null | null | Field_D_main.py | McJones/Text2SATB | adfefb05daacf5ecde2be39890dfcdca9f034c15 | [
"MIT"
] | 2 | 2018-08-20T09:15:49.000Z | 2018-08-20T09:18:26.000Z | Field_D_main.py | McJones/Text2SATB | adfefb05daacf5ecde2be39890dfcdca9f034c15 | [
"MIT"
] | 1 | 2018-12-11T23:53:50.000Z | 2018-12-11T23:53:50.000Z | from Field_D_SupportingClasses import *
ProgramID = "DF Word Score Sonifier v1.0"
WorkTitle = "Untitled Sonification"
Lyricist = ""
Input = DF_TextInput()
WorkTitle = Input.provideTitle()
Lyricist = Input.provideLyricist()
verses = Input.provideVerses()
positions = Input.providePositions()
scores = Input.p... | 34.022222 | 68 | 0.793599 | from Field_D_SupportingClasses import *
ProgramID = "DF Word Score Sonifier v1.0"
WorkTitle = "Untitled Sonification"
Lyricist = ""
Input = DF_TextInput()
WorkTitle = Input.provideTitle()
Lyricist = Input.provideLyricist()
verses = Input.provideVerses()
positions = Input.providePositions()
scores = Input.p... | 0 | 0 | 0 |
6320d6eba1e101f8a2417333f0da0649a54cd36f | 7,055 | py | Python | broker/libs/git.py | ebloc/eBlocBroker | 52d507835a0fe3c930df2e2c816724d26a3484a7 | [
"MIT"
] | 7 | 2018-02-10T22:57:28.000Z | 2020-11-20T14:46:18.000Z | broker/libs/git.py | ebloc/eBlocBroker | 52d507835a0fe3c930df2e2c816724d26a3484a7 | [
"MIT"
] | 5 | 2020-10-30T18:43:27.000Z | 2021-02-04T12:39:30.000Z | broker/libs/git.py | ebloc/eBlocBroker | 52d507835a0fe3c930df2e2c816724d26a3484a7 | [
"MIT"
] | 5 | 2017-07-06T14:14:13.000Z | 2019-02-22T14:40:16.000Z | #!/usr/bin/env python3
import gzip
import io
import os
import time
import git
from broker.config import env, logging
from broker.libs.ipfs import decrypt_using_gpg
from broker.utils import cd, is_gzip_file_empty, log, path_leaf, run
# from subprocess import CalledProcessError
def initialize_check(path):
""".g... | 32.662037 | 105 | 0.591212 | #!/usr/bin/env python3
import gzip
import io
import os
import time
import git
from broker.config import env, logging
from broker.libs.ipfs import decrypt_using_gpg
from broker.utils import cd, is_gzip_file_empty, log, path_leaf, run
# from subprocess import CalledProcessError
def initialize_check(path):
""".g... | 3,198 | 0 | 161 |
fa106b624dcaed91c2eb981434a403060cd1c1fc | 1,763 | py | Python | cognite/v05/tagmatching.py | boyeah/cognite-sdk-python | 39abf5c98d758c59609cb33f5f3e2c009712005d | [
"Apache-2.0"
] | null | null | null | cognite/v05/tagmatching.py | boyeah/cognite-sdk-python | 39abf5c98d758c59609cb33f5f3e2c009712005d | [
"Apache-2.0"
] | null | null | null | cognite/v05/tagmatching.py | boyeah/cognite-sdk-python | 39abf5c98d758c59609cb33f5f3e2c009712005d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tag Matching Module
This module mirrors the Tag Matching API. It allows the user to search for tag id matches.
https://doc.cognitedata.com/0.5/#Cognite-API-Tag-Matching
"""
import cognite._utils as _utils
import cognite.config as config
from cognite.v05.dto import TagMatchingResponse
def ... | 41.97619 | 123 | 0.688032 | # -*- coding: utf-8 -*-
"""Tag Matching Module
This module mirrors the Tag Matching API. It allows the user to search for tag id matches.
https://doc.cognitedata.com/0.5/#Cognite-API-Tag-Matching
"""
import cognite._utils as _utils
import cognite.config as config
from cognite.v05.dto import TagMatchingResponse
def ... | 0 | 0 | 0 |
96e189f608858537ed90f75689036cf2feaa0c16 | 5,464 | py | Python | main.py | rmccaffr/IrishRailBot | bd346d157a41680d0fb13dd78f280bb8df34aa9a | [
"Apache-2.0"
] | null | null | null | main.py | rmccaffr/IrishRailBot | bd346d157a41680d0fb13dd78f280bb8df34aa9a | [
"Apache-2.0"
] | null | null | null | main.py | rmccaffr/IrishRailBot | bd346d157a41680d0fb13dd78f280bb8df34aa9a | [
"Apache-2.0"
] | null | null | null | import StringIO
import json
import logging
import random
import urllib
import urllib2
from xml.dom import minidom
# for sending images
from PIL import Image
import multipart
# standard app engine imports
from google.appengine.api import urlfetch
from google.appengine.ext import ndb
import webapp2
TOKEN = '119152358:... | 32.52381 | 157 | 0.600842 | import StringIO
import json
import logging
import random
import urllib
import urllib2
from xml.dom import minidom
# for sending images
from PIL import Image
import multipart
# standard app engine imports
from google.appengine.api import urlfetch
from google.appengine.ext import ndb
import webapp2
TOKEN = '119152358:... | 4,265 | 199 | 265 |
579e371e955563dc8f4d6412367c0fd0a22213bb | 167 | py | Python | Exercicios Python/exlista01.py | oswaldo-spadari/Python-Exec | 3c3a237ed7c30af43f23a3619f6c6b92f6fcb12e | [
"MIT"
] | null | null | null | Exercicios Python/exlista01.py | oswaldo-spadari/Python-Exec | 3c3a237ed7c30af43f23a3619f6c6b92f6fcb12e | [
"MIT"
] | null | null | null | Exercicios Python/exlista01.py | oswaldo-spadari/Python-Exec | 3c3a237ed7c30af43f23a3619f6c6b92f6fcb12e | [
"MIT"
] | null | null | null | #Faça um Programa que leia um vetor de 5 números inteiros e mostre-os.
lista=[]
for i in range(1, 6):
lista.append(int(input('Digite um número: ')))
print(lista)
| 23.857143 | 70 | 0.694611 | #Faça um Programa que leia um vetor de 5 números inteiros e mostre-os.
lista=[]
for i in range(1, 6):
lista.append(int(input('Digite um número: ')))
print(lista)
| 0 | 0 | 0 |
49ee0242e9e0863870fce27ed6fe2b52fdc6ebac | 1,662 | py | Python | corehq/apps/app_manager/views/cli.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/app_manager/views/cli.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | 1 | 2022-03-12T01:03:25.000Z | 2022-03-12T01:03:25.000Z | corehq/apps/app_manager/views/cli.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | from django.utils.text import slugify
from soil import DownloadBase
from corehq.apps.hqmedia.tasks import build_application_zip
from corehq.util.view_utils import absolute_reverse, json_error
from corehq.apps.domain.models import Domain
from dimagi.utils.web import json_response
from corehq.apps.domain.decorators impo... | 33.918367 | 78 | 0.662455 | from django.utils.text import slugify
from soil import DownloadBase
from corehq.apps.hqmedia.tasks import build_application_zip
from corehq.util.view_utils import absolute_reverse, json_error
from corehq.apps.domain.models import Domain
from dimagi.utils.web import json_response
from corehq.apps.domain.decorators impo... | 1,149 | 0 | 44 |
11667cf487b0c5ac83e5590cc9e8485871c9addb | 6,026 | py | Python | ingestion/datasources/coinmarketcap.py | JesseCorrington/CryptoHypeTrader | 33f79251f5327d459818ab6d07f104b89596d3b3 | [
"MIT"
] | null | null | null | ingestion/datasources/coinmarketcap.py | JesseCorrington/CryptoHypeTrader | 33f79251f5327d459818ab6d07f104b89596d3b3 | [
"MIT"
] | null | null | null | ingestion/datasources/coinmarketcap.py | JesseCorrington/CryptoHypeTrader | 33f79251f5327d459818ab6d07f104b89596d3b3 | [
"MIT"
] | null | null | null | import re
import datetime
from ingestion import datasource as ds
# Provides access to coinmarketcap.com data, using the API when available,
# or web scraping when there is no public API
class CoinList(ds.DataSource):
"""Used to get a list of all the coins on coinmarketcap"""
class Ticker(CoinList):
"""Use... | 33.853933 | 124 | 0.559409 | import re
import datetime
from ingestion import datasource as ds
# Provides access to coinmarketcap.com data, using the API when available,
# or web scraping when there is no public API
class CoinList(ds.DataSource):
"""Used to get a list of all the coins on coinmarketcap"""
def __init__(self):
# l... | 5,057 | 0 | 189 |
2e11e28c5f1185cc9d68c8d87fd77f68ee0d1717 | 199 | py | Python | SCRIPTS/script14.py | oasys-kit/ShadowOui-Tutorial | 50e9416efdd57ffad11cb3c866aa143a9254bd33 | [
"MIT"
] | 4 | 2018-11-01T14:24:06.000Z | 2021-02-16T18:25:16.000Z | SCRIPTS/script14.py | oasys-kit/ShadowOui-Tutorial | 50e9416efdd57ffad11cb3c866aa143a9254bd33 | [
"MIT"
] | 1 | 2019-05-30T20:29:30.000Z | 2019-05-30T20:29:30.000Z | SCRIPTS/script14.py | oasys-kit/ShadowOui-Tutorial | 50e9416efdd57ffad11cb3c866aa143a9254bd33 | [
"MIT"
] | 5 | 2019-06-13T03:42:28.000Z | 2021-12-04T17:04:32.000Z | #create file myaperture.dat needed for source optimization
f = open("myaperture.dat",'w')
f.write(" 50.0 -0.002 0.002 -0.002 0.002")
f.close()
print("File written to disk: myaperture.dat")
| 33.166667 | 58 | 0.678392 | #create file myaperture.dat needed for source optimization
f = open("myaperture.dat",'w')
f.write(" 50.0 -0.002 0.002 -0.002 0.002")
f.close()
print("File written to disk: myaperture.dat")
| 0 | 0 | 0 |
f94d644e8fe326f1ac3d7e60411ecb5a9f795961 | 2,435 | py | Python | sql_app/schemas/schemas_invitation.py | l-vincent-l/fastapi-boilerplate | d9530e7f1d7fe4d79e11c08e0b86da6e62592f32 | [
"MIT"
] | 3 | 2021-04-02T14:35:17.000Z | 2022-03-04T14:40:26.000Z | sql_app/schemas/schemas_invitation.py | l-vincent-l/fastapi-boilerplate | d9530e7f1d7fe4d79e11c08e0b86da6e62592f32 | [
"MIT"
] | 1 | 2021-09-20T09:23:57.000Z | 2021-09-20T09:25:40.000Z | sql_app/schemas/schemas_invitation.py | l-vincent-l/fastapi-boilerplate | d9530e7f1d7fe4d79e11c08e0b86da6e62592f32 | [
"MIT"
] | 1 | 2022-01-21T16:27:14.000Z | 2022-01-21T16:27:14.000Z | print(">>>>>> import schemas_invitation.py > Invitation ...")
from typing import List, Optional, Any
import datetime
from pydantic import BaseModel, EmailStr
# from uuid import UUID
from .schemas_choices import ItemType, InvitationStatus, InviteeType, InvitationStatusAction
from .schemas_auths import AuthsInfosBasic... | 22.971698 | 92 | 0.765092 | print(">>>>>> import schemas_invitation.py > Invitation ...")
from typing import List, Optional, Any
import datetime
from pydantic import BaseModel, EmailStr
# from uuid import UUID
from .schemas_choices import ItemType, InvitationStatus, InviteeType, InvitationStatusAction
from .schemas_auths import AuthsInfosBasic... | 0 | 1,656 | 276 |
b468c6206281ac95b1aee98e564195c11c66b966 | 958 | py | Python | tests/test_vessel_class_filter.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 10 | 2020-09-29T06:36:45.000Z | 2022-03-14T18:15:50.000Z | tests/test_vessel_class_filter.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 53 | 2020-10-08T10:05:00.000Z | 2022-03-29T14:21:18.000Z | tests/test_vessel_class_filter.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 5 | 2020-09-25T07:48:04.000Z | 2021-11-23T07:08:56.000Z | import pytest
from signal_ocean import VesselClassFilter
from .builders import create_vessel_class
@pytest.mark.parametrize(
'name_like',
[
'matching name', 'matching', 'name', 'mat', 'me', 'ing na',
'MATCHING NAME', 'MATCHING', 'NAME', 'MAT', 'ME', 'ING NA',
'mAtchiNG NamE', 'Matchi... | 29.030303 | 67 | 0.696242 | import pytest
from signal_ocean import VesselClassFilter
from .builders import create_vessel_class
def test_does_not_filter_anything_by_default():
vessel_class_filter = VesselClassFilter()
unfiltered = [create_vessel_class(1), create_vessel_class(2)]
filtered = vessel_class_filter._apply(unfiltered)
... | 537 | 0 | 45 |
1c456142bbc95af7e87173cb0cb84afd5f28b013 | 929 | py | Python | interprete/src/models/gpt/example.py | serjtroshin/PLBART | 58e5de3041a2fc8b98e54648c6489fb3c23db9cb | [
"MIT"
] | null | null | null | interprete/src/models/gpt/example.py | serjtroshin/PLBART | 58e5de3041a2fc8b98e54648c6489fb3c23db9cb | [
"MIT"
] | null | null | null | interprete/src/models/gpt/example.py | serjtroshin/PLBART | 58e5de3041a2fc8b98e54648c6489fb3c23db9cb | [
"MIT"
] | null | null | null | # from transformers import pipeline
# generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B')
# generator("EleutherAI has", do_sample=True, min_length=50)
# [{'generated_text': 'EleutherAI has made a commitment to create new software packages for each of its major clients and has'}]
from transformers... | 42.227273 | 128 | 0.779333 | # from transformers import pipeline
# generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B')
# generator("EleutherAI has", do_sample=True, min_length=50)
# [{'generated_text': 'EleutherAI has made a commitment to create new software packages for each of its major clients and has'}]
from transformers... | 0 | 0 | 0 |
f06f432978e16d74cb920eb585b1eabcd866ddb6 | 946 | py | Python | sheet.py | albertuscrs/atlink | 5ee1482871d5337214fa37ffc168766caaf01dba | [
"MIT"
] | null | null | null | sheet.py | albertuscrs/atlink | 5ee1482871d5337214fa37ffc168766caaf01dba | [
"MIT"
] | null | null | null | sheet.py | albertuscrs/atlink | 5ee1482871d5337214fa37ffc168766caaf01dba | [
"MIT"
] | null | null | null | import gspread
from oauth2client.service_account import ServiceAccountCredentials
from datetime import datetime
from pprint import pprint
import pytz
import locale
import sys
import process
sys.path.insert(0,'./process.py')
#set locale
locale.setlocale(locale.LC_TIME, 'id_ID.UTF-8')
#Set up credentials
scope = ["http... | 30.516129 | 181 | 0.77907 | import gspread
from oauth2client.service_account import ServiceAccountCredentials
from datetime import datetime
from pprint import pprint
import pytz
import locale
import sys
import process
sys.path.insert(0,'./process.py')
#set locale
locale.setlocale(locale.LC_TIME, 'id_ID.UTF-8')
#Set up credentials
scope = ["http... | 0 | 0 | 0 |
a255e4ef851b5ce35cf88229286c05b98240f3b3 | 4,433 | py | Python | tests/halfvec_cudatest.py | fthaler/dace | ba2b703f142c6b6d37c7ca3f20c268bc50c6c7a8 | [
"BSD-3-Clause"
] | null | null | null | tests/halfvec_cudatest.py | fthaler/dace | ba2b703f142c6b6d37c7ca3f20c268bc50c6c7a8 | [
"BSD-3-Clause"
] | null | null | null | tests/halfvec_cudatest.py | fthaler/dace | ba2b703f142c6b6d37c7ca3f20c268bc50c6c7a8 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved.
""" Tests for half-precision syntax quirks. """
import dace
import math
import numpy as np
from dace.transformation.dataflow import MapFusion, Vectorization
from dace.transformation.optimizer import Optimizer
N = dace.symbol('N')
def _test_... | 30.572414 | 80 | 0.600947 | # Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved.
""" Tests for half-precision syntax quirks. """
import dace
import math
import numpy as np
from dace.transformation.dataflow import MapFusion, Vectorization
from dace.transformation.optimizer import Optimizer
N = dace.symbol('N')
def _test_... | 1,134 | 0 | 130 |