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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7489a928ee4ce01e0514e27f5339bfa54dd0436b | 745 | py | Python | idManager/view/group_view.py | lgarciasbr/idm-api | 3517d29d55eb2a06fb5b4b21359b6cf6d11529a0 | [
"Apache-2.0"
] | 2 | 2018-01-14T22:43:43.000Z | 2018-01-14T22:43:48.000Z | idManager/view/group_view.py | lgarciasbr/idm-api | 3517d29d55eb2a06fb5b4b21359b6cf6d11529a0 | [
"Apache-2.0"
] | null | null | null | idManager/view/group_view.py | lgarciasbr/idm-api | 3517d29d55eb2a06fb5b4b21359b6cf6d11529a0 | [
"Apache-2.0"
] | null | null | null | from flask import jsonify
| 24.833333 | 94 | 0.660403 | from flask import jsonify
def register_group(http_status_code, group, message):
view = jsonify({'status_code': http_status_code, 'message': message, 'group': group.data})
return view
def get_groups(groups, total, pages, http_status_code):
view = jsonify({'groups': groups.data,
'tot... | 623 | 0 | 92 |
1f752fceba17b43584813efd37c1d1e243571d98 | 69,340 | py | Python | Lib/subprocess.py | sireliah/polish-python | 605df4944c2d3bc25f8bf6964b274c0a0d297cc3 | [
"PSF-2.0"
] | 1 | 2018-06-21T18:21:24.000Z | 2018-06-21T18:21:24.000Z | Lib/subprocess.py | sireliah/polish-python | 605df4944c2d3bc25f8bf6964b274c0a0d297cc3 | [
"PSF-2.0"
] | null | null | null | Lib/subprocess.py | sireliah/polish-python | 605df4944c2d3bc25f8bf6964b274c0a0d297cc3 | [
"PSF-2.0"
] | null | null | null | # subprocess - Subprocesses przy accessible I/O streams
#
# For more information about this module, see PEP 324.
#
# Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se>
#
# Licensed to PSF under a Contributor Agreement.
# See http://www.python.org/2.4/license dla licensing details.
r"""subprocess - Subpr... | 39.175141 | 91 | 0.5909 | # subprocess - Subprocesses przy accessible I/O streams
#
# For more information about this module, see PEP 324.
#
# Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se>
#
# Licensed to PSF under a Contributor Agreement.
# See http://www.python.org/2.4/license dla licensing details.
r"""subprocess - Subpr... | 6,483 | 0 | 591 |
c55bcbcf6e523260b0959341789ad27b8dd43606 | 1,279 | py | Python | examples/party.py | hulu316/zoonado | cb06102f95e7da9c0e418bb9e327045e012a1497 | [
"Apache-2.0"
] | 12 | 2016-04-14T09:55:38.000Z | 2018-01-07T13:12:47.000Z | examples/party.py | hulu316/zoonado | cb06102f95e7da9c0e418bb9e327045e012a1497 | [
"Apache-2.0"
] | 16 | 2016-07-21T09:45:38.000Z | 2017-09-22T19:06:14.000Z | examples/party.py | hulu316/zoonado | cb06102f95e7da9c0e418bb9e327045e012a1497 | [
"Apache-2.0"
] | 8 | 2016-07-21T09:06:37.000Z | 2019-07-26T05:48:00.000Z | import logging
import random
from tornado import gen
log = logging.getLogger()
@gen.coroutine
@gen.coroutine
| 23.685185 | 74 | 0.605942 | import logging
import random
from tornado import gen
log = logging.getLogger()
def arguments(parser):
parser.add_argument(
"--workers", "-w", type=int, default=5,
help="Number of workers to launch."
)
parser.add_argument(
"--znode-path", "-p", type=str, default="examplelock",
... | 1,095 | 0 | 67 |
15674cff063c40fbe52c1f8ea5a648cc8e393e80 | 20,501 | py | Python | custom-actions/actions/actions.py | moreymat/conciergerie-open-data | 5d7575af93dd9d7f5e2c4bd35c2f6c816d3c3d33 | [
"MIT"
] | null | null | null | custom-actions/actions/actions.py | moreymat/conciergerie-open-data | 5d7575af93dd9d7f5e2c4bd35c2f6c816d3c3d33 | [
"MIT"
] | 3 | 2021-09-10T15:36:06.000Z | 2021-10-06T08:27:57.000Z | custom-actions/actions/actions.py | moreymat/conciergerie-open-data | 5d7575af93dd9d7f5e2c4bd35c2f6c816d3c3d33 | [
"MIT"
] | null | null | null | # This files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/rasa/custom-actions
import json
import re
import numpy as np
from typing import Any, Text, Dict, List
from datetime import datetime
from actions import... | 30.875 | 174 | 0.588801 | # This files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/rasa/custom-actions
import json
import re
import numpy as np
from typing import Any, Text, Dict, List
from datetime import datetime
from actions import... | 11,868 | 0 | 756 |
8b90a4f43bd5093ec4d3568f8c57eccff8dc5136 | 1,580 | py | Python | ea_makers_be/ea_makers_app/urls.py | kimtuan1102/ea_makers_be | 509b21bc2b444bfe5be252acbbc4340be2439104 | [
"MIT"
] | null | null | null | ea_makers_be/ea_makers_app/urls.py | kimtuan1102/ea_makers_be | 509b21bc2b444bfe5be252acbbc4340be2439104 | [
"MIT"
] | 1 | 2021-06-10T23:12:09.000Z | 2021-06-10T23:12:09.000Z | ea_makers_be/ea_makers_app/urls.py | kimtuan1102/ea_makers_be | 509b21bc2b444bfe5be252acbbc4340be2439104 | [
"MIT"
] | null | null | null | from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import TransactionViewSet, AccountMT4ViewSet, AccountHistoryViewSet, \
AccountConfigViewSet, transaction_approve, transaction_reject, user_info, ea_license, PackageViewSet, \
ServerInfoViewSet, account_config_admi... | 50.967742 | 107 | 0.779114 | from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import TransactionViewSet, AccountMT4ViewSet, AccountHistoryViewSet, \
AccountConfigViewSet, transaction_approve, transaction_reject, user_info, ea_license, PackageViewSet, \
ServerInfoViewSet, account_config_admi... | 0 | 0 | 0 |
c84be1fd2203937f1b01a3ed6d022fb5c41f653d | 14,418 | py | Python | osmdigest/pythonify.py | MatthewDaws/OSMDigest | aba65c4bf28b14e123711f760bf0baf1be2e82c5 | [
"MIT"
] | null | null | null | osmdigest/pythonify.py | MatthewDaws/OSMDigest | aba65c4bf28b14e123711f760bf0baf1be2e82c5 | [
"MIT"
] | null | null | null | osmdigest/pythonify.py | MatthewDaws/OSMDigest | aba65c4bf28b14e123711f760bf0baf1be2e82c5 | [
"MIT"
] | null | null | null | """
pythonify
~~~~~~~~
Converts an OSM XML file into a number of Python dictionaries. This process
is slow, and (very) memory intensive, so can be split into a number of parts.
We also support saving and loading the results from compressed pickle'd files
(these should be viewed a temporary files, which are unlikely t... | 36.593909 | 107 | 0.608337 | """
pythonify
~~~~~~~~
Converts an OSM XML file into a number of Python dictionaries. This process
is slow, and (very) memory intensive, so can be split into a number of parts.
We also support saving and loading the results from compressed pickle'd files
(these should be viewed a temporary files, which are unlikely t... | 4,228 | 0 | 608 |
27998331b309e55cd8a388ea6423e56a7a5e56ce | 3,081 | py | Python | odoo/custom/src/private/rml_reports/stock/picking.py | ecosoft-odoo/mh-doodba | 093f14850aaff337951b4829b24bf32eee6e6d40 | [
"BSL-1.0"
] | 1 | 2021-10-03T08:11:18.000Z | 2021-10-03T08:11:18.000Z | odoo/custom/src/private/rml_reports/stock/picking.py | ecosoft-odoo/mh-doodba | 093f14850aaff337951b4829b24bf32eee6e6d40 | [
"BSL-1.0"
] | null | null | null | odoo/custom/src/private/rml_reports/stock/picking.py | ecosoft-odoo/mh-doodba | 093f14850aaff337951b4829b24bf32eee6e6d40 | [
"BSL-1.0"
] | 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... | 45.308824 | 123 | 0.61863 | # -*- 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... | 1,703 | 15 | 126 |
d4c29d051bf16489715a8cedb73ff6c590a2f1fb | 7,846 | py | Python | CatVsDogs(TestLoop,DogsOverfitting97%,Cats(veryLess)).py | shyamgupta196/LearningPyTorch | a585b708039357207ad4d3b29a3fc7bd2d1cc7e8 | [
"Apache-2.0"
] | 1 | 2021-04-06T11:26:39.000Z | 2021-04-06T11:26:39.000Z | CatVsDogs(TestLoop,DogsOverfitting97%,Cats(veryLess)).py | shyamgupta196/LearningPyTorch | a585b708039357207ad4d3b29a3fc7bd2d1cc7e8 | [
"Apache-2.0"
] | null | null | null | CatVsDogs(TestLoop,DogsOverfitting97%,Cats(veryLess)).py | shyamgupta196/LearningPyTorch | a585b708039357207ad4d3b29a3fc7bd2d1cc7e8 | [
"Apache-2.0"
] | null | null | null | """
In this TorchDaily we will TRAIN
A MODEL USING TRANSFER LEARNING
Cats Vs Dogs Dataset
EARLIER ACC==14% OR LESS
NOW ITS 70% AND MORE (BUT ONLY FOR DOGS )
### Cats are very poorly classified (IDK WHY but soon i will figure that out)
THE POWER OF ALEXNET (PRETRAINED MODELS IS VISIBLE)
DATE ==> 10-05-2... | 29.8327 | 114 | 0.582207 | """
In this TorchDaily we will TRAIN
A MODEL USING TRANSFER LEARNING
Cats Vs Dogs Dataset
EARLIER ACC==14% OR LESS
NOW ITS 70% AND MORE (BUT ONLY FOR DOGS )
### Cats are very poorly classified (IDK WHY but soon i will figure that out)
THE POWER OF ALEXNET (PRETRAINED MODELS IS VISIBLE)
DATE ==> 10-05-2... | 3,367 | 0 | 50 |
10a37586581b383194d5be72752acbb49c929082 | 40,380 | py | Python | score_based_pruning.py | Joey61Liuyi/Early-Bird-Tickets | 7bb23243bc4343519d58d828f0d3254e80c5fedd | [
"MIT"
] | null | null | null | score_based_pruning.py | Joey61Liuyi/Early-Bird-Tickets | 7bb23243bc4343519d58d828f0d3254e80c5fedd | [
"MIT"
] | null | null | null | score_based_pruning.py | Joey61Liuyi/Early-Bird-Tickets | 7bb23243bc4343519d58d828f0d3254e80c5fedd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2021/12/27 16:34
# @Author : LIU YI
import argparse
import copy
import random
import pandas as pd
import numpy as np
import os
import torch
import torch.nn as nn
from torch.autograd import Variable
from torchvision import datasets, transforms
import wandb
# from models import *
i... | 37.879925 | 146 | 0.58316 | # -*- coding: utf-8 -*-
# @Time : 2021/12/27 16:34
# @Author : LIU YI
import argparse
import copy
import random
import pandas as pd
import numpy as np
import os
import torch
import torch.nn as nn
from torch.autograd import Variable
from torchvision import datasets, transforms
import wandb
# from models import *
i... | 33,255 | 0 | 483 |
6716a726078f16e1423a1e22103925e9d6218fcc | 234 | py | Python | ui/config.py | fakeNetflix/pinterest-repo-soundwave | 189b30708502cb6b76cd7a895bbd4389b0142e2f | [
"Apache-2.0"
] | 104 | 2017-05-14T23:28:10.000Z | 2021-04-25T11:20:19.000Z | ui/config.py | fakeNetflix/pinterest-repo-soundwave | 189b30708502cb6b76cd7a895bbd4389b0142e2f | [
"Apache-2.0"
] | 17 | 2020-03-04T23:22:31.000Z | 2021-12-09T21:31:06.000Z | ui/config.py | fakeNetflix/pinterest-repo-soundwave | 189b30708502cb6b76cd7a895bbd4389b0142e2f | [
"Apache-2.0"
] | 18 | 2017-05-16T22:40:24.000Z | 2022-02-21T15:35:20.000Z | """Config data for cmdb UI."""
SOUNDWAVE_API = "http://soundwave-api/v2/"
SOUNDWAVE_HOST = "0.0.0.0"
SOUNDWAVE_PORT = 80
SOUNDWAVE_LOG_PATH = "/var/log/soundwave_ui/"
SOUNDWAVE_ACCESS_LOG = "access.log"
SOUNDWAVE_APP_LOG = "info.log"
| 29.25 | 45 | 0.739316 | """Config data for cmdb UI."""
SOUNDWAVE_API = "http://soundwave-api/v2/"
SOUNDWAVE_HOST = "0.0.0.0"
SOUNDWAVE_PORT = 80
SOUNDWAVE_LOG_PATH = "/var/log/soundwave_ui/"
SOUNDWAVE_ACCESS_LOG = "access.log"
SOUNDWAVE_APP_LOG = "info.log"
| 0 | 0 | 0 |
f6ca7e10f361d5fba876d39453a170a545ad8aea | 786 | py | Python | config/env_variables.py | Calpax-aaS/web-app | 155a40a51b27f9741c137dcf144daabcb09d39ed | [
"BSD-3-Clause"
] | null | null | null | config/env_variables.py | Calpax-aaS/web-app | 155a40a51b27f9741c137dcf144daabcb09d39ed | [
"BSD-3-Clause"
] | 2 | 2021-06-09T18:48:49.000Z | 2021-09-22T19:55:17.000Z | config/env_variables.py | Calpax-aaS/web-app | 155a40a51b27f9741c137dcf144daabcb09d39ed | [
"BSD-3-Clause"
] | 1 | 2022-03-02T20:55:50.000Z | 2022-03-02T20:55:50.000Z | import os
django_secret = os.getenv('DJANGO_SECRET_KEY', 'l0cAl-t3st*')
django_is_debug_activated = os.getenv('DJANGO_DEBUG', 'False').lower() == 'true'
django_relative_path_for_static_file = os.getenv('DJANGO_STATIC_PATH', './public/static')
auth0_client_id = os.getenv('AUTH0_CLIENT_ID')
auth0_client_secret = os.get... | 46.235294 | 89 | 0.717557 | import os
django_secret = os.getenv('DJANGO_SECRET_KEY', 'l0cAl-t3st*')
django_is_debug_activated = os.getenv('DJANGO_DEBUG', 'False').lower() == 'true'
django_relative_path_for_static_file = os.getenv('DJANGO_STATIC_PATH', './public/static')
auth0_client_id = os.getenv('AUTH0_CLIENT_ID')
auth0_client_secret = os.get... | 0 | 0 | 0 |
2c6268758b8e73bd29f7948fb2074d858df22206 | 10,073 | py | Python | cpdb/twitterbot/tests/test_response_builders.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 25 | 2018-07-20T22:31:40.000Z | 2021-07-15T16:58:41.000Z | cpdb/twitterbot/tests/test_response_builders.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 13 | 2018-06-18T23:08:47.000Z | 2022-02-10T07:38:25.000Z | cpdb/twitterbot/tests/test_response_builders.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 6 | 2018-05-17T21:59:43.000Z | 2020-11-17T00:30:26.000Z | from django.test import TestCase
from django.test.utils import override_settings
from mock.mock import mock_open
from robber import expect
from mock import patch, Mock
from twitterbot.response_builders import (
SingleOfficerResponseBuilder, CoaccusedPairResponseBuilder, BaseResponseBuilder, NotFoundResponseBuilde... | 37.868421 | 115 | 0.586022 | from django.test import TestCase
from django.test.utils import override_settings
from mock.mock import mock_open
from robber import expect
from mock import patch, Mock
from twitterbot.response_builders import (
SingleOfficerResponseBuilder, CoaccusedPairResponseBuilder, BaseResponseBuilder, NotFoundResponseBuilde... | 8,901 | 214 | 440 |
7f8b17757fa5f2876737685c8360f39e1e1cef47 | 1,357 | py | Python | soundrts/tests/test_world.py | fcnjd/soundrts | 3492503d0f4712a31c662d57434ddf8a852d0816 | [
"BSD-3-Clause"
] | 2 | 2019-12-29T16:18:10.000Z | 2019-12-29T16:18:39.000Z | soundrts/tests/test_world.py | fcnjd/soundrts | 3492503d0f4712a31c662d57434ddf8a852d0816 | [
"BSD-3-Clause"
] | 1 | 2018-02-17T10:41:18.000Z | 2018-02-17T10:41:18.000Z | soundrts/tests/test_world.py | fcnjd/soundrts | 3492503d0f4712a31c662d57434ddf8a852d0816 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from soundrts.world import World
from soundrts.mapfile import Map
# print self.w.get_objects_string()[-160:]
if __name__ == "__main__":
unittest.main()
| 32.309524 | 82 | 0.608696 | import unittest
from soundrts.world import World
from soundrts.mapfile import Map
class WorldTestCase(unittest.TestCase):
def setUp(self):
self.w = World([])
self.w.load_and_build_map(Map("multi/m2.txt"))
self.w2 = World([])
self.w2.load_and_build_map(Map("multi/jl2.txt"))
... | 1,021 | 18 | 135 |
178c0c20dcc9abe86434ad86ea0996c5a40260ae | 58 | py | Python | frontend/gunicorn.confi.py | laughinging/yaes | 0893f7848ee0530fa6c3bd553f89aa430f9b2f02 | [
"MIT"
] | null | null | null | frontend/gunicorn.confi.py | laughinging/yaes | 0893f7848ee0530fa6c3bd553f89aa430f9b2f02 | [
"MIT"
] | null | null | null | frontend/gunicorn.confi.py | laughinging/yaes | 0893f7848ee0530fa6c3bd553f89aa430f9b2f02 | [
"MIT"
] | null | null | null | workers = 2
worker_class = 'gevent'
bind = "0.0.0.0:8888"
| 14.5 | 23 | 0.655172 | workers = 2
worker_class = 'gevent'
bind = "0.0.0.0:8888"
| 0 | 0 | 0 |
e8e0a0444c4be29eeeb8e912e2a2e9fbfd16637f | 5,641 | py | Python | src/OTLMOW/OTLModel/Classes/Overstortrand.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/OTLModel/Classes/Overstortrand.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/OTLModel/Classes/Overstortrand.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | # coding=utf-8
from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut
from OTLMOW.OTLModel.Classes.AIMObject import AIMObject
from OTLMOW.OTLModel.Datatypes.DtcDocument import DtcDocument
from OTLMOW.OTLModel.Datatypes.KlOverstortrandMateriaal import KlOverstortrandMateriaal
from OTLMOW.OTLModel.Datatypes.Kl... | 48.213675 | 149 | 0.593157 | # coding=utf-8
from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut
from OTLMOW.OTLModel.Classes.AIMObject import AIMObject
from OTLMOW.OTLModel.Datatypes.DtcDocument import DtcDocument
from OTLMOW.OTLModel.Datatypes.KlOverstortrandMateriaal import KlOverstortrandMateriaal
from OTLMOW.OTLModel.Datatypes.Kl... | 3,394 | 0 | 183 |
76fcb2603b88ccac0913fe789652456f73c7fa0b | 209 | py | Python | synth.py | codyoss/sloth | a3e67e5dd5f776db8b5df33b593f1a20707e9511 | [
"Apache-2.0"
] | 2 | 2019-02-19T08:42:32.000Z | 2019-02-19T08:42:41.000Z | synth.py | codyoss/sloth | a3e67e5dd5f776db8b5df33b593f1a20707e9511 | [
"Apache-2.0"
] | 534 | 2019-11-15T02:30:56.000Z | 2021-11-25T16:00:20.000Z | synth.py | codyoss/sloth | a3e67e5dd5f776db8b5df33b593f1a20707e9511 | [
"Apache-2.0"
] | 1 | 2019-01-14T16:18:36.000Z | 2019-01-14T16:18:36.000Z | import synthtool as s
import synthtool.gcp as gcp
import logging
logging.basicConfig(level=logging.DEBUG)
common_templates = gcp.CommonTemplates()
templates = common_templates.node_library()
s.copy(templates)
| 26.125 | 43 | 0.832536 | import synthtool as s
import synthtool.gcp as gcp
import logging
logging.basicConfig(level=logging.DEBUG)
common_templates = gcp.CommonTemplates()
templates = common_templates.node_library()
s.copy(templates)
| 0 | 0 | 0 |
5acb38c9155130c3e42b9f2df9274104a0876546 | 275 | py | Python | server.py | LordGhostX/graphql-profanity-filter | 71465693cb961066dc7a05bfc78260471cde82bc | [
"MIT"
] | 2 | 2021-07-19T21:32:00.000Z | 2021-07-28T20:47:44.000Z | server.py | LordGhostX/graphql-profanity-filter | 71465693cb961066dc7a05bfc78260471cde82bc | [
"MIT"
] | null | null | null | server.py | LordGhostX/graphql-profanity-filter | 71465693cb961066dc7a05bfc78260471cde82bc | [
"MIT"
] | null | null | null | from flask import Flask
from flask_graphql import GraphQLView
from schema import schema
app = Flask(__name__)
app.add_url_rule("/", view_func=GraphQLView.as_view("graphql",
schema=schema, graphiql=True))
if __name__ == "__main__":
app.run(debug=True)
| 22.916667 | 62 | 0.72 | from flask import Flask
from flask_graphql import GraphQLView
from schema import schema
app = Flask(__name__)
app.add_url_rule("/", view_func=GraphQLView.as_view("graphql",
schema=schema, graphiql=True))
if __name__ == "__main__":
app.run(debug=True)
| 0 | 0 | 0 |
ac8b81faa9ffcb252fdc732dd62f427ed94c8fa0 | 10,156 | py | Python | core/aws_ddk_core/resources/_lambda.py | vemel/aws-ddk | d34bd1d98f5a170026a1b65f9629e909ca839930 | [
"Apache-2.0"
] | 37 | 2022-02-21T19:06:35.000Z | 2022-03-31T17:12:26.000Z | core/aws_ddk_core/resources/_lambda.py | vemel/aws-ddk | d34bd1d98f5a170026a1b65f9629e909ca839930 | [
"Apache-2.0"
] | 25 | 2022-02-22T15:13:31.000Z | 2022-03-29T20:22:43.000Z | core/aws_ddk_core/resources/_lambda.py | vemel/aws-ddk | d34bd1d98f5a170026a1b65f9629e909ca839930 | [
"Apache-2.0"
] | 6 | 2022-02-21T19:07:01.000Z | 2022-03-08T05:20:59.000Z | # Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 40.951613 | 114 | 0.652422 | # Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 2,112 | 0 | 131 |
f414007c79614bcaf6561ed9cfe13b9f48716da0 | 8,240 | py | Python | hanlp/components/mtl/tasks/dep.py | antfootAlex/HanLP | e8044b27ae1de54b9070db08549853d3ca8271e2 | [
"Apache-2.0"
] | 3 | 2022-03-07T08:33:16.000Z | 2022-03-07T08:38:08.000Z | hanlp/components/mtl/tasks/dep.py | hushaoyun/HanLP | 967b52404c9d0adbc0cff2699690c127ecfca36e | [
"Apache-2.0"
] | null | null | null | hanlp/components/mtl/tasks/dep.py | hushaoyun/HanLP | 967b52404c9d0adbc0cff2699690c127ecfca36e | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2020-08-13 21:39
import logging
from typing import Dict, Any, Union, Iterable, List
import torch
from torch.optim import Adam
from torch.optim.lr_scheduler import ExponentialLR
from torch.utils.data import DataLoader
from hanlp.common.dataset import SamplerBuilder, PadS... | 49.047619 | 119 | 0.617597 | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2020-08-13 21:39
import logging
from typing import Dict, Any, Union, Iterable, List
import torch
from torch.optim import Adam
from torch.optim.lr_scheduler import ExponentialLR
from torch.utils.data import DataLoader
from hanlp.common.dataset import SamplerBuilder, PadS... | 4,262 | 3,001 | 23 |
cf676ab96dacbd16b460fdb6d7e34436bac6a565 | 419 | py | Python | pySOT/__init__.py | WY-Wang/pySOT | a2de59a0ab00da0465b964e070199fe4773918cd | [
"BSD-3-Clause"
] | 180 | 2015-11-17T03:36:31.000Z | 2022-03-16T10:09:42.000Z | pySOT/__init__.py | WY-Wang/pySOT | a2de59a0ab00da0465b964e070199fe4773918cd | [
"BSD-3-Clause"
] | 41 | 2015-06-30T15:43:10.000Z | 2021-02-04T06:03:02.000Z | pySOT/__init__.py | WY-Wang/pySOT | a2de59a0ab00da0465b964e070199fe4773918cd | [
"BSD-3-Clause"
] | 45 | 2015-10-29T16:40:11.000Z | 2021-11-14T01:44:39.000Z | #!/usr/bin/env python3
from . import auxiliary_problems, controller, experimental_design, optimization_problems, strategy, surrogate
__version__ = "0.3.3"
__author__ = "David Eriksson, David Bindel, Christine Shoemaker"
__all__ = [
"auxiliary_problems",
"controller",
"experimental_design",
"optimizat... | 22.052632 | 109 | 0.704057 | #!/usr/bin/env python3
from . import auxiliary_problems, controller, experimental_design, optimization_problems, strategy, surrogate
__version__ = "0.3.3"
__author__ = "David Eriksson, David Bindel, Christine Shoemaker"
__all__ = [
"auxiliary_problems",
"controller",
"experimental_design",
"optimizat... | 0 | 0 | 0 |
6d2cdfac699b5c92a28578e4397e7d6a16af2a88 | 2,799 | py | Python | message_body.py | juhyun0/python_network | fe730a6b405d80b910fe18e082b5bf1d85cba0dd | [
"Unlicense"
] | null | null | null | message_body.py | juhyun0/python_network | fe730a6b405d80b910fe18e082b5bf1d85cba0dd | [
"Unlicense"
] | null | null | null | message_body.py | juhyun0/python_network | fe730a6b405d80b910fe18e082b5bf1d85cba0dd | [
"Unlicense"
] | null | null | null | from message import ISerializable
import message
import struct
| 23.923077 | 84 | 0.540907 | from message import ISerializable
import message
import struct
class BodyRequest(ISerializable):
def __init__(self, buffer):
if buffer != None:
slen = len(buffer)
self.struct_fmt = str.format('=Q{0}s', slen - 8)
self.struct_len = struct.calcsize(self.struct_fmt)
... | 2,272 | 45 | 414 |
0ae4e1aacab37222a89735b99e10a43c842bb161 | 17,586 | py | Python | moabb/tests/paradigms.py | plcrodrigues/moabb | aa4274fe7905631864e854c121c92e1927061f29 | [
"BSD-3-Clause"
] | 321 | 2017-06-03T16:14:45.000Z | 2022-03-28T17:43:59.000Z | moabb/tests/paradigms.py | plcrodrigues/moabb | aa4274fe7905631864e854c121c92e1927061f29 | [
"BSD-3-Clause"
] | 223 | 2017-06-03T17:41:57.000Z | 2022-03-29T09:07:44.000Z | moabb/tests/paradigms.py | girafe-ai/moabb | 78bbb48a2a0058b0725ebeba1ba1e3203f0eacd5 | [
"BSD-3-Clause"
] | 118 | 2017-06-03T18:36:35.000Z | 2022-03-16T06:22:02.000Z | import logging
import unittest
import numpy as np
from mne import BaseEpochs
from moabb.datasets.fake import FakeDataset
from moabb.paradigms import (
P300,
SSVEP,
BaseMotorImagery,
BaseP300,
BaseSSVEP,
FilterBankLeftRightImagery,
FilterBankMotorImagery,
FilterBankSSVEP,
LeftRightI... | 43.315271 | 89 | 0.65501 | import logging
import unittest
import numpy as np
from mne import BaseEpochs
from moabb.datasets.fake import FakeDataset
from moabb.paradigms import (
P300,
SSVEP,
BaseMotorImagery,
BaseP300,
BaseSSVEP,
FilterBankLeftRightImagery,
FilterBankMotorImagery,
FilterBankSSVEP,
LeftRightI... | 14,160 | 2,860 | 167 |
6c54ad6eb0c9dcb90c8b78eed507fc7172e160ae | 5,067 | py | Python | lib_photo_scanner/api.py | Techainer/lib_photo_scanner | 58f7efa5e5b9630bc063d614bfbfde904bfa4f00 | [
"MIT"
] | null | null | null | lib_photo_scanner/api.py | Techainer/lib_photo_scanner | 58f7efa5e5b9630bc063d614bfbfde904bfa4f00 | [
"MIT"
] | null | null | null | lib_photo_scanner/api.py | Techainer/lib_photo_scanner | 58f7efa5e5b9630bc063d614bfbfde904bfa4f00 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from fastapi import FastAPI, HTTPException, Depends, Request, status
from fastapi.responses import JSONResponse
from pydantic import BaseModel
import time
import os
from lib import Scanner, logger
import traceback
from typing import Optional
import sys
app = FastAPI()
ls, sca... | 31.867925 | 121 | 0.586738 | from __future__ import absolute_import
from fastapi import FastAPI, HTTPException, Depends, Request, status
from fastapi.responses import JSONResponse
from pydantic import BaseModel
import time
import os
from lib import Scanner, logger
import traceback
from typing import Optional
import sys
app = FastAPI()
def get... | 4,343 | 0 | 89 |
575d58b5390a86bb5b50713c8330c07cdc1503d8 | 1,841 | py | Python | TextClient.py | michaelxiao16/HackGT6 | 8ea6a16196fa8226792f0ec9c6e2d3e33513ce9e | [
"MIT"
] | null | null | null | TextClient.py | michaelxiao16/HackGT6 | 8ea6a16196fa8226792f0ec9c6e2d3e33513ce9e | [
"MIT"
] | null | null | null | TextClient.py | michaelxiao16/HackGT6 | 8ea6a16196fa8226792f0ec9c6e2d3e33513ce9e | [
"MIT"
] | null | null | null | import json
import boto3 as boto3
DESTINATION_NUMBER = "4702637816"
FIRST_NAME = "Austin"
LAST_NAME = "Miles"
if __name__ == '__main__':
send_grade_change_message()
| 21.406977 | 38 | 0.611624 | import json
import boto3 as boto3
DESTINATION_NUMBER = "4702637816"
FIRST_NAME = "Austin"
LAST_NAME = "Miles"
def send_grade_change_message():
payload3 = b"""{
"destinationNumber": "4702637816",
"firstName": "Austin",
"lastName": "Miles",
"source": "Grade Change"
}"""
client = get_boto3_... | 1,548 | 0 | 115 |
01632dfbdb66922b0869d002c262c48492266f05 | 3,226 | py | Python | src/stack_exchange_graph_data/coroutines/links.py | Peilonrayz/stack_exchange_graph_data | d2d8d9f80dba727509f98b31d25e20e1e3824bb3 | [
"MIT"
] | null | null | null | src/stack_exchange_graph_data/coroutines/links.py | Peilonrayz/stack_exchange_graph_data | d2d8d9f80dba727509f98b31d25e20e1e3824bb3 | [
"MIT"
] | null | null | null | src/stack_exchange_graph_data/coroutines/links.py | Peilonrayz/stack_exchange_graph_data | d2d8d9f80dba727509f98b31d25e20e1e3824bb3 | [
"MIT"
] | null | null | null | """Link coroutine control flow functions."""
import argparse
import collections
import urllib.parse
from typing import DefaultDict, Generator, List, Set
from ..helpers.coroutines import coroutine
from ..segd import graph
@coroutine
def handle_links(filter_: Generator, good: Generator) -> Generator:
"""Send http... | 31.019231 | 88 | 0.574706 | """Link coroutine control flow functions."""
import argparse
import collections
import urllib.parse
from typing import DefaultDict, Generator, List, Set
from ..helpers.coroutines import coroutine
from ..segd import graph
@coroutine
def handle_links(filter_: Generator, good: Generator) -> Generator:
"""Send http... | 0 | 0 | 0 |
68b34ecd7f5ec5322690ac437666c06998f402ae | 11,621 | py | Python | Project01/Final/profile_data_extraction.py | nayeem990/Korean-website-scraping | fd26c913bec3a2ba27ca9e8413a9e92bfc618f85 | [
"Apache-2.0"
] | null | null | null | Project01/Final/profile_data_extraction.py | nayeem990/Korean-website-scraping | fd26c913bec3a2ba27ca9e8413a9e92bfc618f85 | [
"Apache-2.0"
] | null | null | null | Project01/Final/profile_data_extraction.py | nayeem990/Korean-website-scraping | fd26c913bec3a2ba27ca9e8413a9e92bfc618f85 | [
"Apache-2.0"
] | null | null | null | # importing the required modules
import requests
from bs4 import BeautifulSoup
import pandas as pd
from selenium import webdriver
import time
pd.options.display.max_columns = 999
pd.options.display.max_rows = 999
df = pd.read_csv('new_profile_links.csv')
df = df.drop(['Unnamed: 0'], axis = 1)
df["0"]
pl = list(df["0"... | 33.586705 | 133 | 0.45435 | # importing the required modules
import requests
from bs4 import BeautifulSoup
import pandas as pd
from selenium import webdriver
import time
pd.options.display.max_columns = 999
pd.options.display.max_rows = 999
df = pd.read_csv('new_profile_links.csv')
df = df.drop(['Unnamed: 0'], axis = 1)
df["0"]
pl = list(df["0"... | 0 | 0 | 0 |
19fc44400262a2a3e22b403b44260ab7e740721d | 6,183 | py | Python | augmentation/edge_detection/canny_edge.py | mnguyen0226/image-augmentation-dnn-performance | 793b0e513a6984d13e5ae33e1dd74fb8c45556fd | [
"MIT"
] | null | null | null | augmentation/edge_detection/canny_edge.py | mnguyen0226/image-augmentation-dnn-performance | 793b0e513a6984d13e5ae33e1dd74fb8c45556fd | [
"MIT"
] | null | null | null | augmentation/edge_detection/canny_edge.py | mnguyen0226/image-augmentation-dnn-performance | 793b0e513a6984d13e5ae33e1dd74fb8c45556fd | [
"MIT"
] | null | null | null | import math
import cv2 as cv
import numpy as np
from scipy.ndimage.filters import convolve
from scipy import ndimage
from matplotlib import pyplot as plt
import matplotlib.image as mpimg
def get_sobel_kernel(im):
"""Takes in smoothed images then do matrix multiplication with Sobel kernel to get the gradient magni... | 27.602679 | 122 | 0.569303 | import math
import cv2 as cv
import numpy as np
from scipy.ndimage.filters import convolve
from scipy import ndimage
from matplotlib import pyplot as plt
import matplotlib.image as mpimg
def get_sobel_kernel(im):
"""Takes in smoothed images then do matrix multiplication with Sobel kernel to get the gradient magni... | 0 | 0 | 0 |
45440d5a96a0fad81f3cedc890db5f5adc5e505e | 3,586 | py | Python | Python/221.maximal-square.py | Dxyk/LeetCode | e64b405f40b4e3c0f14c617897b775699dd46872 | [
"MIT"
] | null | null | null | Python/221.maximal-square.py | Dxyk/LeetCode | e64b405f40b4e3c0f14c617897b775699dd46872 | [
"MIT"
] | null | null | null | Python/221.maximal-square.py | Dxyk/LeetCode | e64b405f40b4e3c0f14c617897b775699dd46872 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=221 lang=python3
#
# [221] Maximal Square
#
# https://leetcode.com/problems/maximal-square/description/
#
# algorithms
# Medium (34.82%)
# Likes: 1997
# Dislikes: 49
# Total Accepted: 175K
# Total Submissions: 500.4K
# Testcase Example:
# '[["1","0","1","0","0"],
# ["1","0","1","1","1... | 27.374046 | 75 | 0.444228 | #
# @lc app=leetcode id=221 lang=python3
#
# [221] Maximal Square
#
# https://leetcode.com/problems/maximal-square/description/
#
# algorithms
# Medium (34.82%)
# Likes: 1997
# Dislikes: 49
# Total Accepted: 175K
# Total Submissions: 500.4K
# Testcase Example:
# '[["1","0","1","0","0"],
# ["1","0","1","1","1... | 579 | 2,115 | 23 |
5db5e96c68daebdf9c023c5d9ea8446b92163a47 | 17,891 | py | Python | statsmodels/graphics/dotplots.py | nikhase/statsmodels | e1822d4513f442002816bb898ca5794785f35c32 | [
"BSD-3-Clause"
] | 15 | 2015-03-03T09:47:42.000Z | 2022-01-05T18:28:31.000Z | statsmodels/graphics/dotplots.py | nikhase/statsmodels | e1822d4513f442002816bb898ca5794785f35c32 | [
"BSD-3-Clause"
] | 7 | 2015-11-20T08:33:04.000Z | 2020-07-24T19:34:39.000Z | statsmodels/graphics/dotplots.py | nikhase/statsmodels | e1822d4513f442002816bb898ca5794785f35c32 | [
"BSD-3-Clause"
] | 14 | 2015-01-06T22:08:34.000Z | 2021-01-01T16:33:23.000Z | import numpy as np
from statsmodels.compat import range
from . import utils
def dot_plot(points, intervals=None, lines=None, sections=None,
styles=None, marker_props=None, line_props=None,
split_names=None, section_order=None, line_order=None,
stacked=False, styles_order=None, s... | 36.737166 | 74 | 0.54519 | import numpy as np
from statsmodels.compat import range
from . import utils
def dot_plot(points, intervals=None, lines=None, sections=None,
styles=None, marker_props=None, line_props=None,
split_names=None, section_order=None, line_order=None,
stacked=False, styles_order=None, s... | 0 | 0 | 0 |
70fe63fd252ad0c12abc04de082c33c848a23ee4 | 633 | py | Python | agent/alembic/versions/746f77fcf519_create_pipeline_offset_table.py | eacherkan-aternity/daria | 7c77a2f52c09c852017b16949a848fa51f0fb579 | [
"Apache-2.0"
] | 16 | 2019-04-03T08:31:54.000Z | 2021-01-24T17:12:04.000Z | agent/alembic/versions/746f77fcf519_create_pipeline_offset_table.py | eacherkan-aternity/daria | 7c77a2f52c09c852017b16949a848fa51f0fb579 | [
"Apache-2.0"
] | 10 | 2020-01-20T14:59:06.000Z | 2022-01-21T10:19:16.000Z | agent/alembic/versions/746f77fcf519_create_pipeline_offset_table.py | eacherkan-aternity/daria | 7c77a2f52c09c852017b16949a848fa51f0fb579 | [
"Apache-2.0"
] | 5 | 2021-01-08T19:23:03.000Z | 2021-11-09T14:15:49.000Z | """create_pipeline_offset_table
Revision ID: 746f77fcf519
Revises: 63c90017aa5d
Create Date: 2020-10-20 13:32:59.329693
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '746f77fcf519'
down_revision = '63c90017aa5d'
branch_labels = None
depends_on = None
| 21.1 | 74 | 0.71564 | """create_pipeline_offset_table
Revision ID: 746f77fcf519
Revises: 63c90017aa5d
Create Date: 2020-10-20 13:32:59.329693
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '746f77fcf519'
down_revision = '63c90017aa5d'
branch_labels = None
depends_on = None
def up... | 273 | 0 | 46 |
86ff824699222c69c36860f3f9d1fe253fde8c59 | 2,791 | py | Python | python/src/main/python/pygw/geotools/simple_feature_type_builder.py | jhickman-prominent/geowave | fb421588e22a7c68ef13be1e57bc2c674dd1b090 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pygw/geotools/simple_feature_type_builder.py | jhickman-prominent/geowave | fb421588e22a7c68ef13be1e57bc2c674dd1b090 | [
"Apache-2.0"
] | 2 | 2019-09-20T15:39:27.000Z | 2019-12-03T14:07:43.000Z | python/src/main/python/pygw/geotools/simple_feature_type_builder.py | jhickman-prominent/geowave | fb421588e22a7c68ef13be1e57bc2c674dd1b090 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2013-2019 Contributors to the Eclipse Foundation
#
# See the NOTICE file distributed with this work for additional information regarding copyright
# ownership. All rights reserved. This program and the accompanying materials are made available
# under the terms of the Apache License, Version 2.0 which... | 32.835294 | 112 | 0.638839 | #
# Copyright (c) 2013-2019 Contributors to the Eclipse Foundation
#
# See the NOTICE file distributed with this work for additional information regarding copyright
# ownership. All rights reserved. This program and the accompanying materials are made available
# under the terms of the Apache License, Version 2.0 which... | 117 | 0 | 27 |
263312b88cc0b035cd76732103e670965aa5d5b7 | 3,099 | py | Python | robots/sc-3dof/src/sc_3dof_manipulate.py | frdedynamics/ik_solver_test | e162080838dca9cdba2c576836acd4a06563db3c | [
"RSA-MD"
] | null | null | null | robots/sc-3dof/src/sc_3dof_manipulate.py | frdedynamics/ik_solver_test | e162080838dca9cdba2c576836acd4a06563db3c | [
"RSA-MD"
] | null | null | null | robots/sc-3dof/src/sc_3dof_manipulate.py | frdedynamics/ik_solver_test | e162080838dca9cdba2c576836acd4a06563db3c | [
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from openravepy import *
import sys
import numpy as np
# initialize environment
env = Environment()
env.StopSimulation()
# openrave_root = './'
# env.Load(openrave_root + "baxter_ik.xml")
env.Load("sc_3dof.xml")
env.SetViewer('qtcoin') # start the viewer (conflicts with ... | 34.054945 | 141 | 0.734108 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from openravepy import *
import sys
import numpy as np
# initialize environment
env = Environment()
env.StopSimulation()
# openrave_root = './'
# env.Load(openrave_root + "baxter_ik.xml")
env.Load("sc_3dof.xml")
env.SetViewer('qtcoin') # start the viewer (conflicts with ... | 0 | 0 | 0 |
e7d0c8fc9a6524561313e97fa779be7c5c6960c4 | 5,826 | py | Python | bot/player_commands/missing.py | UP929312/CommunityBot | c16294e8ff4f47d9a1e8c18c9cd4011e7ebbd67a | [
"Apache-2.0"
] | 1 | 2021-06-15T07:31:13.000Z | 2021-06-15T07:31:13.000Z | bot/player_commands/missing.py | UP929312/CommunityBot | c16294e8ff4f47d9a1e8c18c9cd4011e7ebbd67a | [
"Apache-2.0"
] | 1 | 2021-06-01T10:14:32.000Z | 2021-06-02T10:54:12.000Z | bot/player_commands/missing.py | UP929312/CommunityBot | c16294e8ff4f47d9a1e8c18c9cd4011e7ebbd67a | [
"Apache-2.0"
] | 2 | 2021-06-01T10:59:15.000Z | 2021-06-03T18:29:36.000Z | import discord # type: ignore
from discord.ext import commands # type: ignore
from discord.commands import Option # type: ignore
from typing import Optional
import json
import requests
from utils import error, PROFILE_NAMES, hf, guild_ids
from menus import generate_static_preset_menu
from emojis import ITEM_RARITY... | 50.66087 | 166 | 0.650704 | import discord # type: ignore
from discord.ext import commands # type: ignore
from discord.commands import Option # type: ignore
from typing import Optional
import json
import requests
from utils import error, PROFILE_NAMES, hf, guild_ids
from menus import generate_static_preset_menu
from emojis import ITEM_RARITY... | 4,116 | 484 | 23 |
8f765cb99284c504f466ca30e7deb4f59c374dad | 3,797 | py | Python | model/MyModel.py | seanzhangJM/torch_nlp_job_default | fe9126c4abbde441fcc65d14d42477e4fff9d509 | [
"MIT"
] | null | null | null | model/MyModel.py | seanzhangJM/torch_nlp_job_default | fe9126c4abbde441fcc65d14d42477e4fff9d509 | [
"MIT"
] | null | null | null | model/MyModel.py | seanzhangJM/torch_nlp_job_default | fe9126c4abbde441fcc65d14d42477e4fff9d509 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2021/12/27 14:03
# @Author : zhangjianming
# @Email : YYDSPanda@163.com
# @File : MyModel.py
# @Software: PyCharm
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch_nlp_job_default.util.log_config import get_logger
logger = ge... | 37.97 | 114 | 0.628654 | #!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2021/12/27 14:03
# @Author : zhangjianming
# @Email : YYDSPanda@163.com
# @File : MyModel.py
# @Software: PyCharm
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch_nlp_job_default.util.log_config import get_logger
logger = ge... | 3,302 | 22 | 260 |
7f96ffe28e1306cbb636608c457e89fc1dd8aeb0 | 1,679 | py | Python | molsysmt/_private/exceptions/not_implemented_engine_error.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | molsysmt/_private/exceptions/not_implemented_engine_error.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | molsysmt/_private/exceptions/not_implemented_engine_error.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | class NotImplementedEngineError(NotImplementedError):
"""Exception raised when executing a method with a specific engine is not supported yet.
This exception is raised when a method can not be executed with the selected engine by the user.
Parameters
----------
engine : str
The engine not... | 31.092593 | 122 | 0.646814 | class NotImplementedEngineError(NotImplementedError):
"""Exception raised when executing a method with a specific engine is not supported yet.
This exception is raised when a method can not be executed with the selected engine by the user.
Parameters
----------
engine : str
The engine not... | 567 | 0 | 27 |
b9ba88b9235ace559185b77c2db576c890cd1f1b | 1,783 | py | Python | tests/plugins/test_beautify_icon.py | enricorotundo/folium | c3d21e6a90fbb21dff0a8b0851a835515b156eb8 | [
"MIT"
] | 10 | 2019-09-09T15:53:39.000Z | 2022-01-15T19:35:41.000Z | tests/plugins/test_beautify_icon.py | enricorotundo/folium | c3d21e6a90fbb21dff0a8b0851a835515b156eb8 | [
"MIT"
] | 1 | 2018-10-26T14:07:53.000Z | 2018-10-26T14:07:53.000Z | tests/plugins/test_beautify_icon.py | enricorotundo/folium | c3d21e6a90fbb21dff0a8b0851a835515b156eb8 | [
"MIT"
] | 1 | 2020-08-03T08:46:26.000Z | 2020-08-03T08:46:26.000Z | # -*- coding: utf-8 -*-
"""
Test BeautifyIcon
---------------
"""
from __future__ import (absolute_import, division, print_function)
from jinja2 import Template
import folium
from folium import plugins
| 29.229508 | 140 | 0.588334 | # -*- coding: utf-8 -*-
"""
Test BeautifyIcon
---------------
"""
from __future__ import (absolute_import, division, print_function)
from jinja2 import Template
import folium
from folium import plugins
def test_beautify_icon():
m = folium.Map([30., 0.], zoom_start=3)
# BeautifyIcons
ic1 = plugins.Be... | 1,551 | 0 | 23 |
a8f874247ca4e35e657f742398b5bb62716b1a49 | 1,661 | py | Python | models/vgg.py | wangren09/ASK | f4b0f47341a1f2e3fd2a2c20898779fb589c29c5 | [
"MIT"
] | 54 | 2021-08-11T08:59:52.000Z | 2021-09-29T17:35:53.000Z | models/vgg.py | wangren09/ASK | f4b0f47341a1f2e3fd2a2c20898779fb589c29c5 | [
"MIT"
] | null | null | null | models/vgg.py | wangren09/ASK | f4b0f47341a1f2e3fd2a2c20898779fb589c29c5 | [
"MIT"
] | 13 | 2021-08-11T23:50:15.000Z | 2022-02-27T18:04:08.000Z | import torch.nn as nn
| 32.568627 | 86 | 0.509332 | import torch.nn as nn
class VGG16(nn.Module):
def __init__(self):
super(VGG16, self).__init__()
cfg1 = [64, 64, 'M']
cfg2 = [128, 128, 'M']
cfg3 = [256, 256, 256, 'M']
cfg4 = [512, 512, 512, 'M']
cfg5 = [512, 512, 512, 'M']
self.layer1 = self._make_layers(cf... | 1,533 | 2 | 103 |
1509e1c5188bd7290ad8c4d58170e67abd20cdbe | 10,235 | py | Python | landsat8/core.py | paddyesch/landsat8 | 9e5736eed73ad7932c27077220362c6dac70be35 | [
"MIT"
] | 1 | 2016-11-24T10:42:57.000Z | 2016-11-24T10:42:57.000Z | landsat8/core.py | paddyesch/landsat8 | 9e5736eed73ad7932c27077220362c6dac70be35 | [
"MIT"
] | null | null | null | landsat8/core.py | paddyesch/landsat8 | 9e5736eed73ad7932c27077220362c6dac70be35 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2016 Patrick Eschenbach
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | 37.767528 | 137 | 0.669858 | # MIT License
#
# Copyright (c) 2016 Patrick Eschenbach
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | 7,701 | 0 | 322 |
a8653de9534d324f4c8a879ca13240c42270307c | 3,734 | py | Python | Shelby/driving_school.py | itinstructor/WNCCNASA | 64896f896cfaa694f4ae7f9f62948811164d10c0 | [
"CC0-1.0"
] | null | null | null | Shelby/driving_school.py | itinstructor/WNCCNASA | 64896f896cfaa694f4ae7f9f62948811164d10c0 | [
"CC0-1.0"
] | null | null | null | Shelby/driving_school.py | itinstructor/WNCCNASA | 64896f896cfaa694f4ae7f9f62948811164d10c0 | [
"CC0-1.0"
] | null | null | null | # name: driving_school.py
#--------------------------------- IMPORTS -------------------------------------#
import time # Import time library for sleep function
import easygopigo3 as easy # Import the GoPiGo3 library
gpg = easy.EasyGoPiGo3() # ... | 37.34 | 135 | 0.630691 | # name: driving_school.py
#--------------------------------- IMPORTS -------------------------------------#
import time # Import time library for sleep function
import easygopigo3 as easy # Import the GoPiGo3 library
gpg = easy.EasyGoPiGo3() # ... | 2,524 | 0 | 184 |
b634679a67b91315266daf78a009e523cc08ee09 | 130 | py | Python | awesome_panel_extensions/developer_tools/test_apps/__init__.py | Jhsmit/awesome-panel-extensions | 41eba7cf84caa911be4ed0df2a96e16fc1e70263 | [
"CC-BY-4.0"
] | 3 | 2020-07-16T07:28:45.000Z | 2020-07-17T12:53:56.000Z | awesome_panel_extensions/developer_tools/test_apps/__init__.py | MarcSkovMadsen/panel-extensions-template | f41ad8d8fb8502f87de3a4992917cbffb6299012 | [
"CC-BY-4.0"
] | null | null | null | awesome_panel_extensions/developer_tools/test_apps/__init__.py | MarcSkovMadsen/panel-extensions-template | f41ad8d8fb8502f87de3a4992917cbffb6299012 | [
"CC-BY-4.0"
] | null | null | null | """The PanelComponentExplorer makes it easy to explore components"""
from .panel_component_explorer import PanelComponentExplorer
| 43.333333 | 68 | 0.853846 | """The PanelComponentExplorer makes it easy to explore components"""
from .panel_component_explorer import PanelComponentExplorer
| 0 | 0 | 0 |
fe026149c752b3c212f98f38d4913e3dea8346b2 | 1,967 | py | Python | Classes/ResUNetPlusPlus/infer.py | Nitin-Mane/ALL-PyTorch-Segmentation-2021 | 0f3c7b129629cc2863c502898bcfa3c45077af85 | [
"MIT"
] | null | null | null | Classes/ResUNetPlusPlus/infer.py | Nitin-Mane/ALL-PyTorch-Segmentation-2021 | 0f3c7b129629cc2863c502898bcfa3c45077af85 | [
"MIT"
] | null | null | null | Classes/ResUNetPlusPlus/infer.py | Nitin-Mane/ALL-PyTorch-Segmentation-2021 | 0f3c7b129629cc2863c502898bcfa3c45077af85 | [
"MIT"
] | null | null | null |
import os
import numpy as np
import cv2
from glob import glob
from tqdm import tqdm
import tensorflow as tf
from tensorflow.keras.models import load_model
from tensorflow.keras.utils import CustomObjectScope
from data_generator import *
from metrics import dice_coef, dice_loss
if __name__ == "__main__":
model_pat... | 30.261538 | 92 | 0.682766 |
import os
import numpy as np
import cv2
from glob import glob
from tqdm import tqdm
import tensorflow as tf
from tensorflow.keras.models import load_model
from tensorflow.keras.utils import CustomObjectScope
from data_generator import *
from metrics import dice_coef, dice_loss
def mask_to_3d(mask):
mask = np.sque... | 115 | 0 | 23 |
ce6f68a12848e1fc926ef7139ad157fd2c14acc3 | 1,157 | py | Python | tests/test_base.py | Czaki/tsp_spanning | 3f0e5f338f17996c5f634824ed61282d2ea2487c | [
"MIT"
] | null | null | null | tests/test_base.py | Czaki/tsp_spanning | 3f0e5f338f17996c5f634824ed61282d2ea2487c | [
"MIT"
] | null | null | null | tests/test_base.py | Czaki/tsp_spanning | 3f0e5f338f17996c5f634824ed61282d2ea2487c | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from tsp_spanning import tsp, point_tsp, points_to_distance_matrix
if __name__ == "__main__":
unittest.main()
| 32.138889 | 66 | 0.587727 | import unittest
import numpy as np
from tsp_spanning import tsp, point_tsp, points_to_distance_matrix
class TestTSP(unittest.TestCase):
def test_work_point(self):
points = [(0, 0), (1, 1), (-1, -1), (1, 0)]
res = point_tsp(points)
self.assertTrue(len(res) == 4)
self.assertTrue(set... | 858 | 12 | 134 |
f19d2d3c111237c6c5a7402ac82046221d1da7af | 3,012 | py | Python | generation-items/items-processor.py | miomao34/data-generator | 89380929b42ba1f95f8e3e57c1f93ee7365a56d7 | [
"MIT"
] | null | null | null | generation-items/items-processor.py | miomao34/data-generator | 89380929b42ba1f95f8e3e57c1f93ee7365a56d7 | [
"MIT"
] | null | null | null | generation-items/items-processor.py | miomao34/data-generator | 89380929b42ba1f95f8e3e57c1f93ee7365a56d7 | [
"MIT"
] | null | null | null | import json
import csv
from typing import Dict, List, Union
def get_items_list(filename: str) -> List:
"""Loads items data from formatted csv files and returns
the items list
"""
primary_title_column = 0
secondary_title_column = 1
rarity_column = 2
name_column = 3
# stats are messy... | 34.227273 | 175 | 0.583333 | import json
import csv
from typing import Dict, List, Union
def get_items_list(filename: str) -> List:
"""Loads items data from formatted csv files and returns
the items list
"""
primary_title_column = 0
secondary_title_column = 1
rarity_column = 2
name_column = 3
# stats are messy... | 123 | 0 | 23 |
786d33695c7f8f1b30e7a5ec291198dcf8be08ba | 2,325 | py | Python | tests/opytimizer/optimizers/science/test_efo.py | anukaal/opytimizer | 5f1ccc0da80e6a4cabd99578fa24cf4f6466f9b9 | [
"Apache-2.0"
] | 528 | 2018-10-01T20:00:09.000Z | 2022-03-27T11:15:31.000Z | tests/opytimizer/optimizers/science/test_efo.py | anukaal/opytimizer | 5f1ccc0da80e6a4cabd99578fa24cf4f6466f9b9 | [
"Apache-2.0"
] | 17 | 2019-10-30T00:47:03.000Z | 2022-03-21T11:39:28.000Z | tests/opytimizer/optimizers/science/test_efo.py | anukaal/opytimizer | 5f1ccc0da80e6a4cabd99578fa24cf4f6466f9b9 | [
"Apache-2.0"
] | 35 | 2018-10-01T20:03:23.000Z | 2022-03-20T03:54:15.000Z | import numpy as np
from opytimizer.optimizers.science import efo
from opytimizer.spaces import search
np.random.seed(0)
| 18.164063 | 79 | 0.569462 | import numpy as np
from opytimizer.optimizers.science import efo
from opytimizer.spaces import search
np.random.seed(0)
def test_efo_params():
params = {
'positive_field': 0.1,
'negative_field': 0.5,
'ps_ratio': 0.1,
'r_ratio': 0.4
}
new_efo = efo.EFO(params=params)
... | 2,107 | 0 | 92 |
22af80f58a32481092f7cbbec89e46075559aa22 | 783 | py | Python | src/jams/task.py | saromanov/jams | 76b95b373cc41466c0d397c8c5681a02b0345e16 | [
"MIT"
] | null | null | null | src/jams/task.py | saromanov/jams | 76b95b373cc41466c0d397c8c5681a02b0345e16 | [
"MIT"
] | 3 | 2019-01-03T19:41:01.000Z | 2019-01-31T13:14:26.000Z | src/jams/task.py | saromanov/jams | 76b95b373cc41466c0d397c8c5681a02b0345e16 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
james.task
~~~~~~~~~~~~~
Implementation of the task. Task this is action which contains
checking. It should contains rule, weight
"""
| 22.371429 | 66 | 0.58493 | # -*- coding: utf-8 -*-
"""
james.task
~~~~~~~~~~~~~
Implementation of the task. Task this is action which contains
checking. It should contains rule, weight
"""
class TaskBase:
def __init__(self, name, *args, **kwargs):
self._name = name
def __str__(self):
return self._name
... | 299 | 232 | 72 |
2d15005c1f91448fffe8337592d219ad885c8d0d | 964 | py | Python | baloney/__main__.py | tonybaloney/baloney-script | 24b1158634e473d48f14d23c9f66a049bdcce6f9 | [
"MIT"
] | null | null | null | baloney/__main__.py | tonybaloney/baloney-script | 24b1158634e473d48f14d23c9f66a049bdcce6f9 | [
"MIT"
] | null | null | null | baloney/__main__.py | tonybaloney/baloney-script | 24b1158634e473d48f14d23c9f66a049bdcce6f9 | [
"MIT"
] | null | null | null | import argparse
import baloney.parser as baloney_parser
from baloney.interpreter import BaloneyInterpreter
parser = argparse.ArgumentParser()
parser.add_argument('--lex', type=bool)
parser.add_argument("file", type=str,
help="Target .bs file")
if __name__ == '__main__':
args = parser.parse_arg... | 25.368421 | 54 | 0.61722 | import argparse
import baloney.parser as baloney_parser
from baloney.interpreter import BaloneyInterpreter
parser = argparse.ArgumentParser()
parser.add_argument('--lex', type=bool)
parser.add_argument("file", type=str,
help="Target .bs file")
def run_lexer(source):
from baloney.lexer import l... | 579 | 0 | 46 |
e0cad9a632da0f19e6edc97400a819c5abc7284c | 2,088 | py | Python | app.py | totoropo/Emotion-Detection- | cbecd89a0693f44ad2abc29fd96320841f875ad9 | [
"RSA-MD"
] | 3 | 2021-06-18T10:21:02.000Z | 2021-06-21T05:54:38.000Z | app.py | tsangharry/Emotion-Detection- | cbecd89a0693f44ad2abc29fd96320841f875ad9 | [
"RSA-MD"
] | null | null | null | app.py | tsangharry/Emotion-Detection- | cbecd89a0693f44ad2abc29fd96320841f875ad9 | [
"RSA-MD"
] | null | null | null | import streamlit as st
import cv2
import os
from inference import return_annotated_images
from tensorflow.keras.models import load_model
from streamlit_webrtc import (
ClientSettings,
VideoTransformerBase,
WebRtcMode,
webrtc_streamer,
)
WEBRTC_CLIENT_SETTINGS = ClientSettings(
rtc_configuration={"i... | 27.84 | 92 | 0.665709 | import streamlit as st
import cv2
import os
from inference import return_annotated_images
from tensorflow.keras.models import load_model
from streamlit_webrtc import (
ClientSettings,
VideoTransformerBase,
WebRtcMode,
webrtc_streamer,
)
WEBRTC_CLIENT_SETTINGS = ClientSettings(
rtc_configuration={"i... | 546 | 26 | 88 |
92c03b96267c810090cd7e2215635b87807b5c40 | 6,913 | py | Python | fluxory/lib/packet/geneve.py | viniarck/fluxory | a00b930785039b81807290d585c6b2a31142e9d2 | [
"Apache-2.0"
] | null | null | null | fluxory/lib/packet/geneve.py | viniarck/fluxory | a00b930785039b81807290d585c6b2a31142e9d2 | [
"Apache-2.0"
] | 13 | 2019-04-03T15:08:45.000Z | 2019-05-17T23:10:16.000Z | fluxory/lib/packet/geneve.py | viniarck/fluxory | a00b930785039b81807290d585c6b2a31142e9d2 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2016 Nippon Telegraph and Telephone Corporation.
#
# 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 appli... | 36.193717 | 77 | 0.542022 | # Copyright (C) 2016 Nippon Telegraph and Telephone Corporation.
#
# 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 appli... | 3,316 | 0 | 292 |
463b9880708ab93eb7c556b07a756c4f2a013afe | 4,116 | py | Python | adafruit_pn532/i2c.py | dunkmann00/Adafruit_CircuitPython_PN532 | b741c77cee4c1fce61bc478b6afa2e11528389f9 | [
"MIT"
] | null | null | null | adafruit_pn532/i2c.py | dunkmann00/Adafruit_CircuitPython_PN532 | b741c77cee4c1fce61bc478b6afa2e11528389f9 | [
"MIT"
] | null | null | null | adafruit_pn532/i2c.py | dunkmann00/Adafruit_CircuitPython_PN532 | b741c77cee4c1fce61bc478b6afa2e11528389f9 | [
"MIT"
] | null | null | null | # Adafruit PN532 NFC/RFID control library.
# Author: Tony DiCola
#
# The MIT License (MIT)
#
# Copyright (c) 2015-2018 Adafruit Industries
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software wi... | 37.761468 | 81 | 0.649417 | # Adafruit PN532 NFC/RFID control library.
# Author: Tony DiCola
#
# The MIT License (MIT)
#
# Copyright (c) 2015-2018 Adafruit Industries
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software wi... | 0 | 0 | 0 |
606edc3070bd5e542a9a768c731f9e95ef340f46 | 4,670 | py | Python | script.py | AleksMVP/mitm-proxy | 89c1ee40b78aecb0621c28515906ba635c98c7d8 | [
"MIT"
] | 2 | 2021-06-06T14:06:19.000Z | 2021-11-30T19:12:38.000Z | script.py | AleksMVP/myproxy | 89c1ee40b78aecb0621c28515906ba635c98c7d8 | [
"MIT"
] | 1 | 2021-12-11T18:30:39.000Z | 2022-02-27T15:39:34.000Z | script.py | AleksMVP/myproxy | 89c1ee40b78aecb0621c28515906ba635c98c7d8 | [
"MIT"
] | 2 | 2021-06-06T15:21:52.000Z | 2021-08-12T10:15:10.000Z | from http.server import BaseHTTPRequestHandler
import http
import argparse
from urllib.parse import urlparse
from urllib.parse import urlencode
from urllib.parse import parse_qs
from urllib.parse import unquote
import socket, ssl, pprint
from io import BytesIO
XSS = "'\"><img src=\"\" onerror=alert(\"\")>"
FILE_PATH =... | 34.850746 | 144 | 0.631906 | from http.server import BaseHTTPRequestHandler
import http
import argparse
from urllib.parse import urlparse
from urllib.parse import urlencode
from urllib.parse import parse_qs
from urllib.parse import unquote
import socket, ssl, pprint
from io import BytesIO
XSS = "'\"><img src=\"\" onerror=alert(\"\")>"
FILE_PATH =... | 3,119 | 28 | 271 |
b1892cce88651cc532dbfc88347950e86e324f77 | 8,579 | py | Python | cvm/tests/test_tensorflow.py | CortexFoundation/tvm-cvm | d8941dc60a51dd27a6d2accc1eff2eced3b3640d | [
"Apache-2.0"
] | 6 | 2019-07-04T09:42:53.000Z | 2021-12-28T13:19:48.000Z | cvm/tests/test_tensorflow.py | CortexFoundation/tvm-cvm | d8941dc60a51dd27a6d2accc1eff2eced3b3640d | [
"Apache-2.0"
] | 4 | 2019-06-27T08:05:18.000Z | 2021-09-09T18:59:11.000Z | cvm/tests/test_tensorflow.py | CortexFoundation/tvm-cvm | d8941dc60a51dd27a6d2accc1eff2eced3b3640d | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import utils
from tensorflow.keras import backend as K
from tensorflow.keras.models import load_model
# from keras import backend as K
# from keras.models import load_model
# from tensorflow.python.keras import backend as K
def freeze_session(session, keep_var_names=None, output_names=None, c... | 38.819005 | 111 | 0.659751 | import tensorflow as tf
import utils
from tensorflow.keras import backend as K
from tensorflow.keras.models import load_model
# from keras import backend as K
# from keras.models import load_model
# from tensorflow.python.keras import backend as K
def freeze_session(session, keep_var_names=None, output_names=None, c... | 5,730 | 0 | 180 |
de000d216bcbdb7cd4f3bca92009dd2bf900cfcc | 4,372 | py | Python | guitarfan/controlers/admin/data.py | timgates42/GuitarFan | 1a6d6bcc7708cbb214648e7f5657728f6c27c48a | [
"MIT"
] | 48 | 2015-02-02T02:25:07.000Z | 2022-03-11T12:39:39.000Z | guitarfan/controlers/admin/data.py | timgates42/GuitarFan | 1a6d6bcc7708cbb214648e7f5657728f6c27c48a | [
"MIT"
] | 2 | 2015-09-13T14:00:41.000Z | 2021-08-04T16:28:25.000Z | guitarfan/controlers/admin/data.py | timgates42/GuitarFan | 1a6d6bcc7708cbb214648e7f5657728f6c27c48a | [
"MIT"
] | 16 | 2015-01-09T08:15:13.000Z | 2020-06-20T11:07:49.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import shutil
from uuid import uuid4
from flask import render_template, request, current_app, redirect, url_for, flash, Blueprint, jsonify
from flask.ext.login import login_required
from sqlalchemy import exists
from guitarfan.extensions.flasksqlalc... | 40.481481 | 127 | 0.527219 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import shutil
from uuid import uuid4
from flask import render_template, request, current_app, redirect, url_for, flash, Blueprint, jsonify
from flask.ext.login import login_required
from sqlalchemy import exists
from guitarfan.extensions.flasksqlalc... | 3,692 | 0 | 22 |
1a6635e183b5e8541c98be0db7c6d9ba49118650 | 5,655 | py | Python | tests/test_rest_of_website.py | total-impact/impactstory-tester | 7a1ba294aca1ccb97d03ad5abb48505790926d27 | [
"MIT"
] | 1 | 2015-02-19T15:17:56.000Z | 2015-02-19T15:17:56.000Z | tests/test_rest_of_website.py | ourresearch/impactstory-tester | 7a1ba294aca1ccb97d03ad5abb48505790926d27 | [
"MIT"
] | null | null | null | tests/test_rest_of_website.py | ourresearch/impactstory-tester | 7a1ba294aca1ccb97d03ad5abb48505790926d27 | [
"MIT"
] | 1 | 2015-01-10T13:50:12.000Z | 2015-01-10T13:50:12.000Z | import os, requests
from selenium_test_case import SeleniumTestCase, slow, online, wd, host
import tests
from tests.pages import faq_page, about_page
from nose.tools import assert_equals, raises
| 65 | 1,876 | 0.681874 | import os, requests
from selenium_test_case import SeleniumTestCase, slow, online, wd, host
import tests
from tests.pages import faq_page, about_page
from nose.tools import assert_equals, raises
class TestFAQ(SeleniumTestCase):
def setUp(self):
self.page = faq_page.FaqPage(self.wd, self.host)
... | 4,976 | 335 | 132 |
d34a269d477cde58129f95111e3bfe221e6fa472 | 2,275 | py | Python | USV_V1/applications/sailing_robot_control/src/sailing_robot/src/sailing_robot/heading_planning_station_keeping.py | supcon-nzic/- | 52c97759f97f3222ca5465a5745842cfeb7f26a1 | [
"Apache-2.0"
] | 2 | 2020-07-16T03:15:10.000Z | 2020-09-02T09:06:36.000Z | USV_V1/applications/sailing_robot_control/src/sailing_robot/src/sailing_robot/heading_planning_station_keeping.py | supcon-nzic/- | 52c97759f97f3222ca5465a5745842cfeb7f26a1 | [
"Apache-2.0"
] | null | null | null | USV_V1/applications/sailing_robot_control/src/sailing_robot/src/sailing_robot/heading_planning_station_keeping.py | supcon-nzic/- | 52c97759f97f3222ca5465a5745842cfeb7f26a1 | [
"Apache-2.0"
] | 1 | 2021-01-20T12:47:14.000Z | 2021-01-20T12:47:14.000Z | import heading_planning_laylines
import json
import make_ros_tasks
| 48.404255 | 115 | 0.64967 | import heading_planning_laylines
import json
import make_ros_tasks
class HeadingPlan(heading_planning_laylines.HeadingPlan):
def __init__(self, *args, **kwargs):
super(HeadingPlan, self).__init__(*args, **kwargs)
self.debug_topics.extend(
[('dbg_ball_position', 'String'), ('dbg_relativ... | 1,932 | 252 | 23 |
c6524458859680d0d69f3723d59cb8ecc7c64fa7 | 205 | py | Python | src/reverseWords/rev.py | rajitbanerjee/leetcode | 720fcdd88d371e2d6592ceec8370a6760a77bb89 | [
"CC0-1.0"
] | null | null | null | src/reverseWords/rev.py | rajitbanerjee/leetcode | 720fcdd88d371e2d6592ceec8370a6760a77bb89 | [
"CC0-1.0"
] | null | null | null | src/reverseWords/rev.py | rajitbanerjee/leetcode | 720fcdd88d371e2d6592ceec8370a6760a77bb89 | [
"CC0-1.0"
] | 1 | 2021-04-28T18:17:55.000Z | 2021-04-28T18:17:55.000Z |
if __name__ == '__main__':
s = input("Input: ")
print(f"Output: {Solution().reverseWords(s)}")
| 22.777778 | 50 | 0.57561 | class Solution:
def reverseWords(self, s: str) -> str:
return " ".join(s.split()[::-1])
if __name__ == '__main__':
s = input("Input: ")
print(f"Output: {Solution().reverseWords(s)}")
| 58 | -6 | 48 |
4c691f66af872c1b99704980dafd3d5978718ed7 | 12,750 | py | Python | tests/components/tradfri/test_light.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 3 | 2020-05-18T10:18:16.000Z | 2020-12-08T11:27:55.000Z | tests/components/tradfri/test_light.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 19 | 2020-01-29T23:21:07.000Z | 2021-07-23T23:26:51.000Z | tests/components/tradfri/test_light.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 6 | 2020-04-10T06:21:11.000Z | 2021-07-01T08:53:38.000Z | """Tradfri lights platform tests."""
from copy import deepcopy
from unittest.mock import Mock, MagicMock, patch, PropertyMock
import pytest
from pytradfri.device import Device
from pytradfri.device.light import Light
from pytradfri.device.light_control import LightControl
from homeassistant.components import tradfri... | 30.871671 | 88 | 0.645569 | """Tradfri lights platform tests."""
from copy import deepcopy
from unittest.mock import Mock, MagicMock, patch, PropertyMock
import pytest
from pytradfri.device import Device
from pytradfri.device.light import Light
from pytradfri.device.light_control import LightControl
from homeassistant.components import tradfri... | 0 | 0 | 0 |
6b3c1d8a07e268a18b08211e3dee8a308ba8a690 | 144 | py | Python | main/context_processors.py | Aaron1011/texting_wall | c20b421652fbdaef927e9d206fc17d8f1f40ae46 | [
"MIT"
] | null | null | null | main/context_processors.py | Aaron1011/texting_wall | c20b421652fbdaef927e9d206fc17d8f1f40ae46 | [
"MIT"
] | null | null | null | main/context_processors.py | Aaron1011/texting_wall | c20b421652fbdaef927e9d206fc17d8f1f40ae46 | [
"MIT"
] | null | null | null | from texting_wall import settings as django_settings
| 28.8 | 65 | 0.826389 | from texting_wall import settings as django_settings
def analytics(request):
return {'GOOGLE_ANALYTICS': django_settings.GOOGLE_ANALYTICS}
| 68 | 0 | 23 |
75bbbe94c8482fd95f86698a468a6f4f4f6262de | 2,620 | py | Python | utils/preprocessing.py | birds-on-mars/birdsonearth | 62921423b787ad8b81b8e60e8de42a3f6e113d88 | [
"Apache-2.0"
] | 13 | 2019-04-11T10:02:11.000Z | 2021-12-01T22:27:18.000Z | utils/preprocessing.py | birds-on-mars/birdsonearth | 62921423b787ad8b81b8e60e8de42a3f6e113d88 | [
"Apache-2.0"
] | 2 | 2019-12-17T13:31:09.000Z | 2020-05-14T09:48:10.000Z | utils/preprocessing.py | birds-on-mars/birdsonearth | 62921423b787ad8b81b8e60e8de42a3f6e113d88 | [
"Apache-2.0"
] | 2 | 2020-07-17T21:03:18.000Z | 2021-07-14T02:09:31.000Z | import random
import numpy as np
import matplotlib.pyplot as plt
import os
import pandas as pd
import torch
from torch.utils.data import DataLoader, Dataset
from torch.utils.data.sampler import SubsetRandomSampler
import imp
from librosa.core import load
from librosa.output import write_wav
from scipy.io import wavfile... | 39.104478 | 102 | 0.695038 | import random
import numpy as np
import matplotlib.pyplot as plt
import os
import pandas as pd
import torch
from torch.utils.data import DataLoader, Dataset
from torch.utils.data.sampler import SubsetRandomSampler
import imp
from librosa.core import load
from librosa.output import write_wav
from scipy.io import wavfile... | 823 | 0 | 46 |
8ac93b1625af7009e5262f966de85fc5e93bd08d | 11,215 | py | Python | dicom2nifti/image_volume.py | JuanPabloMontoya271/dicom2nifti | dfea030fbc47ed9c43d7bb1c8a468c2be963a043 | [
"MIT"
] | 197 | 2016-04-05T15:24:23.000Z | 2022-03-25T17:37:10.000Z | dicom2nifti/image_volume.py | JuanPabloMontoya271/dicom2nifti | dfea030fbc47ed9c43d7bb1c8a468c2be963a043 | [
"MIT"
] | 102 | 2017-05-12T07:08:48.000Z | 2022-03-22T00:21:54.000Z | dicom2nifti/image_volume.py | JuanPabloMontoya271/dicom2nifti | dfea030fbc47ed9c43d7bb1c8a468c2be963a043 | [
"MIT"
] | 60 | 2016-12-13T22:11:56.000Z | 2022-03-30T22:55:52.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 7 07:40:20 2013
@author: abrys
"""
# To ignore numpy errors:
# pylint: disable=E1101
import nibabel
import numpy
from dicom2nifti.common import get_nifti_data
class Slice(object):
"""
Class containing all data for a single slice in an image volume
"""... | 45.221774 | 115 | 0.659028 | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 7 07:40:20 2013
@author: abrys
"""
# To ignore numpy errors:
# pylint: disable=E1101
import nibabel
import numpy
from dicom2nifti.common import get_nifti_data
class Slice(object):
"""
Class containing all data for a single slice in an image volume
"""... | 5,355 | 0 | 104 |
6ca5840b2afb8548af45325d440f2ce279a04e57 | 8,291 | py | Python | pymarlin/plugins/hf_seq2seq/module_classes.py | nifarn/PyMarlin | ea1f5f927aa85112ecebc206d53b5c3ee65704fa | [
"MIT"
] | 20 | 2021-06-09T18:46:45.000Z | 2022-02-09T01:08:13.000Z | pymarlin/plugins/hf_seq2seq/module_classes.py | nifarn/PyMarlin | ea1f5f927aa85112ecebc206d53b5c3ee65704fa | [
"MIT"
] | 50 | 2021-06-09T17:50:35.000Z | 2022-02-07T23:02:30.000Z | pymarlin/plugins/hf_seq2seq/module_classes.py | nifarn/PyMarlin | ea1f5f927aa85112ecebc206d53b5c3ee65704fa | [
"MIT"
] | 5 | 2021-06-21T22:24:30.000Z | 2021-12-21T17:08:21.000Z | from typing import List, Dict
import torch
from pymarlin.core import trainer_backend, module_interface, trainer
from torch.utils.data import DataLoader
# too long import
from pymarlin.utils.stats import global_stats
from pymarlin.utils.config_parser.custom_arg_parser import CustomArgParser
from pymarlin.utils.distribu... | 34.260331 | 102 | 0.644554 | from typing import List, Dict
import torch
from pymarlin.core import trainer_backend, module_interface, trainer
from torch.utils.data import DataLoader
# too long import
from pymarlin.utils.stats import global_stats
from pymarlin.utils.config_parser.custom_arg_parser import CustomArgParser
from pymarlin.utils.distribu... | 5,156 | 1,006 | 89 |
31e188b24e477c5a5d5c14f9c92fc0e596b84bcc | 6,565 | py | Python | src/pybind/setup.py | Booritas/slideio | fdee97747cc73f087a5538aef6a0315ec75becca | [
"BSD-3-Clause"
] | 6 | 2021-01-25T15:21:31.000Z | 2022-03-07T09:23:37.000Z | src/pybind/setup.py | Booritas/slideio | fdee97747cc73f087a5538aef6a0315ec75becca | [
"BSD-3-Clause"
] | 3 | 2020-12-30T16:21:42.000Z | 2022-03-07T09:23:18.000Z | src/pybind/setup.py | Booritas/slideio | fdee97747cc73f087a5538aef6a0315ec75becca | [
"BSD-3-Clause"
] | null | null | null | import os
import re
import sys
import platform
import subprocess
import fnmatch
import shutil
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
import setuptools.command.build_py
from distutils.version import LooseVersion
from ctypes.util import find_library
ver... | 32.181373 | 95 | 0.585986 | import os
import re
import sys
import platform
import subprocess
import fnmatch
import shutil
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
import setuptools.command.build_py
from distutils.version import LooseVersion
from ctypes.util import find_library
ver... | 3,599 | 18 | 171 |
a02429054cb0cf7b20e8267bcc65eb77f6e899a8 | 1,064 | py | Python | workflow/scripts/prep_trinity.py | matinnuhamunada/rnaseq_kadal | 4e915866b460206ac499c3022b853aa1dcc65b51 | [
"MIT"
] | null | null | null | workflow/scripts/prep_trinity.py | matinnuhamunada/rnaseq_kadal | 4e915866b460206ac499c3022b853aa1dcc65b51 | [
"MIT"
] | 2 | 2022-01-14T17:43:24.000Z | 2022-01-21T11:33:44.000Z | workflow/scripts/prep_trinity.py | matinnuhamunada/rnaseq_kadal | 4e915866b460206ac499c3022b853aa1dcc65b51 | [
"MIT"
] | null | null | null | import pandas as pd
from pathlib import Path
import sys
def get_trinity_samples(run_name, condition, outfile, samples_path="config/samples.tsv", units_path="config/units.tsv"):
"""
"""
samples = (
pd.read_csv(samples_path, sep="\t", dtype={"ID": str})
.set_index("ID", drop=False)
.s... | 29.555556 | 120 | 0.577068 | import pandas as pd
from pathlib import Path
import sys
def get_trinity_samples(run_name, condition, outfile, samples_path="config/samples.tsv", units_path="config/units.tsv"):
"""
"""
samples = (
pd.read_csv(samples_path, sep="\t", dtype={"ID": str})
.set_index("ID", drop=False)
.s... | 0 | 0 | 0 |
066d4d4b7e35674f6bd507d4b6745a2269a00cea | 2,779 | py | Python | interfaces/srvr_tools/c_assign.py | krattai/AEBL | a7b12c97479e1236d5370166b15ca9f29d7d4265 | [
"BSD-2-Clause"
] | 4 | 2016-04-26T03:43:54.000Z | 2016-11-17T08:09:04.000Z | interfaces/srvr_tools/c_assign.py | krattai/AEBL | a7b12c97479e1236d5370166b15ca9f29d7d4265 | [
"BSD-2-Clause"
] | 17 | 2015-01-05T21:06:22.000Z | 2015-12-07T20:45:44.000Z | interfaces/srvr_tools/c_assign.py | krattai/AEBL | a7b12c97479e1236d5370166b15ca9f29d7d4265 | [
"BSD-2-Clause"
] | 3 | 2016-04-26T03:43:55.000Z | 2020-11-06T11:02:08.000Z | #!/usr/bin/env python
# Copyright (C) 2016 Uvea I. S., Kevin Rattai
#
# Watch for channel request and assign channel based on prior or unassigned chan
#
# This software is based on an unknown license, but is available
# with no license statement from here:
# http://stackoverflow.com/questions/31775450/publish-and-subs... | 29.88172 | 89 | 0.651673 | #!/usr/bin/env python
# Copyright (C) 2016 Uvea I. S., Kevin Rattai
#
# Watch for channel request and assign channel based on prior or unassigned chan
#
# This software is based on an unknown license, but is available
# with no license statement from here:
# http://stackoverflow.com/questions/31775450/publish-and-subs... | 1,050 | 0 | 114 |
4388231220b15bd9c8b6a792db56c557ffa340b3 | 2,948 | py | Python | source/infrastructure/personalize/aws_lambda/functions/environment.py | turnoutnow/maintaining-personalized-experiences-with-machine-learning | b45588c094734cce70198811890a28e65b8e39e1 | [
"Apache-2.0"
] | null | null | null | source/infrastructure/personalize/aws_lambda/functions/environment.py | turnoutnow/maintaining-personalized-experiences-with-machine-learning | b45588c094734cce70198811890a28e65b8e39e1 | [
"Apache-2.0"
] | null | null | null | source/infrastructure/personalize/aws_lambda/functions/environment.py | turnoutnow/maintaining-personalized-experiences-with-machine-learning | b45588c094734cce70198811890a28e65b8e39e1 | [
"Apache-2.0"
] | null | null | null | # ######################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... | 60.163265 | 120 | 0.542062 | # ######################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... | 751 | 0 | 27 |
f4b84ddd46fdf014d7210c8b0802837e20498fe3 | 356 | py | Python | 8kyu/test_swap_values.py | adun/codewars.py | 89e7d81e9ca05a432007d634892c1cba28f5b715 | [
"MIT"
] | null | null | null | 8kyu/test_swap_values.py | adun/codewars.py | 89e7d81e9ca05a432007d634892c1cba28f5b715 | [
"MIT"
] | null | null | null | 8kyu/test_swap_values.py | adun/codewars.py | 89e7d81e9ca05a432007d634892c1cba28f5b715 | [
"MIT"
] | null | null | null | # I would like to be able to pass an array with two elements to my swapValues function
# to swap the values. However it appears that the values aren't changing.
# Can you figure out what's wrong here?
| 25.428571 | 86 | 0.676966 | # I would like to be able to pass an array with two elements to my swapValues function
# to swap the values. However it appears that the values aren't changing.
# Can you figure out what's wrong here?
def swap_values(args):
args[0], args[1] = args[1], args[0]
def test_swap_values():
arr = [1, 2]
swap_v... | 106 | 0 | 46 |
bcd43fdd32c531b45f4fbb862a550f3a2becbeff | 20,304 | py | Python | infrastructure-provisioning/src/general/scripts/azure/edge_configure.py | ofuks/DLab | 460804a2559843d099936fe40373093f9bf9edcb | [
"Apache-2.0"
] | null | null | null | infrastructure-provisioning/src/general/scripts/azure/edge_configure.py | ofuks/DLab | 460804a2559843d099936fe40373093f9bf9edcb | [
"Apache-2.0"
] | null | null | null | infrastructure-provisioning/src/general/scripts/azure/edge_configure.py | ofuks/DLab | 460804a2559843d099936fe40373093f9bf9edcb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# *****************************************************************************
#
# Copyright (c) 2016, EPAM SYSTEMS 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
#
#... | 66.570492 | 131 | 0.625 | #!/usr/bin/python
# *****************************************************************************
#
# Copyright (c) 2016, EPAM SYSTEMS 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
#
#... | 0 | 0 | 0 |
0360b4a0c14622785e2c5d98e3fb589264013d5d | 5,846 | py | Python | samples/cgc/backdoor/01_nacl.py | EarthCompass/patchkit | 7d3dd1f6ad410a1bb975b544ccb666c859ec2448 | [
"MIT"
] | 631 | 2016-08-08T01:44:40.000Z | 2022-03-18T17:38:13.000Z | samples/cgc/backdoor/01_nacl.py | EarthCompass/patchkit | 7d3dd1f6ad410a1bb975b544ccb666c859ec2448 | [
"MIT"
] | 32 | 2016-08-08T01:58:09.000Z | 2021-06-17T11:06:51.000Z | samples/cgc/backdoor/01_nacl.py | EarthCompass/patchkit | 7d3dd1f6ad410a1bb975b544ccb666c859ec2448 | [
"MIT"
] | 94 | 2016-08-08T05:10:06.000Z | 2021-06-17T04:55:06.000Z | import os
import sys
from util import read
from util.crypto.rc4 import rc4
from util.patch.syscall import find_syscall_funcs
| 33.988372 | 108 | 0.522237 | import os
import sys
from util import read
from util.crypto.rc4 import rc4
from util.patch.syscall import find_syscall_funcs
def backdoor(pt):
c = read('backdoor/tweetnacl.c')
c = c.replace('#include "tweetnacl.h"', '')
h = read('backdoor/tweetnacl.h')
pubkey = read('backdoor/pubkey.h')
randombyte... | 5,697 | 0 | 23 |
72a8d7b86cb93e472da4a88ffcffd54c32dd8924 | 2,209 | py | Python | pynfact/server.py | jacorbal/pynfact | 3dc512ef7209b596353060616c0df2abe19a638f | [
"MIT"
] | null | null | null | pynfact/server.py | jacorbal/pynfact | 3dc512ef7209b596353060616c0df2abe19a638f | [
"MIT"
] | null | null | null | pynfact/server.py | jacorbal/pynfact | 3dc512ef7209b596353060616c0df2abe19a638f | [
"MIT"
] | null | null | null | # vim: set ft=python fileencoding=utf-8 tw=72 fdm=indent foldlevel=1 nowrap:
"""
Simple server for testing purposes.
:copyright: © 2012-2020, J. A. Corbal
:license: MIT
"""
import os
import sys
from http.server import HTTPServer, SimpleHTTPRequestHandler
class Server:
"""Simple server.
.. versionchanged:: 1... | 32.014493 | 76 | 0.586238 | # vim: set ft=python fileencoding=utf-8 tw=72 fdm=indent foldlevel=1 nowrap:
"""
Simple server for testing purposes.
:copyright: © 2012-2020, J. A. Corbal
:license: MIT
"""
import os
import sys
from http.server import HTTPServer, SimpleHTTPRequestHandler
class Server:
"""Simple server.
.. versionchanged:: 1... | 0 | 0 | 0 |
68dd208ec7d8ba0ae708db0beebd344158030e83 | 691 | py | Python | molsysmt/basic/has_attribute.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | molsysmt/basic/has_attribute.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | molsysmt/basic/has_attribute.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | from molsysmt._private.exceptions import *
from molsysmt._private.digestion import *
from molsysmt._private.lists_and_tuples import is_list_or_tuple
| 25.592593 | 79 | 0.738061 | from molsysmt._private.exceptions import *
from molsysmt._private.digestion import *
from molsysmt._private.lists_and_tuples import is_list_or_tuple
def has_attribute(molecular_system, attribute, check=True):
from . import where_is_attribute, is_molecular_system
from molsysmt.tools.attribute import is_attribu... | 518 | 0 | 23 |
4aeef765926424bacb89047c3511142f5d667655 | 53,295 | py | Python | api/app/reviews/tests.py | bamtak/Baobab | 5489e97a536a3a1c1e994c333a1c471385116cf6 | [
"Apache-2.0"
] | null | null | null | api/app/reviews/tests.py | bamtak/Baobab | 5489e97a536a3a1c1e994c333a1c471385116cf6 | [
"Apache-2.0"
] | null | null | null | api/app/reviews/tests.py | bamtak/Baobab | 5489e97a536a3a1c1e994c333a1c471385116cf6 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
import json
from app import db, LOGGER
from app.utils.testing import ApiTestCase
from app.events.models import Event, EventRole
from app.users.models import AppUser, UserCategory, Country
from app.applicationModel.models import ApplicationForm, Question, Section
from app.responses... | 42.910628 | 185 | 0.618013 | from datetime import datetime
import json
from app import db, LOGGER
from app.utils.testing import ApiTestCase
from app.events.models import Event, EventRole
from app.users.models import AppUser, UserCategory, Country
from app.applicationModel.models import ApplicationForm, Question, Section
from app.responses... | 50,461 | 2,172 | 24 |
fccd3577beac65370c5b11906b2378b151aeac75 | 10,050 | py | Python | TextAnalyzer.py | GoetzEdinger/TextAnalyzer | ca305163fce52ade2edd20d80902911fc022f175 | [
"MIT"
] | 1 | 2015-07-12T21:31:27.000Z | 2015-07-12T21:31:27.000Z | TextAnalyzer.py | GoetzEdinger/TextAnalyzer | ca305163fce52ade2edd20d80902911fc022f175 | [
"MIT"
] | null | null | null | TextAnalyzer.py | GoetzEdinger/TextAnalyzer | ca305163fce52ade2edd20d80902911fc022f175 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Created on 09.07.2015
@author: Goetz Edinger
'''
import enchant
import nltk.data
from nltk.tokenize import sent_tokenize
from nltk.tokenize import word_tokenize
import string
import sys
debug = True
dict_sentence_length = {}
dict_word_length = {}
number_of_letters ... | 36.948529 | 931 | 0.644279 | # -*- coding: utf-8 -*-
'''
Created on 09.07.2015
@author: Goetz Edinger
'''
import enchant
import nltk.data
from nltk.tokenize import sent_tokenize
from nltk.tokenize import word_tokenize
import string
import sys
debug = True
dict_sentence_length = {}
dict_word_length = {}
number_of_letters ... | 7,907 | 0 | 184 |
6dcb4bfbb7a76895bfedb5f55a7a7983bbd60f32 | 11,375 | py | Python | fdk/context.py | jlowe000/fdk-python | d7b96bcb974733792cc29d0afd3d86b3f120ac54 | [
"ECL-2.0",
"Apache-2.0"
] | 44 | 2017-11-03T14:59:07.000Z | 2022-01-17T18:58:07.000Z | fdk/context.py | jlowe000/fdk-python | d7b96bcb974733792cc29d0afd3d86b3f120ac54 | [
"ECL-2.0",
"Apache-2.0"
] | 66 | 2017-11-28T16:01:55.000Z | 2021-07-28T11:20:13.000Z | fdk/context.py | jlowe000/fdk-python | d7b96bcb974733792cc29d0afd3d86b3f120ac54 | [
"ECL-2.0",
"Apache-2.0"
] | 16 | 2017-12-08T15:58:43.000Z | 2022-01-28T16:08:36.000Z | #
# Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 32.78098 | 78 | 0.63833 | #
# Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 2,729 | 4,417 | 69 |
e8b50469be455015225ee1e1a7a899709b2a0f60 | 1,622 | py | Python | models/user.py | CodeByMini/thefriendzone | 84c3dd14ba2b0be7cf3cd681f761d3d6780498d4 | [
"Apache-2.0"
] | null | null | null | models/user.py | CodeByMini/thefriendzone | 84c3dd14ba2b0be7cf3cd681f761d3d6780498d4 | [
"Apache-2.0"
] | null | null | null | models/user.py | CodeByMini/thefriendzone | 84c3dd14ba2b0be7cf3cd681f761d3d6780498d4 | [
"Apache-2.0"
] | null | null | null | from models.status import Status
from datetime import datetime
class User:
"""
The User object represents a person,
bot or entity registered as a user
in the application.
username:
(str)
password:
(str)
last_seen:
(str)
timestamp when the user was latest
... | 22.84507 | 71 | 0.600493 | from models.status import Status
from datetime import datetime
class User:
"""
The User object represents a person,
bot or entity registered as a user
in the application.
username:
(str)
password:
(str)
last_seen:
(str)
timestamp when the user was latest
... | 740 | 0 | 317 |
ebc9c14fe5a89e7e13d7881bbe679c8d68478cf4 | 1,972 | py | Python | entertainmentCenter.py | Arie3301/udacity-movietrailers | b23b1981ba71fd1535e7a77aa4332413586ac56e | [
"MIT"
] | null | null | null | entertainmentCenter.py | Arie3301/udacity-movietrailers | b23b1981ba71fd1535e7a77aa4332413586ac56e | [
"MIT"
] | null | null | null | entertainmentCenter.py | Arie3301/udacity-movietrailers | b23b1981ba71fd1535e7a77aa4332413586ac56e | [
"MIT"
] | null | null | null | import media
import fresh_tomatoes
def main():
"""Generate an HTML page to show movies with corresponding information."""
toy_story = media.Movie(
"Toy Story",
"A story of a boy and his toys that come to life.",
"https://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg",
"h... | 30.8125 | 101 | 0.619168 | import media
import fresh_tomatoes
def main():
"""Generate an HTML page to show movies with corresponding information."""
toy_story = media.Movie(
"Toy Story",
"A story of a boy and his toys that come to life.",
"https://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg",
"h... | 0 | 0 | 0 |
a4ae68cc8e486e00feeb0701d05b2910a94a4ebd | 4,624 | py | Python | manage.py | alessiosavi/PyParser | 788f783bd17ab5d63cec62af6d54b94f2b1737c9 | [
"Apache-2.0"
] | null | null | null | manage.py | alessiosavi/PyParser | 788f783bd17ab5d63cec62af6d54b94f2b1737c9 | [
"Apache-2.0"
] | null | null | null | manage.py | alessiosavi/PyParser | 788f783bd17ab5d63cec62af6d54b94f2b1737c9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import argparse
import os
import signal
import subprocess
import sys
# Project defaults
from utils import utils
# ===== LOAD CONFIGURATION FILE =====
CONFIG_FILE = "conf/conf.json"
CFG, log, = utils.init_main_data(CONFIG_FILE)
if CFG is None or log is None:
print("Unable to load {}".format... | 29.832258 | 113 | 0.601644 | # -*- coding: utf-8 -*-
import argparse
import os
import signal
import subprocess
import sys
# Project defaults
from utils import utils
# ===== LOAD CONFIGURATION FILE =====
CONFIG_FILE = "conf/conf.json"
CFG, log, = utils.init_main_data(CONFIG_FILE)
if CFG is None or log is None:
print("Unable to load {}".format... | 1,655 | -7 | 256 |
1e2d804940cb39ed13692c328011679d3bd4c173 | 2,285 | py | Python | examples/textbook/salpeter.py | joshuawall/amuse | c2034074ee76c08057c4faa96c32044ab40952e9 | [
"Apache-2.0"
] | 1 | 2019-12-28T22:47:51.000Z | 2019-12-28T22:47:51.000Z | examples/textbook/salpeter.py | joshuawall/amuse | c2034074ee76c08057c4faa96c32044ab40952e9 | [
"Apache-2.0"
] | null | null | null | examples/textbook/salpeter.py | joshuawall/amuse | c2034074ee76c08057c4faa96c32044ab40952e9 | [
"Apache-2.0"
] | 2 | 2021-11-19T04:41:37.000Z | 2021-11-20T02:11:17.000Z | from amuse.lab import new_powerlaw_mass_distribution
###BOOKLISTSTART###
import numpy
import math
from amuse.units import units
from matplotlib import pyplot
from prepare_figure import figure_frame, get_distinct
###BOOKLISTSTOP###
if __name__ in ('__main__', '__plot__'):
o, arguments = new_option_parser().parse_... | 36.854839 | 76 | 0.623632 | from amuse.lab import new_powerlaw_mass_distribution
def generate_power_law_mass_function(N, Mmin, Mmax, ximf):
masses = new_powerlaw_mass_distribution(N, Mmin, Mmax, ximf)
plot_mass_function(masses, ximf)
###BOOKLISTSTART###
import numpy
import math
from amuse.units import units
from matplotlib import pyplot... | 1,808 | 0 | 69 |
fca339414723ecddd70b58456b989c6b107a2352 | 3,396 | py | Python | gpxtrackposter/year_range.py | narfel/GpxTrackPoster | 57aa34feb43f8b76ef40d1500067e532d2ff439a | [
"MIT"
] | 1 | 2021-07-09T02:57:08.000Z | 2021-07-09T02:57:08.000Z | gpxtrackposter/year_range.py | narfel/GpxTrackPoster | 57aa34feb43f8b76ef40d1500067e532d2ff439a | [
"MIT"
] | null | null | null | gpxtrackposter/year_range.py | narfel/GpxTrackPoster | 57aa34feb43f8b76ef40d1500067e532d2ff439a | [
"MIT"
] | null | null | null | """Represent a range of years, with ability to update based on a track"""
# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved.
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import datetime
import re
import typing
class YearRange:
""... | 32.653846 | 98 | 0.594229 | """Represent a range of years, with ability to update based on a track"""
# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved.
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import datetime
import re
import typing
class YearRange:
""... | 271 | 0 | 54 |
efb255992679f342c7ebd054a3ecc97828dfdb96 | 112 | py | Python | moses/char_rnn/__init__.py | samadejacobs/moses | 1fda9a06ef645f533191990cd10834e52ec29a37 | [
"MIT"
] | null | null | null | moses/char_rnn/__init__.py | samadejacobs/moses | 1fda9a06ef645f533191990cd10834e52ec29a37 | [
"MIT"
] | null | null | null | moses/char_rnn/__init__.py | samadejacobs/moses | 1fda9a06ef645f533191990cd10834e52ec29a37 | [
"MIT"
] | 3 | 2020-03-31T16:07:20.000Z | 2021-06-21T16:15:57.000Z | from .config import get_parser as char_rnn_parser
from .model import CharRNN
from .trainer import CharRNNTrainer | 37.333333 | 49 | 0.857143 | from .config import get_parser as char_rnn_parser
from .model import CharRNN
from .trainer import CharRNNTrainer | 0 | 0 | 0 |
5b54b094c6f4a462492a448757b9d3954d49c8d5 | 1,109 | py | Python | pathSum.py | pflun/learningAlgorithms | 3101e989488dfc8a56f1bf256a1c03a837fe7d97 | [
"MIT"
] | null | null | null | pathSum.py | pflun/learningAlgorithms | 3101e989488dfc8a56f1bf256a1c03a837fe7d97 | [
"MIT"
] | null | null | null | pathSum.py | pflun/learningAlgorithms | 3101e989488dfc8a56f1bf256a1c03a837fe7d97 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
from sortedArrayToBST import Solution
test = Solution()
head_node = test.sortedArrayToBST([1, 2, 3, 4, 5, 6, 7])
test1 = Solution1()
print test1.pathSum(head_node, 7)
# 4
# 2 6
# 1 3 5 7 | 27.04878 | 93 | 0.555455 | # Definition for a binary tree node.
from sortedArrayToBST import Solution
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution1(object):
def __init__(self):
# Tip: instance variable unique to each instance (not really re... | 721 | 5 | 152 |
49ef48b7da7d171f74104bc9e7bd0238f46fb42b | 2,239 | py | Python | query_hosts_create_tags.py | nadaj/Miscellany | 0c7beb9cb9f3552cf25075d847e5d3bd28054c71 | [
"BSD-3-Clause"
] | 155 | 2017-01-04T16:45:57.000Z | 2022-03-24T18:19:27.000Z | query_hosts_create_tags.py | nadaj/Miscellany | 0c7beb9cb9f3552cf25075d847e5d3bd28054c71 | [
"BSD-3-Clause"
] | 42 | 2017-03-02T21:20:10.000Z | 2021-10-13T13:10:03.000Z | query_hosts_create_tags.py | nadaj/Miscellany | 0c7beb9cb9f3552cf25075d847e5d3bd28054c71 | [
"BSD-3-Clause"
] | 127 | 2015-12-21T19:32:58.000Z | 2022-03-10T12:03:36.000Z | import json
import os
import requests
import pprint
from datadog import initialize, api
# source /opt/datadog/datadog-agent/venv/bin/activate
DD_API_KEY = os.getenv('DD_API_KEY', '')
DD_APP_KEY = os.getenv('DD_APP_KEY', '')
options = {
'api_key': DD_API_KEY,
'app_key': DD_APP_KEY
}
initialize(**options)
i... | 34.984375 | 146 | 0.712372 | import json
import os
import requests
import pprint
from datadog import initialize, api
# source /opt/datadog/datadog-agent/venv/bin/activate
DD_API_KEY = os.getenv('DD_API_KEY', '')
DD_APP_KEY = os.getenv('DD_APP_KEY', '')
options = {
'api_key': DD_API_KEY,
'app_key': DD_APP_KEY
}
initialize(**options)
i... | 0 | 0 | 0 |
5100719deadc1ab5f5956fa7c4b8e9f8c772c93c | 567 | py | Python | linter.py | CudaText-addons/cuda_lint_innosetup | 159b119f5c007f36e29c1d005188c6ec2ece1784 | [
"MIT"
] | 1 | 2021-05-08T07:45:19.000Z | 2021-05-08T07:45:19.000Z | linter.py | CudaText-addons/cuda_lint_innosetup | 159b119f5c007f36e29c1d005188c6ec2ece1784 | [
"MIT"
] | null | null | null | linter.py | CudaText-addons/cuda_lint_innosetup | 159b119f5c007f36e29c1d005188c6ec2ece1784 | [
"MIT"
] | null | null | null | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jan T. Sott
# Copyright (c) 2017 Jan T. Sott
#
# License: MIT
# Ported to CudaLint by Alexey T.
#
from cuda_lint import Linter, util
class Iscc(Linter):
"""Provides an interface to the ISCC executable."""
c... | 22.68 | 78 | 0.61552 | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jan T. Sott
# Copyright (c) 2017 Jan T. Sott
#
# License: MIT
# Ported to CudaLint by Alexey T.
#
from cuda_lint import Linter, util
class Iscc(Linter):
"""Provides an interface to the ISCC executable."""
c... | 0 | 0 | 0 |
66146d833c1b018ec787f7efcec2dd545d37bf12 | 999 | py | Python | Authentication/tests.py | MuhammadSalahAli/TolkProject | 38e655be8f1776c216f1e7b3a727b39a1ea06cfb | [
"MIT"
] | 36 | 2021-01-18T11:58:17.000Z | 2021-12-09T21:40:29.000Z | Authentication/tests.py | MuhammadSalahAli/TolkProject | 38e655be8f1776c216f1e7b3a727b39a1ea06cfb | [
"MIT"
] | 2 | 2021-07-02T04:07:58.000Z | 2021-08-22T21:23:33.000Z | Authentication/tests.py | MuhammadSalahAli/TolkProject | 38e655be8f1776c216f1e7b3a727b39a1ea06cfb | [
"MIT"
] | 7 | 2021-08-09T02:21:49.000Z | 2022-02-06T11:04:04.000Z | from django.test import TestCase
from django.contrib.auth import get_user_model
import json
User = get_user_model()
| 37 | 113 | 0.697698 | from django.test import TestCase
from django.contrib.auth import get_user_model
import json
User = get_user_model()
class TestAuthentication(TestCase):
def setUp(self) -> None:
self.user = User.objects.create_user(email='guest_1@user.com')
self.user.set_password('password')
self.user.sav... | 763 | 14 | 104 |
decee34e0333f716cf45f2e9c465d3d7ff1c09fd | 2,109 | py | Python | core/urls.py | Aju100/WikimediaDataProject | f31e7856e49f510628e2ce65f40844b1f762a546 | [
"MIT"
] | 1 | 2021-06-08T02:37:04.000Z | 2021-06-08T02:37:04.000Z | core/urls.py | Aju100/WikimediaDataProject | f31e7856e49f510628e2ce65f40844b1f762a546 | [
"MIT"
] | null | null | null | core/urls.py | Aju100/WikimediaDataProject | f31e7856e49f510628e2ce65f40844b1f762a546 | [
"MIT"
] | null | null | null | from django.urls import path, include
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('populated_cities', views.populated_cities_query, name ='populated_cities'),
path('start_tour_cities', views.start_tour_cities, name ='start_tour_cities'),
path('stop_tour_cities', views.... | 70.3 | 103 | 0.766714 | from django.urls import path, include
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('populated_cities', views.populated_cities_query, name ='populated_cities'),
path('start_tour_cities', views.start_tour_cities, name ='start_tour_cities'),
path('stop_tour_cities', views.... | 0 | 0 | 0 |
c91cf546e259967fe077b3bc9f5679adb51c38a3 | 1,130 | py | Python | ParagraphRefact.py | willard1218/LearnEnglish | c9a908ffdff097b2c819540a9a2a761c91c1eead | [
"Apache-2.0"
] | null | null | null | ParagraphRefact.py | willard1218/LearnEnglish | c9a908ffdff097b2c819540a9a2a761c91c1eead | [
"Apache-2.0"
] | null | null | null | ParagraphRefact.py | willard1218/LearnEnglish | c9a908ffdff097b2c819540a9a2a761c91c1eead | [
"Apache-2.0"
] | null | null | null | import Enum
RF = Enum.enum(ORIGINAL=0, PIECE=1, EN_LINE1=2, EN_LINE2=3) | 28.974359 | 72 | 0.69646 | import Enum
RF = Enum.enum(ORIGINAL=0, PIECE=1, EN_LINE1=2, EN_LINE2=3)
def refactWithLine(talk, countOfLine):
count = 0
talk.ResetStartOfParagraph(False)
subtitle = talk.subtitles
subtitle[0].startOfParagraph = True
for i in xrange(1,len(subtitle)):
if(subtitle[i].content[-1] == "." or subtitle[i].content[... | 899 | 0 | 158 |
793d195c49c731b9089c998b075845197f2a39b1 | 13,520 | py | Python | py/Simulator/QuestaSimulator.py | cjchin/PoC | dbb07f85648dc4d5e66696699071750fcc08c8f7 | [
"Apache-2.0"
] | 2 | 2018-03-17T18:14:52.000Z | 2021-05-02T06:47:16.000Z | py/Simulator/QuestaSimulator.py | cjchin/PoC | dbb07f85648dc4d5e66696699071750fcc08c8f7 | [
"Apache-2.0"
] | null | null | null | py/Simulator/QuestaSimulator.py | cjchin/PoC | dbb07f85648dc4d5e66696699071750fcc08c8f7 | [
"Apache-2.0"
] | 1 | 2021-05-02T06:47:19.000Z | 2021-05-02T06:47:19.000Z | # EMACS settings: -*- tab-width: 2; indent-tabs-mode: t; python-indent-offset: 2 -*-
# vim: tabstop=2:shiftwidth=2:noexpandtab
# kate: tab-width 2; replace-tabs off; indent-width 2;
#
# ==============================================================================
# Authors: Patrick Lehmann
# ... | 46.30137 | 161 | 0.723817 | # EMACS settings: -*- tab-width: 2; indent-tabs-mode: t; python-indent-offset: 2 -*-
# vim: tabstop=2:shiftwidth=2:noexpandtab
# kate: tab-width 2; replace-tabs off; indent-width 2;
#
# ==============================================================================
# Authors: Patrick Lehmann
# ... | 11,506 | 236 | 23 |
af19a1538ffdc439b60f50fdf727d12a925a93f3 | 128 | py | Python | yc228/908.py | c-yan/yukicoder | cdbbd65402177225dd989df7fe01f67908484a69 | [
"MIT"
] | null | null | null | yc228/908.py | c-yan/yukicoder | cdbbd65402177225dd989df7fe01f67908484a69 | [
"MIT"
] | null | null | null | yc228/908.py | c-yan/yukicoder | cdbbd65402177225dd989df7fe01f67908484a69 | [
"MIT"
] | null | null | null | S = input()
if all(c == ' ' for c in S[1::2]) and all('a' <= c <= 'z' for c in S[::2]):
print('Yes')
else:
print('No')
| 18.285714 | 75 | 0.445313 | S = input()
if all(c == ' ' for c in S[1::2]) and all('a' <= c <= 'z' for c in S[::2]):
print('Yes')
else:
print('No')
| 0 | 0 | 0 |
7b6e6c533e62117ccdb9f1743db9f70ee1c32542 | 5,070 | py | Python | 2dacousti_fdtd.py | dhufe/2d_ftdt_acoustics | 062ff13399cc3b9db360e047bd1deb7c0e209397 | [
"MIT"
] | null | null | null | 2dacousti_fdtd.py | dhufe/2d_ftdt_acoustics | 062ff13399cc3b9db360e047bd1deb7c0e209397 | [
"MIT"
] | null | null | null | 2dacousti_fdtd.py | dhufe/2d_ftdt_acoustics | 062ff13399cc3b9db360e047bd1deb7c0e209397 | [
"MIT"
] | null | null | null | #
#
#
#
#
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.animation as animation
## Computing grid and resolutions
# Grid size x-direction
NX = 500
# Grid size y-direction
NY = 500
## Properties of the acoustic excitation
# Frequency
freq = 60.0e3 ... | 25.477387 | 99 | 0.559369 | #
#
#
#
#
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.animation as animation
def circle(indices, xm, ym, r):
x = r - 1
y = 0
dx = 1
dy = 1
err = dx - (r * 2)
while ( x >= y):
indices [ xm + x , ym + y] = True
i... | 1,979 | 0 | 46 |
ddbe5d981cc7c179c7df3962dd94212f2262bf54 | 629 | py | Python | MOnewUser/env/lib/python3.8/site-packages/eth_hash/abc.py | julio-cesar-leitao/PGP-PKI | 9bdeb4606534d6dacba8356b223a20e204399d32 | [
"MIT"
] | 68 | 2018-02-08T20:46:16.000Z | 2022-03-18T19:36:09.000Z | MOnewUser/env/lib/python3.8/site-packages/eth_hash/abc.py | julio-cesar-leitao/PGP-PKI | 9bdeb4606534d6dacba8356b223a20e204399d32 | [
"MIT"
] | 21 | 2018-02-07T20:45:06.000Z | 2021-09-24T19:57:52.000Z | MOnewUser/env/lib/python3.8/site-packages/eth_hash/abc.py | julio-cesar-leitao/PGP-PKI | 9bdeb4606534d6dacba8356b223a20e204399d32 | [
"MIT"
] | 46 | 2018-02-08T15:15:40.000Z | 2022-03-28T18:49:32.000Z | from abc import (
ABC,
abstractmethod,
)
from typing import (
Union,
)
| 17.472222 | 72 | 0.583466 | from abc import (
ABC,
abstractmethod,
)
from typing import (
Union,
)
class PreImageAPI(ABC):
@abstractmethod
def __init__(self, value: bytes) -> None:
...
@abstractmethod
def update(self, value: bytes) -> None:
...
@abstractmethod
def digest(self) -> bytes:
... | 215 | 283 | 46 |
ef3d6bc838bd24e2609fe5471781cac8f97d2759 | 12,070 | py | Python | GP_model.py | JixiangChen-Jimmy/DMEA | 886ca864fa6b2f51867688035870f1ec344d1090 | [
"MIT"
] | null | null | null | GP_model.py | JixiangChen-Jimmy/DMEA | 886ca864fa6b2f51867688035870f1ec344d1090 | [
"MIT"
] | null | null | null | GP_model.py | JixiangChen-Jimmy/DMEA | 886ca864fa6b2f51867688035870f1ec344d1090 | [
"MIT"
] | null | null | null | import GPy
from GPyOpt.util.general import get_quantiles
import GPyOpt
import numpy as np
from math import pow, log, sqrt
import pandas as pd
# train_x : history x
# train_y : history y
# num_init : The number of initial sample points
# lsx : the collected x in last round
# lsy : the text function value c... | 43.731884 | 121 | 0.505965 | import GPy
from GPyOpt.util.general import get_quantiles
import GPyOpt
import numpy as np
from math import pow, log, sqrt
import pandas as pd
# train_x : history x
# train_y : history y
# num_init : The number of initial sample points
# lsx : the collected x in last round
# lsy : the text function value c... | 10,980 | -12 | 312 |
ddb0483295a6a1a976fc5fd283466768897fe4c3 | 350 | py | Python | definition_theme/__manifest__.py | talway/OdooERPApp | 2c44baa8ad020550098e18e630dbc57d3927d1ca | [
"Apache-2.0"
] | null | null | null | definition_theme/__manifest__.py | talway/OdooERPApp | 2c44baa8ad020550098e18e630dbc57d3927d1ca | [
"Apache-2.0"
] | null | null | null | definition_theme/__manifest__.py | talway/OdooERPApp | 2c44baa8ad020550098e18e630dbc57d3927d1ca | [
"Apache-2.0"
] | 2 | 2019-11-11T12:34:03.000Z | 2020-09-21T07:25:41.000Z | # -*- coding: utf-8 -*-
{
'name': "自定义主题界面风格",
'summary': """自定义界面风格模块""",
'description': """用以自定义Odoo界面风格的模块""",
'author': "SuXueFeng",
'website': "https://www.sxfblog.com",
'category': 'style',
'version': '0.1',
'depends': ['base'],
'data': [
'views/WebAssetsBackend.xml',
... | 19.444444 | 42 | 0.488571 | # -*- coding: utf-8 -*-
{
'name': "自定义主题界面风格",
'summary': """自定义界面风格模块""",
'description': """用以自定义Odoo界面风格的模块""",
'author': "SuXueFeng",
'website': "https://www.sxfblog.com",
'category': 'style',
'version': '0.1',
'depends': ['base'],
'data': [
'views/WebAssetsBackend.xml',
... | 0 | 0 | 0 |
4e7b9e9936d24d03c5bc95bfa26b6063c5eacaab | 195 | py | Python | tests/run_flake8/noerror.py | 10sr/flake8-no-implicit-concat | 11db2327ffc122d9481c6e03a77cf62b1dc85d25 | [
"MIT"
] | 15 | 2020-05-21T19:39:58.000Z | 2022-03-22T11:04:12.000Z | tests/run_flake8/noerror.py | 10sr/flake8-no-implicit-concat | 11db2327ffc122d9481c6e03a77cf62b1dc85d25 | [
"MIT"
] | 43 | 2020-05-20T05:19:20.000Z | 2021-11-25T05:34:51.000Z | tests/run_flake8/noerror.py | 10sr/flake8-no-implicit-concat | 11db2327ffc122d9481c6e03a77cf62b1dc85d25 | [
"MIT"
] | 1 | 2020-08-25T23:04:08.000Z | 2020-08-25T23:04:08.000Z | a = "aaa"
b = "bbb" + "ccc"
d = """ddd
eee
fff""" + "ggg"
l = ["hhh",
"iii" +
"jjj"]
noqa = "k" "l" # noqa: NIC001
noqa = ("k" # noqa: NIC002
"l")
print("abc" + "def", "ghi")
| 15 | 30 | 0.410256 | a = "aaa"
b = "bbb" + "ccc"
d = """ddd
eee
fff""" + "ggg"
l = ["hhh",
"iii" +
"jjj"]
noqa = "k" "l" # noqa: NIC001
noqa = ("k" # noqa: NIC002
"l")
print("abc" + "def", "ghi")
| 0 | 0 | 0 |
67bca61bcc5eccb73a28567b84e02d4c1c3a79b7 | 1,786 | py | Python | bookmark_website/bookmark_app/migrations/0001_initial.py | thejeshpr/bookmarks | eff748c0e7a6e3d211d3e87b25ffefca612726ce | [
"MIT"
] | null | null | null | bookmark_website/bookmark_app/migrations/0001_initial.py | thejeshpr/bookmarks | eff748c0e7a6e3d211d3e87b25ffefca612726ce | [
"MIT"
] | null | null | null | bookmark_website/bookmark_app/migrations/0001_initial.py | thejeshpr/bookmarks | eff748c0e7a6e3d211d3e87b25ffefca612726ce | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2019-11-18 16:44
from django.db import migrations, models
import django.db.models.deletion
| 42.52381 | 169 | 0.595185 | # Generated by Django 2.2.7 on 2019-11-18 16:44
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
... | 0 | 1,639 | 23 |
f675775f12c8350ddef35bc639c03e2223ccc8a6 | 1,931 | py | Python | setup.py | calibear20/NHentai-API | c543f96f4088dd0f25842e9935f2f6c84317dc55 | [
"MIT"
] | null | null | null | setup.py | calibear20/NHentai-API | c543f96f4088dd0f25842e9935f2f6c84317dc55 | [
"MIT"
] | null | null | null | setup.py | calibear20/NHentai-API | c543f96f4088dd0f25842e9935f2f6c84317dc55 | [
"MIT"
] | null | null | null | from setuptools import setup
import os
env = os.getenv('environment_name') or 'dev'
if env == 'prd':
setup(
name='NHentai-API',
version='0.0.17',
description='NHentai Python API made using webscraping.',
long_description=readme(),
long_description_content_type='text/markdow... | 35.759259 | 83 | 0.612118 | from setuptools import setup
import os
def readme():
with open('README.md') as f:
return f.read()
env = os.getenv('environment_name') or 'dev'
if env == 'prd':
setup(
name='NHentai-API',
version='0.0.17',
description='NHentai Python API made using webscraping.',
long_d... | 49 | 0 | 23 |
8f607160751ecb6032d08116ea48d35715e78810 | 25,103 | py | Python | tests/daemon/test_walletd.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | null | null | null | tests/daemon/test_walletd.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | null | null | null | tests/daemon/test_walletd.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | null | null | null | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
from unittest import TestCase
from mock import Mock
from pyqrllib.pyqrllib import bin2hstr, hstr2bin
from qrl.daemon.walletd import WalletD
from qrl.generated import ... | 44.508865 | 120 | 0.569374 | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
from unittest import TestCase
from mock import Mock
from pyqrllib.pyqrllib import bin2hstr, hstr2bin
from qrl.daemon.walletd import WalletD
from qrl.generated import ... | 23,528 | 7 | 994 |
d1d129d88ef1dad9ac4e5229af7bdc3ff834ffcc | 540 | py | Python | fbd/migrations/versions/23184a5b4714_.py | olety/FBG | 337c81ed661c11ee7283cffff63b1949363a8151 | [
"MIT"
] | null | null | null | fbd/migrations/versions/23184a5b4714_.py | olety/FBG | 337c81ed661c11ee7283cffff63b1949363a8151 | [
"MIT"
] | 11 | 2017-05-26T13:36:09.000Z | 2021-08-17T14:37:32.000Z | fbd/migrations/versions/23184a5b4714_.py | olety/FBD | 337c81ed661c11ee7283cffff63b1949363a8151 | [
"MIT"
] | null | null | null | """
Revision ID: 23184a5b4714
Revises: 2fcbb8a6de94
Create Date: 2017-05-29 17:13:59.813275
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '23184a5b4714'
down_revision = '2fcbb8a6de94'
branch_labels = None
depends_on = None
| 18.62069 | 65 | 0.681481 | """
Revision ID: 23184a5b4714
Revises: 2fcbb8a6de94
Create Date: 2017-05-29 17:13:59.813275
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '23184a5b4714'
down_revision = '2fcbb8a6de94'
branch_labels = None
depends_on = None
def upgrade():
# ### commands ... | 208 | 0 | 46 |
2ec8e0ea45f5424c33d13abaa9c4a1a92f1bdc80 | 2,011 | py | Python | dics/naver.py | jones3kd/Anki-Korean-Lookup-Addon | 5fe0717876c042b145bd2d208ad3a510626837e3 | [
"MIT"
] | null | null | null | dics/naver.py | jones3kd/Anki-Korean-Lookup-Addon | 5fe0717876c042b145bd2d208ad3a510626837e3 | [
"MIT"
] | null | null | null | dics/naver.py | jones3kd/Anki-Korean-Lookup-Addon | 5fe0717876c042b145bd2d208ad3a510626837e3 | [
"MIT"
] | null | null | null | """
To do
get hanja
get multiple definitions on page
example sentences
"""
from bs4 import BeautifulSoup
import urllib.request
import urllib.parse
import time
import re
import random
defin = []
class NaverDict:
"""
This class looks up korean vocabulary words using the
Naver korean-english dictionary.
... | 26.116883 | 89 | 0.610144 | """
To do
get hanja
get multiple definitions on page
example sentences
"""
from bs4 import BeautifulSoup
import urllib.request
import urllib.parse
import time
import re
import random
defin = []
class NaverDict:
"""
This class looks up korean vocabulary words using the
Naver korean-english dictionary.
... | 171 | 0 | 27 |
05a2e39a60bc35bf0b3e55b2cd50b1737d5d4513 | 17,967 | py | Python | criticality_recognition/phenomena_extraction.py | lu-w/criticality-recognition | 5ad2e12699ad4bf2d7f60ce9e30f26110adce436 | [
"MIT"
] | 4 | 2022-03-13T19:33:43.000Z | 2022-03-15T22:20:36.000Z | criticality_recognition/phenomena_extraction.py | lu-w/criticality-recognition | 5ad2e12699ad4bf2d7f60ce9e30f26110adce436 | [
"MIT"
] | null | null | null | criticality_recognition/phenomena_extraction.py | lu-w/criticality-recognition | 5ad2e12699ad4bf2d7f60ce9e30f26110adce436 | [
"MIT"
] | null | null | null | import logging
import owlready2
import tqdm
import auto.auto
logger = logging.getLogger(__name__)
_CACHED_CP_CLASSES = dict()
class Scene_Criticality_Phenomenon(Criticality_Phenomenon):
"""
Concretization for scene-level criticality phenomena. Note that member traffic_model is a list of scenes.
"""
... | 53.31454 | 120 | 0.611009 | import logging
import owlready2
import tqdm
import auto.auto
logger = logging.getLogger(__name__)
_CACHED_CP_CLASSES = dict()
class Criticality_Phenomenon:
def __init__(self, traffic_model, cp, cp_cls, objects=None):
"""
Constructor for criticality phenomena. Information about criticality phen... | 1,227 | 6,336 | 75 |
fb774c8a7a6083cfa0aad97f1b5c322164dcbec0 | 3,818 | py | Python | bakthread.py | ifuzx/bakscan | 3d5e36a390b65e29fe89ec1578bda13f9ac92406 | [
"Unlicense"
] | null | null | null | bakthread.py | ifuzx/bakscan | 3d5e36a390b65e29fe89ec1578bda13f9ac92406 | [
"Unlicense"
] | null | null | null | bakthread.py | ifuzx/bakscan | 3d5e36a390b65e29fe89ec1578bda13f9ac92406 | [
"Unlicense"
] | null | null | null | import re
import requests
import threading
import queue as Queue
from requests.packages.urllib3.exceptions import InsecureRequestWarning
| 33.491228 | 138 | 0.499214 | import re
import requests
import threading
import queue as Queue
from requests.packages.urllib3.exceptions import InsecureRequestWarning
class myThread(threading.Thread):
def __init__(self, name, q):
threading.Thread.__init__(self)
self.name = name
self.q = q
def run(self):
whi... | 3,685 | 12 | 122 |
e9bfb50a19a589a69f5030410dca17dc1c9ab50c | 3,539 | py | Python | hera_librarian/tests/test_cli.py | BrianJKoopman/librarian | 2d4164b60fe41d1a192f03d8baad12c0d11d0394 | [
"BSD-2-Clause"
] | 5 | 2016-02-17T17:51:05.000Z | 2021-12-09T19:08:17.000Z | hera_librarian/tests/test_cli.py | BrianJKoopman/librarian | 2d4164b60fe41d1a192f03d8baad12c0d11d0394 | [
"BSD-2-Clause"
] | 60 | 2016-01-29T20:40:04.000Z | 2021-05-28T14:13:18.000Z | hera_librarian/tests/test_cli.py | simonsobs/librarian | 188370d84a988f898bb9de4593078c1868602f08 | [
"BSD-2-Clause"
] | 6 | 2017-11-13T10:40:34.000Z | 2020-07-10T00:42:57.000Z | # -*- mode: python; coding: utf-8 -*-
# Copyright 2019 the HERA Collaboration
# Licensed under the 2-clause BSD License
"""Test code in hera_librarian/cli.py
"""
import pytest
import os
import hera_librarian
from hera_librarian import cli
| 26.214815 | 81 | 0.65414 | # -*- mode: python; coding: utf-8 -*-
# Copyright 2019 the HERA Collaboration
# Licensed under the 2-clause BSD License
"""Test code in hera_librarian/cli.py
"""
import pytest
import os
import hera_librarian
from hera_librarian import cli
def test_die(capsys):
# test without specifying replacement args
wi... | 3,177 | 0 | 115 |
15f861d098e92c2a6abe585f495d1e9b5cf29ce8 | 8,031 | py | Python | models/architectures.py | hsqmlzno1/Transferable-E2E-ABSA | 6083af24892c93703ed6695aff277d54d4b426c6 | [
"MIT"
] | 73 | 2019-08-14T09:25:02.000Z | 2022-03-25T07:19:45.000Z | models/architectures.py | hsqmlzno1/Transferable-E2E-ABSA | 6083af24892c93703ed6695aff277d54d4b426c6 | [
"MIT"
] | 3 | 2020-02-25T06:39:52.000Z | 2020-12-26T12:40:23.000Z | models/architectures.py | hsqmlzno1/Transferable-E2E-ABSA | 6083af24892c93703ed6695aff277d54d4b426c6 | [
"MIT"
] | 13 | 2019-09-22T03:45:21.000Z | 2021-11-22T06:52:28.000Z |
import tensorflow as tf
from nn_utils import *
import numpy as np
import nn_utils
| 48.08982 | 163 | 0.528826 |
import tensorflow as tf
from nn_utils import *
import numpy as np
import nn_utils
class SuperNN(object):
def __init__(self,
args,
word2vec,
init=None,
scope=None):
self.args = args
self.word2vec = word2vec
... | 7,801 | 1 | 140 |