hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | 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.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a16e423d68f797d4114932597c712fd4a3f1133 | 510 | py | Python | script_for_creating_gif.py | grifguitar/ml-advanced | db31344ddc0ec3870adbddb3d558c6b977b890a9 | [
"Apache-2.0"
] | 1 | 2021-11-04T14:29:10.000Z | 2021-11-04T14:29:10.000Z | script_for_creating_gif.py | grifguitar/ml-advanced | db31344ddc0ec3870adbddb3d558c6b977b890a9 | [
"Apache-2.0"
] | null | null | null | script_for_creating_gif.py | grifguitar/ml-advanced | db31344ddc0ec3870adbddb3d558c6b977b890a9 | [
"Apache-2.0"
] | null | null | null | import imageio
import os
def item_to_int(item):
lst = item.split('_')
lst = lst[2].split('.')
return int(lst[0])
def solve():
# Build GIF
with imageio.get_writer('new_gif.gif', mode='I') as writer:
files = [filename for filename in os.listdir('images1/')]
files.sort(key=item_to_i... | 20.4 | 65 | 0.598039 |
4a16e43f408e80ba517e72e20d5758f4d0f3cade | 22,119 | py | Python | joypy/joyplot.py | sbebo/joypy | fb74cb6c725199cca4f5260fdbc0a90ff579c7f3 | [
"MIT"
] | 342 | 2017-08-02T05:59:57.000Z | 2021-05-29T13:10:54.000Z | joypy/joyplot.py | sbebo/joypy | fb74cb6c725199cca4f5260fdbc0a90ff579c7f3 | [
"MIT"
] | 48 | 2017-08-04T19:50:18.000Z | 2021-04-08T11:30:37.000Z | joypy/joyplot.py | sbebo/joypy | fb74cb6c725199cca4f5260fdbc0a90ff579c7f3 | [
"MIT"
] | 39 | 2017-09-01T06:33:59.000Z | 2021-05-06T08:28:39.000Z | import numpy as np
from scipy.stats import gaussian_kde
import scipy.stats as stats
import warnings
try:
# pandas < 0.25
from pandas.plotting._tools import (_subplots, _flatten)
except ImportError:
try:
#pandas >= 0.25, <1.2.0
from pandas.plotting._matplotlib.tools import (_subplots, _flat... | 37.745734 | 138 | 0.584656 |
4a16e48913cd68bcf417c169036ec9c94784c054 | 238 | py | Python | src/start_signal.py | bandrewss/pi-atem-tallies | 0fccc061be418adb0e78d582c3d18e9278e30400 | [
"Unlicense"
] | null | null | null | src/start_signal.py | bandrewss/pi-atem-tallies | 0fccc061be418adb0e78d582c3d18e9278e30400 | [
"Unlicense"
] | null | null | null | src/start_signal.py | bandrewss/pi-atem-tallies | 0fccc061be418adb0e78d582c3d18e9278e30400 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python3
import time
import tally_common as tc
def main():
tc.init_leds()
for i in range(3):
tc.PROGRAM_LED.on()
time.sleep(.5)
tc.PROGRAM_LED.off()
time.sleep(.5)
#FOR
#DEF
if __name__ == "__main__":
main()
#IF
| 11.9 | 26 | 0.655462 |
4a16e5076d4752b92292d0684af67de921484b73 | 1,970 | py | Python | REDSI_1160929_1161573/boost_1_67_0/libs/python/test/opaque.py | Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo | eb0f7ef64e188fe871f47c2ef9cdef36d8a66bc8 | [
"MIT"
] | 32 | 2019-02-27T06:57:07.000Z | 2021-08-29T10:56:19.000Z | REDSI_1160929_1161573/boost_1_67_0/libs/python/test/opaque.py | Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo | eb0f7ef64e188fe871f47c2ef9cdef36d8a66bc8 | [
"MIT"
] | 1 | 2019-03-04T11:21:00.000Z | 2019-05-24T01:36:31.000Z | REDSI_1160929_1161573/boost_1_67_0/libs/python/test/opaque.py | Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo | eb0f7ef64e188fe871f47c2ef9cdef36d8a66bc8 | [
"MIT"
] | 5 | 2019-08-20T13:45:04.000Z | 2022-03-01T18:23:49.000Z | # -*- coding: utf-8 -*-
# Copyright Gottfried Ganßauge 2003..2006. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
"""
>>> from opaque_ext import *
Check for correct conversion
>>> use(get())... | 22.386364 | 72 | 0.613198 |
4a16e5478f3d102091954d7db7f434a6f2b956b0 | 857 | py | Python | corsheaders/defaults.py | imtapps/django-cors-headers | fc6726ceab125aee77d74845aee54ec92e94c576 | [
"MIT"
] | null | null | null | corsheaders/defaults.py | imtapps/django-cors-headers | fc6726ceab125aee77d74845aee54ec92e94c576 | [
"MIT"
] | null | null | null | corsheaders/defaults.py | imtapps/django-cors-headers | fc6726ceab125aee77d74845aee54ec92e94c576 | [
"MIT"
] | null | null | null | from django.conf import settings
default_headers = (
'x-requested-with',
'content-type',
'accept',
'origin',
'authorization',
)
CORS_ALLOW_HEADERS = getattr(settings, 'CORS_ALLOW_HEADERS', default_headers)
default_methods = (
'GET',
'POST',
'PUT',
'PATCH',
'DELETE',
'OPTION... | 25.969697 | 82 | 0.743291 |
4a16e669a548105c8bf6870655f028ae644f33e9 | 21,356 | py | Python | dfirtrack_main/exporter/spreadsheet/xls.py | cclauss/dfirtrack | 2a307c5fe82e927b3c229a20a02bc0c7a5d66d9a | [
"Apache-2.0"
] | null | null | null | dfirtrack_main/exporter/spreadsheet/xls.py | cclauss/dfirtrack | 2a307c5fe82e927b3c229a20a02bc0c7a5d66d9a | [
"Apache-2.0"
] | null | null | null | dfirtrack_main/exporter/spreadsheet/xls.py | cclauss/dfirtrack | 2a307c5fe82e927b3c229a20a02bc0c7a5d66d9a | [
"Apache-2.0"
] | null | null | null | from time import strftime
from urllib.parse import urlencode, urlunparse
import xlwt
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import redirect
from django.urls import reverse
from django.utils import timezone
from dfirtrack_config.models impor... | 31.359765 | 147 | 0.628676 |
4a16e7ca783ce5c1dc52e1170bb94d4fa749f561 | 2,838 | py | Python | ibis/backends/impala/tests/test_parquet_ddl.py | arielrossanigo/ibis | 18e967cac961285b05d8df560f40148bac1a2571 | [
"Apache-2.0"
] | 1 | 2021-07-14T12:27:34.000Z | 2021-07-14T12:27:34.000Z | ibis/backends/impala/tests/test_parquet_ddl.py | arielrossanigo/ibis | 18e967cac961285b05d8df560f40148bac1a2571 | [
"Apache-2.0"
] | 1 | 2021-03-25T14:07:29.000Z | 2021-03-25T14:07:29.000Z | ibis/backends/impala/tests/test_parquet_ddl.py | arielrossanigo/ibis | 18e967cac961285b05d8df560f40148bac1a2571 | [
"Apache-2.0"
] | 1 | 2017-11-30T13:32:23.000Z | 2017-11-30T13:32:23.000Z | from posixpath import join as pjoin
import pytest
import ibis
from ibis.backends.impala.compat import HS2Error
from ibis.tests.util import assert_equal
pytestmark = pytest.mark.impala
def test_cleanup_tmp_table_on_gc(con, test_data_dir):
import gc
hdfs_path = pjoin(test_data_dir, 'parquet/tpch_region')
... | 25.115044 | 78 | 0.652572 |
4a16e83e44d33f0335fd97e5e01e10846316d79f | 6,720 | py | Python | venv/lib/python3.7/site-packages/openpyxl/descriptors/serialisable.py | Jarzan/KennedyJumpstart | 8174ecd30de034b7d242f364fd18f8d9ccc53ab2 | [
"MIT"
] | 1 | 2019-12-15T01:44:17.000Z | 2019-12-15T01:44:17.000Z | venv/lib/python3.7/site-packages/openpyxl/descriptors/serialisable.py | Jarzan/KennedyJumpstart | 8174ecd30de034b7d242f364fd18f8d9ccc53ab2 | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/openpyxl/descriptors/serialisable.py | Jarzan/KennedyJumpstart | 8174ecd30de034b7d242f364fd18f8d9ccc53ab2 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
# copyright openpyxl 2010-2015
from copy import copy
from keyword import kwlist
KEYWORDS = frozenset(kwlist)
from . import Descriptor
from . import _Serialiasable
from .sequence import Sequence, NestedSequence
from .namespace import namespaced
from openpyxl.compat import safe_s... | 29.866667 | 75 | 0.533185 |
4a16e89fcb83d61bef88e159403d4ac6f6606de7 | 11,947 | py | Python | fixture/contact.py | spirit-87/python_training | f2e2389ba4e96139d666365abecf16a2db89cd6e | [
"Apache-2.0"
] | null | null | null | fixture/contact.py | spirit-87/python_training | f2e2389ba4e96139d666365abecf16a2db89cd6e | [
"Apache-2.0"
] | null | null | null | fixture/contact.py | spirit-87/python_training | f2e2389ba4e96139d666365abecf16a2db89cd6e | [
"Apache-2.0"
] | null | null | null | from selenium.webdriver.support.ui import Select
from model.contact import Contact
import re
class ContactHelper:
def __init__(self, app):
self.app = app
def open_newcontact_page(self):
wd = self.app.wd
wd.find_element_by_link_text("add new").click()
def create(self, contact):
... | 40.225589 | 146 | 0.646522 |
4a16e8fbb875b76cb5d3cebb01d8705872c77f49 | 235 | py | Python | tools/cross_check_tool/cross_check_tool.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 1 | 2021-10-21T03:04:16.000Z | 2021-10-21T03:04:16.000Z | tools/cross_check_tool/cross_check_tool.py | thomas-yanxin/openvino | 031e998a15ec738c64cc2379d7f30fb73087c272 | [
"Apache-2.0"
] | 58 | 2020-11-06T12:13:45.000Z | 2022-03-28T13:20:11.000Z | tools/cross_check_tool/cross_check_tool.py | thomas-yanxin/openvino | 031e998a15ec738c64cc2379d7f30fb73087c272 | [
"Apache-2.0"
] | 4 | 2021-09-29T20:44:49.000Z | 2021-10-20T13:02:12.000Z | #!/usr/bin/python3
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import sys
from openvino.tools.cross_check_tool.cross_check_tool import main
if __name__ == "__main__":
sys.exit(main() or 0)
| 19.583333 | 65 | 0.748936 |
4a16e986e164f6c09aed6b6aa6b8ebd46d6b9c62 | 1,361 | py | Python | Lib/site-packages/braintree/sub_merchant_account/sub_merchant_account.py | shashank7991/eBuy | 2e65572967b33e7205b38c048b7be2d9943173b6 | [
"MIT"
] | null | null | null | Lib/site-packages/braintree/sub_merchant_account/sub_merchant_account.py | shashank7991/eBuy | 2e65572967b33e7205b38c048b7be2d9943173b6 | [
"MIT"
] | null | null | null | Lib/site-packages/braintree/sub_merchant_account/sub_merchant_account.py | shashank7991/eBuy | 2e65572967b33e7205b38c048b7be2d9943173b6 | [
"MIT"
] | null | null | null | from braintree.configuration import Configuration
from braintree.resource import Resource
from braintree.sub_merchant_account import ContactDetails, BusinessDetails, FundingDetails
class SubMerchantAccount(Resource):
class Status(object):
Pending = "pending"
def __init__(self, gateway, attributes):
... | 34.025 | 99 | 0.68626 |
4a16ea1cc9cdaf4ae02bedd5e69369238283c8af | 23,091 | py | Python | pgAdmin4/pgAdmin4/lib/python2.7/site-packages/pgadmin4/pgadmin/__init__.py | Anillab/One-Minute-Pitch | 123f7b2010d3ae0f031066db1bcfe6eda7a41e84 | [
"MIT"
] | null | null | null | pgAdmin4/pgAdmin4/lib/python2.7/site-packages/pgadmin4/pgadmin/__init__.py | Anillab/One-Minute-Pitch | 123f7b2010d3ae0f031066db1bcfe6eda7a41e84 | [
"MIT"
] | null | null | null | pgAdmin4/pgAdmin4/lib/python2.7/site-packages/pgadmin4/pgadmin/__init__.py | Anillab/One-Minute-Pitch | 123f7b2010d3ae0f031066db1bcfe6eda7a41e84 | [
"MIT"
] | null | null | null | ##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2018, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
"""The main pgAdm... | 39.539384 | 121 | 0.54177 |
4a16eb03edd3392ecf17460d78de98d9e1ff2dbd | 3,087 | py | Python | src/helpers.py | sul-dlss-labs/biology-fast-etds | a928d74fd6d2533a9ee4fa7bb8d8d3c33f0966e5 | [
"Apache-2.0"
] | null | null | null | src/helpers.py | sul-dlss-labs/biology-fast-etds | a928d74fd6d2533a9ee4fa7bb8d8d3c33f0966e5 | [
"Apache-2.0"
] | null | null | null | src/helpers.py | sul-dlss-labs/biology-fast-etds | a928d74fd6d2533a9ee4fa7bb8d8d3c33f0966e5 | [
"Apache-2.0"
] | null | null | null | __license__ = "Apache 2"
from streamlit.report_thread import get_report_ctx
from streamlit.hashing import _CodeHasher
from streamlit.server.server import Server
import requests
import datetime
import json
import socket
import uuid
import sys
class _SessionState:
def __init__(self, session, hash_funcs):
"... | 32.15625 | 97 | 0.620991 |
4a16eb3e2eaee5152fad526986d290aede1d23ad | 4,228 | py | Python | tests/test_tasklist.py | threefoldtech/0-robot | 80b9912b77782a0d2277cbfa98cc672a5ef1e88e | [
"Apache-2.0"
] | null | null | null | tests/test_tasklist.py | threefoldtech/0-robot | 80b9912b77782a0d2277cbfa98cc672a5ef1e88e | [
"Apache-2.0"
] | 63 | 2018-08-01T13:38:44.000Z | 2019-12-09T09:31:31.000Z | tests/test_tasklist.py | threefoldtech/0-robot | 80b9912b77782a0d2277cbfa98cc672a5ef1e88e | [
"Apache-2.0"
] | null | null | null | import os
import shutil
import tempfile
import unittest
from zerorobot import service_collection as scol
from zerorobot import config
from zerorobot.task import (PRIORITY_NORMAL, PRIORITY_SYSTEM, Task, TaskList,
TaskNotFoundError)
from zerorobot.template_collection import _load_template
c... | 30.417266 | 146 | 0.603122 |
4a16ed02617a828b378707c3355b14ee529d97b9 | 665 | py | Python | tests/modules/events/retrieve/integration/test_sql_events_repository_retrieve.py | alice-biometrics/petisco-task-manager | 2bad52013ab122f8c3e5dce740dcd154883e6940 | [
"MIT"
] | 1 | 2020-04-14T18:12:11.000Z | 2020-04-14T18:12:11.000Z | tests/modules/events/retrieve/integration/test_sql_events_repository_retrieve.py | alice-biometrics/petisco-task-manager | 2bad52013ab122f8c3e5dce740dcd154883e6940 | [
"MIT"
] | 3 | 2020-04-20T10:35:26.000Z | 2020-06-15T07:45:59.000Z | tests/modules/events/retrieve/integration/test_sql_events_repository_retrieve.py | alice-biometrics/petisco-task-manager | 2bad52013ab122f8c3e5dce740dcd154883e6940 | [
"MIT"
] | 1 | 2021-03-12T13:48:01.000Z | 2021-03-12T13:48:01.000Z | import pytest
from meiga.assertions import assert_success
@pytest.mark.integration
def test_should_retrieve_events_successfully(
taskmanager_sql_database, given_a_sql_event_repository_with_some_events
):
repository = given_a_sql_event_repository_with_some_events
result = repository.retrieve_all()
as... | 25.576923 | 75 | 0.821053 |
4a16ed129d82417c63a9ece1240eb56c0e0d0b53 | 126,670 | py | Python | scripts/rpc.py | changpe1/spdk | 20e9265e81708bddfc8cc58009e47538cb159889 | [
"BSD-3-Clause"
] | null | null | null | scripts/rpc.py | changpe1/spdk | 20e9265e81708bddfc8cc58009e47538cb159889 | [
"BSD-3-Clause"
] | null | null | null | scripts/rpc.py | changpe1/spdk | 20e9265e81708bddfc8cc58009e47538cb159889 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
from rpc.client import print_dict, print_json, JSONRPCException
from rpc.helpers import deprecated_aliases
import logging
import argparse
import rpc
import sys
import shlex
import json
try:
from shlex import quote
except ImportError:
from pipes import quote
def print_array(a):
pr... | 53.8792 | 139 | 0.609158 |
4a16ed5eee277d9950d43d4ca67faa59124bb264 | 196 | py | Python | lab5/03_date.py | outfrost/os-labs | f99ebb5c528f916736d225b15b50698cb1e12f4e | [
"Unlicense"
] | null | null | null | lab5/03_date.py | outfrost/os-labs | f99ebb5c528f916736d225b15b50698cb1e12f4e | [
"Unlicense"
] | null | null | null | lab5/03_date.py | outfrost/os-labs | f99ebb5c528f916736d225b15b50698cb1e12f4e | [
"Unlicense"
] | null | null | null | #!/usr/bin/python3
import sys
import re
pattern = re.compile(r"11[-/.]0?6[-/.](20)?18")
while True:
line = sys.stdin.readline()
if not line:
break
print(pattern.match(line))
| 16.333333 | 47 | 0.607143 |
4a16ed7224030df965755b9d259e579d047c2f69 | 149 | py | Python | tests/unit/mock/config/compliance/config_section_not_parsed/cisco_ios/ios_basic_feature.py | vivekvashist/netutils | c2d75178d2613a44f070f55ef94e11866eef8f36 | [
"Apache-2.0"
] | 91 | 2021-05-13T18:14:57.000Z | 2022-03-22T14:36:38.000Z | tests/unit/mock/config/compliance/config_section_not_parsed/cisco_ios/ios_basic_feature.py | vivekvashist/netutils | c2d75178d2613a44f070f55ef94e11866eef8f36 | [
"Apache-2.0"
] | 61 | 2021-05-15T00:49:31.000Z | 2022-03-28T06:08:52.000Z | tests/unit/mock/config/compliance/config_section_not_parsed/cisco_ios/ios_basic_feature.py | vivekvashist/netutils | c2d75178d2613a44f070f55ef94e11866eef8f36 | [
"Apache-2.0"
] | 26 | 2021-05-13T23:51:40.000Z | 2022-03-31T12:30:11.000Z | features = [
{"name": "bgp", "ordered": True, "section": ["router bgp "]},
{"name": "snmp", "ordered": True, "section": ["snmp-server "]},
]
| 29.8 | 67 | 0.52349 |
4a16ee115f647a94cf68d9c680beaf07b9f3ff6b | 1,806 | py | Python | pyfmodex/structobject.py | bbbart/pyfmodex | b3f89fdb40ecebe528b229a3c5310ec7d7f66f55 | [
"MIT"
] | 19 | 2015-02-01T08:26:25.000Z | 2021-11-18T02:32:29.000Z | pyfmodex/structobject.py | tyrylu/pyfmodex | b3f89fdb40ecebe528b229a3c5310ec7d7f66f55 | [
"MIT"
] | 32 | 2015-01-10T07:20:59.000Z | 2021-12-29T20:28:58.000Z | pyfmodex/structobject.py | bbbart/pyfmodex | b3f89fdb40ecebe528b229a3c5310ec7d7f66f55 | [
"MIT"
] | 12 | 2015-01-05T07:54:42.000Z | 2021-03-27T12:21:47.000Z | """A dict like object.
Implementation from http://benlast.livejournal.com/12301.html with unnecessary
zope security flag removed.
"""
class Structobject:
"""A 'bag' with keyword initialization, dict-semantics emulation and key
iteration.
"""
def __init__(self, **kw):
"""Initialize, and set a... | 26.173913 | 78 | 0.576966 |
4a16ef06d150caea365807fa52073c409cdd41b3 | 35,981 | py | Python | scripts/experiments/text_classification/train.py | antoilouis/netbert | ccd37ef8a1727557de74498132eea24db2135940 | [
"MIT"
] | 2 | 2021-01-29T01:30:51.000Z | 2021-07-14T16:47:15.000Z | scripts/experiments/text_classification/train.py | antoilouis/netbert | ccd37ef8a1727557de74498132eea24db2135940 | [
"MIT"
] | null | null | null | scripts/experiments/text_classification/train.py | antoilouis/netbert | ccd37ef8a1727557de74498132eea24db2135940 | [
"MIT"
] | null | null | null | import json
import argparse
import sys
import time
import datetime
import random
import os
import itertools
import statistics
from tqdm import tqdm
from collections import Counter
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sn
import torch
from torch.utils.data import Tens... | 44.366215 | 190 | 0.619577 |
4a16f216eebe66d044227543804c52f98fcd716c | 18 | py | Python | PyBlokusTools/pyblokustools/version.py | HenrikThoroe/SWC-2021 | 8e7eee25e3a6fda7e863591b05fa161d8a2ebc78 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | PyBlokusTools/pyblokustools/version.py | HenrikThoroe/SWC-2021 | 8e7eee25e3a6fda7e863591b05fa161d8a2ebc78 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | PyBlokusTools/pyblokustools/version.py | HenrikThoroe/SWC-2021 | 8e7eee25e3a6fda7e863591b05fa161d8a2ebc78 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | VERSION = "1.3.4"
| 9 | 17 | 0.555556 |
4a16f30b585aa05308a78fa566522aba1b373df7 | 92 | py | Python | enthought/scripting/util.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/scripting/util.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/scripting/util.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from __future__ import absolute_import
from apptools.scripting.util import *
| 23 | 38 | 0.836957 |
4a16f354a1b6177485c8d6aa03310c969a1d5206 | 673 | py | Python | qwerty-hertz/_engine/command_list.py | ismaelithalo/QwertyHertz | 38b37d1d06fae41962dd3b114acc1cf4e9bb5b28 | [
"MIT"
] | null | null | null | qwerty-hertz/_engine/command_list.py | ismaelithalo/QwertyHertz | 38b37d1d06fae41962dd3b114acc1cf4e9bb5b28 | [
"MIT"
] | null | null | null | qwerty-hertz/_engine/command_list.py | ismaelithalo/QwertyHertz | 38b37d1d06fae41962dd3b114acc1cf4e9bb5b28 | [
"MIT"
] | null | null | null | # coding: iso-8859-1
with open('script/command_atalho_list.txt') as file:
print("\nComandos disponíveis:")
comandos = file.read().split('\n')
for x in range(len(comandos)):
comman = comandos[x].split(';')
print("\n")
for i in range(len(comman)):
if(i >... | 37.388889 | 71 | 0.435364 |
4a16f362fb19ab06e52212fecb0699a89dd32e33 | 1,812 | py | Python | PythonProjects/01-IntroductionToPython/src/m7_summary.py | csse120/csse120-public | 36a92f0f4300def62ff091a8e70756e24beedd20 | [
"MIT"
] | null | null | null | PythonProjects/01-IntroductionToPython/src/m7_summary.py | csse120/csse120-public | 36a92f0f4300def62ff091a8e70756e24beedd20 | [
"MIT"
] | null | null | null | PythonProjects/01-IntroductionToPython/src/m7_summary.py | csse120/csse120-public | 36a92f0f4300def62ff091a8e70756e24beedd20 | [
"MIT"
] | null | null | null | """
An exercise that summarizes what you have learned in this Session.
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Derek Whitley, their colleagues, and PUT_YOUR_NAME_HERE.
"""
###############################################################################
# TODO: 1.
# On Line 5 above,... | 46.461538 | 79 | 0.565673 |
4a16f3c8c357183c223f6daea33c80356c112294 | 398 | py | Python | backup/freq_study/scripts/indexize.py | stefanobellelli/nonce3vec | 50c17cea552afd85e78ebc12f97898995dafc3a8 | [
"MIT"
] | null | null | null | backup/freq_study/scripts/indexize.py | stefanobellelli/nonce3vec | 50c17cea552afd85e78ebc12f97898995dafc3a8 | [
"MIT"
] | 10 | 2018-07-18T03:15:23.000Z | 2018-09-13T16:19:06.000Z | backup/freq_study/scripts/indexize.py | stefanobellelli/nonce3vec | 50c17cea552afd85e78ebc12f97898995dafc3a8 | [
"MIT"
] | null | null | null | import sys, pickle
from lib import vecindex
src = 'source_logs/' + sys.argv[1] + '.log'
out = 'partial_indexes/' + sys.argv[1] + '_index.txt'
with open(src, 'r', errors='replace') as f:
f = f.read().replace('\n', '')
d = eval(f)
_, word = vecindex(d, 'word', 50000)
_, pos = vecindex(d, 'pos', 50000)
with open(ou... | 26.533333 | 53 | 0.600503 |
4a16f40d3633a61b3057ac3b699de9ebe7eadabb | 511 | py | Python | corehq/apps/data_interfaces/migrations/0013_createscheduleinstanceactiondefinition_scheduler_module_info.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 471 | 2015-01-10T02:55:01.000Z | 2022-03-29T18:07:18.000Z | corehq/apps/data_interfaces/migrations/0013_createscheduleinstanceactiondefinition_scheduler_module_info.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 14,354 | 2015-01-01T07:38:23.000Z | 2022-03-31T20:55:14.000Z | corehq/apps/data_interfaces/migrations/0013_createscheduleinstanceactiondefinition_scheduler_module_info.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 175 | 2015-01-06T07:16:47.000Z | 2022-03-29T13:27:01.000Z | # Generated by Django 1.10.7 on 2017-07-27 15:40
from django.db import migrations
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('data_interfaces', '0012_createscheduleinstanceactiondefinition_reset_case_property_name'),
]
operations = [
migrations.Add... | 24.333333 | 100 | 0.690802 |
4a16f4340c0a4d139d9f62d4f6c33b48a2a37c5e | 50,930 | py | Python | test/run_test.py | dreiss/pytorch | 46d27a53fe900ae53348904f6d4f90546a9d3009 | [
"Intel"
] | null | null | null | test/run_test.py | dreiss/pytorch | 46d27a53fe900ae53348904f6d4f90546a9d3009 | [
"Intel"
] | null | null | null | test/run_test.py | dreiss/pytorch | 46d27a53fe900ae53348904f6d4f90546a9d3009 | [
"Intel"
] | null | null | null | #!/usr/bin/env python3
import argparse
import copy
import csv
from datetime import datetime
import json
import modulefinder
import os
import shutil
import signal
import subprocess
import sys
import tempfile
import torch
from torch.utils import cpp_extension
from torch.testing._internal.common_utils import FILE_SCHEMA... | 38.848207 | 121 | 0.666267 |
4a16f4a88375544c777b75f8671ff5804fc593e9 | 1,085 | py | Python | structural-patterns/composite.py | someshchaturvedi/pythonic-design-patterns | 74ef0b1ad233bdf9f75f86afa1b8874228d88429 | [
"MIT"
] | 1 | 2018-08-02T12:16:20.000Z | 2018-08-02T12:16:20.000Z | structural-patterns/composite.py | someshchaturvedi/pythonic-design-patterns | 74ef0b1ad233bdf9f75f86afa1b8874228d88429 | [
"MIT"
] | null | null | null | structural-patterns/composite.py | someshchaturvedi/pythonic-design-patterns | 74ef0b1ad233bdf9f75f86afa1b8874228d88429 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
class Equipment(ABC):
@abstractmethod
def get_price(self):
pass
class Composite(Equipment):
def __init__(self):
self.equipments = []
def get_price(self):
price = 0
for e in self.equipments:
price = price + e.get_price()... | 18.706897 | 41 | 0.630415 |
4a16f4c27117e60d007940cab6e1c60122265dee | 27,430 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/operations/_private_endpoint_connections_operations.py | dubiety/azure-sdk-for-python | 62ffa839f5d753594cf0fe63668f454a9d87a346 | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/operations/_private_endpoint_connections_operations.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/operations/_private_endpoint_connections_operations.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 45.792988 | 263 | 0.685053 |
4a16f4f42d9f6adfdab0caaf25eec8ee1ba92c38 | 3,178 | py | Python | SciDataTool/Methods/DataND/_rebuild_symmetries.py | enjoyneer87/SciDataTool | 37ddc4071f1edb1270ee03e43595c3f943fb9bd8 | [
"Apache-2.0"
] | null | null | null | SciDataTool/Methods/DataND/_rebuild_symmetries.py | enjoyneer87/SciDataTool | 37ddc4071f1edb1270ee03e43595c3f943fb9bd8 | [
"Apache-2.0"
] | null | null | null | SciDataTool/Methods/DataND/_rebuild_symmetries.py | enjoyneer87/SciDataTool | 37ddc4071f1edb1270ee03e43595c3f943fb9bd8 | [
"Apache-2.0"
] | null | null | null | from SciDataTool.Functions.symmetries import (
rebuild_symmetries as rebuild_symmetries_fct,
)
from numpy import take
def _rebuild_symmetries(
self,
values,
axes_list,
):
"""Reconstructs the field of a Data object taking symmetries into account
Parameters
----------
self: Data
... | 32.428571 | 88 | 0.499371 |
4a16f599e827b44739b55ec04bdd8b8ee16266c8 | 508 | py | Python | src/disentangle/array.py | yukunchen113/disentangle | 91ddc19c52d9b910c40ff3bf5b4ed39002de95e6 | [
"MIT"
] | null | null | null | src/disentangle/array.py | yukunchen113/disentangle | 91ddc19c52d9b910c40ff3bf5b4ed39002de95e6 | [
"MIT"
] | 1 | 2021-01-18T04:41:23.000Z | 2021-01-18T04:41:23.000Z | src/disentangle/array.py | yukunchen113/disentangle | 91ddc19c52d9b910c40ff3bf5b4ed39002de95e6 | [
"MIT"
] | null | null | null | """
This module contains general tools to process and manipulate arrays.
"""
import numpy as np
def shuffle(*args, **kwargs):
"""
Takes in arrays of the same length in the 0th axis and shuffles them the same way
Args:
*args: numpy arrays.
**kwargs: numpy arrays.
Returns:
arrays in the same order as been p... | 20.32 | 82 | 0.688976 |
4a16f6216caa109ca1969fbae50875b7bbea8183 | 397 | py | Python | Essentials/spotify/models.py | KittLao/Essentials | 47eb04a52e5b3e41a1d0c91951aed84f5824b44f | [
"MIT"
] | null | null | null | Essentials/spotify/models.py | KittLao/Essentials | 47eb04a52e5b3e41a1d0c91951aed84f5824b44f | [
"MIT"
] | null | null | null | Essentials/spotify/models.py | KittLao/Essentials | 47eb04a52e5b3e41a1d0c91951aed84f5824b44f | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class SpotifyToken(models.Model):
user = models.CharField(max_length=50, unique=True)
created_at = models.DateTimeField(auto_now_add=True)
refresh_token = models.CharField(max_length=150)
access_token = models.CharField(max_length=150)
expires... | 39.7 | 56 | 0.768262 |
4a16f90958c804ed3192b018fe5b12b438ed904c | 2,774 | py | Python | app/core/settings.py | GonnaFlyMethod/django-core-template | 92596d00bb0a4725f2a3574dad14bfdd88d2e509 | [
"MIT"
] | null | null | null | app/core/settings.py | GonnaFlyMethod/django-core-template | 92596d00bb0a4725f2a3574dad14bfdd88d2e509 | [
"MIT"
] | null | null | null | app/core/settings.py | GonnaFlyMethod/django-core-template | 92596d00bb0a4725f2a3574dad14bfdd88d2e509 | [
"MIT"
] | null | null | null | import os
import environ
import sys
from pathlib import Path
root = environ.Path(__file__) - 2
env = environ.Env()
environ.Env.read_env(env_file=os.path.join(root, '.env'))
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
SITE_ROOT = root()
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abs... | 24.990991 | 91 | 0.694304 |
4a16f93b5d015a6c032822c3a2884149fb7a295b | 477 | py | Python | tests/test_util.py | grambank/pygrambank | 147f62d0f7b0b0c209f7beeb3cec1050089e492d | [
"Apache-2.0"
] | 2 | 2018-11-13T07:33:06.000Z | 2018-11-13T08:16:51.000Z | tests/test_util.py | grambank/pygrambank | 147f62d0f7b0b0c209f7beeb3cec1050089e492d | [
"Apache-2.0"
] | 51 | 2020-07-31T10:23:40.000Z | 2022-03-30T18:56:26.000Z | tests/test_util.py | glottobank/pygrambank | 158dadf9bfde946229e2317b40b93eb219b3a5ea | [
"Apache-2.0"
] | 2 | 2020-08-28T12:54:41.000Z | 2021-02-15T18:35:38.000Z | import pytest
from pygrambank import util
@pytest.mark.parametrize(
'fname,nrows',
[
('Other Coder_Lang [NOCODE_lang].xlsx', 2),
('Some One_Some Lang [NOCODE_xyz].csv', 0),
('The Other Coder_Language [iso].tsv', 1),
('Yet Another Coder_New Lang [abcd1234].xls', 0),
]
)
def... | 28.058824 | 75 | 0.631027 |
4a16f9442a2f6d76deac0e29c3eca790dfaa81e9 | 562 | py | Python | OnlineJudge/oj/production_settings.py | FrozenWhalePP/OnlineJudge | aec81292046b4a0896ff164565b490dc37bd91cb | [
"MIT"
] | 2 | 2020-03-07T02:26:00.000Z | 2020-06-01T15:03:17.000Z | OnlineJudge/oj/production_settings.py | FrozenWhalePP/OnlineJudge | aec81292046b4a0896ff164565b490dc37bd91cb | [
"MIT"
] | null | null | null | OnlineJudge/oj/production_settings.py | FrozenWhalePP/OnlineJudge | aec81292046b4a0896ff164565b490dc37bd91cb | [
"MIT"
] | null | null | null | from utils.shortcuts import get_env
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'HOST': get_env("POSTGRES_HOST", "oj-postgres"),
'PORT': get_env("POSTGRES_PORT", "5432"),
'NAME': get_env("POSTGRES_DB"),
'USER': get_env("POSTGRES_USE... | 23.416667 | 60 | 0.580071 |
4a16f9b4df2ebaf890ca6f2f408b82c343cbc832 | 904 | py | Python | demo/dask/sklearn_cpu_training.py | geraldagapov/xgboost | 9b8765a988936acb351ef5655c9daeb8f4923b03 | [
"Apache-2.0"
] | null | null | null | demo/dask/sklearn_cpu_training.py | geraldagapov/xgboost | 9b8765a988936acb351ef5655c9daeb8f4923b03 | [
"Apache-2.0"
] | null | null | null | demo/dask/sklearn_cpu_training.py | geraldagapov/xgboost | 9b8765a988936acb351ef5655c9daeb8f4923b03 | [
"Apache-2.0"
] | 1 | 2020-03-11T17:00:05.000Z | 2020-03-11T17:00:05.000Z | '''Dask interface demo:
Use scikit-learn regressor interface with CPU histogram tree method.'''
from dask.distributed import Client
from dask.distributed import LocalCluster
from dask import array as da
import xgboost
if __name__ == '__main__':
cluster = LocalCluster(n_workers=2, silence_logs=False) # or use any... | 29.16129 | 88 | 0.71792 |
4a16fb0b002dea08b5dc00abd90582e7939207ea | 925 | py | Python | setup.py | zubbyik/Property | 47a972d32899d36cafe82f9b2b414b3199c4a6fc | [
"MIT"
] | null | null | null | setup.py | zubbyik/Property | 47a972d32899d36cafe82f9b2b414b3199c4a6fc | [
"MIT"
] | null | null | null | setup.py | zubbyik/Property | 47a972d32899d36cafe82f9b2b414b3199c4a6fc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
import re, ast
# get version from __version__ variable in property/__init__.py
_version_re = re... | 30.833333 | 68 | 0.736216 |
4a16fbb67fe9f8fdec347d1a652c2c95708f0897 | 523 | py | Python | cookbook/migrations/0017_auto_20200216_2257.py | mhoellmann/recipes | 525aa4e4a4f218a47e1770498fff9fa8b0d7a097 | [
"MIT"
] | null | null | null | cookbook/migrations/0017_auto_20200216_2257.py | mhoellmann/recipes | 525aa4e4a4f218a47e1770498fff9fa8b0d7a097 | [
"MIT"
] | 1 | 2020-04-11T09:47:20.000Z | 2020-04-11T09:47:20.000Z | cookbook/migrations/0017_auto_20200216_2257.py | mcejp/recipes | 913d858473a1d44b2ced02e09fddfc4d320848b7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.2 on 2020-02-16 21:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0016_auto_20200213_2335'),
]
operations = [
migrations.AlterField(
model_name='userpreference',
name='th... | 27.526316 | 179 | 0.611855 |
4a16fc678e7fe028e86b298367875348ea7cd66f | 14,507 | py | Python | mltoolkit/mlmo/utils/tools/beam_search.py | stungkit/Copycat-abstractive-opinion-summarizer | 04fe5393a7bb6883516766b762f6a0c530e95375 | [
"MIT"
] | 51 | 2020-09-25T07:05:01.000Z | 2022-03-17T12:07:40.000Z | mltoolkit/mlmo/utils/tools/beam_search.py | stungkit/Copycat-abstractive-opinion-summarizer | 04fe5393a7bb6883516766b762f6a0c530e95375 | [
"MIT"
] | 4 | 2020-10-19T10:00:22.000Z | 2022-03-14T17:02:47.000Z | mltoolkit/mlmo/utils/tools/beam_search.py | stungkit/Copycat-abstractive-opinion-summarizer | 04fe5393a7bb6883516766b762f6a0c530e95375 | [
"MIT"
] | 22 | 2020-09-22T01:06:47.000Z | 2022-01-26T14:20:09.000Z | import torch as T
import numpy as np
from mltoolkit.mlmo.utils.helpers.search import traverse_table, find_mirror_next
EXCL_EPS = -1e20
class BeamSearch(object):
"""Wrapper over ONMT beam search that works over batches."""
def __init__(self, batch_size, beam_size, start_id, end_id, device='cpu',
... | 40.297222 | 93 | 0.585855 |
4a16fce57e525d7542a7b15a19451f6a8ffc1df0 | 304 | py | Python | tests/data/project1/file1.py | Polyconseil/check-oldies | 0d0d9632281d14f652e71ac2c0db3b0cbf9b089c | [
"BSD-3-Clause"
] | 4 | 2020-10-27T16:18:57.000Z | 2020-12-01T10:58:19.000Z | tests/data/project1/file1.py | Polyconseil/check-oldies | 0d0d9632281d14f652e71ac2c0db3b0cbf9b089c | [
"BSD-3-Clause"
] | 1 | 2020-11-18T14:04:10.000Z | 2020-11-18T15:29:44.000Z | tests/data/project1/file1.py | Polyconseil/check-oldies | 0d0d9632281d14f652e71ac2c0db3b0cbf9b089c | [
"BSD-3-Clause"
] | null | null | null | # TIMEBOMB: report me
a = 1 # TIMEBOMB (jsmith): report me
# TIMEBOMB: do not report me (pragma). # no-check-fixmes
# TIMEBOMB(jsmith - 2020-04-25): report me
a = "TIMEBOMB" # do not report me (within a string)
a = "TIMEBOMB" # do not report me (within a string)
# TIMEBOMB - FEWTURE-BOOM: report me
| 33.777778 | 56 | 0.680921 |
4a16fd380706fefa2713b9616514d2845128f420 | 926 | py | Python | oscar/lib/python2.7/site-packages/django/contrib/auth/migrations/0008_alter_user_username_max_length.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/auth/migrations/0008_alter_user_username_max_length.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/auth/migrations/0008_alter_user_username_max_length.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth import validators
from django.db import migrations, models
from django.utils import six
class Migration(migrations.Migration):
dependencies = [
('auth', '0007_alter_validators_add_error_messages'),
]... | 31.931034 | 120 | 0.592873 |
4a16fd3f6e7828aebed5c4024e3d89866e5c476f | 3,116 | py | Python | bboard/main/migrations/0001_initial.py | wiky-avis/bboard | aedcba95acece3d3e679ac269b5983decee80873 | [
"BSD-3-Clause"
] | null | null | null | bboard/main/migrations/0001_initial.py | wiky-avis/bboard | aedcba95acece3d3e679ac269b5983decee80873 | [
"BSD-3-Clause"
] | null | null | null | bboard/main/migrations/0001_initial.py | wiky-avis/bboard | aedcba95acece3d3e679ac269b5983decee80873 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 3.1.4 on 2020-12-07 11:42
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_m... | 66.297872 | 329 | 0.665597 |
4a16fd7960435fcbcd8446ea852f95a669d253e2 | 905 | py | Python | scripts/tabledef.py | Hela98/flaskex | 7f23109e721a223b4f54cd07a7f6c66a31b9be18 | [
"MIT"
] | null | null | null | scripts/tabledef.py | Hela98/flaskex | 7f23109e721a223b4f54cd07a7f6c66a31b9be18 | [
"MIT"
] | null | null | null | scripts/tabledef.py | Hela98/flaskex | 7f23109e721a223b4f54cd07a7f6c66a31b9be18 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
# Local
#SQLALCHEMY_DATABASE_URI = 'sqlite:///accounts.db'
# Heroku
SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL']
Base = dec... | 22.625 | 74 | 0.723757 |
4a16fdb082f3b00601948cb1b1a1a3b8e45feb92 | 12,841 | py | Python | Projects/2_Classical Planning/my_planning_graph.py | eminnett/artificial-intelligence | a7044b8a058a8ff24eb811ec2069aee96191cf8c | [
"MIT"
] | null | null | null | Projects/2_Classical Planning/my_planning_graph.py | eminnett/artificial-intelligence | a7044b8a058a8ff24eb811ec2069aee96191cf8c | [
"MIT"
] | null | null | null | Projects/2_Classical Planning/my_planning_graph.py | eminnett/artificial-intelligence | a7044b8a058a8ff24eb811ec2069aee96191cf8c | [
"MIT"
] | null | null | null |
from itertools import chain, combinations
from aimacode.planning import Action
from aimacode.utils import expr
from layers import BaseActionLayer, BaseLiteralLayer, makeNoOp, make_node
class ActionLayer(BaseActionLayer):
def _inconsistent_effects(self, actionA, actionB):
""" Return True if an effect of... | 37.879056 | 106 | 0.605249 |
4a16fdf6e6e261f6f6e931b13a5c3c990023809f | 4,285 | py | Python | setup.py | jayvdb/pip-plus | b4d5724f6898d6576b4a9aa3b0711432d2aa32f4 | [
"MIT"
] | 228 | 2018-07-08T07:12:13.000Z | 2020-09-05T11:53:23.000Z | setup.py | jayvdb/pip-plus | b4d5724f6898d6576b4a9aa3b0711432d2aa32f4 | [
"MIT"
] | 1 | 2019-12-16T02:44:08.000Z | 2019-12-16T02:44:08.000Z | setup.py | jayvdb/pip-plus | b4d5724f6898d6576b4a9aa3b0711432d2aa32f4 | [
"MIT"
] | 5 | 2018-07-21T16:46:39.000Z | 2020-06-30T23:08:48.000Z | import setuptools
from setuptools import find_packages, setup
# python setup.py bdist_wheel --universal
# twine upload dist/*
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="pip-plus",
version="0.0.1.dev4",
author="huohongming",
author_email="gin_huo@hotmai... | 35.708333 | 76 | 0.596499 |
4a16fe5628a5f6b91a1eabe2fa0696b7f52037e2 | 3,298 | py | Python | flask_resteasy/factories.py | mschenk42/flask-resteasy | e787c248a93eee1a4634b38fbcfdf747d8960849 | [
"BSD-3-Clause"
] | null | null | null | flask_resteasy/factories.py | mschenk42/flask-resteasy | e787c248a93eee1a4634b38fbcfdf747d8960849 | [
"BSD-3-Clause"
] | null | null | null | flask_resteasy/factories.py | mschenk42/flask-resteasy | e787c248a93eee1a4634b38fbcfdf747d8960849 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
"""
flask_resteasy.factories
~~~~~~~~~~~~~~~~~~~~~~~~
"""
from flask import request
from flask_resteasy.parsers import GetRequestParser
from flask_resteasy.parsers import PutRequestParser
from flask_resteasy.parsers import PostRequestParser
from flask_resteasy.parsers import DeleteRequestParser
... | 37.05618 | 78 | 0.673135 |
4a16fed22ccb319943196c419e33f3e1e6c87011 | 3,164 | py | Python | event_pubsub/alembic/versions/d8822b756c18_baseline.py | DhivakharVenkatachalam/snet-marketplace-service | 6aee606bc9b00d418caeae26c64deae03792e0ce | [
"MIT"
] | 14 | 2019-02-12T09:14:52.000Z | 2021-03-11T18:42:22.000Z | event_pubsub/alembic/versions/d8822b756c18_baseline.py | prashantramangupta/snet-marketplace-service | 7c293054e4b0207deefecc46defd743c064472a4 | [
"MIT"
] | 1,079 | 2019-01-10T04:31:24.000Z | 2022-03-29T06:16:42.000Z | event_pubsub/alembic/versions/d8822b756c18_baseline.py | prashantramangupta/snet-marketplace-service | 7c293054e4b0207deefecc46defd743c064472a4 | [
"MIT"
] | 20 | 2018-12-18T13:06:41.000Z | 2021-09-17T11:13:01.000Z | """baseline
Revision ID: d8822b756c18
Revises:
Create Date: 2019-09-18 14:33:54.629555
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = 'd8822b756c18'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
conn = op.get_bind()
conn.execute("""
CREA... | 29.849057 | 65 | 0.575853 |
4a16ffab2508ba13ee69093fcd7f1fec05042118 | 4,845 | py | Python | neptune/generated/swagger_client/models/payment.py | jiji-online/neptune-cli | 50cf680a80d141497f9331ab7cdaee49fcb90b0c | [
"Apache-2.0"
] | null | null | null | neptune/generated/swagger_client/models/payment.py | jiji-online/neptune-cli | 50cf680a80d141497f9331ab7cdaee49fcb90b0c | [
"Apache-2.0"
] | null | null | null | neptune/generated/swagger_client/models/payment.py | jiji-online/neptune-cli | 50cf680a80d141497f9331ab7cdaee49fcb90b0c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Copyright 2016 SmartBear Software
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 applica... | 23.75 | 77 | 0.534365 |
4a17003fded9f401cf27fa9abdbd6f6d341606e9 | 4,479 | py | Python | KTH_DataModule.py | CeeBeeTree/KTH-Action-Recognition | ec3a1290f13e7dc83b0db3dd5806ebd0c9c23a85 | [
"MIT"
] | null | null | null | KTH_DataModule.py | CeeBeeTree/KTH-Action-Recognition | ec3a1290f13e7dc83b0db3dd5806ebd0c9c23a85 | [
"MIT"
] | null | null | null | KTH_DataModule.py | CeeBeeTree/KTH-Action-Recognition | ec3a1290f13e7dc83b0db3dd5806ebd0c9c23a85 | [
"MIT"
] | null | null | null | import pytorch_lightning as pl
from torch._C import DisableTorchFunction
from torch.utils.data import Dataset, Subset, DataLoader
import imageio, cv2, torch, os, shutil
import numpy as np
class KTH_Dataset(Dataset):
categories = ["boxing", "handclapping", "handwaving","jogging", "running", "walking"]
def... | 46.65625 | 127 | 0.597678 |
4a17021a34fedbfd9dae7e00e435374c0e69c7b2 | 1,471 | py | Python | opencanary/modules/ntp.py | patron-it/opencanary | c6b59fbabd2655c235484dbb095a6c53cb3b61ab | [
"BSD-3-Clause"
] | 3 | 2019-01-11T14:45:31.000Z | 2021-02-07T21:49:54.000Z | opencanary/modules/ntp.py | patron-it/opencanary | c6b59fbabd2655c235484dbb095a6c53cb3b61ab | [
"BSD-3-Clause"
] | 12 | 2018-08-31T06:54:13.000Z | 2019-01-15T22:18:31.000Z | opencanary/modules/ntp.py | patron-it/opencanary | c6b59fbabd2655c235484dbb095a6c53cb3b61ab | [
"BSD-3-Clause"
] | 1 | 2018-11-13T19:26:31.000Z | 2018-11-13T19:26:31.000Z | from opencanary.modules import CanaryService
from zope.interface import implements
from twisted.application import internet
from twisted.internet.protocol import DatagramProtocol
from twisted.application.internet import UDPServer
from twisted.internet.address import IPv4Address
from twisted.internet import protocol
... | 35.02381 | 75 | 0.660775 |
4a170340a0a7c3b57e360e5382d0f22f595c991d | 59,027 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 7 | 2021-11-16T04:05:42.000Z | 2022-02-19T21:14:29.000Z | venv/lib/python3.6/site-packages/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2022-03-01T05:43:07.000Z | 2022-03-01T05:43:07.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | 34.438156 | 146 | 0.570315 |
4a1703881f79bdf0a617f3bdf28b0bb5f7f6b253 | 6,426 | py | Python | linear_algebra_by_j_borwnlee/ch_10/scribble_of_different_types_of_matrices.py | pavelexpertov/scribbles | 50ebcd6a686fd32be20d401563db7cc87781a428 | [
"MIT"
] | null | null | null | linear_algebra_by_j_borwnlee/ch_10/scribble_of_different_types_of_matrices.py | pavelexpertov/scribbles | 50ebcd6a686fd32be20d401563db7cc87781a428 | [
"MIT"
] | null | null | null | linear_algebra_by_j_borwnlee/ch_10/scribble_of_different_types_of_matrices.py | pavelexpertov/scribbles | 50ebcd6a686fd32be20d401563db7cc87781a428 | [
"MIT"
] | null | null | null | '''Purpose of the module is to describe different matrix types in code'''
import numpy as np
# Setting default random generator
rng = np.random.default_rng(12345)
def get_square_matrix(n, random=False, integer=1):
'''Return a square matrix with integer scalaras. Whether random or specified'''
if random:
... | 39.423313 | 119 | 0.676159 |
4a1703ab5508038456369928f932eb068a94c584 | 11,745 | py | Python | config/settings/base.py | devGW/cafeteria_back | fda99fbc838ee809b1ff28445d66cbd48e2b5016 | [
"MIT"
] | null | null | null | config/settings/base.py | devGW/cafeteria_back | fda99fbc838ee809b1ff28445d66cbd48e2b5016 | [
"MIT"
] | 1 | 2019-11-13T09:06:20.000Z | 2019-11-13T09:06:20.000Z | config/settings/base.py | devGW/PostApp | fda99fbc838ee809b1ff28445d66cbd48e2b5016 | [
"MIT"
] | null | null | null | """
Base settings to build other settings files upon.
"""
import environ
ROOT_DIR = (
environ.Path(__file__) - 3
) # (cafeteria/config/settings/base.py - 3 = cafeteria/)
APPS_DIR = ROOT_DIR.path("cafeteria")
env = environ.Env()
READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False)
if READ_DOT... | 37.765273 | 93 | 0.635419 |
4a1703adc34a324c0cfa35d535bb5c2a4612500c | 116,599 | py | Python | python/ccxt/phemex.py | ysdede/ccxt | c64cfdb0c364f4b965ef588bf67d1bdedad410a5 | [
"MIT"
] | 1 | 2021-01-12T07:03:55.000Z | 2021-01-12T07:03:55.000Z | python/ccxt/phemex.py | ysdede/ccxt | c64cfdb0c364f4b965ef588bf67d1bdedad410a5 | [
"MIT"
] | 3 | 2022-01-27T15:38:05.000Z | 2022-03-31T23:04:15.000Z | python/ccxt/phemex.py | RonSherfey/ccxt | c64cfdb0c364f4b965ef588bf67d1bdedad410a5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError
from cc... | 47.244327 | 371 | 0.492174 |
4a170401b8c93be66f6021e7df0cbca714bbe31c | 251 | py | Python | RMutils/__init__.py | AlecThomson/RM-Tools | c9107f12f46583f07ee6950f92a9ef0111dbd938 | [
"MIT"
] | 14 | 2020-07-20T07:09:50.000Z | 2022-03-11T03:26:13.000Z | RMutils/__init__.py | AlecThomson/RM-Tools | c9107f12f46583f07ee6950f92a9ef0111dbd938 | [
"MIT"
] | 38 | 2020-05-21T19:03:45.000Z | 2022-01-17T03:44:25.000Z | RMutils/__init__.py | AlecThomson/RM-Tools | c9107f12f46583f07ee6950f92a9ef0111dbd938 | [
"MIT"
] | 8 | 2020-06-01T14:23:07.000Z | 2022-01-28T19:05:52.000Z | #! /usr/bin/env python
"""Dependencies for RM utilities """
__all__ = ['mpfit',
'normalize',
'util_FITS',
'util_misc',
'util_plotFITS',
'util_plotTk',
'util_rec',
'util_RM']
| 22.818182 | 36 | 0.474104 |
4a1704bd9f3da491492173b6519959dd8c64daaf | 6,700 | py | Python | tfHelpers.py | edualvarado/Guided_fine_tuning_SVBRDF | fc8c1fd79abd9b6285f9d2ee8f810bd31ee5240c | [
"MIT"
] | null | null | null | tfHelpers.py | edualvarado/Guided_fine_tuning_SVBRDF | fc8c1fd79abd9b6285f9d2ee8f810bd31ee5240c | [
"MIT"
] | null | null | null | tfHelpers.py | edualvarado/Guided_fine_tuning_SVBRDF | fc8c1fd79abd9b6285f9d2ee8f810bd31ee5240c | [
"MIT"
] | null | null | null | #import tensorflow as tf
import numpy as np
#import tensorflow.contrib.slim as slim
#!!!If running TF v > 2.0 uncomment those lines (also remove the tensorflow import on line 1):!!!
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
def conv(batch_input, out_channels, stride, filterSize=4, initScale = 0.02, u... | 59.821429 | 284 | 0.682239 |
4a1704f9074b4a9f2cb6cb9a0abd919e6d157da9 | 18,708 | py | Python | golf/.~c9_invoke_XseC3l.py | kenrumer/scorekeeper | c7f22676e84dfdf6ca3361c6ff56719f68fce31f | [
"MIT"
] | null | null | null | golf/.~c9_invoke_XseC3l.py | kenrumer/scorekeeper | c7f22676e84dfdf6ca3361c6ff56719f68fce31f | [
"MIT"
] | null | null | null | golf/.~c9_invoke_XseC3l.py | kenrumer/scorekeeper | c7f22676e84dfdf6ca3361c6ff56719f68fce31f | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
from django.urls import reverse
class Tournament(models.Model):
"""
Model representing a Tournament, a set of tournament rounds
"""
name = models.CharField(max_length=200, verbose_name='Name', help_text='Enter the name of the tournament (e.g. Jo... | 65.184669 | 209 | 0.719371 |
4a17050a2db22187fa9625ac00d6b5c1ee2da50e | 3,124 | py | Python | virt_backup/config.py | sanminaben/virt-backup | 514decc6fa71e307f4e649104abbbffbbc6694a2 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | virt_backup/config.py | sanminaben/virt-backup | 514decc6fa71e307f4e649104abbbffbbc6694a2 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | virt_backup/config.py | sanminaben/virt-backup | 514decc6fa71e307f4e649104abbbffbbc6694a2 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | import appdirs
import errno
import logging
import os
import yaml
from virt_backup import APP_NAME
logger = logging.getLogger("virt_backup")
os.environ["XDG_CONFIG_DIRS"] = "/etc"
CONFIG_DIRS = (
appdirs.user_config_dir(APP_NAME),
appdirs.site_config_dir(APP_NAME),
)
CONFIG_FILENAME = "config.yml"
def get_... | 28.4 | 78 | 0.588668 |
4a17052ff158c84436c97db9d6334c0f563dc737 | 4,892 | py | Python | virtual/lib/python3.8/site-packages/asgiref/local.py | ShirQUillE-SandE/the-neighborhood-101 | fda09cb0481d1cd902f5e13b7ed61ed96772121d | [
"MIT"
] | 169 | 2022-01-04T06:46:48.000Z | 2022-03-31T07:17:59.000Z | virtual/lib/python3.8/site-packages/asgiref/local.py | ShirQUillE-SandE/the-neighborhood-101 | fda09cb0481d1cd902f5e13b7ed61ed96772121d | [
"MIT"
] | 212 | 2022-01-04T09:46:05.000Z | 2022-03-31T23:18:08.000Z | virtual/lib/python3.8/site-packages/asgiref/local.py | ShirQUillE-SandE/the-neighborhood-101 | fda09cb0481d1cd902f5e13b7ed61ed96772121d | [
"MIT"
] | 86 | 2022-01-04T06:32:30.000Z | 2022-03-30T13:05:51.000Z | import random
import string
import sys
import threading
import weakref
class Local:
"""
A drop-in replacement for threading.locals that also works with asyncio
Tasks (via the current_task asyncio method), and passes locals through
sync_to_async and async_to_sync.
Specifically:
- Locals work ... | 39.772358 | 86 | 0.630826 |
4a17056f584507f7874e3500f2b9d941e239a519 | 180 | py | Python | pygluu/__init__.py | WaqasAhmedLatif/cloud-native-edition | 1e6002f27ea971c153df59373e30d4506e9932dc | [
"Apache-2.0"
] | 23 | 2020-04-18T14:51:41.000Z | 2022-03-31T19:59:40.000Z | pygluu/__init__.py | danilosoarescardoso/cloud-native-edition | b8aa66119dc4440b1ca3741a4065c9ae7feb42fb | [
"Apache-2.0"
] | 236 | 2020-04-22T08:59:27.000Z | 2022-03-31T07:21:12.000Z | pygluu/__init__.py | danilosoarescardoso/cloud-native-edition | b8aa66119dc4440b1ca3741a4065c9ae7feb42fb | [
"Apache-2.0"
] | 23 | 2020-04-19T15:25:59.000Z | 2022-03-16T17:17:36.000Z | """
License terms and conditions for Gluu Cloud Native Edition:
https://www.apache.org/licenses/LICENSE-2.0
"""
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
| 25.714286 | 64 | 0.755556 |
4a1705afe118d492bea073496cbfd51c2537e635 | 9,255 | py | Python | monk/system_functionality_tests/pytorch/test_update_copy_from.py | take2rohit/monk_v1 | 9c567bf2c8b571021b120d879ba9edf7751b9f92 | [
"Apache-2.0"
] | 542 | 2019-11-10T12:09:31.000Z | 2022-03-28T11:39:07.000Z | monk/system_functionality_tests/pytorch/test_update_copy_from.py | take2rohit/monk_v1 | 9c567bf2c8b571021b120d879ba9edf7751b9f92 | [
"Apache-2.0"
] | 117 | 2019-11-12T09:39:24.000Z | 2022-03-12T00:20:41.000Z | monk/system_functionality_tests/pytorch/test_update_copy_from.py | take2rohit/monk_v1 | 9c567bf2c8b571021b120d879ba9edf7751b9f92 | [
"Apache-2.0"
] | 246 | 2019-11-09T21:53:24.000Z | 2022-03-29T00:57:07.000Z | import os
import sys
sys.path.append("../../../../monk_v1/");
sys.path.append("../../../monk/");
import psutil
from pytorch_prototype import prototype
from compare_prototype import compare
from common import print_start
from common import print_status
def test_update_copy_from(system_dict):
forward = True;
... | 34.662921 | 415 | 0.612642 |
4a170670786c0021df99f5862fba537af4fa506e | 2,542 | py | Python | swamp/wrappers/mtz2various.py | rigdenlab/SWAMP | 3e93ab27f4acf0124f7cb2d78a151cc3352b9c6e | [
"BSD-3-Clause"
] | 2 | 2020-02-15T11:06:34.000Z | 2020-04-10T08:48:49.000Z | swamp/wrappers/mtz2various.py | rigdenlab/SWAMP | 3e93ab27f4acf0124f7cb2d78a151cc3352b9c6e | [
"BSD-3-Clause"
] | 15 | 2020-02-04T10:56:07.000Z | 2021-02-12T09:11:03.000Z | swamp/wrappers/mtz2various.py | rigdenlab/SWAMP | 3e93ab27f4acf0124f7cb2d78a151cc3352b9c6e | [
"BSD-3-Clause"
] | 4 | 2020-02-04T13:25:09.000Z | 2022-03-23T13:44:17.000Z | import os
from pyjob import cexec
from swamp.parsers import MtzParser
from swamp.wrappers.wrapper import Wrapper
class Mtz2Various(Wrapper):
"""Wrapper around mtz2various
:param str workdir: working directory
:param str mtzin: mtz file name
:param str hklout: hkl output file name
:param `~swamp.l... | 34.351351 | 108 | 0.649489 |
4a1709539ca6216b57b126efba8f2ae003dc510a | 14,217 | py | Python | rootfs/usr/lib/python3/dist-packages/numpy/testing/noseclasses.py | kappaIO-Dev/kappaIO-sdk-armhf-crosscompile | 66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2 | [
"MIT"
] | null | null | null | rootfs/usr/lib/python3/dist-packages/numpy/testing/noseclasses.py | kappaIO-Dev/kappaIO-sdk-armhf-crosscompile | 66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2 | [
"MIT"
] | null | null | null | rootfs/usr/lib/python3/dist-packages/numpy/testing/noseclasses.py | kappaIO-Dev/kappaIO-sdk-armhf-crosscompile | 66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2 | [
"MIT"
] | null | null | null | # These classes implement a doctest runner plugin for nose, a "known failure"
# error class, and a customized TestProgram for NumPy.
# Because this module imports nose directly, it should not
# be used except by nosetester.py to avoid a general NumPy
# dependency on nose.
import os
import doctest
import nose
from no... | 40.389205 | 87 | 0.604136 |
4a170a4df586c240648149d5bc8691d5963da89e | 312 | gyp | Python | binding.gyp | UrielCh/rpio-pwm | 49140f2c90ee99e3615cf64997b1833ad4d14fa2 | [
"MIT"
] | 10 | 2018-05-27T16:46:04.000Z | 2021-07-27T02:51:42.000Z | binding.gyp | UrielCh/rpio-pwm | 49140f2c90ee99e3615cf64997b1833ad4d14fa2 | [
"MIT"
] | 8 | 2018-09-26T13:01:09.000Z | 2021-12-17T19:59:15.000Z | binding.gyp | UrielCh/rpio-pwm | 49140f2c90ee99e3615cf64997b1833ad4d14fa2 | [
"MIT"
] | 3 | 2018-09-15T01:01:42.000Z | 2021-08-22T03:24:11.000Z | {
"targets": [
{
"target_name": "rpiopwm",
"sources": [ "rpiopwm.cc", "pwm.cpp", "mailbox.c", "dma.cpp" ],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"/opt/vc/include"
],
"libraries": [
"-lbcm_host",
"-L/opt/vc/lib"
]
}
]
} | 19.5 | 69 | 0.407051 |
4a170a84db12950c4891f7c02f821e3fb5d7f507 | 1,775 | py | Python | openerp/addons/account/wizard/account_report_general_journal.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 3 | 2016-01-29T14:39:49.000Z | 2018-12-29T22:42:00.000Z | openerp/addons/account/wizard/account_report_general_journal.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 2 | 2016-03-23T14:29:41.000Z | 2017-02-20T17:11:30.000Z | openerp/addons/account/wizard/account_report_general_journal.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | 42.261905 | 153 | 0.655775 |
4a170b256bd56dfee7451f7552aa492e1eadf027 | 936 | py | Python | venv/Lib/site-packages/sqlalchemy/dialects/sybase/mxodbc.py | svercillo/flaskwebapi | 48e3417c25fc25166203cb88f959345f548a38bc | [
"Apache-2.0"
] | 2 | 2020-05-27T19:53:05.000Z | 2020-05-27T19:53:07.000Z | venv/Lib/site-packages/sqlalchemy/dialects/sybase/mxodbc.py | svercillo/flaskwebapi | 48e3417c25fc25166203cb88f959345f548a38bc | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/sqlalchemy/dialects/sybase/mxodbc.py | svercillo/flaskwebapi | 48e3417c25fc25166203cb88f959345f548a38bc | [
"Apache-2.0"
] | null | null | null | # sybase/mxodbc.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: sybase+mxodbc
:name: mxODBC
:dbapi: mxodbc
... | 26.742857 | 75 | 0.74359 |
4a170b5be1036ac836002e140526d147c50cb6d2 | 1,406 | py | Python | generator/modules/pytorch.py | dayta-ai/deepo | fa720e39052e63adfe0f2b9dbd8444a0d69c2540 | [
"MIT"
] | 1 | 2021-11-18T18:34:29.000Z | 2021-11-18T18:34:29.000Z | generator/modules/pytorch.py | dayta-ai/deepo | fa720e39052e63adfe0f2b9dbd8444a0d69c2540 | [
"MIT"
] | null | null | null | generator/modules/pytorch.py | dayta-ai/deepo | fa720e39052e63adfe0f2b9dbd8444a0d69c2540 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .__module__ import Module, dependency, source, version
from .python import Python
@dependency(Python)
@version('1.4')
@source('pip')
class Pytorch(Module):
def build(self):
py_ver = int(float(self.composer.ver(Python))*10)
if py_ver not in [27, 35, 36, 37]:
... | 39.055556 | 84 | 0.585349 |
4a170d9cd161f8d3bfe190053a67cabd5f334b81 | 15,728 | py | Python | pandas/tests/indexes/multi/test_setops.py | Pawel-Kranzberg/pandas | 6f90cb3d7bd5891d15a427252fba00027ca6084d | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-05-07T04:58:36.000Z | 2021-05-07T04:58:59.000Z | pandas/tests/indexes/multi/test_setops.py | Pawel-Kranzberg/pandas | 6f90cb3d7bd5891d15a427252fba00027ca6084d | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-05-11T00:05:40.000Z | 2021-05-11T00:05:40.000Z | pandas/tests/indexes/multi/test_setops.py | Pawel-Kranzberg/pandas | 6f90cb3d7bd5891d15a427252fba00027ca6084d | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-06-16T07:19:12.000Z | 2021-12-16T10:24:44.000Z | import numpy as np
import pytest
import pandas as pd
from pandas import (
Index,
MultiIndex,
Series,
)
import pandas._testing as tm
@pytest.mark.parametrize("case", [0.5, "xxx"])
@pytest.mark.parametrize(
"method", ["intersection", "union", "difference", "symmetric_difference"]
)
def test_set_ops_err... | 31.519038 | 88 | 0.642294 |
4a170e21baba4ea0edc14a5bdea730101e2d7303 | 4,138 | py | Python | testing/test_ntheory.py | BatiDyDx/maths-tools-python | e9a58aa669b5f36d7ee01402fe1f16a1db7b0e50 | [
"MIT"
] | 1 | 2021-02-02T02:58:38.000Z | 2021-02-02T02:58:38.000Z | testing/test_ntheory.py | BatiDyDx/maths-tools-python | e9a58aa669b5f36d7ee01402fe1f16a1db7b0e50 | [
"MIT"
] | null | null | null | testing/test_ntheory.py | BatiDyDx/maths-tools-python | e9a58aa669b5f36d7ee01402fe1f16a1db7b0e50 | [
"MIT"
] | null | null | null | import math
import mathipy as mpy
from mathipy.math.ntheory import *
import numpy as np
#TODO
#Migrate testing to pytest
# Significant places for when comparing
# with assertAlmostEqual
sig_places = 10
def test_Infinite():
assert Infinite() == -Infinite(sign=False)
assert Infinite() == Infinite() + 10e10
... | 24.630952 | 102 | 0.658289 |
4a170fa0182a28d2861dd87f6c5b4b20d826a968 | 4,612 | py | Python | tests/python/gaia-ui-tests/gaiatest/apps/homescreen/regions/search_panel.py | charleyf/gaia | 90c1b9c146b2a4abe545bf758f2e47d898820ad1 | [
"Apache-2.0"
] | 1 | 2019-04-26T21:30:24.000Z | 2019-04-26T21:30:24.000Z | tests/python/gaia-ui-tests/gaiatest/apps/homescreen/regions/search_panel.py | charleyf/gaia | 90c1b9c146b2a4abe545bf758f2e47d898820ad1 | [
"Apache-2.0"
] | null | null | null | tests/python/gaia-ui-tests/gaiatest/apps/homescreen/regions/search_panel.py | charleyf/gaia | 90c1b9c146b2a4abe545bf758f2e47d898820ad1 | [
"Apache-2.0"
] | 1 | 2021-09-03T10:18:22.000Z | 2021-09-03T10:18:22.000Z | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import urllib
from marionette import expected
from marionette import Wait
from marionette.by import By
from gaiatest.a... | 41.178571 | 111 | 0.714441 |
4a1710697b925371de3b8906bdedb7da489b5bb9 | 223 | py | Python | tests/test_importers.py | rbrecheisen/pyminer | c1b088cd9eddf0347b5c3e9354991374c7344a33 | [
"Apache-2.0"
] | null | null | null | tests/test_importers.py | rbrecheisen/pyminer | c1b088cd9eddf0347b5c3e9354991374c7344a33 | [
"Apache-2.0"
] | 1 | 2015-05-15T12:06:25.000Z | 2015-10-18T15:43:34.000Z | tests/test_importers.py | rbrecheisen/pyminer | c1b088cd9eddf0347b5c3e9354991374c7344a33 | [
"Apache-2.0"
] | null | null | null | import unittest
class TestImporters(unittest.TestCase):
def setUp(self):
pass
def test_something(self):
pass
def tearDown(self):
pass
if __name__ == '__main__':
unittest.main()
| 13.117647 | 39 | 0.618834 |
4a171097e75dd08019066f0c3e9d2dc94a51e391 | 6,151 | py | Python | lensing/raytrace/__init__.py | tracijo32/lensing | 84b412a6020e461de9162fdb26684cf3916c2bca | [
"MIT"
] | null | null | null | lensing/raytrace/__init__.py | tracijo32/lensing | 84b412a6020e461de9162fdb26684cf3916c2bca | [
"MIT"
] | null | null | null | lensing/raytrace/__init__.py | tracijo32/lensing | 84b412a6020e461de9162fdb26684cf3916c2bca | [
"MIT"
] | null | null | null | import numpy as np
from scipy import interpolate
from ..helper_functions import param2array, array2param
def delens(ix,iy,deflectx,deflecty,ratio=1,dx=0,dy=0):
'''
delenses a set of x and y coordinates in the image plane
Parameters:
ix,iy: scalar or array-like, image plane x,y coordinates (units: pixe... | 35.554913 | 98 | 0.620062 |
4a1711ce76c8e5e2e0ea6732169f0a5a852866b9 | 161 | py | Python | accounting/enums.py | leonolan2020/phoenix | b5956a7003e548f01255cbd5d0d76cfd0ac77a81 | [
"MIT"
] | 1 | 2020-09-19T21:56:40.000Z | 2020-09-19T21:56:40.000Z | accounting/enums.py | leonolan2020/phoenix | b5956a7003e548f01255cbd5d0d76cfd0ac77a81 | [
"MIT"
] | null | null | null | accounting/enums.py | leonolan2020/phoenix | b5956a7003e548f01255cbd5d0d76cfd0ac77a81 | [
"MIT"
] | 5 | 2020-09-18T18:53:03.000Z | 2020-10-21T14:42:00.000Z | from django.db.models import TextChoices
from django.utils.translation import gettext as _
class FinancialDocument(TextChoices):
DARAMAD='درآمد',_('درآمد')
| 26.833333 | 49 | 0.795031 |
4a17127b261fab52e961ac98579883e3a4023201 | 5,824 | py | Python | predict.py | G-hx/faster-rcnn-pytorch | 2a056ebcf1cf0d68a167fcefb687cb09481e58cf | [
"MIT"
] | 1 | 2022-03-25T08:38:45.000Z | 2022-03-25T08:38:45.000Z | predict.py | G-hx/faster-rcnn-pytorch | 2a056ebcf1cf0d68a167fcefb687cb09481e58cf | [
"MIT"
] | null | null | null | predict.py | G-hx/faster-rcnn-pytorch | 2a056ebcf1cf0d68a167fcefb687cb09481e58cf | [
"MIT"
] | null | null | null | #----------------------------------------------------#
# 将单张图片预测、摄像头检测和FPS测试功能
# 整合到了一个py文件中,通过指定mode进行模式的修改。
#----------------------------------------------------#
import time
import cv2
import numpy as np
from PIL import Image
from frcnn import FRCNN
if __name__ == "__main__":
frcnn = FRCNN()
... | 43.789474 | 126 | 0.482315 |
4a171294f2aa7a1e3ad1925153eb252d594dbcf3 | 2,234 | py | Python | Python/rosalind_splc.py | angeeranaser/Rosalind | 088610530754f6bb1cf2013f416b6f45ba334028 | [
"MIT"
] | null | null | null | Python/rosalind_splc.py | angeeranaser/Rosalind | 088610530754f6bb1cf2013f416b6f45ba334028 | [
"MIT"
] | null | null | null | Python/rosalind_splc.py | angeeranaser/Rosalind | 088610530754f6bb1cf2013f416b6f45ba334028 | [
"MIT"
] | null | null | null | # Rosalind: RNA Splicing
# Given: A DNA string s and a collection of substrings acting as introns.
# Result: A protein string transcribed from the exons.
def removeIntron(dna, intron):
dna = dna.replace(intron,'')
return dna
def refTable(first):
codonList = [('UUU','F'),('CUU','L'),('AUU','I'... | 34.369231 | 76 | 0.491047 |
4a1712b488cd805f5efcbc7c692bfd0ea281808a | 2,466 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/_container_registry_management_client_enums.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/_container_registry_management_client_enums.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/_container_registry_management_client_enums.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 32.447368 | 94 | 0.658151 |
4a17130a890a1b21a18278d713fc4bc0e5c5857c | 3,500 | py | Python | myYOLO_v1.py | Varat7v2/Person-Detection | b8b33f1206839d94119f1aa7a6b7b62ec9c5048e | [
"MIT"
] | null | null | null | myYOLO_v1.py | Varat7v2/Person-Detection | b8b33f1206839d94119f1aa7a6b7b62ec9c5048e | [
"MIT"
] | null | null | null | myYOLO_v1.py | Varat7v2/Person-Detection | b8b33f1206839d94119f1aa7a6b7b62ec9c5048e | [
"MIT"
] | null | null | null | import numpy as np
import argparse
import cv2
import subprocess
import time
import os
class YOLO_INFERENCE:
def __init__(self, confidence, threshold):
# self.config_path = FLAGS.config
# self.weights_path = FLAGS.weights
# self.labels = open(FLAGS.labels).read().strip().split('\n')
... | 38.888889 | 94 | 0.568571 |
4a17135db2cfefaf33ac0e53881a0d17c0de2567 | 48,492 | py | Python | azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_vms_operations.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_vms_operations.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 2 | 2016-09-30T21:40:24.000Z | 2017-11-10T18:16:18.000Z | azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_vms_operations.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 45.704053 | 193 | 0.668708 |
4a171372638d637af57a12c0ac77171cefedb34e | 5,470 | py | Python | Hangman2.0.py | Rahul-coder69/Hangman | ea879355786146b2284cf34ff8850bdc809a0ae2 | [
"MIT"
] | null | null | null | Hangman2.0.py | Rahul-coder69/Hangman | ea879355786146b2284cf34ff8850bdc809a0ae2 | [
"MIT"
] | null | null | null | Hangman2.0.py | Rahul-coder69/Hangman | ea879355786146b2284cf34ff8850bdc809a0ae2 | [
"MIT"
] | null | null | null | from tkinter import *;PhotoImage
import random
from tkinter import messagebox
import time
chances=5
def click(event):
global status,words,choice,z,find,chances,num
text= str(event.widget.cget("text"))
if text in choice:
status.set("letter already present")
correct.update()
... | 33.765432 | 240 | 0.611883 |
4a17156e702222e2b040beb925242184f29479c2 | 4,000 | py | Python | isi_sdk_8_0/isi_sdk_8_0/models/group_members.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_0/isi_sdk_8_0/models/group_members.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_0/isi_sdk_8_0/models/group_members.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 3
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_0.models.group_mem... | 27.972028 | 170 | 0.577 |
4a1715bf99338632aa84970ec950cca1d227ec21 | 5,542 | py | Python | test/functional/rpc_txoutproof.py | jardelfrank42/paymecoin | 36e3ce6d64839a37c45b6e17aedfb2238c3a5257 | [
"MIT"
] | null | null | null | test/functional/rpc_txoutproof.py | jardelfrank42/paymecoin | 36e3ce6d64839a37c45b6e17aedfb2238c3a5257 | [
"MIT"
] | null | null | null | test/functional/rpc_txoutproof.py | jardelfrank42/paymecoin | 36e3ce6d64839a37c45b6e17aedfb2238c3a5257 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test gettxoutproof and verifytxoutproof RPCs."""
from test_framework.messages import CMerkleBlock, Fro... | 50.844037 | 142 | 0.690184 |
4a17169b6d1d2a8deea1324f0d3da3d10ed64ef9 | 285 | py | Python | 1_beginner/chapter4/practice/money_check.py | code4tomorrow/Python | 035b6f5d8fd635a16caaff78bcd3f582663dadc3 | [
"MIT"
] | 4 | 2021-03-01T00:32:45.000Z | 2021-05-21T22:01:52.000Z | 1_beginner/chapter4/practice/money_check.py | code4tomorrow/Python | 035b6f5d8fd635a16caaff78bcd3f582663dadc3 | [
"MIT"
] | 29 | 2020-09-12T22:56:04.000Z | 2021-09-25T17:08:42.000Z | 1_beginner/chapter4/practice/money_check.py | code4tomorrow/Python | 035b6f5d8fd635a16caaff78bcd3f582663dadc3 | [
"MIT"
] | 7 | 2021-02-25T01:50:55.000Z | 2022-02-28T00:00:42.000Z | # Money Check
# Write a program that asks for a person's
# amount of money (floating point).
# If the person's amount of money is 0,
# print "Bankrupt". If not, print "Not Bankrupt"
# If the person's amount of money is
# greater than 1000.0, then print "Rich".
# Write your code here
| 28.5 | 48 | 0.712281 |
4a1716d467fdd16121dc4c9205d0a21fef20ad07 | 597 | py | Python | ig_clone_api/permissions.py | whosgriffith/ig-clone-api | 83b79ed62e21c654d0945decaaf6571e19c8c12a | [
"MIT"
] | null | null | null | ig_clone_api/permissions.py | whosgriffith/ig-clone-api | 83b79ed62e21c654d0945decaaf6571e19c8c12a | [
"MIT"
] | null | null | null | ig_clone_api/permissions.py | whosgriffith/ig-clone-api | 83b79ed62e21c654d0945decaaf6571e19c8c12a | [
"MIT"
] | null | null | null | """ Custom permissions. """
# Django REST Framework
from rest_framework.permissions import BasePermission
class IsObjectOwner(BasePermission):
""" Give permission only to user who created the photo. """
def has_object_permission(self, request, view, obj):
""" Check user and obj are the same. """
... | 28.428571 | 63 | 0.681742 |
4a17179d345022cdd1f3bd6d3ca4cc0f693d760f | 31,372 | py | Python | mne_bids/tests/test_write.py | SophieHerbst/mne-bids | 0e9b5e261668b90efec28359772f321d999af7d7 | [
"BSD-3-Clause"
] | null | null | null | mne_bids/tests/test_write.py | SophieHerbst/mne-bids | 0e9b5e261668b90efec28359772f321d999af7d7 | [
"BSD-3-Clause"
] | null | null | null | mne_bids/tests/test_write.py | SophieHerbst/mne-bids | 0e9b5e261668b90efec28359772f321d999af7d7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Test the MNE BIDS converter.
For each supported file format, implement a test.
"""
# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>
# Teon L Brooks <teon.brooks@gmail.com>
# Chris Holdgraf <choldgraf@berkeley.edu>
# Stefan Appelhoff <stefan.appelhoff@mailbox... | 43.152682 | 79 | 0.663235 |
4a1717a584c92aa10a5f44c04e43c4ef343e54e4 | 12,212 | py | Python | anyex/async/gateio.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | anyex/async/gateio.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | anyex/async/gateio.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/anyex/anyex/blob/master/CONTRIBUTING.md#how-to-contribute-code
from anyex.async.base.exchange import Exchange
# -----------------------------------------------------------------------------
try:
... | 37.006061 | 126 | 0.492385 |
4a1717dcd5d2969bbe259c3c79a93f412266db13 | 20 | py | Python | Machine_Learning/Design_Tutorials/01-caffe_cats_vs_dogs/files/caffe/code/config/__init__.py | mkolod/Vitis-Tutorials | 33d6cf9686398ef1179778dc0da163291c68b465 | [
"Apache-2.0"
] | 49 | 2017-11-27T13:17:16.000Z | 2021-07-21T15:26:39.000Z | Machine_Learning/Design_Tutorials/01-caffe_cats_vs_dogs/files/caffe/code/config/__init__.py | mkolod/Vitis-Tutorials | 33d6cf9686398ef1179778dc0da163291c68b465 | [
"Apache-2.0"
] | 17 | 2017-10-30T08:15:27.000Z | 2021-05-14T11:12:42.000Z | Machine_Learning/Design_Tutorials/01-caffe_cats_vs_dogs/files/caffe/code/config/__init__.py | mkolod/Vitis-Tutorials | 33d6cf9686398ef1179778dc0da163291c68b465 | [
"Apache-2.0"
] | 2 | 2019-02-12T06:38:34.000Z | 2020-05-15T13:42:16.000Z | # this file is empty | 20 | 20 | 0.75 |
4a1718d272b2f15ff4e05f3942378cc903886692 | 511 | py | Python | run.py | subalterngames/mishnahbot | 6bc1583ece82f2d2817e4eb62894e9de8786dcf3 | [
"MIT"
] | null | null | null | run.py | subalterngames/mishnahbot | 6bc1583ece82f2d2817e4eb62894e9de8786dcf3 | [
"MIT"
] | null | null | null | run.py | subalterngames/mishnahbot | 6bc1583ece82f2d2817e4eb62894e9de8786dcf3 | [
"MIT"
] | null | null | null | import re
import os
from pathlib import Path
from mishnabot.bot import Bot
"""
Run the bot.
Usage:
```
python3 run.py
```
"""
if __name__ == "__main__":
dir_path = os.path.dirname(os.path.realpath(__file__))
secrets = Path(dir_path).joinpath("bot_secrets.txt").read_text()
# Get the bot token.
token... | 19.653846 | 68 | 0.655577 |
4a1718d8475d27628e559cb19f7a17bd3546f5b8 | 196 | py | Python | PYTHON/Numpy/inner_and_outer.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Numpy/inner_and_outer.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Numpy/inner_and_outer.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import numpy
n = numpy.array(list(map(int, input().split())))
m = numpy.array(list(map(int, input().split())))
print(numpy.inner(n, m))
print(numpy.outer(n, m))
| 21.777778 | 48 | 0.673469 |
4a1719357d5289f241fdc4c7703eef923820eaf4 | 927 | py | Python | catalog/bindings/ows/telephone_type.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/ows/telephone_type.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/ows/telephone_type.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass, field
from typing import List
__NAMESPACE__ = "http://www.opengis.net/ows/2.0"
@dataclass
class TelephoneType:
"""
Telephone numbers for contacting the responsible individual or
organization.
:ivar voice: Telephone number by which individuals can speak to the
... | 26.485714 | 71 | 0.604099 |
4a17199423af205d214efc035a8b73900ae90d4a | 5,995 | py | Python | PROCESSOR/MachineLearning.py | maxwells8/Heptet | 21cb272cb2eead72e85724a8bbcbb81a3c7206d6 | [
"MIT"
] | 1 | 2020-04-29T11:45:29.000Z | 2020-04-29T11:45:29.000Z | PROCESSOR/MachineLearning.py | maxwells8/Heptet | 21cb272cb2eead72e85724a8bbcbb81a3c7206d6 | [
"MIT"
] | null | null | null | PROCESSOR/MachineLearning.py | maxwells8/Heptet | 21cb272cb2eead72e85724a8bbcbb81a3c7206d6 | [
"MIT"
] | null | null | null | import random
import numpy as np
from MAIN.Basics import Processor, Space
from operator import itemgetter
class StateSpace(Processor, Space):
def __init__(self, agent):
self.agent = agent
super().__init__(agent.config['StateSpaceState'])
def process(self):
self.agent.data['NETWORK_ST... | 34.653179 | 106 | 0.648374 |
4a171ad99f544865878ab6f9f8a7cd290ce4c422 | 18,916 | py | Python | tools/utils.py | ganadist/r8 | 850b5a4725954b677103a3a575239d0f330c0b0f | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tools/utils.py | ganadist/r8 | 850b5a4725954b677103a3a575239d0f330c0b0f | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tools/utils.py | ganadist/r8 | 850b5a4725954b677103a3a575239d0f330c0b0f | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# Different utility functions used accross scripts
import hashlib
import json
import os
import re
import shu... | 31.632107 | 89 | 0.685504 |
4a171bc93fbfcc0783209ba764573a80d93fa93b | 44 | py | Python | data_structures/__init__.py | noorzeea/python_tools | 1c83f6161badb4de4eb7d1d2de2ed3a5b8c69b5e | [
"MIT"
] | null | null | null | data_structures/__init__.py | noorzeea/python_tools | 1c83f6161badb4de4eb7d1d2de2ed3a5b8c69b5e | [
"MIT"
] | null | null | null | data_structures/__init__.py | noorzeea/python_tools | 1c83f6161badb4de4eb7d1d2de2ed3a5b8c69b5e | [
"MIT"
] | null | null | null | from .tuples import tupleToList, listToTuple | 44 | 44 | 0.863636 |
4a171be5cb2fc632fade2d22b1eb0abd75a5b0fd | 2,504 | py | Python | Analysis_tools/counter.py | miniaoshi/Pele_scripts | 375a948911a75396ccd47c98de8ef2f73d4f44fa | [
"Apache-2.0"
] | 1 | 2021-06-07T19:12:33.000Z | 2021-06-07T19:12:33.000Z | Analysis_tools/counter.py | miniaoshi/Pele_scripts | 375a948911a75396ccd47c98de8ef2f73d4f44fa | [
"Apache-2.0"
] | 1 | 2018-09-27T10:03:41.000Z | 2018-09-27T10:03:41.000Z | Analysis_tools/counter.py | miniaoshi/Pele_scripts | 375a948911a75396ccd47c98de8ef2f73d4f44fa | [
"Apache-2.0"
] | 1 | 2018-06-07T16:00:31.000Z | 2018-06-07T16:00:31.000Z | #/usr/bin/python2.7
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.widgets import RectangleSelector
import numpy as np
import os
import errno
import argparse
import pandas as pd
import glob
import re
import sys
import interactivePlot as ip
"""
Description: Plot a histogram of how many values i... | 29.116279 | 117 | 0.695288 |
4a171c3d5c01e0a5ea6e77f2295d174ad28d0da0 | 64,598 | py | Python | se/se_epub_lint.py | loftwah/tools | 24f5d69d24e4a217da226b7c5f35a84d8fc0eb4a | [
"CC0-1.0"
] | null | null | null | se/se_epub_lint.py | loftwah/tools | 24f5d69d24e4a217da226b7c5f35a84d8fc0eb4a | [
"CC0-1.0"
] | null | null | null | se/se_epub_lint.py | loftwah/tools | 24f5d69d24e4a217da226b7c5f35a84d8fc0eb4a | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
"""
Contains the LintMessage class and the Lint function, which is broken out of
the SeEpub class for readability and maintainability.
Strictly speaking, the lint() function should be a class member of SeEpub. But
the function is very big and it makes editing easier to put in a separate file.
""... | 55.832325 | 248 | 0.695966 |
4a171cf49882c0424e4931ea5b112b59e7823a70 | 31,703 | py | Python | aea/decision_maker/gop.py | bryanchriswhite/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | 126 | 2019-09-07T09:32:44.000Z | 2022-03-29T14:28:41.000Z | aea/decision_maker/gop.py | salman6049/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | 1,814 | 2019-08-24T10:08:07.000Z | 2022-03-31T14:28:36.000Z | aea/decision_maker/gop.py | salman6049/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | 46 | 2019-09-03T22:13:58.000Z | 2022-03-22T01:25:16.000Z | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | 40.13038 | 137 | 0.645933 |
4a171d9cbdbe17a79cbf29a11ec5396b7188eb63 | 1,829 | py | Python | local-cli/generator-ubuntu/templates/snap/parts/plugins/x-nodejs.py | Abdulhafiz-Yusuf/react-native | 98e0ce38cdcb8c489a064c436a353be754e95f89 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 1,079 | 2016-08-02T16:20:28.000Z | 2022-03-22T20:40:37.000Z | local-cli/generator-ubuntu/templates/snap/parts/plugins/x-nodejs.py | daisty/react-native-1 | 98e0ce38cdcb8c489a064c436a353be754e95f89 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 3 | 2016-08-04T07:57:48.000Z | 2020-05-21T05:02:52.000Z | local-cli/generator-ubuntu/templates/snap/parts/plugins/x-nodejs.py | daisty/react-native-1 | 98e0ce38cdcb8c489a064c436a353be754e95f89 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 80 | 2016-08-03T09:34:32.000Z | 2021-04-22T16:57:11.000Z |
import os
import platform
import snapcraft
from snapcraft import sources
_NODEJS_BASE = 'node-v{version}-linux-{arch}'
_NODEJS_VERSION = '4.2.6'
_NODEJS_TMPL = 'https://nodejs.org/dist/v{version}/{base}.tar.gz'
_NODEJS_ARCHES = {
'i686': 'x86',
'x86_64': 'x64',
'armv7l': 'armv7l',
}
class NodeJsPlugin... | 25.760563 | 98 | 0.666484 |
4a171dfd0a41fe8f6e7516c77e48e8440697e549 | 11,093 | py | Python | WebApp/main/views.py | georg-wenzel/ml-data-smell-detection | 7dddd401ca1f1a830dfd8b00760659911e5b1086 | [
"MIT"
] | 1 | 2022-03-29T14:46:40.000Z | 2022-03-29T14:46:40.000Z | WebApp/main/views.py | georg-wenzel/ml-data-smell-detection | 7dddd401ca1f1a830dfd8b00760659911e5b1086 | [
"MIT"
] | null | null | null | WebApp/main/views.py | georg-wenzel/ml-data-smell-detection | 7dddd401ca1f1a830dfd8b00760659911e5b1086 | [
"MIT"
] | 1 | 2021-06-13T08:24:46.000Z | 2021-06-13T08:24:46.000Z | from django.shortcuts import render, redirect
from django.contrib import messages
from django.http import HttpResponse
from main.utility.DjangoUtility import dict_contains_all
from .models import Agent, Dataset, Column, Smell
from main.utility.DatabaseUtility import safe_get
from main.utility import GensimUtility
from ... | 47.004237 | 169 | 0.669161 |
4a171f5a883bccf544f861c574df6856268acbf4 | 13,089 | py | Python | pytype/tools/analyze_project/pytype_runner.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 3,882 | 2015-03-22T12:17:15.000Z | 2022-03-31T17:13:20.000Z | pytype/tools/analyze_project/pytype_runner.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 638 | 2015-11-03T06:34:44.000Z | 2022-03-31T23:41:48.000Z | pytype/tools/analyze_project/pytype_runner.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 301 | 2015-08-14T10:21:17.000Z | 2022-03-08T11:03:40.000Z | """Use pytype to analyze and infer types for an entire project."""
import logging
import os
import subprocess
import sys
from typing import Iterable, Sequence, Tuple
from pytype import file_utils
from pytype import module_utils
from pytype.tools.analyze_project import config
# Generate a default pyi for builtin and... | 34.904 | 87 | 0.648942 |
4a171fe3d2594c8c5e42f6813346337941f4c980 | 263 | py | Python | 3.py | maruf212000/Python_Assignment_3 | dfedb06ea5f73475c51467577622cb63f8f3888e | [
"MIT"
] | null | null | null | 3.py | maruf212000/Python_Assignment_3 | dfedb06ea5f73475c51467577622cb63f8f3888e | [
"MIT"
] | null | null | null | 3.py | maruf212000/Python_Assignment_3 | dfedb06ea5f73475c51467577622cb63f8f3888e | [
"MIT"
] | null | null | null | #GitHub.com/tanujdey7
try:
num1 = int(input("Enter Number 1: "))
num2 = int(input("Enter Number 2: "))
ans = num1/num2
print(ans)
except ValueError:
print("Enter Numeric Value")
except Exception as e:
print("Can't Divide by Zero "+str(e))
| 23.909091 | 41 | 0.642586 |
4a172013014bc7bdf41f2acd48041f76b67b0048 | 679 | py | Python | src/users/models.py | BikoCodes/movie-api-clone | cc7b11c44df041e05f5b47deb29f56542b7a3089 | [
"MIT"
] | null | null | null | src/users/models.py | BikoCodes/movie-api-clone | cc7b11c44df041e05f5b47deb29f56542b7a3089 | [
"MIT"
] | null | null | null | src/users/models.py | BikoCodes/movie-api-clone | cc7b11c44df041e05f5b47deb29f56542b7a3089 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.db.models import CharField
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
class User(AbstractUser):
"""Default user for movie-api."""
#: First and last name do not cover name patterns around the globe
... | 29.521739 | 74 | 0.681885 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.