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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e52b2e1c1ea59fa64c3206672451d1ca75882b8f | 297 | py | Python | Contacts/urls.py | simonescob/Agendadj | badd90f3fce0950aa151840f7015c68632c7a203 | [
"MIT"
] | null | null | null | Contacts/urls.py | simonescob/Agendadj | badd90f3fce0950aa151840f7015c68632c7a203 | [
"MIT"
] | null | null | null | Contacts/urls.py | simonescob/Agendadj | badd90f3fce0950aa151840f7015c68632c7a203 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name="home"),
path('all', views.index),
path('create', views.create, name="create"),
path('delete/<int:contact_id>', views.delete, name="delete"),
path('edit/<int:contact_id>', views.edit, name="edit"),
] | 29.7 | 62 | 0.680135 | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name="home"),
path('all', views.index),
path('create', views.create, name="create"),
path('delete/<int:contact_id>', views.delete, name="delete"),
path('edit/<int:contact_id>', views.edit, name="edit"),
] | 0 | 0 | 0 |
92ad40269e21a10d36efc821460ad6ea637d560c | 4,569 | py | Python | glidepy.py | quantizimo/test | 3d830dac676877db0a3a63ee0c482bc1b6871d6a | [
"MIT"
] | null | null | null | glidepy.py | quantizimo/test | 3d830dac676877db0a3a63ee0c482bc1b6871d6a | [
"MIT"
] | null | null | null | glidepy.py | quantizimo/test | 3d830dac676877db0a3a63ee0c482bc1b6871d6a | [
"MIT"
] | null | null | null | import numpy as np
from scipy.optimize import fmin
import math
from scipy.optimize import minimize
| 31.729167 | 108 | 0.632524 | import numpy as np
from scipy.optimize import fmin
import math
from scipy.optimize import minimize
class Glider:
def __init__(self, speeds, sink_rates, weight_ref, weight=None):
self._init_constants()
# self.wm = 0
self.altitude = 0
self.flight_state = "on_ground"
self.we... | 3,838 | -14 | 639 |
c30132e2c9779826c7032440043cdd50a86109e8 | 146 | py | Python | src/dummy.py | ashesh705/master-of-coin | 8ce253cd1c73005856c896a155ef25804d95d02f | [
"MIT"
] | null | null | null | src/dummy.py | ashesh705/master-of-coin | 8ce253cd1c73005856c896a155ef25804d95d02f | [
"MIT"
] | null | null | null | src/dummy.py | ashesh705/master-of-coin | 8ce253cd1c73005856c896a155ef25804d95d02f | [
"MIT"
] | null | null | null | """ Dummy source code to initialize repo"""
from typing import Literal
def dummy() -> Literal[True]:
"""Dummy function"""
return True
| 14.6 | 43 | 0.657534 | """ Dummy source code to initialize repo"""
from typing import Literal
def dummy() -> Literal[True]:
"""Dummy function"""
return True
| 0 | 0 | 0 |
202dc2c2ce0978019f7627c8b0b1ddd47cb141d2 | 160 | py | Python | module.py | ShveczovaKS/8lab2k | 1c58ec07c8a7fa5ed9807a7751315131f2e361f0 | [
"MIT"
] | null | null | null | module.py | ShveczovaKS/8lab2k | 1c58ec07c8a7fa5ed9807a7751315131f2e361f0 | [
"MIT"
] | null | null | null | module.py | ShveczovaKS/8lab2k | 1c58ec07c8a7fa5ed9807a7751315131f2e361f0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
| 12.307692 | 24 | 0.4875 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
def get_func(tag):
def func(s):
group = tag, s
return group
return func
| 82 | 0 | 25 |
df2da96dcd879b529489f9f2d167184ae6a3c44c | 436 | py | Python | ros2_and_turtlesim_deep_dive/launch/2_turtlesim_cmd_vel_publisher.launch.py | noshluk2/ROS2-Learners-Repository | 2e8982a4f659c99ab90175253c28f1c10a60e31b | [
"MIT"
] | 3 | 2021-11-27T18:18:12.000Z | 2022-01-15T19:32:19.000Z | ros2_and_turtlesim_deep_dive/launch/2_turtlesim_cmd_vel_publisher.launch.py | noshluk2/ROS2-Learners-Repository | 2e8982a4f659c99ab90175253c28f1c10a60e31b | [
"MIT"
] | null | null | null | ros2_and_turtlesim_deep_dive/launch/2_turtlesim_cmd_vel_publisher.launch.py | noshluk2/ROS2-Learners-Repository | 2e8982a4f659c99ab90175253c28f1c10a60e31b | [
"MIT"
] | 5 | 2021-09-02T10:49:46.000Z | 2022-02-22T12:47:17.000Z | from launch import LaunchDescription
from launch_ros.actions import Node | 25.647059 | 51 | 0.605505 | from launch import LaunchDescription
from launch_ros.actions import Node
def generate_launch_description():
return LaunchDescription([
Node(
package='turtlesim',
executable='turtlesim_node'
),
Node(
package='ros2_and_turtlesim_deep_dive',
exec... | 341 | 0 | 23 |
0ba659f60c6cbb8e70fbe2ade949ed0726b3d12f | 680 | py | Python | crabageprediction/venv/Lib/site-packages/fontTools/misc/cython.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 38,667 | 2015-01-01T00:15:34.000Z | 2022-03-31T22:57:03.000Z | crabageprediction/venv/Lib/site-packages/fontTools/misc/cython.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 1,599 | 2016-09-27T09:07:36.000Z | 2022-03-31T23:04:51.000Z | crabageprediction/venv/Lib/site-packages/fontTools/misc/cython.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 11,269 | 2015-01-01T08:41:17.000Z | 2022-03-31T16:12:52.000Z | """ Exports a no-op 'cython' namespace similar to
https://github.com/cython/cython/blob/master/Cython/Shadow.py
This allows to optionally compile @cython decorated functions
(when cython is available at built time), or run the same code
as pure-python, without runtime dependency on cython module.
We only define the s... | 26.153846 | 64 | 0.739706 | """ Exports a no-op 'cython' namespace similar to
https://github.com/cython/cython/blob/master/Cython/Shadow.py
This allows to optionally compile @cython decorated functions
(when cython is available at built time), or run the same code
as pure-python, without runtime dependency on cython module.
We only define the s... | 16 | 0 | 23 |
ab9929ed3ea92aae5e1281a1b168bffd87818815 | 2,172 | py | Python | appengine/swarming/server/acl.py | pombreda/swarming | c70f311f3db8f25752c793a0d7b36cf537d95580 | [
"Apache-2.0"
] | null | null | null | appengine/swarming/server/acl.py | pombreda/swarming | c70f311f3db8f25752c793a0d7b36cf537d95580 | [
"Apache-2.0"
] | null | null | null | appengine/swarming/server/acl.py | pombreda/swarming | c70f311f3db8f25752c793a0d7b36cf537d95580 | [
"Apache-2.0"
] | 1 | 2021-12-06T03:37:36.000Z | 2021-12-06T03:37:36.000Z | # Copyright 2014 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Defines access groups."""
from components import auth
from components import utils
# Names of groups.
# See https://code.google.com/p/swarming/wiki... | 26.487805 | 78 | 0.743094 | # Copyright 2014 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Defines access groups."""
from components import auth
from components import utils
# Names of groups.
# See https://code.google.com/p/swarming/wiki... | 321 | 0 | 138 |
f75d5caf71f40f210458b85e2a678429b8d45bdb | 1,715 | py | Python | suricata-4.1.4/suricata-update/suricata/update/commands/removesource.py | runtest007/dpdk_surcata_4.1.1 | 5abf91f483b418b5d9c2dd410b5c850d6ed95c5f | [
"MIT"
] | 77 | 2019-06-17T07:05:07.000Z | 2022-03-07T03:26:27.000Z | suricata-4.1.4/suricata-update/suricata/update/commands/removesource.py | clockdad/DPDK_SURICATA-4_1_1 | 974cc9eb54b0b1ab90eff12a95617e3e293b77d3 | [
"MIT"
] | 22 | 2019-07-18T02:32:10.000Z | 2022-03-24T03:39:11.000Z | suricata-4.1.4/suricata-update/suricata/update/commands/removesource.py | clockdad/DPDK_SURICATA-4_1_1 | 974cc9eb54b0b1ab90eff12a95617e3e293b77d3 | [
"MIT"
] | 49 | 2019-06-18T03:31:56.000Z | 2022-03-13T05:23:10.000Z | # Copyright (C) 2017 Open Information Security Foundation
#
# You can copy, redistribute or modify this Program under the terms of
# the GNU General Public License version 2 as published by the Free
# Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; wi... | 34.3 | 73 | 0.749271 | # Copyright (C) 2017 Open Information Security Foundation
#
# You can copy, redistribute or modify this Program under the terms of
# the GNU General Public License version 2 as published by the Free
# Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; wi... | 811 | 0 | 46 |
3ca045d0b4c2187471f92b0e5fdbef4d90523a1c | 936 | py | Python | blogs/admin.py | AgnosticMe/phleeb | 48f85048d2db5d16d243feee2f84a961682a0f4d | [
"MIT"
] | null | null | null | blogs/admin.py | AgnosticMe/phleeb | 48f85048d2db5d16d243feee2f84a961682a0f4d | [
"MIT"
] | null | null | null | blogs/admin.py | AgnosticMe/phleeb | 48f85048d2db5d16d243feee2f84a961682a0f4d | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Blog, Category, Tag, Comment
# Register your models here.
@admin.register(Blog)
@admin.register(Category)
@admin.register(Tag)
@admin.register(Comment)
| 22.829268 | 63 | 0.673077 | from django.contrib import admin
from .models import Blog, Category, Tag, Comment
# Register your models here.
@admin.register(Blog)
class AdminBlog(admin.ModelAdmin):
list_display = ['title', 'publishing_date']
list_display_links = ['title', 'publishing_date']
list_filter = ['publishing_date', 'category',... | 0 | 636 | 88 |
7eab3c278fcfc42d13e8ea1b8a894c6d62712411 | 7,206 | py | Python | zcode/inout/tests/test_inout_core.py | lzkelley/zcode | 55a63693fe3ad744957d7ce2d74fb4c8e09ea8ba | [
"MIT"
] | 1 | 2021-02-11T03:24:55.000Z | 2021-02-11T03:24:55.000Z | zcode/inout/tests/test_inout_core.py | lzkelley/zcode | 55a63693fe3ad744957d7ce2d74fb4c8e09ea8ba | [
"MIT"
] | null | null | null | zcode/inout/tests/test_inout_core.py | lzkelley/zcode | 55a63693fe3ad744957d7ce2d74fb4c8e09ea8ba | [
"MIT"
] | null | null | null | """Test methods for `inout_core.py`.
Can be run with:
$ nosetests zcode/inout/tests/test_inout_core.py
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import warnings
import shutil
from numpy.testing import run_module_suite
import numpy as np
from nose.tools impor... | 37.53125 | 95 | 0.600056 | """Test methods for `inout_core.py`.
Can be run with:
$ nosetests zcode/inout/tests/test_inout_core.py
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import warnings
import shutil
from numpy.testing import run_module_suite
import numpy as np
from nose.tools impor... | 6,503 | 220 | 23 |
fb8a1c89bff42274aadcbbd4e1333face551763d | 46 | py | Python | Lecture2/name.py | EusebioSimango/CS50s-Web-Programming-With-Python-And-Javascript | 80df8834c1db8cc28b72d5393ff9aa340c069b57 | [
"MIT"
] | null | null | null | Lecture2/name.py | EusebioSimango/CS50s-Web-Programming-With-Python-And-Javascript | 80df8834c1db8cc28b72d5393ff9aa340c069b57 | [
"MIT"
] | null | null | null | Lecture2/name.py | EusebioSimango/CS50s-Web-Programming-With-Python-And-Javascript | 80df8834c1db8cc28b72d5393ff9aa340c069b57 | [
"MIT"
] | null | null | null | name = input("Mame: ")
print(f"Hello, {name}") | 23 | 23 | 0.608696 | name = input("Mame: ")
print(f"Hello, {name}") | 0 | 0 | 0 |
f510ea13d343357dd5eae6dc2035a2c37e918c43 | 2,733 | py | Python | tasksapi/models/validators.py | mwiens91/saltant | 9e72175a896f5859ada304ad3ae4d84dfc3834db | [
"MIT"
] | 3 | 2018-12-08T01:18:29.000Z | 2018-12-14T23:18:42.000Z | tasksapi/models/validators.py | saltant-org/saltant | db498a1186fc74221f8214ad1819dd03bf4b08ac | [
"MIT"
] | 3 | 2019-05-23T07:43:13.000Z | 2021-06-10T20:46:53.000Z | tasksapi/models/validators.py | saltant-org/saltant | db498a1186fc74221f8214ad1819dd03bf4b08ac | [
"MIT"
] | 2 | 2019-03-13T22:31:09.000Z | 2019-05-03T00:18:30.000Z | """Contains validators for task models."""
def task_instance_args_are_valid(instance, fill_missing_args=False):
"""Determines whether a task instance's arguments are valid.
The arguments are valid if the instance's argument includes all of
its task type's required arguments (but not necessarily the
a... | 36.932432 | 78 | 0.668496 | """Contains validators for task models."""
def task_instance_args_are_valid(instance, fill_missing_args=False):
"""Determines whether a task instance's arguments are valid.
The arguments are valid if the instance's argument includes all of
its task type's required arguments (but not necessarily the
a... | 0 | 0 | 0 |
b18e463d5d6fb71fac9aa5f7d292312fb8ee31b9 | 4,954 | py | Python | semantic_segmentation/keras_metrics.py | Jason-Khan/ubdvss | 76cabfa642af1f659920de32827ea6c3fe008588 | [
"Apache-2.0"
] | 13 | 2020-01-20T13:22:47.000Z | 2021-11-12T07:35:36.000Z | semantic_segmentation/keras_metrics.py | Jason-Khan/ubdvss | 76cabfa642af1f659920de32827ea6c3fe008588 | [
"Apache-2.0"
] | 3 | 2020-09-09T13:19:11.000Z | 2020-11-15T10:52:23.000Z | semantic_segmentation/keras_metrics.py | Jason-Khan/ubdvss | 76cabfa642af1f659920de32827ea6c3fe008588 | [
"Apache-2.0"
] | 5 | 2020-06-01T16:26:07.000Z | 2022-03-08T02:00:45.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (С) ABBYY (BIT Software), 1993 - 2019. All rights reserved.
"""
Различные метрики для keras подсчитываемые при обучении
"""
import functools
import keras.backend as K
import tensorflow as tf
from semantic_segmentation.losses import get_losses
@_metric_wrapper... | 25.802083 | 74 | 0.66411 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (С) ABBYY (BIT Software), 1993 - 2019. All rights reserved.
"""
Различные метрики для keras подсчитываемые при обучении
"""
import functools
import keras.backend as K
import tensorflow as tf
from semantic_segmentation.losses import get_losses
def _squeeze_singl... | 820 | 0 | 118 |
a675dc6e47d5ff70decc3601d63c4681223ee3d8 | 2,722 | py | Python | datazie/model/LinearModel.py | amozie/amozie | fb7c16ce537bc5567f9c87cfc22c564a4dffc4ef | [
"Apache-2.0"
] | null | null | null | datazie/model/LinearModel.py | amozie/amozie | fb7c16ce537bc5567f9c87cfc22c564a4dffc4ef | [
"Apache-2.0"
] | null | null | null | datazie/model/LinearModel.py | amozie/amozie | fb7c16ce537bc5567f9c87cfc22c564a4dffc4ef | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on %(date)s
@author: %(username)s
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn import linear_model
import statsmodels.api as sm
from statsmodels.sandbox.regression.predstd import wls_prediction_std
model_sm = 'sm'
... | 26.950495 | 72 | 0.559882 | # -*- coding: utf-8 -*-
"""
Created on %(date)s
@author: %(username)s
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn import linear_model
import statsmodels.api as sm
from statsmodels.sandbox.regression.predstd import wls_prediction_std
model_sm = 'sm'
... | 1,939 | 10 | 287 |
b67a3f691f33184cbbf6898ebf7144756349476d | 4,888 | py | Python | utilities.py | rc1035/directed-probe-matching | c724096672e778202d9e8ed197cdf7395ea1d211 | [
"MIT"
] | 10 | 2017-08-16T12:16:52.000Z | 2022-02-26T05:09:39.000Z | utilities.py | d15c0/directed-probe-matching | c724096672e778202d9e8ed197cdf7395ea1d211 | [
"MIT"
] | 1 | 2019-07-10T12:00:00.000Z | 2019-07-10T12:00:00.000Z | utilities.py | d15c0/directed-probe-matching | c724096672e778202d9e8ed197cdf7395ea1d211 | [
"MIT"
] | 4 | 2017-11-30T11:01:06.000Z | 2019-11-03T23:39:40.000Z | #!/usr/bin/env python3.6
"""Refactored utility functions."""
__author__ = "Richard Cosgrove"
from collections import defaultdict
import gzip
from itertools import combinations
from datetime import datetime, timedelta
import json
import os
def export_compressed_json(dict_item, file_name):
"""Export gzip compress... | 36.75188 | 112 | 0.672054 | #!/usr/bin/env python3.6
"""Refactored utility functions."""
__author__ = "Richard Cosgrove"
from collections import defaultdict
import gzip
from itertools import combinations
from datetime import datetime, timedelta
import json
import os
def export_compressed_json(dict_item, file_name):
"""Export gzip compress... | 0 | 0 | 0 |
0e899a0c6dc84c26eed43123ac191ce6e094f3ae | 3,464 | py | Python | nautobot/users/tests/test_models.py | psmware-ltd/nautobot | ac516287fb8edcc3482bd011839de837c6bbf0df | [
"Apache-2.0"
] | 384 | 2021-02-24T01:40:40.000Z | 2022-03-30T10:30:59.000Z | nautobot/users/tests/test_models.py | psmware-ltd/nautobot | ac516287fb8edcc3482bd011839de837c6bbf0df | [
"Apache-2.0"
] | 1,067 | 2021-02-24T00:58:08.000Z | 2022-03-31T23:38:23.000Z | nautobot/users/tests/test_models.py | psmware-ltd/nautobot | ac516287fb8edcc3482bd011839de837c6bbf0df | [
"Apache-2.0"
] | 128 | 2021-02-24T02:45:16.000Z | 2022-03-20T18:48:36.000Z | from django.contrib.auth import get_user_model
from django.test import TestCase
# Use the proper swappable User model
User = get_user_model()
| 33.631068 | 87 | 0.566397 | from django.contrib.auth import get_user_model
from django.test import TestCase
# Use the proper swappable User model
User = get_user_model()
class UserConfigTest(TestCase):
def setUp(self):
user = User.objects.create_user(username="testuser")
user.config_data = {
"a": True,
... | 3,152 | 10 | 157 |
58ff00ab9dd53405c8606240357d386f8a7c8414 | 3,823 | py | Python | lib/googlecloudsdk/api_lib/sql/instances.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/api_lib/sql/instances.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/api_lib/sql/instances.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | 1 | 2020-07-24T20:13:29.000Z | 2020-07-24T20:13:29.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 34.754545 | 79 | 0.757782 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 1,062 | 0 | 147 |
a6e3fb81075849bc5006590462c1692cddcd0b28 | 1,912 | py | Python | catalog/general/catalog_logger.py | eoss-cloud/madxxx_catalog_api | ef37374a36129de4f0a6fe5dd46b5bc2e2f01d1d | [
"MIT"
] | null | null | null | catalog/general/catalog_logger.py | eoss-cloud/madxxx_catalog_api | ef37374a36129de4f0a6fe5dd46b5bc2e2f01d1d | [
"MIT"
] | null | null | null | catalog/general/catalog_logger.py | eoss-cloud/madxxx_catalog_api | ef37374a36129de4f0a6fe5dd46b5bc2e2f01d1d | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*-
""" EOSS catalog system
Custom logger
Default configuration file within this directory is used to control logging behaviour; can be overwritten with LOGGING_CONF which points to
local logging configuration
"""
__author__ = "Thilo Wehrmann, Steffen Gebhardt"
__copyright__ = "Copyright 2016, E... | 26.191781 | 140 | 0.764644 | #-*- coding: utf-8 -*-
""" EOSS catalog system
Custom logger
Default configuration file within this directory is used to control logging behaviour; can be overwritten with LOGGING_CONF which points to
local logging configuration
"""
__author__ = "Thilo Wehrmann, Steffen Gebhardt"
__copyright__ = "Copyright 2016, E... | 19 | 14 | 56 |
25781249bb36750915e0251ce1e74e198d0fa28a | 8,973 | py | Python | deeplearning/ml4pl/models/batch.py | Zacharias030/ProGraML | cd99d2c5362acd0b24ee224492bb3e8c4d4736fb | [
"Apache-2.0"
] | null | null | null | deeplearning/ml4pl/models/batch.py | Zacharias030/ProGraML | cd99d2c5362acd0b24ee224492bb3e8c4d4736fb | [
"Apache-2.0"
] | 2 | 2020-07-27T08:22:06.000Z | 2020-07-30T17:34:35.000Z | deeplearning/ml4pl/models/batch.py | Zacharias030/ProGraML | cd99d2c5362acd0b24ee224492bb3e8c4d4736fb | [
"Apache-2.0"
] | 1 | 2020-06-05T04:58:13.000Z | 2020-06-05T04:58:13.000Z | # Copyright 2019 the ProGraML authors.
#
# Contact Chris Cummins <chrisc.101@gmail.com>.
#
# 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
#
# ... | 30.110738 | 78 | 0.701995 | # Copyright 2019 the ProGraML authors.
#
# Contact Chris Cummins <chrisc.101@gmail.com>.
#
# 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
#
# ... | 1,412 | 0 | 314 |
bd43660e61d12126149a6be149f44586a149537b | 102 | py | Python | python/python-tutorial/10_packages/package_a/subpackage_a/a_module.py | wesleyegberto/dojos-languages | 87170a722efac1247c713daa21cb3fcc39f5c5c1 | [
"MIT"
] | null | null | null | python/python-tutorial/10_packages/package_a/subpackage_a/a_module.py | wesleyegberto/dojos-languages | 87170a722efac1247c713daa21cb3fcc39f5c5c1 | [
"MIT"
] | null | null | null | python/python-tutorial/10_packages/package_a/subpackage_a/a_module.py | wesleyegberto/dojos-languages | 87170a722efac1247c713daa21cb3fcc39f5c5c1 | [
"MIT"
] | null | null | null | # A module inside the package
print("Module: ", __name__)
| 12.75 | 29 | 0.666667 | # A module inside the package
print("Module: ", __name__)
def do_stuff():
print("Doing stuff")
| 19 | 0 | 23 |
ea15f02ea347cde7a8bc22e6cd2d89594e3df3dd | 1,096 | py | Python | easy/1025-Divisor Game.py | Davidxswang/leetcode | d554b7f5228f14c646f726ddb91014a612673e06 | [
"Apache-2.0"
] | 2 | 2020-05-08T02:17:17.000Z | 2020-05-17T04:55:56.000Z | easy/1025-Divisor Game.py | Davidxswang/leetcode | d554b7f5228f14c646f726ddb91014a612673e06 | [
"Apache-2.0"
] | null | null | null | easy/1025-Divisor Game.py | Davidxswang/leetcode | d554b7f5228f14c646f726ddb91014a612673e06 | [
"Apache-2.0"
] | null | null | null | """
https://leetcode.com/problems/divisor-game/
Alice and Bob take turns playing a game, with Alice starting first.
Initially, there is a number N on the chalkboard. On each player's turn, that player makes a move consisting of:
Choosing any x with 0 < x < N and N % x == 0.
Replacing the number N on the chalkboard w... | 25.488372 | 113 | 0.636861 | """
https://leetcode.com/problems/divisor-game/
Alice and Bob take turns playing a game, with Alice starting first.
Initially, there is a number N on the chalkboard. On each player's turn, that player makes a move consisting of:
Choosing any x with 0 < x < N and N % x == 0.
Replacing the number N on the chalkboard w... | 294 | -6 | 49 |
56a51529edb0ee5b8e263f380f1c7725ffa73944 | 4,540 | py | Python | evalml/automl/engine/sequential_engine.py | BlockchainClimateInstitute/price_microservice | 11d1cff8965fe1befc997e9da3dc09efceed4579 | [
"BSD-3-Clause"
] | null | null | null | evalml/automl/engine/sequential_engine.py | BlockchainClimateInstitute/price_microservice | 11d1cff8965fe1befc997e9da3dc09efceed4579 | [
"BSD-3-Clause"
] | null | null | null | evalml/automl/engine/sequential_engine.py | BlockchainClimateInstitute/price_microservice | 11d1cff8965fe1befc997e9da3dc09efceed4579 | [
"BSD-3-Clause"
] | null | null | null | import sys
import traceback
import numpy as np
from evalml.automl.engine import EngineBase
from evalml.exceptions import PipelineScoreError
from evalml.model_family import ModelFamily
from evalml.objectives.utils import get_objective
from evalml.utils import get_logger
logger = get_logger(__file__)
class Sequentia... | 42.830189 | 109 | 0.620485 | import sys
import traceback
import numpy as np
from evalml.automl.engine import EngineBase
from evalml.exceptions import PipelineScoreError
from evalml.model_family import ModelFamily
from evalml.objectives.utils import get_objective
from evalml.utils import get_logger
logger = get_logger(__file__)
class Sequentia... | 0 | 0 | 0 |
ee2569e70a693fb7569365e25bd376b146aaf167 | 877 | py | Python | source/read-file/app.py | aws-samples/aws-serverless-batch-architecture | 1672d7623c2a0b6141bf83d019efe3c6c70efd00 | [
"MIT-0"
] | 14 | 2021-11-12T02:02:46.000Z | 2022-03-01T23:28:48.000Z | source/read-file/app.py | aws-samples/aws-serverless-batch-architecture | 1672d7623c2a0b6141bf83d019efe3c6c70efd00 | [
"MIT-0"
] | 1 | 2021-11-01T02:56:34.000Z | 2022-01-17T00:19:53.000Z | source/read-file/app.py | aws-samples/aws-serverless-batch-architecture | 1672d7623c2a0b6141bf83d019efe3c6c70efd00 | [
"MIT-0"
] | 1 | 2022-03-24T13:00:45.000Z | 2022-03-24T13:00:45.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import csv
import s3fs
import os
s3 = s3fs.S3FileSystem(anon=False)
header = [
'uuid',
'country',
'itemType',
'salesChannel',
'orderPriority',
'orderDate',
'region',
'shipDate'
]
| 21.390244 | 78 | 0.58951 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import csv
import s3fs
import os
s3 = s3fs.S3FileSystem(anon=False)
header = [
'uuid',
'country',
'itemType',
'salesChannel',
'orderPriority',
'orderDate',
'region',
'shipDate'
]
def... | 535 | 0 | 23 |
85f1aa282d6853f2f160254093d5add98f8f0f8b | 5,210 | py | Python | modules/differentialLine.py | inconvergent/differential-line-cuda | 07927dff7c3178821776fccd5ad0aa196a3bb858 | [
"MIT"
] | 21 | 2016-05-22T17:40:02.000Z | 2022-02-03T11:36:31.000Z | modules/differentialLine.py | inconvergent/differential-line-cuda | 07927dff7c3178821776fccd5ad0aa196a3bb858 | [
"MIT"
] | null | null | null | modules/differentialLine.py | inconvergent/differential-line-cuda | 07927dff7c3178821776fccd5ad0aa196a3bb858 | [
"MIT"
] | 2 | 2017-03-17T05:13:16.000Z | 2021-12-09T02:20:03.000Z | # -*- coding: utf-8 -*-
from numpy import pi
from numpy import zeros
from numpy import sin
from numpy import cos
from numpy import sqrt
from numpy.random import random
from numpy import float32 as npfloat
from numpy import int32 as npint
TWOPI = pi*2
PI = pi
| 18.876812 | 65 | 0.55739 | # -*- coding: utf-8 -*-
from numpy import pi
from numpy import zeros
from numpy import sin
from numpy import cos
from numpy import sqrt
from numpy.random import random
from numpy import float32 as npfloat
from numpy import int32 as npint
TWOPI = pi*2
PI = pi
class DifferentialLine(object):
def __init__(
... | 4,707 | 10 | 223 |
9c9a724dc974172fe6713d50c40457af8df6ee64 | 2,802 | py | Python | main.py | greenactionstudio/openleadr-python | 03f2ceb3d9a8a2ffdffb67c99ec116187b9ee063 | [
"Apache-2.0"
] | null | null | null | main.py | greenactionstudio/openleadr-python | 03f2ceb3d9a8a2ffdffb67c99ec116187b9ee063 | [
"Apache-2.0"
] | null | null | null | main.py | greenactionstudio/openleadr-python | 03f2ceb3d9a8a2ffdffb67c99ec116187b9ee063 | [
"Apache-2.0"
] | 1 | 2021-11-03T02:36:32.000Z | 2021-11-03T02:36:32.000Z | from logging import debug, exception
from flask import Flask, request
import os
import asyncio
import threading
import ssl
import aiohttp
import nest_asyncio
import json
from openleadr.client import OpenADRClient
from openleadr.utils import report_callback
from openleadr.enums import MEASUREMENTS
nest_asyncio.apply()
... | 38.916667 | 120 | 0.745182 | from logging import debug, exception
from flask import Flask, request
import os
import asyncio
import threading
import ssl
import aiohttp
import nest_asyncio
import json
from openleadr.client import OpenADRClient
from openleadr.utils import report_callback
from openleadr.enums import MEASUREMENTS
nest_asyncio.apply()
... | 1,323 | 0 | 199 |
0a7253e54a7ce0b7e58517111d748be3f97a40cb | 2,816 | py | Python | sound_lib/external/pybass_aac.py | ctoth/sound_lib | 0e0544a1f4e5da5bc2e0ee99cd7c5bac9ba934c6 | [
"MIT"
] | 1 | 2020-09-03T15:35:03.000Z | 2020-09-03T15:35:03.000Z | sound_lib/external/pybass_aac.py | ctoth/sound_lib | 0e0544a1f4e5da5bc2e0ee99cd7c5bac9ba934c6 | [
"MIT"
] | 2 | 2020-09-25T05:47:44.000Z | 2021-06-25T15:25:34.000Z | sound_lib/external/pybass_aac.py | ctoth/sound_lib | 0e0544a1f4e5da5bc2e0ee99cd7c5bac9ba934c6 | [
"MIT"
] | 2 | 2020-01-05T16:24:20.000Z | 2020-09-03T15:35:07.000Z | from __future__ import absolute_import
# Copyright(c) Max Kolosov 2009 maxkolosov@inbox.ru
# http://vosolok2008.narod.ru
# BSD license
__version__ = '0.1'
__versionTime__ = '2009-11-15'
__author__ = 'Max Kolosov <maxkolosov@inbox.ru>'
__doc__ = '''
pybass_aac.py - is ctypes python module for
BASS_AAC - exten... | 52.148148 | 184 | 0.79652 | from __future__ import absolute_import
# Copyright(c) Max Kolosov 2009 maxkolosov@inbox.ru
# http://vosolok2008.narod.ru
# BSD license
__version__ = '0.1'
__versionTime__ = '2009-11-15'
__author__ = 'Max Kolosov <maxkolosov@inbox.ru>'
__doc__ = '''
pybass_aac.py - is ctypes python module for
BASS_AAC - exten... | 0 | 0 | 0 |
0a79e9ed00dd7cff3b0787278aa3e51a4698409f | 31,754 | py | Python | src/olympia/addons/views.py | tapaswenipathak/addons-server | b7085559a754248a8baade399d5a27f2c3e3ca7e | [
"BSD-3-Clause"
] | 1 | 2019-08-17T21:17:50.000Z | 2019-08-17T21:17:50.000Z | src/olympia/addons/views.py | tapaswenipathak/addons-server | b7085559a754248a8baade399d5a27f2c3e3ca7e | [
"BSD-3-Clause"
] | null | null | null | src/olympia/addons/views.py | tapaswenipathak/addons-server | b7085559a754248a8baade399d5a27f2c3e3ca7e | [
"BSD-3-Clause"
] | null | null | null | from collections import OrderedDict
from django import http
from django.db.models import Prefetch
from django.db.transaction import non_atomic_requests
from django.shortcuts import redirect
from django.utils.cache import patch_cache_control
from django.utils.decorators import method_decorator
from django.views.decorat... | 41.891821 | 79 | 0.653776 | from collections import OrderedDict
from django import http
from django.db.models import Prefetch
from django.db.transaction import non_atomic_requests
from django.shortcuts import redirect
from django.utils.cache import patch_cache_control
from django.utils.decorators import method_decorator
from django.views.decorat... | 13,152 | 12,512 | 608 |
3840052143a4c80cb731fce500d7e4cb9f141b98 | 11,603 | py | Python | scheduling/methods/k_means_NN_naive.py | CORE-Robotics-Lab/Personalized_Neural_Trees | 3e8dd12fe4fc850be65c96c847eb143ef3bcdc2e | [
"MIT"
] | 3 | 2021-05-22T19:25:01.000Z | 2021-12-01T07:59:56.000Z | scheduling/methods/k_means_NN_naive.py | CORE-Robotics-Lab/Personalized_Neural_Trees | 3e8dd12fe4fc850be65c96c847eb143ef3bcdc2e | [
"MIT"
] | null | null | null | scheduling/methods/k_means_NN_naive.py | CORE-Robotics-Lab/Personalized_Neural_Trees | 3e8dd12fe4fc850be65c96c847eb143ef3bcdc2e | [
"MIT"
] | null | null | null | """
Created by Rohan Paleja on September 23, 2019
Nikolaidis et. al. benchmark
"""
import torch
import torch.nn.functional as F
# sys.path.insert(0, '/home/Anonymous/PycharmProjects/bayesian_prolo')
import numpy as np
import pickle
from torch.autograd import Variable
from utils.naive_utils import load_in_naive_data,... | 40.010345 | 171 | 0.620271 | """
Created by Rohan Paleja on September 23, 2019
Nikolaidis et. al. benchmark
"""
import torch
import torch.nn.functional as F
# sys.path.insert(0, '/home/Anonymous/PycharmProjects/bayesian_prolo')
import numpy as np
import pickle
from torch.autograd import Variable
from utils.naive_utils import load_in_naive_data,... | 2,795 | 0 | 81 |
b388f68a9de50b2d68147365e456767b8e775cd2 | 1,167 | py | Python | candy_collect.py | itiB/poke-scripts | e2da1356ee8000c7345682d4c07709481f2044f8 | [
"MIT"
] | 2 | 2020-02-08T13:55:46.000Z | 2020-07-21T13:17:26.000Z | candy_collect.py | itiB/poke-scripts | e2da1356ee8000c7345682d4c07709481f2044f8 | [
"MIT"
] | null | null | null | candy_collect.py | itiB/poke-scripts | e2da1356ee8000c7345682d4c07709481f2044f8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import serial
import time
from time import sleep
import datetime
parser = argparse.ArgumentParser()
parser.add_argument('port')
args = parser.parse_args()
sleep_time = 50
ser = serial.Serial(args.port, 9600)
sleep(3)
send('Button LCLICK', 0.1)
try:
... | 19.131148 | 51 | 0.552699 | #!/usr/bin/env python3
import argparse
import serial
import time
from time import sleep
import datetime
parser = argparse.ArgumentParser()
parser.add_argument('port')
args = parser.parse_args()
sleep_time = 50
def send(msg, duration=0):
print(msg)
ser.write(f'{msg}\r\n'.encode('utf-8'))
s... | 716 | 0 | 50 |
a4ef9bd877c250ea0e460a024503d8e819218c76 | 3,683 | py | Python | utils_ic.py | kkkgabriel/50039Homework3 | 69d8f36f60868cac64bb1d1682eba34a548f3565 | [
"MIT"
] | null | null | null | utils_ic.py | kkkgabriel/50039Homework3 | 69d8f36f60868cac64bb1d1682eba34a548f3565 | [
"MIT"
] | null | null | null | utils_ic.py | kkkgabriel/50039Homework3 | 69d8f36f60868cac64bb1d1682eba34a548f3565 | [
"MIT"
] | null | null | null | import json
import torch
from torchvision import datasets, transforms
from PIL import Image
# Define function to read cat names
# Define function to read data
# Define processing testing image function
def process_image(image):
''' Scales, crops, and normalizes a PIL image for a PyTorch model,
returns an... | 41.852273 | 88 | 0.581048 | import json
import torch
from torchvision import datasets, transforms
from PIL import Image
# Define function to read cat names
def read_jason(filename):
with open(filename, 'r') as f:
cat_to_name = json.load(f)
return cat_to_name
# Define function to read data
def load_data(data_dir):
train_dir =... | 1,850 | 0 | 44 |
7c9ecc3b2e26c62f94ef6497972cb0e25e5a58f9 | 13,851 | py | Python | tensorflow/python/tools/freeze_graph_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 78 | 2020-08-04T12:36:25.000Z | 2022-03-25T04:23:40.000Z | tensorflow/python/tools/freeze_graph_test.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 1,056 | 2019-12-15T01:20:31.000Z | 2022-02-10T02:06:28.000Z | tensorflow/python/tools/freeze_graph_test.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 28 | 2020-02-10T07:03:06.000Z | 2022-01-12T11:19:20.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.264535 | 80 | 0.695401 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 6,922 | 4,814 | 23 |
5d3f7ba06d8f30ec1f43524b350975670db0b280 | 1,597 | py | Python | tests/gmprocess/waveform_processing/adjust_highpass_ridder_test.py | usgs/groundmotion-processing- | ed188e2bb1dcd9b17433ef4677874eac654fdd16 | [
"Unlicense"
] | null | null | null | tests/gmprocess/waveform_processing/adjust_highpass_ridder_test.py | usgs/groundmotion-processing- | ed188e2bb1dcd9b17433ef4677874eac654fdd16 | [
"Unlicense"
] | null | null | null | tests/gmprocess/waveform_processing/adjust_highpass_ridder_test.py | usgs/groundmotion-processing- | ed188e2bb1dcd9b17433ef4677874eac654fdd16 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import numpy as np
from gmprocess.core.streamcollection import StreamCollection
from gmprocess.io.read import read_data
from gmprocess.utils.test_utils import read_data_dir
from gmprocess.waveform_processing.adjust_highpass_ridder import ridder_fchp
from gmproces... | 27.067797 | 76 | 0.634314 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import numpy as np
from gmprocess.core.streamcollection import StreamCollection
from gmprocess.io.read import read_data
from gmprocess.utils.test_utils import read_data_dir
from gmprocess.waveform_processing.adjust_highpass_ridder import ridder_fchp
from gmproces... | 1,124 | 0 | 23 |
8314dc9023ae51350cf14c4fc6f29ae2621bb8d7 | 952 | py | Python | supperfeed/importer.py | corydodt/SupperFeed | 2980e3f6d287f56c6eade06cfe57870d9796c5ea | [
"MIT"
] | 2 | 2015-10-28T23:53:29.000Z | 2018-02-27T12:39:54.000Z | supperfeed/importer.py | corydodt/SupperFeed | 2980e3f6d287f56c6eade06cfe57870d9796c5ea | [
"MIT"
] | null | null | null | supperfeed/importer.py | corydodt/SupperFeed | 2980e3f6d287f56c6eade06cfe57870d9796c5ea | [
"MIT"
] | null | null | null | """
Import recipes from URLs to our database
"""
import re
import json
from txpx import background, EchoProcess
from txpx.process import LineGlueProtocol
from supperfeed.build import Recipe
LineGlueProtocol.MAX_LENGTH=10000
class ImportProcess(EchoProcess):
"""
Import a recipe by loading the json data dump... | 24.410256 | 77 | 0.658613 | """
Import recipes from URLs to our database
"""
import re
import json
from txpx import background, EchoProcess
from txpx.process import LineGlueProtocol
from supperfeed.build import Recipe
LineGlueProtocol.MAX_LENGTH=10000
class ImportProcess(EchoProcess):
"""
Import a recipe by loading the json data dump... | 491 | 0 | 103 |
30f5d5f62a940e9c9c56d93b2735b45ae0a23f7e | 759 | py | Python | src/my_project/medium_problems/from1to50/group_people_give_group_size.py | ivan1016017/LeetCodeAlgorithmProblems | f617f30201fb1cd53e32de35084fdeb88ef36023 | [
"MIT"
] | null | null | null | src/my_project/medium_problems/from1to50/group_people_give_group_size.py | ivan1016017/LeetCodeAlgorithmProblems | f617f30201fb1cd53e32de35084fdeb88ef36023 | [
"MIT"
] | 1 | 2021-09-22T12:26:14.000Z | 2021-09-22T12:26:14.000Z | src/my_project/medium_problems/from1to50/group_people_give_group_size.py | ivan1016017/LeetCodeAlgorithmProblems | 454284b76634cc34ed41f7fa30d857403cedf1bf | [
"MIT"
] | null | null | null | from typing import List
solution = Solution()
print(solution.groupThePeople(groupSizes = [3,3,3,3,3,1,3]))
| 29.192308 | 71 | 0.546772 | from typing import List
class Solution:
def groupThePeople(self, groupSizes: List[int]) -> List[List[int]]:
final_groups=[]
count_dict = {}
for ind, val in enumerate(groupSizes):
# print(count_dict)
if val in count_dict.keys():
if len(count_dict[val]... | 606 | -6 | 49 |
dbd8f6bc8f256424cc38bdbd062b914922bea024 | 1,011 | py | Python | tests/bidirectional_lut_test.py | pnarvor/nephelae_simulation | 7b3f3a2c2aaa49324f8b09a6ab62819c280efa4c | [
"BSD-3-Clause"
] | null | null | null | tests/bidirectional_lut_test.py | pnarvor/nephelae_simulation | 7b3f3a2c2aaa49324f8b09a6ab62819c280efa4c | [
"BSD-3-Clause"
] | null | null | null | tests/bidirectional_lut_test.py | pnarvor/nephelae_simulation | 7b3f3a2c2aaa49324f8b09a6ab62819c280efa4c | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/python3
import sys
import os
sys.path.append('../')
import numpy as np
import matplotlib.pyplot as plt
import imageio
import matplotlib.cm as cm
import time
from netCDF4 import MFDataset
import mesonh_probe as cdf
"""
test file for periodiccontainer and netcdfinterface types
- arguments : mesonh (net... | 25.923077 | 66 | 0.732938 | #! /usr/bin/python3
import sys
import os
sys.path.append('../')
import numpy as np
import matplotlib.pyplot as plt
import imageio
import matplotlib.cm as cm
import time
from netCDF4 import MFDataset
import mesonh_probe as cdf
"""
test file for periodiccontainer and netcdfinterface types
- arguments : mesonh (net... | 0 | 0 | 0 |
754066c0276ad5f42837eccb52a06e7a374ef810 | 366 | py | Python | tests/test_get_credits.py | freshsecurity/zerobounce-python-api-v2 | 7bd5c838db24cde6c5cbca5ca1590395e707b7cd | [
"MIT"
] | 3 | 2018-11-01T08:37:43.000Z | 2019-10-23T13:58:27.000Z | tests/test_get_credits.py | freshsecurity/zerobounce-python-api-v2 | 7bd5c838db24cde6c5cbca5ca1590395e707b7cd | [
"MIT"
] | 2 | 2019-10-09T22:30:52.000Z | 2022-01-14T15:13:32.000Z | tests/test_get_credits.py | freshsecurity/zerobounce-python-api-v2 | 7bd5c838db24cde6c5cbca5ca1590395e707b7cd | [
"MIT"
] | 5 | 2018-07-18T10:55:07.000Z | 2019-11-21T14:53:11.000Z | import responses
@responses.activate
| 28.153846 | 82 | 0.696721 | import responses
@responses.activate
def test_should_get_2375323_of_credit(zerobounce, zerobounce_response_getcredits):
responses.add(responses.GET,
'https://api.zerobounce.net/v2/getcredits?api_key=123456',
json=zerobounce_response_getcredits,
status=200)
... | 305 | 0 | 22 |
5c0bef4089d7fb266a9c29954e06a567e8ce9a6d | 800 | py | Python | constant/constant.py | ZxbMsl160918/covid19-vaccin | 7ebf3fa1de45fdaec8108e79ff6e090400cde9eb | [
"Apache-2.0"
] | null | null | null | constant/constant.py | ZxbMsl160918/covid19-vaccin | 7ebf3fa1de45fdaec8108e79ff6e090400cde9eb | [
"Apache-2.0"
] | null | null | null | constant/constant.py | ZxbMsl160918/covid19-vaccin | 7ebf3fa1de45fdaec8108e79ff6e090400cde9eb | [
"Apache-2.0"
] | null | null | null | # 请求成功
RESPONSE_OK = 200
# 请求所需的URL地址
URLS = {
# 主机地址
"hostUrl": "https://m.r.umiaohealth.com/",
# 获取疫苗接种列表地址;POST
"vaccinationAddress": "/InstitutionMedicineStock/GetBykeyword_InstitutionMedicineStock",
# 获取某个社区医院的某一天可预约的时间段
"hospitalTimeRange": "/Reservation/GetByWorkDate_Rsv_TimeRange",
... | 18.181818 | 92 | 0.6075 | # 请求成功
RESPONSE_OK = 200
# 请求所需的URL地址
URLS = {
# 主机地址
"hostUrl": "https://m.r.umiaohealth.com/",
# 获取疫苗接种列表地址;POST
"vaccinationAddress": "/InstitutionMedicineStock/GetBykeyword_InstitutionMedicineStock",
# 获取某个社区医院的某一天可预约的时间段
"hospitalTimeRange": "/Reservation/GetByWorkDate_Rsv_TimeRange",
... | 0 | 0 | 0 |
5ebd8f1c512b1380b449a67ec585f3905c6bceac | 9,220 | py | Python | personal_context_builder/gensim_hdp.py | InternetOfUs/personal-context-builder | 89e7388d622bc0efbf708542566fdcdca667a4e5 | [
"Apache-2.0"
] | null | null | null | personal_context_builder/gensim_hdp.py | InternetOfUs/personal-context-builder | 89e7388d622bc0efbf708542566fdcdca667a4e5 | [
"Apache-2.0"
] | null | null | null | personal_context_builder/gensim_hdp.py | InternetOfUs/personal-context-builder | 89e7388d622bc0efbf708542566fdcdca667a4e5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""Scikit learn interface for :class:`~gensim.models.hdpmodel.HdpModel`.
Follows scikit-learn API conventions to facilitate using gensim... | 42.100457 | 119 | 0.61974 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""Scikit learn interface for :class:`~gensim.models.hdpmodel.HdpModel`.
Follows scikit-learn API conventions to facilitate using gensim... | 0 | 0 | 0 |
b582f1040cc1af3be284ad67fe9c371e838dde5d | 2,060 | py | Python | zaqar-8.0.0/zaqar/common/policies/claims.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 97 | 2015-01-02T09:35:23.000Z | 2022-03-25T00:38:45.000Z | zaqar-8.0.0/zaqar/common/policies/claims.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | zaqar-8.0.0/zaqar/common/policies/claims.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 44 | 2015-01-28T03:01:28.000Z | 2021-05-13T18:55:19.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 29.428571 | 76 | 0.591748 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 13 | 0 | 23 |
48f845ebbaca4afd27efda9fdf590cf268429691 | 2,139 | py | Python | bot.py | boyuan12/MLH-Helper | efa98907b89bae2ef1f1c8b551075356b61ad741 | [
"MIT"
] | null | null | null | bot.py | boyuan12/MLH-Helper | efa98907b89bae2ef1f1c8b551075356b61ad741 | [
"MIT"
] | null | null | null | bot.py | boyuan12/MLH-Helper | efa98907b89bae2ef1f1c8b551075356b61ad741 | [
"MIT"
] | null | null | null | import discord
import discord.utils
from discord.ext import commands
import requests
import random
client = discord.Client()
SECRET_KEY="secretkey"
BASE_URL="http://0.0.0.0:1234"
@client.event
@client.event
client.run("") | 40.358491 | 198 | 0.625993 | import discord
import discord.utils
from discord.ext import commands
import requests
import random
client = discord.Client()
SECRET_KEY="secretkey"
BASE_URL="http://0.0.0.0:1234"
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(message)... | 1,868 | 0 | 44 |
f968e78a0a396c803ccb0a25d591d668dacf68bf | 553 | py | Python | django_pathfinder_statcrunch/urls.py | porowns/django-pathfinder-statcrunch | 4a31dd014b6e1c27b3e70ae88ca5762841ce72db | [
"MIT"
] | null | null | null | django_pathfinder_statcrunch/urls.py | porowns/django-pathfinder-statcrunch | 4a31dd014b6e1c27b3e70ae88ca5762841ce72db | [
"MIT"
] | null | null | null | django_pathfinder_statcrunch/urls.py | porowns/django-pathfinder-statcrunch | 4a31dd014b6e1c27b3e70ae88ca5762841ce72db | [
"MIT"
] | null | null | null | from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings
from django.contrib import admin
from django.urls import path, re_path
from . import views
# SSO
urlpatterns = [
path('reports/', views.list_reports,
name="django-pathfinder-statcrunch-list-reports"),
... | 34.5625 | 67 | 0.735986 | from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings
from django.contrib import admin
from django.urls import path, re_path
from . import views
# SSO
urlpatterns = [
path('reports/', views.list_reports,
name="django-pathfinder-statcrunch-list-reports"),
... | 0 | 0 | 0 |
0ed78fe0d10f673e40978db5dbae120f7d215015 | 222 | py | Python | adventofcode/2021/1/2.py | jan25/code_sorted | f405fd0898f72eb3d5428f9e10aefb4a009d5089 | [
"Unlicense"
] | 2 | 2018-01-18T11:01:36.000Z | 2021-12-20T18:14:48.000Z | adventofcode/2021/1/2.py | jan25/code_sorted | f405fd0898f72eb3d5428f9e10aefb4a009d5089 | [
"Unlicense"
] | null | null | null | adventofcode/2021/1/2.py | jan25/code_sorted | f405fd0898f72eb3d5428f9e10aefb4a009d5089 | [
"Unlicense"
] | null | null | null | import fileinput
nums = list(map(int, fileinput.input()))
print(sum(inc for inc in gen()))
| 17.076923 | 56 | 0.540541 | import fileinput
nums = list(map(int, fileinput.input()))
def gen():
for i in range(1, len(nums) - 2):
if sum(nums[i:i + 3]) > sum(nums[i - 1: i + 2]):
yield 1
print(sum(inc for inc in gen()))
| 104 | 0 | 23 |
2f907545d59c9d2bffc0a13955bd9ba29dc05554 | 477 | py | Python | openapi-server/python-flask/openapi_server/controllers/health_check_service_controller.py | michilu/proto-api | aca02aaa11064e87462ab34674c0c4974cf70372 | [
"Apache-2.0"
] | null | null | null | openapi-server/python-flask/openapi_server/controllers/health_check_service_controller.py | michilu/proto-api | aca02aaa11064e87462ab34674c0c4974cf70372 | [
"Apache-2.0"
] | 1 | 2020-07-15T09:50:06.000Z | 2020-07-15T09:50:06.000Z | openapi-server/python-flask/openapi_server/controllers/health_check_service_controller.py | michilu/proto-openapi | aca02aaa11064e87462ab34674c0c4974cf70372 | [
"Apache-2.0"
] | null | null | null | import connexion
import six
from openapi_server.models.runtime_error import RuntimeError # noqa: E501
from openapi_server.models.v1_health_check_service_health_check_response import V1HealthCheckServiceHealthCheckResponse # noqa: E501
from openapi_server import util
def health_check_service_health_check(): # noqa... | 26.5 | 133 | 0.802935 | import connexion
import six
from openapi_server.models.runtime_error import RuntimeError # noqa: E501
from openapi_server.models.v1_health_check_service_health_check_response import V1HealthCheckServiceHealthCheckResponse # noqa: E501
from openapi_server import util
def health_check_service_health_check(): # noqa... | 0 | 0 | 0 |
4cb74abbf6f8f44cb294e4d005f81aad23521f19 | 148 | py | Python | gfat/models/one_eight_two/model.py | paurosello/gfat | 23bcb7bf328be8bd0c1aa99ff869d8e539563eba | [
"MIT"
] | null | null | null | gfat/models/one_eight_two/model.py | paurosello/gfat | 23bcb7bf328be8bd0c1aa99ff869d8e539563eba | [
"MIT"
] | 2 | 2021-03-25T21:40:00.000Z | 2021-11-15T17:46:49.000Z | gfat/models/one_eight_two/model.py | paurosello/gfat | 23bcb7bf328be8bd0c1aa99ff869d8e539563eba | [
"MIT"
] | null | null | null | class Model182:
"""Class to create Model 182 files"""
declarant = None
declared_registers = {}
| 16.444444 | 41 | 0.614865 | class Model182:
"""Class to create Model 182 files"""
declarant = None
declared_registers = {}
def __init__(self):
return
| 13 | 0 | 27 |
887fea9a7f42da7c5675403aa05cab40094c6fb6 | 1,067 | py | Python | src/model/synapses/tensor_backend/VoltageJump.py | Fassial/pku-intern | 4463e7d5a5844c8002f7e3d01b4fadc3a20e2038 | [
"MIT"
] | null | null | null | src/model/synapses/tensor_backend/VoltageJump.py | Fassial/pku-intern | 4463e7d5a5844c8002f7e3d01b4fadc3a20e2038 | [
"MIT"
] | null | null | null | src/model/synapses/tensor_backend/VoltageJump.py | Fassial/pku-intern | 4463e7d5a5844c8002f7e3d01b4fadc3a20e2038 | [
"MIT"
] | null | null | null | """
Created on 12:39, June. 4th, 2021
Author: fassial
Filename: VoltageJump.py
"""
import brainpy as bp
__all__ = [
"VoltageJump",
]
| 25.404762 | 79 | 0.582943 | """
Created on 12:39, June. 4th, 2021
Author: fassial
Filename: VoltageJump.py
"""
import brainpy as bp
__all__ = [
"VoltageJump",
]
class VoltageJump(bp.TwoEndConn):
target_backend = "general"
def __init__(self, pre, post, conn,
weight = 1., delay = 0., **kwargs
):
# init params
... | 808 | 97 | 23 |
2356a07736148deea7e9a4b60909d1ff37a28c82 | 845 | py | Python | clahe_and_augmentation/parseConfig.py | RandomeName745/DD2424---Project-Covid-19 | 2e1e647e841eeb00760daecb58effeba3ca237c4 | [
"MIT"
] | null | null | null | clahe_and_augmentation/parseConfig.py | RandomeName745/DD2424---Project-Covid-19 | 2e1e647e841eeb00760daecb58effeba3ca237c4 | [
"MIT"
] | null | null | null | clahe_and_augmentation/parseConfig.py | RandomeName745/DD2424---Project-Covid-19 | 2e1e647e841eeb00760daecb58effeba3ca237c4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun May 10 10:31:44 2020
@author: alex
"""
import argparse
from clodsa.utils.conf import Conf | 29.137931 | 85 | 0.654438 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun May 10 10:31:44 2020
@author: alex
"""
import argparse
from clodsa.utils.conf import Conf
def parseConfig(configfile):
ap = argparse.ArgumentParser()
ap.add_argument("-c", "--conf", required=True, help="path to configuration file")
args =... | 666 | 0 | 23 |
d6844ad5af8ac8dd3731b4be397175e5d6c05d9f | 3,563 | py | Python | clientui/vstrm_server.py | cbk914/BlackMamba | 826d5e2994368006cad09acaaa7c6bfa047891b5 | [
"MIT"
] | 902 | 2021-02-09T09:42:57.000Z | 2022-03-26T09:28:03.000Z | clientui/vstrm_server.py | cbk914/BlackMamba | 826d5e2994368006cad09acaaa7c6bfa047891b5 | [
"MIT"
] | 11 | 2021-02-12T16:46:51.000Z | 2021-12-20T21:12:14.000Z | clientui/vstrm_server.py | cbk914/BlackMamba | 826d5e2994368006cad09acaaa7c6bfa047891b5 | [
"MIT"
] | 126 | 2021-02-09T12:16:50.000Z | 2022-02-25T04:19:18.000Z | ####################################################################################
# BLACKMAMBA BY: LOSEYS (https://github.com/loseys)
#
# QT GUI INTERFACE BY: WANDERSON M.PIMENTA (https://github.com/Wanderson-Magalhaes)
# ORIGINAL QT GUI: https://github.com/Wanderson-Magalhaes/Simple_PySide_Base
####################... | 27.407692 | 91 | 0.572271 | ####################################################################################
# BLACKMAMBA BY: LOSEYS (https://github.com/loseys)
#
# QT GUI INTERFACE BY: WANDERSON M.PIMENTA (https://github.com/Wanderson-Magalhaes)
# ORIGINAL QT GUI: https://github.com/Wanderson-Magalhaes/Simple_PySide_Base
####################... | 2,719 | 0 | 92 |
9b17df01413810c9aafe1a9d4b06d58e9e2eff88 | 257 | py | Python | src/api/domain/schedule/ScheduleCronJob/ScheduleCronJobRequest.py | PythonDataIntegrator/pythondataintegrator | 6167778c36c2295e36199ac0d4d256a4a0c28d7a | [
"MIT"
] | 14 | 2020-12-19T15:06:13.000Z | 2022-01-12T19:52:17.000Z | src/api/domain/schedule/ScheduleCronJob/ScheduleCronJobRequest.py | PythonDataIntegrator/pythondataintegrator | 6167778c36c2295e36199ac0d4d256a4a0c28d7a | [
"MIT"
] | 43 | 2021-01-06T22:05:22.000Z | 2022-03-10T10:30:30.000Z | src/api/domain/schedule/ScheduleCronJob/ScheduleCronJobRequest.py | PythonDataIntegrator/pythondataintegrator | 6167778c36c2295e36199ac0d4d256a4a0c28d7a | [
"MIT"
] | 4 | 2020-12-18T23:10:09.000Z | 2021-04-02T13:03:12.000Z | from datetime import datetime
from infrastructure.cqrs.decorators.requestclass import requestclass
@requestclass
| 21.416667 | 68 | 0.770428 | from datetime import datetime
from infrastructure.cqrs.decorators.requestclass import requestclass
@requestclass
class ScheduleCronJobRequest:
OperationName: str = None
Cron: str = None
StartDate: datetime = None
EndDate: datetime = None
| 0 | 119 | 22 |
58f8d59cc2c4eb8e7df9a61a133e9fc628033ad5 | 4,775 | py | Python | Unit3SC_0205/northwind.py | TemsyChen/DS-Unit-3-Sprint-2-SQL-and-Databases | cba1e0f5476f5e7a13e10ad450474a565d302b33 | [
"MIT"
] | null | null | null | Unit3SC_0205/northwind.py | TemsyChen/DS-Unit-3-Sprint-2-SQL-and-Databases | cba1e0f5476f5e7a13e10ad450474a565d302b33 | [
"MIT"
] | null | null | null | Unit3SC_0205/northwind.py | TemsyChen/DS-Unit-3-Sprint-2-SQL-and-Databases | cba1e0f5476f5e7a13e10ad450474a565d302b33 | [
"MIT"
] | null | null | null | import sqlite3
# Connect to the sqlite3 file
connection = sqlite3.connect("northwind_small.sqlite3")
cursor = connection.cursor()
# Queries
# `expensive_items`: What are the ten most expensive items (per unit price) in the database?
price_query = f""" SELECT UnitPrice, ProductName
FROM product
... | 45.47619 | 113 | 0.660314 | import sqlite3
# Connect to the sqlite3 file
connection = sqlite3.connect("northwind_small.sqlite3")
cursor = connection.cursor()
# Queries
# `expensive_items`: What are the ten most expensive items (per unit price) in the database?
price_query = f""" SELECT UnitPrice, ProductName
FROM product
... | 0 | 0 | 0 |
1c787236266f19826db1b1ea01fce5c806ce4267 | 8,541 | py | Python | lib/model/complete_net.py | chensjtu/poxture | f6abea1216c987f0e4c628b250054d764eaecf2e | [
"Apache-2.0"
] | null | null | null | lib/model/complete_net.py | chensjtu/poxture | f6abea1216c987f0e4c628b250054d764eaecf2e | [
"Apache-2.0"
] | null | null | null | lib/model/complete_net.py | chensjtu/poxture | f6abea1216c987f0e4c628b250054d764eaecf2e | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import functools
from .SurfaceClassifier import conv1_1, period_loss
# from .DepthNormalizer import DepthNormalizer
from ..net_util import *
# from iPERCore.models.networks.criterions import VGGLoss
from lib.model.Models import NestedUNet
import numpy a... | 44.717277 | 164 | 0.619482 | import torch
import torch.nn as nn
import torch.nn.functional as F
import functools
from .SurfaceClassifier import conv1_1, period_loss
# from .DepthNormalizer import DepthNormalizer
from ..net_util import *
# from iPERCore.models.networks.criterions import VGGLoss
from lib.model.Models import NestedUNet
import numpy a... | 451 | 2,629 | 23 |
91b66cd5922aac62b6769b7d844bbbf6732242a0 | 13,831 | py | Python | ActiveCell_RealMorphology_Burst_Inh_cluster.py | EilamLeleo/burst | 538dbf6845f4de5519c0392368d611d1e54608e1 | [
"MIT"
] | null | null | null | ActiveCell_RealMorphology_Burst_Inh_cluster.py | EilamLeleo/burst | 538dbf6845f4de5519c0392368d611d1e54608e1 | [
"MIT"
] | null | null | null | ActiveCell_RealMorphology_Burst_Inh_cluster.py | EilamLeleo/burst | 538dbf6845f4de5519c0392368d611d1e54608e1 | [
"MIT"
] | null | null | null | #!/usr/lib/python-exec/python2.7/python
import os
import sys
os.chdir('C:/Users/Leleo/Documents/Active Cell Real Morphology/')
from neuron import h
from neuron import gui
#%%
import numpy as np
import time
import math
import cPickle as pickle
#%%
sk = False
if sk==True:
from sklearn import decomposition
f... | 41.041543 | 150 | 0.670161 | #!/usr/lib/python-exec/python2.7/python
import os
import sys
os.chdir('C:/Users/Leleo/Documents/Active Cell Real Morphology/')
from neuron import h
from neuron import gui
#%%
import numpy as np
import time
import math
import cPickle as pickle
#%%
sk = False
if sk==True:
from sklearn import decomposition
f... | 9,194 | 0 | 69 |
ec42f79f6e9bebd0d6cc7d934779f60d52434f4f | 1,263 | py | Python | sharesansar/driver.py | prajwal-stha/web-scrapers | bfcc5a065e859c69f1a9a2065c9c857b22af42c0 | [
"MIT"
] | null | null | null | sharesansar/driver.py | prajwal-stha/web-scrapers | bfcc5a065e859c69f1a9a2065c9c857b22af42c0 | [
"MIT"
] | null | null | null | sharesansar/driver.py | prajwal-stha/web-scrapers | bfcc5a065e859c69f1a9a2065c9c857b22af42c0 | [
"MIT"
] | null | null | null | from selenium import webdriver
import time
from datetime import date
from selenium.webdriver.common.keys import Keys
from scrape_table_all import scrape_table
from return_dates import return_dates
# Open the link
PATH = "/Users/prajwalshrestha/Desktop/PythonApp/thesis/web-scrapers/sharesansar/chromedriver"
browser = w... | 30.071429 | 94 | 0.760095 | from selenium import webdriver
import time
from datetime import date
from selenium.webdriver.common.keys import Keys
from scrape_table_all import scrape_table
from return_dates import return_dates
# Open the link
PATH = "/Users/prajwalshrestha/Desktop/PythonApp/thesis/web-scrapers/sharesansar/chromedriver"
browser = w... | 0 | 0 | 0 |
d08252eba99ccd39e5902637266d30dc619c8ac2 | 4,502 | py | Python | tests/view_tests/test_group_routes.py | Kalafut-organization/elephant_vending_machine_backend | f8b94adda2b2e9c824a3983749061a549ad1d0ec | [
"MIT"
] | null | null | null | tests/view_tests/test_group_routes.py | Kalafut-organization/elephant_vending_machine_backend | f8b94adda2b2e9c824a3983749061a549ad1d0ec | [
"MIT"
] | 30 | 2020-03-23T21:36:07.000Z | 2022-02-16T17:09:18.000Z | tests/view_tests/test_group_routes.py | Kalafut-organization/elephants_cse5911 | 3d2c72173070666e8b7503af6efe891e6507936d | [
"MIT"
] | 6 | 2020-04-14T00:48:58.000Z | 2022-02-23T18:39:44.000Z | import pytest
import subprocess
from io import BytesIO
import json
from werkzeug.wrappers import Response
from elephant_vending_machine import elephant_vending_machine
from subprocess import CompletedProcess, CalledProcessError
@pytest.fixture
| 45.02 | 121 | 0.740116 | import pytest
import subprocess
from io import BytesIO
import json
from werkzeug.wrappers import Response
from elephant_vending_machine import elephant_vending_machine
from subprocess import CompletedProcess, CalledProcessError
def raise_(ex):
raise ex
@pytest.fixture
def client():
elephant_vending_machine.... | 3,951 | 0 | 301 |
b8886f82232200a3b8d715152e899cad7d68af4a | 2,038 | py | Python | ots/main/urls.py | rashikbuksh/Optimal-Transportation-System | 18c6d5341c6d3ecbb1c8fcfba8e46ca2ba493882 | [
"MIT"
] | 3 | 2021-12-01T15:56:42.000Z | 2021-12-23T15:49:48.000Z | ots/main/urls.py | rashikbuksh/Optimal-Transportation-System | 18c6d5341c6d3ecbb1c8fcfba8e46ca2ba493882 | [
"MIT"
] | null | null | null | ots/main/urls.py | rashikbuksh/Optimal-Transportation-System | 18c6d5341c6d3ecbb1c8fcfba8e46ca2ba493882 | [
"MIT"
] | 2 | 2021-09-24T19:49:28.000Z | 2021-12-22T10:25:38.000Z | from django.conf.urls import url
from django.urls import path
from . import views
app_name = 'articles'
urlpatterns = [
url(r'^$', views.homepage, name="list"),
url(r'^about/$', views.about, name="about"),
url(r'^contact/$', views.contact, name="contact"),
url(r'^bolaka/$', views.bolaka, name="bolak... | 44.304348 | 102 | 0.686948 | from django.conf.urls import url
from django.urls import path
from . import views
app_name = 'articles'
urlpatterns = [
url(r'^$', views.homepage, name="list"),
url(r'^about/$', views.about, name="about"),
url(r'^contact/$', views.contact, name="contact"),
url(r'^bolaka/$', views.bolaka, name="bolak... | 0 | 0 | 0 |
b81f72c1a629494935d113e4876d1627760656f2 | 53 | py | Python | bana/OpenMayaFX/__init__.py | christophercrouzet/bana | 8087df05ba9844b4d78d3c4699948ca61cf7621d | [
"MIT"
] | 24 | 2017-01-11T15:57:46.000Z | 2020-09-23T06:18:30.000Z | bana/OpenMayaFX/__init__.py | christophercrouzet/bana | 8087df05ba9844b4d78d3c4699948ca61cf7621d | [
"MIT"
] | null | null | null | bana/OpenMayaFX/__init__.py | christophercrouzet/bana | 8087df05ba9844b4d78d3c4699948ca61cf7621d | [
"MIT"
] | 2 | 2017-03-06T23:52:08.000Z | 2020-09-23T06:19:03.000Z | """Extensions for the ``maya.OpenMayaFX`` module."""
| 26.5 | 52 | 0.679245 | """Extensions for the ``maya.OpenMayaFX`` module."""
| 0 | 0 | 0 |
8b0fe30871875ffa461d0b5d638a14149f7fd68f | 378 | py | Python | apps/metadata/users/models.py | DiegoCorrea/ouvidoMusical | e8bdb993e2c6ef2fe4a78e844bc60be2738a5ba5 | [
"MIT"
] | 1 | 2021-10-06T19:35:48.000Z | 2021-10-06T19:35:48.000Z | apps/metadata/users/models.py | DiegoCorrea/ouvido_musical-Back | e8bdb993e2c6ef2fe4a78e844bc60be2738a5ba5 | [
"MIT"
] | null | null | null | apps/metadata/users/models.py | DiegoCorrea/ouvido_musical-Back | e8bdb993e2c6ef2fe4a78e844bc60be2738a5ba5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import uuid
from django.db import models
| 17.181818 | 39 | 0.589947 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import uuid
from django.db import models
class User(models.Model):
id = models.CharField(
max_length=255,
unique=True,
db_index=True,
primary_key=True,
default=uuid.uuid1().hex
)
def as_json(self):
... | 56 | 191 | 23 |
13ba18ae2cb6655e5d831659bbe1a04a83ddcd4a | 2,312 | py | Python | running_modes/constructors/running_mode.py | lilleswing/Reinvent-1 | ac4e3e6fa6379c6f4af883478dfd1b3407933ada | [
"Apache-2.0"
] | 183 | 2020-04-04T02:01:15.000Z | 2022-03-30T21:56:56.000Z | running_modes/constructors/running_mode.py | lilleswing/Reinvent-1 | ac4e3e6fa6379c6f4af883478dfd1b3407933ada | [
"Apache-2.0"
] | 39 | 2020-04-05T15:19:56.000Z | 2022-03-09T12:58:21.000Z | running_modes/constructors/running_mode.py | lilleswing/Reinvent-1 | ac4e3e6fa6379c6f4af883478dfd1b3407933ada | [
"Apache-2.0"
] | 70 | 2020-04-05T19:25:43.000Z | 2022-02-22T12:04:39.000Z | from running_modes.configurations import GeneralConfigurationEnvelope
from running_modes.constructors.base_running_mode import BaseRunningMode
from running_modes.constructors.create_model_mode_constructor import CreateModelModeConstructor
from running_modes.constructors.curriculum_learning_mode_constructor import Curri... | 68 | 115 | 0.820502 | from running_modes.configurations import GeneralConfigurationEnvelope
from running_modes.constructors.base_running_mode import BaseRunningMode
from running_modes.constructors.create_model_mode_constructor import CreateModelModeConstructor
from running_modes.constructors.curriculum_learning_mode_constructor import Curri... | 1,360 | -3 | 49 |
1477ad88726678c8460cc5fe89ba40da27efa1cb | 626 | py | Python | ansible/collections/ansible_collections/nhsd/apigee/plugins/filter/filters.py | uk-gov-mirror/nhsdigital.api-management-utils | 4ee5489f7ce7595c371e2f4e83fc0c753308905a | [
"MIT"
] | null | null | null | ansible/collections/ansible_collections/nhsd/apigee/plugins/filter/filters.py | uk-gov-mirror/nhsdigital.api-management-utils | 4ee5489f7ce7595c371e2f4e83fc0c753308905a | [
"MIT"
] | 20 | 2020-05-27T15:00:31.000Z | 2021-09-13T11:38:58.000Z | ansible/collections/ansible_collections/nhsd/apigee/plugins/filter/filters.py | uk-gov-mirror/nhsdigital.api-management-utils | 4ee5489f7ce7595c371e2f4e83fc0c753308905a | [
"MIT"
] | 3 | 2021-04-11T07:31:36.000Z | 2022-01-24T11:23:18.000Z | from ansible_collections.nhsd.apigee.plugins.module_utils import constants
def org_from_env(environment) -> str:
"""Get nhsd apigee organization name from environment name."""
for org, envs in constants.APIGEE_ORG_TO_ENV.items():
if environment in envs:
return org
valid_envs = []
f... | 28.454545 | 95 | 0.683706 | from ansible_collections.nhsd.apigee.plugins.module_utils import constants
def org_from_env(environment) -> str:
"""Get nhsd apigee organization name from environment name."""
for org, envs in constants.APIGEE_ORG_TO_ENV.items():
if environment in envs:
return org
valid_envs = []
f... | 61 | 43 | 23 |
9821d58fd217247d13910323dd73ffca785b11ca | 11,055 | py | Python | IPython/deathrow/astyle.py | dchichkov/ipython | 8096bb8640ee7e7c5ebdf3f428fe69cd390e1cd4 | [
"BSD-3-Clause-Clear"
] | 11 | 2019-03-20T07:38:35.000Z | 2021-06-18T09:42:46.000Z | IPython/deathrow/astyle.py | dchichkov/ipython | 8096bb8640ee7e7c5ebdf3f428fe69cd390e1cd4 | [
"BSD-3-Clause-Clear"
] | 3 | 2015-04-01T13:14:57.000Z | 2015-05-26T16:01:37.000Z | IPython/deathrow/astyle.py | dchichkov/ipython | 8096bb8640ee7e7c5ebdf3f428fe69cd390e1cd4 | [
"BSD-3-Clause-Clear"
] | 5 | 2019-06-29T03:13:02.000Z | 2020-04-23T04:47:11.000Z | """
``astyle`` provides classes for adding style (foreground and background color;
bold; blink; etc.) to terminal and curses output.
"""
import sys, os
try:
import curses
except ImportError:
curses = None
COLOR_BLACK = 0
COLOR_RED = 1
COLOR_GREEN = 2
COLOR_YELLOW = 3
COLOR_BLUE = 4
COLOR_MAGENT... | 27.568579 | 92 | 0.569064 | """
``astyle`` provides classes for adding style (foreground and background color;
bold; blink; etc.) to terminal and curses output.
"""
import sys, os
try:
import curses
except ImportError:
curses = None
COLOR_BLACK = 0
COLOR_RED = 1
COLOR_GREEN = 2
COLOR_YELLOW = 3
COLOR_BLUE = 4
COLOR_MAGENT... | 2,167 | 0 | 563 |
0ba81da5ce04ec487462a1396a9e594fbd6ac8ba | 853 | py | Python | 0000_examples/gelsight/tst.py | Photon26/wrs-main_0614 | c0d0e38deac9785e9c382305f65f3ac5f221787d | [
"MIT"
] | null | null | null | 0000_examples/gelsight/tst.py | Photon26/wrs-main_0614 | c0d0e38deac9785e9c382305f65f3ac5f221787d | [
"MIT"
] | null | null | null | 0000_examples/gelsight/tst.py | Photon26/wrs-main_0614 | c0d0e38deac9785e9c382305f65f3ac5f221787d | [
"MIT"
] | null | null | null | import pickle
import robot_sim.robots.ur3_dual.ur3_dual as ur3d
import rbt_con.force_control as ur3dx
# import robot_con.ur.ur3_dual_x as ur3dx
import visualization.panda.world as wd
import modeling.geometric_model as gm
import motion.optimization_based.incremental_nik as inik
import numpy as np
import modeling.collisi... | 32.807692 | 98 | 0.805393 | import pickle
import robot_sim.robots.ur3_dual.ur3_dual as ur3d
import rbt_con.force_control as ur3dx
# import robot_con.ur.ur3_dual_x as ur3dx
import visualization.panda.world as wd
import modeling.geometric_model as gm
import motion.optimization_based.incremental_nik as inik
import numpy as np
import modeling.collisi... | 0 | 0 | 0 |
3fd17c06364dbbcfbf61a1c852f8a863c6286b83 | 4,656 | py | Python | galaxy_model/spiral_arms/three_kpc.py | K-Monty/galaxy-model | 9515d7c87c31e68338466d2044d8e9c679bf8648 | [
"MIT"
] | null | null | null | galaxy_model/spiral_arms/three_kpc.py | K-Monty/galaxy-model | 9515d7c87c31e68338466d2044d8e9c679bf8648 | [
"MIT"
] | null | null | null | galaxy_model/spiral_arms/three_kpc.py | K-Monty/galaxy-model | 9515d7c87c31e68338466d2044d8e9c679bf8648 | [
"MIT"
] | null | null | null | """
This module use SpiralArm superclass, with some modifications,
to create 3-kpc arm.
"""
from shapely.geometry.polygon import Polygon
from descartes import PolygonPatch
from .spiral_parameters import Three_Kpc
from . import spiral_property as spiral_eq
from .spiral_arm_superclass import SpiralArm
| 40.486957 | 78 | 0.597938 | """
This module use SpiralArm superclass, with some modifications,
to create 3-kpc arm.
"""
from shapely.geometry.polygon import Polygon
from descartes import PolygonPatch
from .spiral_parameters import Three_Kpc
from . import spiral_property as spiral_eq
from .spiral_arm_superclass import SpiralArm
class ThreeKpc... | 4,159 | 8 | 184 |
dbeff05f1c61b09708b8a95665c71d6764ac49fd | 2,045 | py | Python | rbi/rbi_budgets_scraper.py | cbgaindia/scrappers | f8aab1d0f0a52007d8f0ab94e7ea38047e6e46a9 | [
"MIT"
] | null | null | null | rbi/rbi_budgets_scraper.py | cbgaindia/scrappers | f8aab1d0f0a52007d8f0ab94e7ea38047e6e46a9 | [
"MIT"
] | null | null | null | rbi/rbi_budgets_scraper.py | cbgaindia/scrappers | f8aab1d0f0a52007d8f0ab94e7ea38047e6e46a9 | [
"MIT"
] | null | null | null | 'Code for scrapping RBI Data'
from datetime import date
from lxml import etree
import logging
from logging.config import fileConfig
from scrappers.scrapping_utils import ScrappingUtils
fileConfig('scrappers/logging_config.ini')
logger = logging.getLogger()
OUT_FOLDER = "rbi"
if __name__ == '__main__':
obj = RBIB... | 44.456522 | 127 | 0.630318 | 'Code for scrapping RBI Data'
from datetime import date
from lxml import etree
import logging
from logging.config import fileConfig
from scrappers.scrapping_utils import ScrappingUtils
fileConfig('scrappers/logging_config.ini')
logger = logging.getLogger()
OUT_FOLDER = "rbi"
class RBIBudgetScraper(ScrappingUtils):
... | 0 | 1,292 | 32 |
30b7600879ed7470a3a4e7671d503041ddaee708 | 404 | py | Python | 0x11-python-network_1/2-post_email.py | Nahi-Terefe/alx-higher_level_programming | c67a78a6f79e853918963971f8352979e7691541 | [
"MIT"
] | null | null | null | 0x11-python-network_1/2-post_email.py | Nahi-Terefe/alx-higher_level_programming | c67a78a6f79e853918963971f8352979e7691541 | [
"MIT"
] | null | null | null | 0x11-python-network_1/2-post_email.py | Nahi-Terefe/alx-higher_level_programming | c67a78a6f79e853918963971f8352979e7691541 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
""" post email """
import urllib.request
import urllib.parse
import sys
if __name__ == "__main__":
value = {'email': sys.argv[2]}
data = urllib.parse.urlencode(value)
data = data.encode('utf-8')
req = urllib.request.Request(sys.argv[1], data)
with urllib.request.urlopen(req) as ... | 25.25 | 54 | 0.65099 | #!/usr/bin/python3
""" post email """
import urllib.request
import urllib.parse
import sys
if __name__ == "__main__":
value = {'email': sys.argv[2]}
data = urllib.parse.urlencode(value)
data = data.encode('utf-8')
req = urllib.request.Request(sys.argv[1], data)
with urllib.request.urlopen(req) as ... | 0 | 0 | 0 |
98dd68e4820e061630336d4d9dc6896eb5df6fb1 | 2,534 | py | Python | modules/selection.py | psp-codes/reduced-decoy-ensemble | 096926d8d44a6d7bdbf9c49dd52fb83ff86e8b3f | [
"MIT"
] | 2 | 2020-04-22T04:16:03.000Z | 2020-08-19T13:50:20.000Z | modules/selection.py | psp-codes/reduced-decoy-ensemble | 096926d8d44a6d7bdbf9c49dd52fb83ff86e8b3f | [
"MIT"
] | null | null | null | modules/selection.py | psp-codes/reduced-decoy-ensemble | 096926d8d44a6d7bdbf9c49dd52fb83ff86e8b3f | [
"MIT"
] | 1 | 2020-08-19T13:50:26.000Z | 2020-08-19T13:50:26.000Z | # selection.py
# since: 10/2018
# Developed by: Shehu Lab
"""Module for selecting next generation from current generation.
This module provides methods to select next generation from
current generation.
Available Functions:
- truncation: Selects next generation via elitism truncation selection.
"""
def truncation(... | 37.820896 | 79 | 0.723757 | # selection.py
# since: 10/2018
# Developed by: Shehu Lab
"""Module for selecting next generation from current generation.
This module provides methods to select next generation from
current generation.
Available Functions:
- truncation: Selects next generation via elitism truncation selection.
"""
def truncation(... | 0 | 0 | 0 |
3f46e12fb5d861255b9732050d691bdff492592b | 129 | py | Python | Desafios/desafio030.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null | Desafios/desafio030.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null | Desafios/desafio030.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null | n = int(input('Digite um número: '))
if n % 2 == 0:
print(f'O número {n} é par.')
else:
print(f'O número {n} é ímpar.')
| 18.428571 | 36 | 0.542636 | n = int(input('Digite um número: '))
if n % 2 == 0:
print(f'O número {n} é par.')
else:
print(f'O número {n} é ímpar.')
| 0 | 0 | 0 |
be760d7ba6e881b8660d24ef1857485b859c9f5b | 1,487 | py | Python | sorted_insert_position.py | UPstartDeveloper/Problem_Solving_Practice | bd61333b3b056e82a94297e02bc05a17552e3496 | [
"MIT"
] | null | null | null | sorted_insert_position.py | UPstartDeveloper/Problem_Solving_Practice | bd61333b3b056e82a94297e02bc05a17552e3496 | [
"MIT"
] | null | null | null | sorted_insert_position.py | UPstartDeveloper/Problem_Solving_Practice | bd61333b3b056e82a94297e02bc05a17552e3496 | [
"MIT"
] | null | null | null | import math
def find_index(sorted_list, target):
"""Finds the index where the target value is expected in a sorted list."""
def binary_search(low_index, hi_index):
"""Searches for a value in a list, throwing away half each call"""
# locate the middle index
mid_index = math.ceil((low_i... | 34.581395 | 78 | 0.597848 | import math
def find_index(sorted_list, target):
"""Finds the index where the target value is expected in a sorted list."""
def binary_search(low_index, hi_index):
"""Searches for a value in a list, throwing away half each call"""
# locate the middle index
mid_index = math.ceil((low_i... | 0 | 0 | 0 |
b4bd721ab4429c8eb5ef6b2554f6ed76ab1c49a3 | 404 | py | Python | 2021/Day_8/AoCSignals.py | ArrowThunder/AoC | f4649115fc83b989745c83251a85710e76eb0368 | [
"MIT"
] | 1 | 2021-12-04T12:44:51.000Z | 2021-12-04T12:44:51.000Z | 2021/Day_8/AoCSignals.py | ArrowThunder/AoC2021 | f4649115fc83b989745c83251a85710e76eb0368 | [
"MIT"
] | null | null | null | 2021/Day_8/AoCSignals.py | ArrowThunder/AoC2021 | f4649115fc83b989745c83251a85710e76eb0368 | [
"MIT"
] | null | null | null |
with open('input.txt') as file:
total = 0
for line in file:
inputs, outputs = parse_line(line)
for code in outputs:
if len(code) == 2 or len(code) == 3 or len(code) == 4 or len(code) == 7:
total += 1
print(total) | 28.857143 | 84 | 0.549505 | def parse_line(line):
line = line.split('|')
inputs = line[0].split()
outputs = line[1].split()
return inputs, outputs
with open('input.txt') as file:
total = 0
for line in file:
inputs, outputs = parse_line(line)
for code in outputs:
if len(code) == 2 or len(code) =... | 113 | 0 | 22 |
13d4af942e0928ac2e926dad1c9830ea003345d6 | 1,885 | py | Python | 4.Graph_pangenome/1.construction_graph_genome/02_scripts/prepareAugmentFiles.py | YaoZhou89/TGG | b9b30f6a1bf365895c39cb6fa4dddf0588d3c5dd | [
"MIT"
] | 7 | 2022-01-19T14:17:23.000Z | 2022-02-08T12:17:39.000Z | 4.Graph_pangenome/1.construction_graph_genome/02_scripts/prepareAugmentFiles.py | YaoZhou89/TGG | b9b30f6a1bf365895c39cb6fa4dddf0588d3c5dd | [
"MIT"
] | null | null | null | 4.Graph_pangenome/1.construction_graph_genome/02_scripts/prepareAugmentFiles.py | YaoZhou89/TGG | b9b30f6a1bf365895c39cb6fa4dddf0588d3c5dd | [
"MIT"
] | null | null | null | import vcf
import argparse
from pyfaidx import Fasta
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
from Bio.Seq import MutableSeq
parser = argparse.ArgumentParser(description='Make fasta for each variant to align/augment.')
parser.add_argument('-v', help='the input VCF file.', required=True)
parser.add_arg... | 35.566038 | 116 | 0.669496 | import vcf
import argparse
from pyfaidx import Fasta
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
from Bio.Seq import MutableSeq
parser = argparse.ArgumentParser(description='Make fasta for each variant to align/augment.')
parser.add_argument('-v', help='the input VCF file.', required=True)
parser.add_arg... | 0 | 0 | 0 |
878b92fc40120b934c575d753a800a9538d9a14d | 22,851 | py | Python | gateware/daqnet/ethernet/rmii.py | dvdfreitag/daqnet | 6a84185d2cf35d99dd620d1e09b4df7fb0630784 | [
"MIT"
] | null | null | null | gateware/daqnet/ethernet/rmii.py | dvdfreitag/daqnet | 6a84185d2cf35d99dd620d1e09b4df7fb0630784 | [
"MIT"
] | null | null | null | gateware/daqnet/ethernet/rmii.py | dvdfreitag/daqnet | 6a84185d2cf35d99dd620d1e09b4df7fb0630784 | [
"MIT"
] | null | null | null | """
Ethernet RMII Interface
Copyright 2018-2019 Adam Greig
Released under the MIT license; see LICENSE for details.
"""
from nmigen import Elaboratable, Module, Signal, Cat
from .crc import CRC32
from .mac_address_match import MACAddressMatch
class RMIIRx(Elaboratable):
"""
RMII receive module
Receives... | 30.921516 | 78 | 0.495427 | """
Ethernet RMII Interface
Copyright 2018-2019 Adam Greig
Released under the MIT license; see LICENSE for details.
"""
from nmigen import Elaboratable, Module, Signal, Cat
from .crc import CRC32
from .mac_address_match import MACAddressMatch
class RMIIRx(Elaboratable):
"""
RMII receive module
Receives... | 19,052 | 0 | 304 |
d60d3beec1a8bf5f5b1156875db9e3b65d35b8d6 | 536 | py | Python | cogs/roll.py | morozoffnor/govnoed_grisha_rewritten | 6a34336cede03a081954479f998d5a8162e1a31d | [
"Apache-2.0"
] | null | null | null | cogs/roll.py | morozoffnor/govnoed_grisha_rewritten | 6a34336cede03a081954479f998d5a8162e1a31d | [
"Apache-2.0"
] | null | null | null | cogs/roll.py | morozoffnor/govnoed_grisha_rewritten | 6a34336cede03a081954479f998d5a8162e1a31d | [
"Apache-2.0"
] | null | null | null | import discord
from discord.ext import commands
import random
import sys
sys.path.insert(1, '../functions')
from functions.cmd_print import cmd_print
| 23.304348 | 73 | 0.697761 | import discord
from discord.ext import commands
import random
import sys
sys.path.insert(1, '../functions')
from functions.cmd_print import cmd_print
class Roll(commands.Cog):
def __init__(self, client):
self.client = client
@commands.command()
async def roll(self, ctx, *, number=100):
g... | 256 | 82 | 46 |
e3ae88a557bc39da15fb4fb98b0be693a0a7911c | 377 | py | Python | scripts/aggregation_test_script.py | michaelfaerber/Agnos | b4b6ff9cdca9090fb426f1fc2cead8e5ef4ad9bf | [
"MIT"
] | null | null | null | scripts/aggregation_test_script.py | michaelfaerber/Agnos | b4b6ff9cdca9090fb426f1fc2cead8e5ef4ad9bf | [
"MIT"
] | 3 | 2021-12-10T01:22:05.000Z | 2021-12-14T21:33:16.000Z | scripts/aggregation_test_script.py | michaelfaerber/Agnos | b4b6ff9cdca9090fb426f1fc2cead8e5ef4ad9bf | [
"MIT"
] | null | null | null | sentences = [['a', 'b', 'c'], ['a', 'd','e']]
default_val = ''
entity_embeddings_dict = {}
entity_embeddings_dict = {sentence[0]: doThis(sentence) + entity_embeddings_dict.get(sentence[0], default_val) \
for sentence in sentences }
print(entity_embeddings_dict) | 25.133333 | 112 | 0.681698 | sentences = [['a', 'b', 'c'], ['a', 'd','e']]
def doThis(sentence):
ret = None
for x in sentence:
if ret is None:
ret = x
else:
ret += x
return ret
default_val = ''
entity_embeddings_dict = {}
entity_embeddings_dict = {sentence[0]: doThis(sentence) + entity_embeddings_dict.get(sentence[0], default_val) \
... | 93 | 0 | 22 |
bd662dc3d2fdbefbc6e614c5d255badccde8b474 | 5,481 | py | Python | scripts/mod_grav/plot_limits.py | charlesblakemore/opt_lev_analysis | 704f174e9860907de349688ed82b5812bbb07c2d | [
"MIT"
] | null | null | null | scripts/mod_grav/plot_limits.py | charlesblakemore/opt_lev_analysis | 704f174e9860907de349688ed82b5812bbb07c2d | [
"MIT"
] | null | null | null | scripts/mod_grav/plot_limits.py | charlesblakemore/opt_lev_analysis | 704f174e9860907de349688ed82b5812bbb07c2d | [
"MIT"
] | 1 | 2019-11-27T19:10:25.000Z | 2019-11-27T19:10:25.000Z | import dill as pickle
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import grav_util_3 as gu
import bead_util as bu
import configuration as config
import warnings
warnings.filterwarnings("ignore")
theory_data_dir = '/data/grav_sim_data/2um_spacing_data/'
data_dirs =... | 31.142045 | 94 | 0.560482 | import dill as pickle
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import grav_util_3 as gu
import bead_util as bu
import configuration as config
import warnings
warnings.filterwarnings("ignore")
theory_data_dir = '/data/grav_sim_data/2um_spacing_data/'
data_dirs =... | 0 | 0 | 0 |
6a7f23c80626351657198207fd0b08ed99b96da9 | 1,095 | py | Python | Intro to us.py | DarshPro/Minecraft-in-python | 3a52a60e9a36107252aafc971b3a32fc84b135df | [
"MIT"
] | 1 | 2021-03-04T15:42:36.000Z | 2021-03-04T15:42:36.000Z | Intro to us.py | DarshPro/Minecraft-in-python | 3a52a60e9a36107252aafc971b3a32fc84b135df | [
"MIT"
] | null | null | null | Intro to us.py | DarshPro/Minecraft-in-python | 3a52a60e9a36107252aafc971b3a32fc84b135df | [
"MIT"
] | null | null | null | from ursina import *
# Test Cube
# Test button
# update is run every frame
# basic window
app = Ursina()
# basic cube
cube = Entity(model='quad', color=color.orange, scale = (2,5), position = (5,1))
# quad with texture
#sans_image = load_texture('Sans.png')
#sans = Entity(model = 'quad', texture = sans_image)
#... | 20.277778 | 80 | 0.660274 | from ursina import *
# Test Cube
class Test_cube(Entity):
def __init__(self):
super().__init__(
parent = scene,
model = 'cube',
texture = 'white_cube',
rotation = Vec3(45,45,45))
# Test button
class Test_button(Button):
def __init__(self,scale = 0.1):
super().__init__(
parent = scene,
model = ... | 415 | 8 | 136 |
dc32ad09fb9c4eae33279bcdb6ba48542e65e16b | 20,087 | py | Python | Python/utils/rvs/expressions.py | sgiguere/Fairness-Gaurantees-under-Demographic-Shift | d081307d34cde75ca74e07ddbe059e8273095aee | [
"MIT"
] | 1 | 2022-03-22T20:13:02.000Z | 2022-03-22T20:13:02.000Z | Python/utils/rvs/expressions.py | sgiguere/Fairness-Gaurantees-under-Demographic-Shift | d081307d34cde75ca74e07ddbe059e8273095aee | [
"MIT"
] | null | null | null | Python/utils/rvs/expressions.py | sgiguere/Fairness-Gaurantees-under-Demographic-Shift | d081307d34cde75ca74e07ddbe059e8273095aee | [
"MIT"
] | null | null | null | import numpy as np
from copy import copy, deepcopy
from utils.rvs.utils import COMPARATOR_NEGATIONS
def parse_value(value):
''' Attempts to interpret <value> as a number. '''
if isinstance(value, str):
try:
value = int(value)
except ValueError:
value = float(value)
return value
... | 29.980597 | 129 | 0.697366 | import numpy as np
from copy import copy, deepcopy
from utils.rvs.utils import COMPARATOR_NEGATIONS
def get_constant_name(counter={'c':0}):
name = 'c%d' % counter['c']
counter['c'] += 1
return name
def get_variable_name(counter={'v':0}):
name = 'v%d' % counter['v']
counter['v'] += 1
return name
def get_express... | 10,683 | 7,308 | 1,775 |
bb849e15eb80277ce9b2f2a5c8794288fc0aacec | 1,134 | py | Python | formy_site/formy_app/forms.py | cmhedrick/formy | 778d98cf8a705514e1fbd9ba8b116fb667d749be | [
"MIT"
] | null | null | null | formy_site/formy_app/forms.py | cmhedrick/formy | 778d98cf8a705514e1fbd9ba8b116fb667d749be | [
"MIT"
] | 13 | 2020-05-30T22:30:04.000Z | 2021-09-22T19:04:40.000Z | formy_site/formy_app/forms.py | cmhedrick/formy | 778d98cf8a705514e1fbd9ba8b116fb667d749be | [
"MIT"
] | null | null | null | from django import forms
| 37.8 | 80 | 0.563492 | from django import forms
class LazyQuestionForm(forms.Form):
question = forms.CharField(required=True, label="email")
class CustomForm(forms.Form):
def __init__(self, context, spreadsheet=None, *args, **kwargs):
super(CustomForm, self).__init__(*args, **kwargs)
for field in spreadsheet.spre... | 952 | 83 | 72 |
aa30c170932818c11a70361a198633d3d3e3f96b | 1,659 | py | Python | docs/conf.py | Qiskit/qiskit-aqt-provider | 276b10bde45027e0d33c80a6942887f7de0204da | [
"Apache-2.0"
] | 5 | 2019-10-21T02:57:22.000Z | 2020-04-09T00:03:42.000Z | docs/conf.py | Qiskit/qiskit-aqt-provider | 276b10bde45027e0d33c80a6942887f7de0204da | [
"Apache-2.0"
] | 8 | 2019-09-25T19:48:34.000Z | 2020-02-27T16:30:41.000Z | docs/conf.py | Qiskit/qiskit-aqt-provider | 276b10bde45027e0d33c80a6942887f7de0204da | [
"Apache-2.0"
] | 10 | 2019-09-25T18:47:44.000Z | 2020-06-05T17:45:35.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 24.397059 | 89 | 0.724533 | # This code is part of Qiskit.
#
# (C) Copyright IBM 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 0 | 0 | 0 |
4af823cb5f863d54376d0a7984be2ad7dd1c341a | 448 | py | Python | backend/api/ImageSearch/migrations/0009_imagemetadata_image_fpath.py | eth-library-lab/open-image-search | 7be76cd4b7730dd76623e15f034f1c337ab99f84 | [
"MIT"
] | 5 | 2021-06-14T10:49:52.000Z | 2022-02-16T15:56:49.000Z | backend/api/ImageSearch/migrations/0009_imagemetadata_image_fpath.py | eth-library-lab/open-image-search | 7be76cd4b7730dd76623e15f034f1c337ab99f84 | [
"MIT"
] | 11 | 2021-06-11T16:12:49.000Z | 2021-12-03T16:41:13.000Z | backend/api/ImageSearch/migrations/0009_imagemetadata_image_fpath.py | eth-library-lab/open-image-search | 7be76cd4b7730dd76623e15f034f1c337ab99f84 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2021-09-20 13:36
from django.db import migrations, models
| 23.578947 | 98 | 0.629464 | # Generated by Django 3.1.2 on 2021-09-20 13:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ImageSearch', '0008_auto_20210916_0909'),
]
operations = [
migrations.AddField(
model_name='imagemetadata',
name='im... | 0 | 334 | 23 |
244d8e1d804d4ab001743ae24cbdc613ee9ca42f | 9,566 | py | Python | test_interest.py | castacks/interestingness | b614818ab11dcc15c5fe6b55fe993882add3e8e6 | [
"BSD-3-Clause"
] | 1 | 2021-07-20T14:58:36.000Z | 2021-07-20T14:58:36.000Z | test_interest.py | castacks/interestingness | b614818ab11dcc15c5fe6b55fe993882add3e8e6 | [
"BSD-3-Clause"
] | null | null | null | test_interest.py | castacks/interestingness | b614818ab11dcc15c5fe6b55fe993882add3e8e6 | [
"BSD-3-Clause"
] | 1 | 2021-04-17T08:25:05.000Z | 2021-04-17T08:25:05.000Z | #!/usr/bin/env python3
# Copyright <2019> <Chen Wang [https://chenwang.site], Carnegie Mellon University>
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyr... | 44.493023 | 137 | 0.681685 | #!/usr/bin/env python3
# Copyright <2019> <Chen Wang [https://chenwang.site], Carnegie Mellon University>
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyr... | 3,532 | 0 | 199 |
6a1d39e1c5b43161354a2960c1c94b76e994dfc3 | 281 | py | Python | aix360/algorithms/rbm/__init__.py | Qingtian-Zou/AIX360 | cf25f58077ae002fb4542b680fd98db47758dae5 | [
"Apache-2.0"
] | 609 | 2019-08-02T17:55:18.000Z | 2020-07-11T18:11:09.000Z | aix360/algorithms/rbm/__init__.py | Qingtian-Zou/AIX360 | cf25f58077ae002fb4542b680fd98db47758dae5 | [
"Apache-2.0"
] | 47 | 2019-08-05T15:00:35.000Z | 2020-07-13T20:35:57.000Z | aix360/algorithms/rbm/__init__.py | Qingtian-Zou/AIX360 | cf25f58077ae002fb4542b680fd98db47758dae5 | [
"Apache-2.0"
] | 147 | 2019-07-12T11:30:31.000Z | 2020-07-04T19:18:49.000Z | from .features import FeatureBinarizer, FeatureBinarizerFromTrees
from .linear_regression import LinearRuleRegression
from .logistic_regression import LogisticRuleRegression
from .boolean_rule_cg import BooleanRuleCG
from .GLRM import GLRMExplainer
from .BRCG import BRCGExplainer
| 40.142857 | 65 | 0.886121 | from .features import FeatureBinarizer, FeatureBinarizerFromTrees
from .linear_regression import LinearRuleRegression
from .logistic_regression import LogisticRuleRegression
from .boolean_rule_cg import BooleanRuleCG
from .GLRM import GLRMExplainer
from .BRCG import BRCGExplainer
| 0 | 0 | 0 |
62792ed8eb6d2e940b91586e73b91e2349dbbaa8 | 2,325 | py | Python | python_actr/display/tk/core.py | osaaso1/python_actr | f7cb03bcf78310f1a6b68e72d2cef28bd8f83aab | [
"MIT"
] | 3 | 2021-12-11T02:51:51.000Z | 2022-01-23T02:33:18.000Z | python_actr/display/tk/core.py | osaaso1/python_actr | f7cb03bcf78310f1a6b68e72d2cef28bd8f83aab | [
"MIT"
] | 8 | 2022-01-17T22:51:27.000Z | 2022-03-15T00:44:20.000Z | python_actr/display/tk/core.py | osaaso1/python_actr | f7cb03bcf78310f1a6b68e72d2cef28bd8f83aab | [
"MIT"
] | 8 | 2021-12-06T20:16:35.000Z | 2022-03-14T07:21:56.000Z | import tkinter
import time
from . import render
| 27.678571 | 98 | 0.566452 | import tkinter
import time
from . import render
class TkinterDisplay:
root=None
def get_root(self):
if TkinterDisplay.root is None:
TkinterDisplay.root=tkinter.Tk()
return TkinterDisplay.root
def __init__(self,obj,width=640,height=480,full=False,title='CCMSuite3',b... | 1,928 | 283 | 23 |
9a70fd2b8f51d98c7016e821a8b8f28b97a4e005 | 108,582 | py | Python | src/eclipse_jdt/final_results/preliminary_experiment/plot_results.py | Ericsson/oss-automatic-bug-assignment | f4965babd0491118713d7b19bd7ddd30fa39254f | [
"MIT"
] | 3 | 2018-09-25T02:29:54.000Z | 2020-02-12T12:35:55.000Z | src/eclipse_jdt/final_results/preliminary_experiment/plot_results.py | dbreddyAI/oss-automatic-bug-assignment | f4965babd0491118713d7b19bd7ddd30fa39254f | [
"MIT"
] | null | null | null | src/eclipse_jdt/final_results/preliminary_experiment/plot_results.py | dbreddyAI/oss-automatic-bug-assignment | f4965babd0491118713d7b19bd7ddd30fa39254f | [
"MIT"
] | 3 | 2017-10-26T13:50:21.000Z | 2019-12-17T03:40:11.000Z | from numpy import array
import os
import inspect
import matplotlib.pyplot as plt
def plot_learning_curve(title, computed_score, train_sizes, \
train_scores_mean, train_scores_std, test_scores_mean, \
test_scores_std):
"""Generate a plot of the test and training learning curves.
Parameters
-------... | 236.562092 | 26,139 | 0.795611 | from numpy import array
import os
import inspect
import matplotlib.pyplot as plt
def plot_learning_curve(title, computed_score, train_sizes, \
train_scores_mean, train_scores_std, test_scores_mean, \
test_scores_std):
"""Generate a plot of the test and training learning curves.
Parameters
-------... | 105,829 | 0 | 23 |
cf398266bba39f44a35399478e373fb7c8895c96 | 735 | py | Python | pycopyql/cli.py | elazar/pycopyql | 4c8384b847fcd9ef2811c12375fc5e9e63094b3e | [
"MIT"
] | 1 | 2018-08-02T18:42:34.000Z | 2018-08-02T18:42:34.000Z | pycopyql/cli.py | elazar/pycopyql | 4c8384b847fcd9ef2811c12375fc5e9e63094b3e | [
"MIT"
] | null | null | null | pycopyql/cli.py | elazar/pycopyql | 4c8384b847fcd9ef2811c12375fc5e9e63094b3e | [
"MIT"
] | null | null | null | from .args import get_args
from .config import get_config, get_connection_config, get_engine, get_meta
from .query import query
from .export import get_exporter
def main():
"""
Provides a CLI entrypoint to access a database and export a subset of its
data in a specified format.
"""
args = get_args... | 31.956522 | 77 | 0.726531 | from .args import get_args
from .config import get_config, get_connection_config, get_engine, get_meta
from .query import query
from .export import get_exporter
def main():
"""
Provides a CLI entrypoint to access a database and export a subset of its
data in a specified format.
"""
args = get_args... | 0 | 0 | 0 |
aeb45e871f3a30dab24f8b244ee9dacf414f769a | 258 | py | Python | cride/circles/urls.py | daecazu/platziride | 79782770d05e71823c7eb27fec76a3870c737689 | [
"MIT"
] | null | null | null | cride/circles/urls.py | daecazu/platziride | 79782770d05e71823c7eb27fec76a3870c737689 | [
"MIT"
] | 2 | 2020-03-03T20:29:18.000Z | 2020-03-03T20:29:19.000Z | cride/circles/urls.py | daecazu/platziride | 79782770d05e71823c7eb27fec76a3870c737689 | [
"MIT"
] | null | null | null | """Circles URLs"""
# Django
from django.urls import path
# Views
from cride.circles.views import list_circles
from cride.circles.views import create_circle
urlpatterns = [
path ('circles/', list_circles),
path ('circles/create/', create_circle),
] | 19.846154 | 45 | 0.732558 | """Circles URLs"""
# Django
from django.urls import path
# Views
from cride.circles.views import list_circles
from cride.circles.views import create_circle
urlpatterns = [
path ('circles/', list_circles),
path ('circles/create/', create_circle),
] | 0 | 0 | 0 |
4cbc553ee05900bc18bb23ac67ed68a847770fd8 | 150 | py | Python | billing/__init__.py | xprilion/django-customer-billing | 82f8147d74ff62e84d9e57465b4d521434c48e49 | [
"MIT"
] | null | null | null | billing/__init__.py | xprilion/django-customer-billing | 82f8147d74ff62e84d9e57465b4d521434c48e49 | [
"MIT"
] | null | null | null | billing/__init__.py | xprilion/django-customer-billing | 82f8147d74ff62e84d9e57465b4d521434c48e49 | [
"MIT"
] | 1 | 2020-06-25T22:55:48.000Z | 2020-06-25T22:55:48.000Z | __version__ = '1.5.4'
__copyright__ = 'Copyright (c) 2018, Skioo SA'
__licence__ = 'MIT'
__URL__ = 'https://github.com/skioo/django-customer-billing'
| 30 | 60 | 0.726667 | __version__ = '1.5.4'
__copyright__ = 'Copyright (c) 2018, Skioo SA'
__licence__ = 'MIT'
__URL__ = 'https://github.com/skioo/django-customer-billing'
| 0 | 0 | 0 |
2a6cfbfefd1436bb7d9f94ae6539e54bf036f4d7 | 48,716 | py | Python | ShotgunORM/SgFields.py | jonykalavera/python-shotgunorm | 3b0a2b433030815631588ff709c8ffd3e9660476 | [
"BSD-3-Clause"
] | null | null | null | ShotgunORM/SgFields.py | jonykalavera/python-shotgunorm | 3b0a2b433030815631588ff709c8ffd3e9660476 | [
"BSD-3-Clause"
] | null | null | null | ShotgunORM/SgFields.py | jonykalavera/python-shotgunorm | 3b0a2b433030815631588ff709c8ffd3e9660476 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2013, Nathan Dunsworth - NFXPlugins
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list... | 24.956967 | 132 | 0.59812 | # Copyright (c) 2013, Nathan Dunsworth - NFXPlugins
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list... | 24,444 | 0 | 1,680 |
680326ae1a078627805cf6749a493e054c55d195 | 6,129 | py | Python | idealized_experiments/idealized_isopycnal_field.py | daanreijnders/isoneutral-dispersion | 88259ba658d15611609f52e1615aff37a54e7289 | [
"MIT"
] | 1 | 2022-03-18T08:47:41.000Z | 2022-03-18T08:47:41.000Z | idealized_experiments/idealized_isopycnal_field.py | daanreijnders/isoneutral-dispersion | 88259ba658d15611609f52e1615aff37a54e7289 | [
"MIT"
] | null | null | null | idealized_experiments/idealized_isopycnal_field.py | daanreijnders/isoneutral-dispersion | 88259ba658d15611609f52e1615aff37a54e7289 | [
"MIT"
] | 1 | 2022-03-18T08:47:42.000Z | 2022-03-18T08:47:42.000Z | import numpy as np
| 46.082707 | 169 | 0.56355 | import numpy as np
class densityField:
def __init__(self, g=10, Nsquared=1e-5, alphax=1.1e-3, alphay=1e-3, kappax=2e-5/np.pi, kappay=2e-5/np.pi, rho0=1025):
self.g = g # gravitational acceleration [ms^-2]
self.Nsquared = Nsquared # Square of buoyancy frequency [s^-2]
self.a... | 5,828 | -2 | 247 |
b5961ce174a5e07a6544a64153caec0e5af3facd | 3,763 | py | Python | src/day16.py | blu3r4y/AdventOfCode2018 | 5ef6ee251f9184e0f66657d0eb8b5b129a6f93e5 | [
"MIT"
] | 2 | 2019-01-02T22:57:13.000Z | 2019-05-07T23:13:25.000Z | src/day16.py | blu3r4y/AdventOfCode2018 | 5ef6ee251f9184e0f66657d0eb8b5b129a6f93e5 | [
"MIT"
] | null | null | null | src/day16.py | blu3r4y/AdventOfCode2018 | 5ef6ee251f9184e0f66657d0eb8b5b129a6f93e5 | [
"MIT"
] | 1 | 2021-12-06T12:38:26.000Z | 2021-12-06T12:38:26.000Z | # Advent of Code 2018, Day 16
# (c) blu3r4y
from collections import namedtuple
from parse import parse
OPERATIONS = ['addr', 'addi', 'mulr', 'muli', 'banr', 'bani', 'borr', 'bori',
'setr', 'seti', 'gtir', 'gtri', 'gtrr', 'eqir', 'eqri', 'eqrr']
Observation = namedtuple("Observation", ["instruction", "... | 28.08209 | 79 | 0.549296 | # Advent of Code 2018, Day 16
# (c) blu3r4y
from collections import namedtuple
from parse import parse
OPERATIONS = ['addr', 'addi', 'mulr', 'muli', 'banr', 'bani', 'borr', 'bori',
'setr', 'seti', 'gtir', 'gtri', 'gtrr', 'eqir', 'eqri', 'eqrr']
Observation = namedtuple("Observation", ["instruction", "... | 3,161 | 0 | 92 |
d31ca228a7c49cb870496d2465087e6fff372030 | 2,685 | py | Python | programming_languages_classification/test.py | contimatteo/Programming-Languages-Classification | 34ccf1bd403f55226ed5131d57265df45d314b6f | [
"MIT"
] | 1 | 2022-03-18T12:54:52.000Z | 2022-03-18T12:54:52.000Z | programming_languages_classification/test.py | contimatteo/Programming-Languages-Classification | 34ccf1bd403f55226ed5131d57265df45d314b6f | [
"MIT"
] | 5 | 2021-11-10T19:58:25.000Z | 2022-03-19T18:17:41.000Z | programming_languages_classification/test.py | contimatteo/programming-language-classifier | 60847ab91cff4dc20ded1a024d272c75956194a0 | [
"MIT"
] | null | null | null | from keras.models import load_model
import keras.preprocessing.text as kpt
from keras.preprocessing.sequence import pad_sequences
import sys
import os
import json
import numpy as np
from utils import ConfigurationManager, FileManager
##
global dictionary
global model
dictionaryUrl = os.path.join(FileManager.getRoot... | 29.833333 | 106 | 0.633147 | from keras.models import load_model
import keras.preprocessing.text as kpt
from keras.preprocessing.sequence import pad_sequences
import sys
import os
import json
import numpy as np
from utils import ConfigurationManager, FileManager
##
global dictionary
global model
dictionaryUrl = os.path.join(FileManager.getRoot... | 2,077 | 0 | 46 |
2e93f597b4ad68b69e4599e8fc30321be3c05d7a | 31,071 | py | Python | src/Animate/Scripts.py | henkjannl/py-animate | dbc93c8a264ef008954901ea76286331ad1737ee | [
"MIT"
] | null | null | null | src/Animate/Scripts.py | henkjannl/py-animate | dbc93c8a264ef008954901ea76286331ad1737ee | [
"MIT"
] | null | null | null | src/Animate/Scripts.py | henkjannl/py-animate | dbc93c8a264ef008954901ea76286331ad1737ee | [
"MIT"
] | null | null | null | import pandas as pd
from PIL import Image # www.pythonware.com/library/pil/handbook
from PIL import ImageFont, ImageDraw, ImageEnhance
from PIL import ImageFilter
import os
#import time
import logging
from Animate.Items import *
from Animate.Properties import *
from Animate.Constants import *
LOG_FILENAME = '__log... | 41.931174 | 186 | 0.491101 | import pandas as pd
from PIL import Image # www.pythonware.com/library/pil/handbook
from PIL import ImageFont, ImageDraw, ImageEnhance
from PIL import ImageFilter
import os
#import time
import logging
from Animate.Items import *
from Animate.Properties import *
from Animate.Constants import *
LOG_FILENAME = '__log... | 30,427 | -6 | 254 |
da91ac6418297ed4e02987a76d7e459a1c8dc944 | 2,510 | py | Python | DatasetHandler/FileHelperFunc.py | previtus/MGR-Project-Code | 1126215059eb3f731dcf78ec24d9a480e73abce6 | [
"MIT"
] | null | null | null | DatasetHandler/FileHelperFunc.py | previtus/MGR-Project-Code | 1126215059eb3f731dcf78ec24d9a480e73abce6 | [
"MIT"
] | null | null | null | DatasetHandler/FileHelperFunc.py | previtus/MGR-Project-Code | 1126215059eb3f731dcf78ec24d9a480e73abce6 | [
"MIT"
] | null | null | null | import os
def get_project_folder():
'''
Gives us the path to MGR-Project-Code from a list of allowed folders.
:return:
'''
PATH_ALTERNATIVES = ['/home/ekmek/Project II/MGR-Project-Code/', '/storage/brno2/home/previtus/MGR-Project-Code/', '/home/ekmek/Vitek/MGR-Project-Code/']
ABS_PATH_TO_PRJ = ... | 30.240964 | 157 | 0.661753 | import os
def get_project_folder():
'''
Gives us the path to MGR-Project-Code from a list of allowed folders.
:return:
'''
PATH_ALTERNATIVES = ['/home/ekmek/Project II/MGR-Project-Code/', '/storage/brno2/home/previtus/MGR-Project-Code/', '/home/ekmek/Vitek/MGR-Project-Code/']
ABS_PATH_TO_PRJ = ... | 0 | 0 | 0 |
ca53a879e6d706ed4d4875884504a13f91f27b99 | 1,575 | py | Python | trajectory_executor/Parameters.py | WPI-MMR/trajectory_generator | 61a3c61d37e674cfa81ec4e67fd56bb825e56ab8 | [
"MIT"
] | null | null | null | trajectory_executor/Parameters.py | WPI-MMR/trajectory_generator | 61a3c61d37e674cfa81ec4e67fd56bb825e56ab8 | [
"MIT"
] | null | null | null | trajectory_executor/Parameters.py | WPI-MMR/trajectory_generator | 61a3c61d37e674cfa81ec4e67fd56bb825e56ab8 | [
"MIT"
] | null | null | null | # from sympy import *
# Robot Chassis Parameters
l = 370 #hip to hip length of the robot
b = 210.1 #hip to hip breadth of the robot
h = 44 #height of the robot
## Leg Type 1: Rear
'''
Variable name convention as follows:
The first number represents the length and the second number repre... | 28.125 | 116 | 0.690794 | # from sympy import *
# Robot Chassis Parameters
l = 370 #hip to hip length of the robot
b = 210.1 #hip to hip breadth of the robot
h = 44 #height of the robot
## Leg Type 1: Rear
'''
Variable name convention as follows:
The first number represents the length and the second number repre... | 0 | 0 | 0 |
26e42554fb75ae570d805b94fb43bd82a761275e | 1,622 | py | Python | vedicpy/squareroot.py | utkarsh0702/vedicpy | 56a3228a8caea0976570c119e02516600f26e88b | [
"BSD-3-Clause"
] | 1 | 2021-02-14T16:22:17.000Z | 2021-02-14T16:22:17.000Z | vedicpy/squareroot.py | utkarsh0702/vedicpy | 56a3228a8caea0976570c119e02516600f26e88b | [
"BSD-3-Clause"
] | null | null | null | vedicpy/squareroot.py | utkarsh0702/vedicpy | 56a3228a8caea0976570c119e02516600f26e88b | [
"BSD-3-Clause"
] | null | null | null | from math import floor, log10
| 26.16129 | 61 | 0.380395 | from math import floor, log10
def squareroot_check(a: int) -> bool:
a= int(a) ; b=a%10 ; x=a; a//=10
if(b==2 or b==3 or b==7 or b==8):
return False
else:
n= floor(log10(abs(x))) + 1
while(n!=1):
sum=0
while(x!=0):
sum+=(x%10) ; x//=10
... | 1,546 | 0 | 46 |
41e9c7b6bd0603988abf0a0263e4f16fab3ff22b | 716 | py | Python | plbmng/lib/ssh_map.py | xxMAKMAKxx/plbmng | 64bbe70424801092c7429d5e73ecaf5466b6c437 | [
"MIT"
] | null | null | null | plbmng/lib/ssh_map.py | xxMAKMAKxx/plbmng | 64bbe70424801092c7429d5e73ecaf5466b6c437 | [
"MIT"
] | null | null | null | plbmng/lib/ssh_map.py | xxMAKMAKxx/plbmng | 64bbe70424801092c7429d5e73ecaf5466b6c437 | [
"MIT"
] | null | null | null | import folium
import csv
from folium.plugins import MarkerCluster
def main():
"""
Creates a map of nodes with available SSH connection.\n
:return: map_ssh.html file
"""
map_ssh = folium.Map(location=[45.523, -122.675],
zoom_start=2)
with open('lib/base_data.txt') as t... | 23.866667 | 65 | 0.523743 | import folium
import csv
from folium.plugins import MarkerCluster
def main():
"""
Creates a map of nodes with available SSH connection.\n
:return: map_ssh.html file
"""
map_ssh = folium.Map(location=[45.523, -122.675],
zoom_start=2)
with open('lib/base_data.txt') as t... | 0 | 0 | 0 |
2bb73ddf9d4ab92638002a38558adbe2794f6be1 | 146 | py | Python | day08/part2.py | mtn/advent15 | b23bcf5761363596336d5361218c52db0b078793 | [
"MIT"
] | null | null | null | day08/part2.py | mtn/advent15 | b23bcf5761363596336d5361218c52db0b078793 | [
"MIT"
] | null | null | null | day08/part2.py | mtn/advent15 | b23bcf5761363596336d5361218c52db0b078793 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
ans = 0
with open("input.txt") as f:
for line in f:
ans += 2 + line.count("\\") + line.count("\"")
print(ans)
| 18.25 | 54 | 0.541096 | #!/usr/bin/env python3
ans = 0
with open("input.txt") as f:
for line in f:
ans += 2 + line.count("\\") + line.count("\"")
print(ans)
| 0 | 0 | 0 |
b39083aacc0b8fea019f95a80c7e48ff65c4cb4a | 818 | py | Python | opttrack/lib/ui/obs_menu.py | aisthesis/opttrack | 17e0c7740ea43e0f07166e30d689b106d0319d0b | [
"MIT"
] | null | null | null | opttrack/lib/ui/obs_menu.py | aisthesis/opttrack | 17e0c7740ea43e0f07166e30d689b106d0319d0b | [
"MIT"
] | 2 | 2016-03-30T02:50:31.000Z | 2016-03-30T16:18:23.000Z | opttrack/lib/ui/obs_menu.py | aisthesis/opttrack | 17e0c7740ea43e0f07166e30d689b106d0319d0b | [
"MIT"
] | null | null | null | """
Copyright (c) 2015 Marshall Farrier
license http://opensource.org/licenses/MIT
lib/ui/edit_menu.py
Content for interactive editor
"""
from functools import partial
from .obs_handlers import ObsHandlers
from .menu import Menu
from .spread_selector import SpreadSelector
| 24.787879 | 67 | 0.665037 | """
Copyright (c) 2015 Marshall Farrier
license http://opensource.org/licenses/MIT
lib/ui/edit_menu.py
Content for interactive editor
"""
from functools import partial
from .obs_handlers import ObsHandlers
from .menu import Menu
from .spread_selector import SpreadSelector
class ObsMenu(Menu):
def __init__(sel... | 402 | 116 | 23 |
83170b0ec3acb314141ec083da4d17c36c553dbf | 1,571 | py | Python | tests/core/test_normal_noise_map.py | freiberg-roman/uwb-proto | effda911b5571d2abd29ff0e8a696e279d482e8d | [
"MIT"
] | null | null | null | tests/core/test_normal_noise_map.py | freiberg-roman/uwb-proto | effda911b5571d2abd29ff0e8a696e279d482e8d | [
"MIT"
] | null | null | null | tests/core/test_normal_noise_map.py | freiberg-roman/uwb-proto | effda911b5571d2abd29ff0e8a696e279d482e8d | [
"MIT"
] | null | null | null | import numpy as np
from uwb.generator import BlobGenerator
from uwb.map import NoiseMapNormal
| 26.183333 | 84 | 0.591343 | import numpy as np
from uwb.generator import BlobGenerator
from uwb.map import NoiseMapNormal
def test_generate_normal_noise_map():
bg = BlobGenerator(
grid_dims=[2, 4, 6],
step_size=10,
measurements_per_location=100,
modal_range=(1, 5),
deviation=1.0,
)
noise_map ... | 1,404 | 0 | 69 |
5212b63a9a84429c97380c8799a972cadb31b59b | 406 | py | Python | classifiers/decision_tree.py | Omar-Radwan/Data_Classification | 972d9aa0563435572eedc39f539e8a7773befcc7 | [
"MIT"
] | 1 | 2022-02-15T21:24:10.000Z | 2022-02-15T21:24:10.000Z | classifiers/decision_tree.py | Omar-Radwan/Data_Classification | 972d9aa0563435572eedc39f539e8a7773befcc7 | [
"MIT"
] | null | null | null | classifiers/decision_tree.py | Omar-Radwan/Data_Classification | 972d9aa0563435572eedc39f539e8a7773befcc7 | [
"MIT"
] | null | null | null | import sklearn
from classifiers.classification_model import ClassificationModel
| 36.909091 | 87 | 0.770936 | import sklearn
from classifiers.classification_model import ClassificationModel
class DecisionTree(ClassificationModel):
def __init__(self, training_samples, test_samples, training_labels, test_labels):
super().__init__(training_samples, test_samples, training_labels, test_labels)
self.in... | 249 | 19 | 52 |
c2dee6d1aa40a7f38a96156bda231d31db4d330b | 1,307 | py | Python | nsr/utils/majority_vote.py | GaoSida/Neural-SampleRank | 8b4a7a40cc34bff608f19d3f7eb64bda76669c5b | [
"MIT"
] | 2 | 2020-11-17T18:41:05.000Z | 2021-08-12T14:40:56.000Z | nsr/utils/majority_vote.py | GaoSida/Neural-SampleRank | 8b4a7a40cc34bff608f19d3f7eb64bda76669c5b | [
"MIT"
] | null | null | null | nsr/utils/majority_vote.py | GaoSida/Neural-SampleRank | 8b4a7a40cc34bff608f19d3f7eb64bda76669c5b | [
"MIT"
] | null | null | null | """A helper for running inference callable multiple times, and ensemble the
predictions with a simple majority vote.
"""
from typing import Callable
from collections import Counter
def majority_vote_ensemble(eval_func: Callable, num_runs: int):
"""
Args:
eval_func: call without argument to get a pred... | 33.512821 | 76 | 0.638868 | """A helper for running inference callable multiple times, and ensemble the
predictions with a simple majority vote.
"""
from typing import Callable
from collections import Counter
def majority_vote_ensemble(eval_func: Callable, num_runs: int):
"""
Args:
eval_func: call without argument to get a pred... | 225 | 0 | 31 |
5ded5a7640fb3ff4dbd2ec961b2d0176566b38b3 | 12,872 | py | Python | postgres-appliance/major_upgrade/pg_upgrade.py | OlleLarsson/spilo | a347a9453a2deef33d968261096c1a328d9a2d87 | [
"Apache-2.0"
] | null | null | null | postgres-appliance/major_upgrade/pg_upgrade.py | OlleLarsson/spilo | a347a9453a2deef33d968261096c1a328d9a2d87 | [
"Apache-2.0"
] | null | null | null | postgres-appliance/major_upgrade/pg_upgrade.py | OlleLarsson/spilo | a347a9453a2deef33d968261096c1a328d9a2d87 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import shutil
import subprocess
import psutil
from patroni.postgresql import Postgresql
logger = logging.getLogger(__name__)
| 43.931741 | 118 | 0.64582 | import logging
import os
import shutil
import subprocess
import psutil
from patroni.postgresql import Postgresql
logger = logging.getLogger(__name__)
class _PostgresqlUpgrade(Postgresql):
_INCOMPATIBLE_EXTENSIONS = ('amcheck_next',)
def adjust_shared_preload_libraries(self, version):
from spilo_co... | 12,034 | 638 | 46 |
efecd1c0949806cb18bbe2451a6a6c7bb21dc209 | 46 | py | Python | code/lib/tosca/__init__.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 8 | 2017-03-13T16:34:28.000Z | 2021-11-16T11:35:56.000Z | code/lib/tosca/__init__.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | null | null | null | code/lib/tosca/__init__.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 3 | 2017-03-28T09:26:40.000Z | 2020-12-08T14:16:12.000Z | __all__ = ["tosca_parser", "tosca_rdcl_graph"] | 46 | 46 | 0.76087 | __all__ = ["tosca_parser", "tosca_rdcl_graph"] | 0 | 0 | 0 |