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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4f02ae733180f986bfa8ad821e035c475bfc474f | 141 | py | Python | utils/dataset.py | laura-ham/INTEX | 07bcf26ca17092ecf4fc41b85ea9d764a0caa8c9 | [
"MIT"
] | null | null | null | utils/dataset.py | laura-ham/INTEX | 07bcf26ca17092ecf4fc41b85ea9d764a0caa8c9 | [
"MIT"
] | null | null | null | utils/dataset.py | laura-ham/INTEX | 07bcf26ca17092ecf4fc41b85ea9d764a0caa8c9 | [
"MIT"
] | null | null | null | from utils import s3
| 17.625 | 41 | 0.652482 | from utils import s3
class Dataset:
def __init__(self, config):
self.config = config
self.s3agent = s3.S3Agent(config)
| 77 | -7 | 49 |
5963efd1925be94ab61751d8d9cca058c69ecbc8 | 1,453 | py | Python | scripts/vcftools_pi_region.py | godzilla-but-nicer/INFO590-term-project | 4c8270cfb667ef38c4c4bd5bd0c010949280ce75 | [
"MIT"
] | null | null | null | scripts/vcftools_pi_region.py | godzilla-but-nicer/INFO590-term-project | 4c8270cfb667ef38c4c4bd5bd0c010949280ce75 | [
"MIT"
] | null | null | null | scripts/vcftools_pi_region.py | godzilla-but-nicer/INFO590-term-project | 4c8270cfb667ef38c4c4bd5bd0c010949280ce75 | [
"MIT"
] | 1 | 2020-11-02T00:23:08.000Z | 2020-11-02T00:23:08.000Z | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import sys
# load a datafile, handle some command line args
smoothing = int(sys.argv[2]) # window size for smoothing
data_file = sys.argv[1]
name = data_file.split('/')[-1].split('.')[0] # used in output
df = pd.read_csv(data_file, index_col=None, ... | 33.790698 | 120 | 0.734343 | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import sys
# load a datafile, handle some command line args
smoothing = int(sys.argv[2]) # window size for smoothing
data_file = sys.argv[1]
name = data_file.split('/')[-1].split('.')[0] # used in output
df = pd.read_csv(data_file, index_col=None, ... | 0 | 0 | 0 |
ea5be5a1531f6e9ad888a3690ee07d431e52f364 | 606 | py | Python | src/entities/ennemies/truck.py | evrardco/GameJam-lln-2021 | ee2cce0feb423a0b3319c9933c8c8b5748225e39 | [
"MIT"
] | 1 | 2021-03-21T23:18:32.000Z | 2021-03-21T23:18:32.000Z | src/entities/ennemies/truck.py | evrardco/GameJam-lln-2021 | ee2cce0feb423a0b3319c9933c8c8b5748225e39 | [
"MIT"
] | null | null | null | src/entities/ennemies/truck.py | evrardco/GameJam-lln-2021 | ee2cce0feb423a0b3319c9933c8c8b5748225e39 | [
"MIT"
] | null | null | null | from arcade.sprite import Sprite
from src.entities.ennemies.base_enemy import BaseEnemy
from os.path import join
from math import pi
| 30.3 | 95 | 0.529703 | from arcade.sprite import Sprite
from src.entities.ennemies.base_enemy import BaseEnemy
from os.path import join
from math import pi
class Truck(BaseEnemy):
def __init__(self, *args, **kwargs):
super().__init__(
*args, **kwargs,
filename=join("assets",... | 417 | 2 | 48 |
77497299eae4d24d8b5e97a524c3c366fa1194ce | 678 | py | Python | app/__init__.py | toledoneto/sistema_login | 79223decd228c18f52bf8fed2b79361455ad7fa2 | [
"MIT"
] | null | null | null | app/__init__.py | toledoneto/sistema_login | 79223decd228c18f52bf8fed2b79361455ad7fa2 | [
"MIT"
] | null | null | null | app/__init__.py | toledoneto/sistema_login | 79223decd228c18f52bf8fed2b79361455ad7fa2 | [
"MIT"
] | null | null | null | from bottle import Bottle, TEMPLATE_PATH
from bottle.ext import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
#from sqlalchemy.orm import sessionmaker
Base = declarative_base()
engine = create_engine('sqlite:///database.db', echo = True)
#create_session... | 28.25 | 61 | 0.699115 | from bottle import Bottle, TEMPLATE_PATH
from bottle.ext import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
#from sqlalchemy.orm import sessionmaker
Base = declarative_base()
engine = create_engine('sqlite:///database.db', echo = True)
#create_session... | 0 | 0 | 0 |
944b1a4eae46848bf72f467c30cdf93199d1913b | 211 | py | Python | plgx-esp/tests/test_celery/test_celery.py | eclecticiq/eiq-er-ce | ebb12d5c4e0ee144f8166576924b8ce8dc5dfc94 | [
"MIT"
] | null | null | null | plgx-esp/tests/test_celery/test_celery.py | eclecticiq/eiq-er-ce | ebb12d5c4e0ee144f8166576924b8ce8dc5dfc94 | [
"MIT"
] | null | null | null | plgx-esp/tests/test_celery/test_celery.py | eclecticiq/eiq-er-ce | ebb12d5c4e0ee144f8166576924b8ce8dc5dfc94 | [
"MIT"
] | 2 | 2021-11-12T10:25:02.000Z | 2022-03-30T06:33:52.000Z | # # -*- coding: utf-8 -*-
from polylogyx.celery.tasks import example_task
| 23.444444 | 47 | 0.663507 | # # -*- coding: utf-8 -*-
from polylogyx.celery.tasks import example_task
class TestCelery:
def test_celery_simple(self,celery_worker):
res = example_task.delay(1, 2)
assert res.get() == 3
| 91 | -4 | 49 |
5ffa1b866a3a10cef750ebb9fd6bb3816880e981 | 1,102 | py | Python | app/utils/config.py | adipopbv/mooover-backend | b8409ea48a3aa12d21c3b41622c7c071b4964404 | [
"BSD-3-Clause"
] | null | null | null | app/utils/config.py | adipopbv/mooover-backend | b8409ea48a3aa12d21c3b41622c7c071b4964404 | [
"BSD-3-Clause"
] | 1 | 2022-03-31T10:24:14.000Z | 2022-03-31T10:24:14.000Z | app/utils/config.py | adipopbv/mooover-backend | b8409ea48a3aa12d21c3b41622c7c071b4964404 | [
"BSD-3-Clause"
] | null | null | null | import os
from configparser import ConfigParser
from app.domain.errors import NotFoundError
class AppConfig:
"""The configurations of the app at runtime"""
__instance = None
config = None
auth0_config = None
neo4j_config = None
@staticmethod
def _load_config() -> ConfigParser:
""... | 29 | 73 | 0.585299 | import os
from configparser import ConfigParser
from app.domain.errors import NotFoundError
class AppConfig:
"""The configurations of the app at runtime"""
__instance = None
config = None
auth0_config = None
neo4j_config = None
def __new__(cls):
if cls.__instance is None:
... | 391 | 0 | 27 |
1707c9e1271bd1f3982869b3232fb3258eeb474a | 6,242 | py | Python | methods/mahalanobis_ensemble.py | christophbrgr/ood_detection_framework | c3b7e3064ed8ee4aeb112cd2ab946ee41636f79f | [
"MIT"
] | 7 | 2021-07-26T14:28:51.000Z | 2021-11-18T13:20:00.000Z | methods/mahalanobis_ensemble.py | christophbrgr/ood_detection_framework | c3b7e3064ed8ee4aeb112cd2ab946ee41636f79f | [
"MIT"
] | null | null | null | methods/mahalanobis_ensemble.py | christophbrgr/ood_detection_framework | c3b7e3064ed8ee4aeb112cd2ab946ee41636f79f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import numpy as np
from torch.autograd import Variable
import sys
from tqdm import tqdm
from util import helpers
from util.mahalanobis_lib import get_Mahalanobis_score, sample_estimator, sample_estimator_cifar10
from util.metrics import get_metrics
| 32.175258 | 155 | 0.60141 | import torch
import torch.nn as nn
import numpy as np
from torch.autograd import Variable
import sys
from tqdm import tqdm
from util import helpers
from util.mahalanobis_lib import get_Mahalanobis_score, sample_estimator, sample_estimator_cifar10
from util.metrics import get_metrics
def eval(path_in, path_out, model... | 5,887 | 0 | 69 |
d143715ea7853cf0305ac941de7d955ebe402167 | 580 | py | Python | backend/kesaseteli/applications/api/v1/views.py | iivoraitahila/yjdh | 4a9b46e0458529548af818534600eadd4f96a048 | [
"MIT"
] | null | null | null | backend/kesaseteli/applications/api/v1/views.py | iivoraitahila/yjdh | 4a9b46e0458529548af818534600eadd4f96a048 | [
"MIT"
] | null | null | null | backend/kesaseteli/applications/api/v1/views.py | iivoraitahila/yjdh | 4a9b46e0458529548af818534600eadd4f96a048 | [
"MIT"
] | null | null | null | from rest_framework import status
from rest_framework.response import Response
from shared.audit_log.viewsets import AuditLoggingModelViewSet
from applications.api.v1.serializers import ApplicationSerializer
from applications.models import Application
| 34.117647 | 78 | 0.812069 | from rest_framework import status
from rest_framework.response import Response
from shared.audit_log.viewsets import AuditLoggingModelViewSet
from applications.api.v1.serializers import ApplicationSerializer
from applications.models import Application
class ApplicationViewSet(AuditLoggingModelViewSet):
queryset ... | 90 | 213 | 23 |
6f7644da3b3841b77e76a862a2ddd1f5d134c822 | 5,824 | py | Python | custom_components/unifiprotect/number.py | mjdyson/unifiprotect | 42846cc4e3c77dc93e7008d45919bdc0965fd336 | [
"MIT"
] | 546 | 2019-12-28T13:37:24.000Z | 2022-03-29T18:48:54.000Z | custom_components/unifiprotect/number.py | mjdyson/unifiprotect | 42846cc4e3c77dc93e7008d45919bdc0965fd336 | [
"MIT"
] | 358 | 2020-01-01T11:17:24.000Z | 2022-02-03T17:34:00.000Z | custom_components/unifiprotect/number.py | mjdyson/unifiprotect | 42846cc4e3c77dc93e7008d45919bdc0965fd336 | [
"MIT"
] | 51 | 2020-01-12T21:35:06.000Z | 2022-02-01T06:26:27.000Z | """This component provides number entities for UniFi Protect."""
from __future__ import annotations
from dataclasses import dataclass
from datetime import timedelta
import logging
from typing import Callable, Sequence
from homeassistant.components.number import NumberEntity, NumberEntityDescription
from homeassistant... | 30.176166 | 81 | 0.685783 | """This component provides number entities for UniFi Protect."""
from __future__ import annotations
from dataclasses import dataclass
from datetime import timedelta
import logging
from typing import Callable, Sequence
from homeassistant.components.number import NumberEntity, NumberEntityDescription
from homeassistant... | 430 | 0 | 26 |
af8460c21a11a051c1a66f7447d560926f9c0c4f | 2,929 | py | Python | Food_recognition/detection.py | KiaKafaei1/Data_Science_Portfolio | 9bfa29632d664c6bad9589106e47a455041f0d2c | [
"MIT"
] | null | null | null | Food_recognition/detection.py | KiaKafaei1/Data_Science_Portfolio | 9bfa29632d664c6bad9589106e47a455041f0d2c | [
"MIT"
] | null | null | null | Food_recognition/detection.py | KiaKafaei1/Data_Science_Portfolio | 9bfa29632d664c6bad9589106e47a455041f0d2c | [
"MIT"
] | null | null | null | import matplotlib
import numpy as np
import pandas as pd
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
from torchvision import transforms
import cv2
from PIL import Image
import matplotlib.pyplot as plt
import glob
import os
from IPython.display import clear_output
from skimage.i... | 35.719512 | 141 | 0.694776 | import matplotlib
import numpy as np
import pandas as pd
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
from torchvision import transforms
import cv2
from PIL import Image
import matplotlib.pyplot as plt
import glob
import os
from IPython.display import clear_output
from skimage.i... | 2,221 | 14 | 72 |
c31bb9d4e562c5d10b963674924d5c37a9969fc1 | 3,860 | py | Python | cctbx/examples/maximum_subgroups.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | cctbx/examples/maximum_subgroups.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | cctbx/examples/maximum_subgroups.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | """
Construct all subgroup graphs and their relations between them from a single space group.
"""
from __future__ import absolute_import, division, print_function
from cctbx import sgtbx
from cctbx.sgtbx import show_cosets
from cctbx.sgtbx import pointgroup_tools
from cctbx.development import debug_utils
import sys
... | 29.022556 | 159 | 0.639119 | """
Construct all subgroup graphs and their relations between them from a single space group.
"""
from __future__ import absolute_import, division, print_function
from cctbx import sgtbx
from cctbx.sgtbx import show_cosets
from cctbx.sgtbx import pointgroup_tools
from cctbx.development import debug_utils
import sys
... | 3,307 | 0 | 115 |
a335910a80aa2d1dd7265c8975aa9accc104494e | 1,497 | py | Python | src/metircs_controller.py | sbhorvatic/metrics | 5425a294cae3f1077fdf871a176c18c81a60f66c | [
"MIT"
] | null | null | null | src/metircs_controller.py | sbhorvatic/metrics | 5425a294cae3f1077fdf871a176c18c81a60f66c | [
"MIT"
] | null | null | null | src/metircs_controller.py | sbhorvatic/metrics | 5425a294cae3f1077fdf871a176c18c81a60f66c | [
"MIT"
] | null | null | null | import service_factory | 41.583333 | 104 | 0.739479 | import service_factory
class MetricsController:
def __init__(self, svc_factory, config):
self.service_factory = svc_factory
self.config = config
def route(self, http_response, route):
if route == buildRoute("metircs", self.config):
_get_metircs(self.service_factory.build(se... | 1,304 | 3 | 168 |
9563a427a32e6e758e49cc28d99803a1391285d3 | 771 | py | Python | src/turn_definitions_into_lists.py | yizhongw/natural-instructions | f4430d16168a5aafb3d05458c2d21c0ff3da258a | [
"Apache-2.0"
] | null | null | null | src/turn_definitions_into_lists.py | yizhongw/natural-instructions | f4430d16168a5aafb3d05458c2d21c0ff3da258a | [
"Apache-2.0"
] | null | null | null | src/turn_definitions_into_lists.py | yizhongw/natural-instructions | f4430d16168a5aafb3d05458c2d21c0ff3da258a | [
"Apache-2.0"
] | null | null | null | import json
import os
from os import listdir, path
from os.path import isfile, join
tasks_path = 'tasks/'
if __name__ == "__main__":
update_definitions(tasks_path)
| 30.84 | 93 | 0.57847 | import json
import os
from os import listdir, path
from os.path import isfile, join
tasks_path = 'tasks/'
def update_definitions(tasks_path):
files = [join(tasks_path, f) for f in listdir(tasks_path) if isfile(join(tasks_path, f))]
files.sort()
for file in files:
if file.endswith('.json'):
... | 579 | 0 | 22 |
2926d3868b170bf1ba0ad2e82deaf83a8c9c3225 | 281 | py | Python | sklearn_export/estimator/scaler/Scaler.py | zwelz3/sklearn-export | 6692d94f8a592e8f3c9f21d672d8aa814e4d1473 | [
"MIT"
] | 4 | 2019-03-02T14:18:36.000Z | 2021-11-09T08:10:32.000Z | sklearn_export/estimator/scaler/Scaler.py | zwelz3/sklearn-export | 6692d94f8a592e8f3c9f21d672d8aa814e4d1473 | [
"MIT"
] | 3 | 2019-05-03T03:54:36.000Z | 2022-02-14T03:57:24.000Z | sklearn_export/estimator/scaler/Scaler.py | zwelz3/sklearn-export | 6692d94f8a592e8f3c9f21d672d8aa814e4d1473 | [
"MIT"
] | 1 | 2022-02-21T00:46:29.000Z | 2022-02-21T00:46:29.000Z | # -*- coding: utf-8 -*-
from sklearn_export.Template import Template
| 23.416667 | 57 | 0.669039 | # -*- coding: utf-8 -*-
from sklearn_export.Template import Template
class Scaler(Template):
def __init__(self, estimator, **kwargs):
# pylint: disable=unused-argument
super(Scaler, self).__init__(estimator, **kwargs)
self.estimator_type = 'scaler'
| 158 | 2 | 50 |
c5d5dc0bb745afa2ef1f37a5aa65c490fd7217c8 | 1,825 | py | Python | taxamo/models/settlement_daily_stats_schema.py | piotrts/taxamo-python | be3b46a6ec320166999987b65384376be6f57111 | [
"Apache-2.0"
] | null | null | null | taxamo/models/settlement_daily_stats_schema.py | piotrts/taxamo-python | be3b46a6ec320166999987b65384376be6f57111 | [
"Apache-2.0"
] | null | null | null | taxamo/models/settlement_daily_stats_schema.py | piotrts/taxamo-python | be3b46a6ec320166999987b65384376be6f57111 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Copyright 2014-2015 Taxamo, Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by app... | 32.589286 | 80 | 0.609315 | #!/usr/bin/env python
"""
Copyright 2014-2015 Taxamo, Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by app... | 1,007 | 0 | 27 |
991fef1f4303fe203a73f3df4e34225e6fa1dab8 | 464 | py | Python | bs4/webscraping26.py | dirleif/aprendendo-scraping | 0850897c019402c897e9ec58160a13aec2e02665 | [
"MIT"
] | null | null | null | bs4/webscraping26.py | dirleif/aprendendo-scraping | 0850897c019402c897e9ec58160a13aec2e02665 | [
"MIT"
] | null | null | null | bs4/webscraping26.py | dirleif/aprendendo-scraping | 0850897c019402c897e9ec58160a13aec2e02665 | [
"MIT"
] | null | null | null | """
usando Requests
trabalhando com proxies
"""
# importando modulo Requests
import requests
# proxies free
# http://www.ultrapoxies.com/
# https://www.hide-my-ip.com/pt/proxylist.shtml
url = 'https://www.hide-my-ip.com/pt/proxylist.shtml'
#proxies = {'https':'169.57.157.148:8123'}
proxies = {'http':'183.181.164.210:... | 23.2 | 53 | 0.711207 | """
usando Requests
trabalhando com proxies
"""
# importando modulo Requests
import requests
# proxies free
# http://www.ultrapoxies.com/
# https://www.hide-my-ip.com/pt/proxylist.shtml
url = 'https://www.hide-my-ip.com/pt/proxylist.shtml'
#proxies = {'https':'169.57.157.148:8123'}
proxies = {'http':'183.181.164.210:... | 0 | 0 | 0 |
c8c10fe048a9868e987858ea2383b73353afe56e | 20 | py | Python | appstoreconnect/__init__.py | chenchaozhongvip/appstoreconnectapi | 57ba5598f0eb7356181432c755533ec3c757172c | [
"MIT"
] | 1 | 2021-04-28T06:43:41.000Z | 2021-04-28T06:43:41.000Z | appstoreconnect/__init__.py | chenchaozhongvip/appstoreconnectapi | 57ba5598f0eb7356181432c755533ec3c757172c | [
"MIT"
] | null | null | null | appstoreconnect/__init__.py | chenchaozhongvip/appstoreconnectapi | 57ba5598f0eb7356181432c755533ec3c757172c | [
"MIT"
] | 1 | 2020-11-15T00:05:31.000Z | 2020-11-15T00:05:31.000Z | from .api import Api | 20 | 20 | 0.8 | from .api import Api | 0 | 0 | 0 |
15f3ebe7c1100c0232e282b832684959311ce8c6 | 185 | py | Python | ml-core/serializers.py | exactpro/nostradamus | 80df847a012374ad2b702cc9f9c9cb46c1153ee7 | [
"Apache-2.0"
] | 25 | 2019-12-18T05:32:41.000Z | 2022-03-23T12:16:49.000Z | ml-core/serializers.py | Exactpro/nostradamus | 80df847a012374ad2b702cc9f9c9cb46c1153ee7 | [
"Apache-2.0"
] | 12 | 2018-12-24T14:56:50.000Z | 2019-11-29T16:53:49.000Z | ml-core/serializers.py | exactpro/nostradamus | 80df847a012374ad2b702cc9f9c9cb46c1153ee7 | [
"Apache-2.0"
] | 7 | 2019-12-18T05:32:43.000Z | 2021-08-18T05:27:04.000Z | from pydantic import BaseModel, Extra
| 15.416667 | 37 | 0.637838 | from pydantic import BaseModel, Extra
class UserSerializer(BaseModel):
id: int
email: str
name: str
class Config:
orm_mode = True
extra = Extra.allow
| 0 | 123 | 23 |
9db9efe8ddc2a5122785c3852ab6fdde4c29dac3 | 2,226 | py | Python | well_plate_project/data_etl/backup_test/circle_detection_test1.py | MthBr/well-plate-light-driven-predictions | d313c5ff8f589516cb6f65f422626faed5bf6dd2 | [
"MIT"
] | null | null | null | well_plate_project/data_etl/backup_test/circle_detection_test1.py | MthBr/well-plate-light-driven-predictions | d313c5ff8f589516cb6f65f422626faed5bf6dd2 | [
"MIT"
] | null | null | null | well_plate_project/data_etl/backup_test/circle_detection_test1.py | MthBr/well-plate-light-driven-predictions | d313c5ff8f589516cb6f65f422626faed5bf6dd2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 2 12:52:01 2020
Circle Detection inspiration:
https://stackoverflow.com/questions/58109962/how-to-optimize-circle-detection-with-python-opencv
@author: modal
"""
#%% INIT
image_file_name = 'a2_a_cropped.jpg'
from well_plate_project.config import d... | 29.289474 | 96 | 0.734951 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 2 12:52:01 2020
Circle Detection inspiration:
https://stackoverflow.com/questions/58109962/how-to-optimize-circle-detection-with-python-opencv
@author: modal
"""
#%% INIT
image_file_name = 'a2_a_cropped.jpg'
from well_plate_project.config import d... | 0 | 0 | 0 |
3ff82c5368207c58022b160e3ec4b8cc0c639d88 | 797 | py | Python | roomai/games/texasholdem/__init__.py | tonyxxq/RoomAI | 5f28e31e659dd7808127c3c3cc386e6892a93982 | [
"MIT"
] | 1 | 2018-11-29T01:57:18.000Z | 2018-11-29T01:57:18.000Z | roomai/games/texasholdem/__init__.py | tonyxxq/RoomAI | 5f28e31e659dd7808127c3c3cc386e6892a93982 | [
"MIT"
] | null | null | null | roomai/games/texasholdem/__init__.py | tonyxxq/RoomAI | 5f28e31e659dd7808127c3c3cc386e6892a93982 | [
"MIT"
] | null | null | null | #!/bin/python
from roomai.games.texasholdem.TexasHoldemUtil import PokerCard
from roomai.games.texasholdem.TexasHoldemUtil import AllCardsPattern
from roomai.games.texasholdem.TexasHoldemUtil import AllPokerCards
from roomai.games.texasholdem.TexasHoldemUtil import Stage
from roomai.game... | 66.416667 | 84 | 0.844417 | #!/bin/python
from roomai.games.texasholdem.TexasHoldemUtil import PokerCard
from roomai.games.texasholdem.TexasHoldemUtil import AllCardsPattern
from roomai.games.texasholdem.TexasHoldemUtil import AllPokerCards
from roomai.games.texasholdem.TexasHoldemUtil import Stage
from roomai.game... | 0 | 0 | 0 |
75cb2322f9d26771a35d036696a241bea5cf6af4 | 237 | py | Python | FindPrimeNumbers.py | KrishnaR7626/MiscProjects | b9ddfd515db282f8ace8663a2995b96f4462fbe1 | [
"MIT"
] | null | null | null | FindPrimeNumbers.py | KrishnaR7626/MiscProjects | b9ddfd515db282f8ace8663a2995b96f4462fbe1 | [
"MIT"
] | null | null | null | FindPrimeNumbers.py | KrishnaR7626/MiscProjects | b9ddfd515db282f8ace8663a2995b96f4462fbe1 | [
"MIT"
] | null | null | null | # An inefficient way I could think of to find prime numbers.
i = int(input("enter max "))
t=1
while t<i:
m=1
c=0
while m<i:
if t%m==0:
c+=1
m+=1
if c<=2:
print(t)
t+=1
| 16.928571 | 61 | 0.443038 | # An inefficient way I could think of to find prime numbers.
i = int(input("enter max "))
t=1
while t<i:
m=1
c=0
while m<i:
if t%m==0:
c+=1
m+=1
if c<=2:
print(t)
t+=1
| 0 | 0 | 0 |
f24dc5a428b45036fe3c62ee34bb12fabbe4b11e | 9,705 | py | Python | pyzayo/cli/cli_cases.py | jeremyschulman/pyzayo | 37869daf6ef2df8e0898bae7c3ddbb0139840751 | [
"Apache-2.0"
] | 1 | 2021-06-02T10:00:35.000Z | 2021-06-02T10:00:35.000Z | pyzayo/cli/cli_cases.py | jeremyschulman/pyzayo | 37869daf6ef2df8e0898bae7c3ddbb0139840751 | [
"Apache-2.0"
] | null | null | null | pyzayo/cli/cli_cases.py | jeremyschulman/pyzayo | 37869daf6ef2df8e0898bae7c3ddbb0139840751 | [
"Apache-2.0"
] | null | null | null | """
This file contains the CLI code for the maintenance commands.
References
----------
For the Rich package, colors are defined here:
https://rich.readthedocs.io/en/latest/appendix/colors.html#appendix-colors
"""
# -----------------------------------------------------------------------------
# System Imports... | 27.808023 | 89 | 0.544771 | """
This file contains the CLI code for the maintenance commands.
References
----------
For the Rich package, colors are defined here:
https://rich.readthedocs.io/en/latest/appendix/colors.html#appendix-colors
"""
# -----------------------------------------------------------------------------
# System Imports... | 0 | 0 | 0 |
76e40c766cef24dd61b56fdb2bd76ef6d34d6cf3 | 9,128 | py | Python | sphinx/ext/todo.py | hnakamur/sphinx-deb | 34e8fa6013e0567f12eabfd4f71e7a82ce63394e | [
"BSD-2-Clause"
] | 1 | 2019-08-30T18:30:39.000Z | 2019-08-30T18:30:39.000Z | rst/sphinx_ext/todo.py | rblack42/GitBuilder | 1944ef2d6d3c6eaee44ffb663e6c20477046dd9c | [
"BSD-3-Clause"
] | null | null | null | rst/sphinx_ext/todo.py | rblack42/GitBuilder | 1944ef2d6d3c6eaee44ffb663e6c20477046dd9c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
sphinx.ext.todo
~~~~~~~~~~~~~~~
Allow todos to be inserted into your documentation. Inclusion of todos can
be switched of by a configuration variable. The todolist directive collects
all todos of your project and lists them along with a backlink to the
original loc... | 34.059701 | 83 | 0.621385 | # -*- coding: utf-8 -*-
"""
sphinx.ext.todo
~~~~~~~~~~~~~~~
Allow todos to be inserted into your documentation. Inclusion of todos can
be switched of by a configuration variable. The todolist directive collects
all todos of your project and lists them along with a backlink to the
original loc... | 7,067 | 70 | 307 |
3de596368d337615bd299ece0e4e7af6e12d504b | 4,845 | py | Python | anvil/distro.py | timjr/Openstack-Anvil | 5a8199cfef2a7cd83d1886aaa6aa8e0b24cd589d | [
"Apache-2.0"
] | 1 | 2021-06-29T06:09:58.000Z | 2021-06-29T06:09:58.000Z | anvil/distro.py | timjr/Openstack-Anvil | 5a8199cfef2a7cd83d1886aaa6aa8e0b24cd589d | [
"Apache-2.0"
] | null | null | null | anvil/distro.py | timjr/Openstack-Anvil | 5a8199cfef2a7cd83d1886aaa6aa8e0b24cd589d | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.
# Copyright (C) 2012 New Dream Network, LLC (DreamHost) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the Licens... | 34.856115 | 92 | 0.631992 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.
# Copyright (C) 2012 New Dream Network, LLC (DreamHost) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the Licens... | 1,552 | 2,197 | 69 |
8b9c9fb0e4070ebafbe43a715a47f81626d53ea2 | 1,371 | py | Python | bench/viewer.py | Pronto-ai/optorch | 8926fd6de401d7cfb2af4b9147fbe6dceddd4e73 | [
"MIT"
] | 57 | 2019-06-12T13:16:09.000Z | 2022-01-26T10:45:25.000Z | bench/viewer.py | Pronto-ai/optorch | 8926fd6de401d7cfb2af4b9147fbe6dceddd4e73 | [
"MIT"
] | 2 | 2020-05-25T15:52:17.000Z | 2020-07-10T16:29:16.000Z | bench/viewer.py | Pronto-ai/optorch | 8926fd6de401d7cfb2af4b9147fbe6dceddd4e73 | [
"MIT"
] | 4 | 2019-06-16T15:08:05.000Z | 2022-03-31T09:55:01.000Z | import queue
import multiprocessing
import pangolin as pango
import OpenGL.GL as gl
import numpy as np
| 24.927273 | 76 | 0.576222 | import queue
import multiprocessing
import pangolin as pango
import OpenGL.GL as gl
import numpy as np
def start_viewer():
q = multiprocessing.Queue()
p = multiprocessing.Process(target=run_viewer, args=(q,))
p.daemon = True
p.start()
return q
def run_viewer(q):
w, h = 1024, 768
f = 2000
... | 1,221 | 0 | 46 |
6a1a8529b48ee2dd3186bee4c7ac52a024cdd64a | 1,642 | py | Python | indexd/guid/blueprint.py | rpatil524/indexd | 119ff762f8432f29e1e29f86de432927fcc15d68 | [
"Apache-2.0"
] | null | null | null | indexd/guid/blueprint.py | rpatil524/indexd | 119ff762f8432f29e1e29f86de432927fcc15d68 | [
"Apache-2.0"
] | null | null | null | indexd/guid/blueprint.py | rpatil524/indexd | 119ff762f8432f29e1e29f86de432927fcc15d68 | [
"Apache-2.0"
] | null | null | null | import flask
import uuid
blueprint = flask.Blueprint("guid", __name__)
@blueprint.route("/guid/mint", methods=["GET"])
def mint_guid():
"""
Mint a GUID that is valid for this instance of indexd. The intention
of this endpoint is to allow generating valid GUIDs to be indexed
WITHOUT actually creating ... | 26.918033 | 85 | 0.643118 | import flask
import uuid
blueprint = flask.Blueprint("guid", __name__)
@blueprint.route("/guid/mint", methods=["GET"])
def mint_guid():
"""
Mint a GUID that is valid for this instance of indexd. The intention
of this endpoint is to allow generating valid GUIDs to be indexed
WITHOUT actually creating ... | 0 | 0 | 0 |
5d1578c6014c375d9157924675bda6431cc6dd3f | 380 | py | Python | myCalsite/myCalapp/admin.py | tanyabonilla/webproject | 8c194faf68129a090a0309e601f92f4269c870ca | [
"MIT"
] | 2 | 2019-11-04T00:01:56.000Z | 2019-11-04T00:01:58.000Z | myCalsite/myCalapp/admin.py | tanyabonilla/webproject | 8c194faf68129a090a0309e601f92f4269c870ca | [
"MIT"
] | 7 | 2020-02-12T02:44:20.000Z | 2022-02-10T08:35:10.000Z | myCalsite/myCalapp/admin.py | tanyabonilla/webproject | 8c194faf68129a090a0309e601f92f4269c870ca | [
"MIT"
] | null | null | null | from django.contrib import admin
from . import models
# Register your models here.
admin.site.register(models.Event_user)
#class EventueAdmin(admin.ModelAdmin):
# list_display = ('title', 'description', 'get_date',)
admin.site.register(models.Task_user)
admin.site.register(models.User_Profile)
admin.site.regi... | 25.333333 | 59 | 0.784211 | from django.contrib import admin
from . import models
# Register your models here.
admin.site.register(models.Event_user)
#class EventueAdmin(admin.ModelAdmin):
# list_display = ('title', 'description', 'get_date',)
admin.site.register(models.Task_user)
admin.site.register(models.User_Profile)
admin.site.regi... | 0 | 0 | 0 |
ff93e5fa20d58d59950334f9e5af03021a4cde53 | 1,383 | py | Python | django-project/projects/migrations/0003_auto_20180409_0843.py | KBIAnews/projects-hub | 746decaa45099eacde5233548f8f86b9ac3f3ba5 | [
"MIT"
] | null | null | null | django-project/projects/migrations/0003_auto_20180409_0843.py | KBIAnews/projects-hub | 746decaa45099eacde5233548f8f86b9ac3f3ba5 | [
"MIT"
] | null | null | null | django-project/projects/migrations/0003_auto_20180409_0843.py | KBIAnews/projects-hub | 746decaa45099eacde5233548f8f86b9ac3f3ba5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-04-09 13:43
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import projects.models
| 34.575 | 143 | 0.611714 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-04-09 13:43
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import projects.models
class Migration(migrations.Migration):
dependencies = [
('projects', '0002_auto_20180406_1501'),... | 0 | 1,150 | 23 |
490d733beb9f11ded9bc8765a6acf522dd11c131 | 6,208 | py | Python | rpcfit/gridata.py | cmla/rpcf | 27bb3745e620632ae6df485688bd502645216b8b | [
"BSD-2-Clause"
] | 4 | 2021-09-23T23:34:48.000Z | 2022-02-10T22:39:59.000Z | rpcfit/gridata.py | cmla/rpcf | 27bb3745e620632ae6df485688bd502645216b8b | [
"BSD-2-Clause"
] | 1 | 2021-02-26T00:01:29.000Z | 2021-03-01T11:36:48.000Z | rpcfit/gridata.py | cmla/rpcfit | 27bb3745e620632ae6df485688bd502645216b8b | [
"BSD-2-Clause"
] | 3 | 2021-06-08T03:11:15.000Z | 2021-11-12T18:43:55.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 19 15:36:42 2020
@author: rakiki
"""
import numpy as np
import rasterio
# dataset construction
def pointCube(dim1_left, dim1_right, dim2_left, dim2_right
, alt_min, alt_max
, grid_len, num_layers):
'''
Constr... | 43.71831 | 126 | 0.598905 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 19 15:36:42 2020
@author: rakiki
"""
import numpy as np
import rasterio
# dataset construction
def pointCube(dim1_left, dim1_right, dim2_left, dim2_right
, alt_min, alt_max
, grid_len, num_layers):
'''
Constr... | 0 | 0 | 0 |
83e1ebe1564956bfb99de1ae2ec19d24bbf09722 | 183 | py | Python | app/auth/__init__.py | changawa-antony/personal-blog | f3df93d6fca61d9ec5eb369d6420bf4b472aa8b3 | [
"MIT"
] | null | null | null | app/auth/__init__.py | changawa-antony/personal-blog | f3df93d6fca61d9ec5eb369d6420bf4b472aa8b3 | [
"MIT"
] | null | null | null | app/auth/__init__.py | changawa-antony/personal-blog | f3df93d6fca61d9ec5eb369d6420bf4b472aa8b3 | [
"MIT"
] | null | null | null | from flask import Blueprint
# Blueprint Configuration
auth_bp = Blueprint(
'auth_bp', __name__,
template_folder='templates',
static_folder='static'
)
from . import views | 18.3 | 32 | 0.737705 | from flask import Blueprint
# Blueprint Configuration
auth_bp = Blueprint(
'auth_bp', __name__,
template_folder='templates',
static_folder='static'
)
from . import views | 0 | 0 | 0 |
70c28e9f62ec12d576e81e52faba6eba41fa491c | 16,064 | py | Python | Loading/MonsterAi.py | crablab/cs1830_project | af0767a5860e18f5c7d58464704f186552a90ee6 | [
"MIT"
] | null | null | null | Loading/MonsterAi.py | crablab/cs1830_project | af0767a5860e18f5c7d58464704f186552a90ee6 | [
"MIT"
] | null | null | null | Loading/MonsterAi.py | crablab/cs1830_project | af0767a5860e18f5c7d58464704f186552a90ee6 | [
"MIT"
] | null | null | null | import time, random, configparser
from Classes.Base.Vector import Vector
from Loading.RandomGen import getRandomMagicWeapon, getRandomMagicCast, getRandomMonster
from Classes.Super.Weapon import Weapon
from Classes.Middle.Particle import Particle
from Classes.Super.Monster import Monster
from Loading.Objects import wea... | 46.562319 | 178 | 0.573083 | import time, random, configparser
from Classes.Base.Vector import Vector
from Loading.RandomGen import getRandomMagicWeapon, getRandomMagicCast, getRandomMonster
from Classes.Super.Weapon import Weapon
from Classes.Middle.Particle import Particle
from Classes.Super.Monster import Monster
from Loading.Objects import wea... | 15,003 | -5 | 373 |
43420b779a5972d5118cb2683aaedd4b5ef5c244 | 6,930 | py | Python | trac/web/href.py | exocad/exotrac | c8207efff78d4736745e975abaa359e8bb21ffdb | [
"BSD-3-Clause"
] | null | null | null | trac/web/href.py | exocad/exotrac | c8207efff78d4736745e975abaa359e8bb21ffdb | [
"BSD-3-Clause"
] | null | null | null | trac/web/href.py | exocad/exotrac | c8207efff78d4736745e975abaa359e8bb21ffdb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2004 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of th... | 33.640777 | 79 | 0.611688 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2004 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of th... | 1,877 | 0 | 108 |
8471be6e1f242d055d1f1f40b27848b9460a6fca | 601 | py | Python | PC_Benewake_TFmini_LiDAR.py | Chastonay-GP/2020-raspberry-pi-water-level | ec89ca7c75a2cf3435267b3dede51266b0fff41d | [
"FSFAP"
] | null | null | null | PC_Benewake_TFmini_LiDAR.py | Chastonay-GP/2020-raspberry-pi-water-level | ec89ca7c75a2cf3435267b3dede51266b0fff41d | [
"FSFAP"
] | null | null | null | PC_Benewake_TFmini_LiDAR.py | Chastonay-GP/2020-raspberry-pi-water-level | ec89ca7c75a2cf3435267b3dede51266b0fff41d | [
"FSFAP"
] | null | null | null | import serial
import time
ser = serial.Serial('/dev/ttyUSB0',115200,timeout = 1)
ser.write(0x42)
ser.write(0x57)
ser.write(0x02)
ser.write(0x00)
ser.write(0x00)
ser.write(0x00)
ser.write(0x01)
ser.write(0x06)
while(True):
while(ser.in_waiting >= 9):
#print ("a")
if(('Y' == ser.read... | 23.115385 | 61 | 0.529118 | import serial
import time
ser = serial.Serial('/dev/ttyUSB0',115200,timeout = 1)
ser.write(0x42)
ser.write(0x57)
ser.write(0x02)
ser.write(0x00)
ser.write(0x00)
ser.write(0x00)
ser.write(0x01)
ser.write(0x06)
while(True):
while(ser.in_waiting >= 9):
#print ("a")
if(('Y' == ser.read... | 0 | 0 | 0 |
6a15aade8cc353754c14f8437cf9834a8d068d77 | 5,376 | py | Python | corehq/apps/reports/tests/test_sql_reports.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/reports/tests/test_sql_reports.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 94 | 2020-12-11T06:57:31.000Z | 2022-03-15T10:24:06.000Z | corehq/apps/reports/tests/test_sql_reports.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | null | null | null | from datetime import datetime, time
from django import test as unittest
from django.test.client import RequestFactory
from dimagi.utils.dates import DateSpan
from corehq.apps.domain.shortcuts import create_domain
from corehq.apps.users.models import WebUser
from corehq.sql_db.connections import Session
from corehq.u... | 41.038168 | 109 | 0.635231 | from datetime import datetime, time
from django import test as unittest
from django.test.client import RequestFactory
from dimagi.utils.dates import DateSpan
from corehq.apps.domain.shortcuts import create_domain
from corehq.apps.users.models import WebUser
from corehq.sql_db.connections import Session
from corehq.u... | 4,404 | 206 | 235 |
f69f04ff046fb9ac1b27d85f735f3a20981576fc | 1,213 | py | Python | tests/store/test_player_events.py | aequitas/munerator | deb1d2ed6c06d17bf3005d75a03e4f2eb7a9938e | [
"MIT"
] | null | null | null | tests/store/test_player_events.py | aequitas/munerator | deb1d2ed6c06d17bf3005d75a03e4f2eb7a9938e | [
"MIT"
] | null | null | null | tests/store/test_player_events.py | aequitas/munerator | deb1d2ed6c06d17bf3005d75a03e4f2eb7a9938e | [
"MIT"
] | null | null | null | from munerator.store import handle_event, setup_eve_mongoengine
| 22.886792 | 71 | 0.598516 | from munerator.store import handle_event, setup_eve_mongoengine
def test_add_player(db, uuid):
data = {
'id': uuid,
'guid': uuid,
'name': 'test'
}
handle_event('clientuserinfochanged', {'client_info': data}, None)
player = db.players.find_one()
assert player['name'] == dat... | 1,077 | 0 | 69 |
2f93144ea0e7a9ec3d12b51325d8760bd959ad44 | 6,201 | py | Python | course1/week2/quiz2/PredictingHousePrices.py | eroicaleo/MachineLearningUW | c9addb23119e2db41e2a467baafe6bd2ce2acbcb | [
"MIT"
] | null | null | null | course1/week2/quiz2/PredictingHousePrices.py | eroicaleo/MachineLearningUW | c9addb23119e2db41e2a467baafe6bd2ce2acbcb | [
"MIT"
] | null | null | null | course1/week2/quiz2/PredictingHousePrices.py | eroicaleo/MachineLearningUW | c9addb23119e2db41e2a467baafe6bd2ce2acbcb | [
"MIT"
] | null | null | null |
# coding: utf-8
# #Fire up graphlab create
# In[35]:
import graphlab
# #Load some house sales data
#
# Dataset is from house sales in King County, the region where the city of Seattle, WA is located.
# In[36]:
sales = graphlab.SFrame('home_data.gl/')
# In[37]:
sales
# #Exploring the data for housing sales... | 19.938907 | 260 | 0.680213 |
# coding: utf-8
# #Fire up graphlab create
# In[35]:
import graphlab
# #Load some house sales data
#
# Dataset is from house sales in King County, the region where the city of Seattle, WA is located.
# In[36]:
sales = graphlab.SFrame('home_data.gl/')
# In[37]:
sales
# #Exploring the data for housing sales... | 0 | 0 | 0 |
1f86701824cf61a12df75ebaea242b4272d39e29 | 18,076 | py | Python | tests/wallet/test_cache_manager.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 415 | 2016-06-10T00:46:55.000Z | 2021-10-16T00:56:06.000Z | tests/wallet/test_cache_manager.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 25 | 2016-06-11T13:48:59.000Z | 2021-01-05T11:19:30.000Z | tests/wallet/test_cache_manager.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 109 | 2016-06-11T05:17:05.000Z | 2021-12-22T11:02:22.000Z | import inspect
import os.path
import time
from two1.blockchain.twentyone_provider import TwentyOneProvider
from two1.bitcoin.hash import Hash
from two1.wallet.cache_manager import CacheManager
from two1.wallet.wallet_txn import WalletTransaction
this_file_path = os.path.dirname(os.path.abspath(inspect.getfile(inspec... | 46.112245 | 796 | 0.750553 | import inspect
import os.path
import time
from two1.blockchain.twentyone_provider import TwentyOneProvider
from two1.bitcoin.hash import Hash
from two1.wallet.cache_manager import CacheManager
from two1.wallet.wallet_txn import WalletTransaction
this_file_path = os.path.dirname(os.path.abspath(inspect.getfile(inspec... | 17,618 | 0 | 69 |
b5843875e6ebc5bf39ab131cdc98ecca22a19925 | 2,696 | py | Python | gmn/src/d1_gmn/app/middleware/session_cert.py | DataONEorg/d1_python | dfab267c3adea913ab0e0073ed9dc1ee50b5b8eb | [
"Apache-2.0"
] | 15 | 2016-10-28T13:56:52.000Z | 2022-01-31T19:07:49.000Z | gmn/src/d1_gmn/app/middleware/session_cert.py | DataONEorg/d1_python | dfab267c3adea913ab0e0073ed9dc1ee50b5b8eb | [
"Apache-2.0"
] | 56 | 2017-03-16T03:52:32.000Z | 2022-03-12T01:05:28.000Z | gmn/src/d1_gmn/app/middleware/session_cert.py | DataONEorg/d1_python | dfab267c3adea913ab0e0073ed9dc1ee50b5b8eb | [
"Apache-2.0"
] | 11 | 2016-05-31T16:22:02.000Z | 2020-10-05T14:37:10.000Z | # This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ma... | 37.444444 | 87 | 0.738501 | # This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ma... | 104 | 0 | 23 |
85357402a8301e1bda63a84a7fda7c6d2ae1162a | 8,452 | py | Python | swagger_client/models/get_fw_systems_200_ok.py | rseichter/bootini-star | a80258f01a05e4df38748b8cb47dfadabd42c20d | [
"MIT"
] | null | null | null | swagger_client/models/get_fw_systems_200_ok.py | rseichter/bootini-star | a80258f01a05e4df38748b8cb47dfadabd42c20d | [
"MIT"
] | null | null | null | swagger_client/models/get_fw_systems_200_ok.py | rseichter/bootini-star | a80258f01a05e4df38748b8cb47dfadabd42c20d | [
"MIT"
] | null | null | null | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online # noqa: E501
OpenAPI spec version: 0.8.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class GetFwSystems200Ok(object):
"""NOTE: This class is aut... | 32.383142 | 176 | 0.635353 | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online # noqa: E501
OpenAPI spec version: 0.8.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class GetFwSystems200Ok(object):
"""NOTE: This class is aut... | 0 | 0 | 0 |
dfea545de52865e245de45e9353a7cf90987e97d | 288 | py | Python | PF/Inicio.py | HectorR28/uip-iiiq-pc3 | 7fd3f0f8191a7442f4330ff54d72eb6e157a740e | [
"MIT"
] | null | null | null | PF/Inicio.py | HectorR28/uip-iiiq-pc3 | 7fd3f0f8191a7442f4330ff54d72eb6e157a740e | [
"MIT"
] | null | null | null | PF/Inicio.py | HectorR28/uip-iiiq-pc3 | 7fd3f0f8191a7442f4330ff54d72eb6e157a740e | [
"MIT"
] | null | null | null | import FormaPago
import MenuOpciones
if __name__ == '__main__':
FormaPago.menuPagos()
opc = input("Dijite el numero de la opción que desea acceder: ")
if opc == "1":
MenuOpciones.OpcionCrear()
elif opc == "2":
MenuOpciones.OpcionCambiar()
| 24 | 69 | 0.618056 | import FormaPago
import MenuOpciones
if __name__ == '__main__':
FormaPago.menuPagos()
opc = input("Dijite el numero de la opción que desea acceder: ")
if opc == "1":
MenuOpciones.OpcionCrear()
elif opc == "2":
MenuOpciones.OpcionCambiar()
| 0 | 0 | 0 |
b7d0df4e655dd699076dac3a6a0a158b736eb180 | 2,196 | py | Python | I-Random-Forest/Algorithm_test_harness.py | raja21068/Research-on-data-mining-of-permission-induced-risk-for-android-IoT-devices | 522d3a0d0fde7dd2f51565e57e1bf30d8c7d9712 | [
"Apache-2.0"
] | 1 | 2021-04-02T05:48:46.000Z | 2021-04-02T05:48:46.000Z | I-Random-Forest/Algorithm_test_harness.py | raja21068/Research-on-data-mining-of-permission-induced-risk-for-android-IoT-devices | 522d3a0d0fde7dd2f51565e57e1bf30d8c7d9712 | [
"Apache-2.0"
] | null | null | null | I-Random-Forest/Algorithm_test_harness.py | raja21068/Research-on-data-mining-of-permission-induced-risk-for-android-IoT-devices | 522d3a0d0fde7dd2f51565e57e1bf30d8c7d9712 | [
"Apache-2.0"
] | null | null | null | from random import randrange
# Split a dataset into a train and test set
# Split a dataset into $k$ folds
# Evaluate an algorithm using a train/test split several times
# Evaluate an algorithm using a cross-validation split
| 37.220339 | 100 | 0.640255 | from random import randrange
# Split a dataset into a train and test set
def train_test_split(dataset, split):
train = list()
train_size = split * len(dataset)
dataset_copy = list(dataset)
while len(train) < train_size:
index = randrange(len(dataset_copy))
train.append(dataset_... | 1,869 | 0 | 91 |
f716476a8f9925dfffc1e7bbbe2678c6a6fa7d50 | 11,978 | py | Python | tools/accuracy_checker/accuracy_checker/metrics/coco_orig_metrics.py | apankratovantonp/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | 5 | 2020-03-09T07:39:04.000Z | 2021-08-16T07:17:28.000Z | tools/accuracy_checker/accuracy_checker/metrics/coco_orig_metrics.py | ananda89/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | 6 | 2020-09-26T01:24:39.000Z | 2022-02-10T02:16:03.000Z | tools/accuracy_checker/accuracy_checker/metrics/coco_orig_metrics.py | ananda89/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | 3 | 2020-07-06T08:45:26.000Z | 2020-11-12T10:14:45.000Z | """
Copyright (c) 2019 Intel 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 applicable law or agreed to in writing,... | 38.514469 | 120 | 0.671648 | """
Copyright (c) 2019 Intel 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 applicable law or agreed to in writing,... | 9,098 | 1,405 | 207 |
13abde44b52e1b7752f7e4c67c276e8bdf6b48d1 | 1,530 | py | Python | wagtail_turbo/wagtail_hooks.py | kaedroho/wagtail-turbo | 5e0507a0bc452a37ab759b107e0d9a14bdfc194b | [
"BSD-3-Clause"
] | 4 | 2022-02-06T04:01:13.000Z | 2022-02-25T23:12:02.000Z | wagtail_turbo/wagtail_hooks.py | kaedroho/wagtail-turbo | 5e0507a0bc452a37ab759b107e0d9a14bdfc194b | [
"BSD-3-Clause"
] | null | null | null | wagtail_turbo/wagtail_hooks.py | kaedroho/wagtail-turbo | 5e0507a0bc452a37ab759b107e0d9a14bdfc194b | [
"BSD-3-Clause"
] | null | null | null | from django.urls import path, include, reverse
from django.views.decorators.clickjacking import xframe_options_sameorigin
from django.views.generic.base import TemplateView
from django.views.i18n import JavaScriptCatalog
from wagtail.core import hooks
from .decorators import turbo_disable
from .views import turbo_ini... | 34 | 142 | 0.675817 | from django.urls import path, include, reverse
from django.views.decorators.clickjacking import xframe_options_sameorigin
from django.views.generic.base import TemplateView
from django.views.i18n import JavaScriptCatalog
from wagtail.core import hooks
from .decorators import turbo_disable
from .views import turbo_ini... | 1,068 | 0 | 44 |
608cb71dada00e358af1fedbf6b2381088d791af | 8,201 | py | Python | tests/unit/test_dynamodb.py | radsec/ottr | 411559a2bac307594c92d4d14667143cd04625ff | [
"Apache-2.0"
] | 207 | 2021-10-29T20:35:04.000Z | 2022-03-02T08:04:06.000Z | tests/unit/test_dynamodb.py | wngn123/ottr | 411559a2bac307594c92d4d14667143cd04625ff | [
"Apache-2.0"
] | 3 | 2021-11-05T05:50:57.000Z | 2022-01-03T06:07:18.000Z | tests/unit/test_dynamodb.py | wngn123/ottr | 411559a2bac307594c92d4d14667143cd04625ff | [
"Apache-2.0"
] | 19 | 2021-11-03T06:34:46.000Z | 2022-03-21T14:06:54.000Z | import pytest
import boto3
from moto.dynamodb2 import mock_dynamodb2
from otter.router.src.shared.client import DynamoDBClient, get_valid_devices
from otter.router.src.shared.device import Device
DYNAMODB_TABLE = "ottr-example"
@pytest.fixture
@mock_dynamodb2
@mock_dynamodb2
@mock_dynamodb2
@mock_dynamodb2
... | 33.068548 | 79 | 0.54786 | import pytest
import boto3
from moto.dynamodb2 import mock_dynamodb2
from otter.router.src.shared.client import DynamoDBClient, get_valid_devices
from otter.router.src.shared.device import Device
DYNAMODB_TABLE = "ottr-example"
@pytest.fixture
def _init_database():
@mock_dynamodb2
def dynamodb_client():
... | 7,651 | 0 | 176 |
0774aee7584655c587314499e7abb1c664124d64 | 4,152 | py | Python | mysite/core/views.py | root121976/ticket | c16932daa497bd22adf0f0625d8e724201386e6e | [
"MIT"
] | null | null | null | mysite/core/views.py | root121976/ticket | c16932daa497bd22adf0f0625d8e724201386e6e | [
"MIT"
] | 3 | 2020-02-12T00:42:25.000Z | 2021-06-10T21:37:06.000Z | mysite/core/views.py | root121976/ticket | c16932daa497bd22adf0f0625d8e724201386e6e | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect, render_to_response
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import Templa... | 24.862275 | 84 | 0.651734 | from django.shortcuts import render, redirect, render_to_response
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import Templa... | 2,652 | 316 | 320 |
ef0073c050eac7483b356f60945cf3a3fd18fb7f | 194 | py | Python | bldgnorm/__init__.py | ecosang/multifamily_normalization_toy_example | 4af3b4ec74eb757e7c4b3ce078e72049ccc257f2 | [
"MIT"
] | null | null | null | bldgnorm/__init__.py | ecosang/multifamily_normalization_toy_example | 4af3b4ec74eb757e7c4b3ce078e72049ccc257f2 | [
"MIT"
] | null | null | null | bldgnorm/__init__.py | ecosang/multifamily_normalization_toy_example | 4af3b4ec74eb757e7c4b3ce078e72049ccc257f2 | [
"MIT"
] | null | null | null | __all__=["model_utility","model","utility","visualization"]
from bldgnorm.model_utility import *
from bldgnorm.model import *
from bldgnorm.utility import *
from bldgnorm.visualization import * | 32.333333 | 59 | 0.798969 | __all__=["model_utility","model","utility","visualization"]
from bldgnorm.model_utility import *
from bldgnorm.model import *
from bldgnorm.utility import *
from bldgnorm.visualization import * | 0 | 0 | 0 |
454122822f4031c463d21f987722003e44788e9a | 13,595 | py | Python | main.py | hasanpasha/stream-cli | f93c475c253e75943f07cb0f5ca018fae27d3ca7 | [
"Apache-2.0"
] | null | null | null | main.py | hasanpasha/stream-cli | f93c475c253e75943f07cb0f5ca018fae27d3ca7 | [
"Apache-2.0"
] | 16 | 2021-12-08T19:42:21.000Z | 2022-03-16T17:41:47.000Z | main.py | hasanpasha/stream-cli | f93c475c253e75943f07cb0f5ca018fae27d3ca7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.server_utils import ServerUtils
from utils.video_player import MPVVideoPlayer
from api.constants import Kinds
from PyInquirer import prompt
from typing import List
import os
class Main:
""" main app that run servers and get user commands """
@prope... | 32.369048 | 124 | 0.522619 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.server_utils import ServerUtils
from utils.video_player import MPVVideoPlayer
from api.constants import Kinds
from PyInquirer import prompt
from typing import List
import os
class Defaults:
SERVER = 'cinemana'
DATA_FOLDER = os.path.join(
os.path... | 9,245 | 412 | 589 |
0cadcd2fa3cacbc06fab2f302116618a959eb47e | 43 | py | Python | utest/resources/robotdata/resources/res_var_file.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-08-20T14:46:02.000Z | 2017-08-20T14:46:02.000Z | utest/resources/robotdata/resources/res_var_file.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | utest/resources/robotdata/resources/res_var_file.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | var_from_resource_var_file = 'Some Value'
| 21.5 | 42 | 0.813953 | var_from_resource_var_file = 'Some Value'
| 0 | 0 | 0 |
83718cad3cccf90d4bb8b22c60ce46bec0b7be5f | 129 | py | Python | teste.py | nijuni2022/Projeto-Crud | 4f7d02381a360e5d80d9f1c31ef5a65f69729d62 | [
"MIT"
] | null | null | null | teste.py | nijuni2022/Projeto-Crud | 4f7d02381a360e5d80d9f1c31ef5a65f69729d62 | [
"MIT"
] | null | null | null | teste.py | nijuni2022/Projeto-Crud | 4f7d02381a360e5d80d9f1c31ef5a65f69729d62 | [
"MIT"
] | null | null | null | #from bson.objectid import ObjectId
from pymongo import MongoClient
client= MongoClient("localhost", 27017)
db = client.Dados | 16.125 | 39 | 0.790698 | #from bson.objectid import ObjectId
from pymongo import MongoClient
client= MongoClient("localhost", 27017)
db = client.Dados | 0 | 0 | 0 |
d52a6d9651816badaa28ac2f06b6daa5b87b8d9f | 5,290 | py | Python | vimeo/exceptions.py | mypresences/vimeo.py | 352a1b2e9a0757560d62bb1ac34953b95e4ab3a5 | [
"Apache-2.0"
] | 1 | 2020-12-15T20:45:20.000Z | 2020-12-15T20:45:20.000Z | vimeo/exceptions.py | mypresences/vimeo.py | 352a1b2e9a0757560d62bb1ac34953b95e4ab3a5 | [
"Apache-2.0"
] | null | null | null | vimeo/exceptions.py | mypresences/vimeo.py | 352a1b2e9a0757560d62bb1ac34953b95e4ab3a5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
class BaseVimeoException(Exception):
"""Base class for Vimeo Exceptions."""
def __init__(self, response, message):
"""Base Exception class init."""
# API error message
self.message = self.__get_message(response)
# HTTP status code
if type(respons... | 34.575163 | 93 | 0.677694 | #!/usr/bin/env python
class BaseVimeoException(Exception):
"""Base class for Vimeo Exceptions."""
def __get_message(self, response):
if type(response) is Exception:
return response.message
json = None
try:
json = response.json()
except Exception:
... | 1,100 | 0 | 54 |
ebcd35c8dfad509890ef96bd37be1ab49e9e3128 | 77 | py | Python | main.py | akshayvaidya/python-calculator | d07272b8ba8f15ebec0eb516673bde39138d5987 | [
"MIT"
] | null | null | null | main.py | akshayvaidya/python-calculator | d07272b8ba8f15ebec0eb516673bde39138d5987 | [
"MIT"
] | null | null | null | main.py | akshayvaidya/python-calculator | d07272b8ba8f15ebec0eb516673bde39138d5987 | [
"MIT"
] | null | null | null | from calculator import calculator
if __name__=='__main__':
calculator()
| 15.4 | 33 | 0.753247 | from calculator import calculator
if __name__=='__main__':
calculator()
| 0 | 0 | 0 |
89a146782b6ab2661257124e9041ce278d8d11af | 772 | py | Python | experiment_files/punch-cpe_cuestim.py | mwaskom/Waskom_CerebCortex_2017 | 1f582917258afbe234f1e72d4eabb8dc8c719f41 | [
"Unlicense"
] | 12 | 2017-09-15T15:32:15.000Z | 2021-06-13T04:29:04.000Z | experiment_files/punch-cpe_cuestim.py | WagnerLabPapers/Waskom_CerebCortex_InPress | e5a7de82f47362b909478d842673bd364b8d918e | [
"Unlicense"
] | null | null | null | experiment_files/punch-cpe_cuestim.py | WagnerLabPapers/Waskom_CerebCortex_InPress | e5a7de82f47362b909478d842673bd364b8d918e | [
"Unlicense"
] | 5 | 2017-09-20T00:20:15.000Z | 2022-03-21T11:28:46.000Z | """
Parametric design with CPE modeled separately for cue and stimulus periods.
"""
design_name = "cpe_cuestim"
condition_names = ["cue", "stim",
"cpe_cue", "cpe_stim",
"error", "response_time"]
temporal_deriv = True
confound_pca = True
contrasts = [
("cue_neg", ["cu... | 30.88 | 75 | 0.472798 | """
Parametric design with CPE modeled separately for cue and stimulus periods.
"""
design_name = "cpe_cuestim"
condition_names = ["cue", "stim",
"cpe_cue", "cpe_stim",
"error", "response_time"]
temporal_deriv = True
confound_pca = True
contrasts = [
("cue_neg", ["cu... | 0 | 0 | 0 |
44a6bf400cccb033ac68d44f5d1b8e4fde08245c | 972 | py | Python | users/models.py | olubiyiontheweb/dockerized_admin_dashboard | 50e224550f66adabdfe1bc3867fb68d419d9c99b | [
"MIT"
] | null | null | null | users/models.py | olubiyiontheweb/dockerized_admin_dashboard | 50e224550f66adabdfe1bc3867fb68d419d9c99b | [
"MIT"
] | null | null | null | users/models.py | olubiyiontheweb/dockerized_admin_dashboard | 50e224550f66adabdfe1bc3867fb68d419d9c99b | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractUser, AbstractBaseUser
# Create your models here.
| 32.4 | 72 | 0.75823 | from django.db import models
from django.contrib.auth.models import AbstractUser, AbstractBaseUser
# Create your models here.
class Permission(models.Model):
name = models.CharField(max_length=200)
class Role(models.Model):
name = models.CharField(max_length=200)
permissions = models.ManyToManyField(Pe... | 0 | 773 | 69 |
b0d2c589d7c570142c12c27762103472956c016b | 196 | py | Python | cleanup_later/management/commands/cleanup_later.py | mtskelton/django-cleanup-later | 79b99a413223a15b614fa585d2a557894ff8e952 | [
"MIT"
] | 1 | 2019-08-02T11:42:05.000Z | 2019-08-02T11:42:05.000Z | cleanup_later/management/commands/cleanup_later.py | mtskelton/django-cleanup-later | 79b99a413223a15b614fa585d2a557894ff8e952 | [
"MIT"
] | null | null | null | cleanup_later/management/commands/cleanup_later.py | mtskelton/django-cleanup-later | 79b99a413223a15b614fa585d2a557894ff8e952 | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand
from cleanup_later.models import CleanupFile
| 24.5 | 51 | 0.760204 | from django.core.management.base import BaseCommand
from cleanup_later.models import CleanupFile
class Command(BaseCommand):
def handle(self, *args, **kwargs):
CleanupFile.cleanup()
| 43 | 6 | 49 |
69c82a946030df0018ad8fb9dd6e2805913e6643 | 4,506 | py | Python | covidtracker/covid.py | shubraj/covidTracker | f1a6ef3911651733c08d8c0212744e97acbd6c00 | [
"MIT"
] | null | null | null | covidtracker/covid.py | shubraj/covidTracker | f1a6ef3911651733c08d8c0212744e97acbd6c00 | [
"MIT"
] | null | null | null | covidtracker/covid.py | shubraj/covidTracker | f1a6ef3911651733c08d8c0212744e97acbd6c00 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
import requests,argparse,sys,colorama,pyfiglet
from colorama import Fore,Style
if __name__ == "__main__":
Covid().stats | 51.204545 | 122 | 0.576787 | #! /usr/bin/python3
import requests,argparse,sys,colorama,pyfiglet
from colorama import Fore,Style
class Covid:
colorama.init(autoreset=True)
parser = argparse.ArgumentParser(description="View By Country")
parser.add_argument("country",nargs="?",metavar="",type=str,help="radius")
parser.add_argument("-... | 3,153 | 1,187 | 23 |
76e8b7b6c75bc8b4098b65e168d8de336da3c675 | 19 | py | Python | olamundo.py | adrianomdantas/Exercicios-Python | ef5025a186615258aec0cf35ed839fe49577d983 | [
"MIT"
] | null | null | null | olamundo.py | adrianomdantas/Exercicios-Python | ef5025a186615258aec0cf35ed839fe49577d983 | [
"MIT"
] | null | null | null | olamundo.py | adrianomdantas/Exercicios-Python | ef5025a186615258aec0cf35ed839fe49577d983 | [
"MIT"
] | null | null | null | print('olá mundo')
| 9.5 | 18 | 0.684211 | print('olá mundo')
| 0 | 0 | 0 |
752acca83420a261615db438667ac9dfb606fb95 | 2,057 | py | Python | gitd/core/tests/test_github_handler.py | vitorfs/gitd | 8ab1091b986409127ed3f77676b92d64fbb2a52e | [
"MIT"
] | 4 | 2020-11-01T22:57:50.000Z | 2020-11-27T16:25:05.000Z | gitd/core/tests/test_github_handler.py | vitorfs/gitd | 8ab1091b986409127ed3f77676b92d64fbb2a52e | [
"MIT"
] | null | null | null | gitd/core/tests/test_github_handler.py | vitorfs/gitd | 8ab1091b986409127ed3f77676b92d64fbb2a52e | [
"MIT"
] | 1 | 2021-02-16T20:58:15.000Z | 2021-02-16T20:58:15.000Z | import uuid
from django.test import TestCase, override_settings
from gitd.core.constants import GitHubEvents
from gitd.core.exceptions import GitHubException
from gitd.core.handlers import github_handler
from gitd.core.models import Deployment
| 43.765957 | 117 | 0.703452 | import uuid
from django.test import TestCase, override_settings
from gitd.core.constants import GitHubEvents
from gitd.core.exceptions import GitHubException
from gitd.core.handlers import github_handler
from gitd.core.models import Deployment
class TestGitHubHandler(TestCase):
def test_ping(self):
expe... | 1,339 | 448 | 23 |
7062857693723d59531fd8a709551db00b6e328b | 92 | py | Python | web_MNIST/apps.py | lorenzophys/django-web-MNIST | 5219fa9c1858cabd910dce5fdcce7bf8988ff8a2 | [
"MIT"
] | null | null | null | web_MNIST/apps.py | lorenzophys/django-web-MNIST | 5219fa9c1858cabd910dce5fdcce7bf8988ff8a2 | [
"MIT"
] | null | null | null | web_MNIST/apps.py | lorenzophys/django-web-MNIST | 5219fa9c1858cabd910dce5fdcce7bf8988ff8a2 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 15.333333 | 33 | 0.76087 | from django.apps import AppConfig
class WebMnistConfig(AppConfig):
name = 'web_MNIST'
| 0 | 34 | 23 |
084ec0011d47d9536c75eb288f729b41dd67fc53 | 1,038 | py | Python | cookieClicker.py | fredericoqueiroz/automated-cookie-clicker | 16e65b51b234cca6a31617d9d29682eea2dccae7 | [
"MIT"
] | null | null | null | cookieClicker.py | fredericoqueiroz/automated-cookie-clicker | 16e65b51b234cca6a31617d9d29682eea2dccae7 | [
"MIT"
] | null | null | null | cookieClicker.py | fredericoqueiroz/automated-cookie-clicker | 16e65b51b234cca6a31617d9d29682eea2dccae7 | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
PATH = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(PATH)
driver.get("https://orteil.dashnet.org/cookieclicker/")
driver.implicitly_wait(5)
cookie = driver.find_element_by_id("bigCookie")
cookie_cou... | 33.483871 | 139 | 0.705202 | from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
PATH = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(PATH)
driver.get("https://orteil.dashnet.org/cookieclicker/")
driver.implicitly_wait(5)
cookie = driver.find_element_by_id("bigCookie")
cookie_cou... | 0 | 0 | 0 |
ae2d83d799c5f8fa35b6b4f1abcb0b05bbb6cad6 | 3,415 | py | Python | app/__main__.py | MihanixA/runfaster | fb8a80d7b9ca9ea278788cb4d4cd863254ce8b17 | [
"MIT"
] | 5 | 2020-02-10T15:54:24.000Z | 2020-02-12T10:04:38.000Z | app/__main__.py | MihanixA/runfaster | fb8a80d7b9ca9ea278788cb4d4cd863254ce8b17 | [
"MIT"
] | null | null | null | app/__main__.py | MihanixA/runfaster | fb8a80d7b9ca9ea278788cb4d4cd863254ce8b17 | [
"MIT"
] | null | null | null | import os
import re
import logging
from binascii import crc_hqx
from datetime import datetime
from flask import Flask, request, render_template, redirect
from flask_wtf import FlaskForm
from wtforms import StringField
from wtforms.validators import DataRequired
from flask_bootstrap import Bootstrap
from gevent.pywsgi i... | 28.940678 | 108 | 0.660908 | import os
import re
import logging
from binascii import crc_hqx
from datetime import datetime
from flask import Flask, request, render_template, redirect
from flask_wtf import FlaskForm
from wtforms import StringField
from wtforms.validators import DataRequired
from flask_bootstrap import Bootstrap
from gevent.pywsgi i... | 1,915 | 68 | 159 |
1a6c59844b6771714b26864a5626a9014e3bbc54 | 17,973 | py | Python | main.py | dnanhkhoa/bert-span-parser | 5467a2dc59062b5765bfe5275ea6d7586dcacb2a | [
"MIT"
] | null | null | null | main.py | dnanhkhoa/bert-span-parser | 5467a2dc59062b5765bfe5275ea6d7586dcacb2a | [
"MIT"
] | 1 | 2020-06-03T19:26:22.000Z | 2020-06-04T06:57:16.000Z | main.py | dnanhkhoa/bert-span-parser | 5467a2dc59062b5765bfe5275ea6d7586dcacb2a | [
"MIT"
] | 1 | 2020-12-26T12:07:44.000Z | 2020-12-26T12:07:44.000Z | # -*- coding: utf-8 -*-
import json
import os
import random
import click
import neptune
import numpy as np
import regex
import torch
from loguru import logger
from neptune.exceptions import NoExperimentContext
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset
from tqdm import tqd... | 33.038603 | 93 | 0.589829 | # -*- coding: utf-8 -*-
import json
import os
import random
import click
import neptune
import numpy as np
import regex
import torch
from loguru import logger
from neptune.exceptions import NoExperimentContext
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset
from tqdm import tqd... | 14,796 | 0 | 91 |
86db363519e8523306b63910a6cef58d83620a83 | 5,033 | py | Python | mpro/src/crawler.py | dadosjusbr/coletores | 4c03e4fa3b74f8cdd76ed9e039386d6d9dc7cc32 | [
"MIT"
] | 18 | 2019-10-30T01:18:40.000Z | 2022-03-15T11:52:45.000Z | mpro/src/crawler.py | dadosjusbr/coletores | 4c03e4fa3b74f8cdd76ed9e039386d6d9dc7cc32 | [
"MIT"
] | 174 | 2019-11-01T18:57:16.000Z | 2021-09-18T02:35:27.000Z | mpro/src/crawler.py | dadosjusbr/coletores | 4c03e4fa3b74f8cdd76ed9e039386d6d9dc7cc32 | [
"MIT"
] | 9 | 2020-01-16T16:33:46.000Z | 2022-01-13T07:39:00.000Z | import pathlib
import os
import sys
import time
import shutil
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
BASE_URL = 'https://servicos-portal.mpro.mp.br/web/mp-transparente/contracheque'
BASE_URL_MEMBROS_ATIVOS = 'https://servicos-portal.mp... | 39.629921 | 189 | 0.690244 | import pathlib
import os
import sys
import time
import shutil
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
BASE_URL = 'https://servicos-portal.mpro.mp.br/web/mp-transparente/contracheque'
BASE_URL_MEMBROS_ATIVOS = 'https://servicos-portal.mp... | 4,186 | 0 | 93 |
13b108f53e6ed06f423270b6e26e1becc76b81e8 | 185,198 | py | Python | riscv_isac/fp_dataset.py | liweiwei90/riscv-isac | 91ca482dcf809f49defa4d9a9e14e5e3a891a1ea | [
"BSD-3-Clause"
] | null | null | null | riscv_isac/fp_dataset.py | liweiwei90/riscv-isac | 91ca482dcf809f49defa4d9a9e14e5e3a891a1ea | [
"BSD-3-Clause"
] | null | null | null | riscv_isac/fp_dataset.py | liweiwei90/riscv-isac | 91ca482dcf809f49defa4d9a9e14e5e3a891a1ea | [
"BSD-3-Clause"
] | null | null | null | from riscv_isac.log import logger
import itertools
import struct
import random
import sys
import math
from decimal import *
fzero = ['0x00000000', '0x80000000']
fminsubnorm = ['0x00000001', '0x80000001']
fsubnorm = ['0x00000002', '0x80000002', '0x007FFFFE', '0x807FFFFE', '0x00555555', '0x80555555']
fmaxsubnor... | 40.462749 | 463 | 0.635045 | from riscv_isac.log import logger
import itertools
import struct
import random
import sys
import math
from decimal import *
fzero = ['0x00000000', '0x80000000']
fminsubnorm = ['0x00000001', '0x80000001']
fsubnorm = ['0x00000002', '0x80000002', '0x007FFFFE', '0x807FFFFE', '0x00555555', '0x80555555']
fmaxsubnor... | 5,751 | 0 | 139 |
c0b27db7a8e229092100d40b2d289c9c75ecbf16 | 2,545 | py | Python | dialogue-engine/test/programytest/storage/stores/nosql/mongo/dao/test_lookup.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 104 | 2020-03-30T09:40:00.000Z | 2022-03-06T22:34:25.000Z | dialogue-engine/test/programytest/storage/stores/nosql/mongo/dao/test_lookup.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 25 | 2020-06-12T01:36:35.000Z | 2022-02-19T07:30:44.000Z | dialogue-engine/test/programytest/storage/stores/nosql/mongo/dao/test_lookup.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 10 | 2020-04-02T23:43:56.000Z | 2021-05-14T13:47:01.000Z | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
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, merge, publish, distri... | 45.446429 | 126 | 0.708055 | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
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, merge, publish, distri... | 1,270 | 16 | 104 |
63f183b40929af676339e7b26d3fac102920b43b | 1,650 | py | Python | omnipresence/plugins/vndb/test_vndb.py | kxz/omnipresence | ffb3dbc30d36331a68e8dea3a85db6a4d2928cd7 | [
"BSD-3-Clause"
] | null | null | null | omnipresence/plugins/vndb/test_vndb.py | kxz/omnipresence | ffb3dbc30d36331a68e8dea3a85db6a4d2928cd7 | [
"BSD-3-Clause"
] | 10 | 2016-04-05T04:36:15.000Z | 2018-03-25T00:15:47.000Z | omnipresence/plugins/vndb/test_vndb.py | kxz/omnipresence | ffb3dbc30d36331a68e8dea3a85db6a4d2928cd7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8
"""Unit tests for the vndb event plugin."""
# pylint: disable=missing-docstring,too-few-public-methods
from twisted.internet.defer import inlineCallbacks
from twisted.trial.unittest import TestCase
from ...message import collapse
from ...test.helpers import CommandTestMixin
from . import Default... | 34.375 | 68 | 0.669091 | # -*- coding: utf-8
"""Unit tests for the vndb event plugin."""
# pylint: disable=missing-docstring,too-few-public-methods
from twisted.internet.defer import inlineCallbacks
from twisted.trial.unittest import TestCase
from ...message import collapse
from ...test.helpers import CommandTestMixin
from . import Default... | 992 | 369 | 23 |
1a387f0a7ab6513e1c619e55b24ae2df58847192 | 1,225 | py | Python | propane/urls.py | tylerbutler/propane | 6c404285ab8d78865b7175a5c8adf8fae12d6be5 | [
"MIT"
] | 1 | 2017-12-21T18:16:20.000Z | 2017-12-21T18:16:20.000Z | propane/urls.py | tylerbutler/propane | 6c404285ab8d78865b7175a5c8adf8fae12d6be5 | [
"MIT"
] | null | null | null | propane/urls.py | tylerbutler/propane | 6c404285ab8d78865b7175a5c8adf8fae12d6be5 | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import absolute_import, print_function
import posixpath
from urllib import urlencode
# noinspection PyUnresolvedReferences
from six.moves.urllib.parse import parse_qsl, urlsplit, urlunsplit
__author__ = 'Tyler Butler <tyler@tylerbutler.com>'
try:
# noinspection PyUnresolvedReferen... | 29.166667 | 105 | 0.689796 | # coding=utf-8
from __future__ import absolute_import, print_function
import posixpath
from urllib import urlencode
# noinspection PyUnresolvedReferences
from six.moves.urllib.parse import parse_qsl, urlsplit, urlunsplit
__author__ = 'Tyler Butler <tyler@tylerbutler.com>'
try:
# noinspection PyUnresolvedReferen... | 787 | 0 | 46 |
34e31fa7eb54e39276821d4e196a0a84d638c343 | 1,804 | py | Python | api/serializers.py | guica/api_dados_radar | daae88ef4c6d4501c73010453839d8289c0274c4 | [
"MIT"
] | null | null | null | api/serializers.py | guica/api_dados_radar | daae88ef4c6d4501c73010453839d8289c0274c4 | [
"MIT"
] | 10 | 2020-02-12T03:19:25.000Z | 2021-12-13T20:26:40.000Z | api/serializers.py | guica/api_dados_radar | daae88ef4c6d4501c73010453839d8289c0274c4 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from radar.models import BaseRadares, Contagens, Viagens, Trajetos
from rest_framework_cache.serializers import CachedSerializerMixin
from rest_framework_cache.registry import cache_registry
cache_registry.register(BaseRadaresSerializer)
cache_registry.register(ContagensSerial... | 24.053333 | 80 | 0.538803 | from rest_framework import serializers
from radar.models import BaseRadares, Contagens, Viagens, Trajetos
from rest_framework_cache.serializers import CachedSerializerMixin
from rest_framework_cache.registry import cache_registry
class BaseRadaresSerializer(CachedSerializerMixin, serializers.ModelSerializer):
cla... | 0 | 1,385 | 92 |
2a33d92b09cdd36e7f6ec1fff6cef6606fe79768 | 1,680 | py | Python | backend/underbudget/models/balance.py | vimofthevine/underbudget4 | c90eecf9879f7ce57c77a68b3f83b1d76c4451af | [
"MIT"
] | null | null | null | backend/underbudget/models/balance.py | vimofthevine/underbudget4 | c90eecf9879f7ce57c77a68b3f83b1d76c4451af | [
"MIT"
] | 45 | 2019-12-23T23:45:10.000Z | 2022-03-31T05:01:22.000Z | backend/underbudget/models/balance.py | vimofthevine/underbudget4 | c90eecf9879f7ce57c77a68b3f83b1d76c4451af | [
"MIT"
] | 1 | 2020-12-26T17:16:58.000Z | 2020-12-26T17:16:58.000Z | """ Balance resource model """
import datetime
from sqlalchemy.sql import func
from underbudget.database import db
from underbudget.models.transaction import (
AccountTransactionModel,
EnvelopeTransactionModel,
TransactionModel,
)
class AccountBalanceModel:
""" Account balance model """
@staticm... | 29.473684 | 88 | 0.589881 | """ Balance resource model """
import datetime
from sqlalchemy.sql import func
from underbudget.database import db
from underbudget.models.transaction import (
AccountTransactionModel,
EnvelopeTransactionModel,
TransactionModel,
)
class AccountBalanceModel:
""" Account balance model """
@staticm... | 0 | 0 | 0 |
b675fdc219149ecf8b3d0e204b58ec851f06e738 | 1,034 | py | Python | data_processing.py | forhacks/study-tool-back | 139c24fe1e2295493af62da48b6896614f4e2560 | [
"MIT"
] | null | null | null | data_processing.py | forhacks/study-tool-back | 139c24fe1e2295493af62da48b6896614f4e2560 | [
"MIT"
] | null | null | null | data_processing.py | forhacks/study-tool-back | 139c24fe1e2295493af62da48b6896614f4e2560 | [
"MIT"
] | null | null | null | import numpy as np
import re
from gensim.models import Word2Vec
max_len = 25
print('-- READING DATA --')
# read in defs
with open("data/definitions.txt") as f:
data = f.readlines()
# remove \n at end
data = [process_def(x.strip()) for x in data]
# reorganize into [[def 1, def 2, 1/0], [def 1, def 2, 1/0], ...... | 24.046512 | 78 | 0.636364 | import numpy as np
import re
from gensim.models import Word2Vec
max_len = 25
def process_def(definition):
if len(definition) == 1:
return definition
definition = re.sub("[^a-zA-Z\s]", " ", definition).split()
definition = [a for a in definition if len(a) > 2]
def_arr = np.array(definition)
... | 454 | 0 | 23 |
1de5aae6b063475c9c8982362905164051ea6329 | 812 | py | Python | Week4/task2-3.py | Ivancaminal72/mcv-m6-2018-team3 | dcdbc97d6d9534f1c0479e98113f35bca0084d86 | [
"MIT"
] | 1 | 2019-06-08T10:27:08.000Z | 2019-06-08T10:27:08.000Z | Week4/task2-3.py | Ivancaminal72/mcv-m6-2018-team3 | dcdbc97d6d9534f1c0479e98113f35bca0084d86 | [
"MIT"
] | null | null | null | Week4/task2-3.py | Ivancaminal72/mcv-m6-2018-team3 | dcdbc97d6d9534f1c0479e98113f35bca0084d86 | [
"MIT"
] | 1 | 2018-09-16T22:17:06.000Z | 2018-09-16T22:17:06.000Z | from utils import *
import os
import numpy as np
from video_stabilization import video_stabilization
PlotsDirectory = '../plots/Week4/task2-3/'
if not os.path.exists(PlotsDirectory):
os.makedirs(PlotsDirectory)
print("reading video...")
seq_color = video_to_frame('video1.mp4', grayscale=False)
max_size = 100
se... | 30.074074 | 99 | 0.743842 | from utils import *
import os
import numpy as np
from video_stabilization import video_stabilization
PlotsDirectory = '../plots/Week4/task2-3/'
if not os.path.exists(PlotsDirectory):
os.makedirs(PlotsDirectory)
print("reading video...")
seq_color = video_to_frame('video1.mp4', grayscale=False)
max_size = 100
se... | 0 | 0 | 0 |
460e22311c49b2fe9b2c2d655315d937aeac865b | 813 | py | Python | server/django/src/website/admin.py | tnakagami/home_server | 99071aa047f8635c53cd7dfa9ed812bff6a6cd0c | [
"Apache-2.0"
] | null | null | null | server/django/src/website/admin.py | tnakagami/home_server | 99071aa047f8635c53cd7dfa9ed812bff6a6cd0c | [
"Apache-2.0"
] | null | null | null | server/django/src/website/admin.py | tnakagami/home_server | 99071aa047f8635c53cd7dfa9ed812bff6a6cd0c | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from import_export import resources
from import_export.admin import ImportExportModelAdmin
from . import models
@admin.register(models.ControllerLink)
@admin.register(models.ControllerCommand)
| 32.52 | 57 | 0.767528 | from django.contrib import admin
from import_export import resources
from import_export.admin import ImportExportModelAdmin
from . import models
class ControllerLinkResource(resources.ModelResource):
class Meta:
model = models.ControllerLink
class ControllerCommandResource(resources.ModelResource):
cl... | 0 | 495 | 90 |
7f352b13447c3e217095218dd87a8d7019d83f3a | 7,803 | py | Python | uwu.py | CapnS/uwu-bot | 3c06badaa3c76d3f2f6949fbcc20c7b0e33a5e04 | [
"MIT"
] | null | null | null | uwu.py | CapnS/uwu-bot | 3c06badaa3c76d3f2f6949fbcc20c7b0e33a5e04 | [
"MIT"
] | null | null | null | uwu.py | CapnS/uwu-bot | 3c06badaa3c76d3f2f6949fbcc20c7b0e33a5e04 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from discord.ext.commands.cooldowns import BucketType
import traceback
import asyncio
import asyncpg
import yaml # removed aiofiles because its not needed
from datetime import datetime
import os
import sys
import logging
import aiohttp
import aioredis
import psutil
impor... | 31.46371 | 120 | 0.607587 | import discord
from discord.ext import commands
from discord.ext.commands.cooldowns import BucketType
import traceback
import asyncio
import asyncpg
import yaml # removed aiofiles because its not needed
from datetime import datetime
import os
import sys
import logging
import aiohttp
import aioredis
import psutil
impor... | 5,706 | 489 | 23 |
4c1890046ab803b3871ec96ec6882ad7a0af8294 | 975 | py | Python | microsoft_authentication/views.py | akaytatsu/django-microsoft-authentication | 8c0c42abc8aae40ebeac4100acc0564f296c6406 | [
"MIT"
] | 3 | 2021-02-26T08:32:21.000Z | 2021-07-29T14:10:11.000Z | microsoft_authentication/views.py | akaytatsu/django-microsoft-authentication | 8c0c42abc8aae40ebeac4100acc0564f296c6406 | [
"MIT"
] | 2 | 2021-06-21T23:00:23.000Z | 2021-07-02T09:32:00.000Z | microsoft_authentication/views.py | akaytatsu/django-microsoft-authentication | 8c0c42abc8aae40ebeac4100acc0564f296c6406 | [
"MIT"
] | 2 | 2021-06-21T22:18:11.000Z | 2021-10-11T12:34:02.000Z | from django.http import HttpResponseRedirect, HttpResponseForbidden
from django.contrib.auth import login, logout
from django.conf import settings
from microsoft_authentication.auth.auth_utils import (
get_sign_in_flow,
get_token_from_code,
get_user,
get_django_user,
get_logout_url,
)
| 27.083333 | 72 | 0.733333 | from django.http import HttpResponseRedirect, HttpResponseForbidden
from django.contrib.auth import login, logout
from django.conf import settings
from microsoft_authentication.auth.auth_utils import (
get_sign_in_flow,
get_token_from_code,
get_user,
get_django_user,
get_logout_url,
)
def microsof... | 597 | 0 | 69 |
a4f80aad75cf3811b8a00b25c929d27b04510ba0 | 1,206 | py | Python | ipb_homework_checker/check_homework.py | PRBonn/ipb_homework_checker | 750a42d19a6fb6f8d18785bd8bc1d7aea9caba50 | [
"Apache-2.0"
] | 11 | 2018-12-18T16:21:58.000Z | 2021-07-11T06:31:24.000Z | ipb_homework_checker/check_homework.py | PRBonn/ipb_homework_checker | 750a42d19a6fb6f8d18785bd8bc1d7aea9caba50 | [
"Apache-2.0"
] | 1 | 2018-12-18T00:43:23.000Z | 2018-12-18T00:43:23.000Z | ipb_homework_checker/check_homework.py | PRBonn/ipb_homework_checker | 750a42d19a6fb6f8d18785bd8bc1d7aea9caba50 | [
"Apache-2.0"
] | 3 | 2020-08-15T16:07:17.000Z | 2020-11-15T20:23:00.000Z | #!/usr/bin/python3
"""Script to check this homework."""
import argparse
import logging
from .checker import Checker
from .md_writer import MdWriter
logging.basicConfig()
log = logging.getLogger("GHC")
log.setLevel(logging.INFO)
def main():
"""Run this script."""
parser = argparse.ArgumentParser()
parse... | 25.659574 | 60 | 0.637645 | #!/usr/bin/python3
"""Script to check this homework."""
import argparse
import logging
from .checker import Checker
from .md_writer import MdWriter
logging.basicConfig()
log = logging.getLogger("GHC")
log.setLevel(logging.INFO)
def main():
"""Run this script."""
parser = argparse.ArgumentParser()
parse... | 0 | 0 | 0 |
b3a96457def15d3ea68d7d61ff73d5f543998c9c | 785 | py | Python | Hacker rank/he.py | arghasen/Poker | ea4f4c41371b0bab2540e79141915fd7405dcb43 | [
"MIT"
] | null | null | null | Hacker rank/he.py | arghasen/Poker | ea4f4c41371b0bab2540e79141915fd7405dcb43 | [
"MIT"
] | null | null | null | Hacker rank/he.py | arghasen/Poker | ea4f4c41371b0bab2540e79141915fd7405dcb43 | [
"MIT"
] | null | null | null | T = int(raw_input())
for t in range(T):
n, m = map(int, raw_input().split())
powers = {}
bullets = {}
origBullet = 0
levelBullet = 0
for ni in range( n):
powers[ni] = map(int, raw_input().split())
for ni in range( n):
bullets[ni] = map(int, raw_input().split())
bullets[-1... | 35.681818 | 175 | 0.55414 | T = int(raw_input())
for t in range(T):
n, m = map(int, raw_input().split())
powers = {}
bullets = {}
origBullet = 0
levelBullet = 0
for ni in range( n):
powers[ni] = map(int, raw_input().split())
for ni in range( n):
bullets[ni] = map(int, raw_input().split())
bullets[-1... | 379 | 0 | 26 |
1b68728e4c9fce3d77e5260d475642a9f4616673 | 49,516 | py | Python | openet/core/interpolate.py | torresrua/openet-core-beta | 95f830164ed579f72fc383ac4e1fa6b6b11bdbac | [
"Apache-2.0"
] | null | null | null | openet/core/interpolate.py | torresrua/openet-core-beta | 95f830164ed579f72fc383ac4e1fa6b6b11bdbac | [
"Apache-2.0"
] | null | null | null | openet/core/interpolate.py | torresrua/openet-core-beta | 95f830164ed579f72fc383ac4e1fa6b6b11bdbac | [
"Apache-2.0"
] | 1 | 2021-08-17T04:37:23.000Z | 2021-08-17T04:37:23.000Z | import datetime
import logging
import ee
from dateutil.relativedelta import *
from . import utils
# import openet.core.utils as utils
def daily(target_coll, source_coll, interp_days=32, interp_method='linear',
use_joins=False, compute_product=False):
"""Interpolate non-daily source images to a daily t... | 42.723037 | 87 | 0.625273 | import datetime
import logging
import ee
from dateutil.relativedelta import *
from . import utils
# import openet.core.utils as utils
def daily(target_coll, source_coll, interp_days=32, interp_method='linear',
use_joins=False, compute_product=False):
"""Interpolate non-daily source images to a daily t... | 5,374 | 0 | 443 |
d647d9fc435832b4a77f277be087b6f1b5bcaf8b | 118 | py | Python | Stepin_Roman/lesson_2/DZ_1.1.py | StepinRomanSerg/1824_GB_Python_1 | 0657b4d03e0ce73ddbb100ee12da5508820caeea | [
"MIT"
] | null | null | null | Stepin_Roman/lesson_2/DZ_1.1.py | StepinRomanSerg/1824_GB_Python_1 | 0657b4d03e0ce73ddbb100ee12da5508820caeea | [
"MIT"
] | null | null | null | Stepin_Roman/lesson_2/DZ_1.1.py | StepinRomanSerg/1824_GB_Python_1 | 0657b4d03e0ce73ddbb100ee12da5508820caeea | [
"MIT"
] | null | null | null | a = 15 * 3
b = 15 / 3
c = 15 // 2
d = 15 ** 2
print(type(a), a)
print(type(b), b)
print(type(c), b)
print(type(d), d)
| 13.111111 | 17 | 0.508475 | a = 15 * 3
b = 15 / 3
c = 15 // 2
d = 15 ** 2
print(type(a), a)
print(type(b), b)
print(type(c), b)
print(type(d), d)
| 0 | 0 | 0 |
57c553a9a739ecbb0b4fd2427d2bac62b228e5ff | 599 | py | Python | Python/WebChat/main.py | MariaMich/Hacktoberfest2019-2 | a1a1756fa4594ab9965405e0361a5125b1d4dd48 | [
"MIT"
] | null | null | null | Python/WebChat/main.py | MariaMich/Hacktoberfest2019-2 | a1a1756fa4594ab9965405e0361a5125b1d4dd48 | [
"MIT"
] | null | null | null | Python/WebChat/main.py | MariaMich/Hacktoberfest2019-2 | a1a1756fa4594ab9965405e0361a5125b1d4dd48 | [
"MIT"
] | null | null | null | #! /usr/bin/python
# -*- encoding: utf-8 -*-
from flask import Flask, render_template, jsonify
from flask_socketio import SocketIO, emit
app = Flask(__name__, template_folder='templates', static_url_path='/static/', static_folder='static')
app.config['SECRET_KEY'] = 'ines'
socketio = SocketIO(app)
@app.route('/')
@... | 23.96 | 102 | 0.722871 | #! /usr/bin/python
# -*- encoding: utf-8 -*-
from flask import Flask, render_template, jsonify
from flask_socketio import SocketIO, emit
app = Flask(__name__, template_folder='templates', static_url_path='/static/', static_folder='static')
app.config['SECRET_KEY'] = 'ines'
socketio = SocketIO(app)
@app.route('/')
de... | 97 | 0 | 66 |
b27d9d10ebfcf46ce082cb1400705ed810b5c508 | 1,309 | py | Python | plugin/functions.py | jfcherng/Sublime-Fanhuaji | 85c13d0e44fe8d55de3a2f1fcd7382aead6767a2 | [
"MIT"
] | null | null | null | plugin/functions.py | jfcherng/Sublime-Fanhuaji | 85c13d0e44fe8d55de3a2f1fcd7382aead6767a2 | [
"MIT"
] | null | null | null | plugin/functions.py | jfcherng/Sublime-Fanhuaji | 85c13d0e44fe8d55de3a2f1fcd7382aead6767a2 | [
"MIT"
] | null | null | null | from .constant import TEXT_DELIMITER
from .settings import get_setting
from typing import Any, Dict, Optional
import sublime
| 35.378378 | 111 | 0.674561 | from .constant import TEXT_DELIMITER
from .settings import get_setting
from typing import Any, Dict, Optional
import sublime
def prepare_fanhuaji_convert_args(view: sublime.View, args: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
_args: Dict[str, Any] = get_setting("convert_params")
# 轉換模組
if "mod... | 1,216 | 0 | 23 |
a3f069b53d411bc2f04b599eaa7ce34537700ad7 | 1,762 | py | Python | parlai/tasks/cbt/agents.py | cherie11/ParlAI | 1c1e4b00b398278b652c24ed5cac072cff6a9c9a | [
"MIT"
] | 258 | 2020-04-10T07:01:06.000Z | 2022-03-26T11:49:30.000Z | parlai/tasks/cbt/agents.py | cherie11/ParlAI | 1c1e4b00b398278b652c24ed5cac072cff6a9c9a | [
"MIT"
] | 33 | 2020-04-10T04:28:51.000Z | 2022-03-31T02:52:02.000Z | parlai/tasks/cbt/agents.py | cherie11/ParlAI | 1c1e4b00b398278b652c24ed5cac072cff6a9c9a | [
"MIT"
] | 43 | 2020-04-14T10:43:33.000Z | 2022-03-13T02:27:54.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai.core.teachers import FbDialogTeacher
from parlai.core.agents import MultiTaskTeacher
from .build import buil... | 27.107692 | 79 | 0.628831 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai.core.teachers import FbDialogTeacher
from parlai.core.agents import MultiTaskTeacher
from .build import buil... | 1,038 | 64 | 267 |
4b95b9ac7e0519a13cf1fee5ad8da8e76d71d11a | 431 | py | Python | Generators.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null | Generators.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null | Generators.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null | import random
#1
for number in gensquares(10):
print(number)
print('\n')
#2
for number in rand_num(1,10,12):
print(number)
print('\n')
#3
s = 'hello'
s_iter = iter(s)
print(next(s_iter))
print(next(s_iter))
print(next(s_iter))
print(next(s_iter))
print(next(s_iter)) | 16.576923 | 38 | 0.645012 | import random
#1
def gensquares(n):
for x in range(n):
yield x**2
for number in gensquares(10):
print(number)
print('\n')
#2
def rand_num(low, high, n):
for i in range(0,n):
yield random.randint(low,high)
for number in rand_num(1,10,12):
print(number)
print('\n')
#3
s = 'hello'
s_ite... | 109 | 0 | 44 |
3b3455757da385a4f765daef6d697e12b221bf80 | 975 | py | Python | employee_portal/view_employee_information/forms.py | Dmitriy200123/employee_portal | e06c2cfc03a5d046d5846186249c2140e7ba7814 | [
"MIT"
] | null | null | null | employee_portal/view_employee_information/forms.py | Dmitriy200123/employee_portal | e06c2cfc03a5d046d5846186249c2140e7ba7814 | [
"MIT"
] | null | null | null | employee_portal/view_employee_information/forms.py | Dmitriy200123/employee_portal | e06c2cfc03a5d046d5846186249c2140e7ba7814 | [
"MIT"
] | 1 | 2021-07-28T14:48:40.000Z | 2021-07-28T14:48:40.000Z | from django import forms
from django.forms import ModelForm
from employee_information_site.models import CompanyDepartment, EmployeePosition, Employee
| 46.428571 | 108 | 0.641026 | from django import forms
from django.forms import ModelForm
from employee_information_site.models import CompanyDepartment, EmployeePosition, Employee
class FilterForm(ModelForm):
def __init__(self, *args, **kwargs):
super(FilterForm, self).__init__(*args, **kwargs)
self.fields['department'].empty... | 235 | 595 | 23 |
f68c9af4edf24f6038b2dc6406e316c94a3d6b34 | 1,467 | py | Python | sandbox/test_abort.py | gwiederhecker/MPh | d5eb7b6e9e00fe3fcd00acf53278a89243ae512a | [
"MIT"
] | 1 | 2021-12-23T09:15:56.000Z | 2021-12-23T09:15:56.000Z | sandbox/test_abort.py | gwiederhecker/MPh | d5eb7b6e9e00fe3fcd00acf53278a89243ae512a | [
"MIT"
] | null | null | null | sandbox/test_abort.py | gwiederhecker/MPh | d5eb7b6e9e00fe3fcd00acf53278a89243ae512a | [
"MIT"
] | null | null | null | """
Tests if `KeyboardInterrupt` exception are properly handled.
This test currently fails. That is, trying to interrupt an ongoing
operation of the Comsol client crashes out of the Python session
instead of allowing further code execution or a return to the
interactive prompt.
The script does not depend on ... | 33.340909 | 77 | 0.728698 | """
Tests if `KeyboardInterrupt` exception are properly handled.
This test currently fails. That is, trying to interrupt an ongoing
operation of the Comsol client crashes out of the Python session
instead of allowing further code execution or a return to the
interactive prompt.
The script does not depend on ... | 0 | 0 | 0 |
daf513fbe709d0f310a608eb9a54407a037600eb | 1,112 | py | Python | modules/dazzle/src/main/jython/exec_test_setup.py | drichan/xito | 811f29e8ecda8072ce2a0eb4373ec16f6b083c99 | [
"Apache-2.0"
] | null | null | null | modules/dazzle/src/main/jython/exec_test_setup.py | drichan/xito | 811f29e8ecda8072ce2a0eb4373ec16f6b083c99 | [
"Apache-2.0"
] | null | null | null | modules/dazzle/src/main/jython/exec_test_setup.py | drichan/xito | 811f29e8ecda8072ce2a0eb4373ec16f6b083c99 | [
"Apache-2.0"
] | 1 | 2018-10-19T07:49:02.000Z | 2018-10-19T07:49:02.000Z | import shutil
import java.lang.System
print "Setup exec_test using exec_test_setup.py"
#System Properties
user_home = java.lang.System.getProperty("user.home")
base_dir = java.lang.System.getProperty("basedir")
project_version = java.lang.System.getProperty("project.version")
artifactId = java.lang.System.getProperty... | 41.185185 | 124 | 0.756295 | import shutil
import java.lang.System
print "Setup exec_test using exec_test_setup.py"
#System Properties
user_home = java.lang.System.getProperty("user.home")
base_dir = java.lang.System.getProperty("basedir")
project_version = java.lang.System.getProperty("project.version")
artifactId = java.lang.System.getProperty... | 0 | 0 | 0 |
18b99e8cb5a22dc82d72bb7f1aca63ac9a0ca873 | 183 | py | Python | sololearn/FlowingWords/FlowingWords.py | SneakyWizards/HackerRankSolutions | daf494e7775bb0de5afcfdcfd45aa73e6a950e0e | [
"RSA-MD"
] | 3 | 2020-01-08T18:33:11.000Z | 2022-02-08T00:38:26.000Z | sololearn/FlowingWords/FlowingWords.py | SneakyWizards/HackerRankSolutions | daf494e7775bb0de5afcfdcfd45aa73e6a950e0e | [
"RSA-MD"
] | null | null | null | sololearn/FlowingWords/FlowingWords.py | SneakyWizards/HackerRankSolutions | daf494e7775bb0de5afcfdcfd45aa73e6a950e0e | [
"RSA-MD"
] | 4 | 2020-08-08T22:02:23.000Z | 2022-02-07T17:40:15.000Z | #!/usr/bin/python
in_str = str(input()).lower().split()
for i in range(1, len(in_str)):
if in_str[i-1][-1] != in_str[i][0]:
print("false")
exit(0)
print("true") | 18.3 | 39 | 0.546448 | #!/usr/bin/python
in_str = str(input()).lower().split()
for i in range(1, len(in_str)):
if in_str[i-1][-1] != in_str[i][0]:
print("false")
exit(0)
print("true") | 0 | 0 | 0 |
c17f59bdcdb9876af0c29a577cc8884e6cd3bfe3 | 31,676 | py | Python | registry/spiders/CorporationSpider.py | openc/GeorgiaCorporationScraper | 2bccab5ef2f00507128bc3dc299d5c27c3b39b97 | [
"MIT"
] | 1 | 2017-07-30T21:50:22.000Z | 2017-07-30T21:50:22.000Z | registry/spiders/CorporationSpider.py | openc/GeorgiaCorporationScraper | 2bccab5ef2f00507128bc3dc299d5c27c3b39b97 | [
"MIT"
] | null | null | null | registry/spiders/CorporationSpider.py | openc/GeorgiaCorporationScraper | 2bccab5ef2f00507128bc3dc299d5c27c3b39b97 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import re
import math
import urlparse
from scrapy.spider import BaseSpider
from scrapy.http import Request, FormRequest
from scrapy.selector import HtmlXPathSelector
from scrapy import log
from bs4 import BeautifulSoup
from registry.items import Corporation, Person, CorporationDocument, State... | 46.857988 | 157 | 0.555057 | # -*- coding: utf-8 -*-
import re
import math
import urlparse
from scrapy.spider import BaseSpider
from scrapy.http import Request, FormRequest
from scrapy.selector import HtmlXPathSelector
from scrapy import log
from bs4 import BeautifulSoup
from registry.items import Corporation, Person, CorporationDocument, State... | 30,325 | 2,119 | 23 |
09acc4605fd5b38508b61e04b86a6d3de0f7cc15 | 1,474 | py | Python | docs/client.py | kmader/MMdnn | f62a33a7d6834680537693c7fdc7e90e1b2382ef | [
"MIT"
] | 3,442 | 2017-11-20T08:39:51.000Z | 2019-05-06T10:51:19.000Z | docs/client.py | kmader/MMdnn | f62a33a7d6834680537693c7fdc7e90e1b2382ef | [
"MIT"
] | 430 | 2017-11-29T04:21:48.000Z | 2019-05-06T05:37:37.000Z | docs/client.py | kmader/MMdnn | f62a33a7d6834680537693c7fdc7e90e1b2382ef | [
"MIT"
] | 683 | 2017-11-20T08:50:34.000Z | 2019-05-04T04:25:14.000Z | '''
Send JPEG image to tensorflow_model_server loaded with GAN model.
Hint: the code has been compiled together with TensorFlow serving
and not locally. The client is called in the TensorFlow Docker container
'''
from __future__ import print_function
# Communication to TensorFlow server via gRPC
from grpc.beta impor... | 33.5 | 108 | 0.755088 | '''
Send JPEG image to tensorflow_model_server loaded with GAN model.
Hint: the code has been compiled together with TensorFlow serving
and not locally. The client is called in the TensorFlow Docker container
'''
from __future__ import print_function
# Communication to TensorFlow server via gRPC
from grpc.beta impor... | 651 | 0 | 23 |
57a796c67682624626cfd8021fec8667928490a1 | 1,863 | py | Python | setup_logging.py | mnooel/BUSADM_795_UtilizationPrediction | 65b7b5f7902133fdf93ffa0c15362c7c5cf20196 | [
"MIT"
] | null | null | null | setup_logging.py | mnooel/BUSADM_795_UtilizationPrediction | 65b7b5f7902133fdf93ffa0c15362c7c5cf20196 | [
"MIT"
] | null | null | null | setup_logging.py | mnooel/BUSADM_795_UtilizationPrediction | 65b7b5f7902133fdf93ffa0c15362c7c5cf20196 | [
"MIT"
] | null | null | null | # setup_logging.py
import logging
import logging.config
from settings import LOGS_DIR
class CustomFormatter(logging.Formatter):
"""Logging Formatter to ad colors and count warnings / errors"""
pink = "\x1b[35m"
blue = "\033[96m"
yellow = "\033[93m"
red = "\x1b[31;21m"
bold_red = "\033[41m"
... | 30.540984 | 91 | 0.677939 | # setup_logging.py
import logging
import logging.config
from settings import LOGS_DIR
class CustomFormatter(logging.Formatter):
"""Logging Formatter to ad colors and count warnings / errors"""
pink = "\x1b[35m"
blue = "\033[96m"
yellow = "\033[93m"
red = "\x1b[31;21m"
bold_red = "\033[41m"
... | 174 | 0 | 27 |
35d3af359c0efd1434ebe45e1cddcebf6507ca75 | 211 | py | Python | app.py | behrad-kzm/ClubHouseFollowers | b22c5cd2d53aa72506247726a86d4d027d267091 | [
"MIT"
] | 1 | 2021-05-07T13:07:47.000Z | 2021-05-07T13:07:47.000Z | app.py | behrad-kzm/ClubHouseFollowers | b22c5cd2d53aa72506247726a86d4d027d267091 | [
"MIT"
] | 2 | 2021-05-07T12:58:34.000Z | 2021-06-12T22:17:07.000Z | app.py | behrad-kzm/ClubHouseFollowers | b22c5cd2d53aa72506247726a86d4d027d267091 | [
"MIT"
] | 2 | 2021-04-22T08:20:28.000Z | 2022-01-11T01:13:29.000Z | from flask import Flask
from web.BaseRouter import BaseRouter
app = Flask(__name__)
base_url = '/'
router = BaseRouter(base_url)
router.register_flask_blueprints(app)
if __name__ == '__main__':
app.run()
| 17.583333 | 37 | 0.753555 | from flask import Flask
from web.BaseRouter import BaseRouter
app = Flask(__name__)
base_url = '/'
router = BaseRouter(base_url)
router.register_flask_blueprints(app)
if __name__ == '__main__':
app.run()
| 0 | 0 | 0 |
feb38174f1700808131d73f0b240b8072e5ef95a | 748 | py | Python | setup.py | gsoft-inc/github-secret-finder | 07e85fbc84773dfe9e921d2e7a3c0372cb936177 | [
"Apache-2.0"
] | 4 | 2019-10-22T20:03:41.000Z | 2020-11-18T18:00:56.000Z | setup.py | mlefebvre/github-secret-finder | 07e85fbc84773dfe9e921d2e7a3c0372cb936177 | [
"Apache-2.0"
] | null | null | null | setup.py | mlefebvre/github-secret-finder | 07e85fbc84773dfe9e921d2e7a3c0372cb936177 | [
"Apache-2.0"
] | 1 | 2021-03-30T16:28:57.000Z | 2021-03-30T16:28:57.000Z | from setuptools import setup, find_packages
setup(
name='github_secret_finder',
version='2.0.0',
description='Script to monitor commits from Github users and organizations for secrets.',
url='https://github.com/gsoft-inc/github-secret-finder',
author='Mathieu Gascon-Lefebvre',
author_email='mat... | 29.92 | 93 | 0.663102 | from setuptools import setup, find_packages
setup(
name='github_secret_finder',
version='2.0.0',
description='Script to monitor commits from Github users and organizations for secrets.',
url='https://github.com/gsoft-inc/github-secret-finder',
author='Mathieu Gascon-Lefebvre',
author_email='mat... | 0 | 0 | 0 |
308df90572ef430a57e853178c42a774fc34567b | 284 | py | Python | blog/migrations/0003_delete_postthum.py | jinseopim/kkp | 609c05358bb76d14ce6796f4273a7867a494ce14 | [
"MIT"
] | 1 | 2020-11-07T02:27:46.000Z | 2020-11-07T02:27:46.000Z | blog/migrations/0003_delete_postthum.py | jinseopim/kkp | 609c05358bb76d14ce6796f4273a7867a494ce14 | [
"MIT"
] | null | null | null | blog/migrations/0003_delete_postthum.py | jinseopim/kkp | 609c05358bb76d14ce6796f4273a7867a494ce14 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-11-01 02:59
from django.db import migrations
| 16.705882 | 47 | 0.588028 | # Generated by Django 3.1.2 on 2020-11-01 02:59
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0002_postthum'),
]
operations = [
migrations.DeleteModel(
name='PostThum',
),
]
| 0 | 178 | 23 |
5a2275f8ed7adc271398e4f82c8f878f8d5aa6e7 | 3,728 | py | Python | Start.py | Glitchhy/Simple-Keylogger | 3682517e90ef651c1d54ee9d29fcf512e1655b97 | [
"MIT"
] | 9 | 2020-08-14T12:08:59.000Z | 2022-02-22T02:58:32.000Z | Start.py | Glitchhy/Simple-Keylogger | 3682517e90ef651c1d54ee9d29fcf512e1655b97 | [
"MIT"
] | 1 | 2019-12-29T07:06:50.000Z | 2019-12-29T08:59:51.000Z | Start.py | Glitchhy/Simple-Keylogger | 3682517e90ef651c1d54ee9d29fcf512e1655b97 | [
"MIT"
] | 3 | 2020-08-03T17:32:53.000Z | 2020-09-04T16:36:48.000Z | import pynput
from pynput.keyboard import Key, Listener
import pyautogui
import yagmail
import os.path
from datetime import datetime
import time
import sys
import os
from sys import platform as _platform
#Defining color values for later
G = '\033[32m' #Green
R = '\033[31m' # Red
C = '\033[36m' # Cyan
... | 31.327731 | 141 | 0.450644 | import pynput
from pynput.keyboard import Key, Listener
import pyautogui
import yagmail
import os.path
from datetime import datetime
import time
import sys
import os
from sys import platform as _platform
#Defining color values for later
G = '\033[32m' #Green
R = '\033[31m' # Red
C = '\033[36m' # Cyan
... | 2,387 | 0 | 204 |
d70b66e55221141909a6df82d5a89e6e99db91b0 | 5,712 | py | Python | src/mbed_cloud/_backends/mds/models/endpoint.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 12 | 2017-12-28T11:18:43.000Z | 2020-10-04T12:11:15.000Z | src/mbed_cloud/_backends/mds/models/endpoint.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 50 | 2017-12-21T12:50:41.000Z | 2020-01-13T16:07:08.000Z | src/mbed_cloud/_backends/mds/models/endpoint.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 8 | 2018-04-25T17:47:29.000Z | 2019-08-29T06:38:27.000Z | # coding: utf-8
"""
Connect API
Pelion Device Management Connect API allows web applications to communicate with devices. You can subscribe to device resources and read/write values to them. Device Management Connect allows connectivity to devices by queueing requests and caching resource values.
OpenAPI... | 28.277228 | 428 | 0.572129 | # coding: utf-8
"""
Connect API
Pelion Device Management Connect API allows web applications to communicate with devices. You can subscribe to device resources and read/write values to them. Device Management Connect allows connectivity to devices by queueing requests and caching resource values.
OpenAPI... | 0 | 0 | 0 |
6ae1eab841865410c707419b131d26d4877665d7 | 1,377 | py | Python | scraperplot.py | TCR1990/SmartBuilding-master | fb3b373cabd442b7636b7e22c4e97853e9218d6f | [
"CC0-1.0"
] | 1 | 2020-05-18T14:14:18.000Z | 2020-05-18T14:14:18.000Z | scraperplot.py | nickmalleson/SmartBuilding-master | be644c28d920b30bf66a9fac1cf4f158a3129ab0 | [
"CC0-1.0"
] | 1 | 2020-02-04T17:26:19.000Z | 2020-02-04T17:26:19.000Z | scraperplot.py | nickmalleson/SmartBuilding-master | be644c28d920b30bf66a9fac1cf4f158a3129ab0 | [
"CC0-1.0"
] | 1 | 2020-01-20T10:01:55.000Z | 2020-01-20T10:01:55.000Z | # -*- coding: utf-8 -*-
"""
scraperplot.py
For retreiving and plotting data using the 'scraper.py' module.
Created on Wed Oct 30 15:11:00 2019
@author: Thomas Richards
"""
# import scraper.py
import scraper as scrp
# Run functions in get module
scraper = scrp.Scraper()
choices = input('What do you want to plot? Pr... | 30.6 | 78 | 0.716776 | # -*- coding: utf-8 -*-
"""
scraperplot.py
For retreiving and plotting data using the 'scraper.py' module.
Created on Wed Oct 30 15:11:00 2019
@author: Thomas Richards
"""
# import scraper.py
import scraper as scrp
# Run functions in get module
scraper = scrp.Scraper()
choices = input('What do you want to plot? Pr... | 0 | 0 | 0 |
7011b2ae0614609670b4e97d7fc81ec2fb09c3bb | 455 | py | Python | tests/test_numpy.py | python-pipe/hellp | 51fd7c9143ee8ce6392b9b877036ad4347ad29a5 | [
"MIT"
] | 123 | 2018-07-31T19:17:27.000Z | 2022-03-18T15:29:07.000Z | tests/test_numpy.py | python-pipe/hellp | 51fd7c9143ee8ce6392b9b877036ad4347ad29a5 | [
"MIT"
] | 11 | 2019-05-01T18:01:59.000Z | 2022-01-01T06:43:36.000Z | tests/test_numpy.py | python-pipe/hellp | 51fd7c9143ee8ce6392b9b877036ad4347ad29a5 | [
"MIT"
] | 4 | 2019-06-07T12:03:53.000Z | 2021-05-10T20:29:44.000Z | from sspipe import p, px
import numpy as np
| 16.851852 | 62 | 0.558242 | from sspipe import p, px
import numpy as np
def test_scalar_rhs():
assert np.int32(1) | p(lambda x: x + 1) | (px == 2)
def test_scalar_lhs():
assert 2 | px + np.int32(1)
def test_rhs():
assert np.array([1, 2]) | p(lambda x: x.sum()) | (px == 3)
def test_rhs_px():
assert np.array([1, 2]) | (px.su... | 267 | 0 | 138 |
c60241305672e3e339af5d324f08b5f8a9314443 | 20,971 | py | Python | remake/remake_cmd.py | markmuetz/remake | a3c5098be57b60b01ffaa4a7fcb937f9337dcdea | [
"Apache-2.0"
] | null | null | null | remake/remake_cmd.py | markmuetz/remake | a3c5098be57b60b01ffaa4a7fcb937f9337dcdea | [
"Apache-2.0"
] | 35 | 2020-12-22T11:36:46.000Z | 2021-12-03T15:49:41.000Z | remake/remake_cmd.py | markmuetz/remake | a3c5098be57b60b01ffaa4a7fcb937f9337dcdea | [
"Apache-2.0"
] | null | null | null | import os
import sys
import argparse
import shutil
from logging import getLogger
from pathlib import Path
from time import sleep
from typing import List, Union, Optional, Sequence, Text
try:
# Might not be installed.
import ipdb as debug
except ImportError:
import pdb as debug
try:
import argcomplete
e... | 35.725724 | 100 | 0.564351 | import os
import sys
import argparse
import shutil
from logging import getLogger
from pathlib import Path
from time import sleep
from typing import List, Union, Optional, Sequence, Text
try:
# Might not be installed.
import ipdb as debug
except ImportError:
import pdb as debug
try:
import argcomplete
e... | 13,760 | 5,857 | 647 |
970a8fe9118aca227d5ddecdd61006a20022478a | 9,539 | py | Python | ScienceCruiseDataManagement/ScienceCruiseDataManagement/settings.py | Swiss-Polar-Institute/science-cruise-data-management | 67721a0f4a1255b8ac43e530ed95a8c324239c7c | [
"MIT"
] | 6 | 2017-10-06T09:18:04.000Z | 2022-02-10T08:54:56.000Z | ScienceCruiseDataManagement/ScienceCruiseDataManagement/settings.py | Swiss-Polar-Institute/science-cruise-data-management | 67721a0f4a1255b8ac43e530ed95a8c324239c7c | [
"MIT"
] | 12 | 2020-02-27T09:24:50.000Z | 2021-09-22T17:39:55.000Z | ScienceCruiseDataManagement/ScienceCruiseDataManagement/settings.py | Swiss-Polar-Institute/science-cruise-data-management | 67721a0f4a1255b8ac43e530ed95a8c324239c7c | [
"MIT"
] | 1 | 2017-10-16T13:49:33.000Z | 2017-10-16T13:49:33.000Z | """
Django settings for ScienceCruiseDataManagement project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/sett... | 33.470175 | 172 | 0.73037 | """
Django settings for ScienceCruiseDataManagement project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/sett... | 779 | 0 | 23 |
37da04a97535250d818772393ad249af4c7febea | 70 | py | Python | views/__init__.py | bkosciow/piader | 81ca2c8a4bd4a834fb460b5306fca0c5ce0584c4 | [
"MIT"
] | null | null | null | views/__init__.py | bkosciow/piader | 81ca2c8a4bd4a834fb460b5306fca0c5ce0584c4 | [
"MIT"
] | null | null | null | views/__init__.py | bkosciow/piader | 81ca2c8a4bd4a834fb460b5306fca0c5ce0584c4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Views
"""
__author__ = 'Bartosz Kościów'
| 11.666667 | 30 | 0.557143 | # -*- coding: utf-8 -*-
""" Views
"""
__author__ = 'Bartosz Kościów'
| 0 | 0 | 0 |
7655b0892a69e9fd5d785d3cebb5a5bf32252527 | 886 | py | Python | IRIS- Logistic Regression.py | aayushi-droid/KNN-Machine-Learning-Algorithm | 5bd71c1a3c53decf497c7c76eaa556eecfacf29c | [
"MIT"
] | null | null | null | IRIS- Logistic Regression.py | aayushi-droid/KNN-Machine-Learning-Algorithm | 5bd71c1a3c53decf497c7c76eaa556eecfacf29c | [
"MIT"
] | null | null | null | IRIS- Logistic Regression.py | aayushi-droid/KNN-Machine-Learning-Algorithm | 5bd71c1a3c53decf497c7c76eaa556eecfacf29c | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from sklearn.metrics import accuracy_score
from sklearn.linear_model import LogisticRegression
# Load The Data Into DataFrame with Pandas
iris = load_i... | 29.533333 | 68 | 0.755079 | import pandas as pd
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from sklearn.metrics import accuracy_score
from sklearn.linear_model import LogisticRegression
# Load The Data Into DataFrame with Pandas
iris = load_i... | 0 | 0 | 0 |
649428646af304c32b3dae64d4cf321c4cf12be2 | 4,140 | py | Python | nonlinear_data_fitting/particle_swam_optimization_algorithm.py | almostdutch/numerical-optimization-algorithms | cd6c1306cb04eccce62a74420323bda83058c1d6 | [
"MIT"
] | null | null | null | nonlinear_data_fitting/particle_swam_optimization_algorithm.py | almostdutch/numerical-optimization-algorithms | cd6c1306cb04eccce62a74420323bda83058c1d6 | [
"MIT"
] | 1 | 2021-06-02T10:07:26.000Z | 2021-06-03T10:23:46.000Z | nonlinear_data_fitting/particle_swam_optimization_algorithm.py | almostdutch/numerical-optimization-algorithms | cd6c1306cb04eccce62a74420323bda83058c1d6 | [
"MIT"
] | null | null | null | """
particle_swam_optimization_algorithm.py
Returns the minimizer of the function
func_ps - anonimous function (vectorized for multiple particles)
"""
import numpy as np
import numpy.matlib
np.random.seed();
| 42.244898 | 135 | 0.624638 | """
particle_swam_optimization_algorithm.py
Returns the minimizer of the function
func_ps - anonimous function (vectorized for multiple particles)
"""
import numpy as np
import numpy.matlib
np.random.seed();
def particle_swam_optimization_algorithm(func_ps, options):
report = {};
N_ps = options['N_ps']; # n... | 3,905 | 0 | 23 |