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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f50846638b0fd8d698d6237e05231b9a37225f4b | 22,357 | py | Python | device.py | zhangyintai/Experiment_Manager | 800f95068a12b64d4a7e524fe406d5ef3b47f521 | [
"MIT"
] | null | null | null | device.py | zhangyintai/Experiment_Manager | 800f95068a12b64d4a7e524fe406d5ef3b47f521 | [
"MIT"
] | null | null | null | device.py | zhangyintai/Experiment_Manager | 800f95068a12b64d4a7e524fe406d5ef3b47f521 | [
"MIT"
] | null | null | null | # coding=UTF-8
"""
--------------------------------------------------------
Copyright (c) ****-2018 ESR, Inc. All rights reserved.
--------------------------------------------------------
Author: Mingdong Zhu
Date: 2019/03/07
Design Name: The user interface of the DDS software
Purpose: Design an UI and test f... | 40.428571 | 902 | 0.538534 | # coding=UTF-8
"""
--------------------------------------------------------
Copyright (c) ****-2018 ESR, Inc. All rights reserved.
--------------------------------------------------------
Author: Mingdong Zhu
Date: 2019/03/07
Design Name: The user interface of the DDS software
Purpose: Design an UI and test f... | 505 | 5,387 | 50 |
5302b93b77e85403459c6d3e9e7609e976336e0b | 403 | py | Python | listings/urls.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 13 | 2015-11-29T12:19:12.000Z | 2021-02-21T15:42:11.000Z | listings/urls.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 23 | 2015-04-29T19:43:34.000Z | 2021-02-10T05:50:17.000Z | listings/urls.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 11 | 2015-09-20T18:59:00.000Z | 2020-02-07T08:47:34.000Z | from django.conf.urls import url
from .views import listings_listing_view, listings_api_view
urlpatterns = [
url(
r'^listings/(?P<listing_hostname>[a-z0-9-\.]+)/?$',
listings_listing_view,
name='listings_listing_view',
),
url(
r'^api/v1/listings/(?P<listing_hostname>[a-z0... | 21.210526 | 66 | 0.610422 | from django.conf.urls import url
from .views import listings_listing_view, listings_api_view
urlpatterns = [
url(
r'^listings/(?P<listing_hostname>[a-z0-9-\.]+)/?$',
listings_listing_view,
name='listings_listing_view',
),
url(
r'^api/v1/listings/(?P<listing_hostname>[a-z0... | 0 | 0 | 0 |
10559bf17d1f5c778b0ad69a4bbaca775ed978fb | 641 | py | Python | code/begin/Session.py | redxyb/Flask | 4ee226501f16eb0fa5cb585dc6bf780005fa8a28 | [
"MIT"
] | null | null | null | code/begin/Session.py | redxyb/Flask | 4ee226501f16eb0fa5cb585dc6bf780005fa8a28 | [
"MIT"
] | null | null | null | code/begin/Session.py | redxyb/Flask | 4ee226501f16eb0fa5cb585dc6bf780005fa8a28 | [
"MIT"
] | null | null | null | '''
Author: xyb
Date: 2020-08-10 18:35:32
LastEditTime: 2020-08-10 18:52:50
'''
from flask import Flask, make_response, request
app = Flask(__name__)
app.secret_key = 'dfslkfjdlfsdkjfnskj' #直接设置
#间接设置
# class DefaultConfig(object):
# SECRET_KEY = 'dfslkfjdlfsdkjfnskj'
# app.config.from_object(DefaultConfig)
@ap... | 21.366667 | 53 | 0.700468 | '''
Author: xyb
Date: 2020-08-10 18:35:32
LastEditTime: 2020-08-10 18:52:50
'''
from flask import Flask, make_response, request
app = Flask(__name__)
app.secret_key = 'dfslkfjdlfsdkjfnskj' #直接设置
#间接设置
# class DefaultConfig(object):
# SECRET_KEY = 'dfslkfjdlfsdkjfnskj'
# app.config.from_object(DefaultConfig)
@ap... | 150 | 0 | 44 |
a20f29e99f0bfe18d2e7d7416b1c44845378a3e2 | 10,451 | py | Python | audio_pipeline/audio_processing/subtitle_utils.py | AlexWimpory/video-caption | 4252835bc69ecb54e6d0e0af49f2e77c76fd78ad | [
"MIT"
] | null | null | null | audio_pipeline/audio_processing/subtitle_utils.py | AlexWimpory/video-caption | 4252835bc69ecb54e6d0e0af49f2e77c76fd78ad | [
"MIT"
] | null | null | null | audio_pipeline/audio_processing/subtitle_utils.py | AlexWimpory/video-caption | 4252835bc69ecb54e6d0e0af49f2e77c76fd78ad | [
"MIT"
] | 1 | 2020-12-02T17:21:12.000Z | 2020-12-02T17:21:12.000Z | import tempfile
from pysubs2 import SSAFile, SSAStyle, Color, SSAEvent, make_time
from audio_pipeline import logging_config
from audio_pipeline.audio_processing.ffmpeg_processor import run_ffmpeg
logger = logging_config.get_logger(__name__)
def _adjust_for_clashing_subs(combined_subs, working_sub, exclude):
"""
... | 36.799296 | 111 | 0.62683 | import tempfile
from pysubs2 import SSAFile, SSAStyle, Color, SSAEvent, make_time
from audio_pipeline import logging_config
from audio_pipeline.audio_processing.ffmpeg_processor import run_ffmpeg
logger = logging_config.get_logger(__name__)
def _adjust_for_clashing_subs(combined_subs, working_sub, exclude):
"""
... | 0 | 0 | 0 |
365aacb7e69ac288818c4cf46c2f47b217dbd9af | 962 | py | Python | drug/migrations/0004_auto_20190604_2300.py | MubongwoNdasi/pms | 0cc5dcbc25b31e13631672e1a03c88e2ad46bc92 | [
"MIT"
] | null | null | null | drug/migrations/0004_auto_20190604_2300.py | MubongwoNdasi/pms | 0cc5dcbc25b31e13631672e1a03c88e2ad46bc92 | [
"MIT"
] | 8 | 2021-03-18T22:27:44.000Z | 2022-02-10T09:18:50.000Z | drug/migrations/0004_auto_20190604_2300.py | MubongwoNdasi/pms | 0cc5dcbc25b31e13631672e1a03c88e2ad46bc92 | [
"MIT"
] | 1 | 2021-09-20T06:37:41.000Z | 2021-09-20T06:37:41.000Z | # Generated by Django 2.2 on 2019-06-04 23:00
from django.db import migrations, models
| 29.151515 | 110 | 0.589397 | # Generated by Django 2.2 on 2019-06-04 23:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('drug', '0003_auto_20190604_2233'),
]
operations = [
migrations.RemoveField(
model_name='drugs',
name='name',
)... | 0 | 850 | 23 |
c0e7ce2e4c3ab7a07d885ea07518fe7f67108216 | 3,006 | py | Python | butunleme/160401007/butunleme.py | gizemozgun/kriptografi | fa395ea7592f2e6cf0cbb44a20f876d30a1d502a | [
"Unlicense"
] | 8 | 2020-04-15T12:06:42.000Z | 2022-01-21T10:35:51.000Z | butunleme/160401007/butunleme.py | gizemozgun/kriptografi | fa395ea7592f2e6cf0cbb44a20f876d30a1d502a | [
"Unlicense"
] | 3 | 2020-05-13T20:41:27.000Z | 2020-06-11T00:45:27.000Z | butunleme/160401007/butunleme.py | gizemozgun/kriptografi | fa395ea7592f2e6cf0cbb44a20f876d30a1d502a | [
"Unlicense"
] | 54 | 2020-04-23T14:58:50.000Z | 2020-06-26T06:00:32.000Z | #Gizem Özgün / 160401007
# -*- coding: utf-8 -*-
import sys
if __name__ == "__main__":
menu()
| 28.093458 | 135 | 0.558217 | #Gizem Özgün / 160401007
# -*- coding: utf-8 -*-
import sys
def str_to_binary(string): #string'i binary'e ceviren fonksiyon
binary = ""
for i in string:
binary += "".join(f"{ord(i):08b}")
return binary
def binary_to_dec(binary): #binary'i decimale ceviren fonksiyon
binary=str(b... | 2,742 | 0 | 161 |
37639967ffaa3c0210549f24f634d2e636218c9a | 2,561 | py | Python | BayOptPy/freesurfer_preprocess/uniform_distributed_dataset.py | Mind-the-Pineapple/tpot-age | 2969bfa6dc5c652d5b4f00f59e9b0b23869f6bef | [
"MIT"
] | 3 | 2020-04-09T16:53:54.000Z | 2020-04-21T16:49:52.000Z | BayOptPy/freesurfer_preprocess/uniform_distributed_dataset.py | Mind-the-Pineapple/tpot-age | 2969bfa6dc5c652d5b4f00f59e9b0b23869f6bef | [
"MIT"
] | null | null | null | BayOptPy/freesurfer_preprocess/uniform_distributed_dataset.py | Mind-the-Pineapple/tpot-age | 2969bfa6dc5c652d5b4f00f59e9b0b23869f6bef | [
"MIT"
] | null | null | null | # This script assumes taht the freesurfer csv for the BANC data has already been generated
import os
import pandas as pd
import numpy as np
import pdb
import seaborn as sns
sns.set()
import matplotlib.pyplot as plt
from BayOptPy.helperfunctions import get_paths, get_data, drop_missing_features
def str_to_bool(s):
... | 36.070423 | 90 | 0.629832 | # This script assumes taht the freesurfer csv for the BANC data has already been generated
import os
import pandas as pd
import numpy as np
import pdb
import seaborn as sns
sns.set()
import matplotlib.pyplot as plt
from BayOptPy.helperfunctions import get_paths, get_data, drop_missing_features
def str_to_bool(s):
... | 0 | 0 | 0 |
8bbf2f6e7ce233dc89fddc7e425bf35285b8c1c1 | 584 | py | Python | leaderboard/migrations/0007_submission_is_public.py | AppraiseDev/OCELoT | 9237c1eb1d9feebb1a51966b8c1ef82b381b4b1e | [
"BSD-3-Clause"
] | 6 | 2020-06-25T05:00:45.000Z | 2022-03-30T09:45:11.000Z | leaderboard/migrations/0007_submission_is_public.py | AppraiseDev/OCELoT | 9237c1eb1d9feebb1a51966b8c1ef82b381b4b1e | [
"BSD-3-Clause"
] | 42 | 2020-06-24T08:48:48.000Z | 2021-09-08T14:36:11.000Z | leaderboard/migrations/0007_submission_is_public.py | AppraiseDev/OCELoT | 9237c1eb1d9feebb1a51966b8c1ef82b381b4b1e | [
"BSD-3-Clause"
] | 3 | 2020-05-25T20:34:08.000Z | 2021-03-21T05:10:11.000Z | # pylint: disable=invalid-name,missing-docstring
# Generated by Django 2.2.1 on 2020-06-19 05:29
from django.db import migrations
from django.db import models
| 26.545455 | 64 | 0.580479 | # pylint: disable=invalid-name,missing-docstring
# Generated by Django 2.2.1 on 2020-06-19 05:29
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [('leaderboard', '0006_auto_20200618_2204')]
operations = [
migrations.AddFi... | 0 | 394 | 25 |
38c3d799d246d5ac683945ee7d8f3db96348c890 | 1,186 | py | Python | bitmovin/resources/models/manifests/dash/dash_mp4_representation.py | camberbridge/bitmovin-python | 3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95 | [
"Unlicense"
] | 44 | 2016-12-12T17:37:23.000Z | 2021-03-03T09:48:48.000Z | bitmovin/resources/models/manifests/dash/dash_mp4_representation.py | camberbridge/bitmovin-python | 3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95 | [
"Unlicense"
] | 38 | 2017-01-09T14:45:45.000Z | 2022-02-27T18:04:33.000Z | bitmovin/resources/models/manifests/dash/dash_mp4_representation.py | camberbridge/bitmovin-python | 3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95 | [
"Unlicense"
] | 27 | 2017-02-02T22:49:31.000Z | 2019-11-21T07:04:57.000Z | from .abstract_dash_mp4_representation import AbstractDashMP4Representation
| 45.615385 | 104 | 0.62226 | from .abstract_dash_mp4_representation import AbstractDashMP4Representation
class DashMP4Representation(AbstractDashMP4Representation):
def __init__(self, encoding_id, muxing_id, file_path, id_=None, custom_data=None):
super().__init__(id_=id_, custom_data=custom_data, encoding_id=encoding_id, muxing_id=... | 977 | 109 | 23 |
aefd262b130e708bff022101d0ddcb9ba1871734 | 2,110 | py | Python | models.py | fanieblesat/proyectoMintic | 18e25caf4a077a67c0e83d82757dfdc167ef61f6 | [
"MIT"
] | null | null | null | models.py | fanieblesat/proyectoMintic | 18e25caf4a077a67c0e83d82757dfdc167ef61f6 | [
"MIT"
] | null | null | null | models.py | fanieblesat/proyectoMintic | 18e25caf4a077a67c0e83d82757dfdc167ef61f6 | [
"MIT"
] | null | null | null | from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from __init__ import db
class User(db.Model):
"""Data model for user accounts."""
_... | 26.375 | 94 | 0.592417 | from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from __init__ import db
class User(db.Model):
"""Data model for user accounts."""
_... | 584 | 0 | 112 |
0b45197a2c899c4d28fd133ec00a125cd4845c21 | 15,393 | py | Python | models_all_solvable2/syn05m02h.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | 7 | 2019-05-08T19:14:34.000Z | 2021-12-24T00:00:40.000Z | models_all_solvable2/syn05m02h.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | null | null | null | models_all_solvable2/syn05m02h.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | 2 | 2020-05-21T22:15:51.000Z | 2020-06-02T23:02:08.000Z | # MINLP written by GAMS Convert at 05/15/20 00:51:23
#
# Equation counts
# Total E G L N X C B
# 152 71 6 75 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | 35.386207 | 112 | 0.626324 | # MINLP written by GAMS Convert at 05/15/20 00:51:23
#
# Equation counts
# Total E G L N X C B
# 152 71 6 75 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | 0 | 0 | 0 |
ada96d601a49d1e85041c045e4a7fca6ac4db9a3 | 2,689 | py | Python | inverse_covariance/tests/adaptive_graph_lasso_test.py | aldanor/skggm | d2e29d692d1654285653ab07fd24534628fcb076 | [
"MIT"
] | 199 | 2016-10-21T14:36:02.000Z | 2022-03-29T20:59:08.000Z | inverse_covariance/tests/adaptive_graph_lasso_test.py | aldanor/skggm | d2e29d692d1654285653ab07fd24534628fcb076 | [
"MIT"
] | 66 | 2016-10-17T01:47:28.000Z | 2022-03-06T11:02:56.000Z | inverse_covariance/tests/adaptive_graph_lasso_test.py | aldanor/skggm | d2e29d692d1654285653ab07fd24534628fcb076 | [
"MIT"
] | 36 | 2016-10-15T23:42:10.000Z | 2022-03-06T00:03:13.000Z | import numpy as np
import pytest
from inverse_covariance import (
QuicGraphicalLassoEBIC,
AdaptiveGraphicalLasso,
QuicGraphicalLassoCV,
)
from inverse_covariance.profiling import ClusterGraph
| 32.39759 | 88 | 0.479732 | import numpy as np
import pytest
from inverse_covariance import (
QuicGraphicalLassoEBIC,
AdaptiveGraphicalLasso,
QuicGraphicalLassoCV,
)
from inverse_covariance.profiling import ClusterGraph
class TestAdaptiveGraphicalLasso(object):
@pytest.mark.parametrize(
"params_in",
[
... | 0 | 2,460 | 23 |
f2d7eb3ab3f908b1ca35e025e58b489235659469 | 64 | py | Python | custom/opm/opm_tasks/__init__.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T23:26:39.000Z | 2015-02-10T23:26:39.000Z | custom/opm/opm_tasks/__init__.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | custom/opm/opm_tasks/__init__.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | DEVELOPERS_EMAILS = ['esoergel@dimagi.com', 'sreddy@dimagi.com'] | 64 | 64 | 0.765625 | DEVELOPERS_EMAILS = ['esoergel@dimagi.com', 'sreddy@dimagi.com'] | 0 | 0 | 0 |
606cc358f9511c3f340751656877c62607d0a40f | 6,894 | py | Python | runner_with_threshold.py | dmitryrubtsov/Predictions-of-calls-in-Moscow-Megafon | 260bb49e859694d6a7c0dfb8cb13cd39d05ed597 | [
"MIT"
] | null | null | null | runner_with_threshold.py | dmitryrubtsov/Predictions-of-calls-in-Moscow-Megafon | 260bb49e859694d6a7c0dfb8cb13cd39d05ed597 | [
"MIT"
] | null | null | null | runner_with_threshold.py | dmitryrubtsov/Predictions-of-calls-in-Moscow-Megafon | 260bb49e859694d6a7c0dfb8cb13cd39d05ed597 | [
"MIT"
] | null | null | null | import os
import pickle
import time
import pandas as pd
from sklearn.base import BaseEstimator, TransformerMixin
TARGET = 'target'
THRESHOLD = 0.7
df = pd.read_csv('data_test.csv', index_col=[1]) \
.drop('Unnamed: 0', axis=1)
with open('model.pkl', 'rb') as f:
model = pickle.load(f)
df[TARGET] = (mod... | 37.879121 | 120 | 0.555411 | import os
import pickle
import time
import pandas as pd
from sklearn.base import BaseEstimator, TransformerMixin
class ColumnSelector(BaseEstimator, TransformerMixin):
def __init__(self, columns):
self.columns = columns
def fit(self, X, y=None):
return self
def transform(self, X):
... | 5,953 | 124 | 412 |
a1b133030770735b4198a383c95dc2e1f77bd961 | 58,100 | py | Python | lattes_qualis/_Classes/Indicators.py | ellenjkr/LattesQualis | 4fa149ea9e1c58e12b03bd1b88474a0cc2c6d534 | [
"MIT"
] | null | null | null | lattes_qualis/_Classes/Indicators.py | ellenjkr/LattesQualis | 4fa149ea9e1c58e12b03bd1b88474a0cc2c6d534 | [
"MIT"
] | null | null | null | lattes_qualis/_Classes/Indicators.py | ellenjkr/LattesQualis | 4fa149ea9e1c58e12b03bd1b88474a0cc2c6d534 | [
"MIT"
] | null | null | null | from _Funções_e_Valores.verify_authors import treat_exceptions
from _Funções_e_Valores.values import ND
import pandas as pd
# Proceedings and Journals separated
| 58.041958 | 352 | 0.718709 | from _Funções_e_Valores.verify_authors import treat_exceptions
from _Funções_e_Valores.values import ND
import pandas as pd
class Indicators():
def __init__(self, egress_list, students_list, info, qualis_year, general=False):
super(Indicators, self).__init__()
self.egress_list = egress_list
self.students_list... | 57,576 | -2 | 383 |
f9df096ba45086d24778903b52ed2aaffddeaa80 | 920 | py | Python | 02_script.py | michalskop/cz-covid-predictive-data | 42b7a4557d8b3c40ab4d2cf194efabb3b16db8be | [
"Apache-2.0"
] | null | null | null | 02_script.py | michalskop/cz-covid-predictive-data | 42b7a4557d8b3c40ab4d2cf194efabb3b16db8be | [
"Apache-2.0"
] | null | null | null | 02_script.py | michalskop/cz-covid-predictive-data | 42b7a4557d8b3c40ab4d2cf194efabb3b16db8be | [
"Apache-2.0"
] | null | null | null | """Split sorted modely_02."""
import pandas as pd
url = "https://onemocneni-aktualne.mzcr.cz/api/account/mifLSHU2re3GAmiotOkdYExeoQ/file/modely%252Fmodely_02_efektivita_testovani.csv"
df = pd.read_csv(url, delimiter=';')
df = df.sort_values(['datum_hlaseni', 'datum_prvniho_priznaku', 'orp', 'vek_kat', 'pohlavi'])
... | 48.421053 | 138 | 0.753261 | """Split sorted modely_02."""
import pandas as pd
url = "https://onemocneni-aktualne.mzcr.cz/api/account/mifLSHU2re3GAmiotOkdYExeoQ/file/modely%252Fmodely_02_efektivita_testovani.csv"
df = pd.read_csv(url, delimiter=';')
df = df.sort_values(['datum_hlaseni', 'datum_prvniho_priznaku', 'orp', 'vek_kat', 'pohlavi'])
... | 0 | 0 | 0 |
ac20fea2bd287e5e54a8c519873777a66011c100 | 1,048 | py | Python | btplotting-master/btplotting/tab.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null | btplotting-master/btplotting/tab.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null | btplotting-master/btplotting/tab.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null | from bokeh.models.widgets import Panel
class BacktraderPlottingTab:
'''
Abstract class for tabs
This class needs to be extended from when creating custom tabs.
It is required to overwrite the _is_useable and _get_panel method.
The _get_panel method needs to return a panel child and a title.
'... | 27.578947 | 70 | 0.644084 | from bokeh.models.widgets import Panel
class BacktraderPlottingTab:
'''
Abstract class for tabs
This class needs to be extended from when creating custom tabs.
It is required to overwrite the _is_useable and _get_panel method.
The _get_panel method needs to return a panel child and a title.
'... | 275 | 0 | 81 |
832acd9db96614ccc2d38b291080f4460de203bc | 8,375 | py | Python | functions/sampling.py | Yuleii/yulei-thesis-QBSM-kw94 | bb882bc6c809331c370a4d6442c36ad67ccad498 | [
"MIT"
] | null | null | null | functions/sampling.py | Yuleii/yulei-thesis-QBSM-kw94 | bb882bc6c809331c370a4d6442c36ad67ccad498 | [
"MIT"
] | null | null | null | functions/sampling.py | Yuleii/yulei-thesis-QBSM-kw94 | bb882bc6c809331c370a4d6442c36ad67ccad498 | [
"MIT"
] | null | null | null | """Functions that create samples."""
import chaospy as cp
import numpy as np
import respy as rp
import pandas as pd
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
DATA_PATH = PROJECT_ROOT / "data"
CHAOSPY_SAMPLING_METHODS = {
"random",
"grid",
"chebyshev",
"korobov",
... | 27.459016 | 89 | 0.628776 | """Functions that create samples."""
import chaospy as cp
import numpy as np
import respy as rp
import pandas as pd
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
DATA_PATH = PROJECT_ROOT / "data"
CHAOSPY_SAMPLING_METHODS = {
"random",
"grid",
"chebyshev",
"korobov",
... | 0 | 0 | 0 |
eaff22981bf52da6d78148d2d28c27ef6dce2a67 | 523 | py | Python | app/auth.py | leandcesar/bobotinho-api | 7a3ce31fb2220e00b4b1fabf10e1c32afde314a9 | [
"MIT"
] | null | null | null | app/auth.py | leandcesar/bobotinho-api | 7a3ce31fb2220e00b4b1fabf10e1c32afde314a9 | [
"MIT"
] | null | null | null | app/auth.py | leandcesar/bobotinho-api | 7a3ce31fb2220e00b4b1fabf10e1c32afde314a9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from http import HTTPStatus
from typing import Optional
from flask_httpauth import HTTPTokenAuth
from app.config import config
auth = HTTPTokenAuth(scheme="Bearer", header="Authorization")
@auth.verify_token
@auth.error_handler
| 24.904762 | 76 | 0.74761 | # -*- coding: utf-8 -*-
from http import HTTPStatus
from typing import Optional
from flask_httpauth import HTTPTokenAuth
from app.config import config
auth = HTTPTokenAuth(scheme="Bearer", header="Authorization")
@auth.verify_token
def verify_token(token: str) -> Optional[str]:
users = {config.AUTH_TOKEN: "adm... | 220 | 0 | 44 |
6724a980f6d6c43d369b9a46c968d83b68bf114e | 2,335 | py | Python | devsechan/irc.py | Woomymy/devse-chan | 8964e0a34d299b39bd244f17e8564f0fa003f2e0 | [
"BSD-3-Clause"
] | 9 | 2020-11-19T12:55:06.000Z | 2021-08-13T19:11:23.000Z | devsechan/irc.py | Woomymy/devse-chan | 8964e0a34d299b39bd244f17e8564f0fa003f2e0 | [
"BSD-3-Clause"
] | 15 | 2021-09-01T09:16:05.000Z | 2022-03-15T17:48:14.000Z | devsechan/irc.py | Woomymy/devse-chan | 8964e0a34d299b39bd244f17e8564f0fa003f2e0 | [
"BSD-3-Clause"
] | 8 | 2020-12-21T16:03:52.000Z | 2021-08-31T19:40:23.000Z | from re import M
import bottom
import asyncio
import platform
| 38.916667 | 111 | 0.532334 | from re import M
import bottom
import asyncio
import platform
class IRC:
def __init__(self, parent, config):
self.config = config
self.irc = bottom.Client(host=config['host'].get(), port=config['port'].get(), ssl=config['ssl'].get())
@self.irc.on('CLIENT_CONNECT')
async def conne... | 2,179 | -11 | 104 |
826b024a79bb72e12c1b5294e4bfa65c557b57a9 | 3,118 | py | Python | lib/cirrocumulus/parquet_output.py | klarman-cell-observatory/cirrocumulus-app-engine | 52997ae790773364591ab8d7c747e4505700373b | [
"BSD-3-Clause"
] | null | null | null | lib/cirrocumulus/parquet_output.py | klarman-cell-observatory/cirrocumulus-app-engine | 52997ae790773364591ab8d7c747e4505700373b | [
"BSD-3-Clause"
] | 1 | 2021-04-13T14:52:39.000Z | 2021-04-13T15:53:34.000Z | lib/cirrocumulus/parquet_output.py | klarman-cell-observatory/cirrocumulus-app-engine | 52997ae790773364591ab8d7c747e4505700373b | [
"BSD-3-Clause"
] | null | null | null | import logging
import os
import numpy as np
import pandas._libs.json as ujson
import pyarrow as pa
import pyarrow.parquet as pq
import scipy.sparse
from cirrocumulus.anndata_util import DataType
logger = logging.getLogger("cirro")
| 37.566265 | 107 | 0.661642 | import logging
import os
import numpy as np
import pandas._libs.json as ujson
import pyarrow as pa
import pyarrow.parquet as pq
import scipy.sparse
from cirrocumulus.anndata_util import DataType
logger = logging.getLogger("cirro")
def write_pq(d, output_dir, name, filesystem, write_statistics=True, row_group_size=... | 2,764 | 0 | 115 |
51c0e6bee2e820d7b01f2280b58a270ac9515f4c | 14,005 | py | Python | usaspending_api/search/tests/test_spending_by_award_type.py | truthiswill/usaspending-api | bd7d915442e2ec94cc830c480ceeffd4479be6c0 | [
"CC0-1.0"
] | null | null | null | usaspending_api/search/tests/test_spending_by_award_type.py | truthiswill/usaspending-api | bd7d915442e2ec94cc830c480ceeffd4479be6c0 | [
"CC0-1.0"
] | 1 | 2021-11-15T17:53:27.000Z | 2021-11-15T17:53:27.000Z | usaspending_api/search/tests/test_spending_by_award_type.py | truthiswill/usaspending-api | bd7d915442e2ec94cc830c480ceeffd4479be6c0 | [
"CC0-1.0"
] | null | null | null | import json
import pytest
from rest_framework import status
from usaspending_api.common.helpers.unit_test_helper import add_to_mock_objects
from usaspending_api.search.tests.test_mock_data_search import all_filters
from django_mock_queries.query import MockModel
@pytest.mark.django_db
@pytest.mark.django_db
@py... | 45.470779 | 118 | 0.581078 | import json
import pytest
from rest_framework import status
from usaspending_api.common.helpers.unit_test_helper import add_to_mock_objects
from usaspending_api.search.tests.test_mock_data_search import all_filters
from django_mock_queries.query import MockModel
@pytest.mark.django_db
def test_spending_by_award_typ... | 2,235 | 0 | 44 |
bfdf11c58987e1527ebc503d8721980c3affd9ed | 17,105 | py | Python | abei/implements/procedure_basic.py | mind-bricks/abei | 5e364d5200111793073a0a3d64f556b5207a8734 | [
"MIT"
] | null | null | null | abei/implements/procedure_basic.py | mind-bricks/abei | 5e364d5200111793073a0a3d64f556b5207a8734 | [
"MIT"
] | null | null | null | abei/implements/procedure_basic.py | mind-bricks/abei | 5e364d5200111793073a0a3d64f556b5207a8734 | [
"MIT"
] | null | null | null | from abei.interfaces import (
IProcedure,
IProcedureClass,
IProcedureFactory,
IProcedureData,
IProcedureLink,
)
from .procedure_joint_basic import (
joint_validate,
joint_run,
)
# native_function = staticmethod(lambda x, y: x)
# composite procedure class --------------------... | 29.696181 | 77 | 0.635194 | from abei.interfaces import (
IProcedure,
IProcedureClass,
IProcedureFactory,
IProcedureData,
IProcedureLink,
)
from .procedure_joint_basic import (
joint_validate,
joint_run,
)
class ProcedureBasic(IProcedure):
signature = 'NA'
docstring = 'NA'
input_signatures = []
output... | 10,028 | 747 | 1,113 |
21c9f79920b697cfa6ac2f04a0ea24b5b317a312 | 5,109 | py | Python | tests/handlers/test_base_handler_with_different_storage_config.py | bear8421/thumbor | 00a0c44d44b8fa5f06c38deee7123793addda404 | [
"MIT"
] | 1 | 2021-12-24T02:01:52.000Z | 2021-12-24T02:01:52.000Z | tests/handlers/test_base_handler_with_different_storage_config.py | bear8421/thumbor | 00a0c44d44b8fa5f06c38deee7123793addda404 | [
"MIT"
] | 2 | 2022-03-17T06:53:16.000Z | 2022-03-31T19:42:00.000Z | tests/handlers/test_base_handler_with_different_storage_config.py | bear8421/thumbor | 00a0c44d44b8fa5f06c38deee7123793addda404 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com thumbor@googlegroups.com
from json import loads
from shutil import which
from preggy import ... | 34.755102 | 115 | 0.671169 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com thumbor@googlegroups.com
from json import loads
from shutil import which
from preggy import ... | 3,744 | 446 | 46 |
69f96b0f73d164eab7447db6d9b5280090b7a144 | 784 | py | Python | server/migrations/versions/69858d32aaff_.py | morganrconnolly/billingPlatform | 9323b3af5a906cac0a0966943d8cf6d9fb1b656c | [
"MIT"
] | null | null | null | server/migrations/versions/69858d32aaff_.py | morganrconnolly/billingPlatform | 9323b3af5a906cac0a0966943d8cf6d9fb1b656c | [
"MIT"
] | null | null | null | server/migrations/versions/69858d32aaff_.py | morganrconnolly/billingPlatform | 9323b3af5a906cac0a0966943d8cf6d9fb1b656c | [
"MIT"
] | null | null | null | """empty message
Revision ID: 69858d32aaff
Revises: 160db434d139
Create Date: 2016-07-20 16:08:00.219265
"""
# revision identifiers, used by Alembic.
revision = '69858d32aaff'
down_revision = '160db434d139'
from alembic import op
import sqlalchemy as sa
| 27.034483 | 113 | 0.706633 | """empty message
Revision ID: 69858d32aaff
Revises: 160db434d139
Create Date: 2016-07-20 16:08:00.219265
"""
# revision identifiers, used by Alembic.
revision = '69858d32aaff'
down_revision = '160db434d139'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - ... | 478 | 0 | 46 |
7c02cdfa5a27d248d3b277c93e5fab5aa330d11d | 639 | py | Python | hiargparse/file_protocols/dict_writers/null_writer.py | KKawamura1/hiargparse | 4525003997807c97cf25ee3e0a26c029b553d155 | [
"MIT"
] | 4 | 2018-04-30T02:47:14.000Z | 2020-12-20T13:44:02.000Z | hiargparse/file_protocols/dict_writers/null_writer.py | KKawamura1/hiargparse | 4525003997807c97cf25ee3e0a26c029b553d155 | [
"MIT"
] | 1 | 2022-01-16T17:59:53.000Z | 2022-01-16T17:59:53.000Z | hiargparse/file_protocols/dict_writers/null_writer.py | KKawamura1/hiargparse | 4525003997807c97cf25ee3e0a26c029b553d155 | [
"MIT"
] | null | null | null | from .abstract_dict_writer import AbstractDictWriter
from typing import Union, Sequence
| 18.794118 | 52 | 0.527387 | from .abstract_dict_writer import AbstractDictWriter
from typing import Union, Sequence
class NullWriter(AbstractDictWriter):
def __init__(
self
) -> None:
pass
def begin_section(self, name: str) -> None:
pass
def end_section(self) -> None:
pass
def add_comme... | 350 | 16 | 184 |
07f275f04459b59e56771f458e8dbc8d729ad137 | 3,070 | py | Python | autogluon/utils/tabular/ml/models/abstract/model_trial.py | tlienart/autogluon | d02e37f41cd947dd1281bb1296cd12a8187ec441 | [
"Apache-2.0"
] | 6 | 2020-06-16T19:17:36.000Z | 2021-07-07T14:50:31.000Z | autogluon/utils/tabular/ml/models/abstract/model_trial.py | tlienart/autogluon | d02e37f41cd947dd1281bb1296cd12a8187ec441 | [
"Apache-2.0"
] | null | null | null | autogluon/utils/tabular/ml/models/abstract/model_trial.py | tlienart/autogluon | d02e37f41cd947dd1281bb1296cd12a8187ec441 | [
"Apache-2.0"
] | 2 | 2020-12-13T16:40:04.000Z | 2021-03-08T09:14:16.000Z | import os
import time
import logging
from ....utils.loaders import load_pkl
from ....utils.exceptions import TimeLimitExceeded
from ......core import args
from ......scheduler.reporter import LocalStatusReporter
logger = logging.getLogger(__name__)
@args()
def model_trial(args, reporter: LocalStatusReporter):
"... | 41.486486 | 138 | 0.708143 | import os
import time
import logging
from ....utils.loaders import load_pkl
from ....utils.exceptions import TimeLimitExceeded
from ......core import args
from ......scheduler.reporter import LocalStatusReporter
logger = logging.getLogger(__name__)
@args()
def model_trial(args, reporter: LocalStatusReporter):
"... | 1,276 | 0 | 46 |
d16aabbf7b1ab02f9447e4f9dd0bdabe4fe556c4 | 718 | py | Python | aioftx/payments/api.py | metta-team/aioftx | f5bd028e8bf40c55c1d4632802b792be113e0978 | [
"MIT"
] | null | null | null | aioftx/payments/api.py | metta-team/aioftx | f5bd028e8bf40c55c1d4632802b792be113e0978 | [
"MIT"
] | null | null | null | aioftx/payments/api.py | metta-team/aioftx | f5bd028e8bf40c55c1d4632802b792be113e0978 | [
"MIT"
] | null | null | null | from typing import Optional
from aioftx.session import FTXClientSession
from .schemas import (
FundingPayment,
GetFundingPaymentsRequest,
GetFundingPaymentsResponse,
)
async def get_funding_payments(
session: FTXClientSession,
*,
future: Optional[str] = None,
start_time: Optional[int] = ... | 23.933333 | 56 | 0.681058 | from typing import Optional
from aioftx.session import FTXClientSession
from .schemas import (
FundingPayment,
GetFundingPaymentsRequest,
GetFundingPaymentsResponse,
)
async def get_funding_payments(
session: FTXClientSession,
*,
future: Optional[str] = None,
start_time: Optional[int] = ... | 0 | 0 | 0 |
b91ce7f9815c40c314f3094cadd8acb2c4cda526 | 2,874 | py | Python | examples/server-ssh-keys.py | pschelle/pyonepassword | 2258c0fa851ad6a63c4f959982a66c715706b654 | [
"MIT"
] | 12 | 2019-08-11T09:08:47.000Z | 2022-03-18T22:10:12.000Z | examples/server-ssh-keys.py | pschelle/pyonepassword | 2258c0fa851ad6a63c4f959982a66c715706b654 | [
"MIT"
] | 23 | 2019-09-13T20:16:12.000Z | 2022-01-15T18:29:52.000Z | examples/server-ssh-keys.py | pschelle/pyonepassword | 2258c0fa851ad6a63c4f959982a66c715706b654 | [
"MIT"
] | 10 | 2020-03-10T19:49:35.000Z | 2022-01-18T14:09:10.000Z | import os
import getpass
from pathlib import Path
from argparse import ArgumentParser
from pyonepassword import OP, OPServerItem
if __name__ == "__main__":
main()
| 32.292135 | 101 | 0.675713 | import os
import getpass
from pathlib import Path
from argparse import ArgumentParser
from pyonepassword import OP, OPServerItem
class ServerWithSSHKeys:
SSH_KEYS_SECTION = "SSH Keys"
PRIV_PERMS = 0o600
PUB_PERMS = 0o644
DIR_PERMS = 0o755
def __init__(self, server_item: OPServerItem):
sel... | 2,371 | 239 | 92 |
635341ad576004ff02052ecc64b5cd12d53ccc8e | 1,001 | py | Python | simply/simplyRPClient.py | sergsb/simply | e1bea1a3a1f0d71e5ac97ffec4964738aa43cbf3 | [
"MIT"
] | null | null | null | simply/simplyRPClient.py | sergsb/simply | e1bea1a3a1f0d71e5ac97ffec4964738aa43cbf3 | [
"MIT"
] | null | null | null | simply/simplyRPClient.py | sergsb/simply | e1bea1a3a1f0d71e5ac97ffec4964738aa43cbf3 | [
"MIT"
] | null | null | null | import uuid
import msgpack
import redis
| 38.5 | 103 | 0.583417 | import uuid
import msgpack
import redis
class SimplyRedisClient():
def __init__(self,url,name,plugin):
self.redis = redis.from_url(url)
self.name = name
self.plugin = plugin
def call(self,function,args,kwargs,type='instant'):
idx = str(uuid.uuid4())
run = {'method': fun... | 880 | 5 | 76 |
df90b5084ec078dc608d22914913d694a5f7c40b | 21,282 | py | Python | scraper.py | dancing-rain/HackIllinois-2022-RedditUsrInfoDiscordBot | 65462267f5a282e68b5714c0a1e09a6ded939f1a | [
"MIT"
] | 2 | 2022-02-26T07:27:10.000Z | 2022-02-26T22:41:06.000Z | scraper.py | dancing-rain/HackIllinois-2022-RedditUsrInfoDiscordBot | 65462267f5a282e68b5714c0a1e09a6ded939f1a | [
"MIT"
] | null | null | null | scraper.py | dancing-rain/HackIllinois-2022-RedditUsrInfoDiscordBot | 65462267f5a282e68b5714c0a1e09a6ded939f1a | [
"MIT"
] | 1 | 2022-02-26T07:21:01.000Z | 2022-02-26T07:21:01.000Z | #Dependencies
from array import array
from operator import mod
from statistics import mode
from unicodedata import name
import praw
import os
from datetime import datetime
import time
from prawcore.exceptions import NotFound
import json
from dotenv import load_dotenv
import scraper as scrape
load_dotenv("./.env")
CLI... | 43.971074 | 282 | 0.619303 | #Dependencies
from array import array
from operator import mod
from statistics import mode
from unicodedata import name
import praw
import os
from datetime import datetime
import time
from prawcore.exceptions import NotFound
import json
from dotenv import load_dotenv
import scraper as scrape
load_dotenv("./.env")
CLI... | 16,346 | 1,848 | 193 |
253e580a3773a11365a717fa1945cf25ba110650 | 554 | py | Python | accounting/blueprints/account_type/forms.py | alvin-c-cruz/accounting | f16ef16ded3cab36eee7227008ae40856680034d | [
"MIT"
] | 1 | 2022-02-05T13:57:40.000Z | 2022-02-05T13:57:40.000Z | accounting/blueprints/account_type/forms.py | alvin-c-cruz/accounting | f16ef16ded3cab36eee7227008ae40856680034d | [
"MIT"
] | null | null | null | accounting/blueprints/account_type/forms.py | alvin-c-cruz/accounting | f16ef16ded3cab36eee7227008ae40856680034d | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, SelectField, SubmitField
from wtforms.validators import DataRequired
from .models import AccountType
| 36.933333 | 80 | 0.752708 | from flask_wtf import FlaskForm
from wtforms import StringField, SelectField, SubmitField
from wtforms.validators import DataRequired
from .models import AccountType
class AccountTypeForm(FlaskForm):
account_type = StringField(label="Description", validators=[DataRequired()])
classification = SelectField(
... | 0 | 365 | 23 |
5d6c9190d3e7576fe518ec7b1ef02456361a1ace | 507 | py | Python | tests/bench_mark/func_exec_time_decorator.py | apache/incubator-sdap-in-situ-data-services | 4e65e0e2eb178461baba61e2204e5a97f701d8ed | [
"Apache-2.0"
] | 1 | 2021-11-07T20:27:13.000Z | 2021-11-07T20:27:13.000Z | tests/bench_mark/func_exec_time_decorator.py | apache/incubator-sdap-in-situ-data-services | 4e65e0e2eb178461baba61e2204e5a97f701d8ed | [
"Apache-2.0"
] | null | null | null | tests/bench_mark/func_exec_time_decorator.py | apache/incubator-sdap-in-situ-data-services | 4e65e0e2eb178461baba61e2204e5a97f701d8ed | [
"Apache-2.0"
] | 2 | 2021-11-07T20:27:05.000Z | 2021-11-15T15:40:40.000Z | import logging
from datetime import datetime
from functools import wraps
LOGGER = logging.getLogger(__name__)
| 28.166667 | 82 | 0.682446 | import logging
from datetime import datetime
from functools import wraps
LOGGER = logging.getLogger(__name__)
def func_exec_time_decorator(f):
@wraps(f)
def decorated_function(*args, **kwargs):
time1 = datetime.now()
func_result = f(*args, **kwargs)
time2 = datetime.now()
dura... | 372 | 0 | 23 |
c3a5056c918dabba6cfeccc2f5e35a381a297809 | 678 | py | Python | falconn/src/examples/glove/convert.py | bobpoekert/ocamlfalconn | 678976064077ca2a4bc6ced3e84042ac1751669a | [
"MIT"
] | 1,068 | 2015-12-10T18:03:11.000Z | 2022-03-29T09:05:38.000Z | falconn/src/examples/glove/convert.py | bobpoekert/ocamlfalconn | 678976064077ca2a4bc6ced3e84042ac1751669a | [
"MIT"
] | 108 | 2015-12-10T21:14:41.000Z | 2022-03-15T17:51:17.000Z | falconn/src/examples/glove/convert.py | bobpoekert/ocamlfalconn | 678976064077ca2a4bc6ced3e84042ac1751669a | [
"MIT"
] | 224 | 2015-12-17T02:35:21.000Z | 2022-03-29T09:05:40.000Z | #!/usr/bin/python
import sys
import struct
import numpy as np
matrix = []
with open('dataset/glove.840B.300d.txt', 'r') as inf:
with open('dataset/glove.840B.300d.dat', 'wb') as ouf:
counter = 0
for line in inf:
row = [float(x) for x in line.split()[1:]]
assert len(row) == ... | 32.285714 | 70 | 0.558997 | #!/usr/bin/python
import sys
import struct
import numpy as np
matrix = []
with open('dataset/glove.840B.300d.txt', 'r') as inf:
with open('dataset/glove.840B.300d.dat', 'wb') as ouf:
counter = 0
for line in inf:
row = [float(x) for x in line.split()[1:]]
assert len(row) == ... | 0 | 0 | 0 |
54c89ad19cbe5956de571d43a26e1b16cbff6748 | 18,826 | py | Python | iso3166/__init__.py | briangmaddox/QGISSOLR | e98e98f89265b7d0b6b8a760f6233c990ce368c3 | [
"MIT"
] | null | null | null | iso3166/__init__.py | briangmaddox/QGISSOLR | e98e98f89265b7d0b6b8a760f6233c990ce368c3 | [
"MIT"
] | null | null | null | iso3166/__init__.py | briangmaddox/QGISSOLR | e98e98f89265b7d0b6b8a760f6233c990ce368c3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from builtins import object
import re
from numbers import Integral
from collections import namedtuple
__all__ = ["countries"]
try:
str
except NameError:
str = str
Country = namedtuple('Country',
'name alpha2 alpha3 numeric apolitical_name')
_records = [
Coun... | 49.412073 | 78 | 0.565973 | # -*- coding: utf-8 -*-
from builtins import object
import re
from numbers import Integral
from collections import namedtuple
__all__ = ["countries"]
try:
str
except NameError:
str = str
Country = namedtuple('Country',
'name alpha2 alpha3 numeric apolitical_name')
_records = [
Coun... | 931 | 139 | 46 |
eeffb6fed77812d6b8dcfa922e04b9b21a87db1d | 637 | py | Python | tracim/migration/versions/2cd20ff3d23a_user_timezone.py | lebouquetin/tracim | dc3485f92b07ced3230834a5852c9f9574477c1c | [
"MIT"
] | 1 | 2016-09-27T12:16:05.000Z | 2016-09-27T12:16:05.000Z | tracim/migration/versions/2cd20ff3d23a_user_timezone.py | lebouquetin/tracim | dc3485f92b07ced3230834a5852c9f9574477c1c | [
"MIT"
] | null | null | null | tracim/migration/versions/2cd20ff3d23a_user_timezone.py | lebouquetin/tracim | dc3485f92b07ced3230834a5852c9f9574477c1c | [
"MIT"
] | null | null | null | """user_timezone
Revision ID: 2cd20ff3d23a
Revises: b4b8d57b54e5
Create Date: 2016-11-08 11:32:00.903232
"""
# revision identifiers, used by Alembic.
revision = '2cd20ff3d23a'
down_revision = 'b4b8d57b54e5'
from alembic import op
import sqlalchemy as sa
| 23.592593 | 108 | 0.700157 | """user_timezone
Revision ID: 2cd20ff3d23a
Revises: b4b8d57b54e5
Create Date: 2016-11-08 11:32:00.903232
"""
# revision identifiers, used by Alembic.
revision = '2cd20ff3d23a'
down_revision = 'b4b8d57b54e5'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - ... | 331 | 0 | 46 |
adfdf8fb280e0e87d5424c93032f99b388e9671d | 1,280 | py | Python | setup.py | CraazzzyyFoxx/lavacord.py | 5974644b2ceb814b8ad3e253e9328d22c5e17921 | [
"MIT"
] | null | null | null | setup.py | CraazzzyyFoxx/lavacord.py | 5974644b2ceb814b8ad3e253e9328d22c5e17921 | [
"MIT"
] | null | null | null | setup.py | CraazzzyyFoxx/lavacord.py | 5974644b2ceb814b8ad3e253e9328d22c5e17921 | [
"MIT"
] | null | null | null | import pathlib
from setuptools import setup
here = pathlib.Path(__file__).parent.resolve()
long_description = (here / 'README.md').read_text(encoding='utf-8')
setup(
name='lavacord.py',
version='1.0.4a1',
description='Its a lavalink nodes manger to make a music bots for discord with python.',
long_d... | 36.571429 | 92 | 0.663281 | import pathlib
from setuptools import setup
here = pathlib.Path(__file__).parent.resolve()
long_description = (here / 'README.md').read_text(encoding='utf-8')
setup(
name='lavacord.py',
version='1.0.4a1',
description='Its a lavalink nodes manger to make a music bots for discord with python.',
long_d... | 0 | 0 | 0 |
aae0e362a38f56ce2cc7a1385f0822cd2db7ed86 | 2,823 | py | Python | examples/wavelets/chirp_cwt_mexh.py | carnot-shailesh/cr-sparse | 989ebead8a8ac37ade643093e1caa31ae2a3eda1 | [
"Apache-2.0"
] | 42 | 2021-06-11T17:11:29.000Z | 2022-03-29T11:51:44.000Z | examples/wavelets/chirp_cwt_mexh.py | carnot-shailesh/cr-sparse | 989ebead8a8ac37ade643093e1caa31ae2a3eda1 | [
"Apache-2.0"
] | 19 | 2021-06-04T11:36:11.000Z | 2022-01-22T20:13:39.000Z | examples/wavelets/chirp_cwt_mexh.py | carnot-shailesh/cr-sparse | 989ebead8a8ac37ade643093e1caa31ae2a3eda1 | [
"Apache-2.0"
] | 5 | 2021-11-21T21:01:11.000Z | 2022-02-28T07:20:03.000Z | """
Chirp CWT with Ricker
=======================
In this example, we analyze a chirp signal with a Ricker (a.k.a. Mexican Hat wavelet)
"""
# Configure JAX to work with 64-bit floating point precision.
from jax.config import config
config.update("jax_enable_x64", True)
# %%
# Let's import necessary libraries
impo... | 26.383178 | 99 | 0.685087 | """
Chirp CWT with Ricker
=======================
In this example, we analyze a chirp signal with a Ricker (a.k.a. Mexican Hat wavelet)
"""
# Configure JAX to work with 64-bit floating point precision.
from jax.config import config
config.update("jax_enable_x64", True)
# %%
# Let's import necessary libraries
impo... | 0 | 0 | 0 |
40f8a4494b9bdf239b895320690f0d81b2f6c458 | 6,971 | py | Python | cogs/maps.py | lifehackerhansol/Sycamore | 39b4574cd8224c2b4927992cadf22e4c4c368bd1 | [
"0BSD"
] | null | null | null | cogs/maps.py | lifehackerhansol/Sycamore | 39b4574cd8224c2b4927992cadf22e4c4c368bd1 | [
"0BSD"
] | 4 | 2021-05-25T06:48:00.000Z | 2022-02-03T18:41:57.000Z | cogs/maps.py | lifehackerhansol/Sycamore | 39b4574cd8224c2b4927992cadf22e4c4c368bd1 | [
"0BSD"
] | null | null | null | #
# ISC License
#
# Copyright (C) 2021-present lifehackerhansol
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" A... | 29.918455 | 114 | 0.611103 | #
# ISC License
#
# Copyright (C) 2021-present lifehackerhansol
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" A... | 274 | 0 | 76 |
6a03a71123c452d2d58aa64cd34f2cc6ff76c80b | 155 | py | Python | mysite/blog/admin.py | sakshikhachane/Blogger | a1a6f2fc1843b83b47f1ba8b3c88c5c478f5d6ac | [
"MIT"
] | 52 | 2020-07-01T10:06:34.000Z | 2021-09-30T18:23:23.000Z | mysite/blog/admin.py | sakshikhachane/Blogger | a1a6f2fc1843b83b47f1ba8b3c88c5c478f5d6ac | [
"MIT"
] | 206 | 2020-07-25T08:48:05.000Z | 2022-03-12T00:43:35.000Z | mysite/blog/admin.py | sakshikhachane/Blogger | a1a6f2fc1843b83b47f1ba8b3c88c5c478f5d6ac | [
"MIT"
] | 124 | 2020-08-07T11:22:44.000Z | 2021-10-16T05:39:17.000Z | from django.contrib import admin
from .models import Post, TagDict
# Register your models here.
admin.site.register(Post)
admin.site.register(TagDict)
| 15.5 | 33 | 0.787097 | from django.contrib import admin
from .models import Post, TagDict
# Register your models here.
admin.site.register(Post)
admin.site.register(TagDict)
| 0 | 0 | 0 |
bd76b059a85838004b73efadfe04b0077dbae495 | 1,985 | py | Python | tests/test_day4.py | fullybaked/advent-of-code | def5fa21574536465fe13ed2ec8de1e4c7cdf856 | [
"MIT"
] | null | null | null | tests/test_day4.py | fullybaked/advent-of-code | def5fa21574536465fe13ed2ec8de1e4c7cdf856 | [
"MIT"
] | null | null | null | tests/test_day4.py | fullybaked/advent-of-code | def5fa21574536465fe13ed2ec8de1e4c7cdf856 | [
"MIT"
] | null | null | null | from src.day4 import Board, Game, load_data
from unittest.mock import patch, mock_open
EXAMPLE_IN = """7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1
22 13 17 11 0
8 2 23 4 24
21 9 14 16 7
6 10 3 18 5
1 12 20 15 19
3 15 0 2 22
9 18 13 17 5
19 8 7 25 23
20 11 10 24 4
14 21 16... | 20.463918 | 86 | 0.58539 | from src.day4 import Board, Game, load_data
from unittest.mock import patch, mock_open
EXAMPLE_IN = """7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1
22 13 17 11 0
8 2 23 4 24
21 9 14 16 7
6 10 3 18 5
1 12 20 15 19
3 15 0 2 22
9 18 13 17 5
19 8 7 25 23
20 11 10 24 4
14 21 16... | 1,458 | 0 | 115 |
22f6030013bcd837394c0207f0adfee79e6d965d | 4,633 | py | Python | lib/rucio/web/rest/webpy/v1/credential.py | ijjorama/rucio | 69391847117cf3567081814fbc30f476ada88853 | [
"Apache-2.0"
] | null | null | null | lib/rucio/web/rest/webpy/v1/credential.py | ijjorama/rucio | 69391847117cf3567081814fbc30f476ada88853 | [
"Apache-2.0"
] | null | null | null | lib/rucio/web/rest/webpy/v1/credential.py | ijjorama/rucio | 69391847117cf3567081814fbc30f476ada88853 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2012-2018 CERN for the benefit of the ATLAS collaboration.
#
# 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
... | 34.066176 | 129 | 0.64278 | #!/usr/bin/env python
# Copyright 2012-2018 CERN for the benefit of the ATLAS collaboration.
#
# 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
... | 0 | 0 | 0 |
e6ff18f98511f3a89b06bbe9cae4cef30086dde0 | 2,048 | py | Python | server/apps/utils/aws/kinesis.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/utils/aws/kinesis.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/utils/aws/kinesis.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | __author__ = 'dkarchmer'
import datetime
import json
import logging
import pprint
import boto3
from django.conf import settings
from .common import AWS_REGION
# Get an instance of a logger
logger = logging.getLogger(__name__)
FIREHOSE_STREAM_NAME = getattr(settings, 'FIREHOSE_STREAM_NAME')
firehose_client = boto... | 27.306667 | 101 | 0.663086 | __author__ = 'dkarchmer'
import datetime
import json
import logging
import pprint
import boto3
from django.conf import settings
from .common import AWS_REGION
# Get an instance of a logger
logger = logging.getLogger(__name__)
FIREHOSE_STREAM_NAME = getattr(settings, 'FIREHOSE_STREAM_NAME')
firehose_client = boto... | 1,587 | 0 | 92 |
453972bee5e4b38dcaee26d48c6dcec6950939dd | 821 | py | Python | custom_uss/custom_widgets/outlog.py | shuanet/dss | 5daafeb89aac58e4614775f301bec920f4abfa24 | [
"Apache-2.0"
] | 2 | 2022-02-13T19:13:16.000Z | 2022-02-17T14:52:05.000Z | custom_uss/custom_widgets/outlog.py | shuanet/dss | 5daafeb89aac58e4614775f301bec920f4abfa24 | [
"Apache-2.0"
] | null | null | null | custom_uss/custom_widgets/outlog.py | shuanet/dss | 5daafeb89aac58e4614775f301bec920f4abfa24 | [
"Apache-2.0"
] | 1 | 2022-02-16T20:17:38.000Z | 2022-02-16T20:17:38.000Z | import sys
from PySide6 import QtGui
| 25.65625 | 72 | 0.576127 | import sys
from PySide6 import QtGui
class OutLog:
def __init__(self, edit, out=None, color=None):
"""(edit, out=None, color=None) -> can write stdout, stderr to a
QTextEdit.
edit = QTextEdit
out = alternate stream ( can be the original sys.stdout )
color = alternate color (... | 322 | 439 | 23 |
57401c5732fe62caa7393d19d927adac65849582 | 101 | py | Python | lang/py/cookbook/v2/source/cb2_2_2_sol_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_2_2_sol_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_2_2_sol_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | file_object.writelines(list_of_text_strings)
open('abinfile', 'wb').writelines(list_of_data_strings)
| 33.666667 | 55 | 0.841584 | file_object.writelines(list_of_text_strings)
open('abinfile', 'wb').writelines(list_of_data_strings)
| 0 | 0 | 0 |
53a0848066228da1110c7becd0df032beaa6b4c8 | 922 | py | Python | saec/core/models.py | berrondo/saec | e8063f7b75fbeec4ea4d514958c073ff97a08088 | [
"MIT"
] | null | null | null | saec/core/models.py | berrondo/saec | e8063f7b75fbeec4ea4d514958c073ff97a08088 | [
"MIT"
] | null | null | null | saec/core/models.py | berrondo/saec | e8063f7b75fbeec4ea4d514958c073ff97a08088 | [
"MIT"
] | null | null | null | from django.db import models
| 22.487805 | 44 | 0.553145 | from django.db import models
class ComunicacaoAgendada(models.Model):
data = models.DateTimeField()
mensagem = models.TextField()
class Via(models.TextChoices):
EMAIL = 'email', 'Email'
SMS = 'sms', 'SMS'
PUSH = 'push', 'Push'
WHATSAPP = 'whatsapp', 'WhatsApp'
via = m... | 0 | 869 | 23 |
46022dba439632662d356578c1c51146aecefe0f | 24,554 | py | Python | tools/perf/core/bot_platforms.py | DamieFC/chromium | 54ce2d3c77723697efd22cfdb02aea38f9dfa25c | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-10-18T02:33:40.000Z | 2020-10-18T02:33:40.000Z | tools/perf/core/bot_platforms.py | DamieFC/chromium | 54ce2d3c77723697efd22cfdb02aea38f9dfa25c | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 3 | 2021-05-17T16:28:52.000Z | 2021-05-21T22:42:22.000Z | tools/perf/core/bot_platforms.py | DamieFC/chromium | 54ce2d3c77723697efd22cfdb02aea38f9dfa25c | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import six.moves.urllib.parse # pylint: disable=import-error
from core import benchmark_finders
from core import benchmark_utils
from telemetry.s... | 35.688953 | 80 | 0.691008 | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import six.moves.urllib.parse # pylint: disable=import-error
from core import benchmark_finders
from core import benchmark_utils
from telemetry.s... | 6,252 | 1,070 | 493 |
1c463b00bcc93f690abe0126cebd12479e2b2c5d | 1,568 | py | Python | cirq/optimizers/drop_negligible.py | sleichen/Cirq | 02f715203406d1f2af2d86e7561af09a2cdd4d45 | [
"Apache-2.0"
] | 1 | 2020-05-20T00:08:33.000Z | 2020-05-20T00:08:33.000Z | cirq/optimizers/drop_negligible.py | sleichen/Cirq | 02f715203406d1f2af2d86e7561af09a2cdd4d45 | [
"Apache-2.0"
] | null | null | null | cirq/optimizers/drop_negligible.py | sleichen/Cirq | 02f715203406d1f2af2d86e7561af09a2cdd4d45 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 37.333333 | 78 | 0.714286 | # Copyright 2018 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 483 | 0 | 54 |
5831bcb34288a143649c99a14e072f15de7aa45d | 792 | py | Python | dapodik/sekolah/yayasan.py | hexatester/dapodik | d89c0fb899c89e866527f6b7b57f741abd6444ea | [
"MIT"
] | 4 | 2021-02-01T15:19:35.000Z | 2022-01-26T02:47:21.000Z | dapodik/sekolah/yayasan.py | hexatester/dapodik | d89c0fb899c89e866527f6b7b57f741abd6444ea | [
"MIT"
] | 3 | 2020-01-08T17:07:15.000Z | 2020-01-08T18:05:12.000Z | dapodik/sekolah/yayasan.py | hexatester/dapodik | d89c0fb899c89e866527f6b7b57f741abd6444ea | [
"MIT"
] | 2 | 2021-08-04T13:48:08.000Z | 2021-12-25T02:36:49.000Z | from datetime import datetime
from typing import Optional
import attr
@attr.dataclass
| 20.842105 | 41 | 0.70202 | from datetime import datetime
from typing import Optional
import attr
@attr.dataclass
class Yayasan:
yayasan_id: str
nama: str
alamat_jalan: str
rt: str
rw: str
nama_dusun: str
desa_kelurahan: str
kode_wilayah: str
kode_pos: str
lintang: str
bujur: str
nomor_telepon: O... | 0 | 681 | 22 |
915cd60e3606a8124de1feb87deb1d79540401cf | 13,438 | py | Python | transcriptic/util.py | transcriptic/transcriptic | 1b5df943db266d18dbf055d0ace68c3cde8980e9 | [
"BSD-3-Clause"
] | 32 | 2015-10-27T22:51:05.000Z | 2020-03-26T00:43:32.000Z | transcriptic/util.py | transcriptic/transcriptic | 1b5df943db266d18dbf055d0ace68c3cde8980e9 | [
"BSD-3-Clause"
] | 95 | 2015-10-27T15:30:46.000Z | 2020-03-30T00:38:05.000Z | transcriptic/util.py | transcriptic/transcriptic | 1b5df943db266d18dbf055d0ace68c3cde8980e9 | [
"BSD-3-Clause"
] | 10 | 2015-10-27T06:35:30.000Z | 2019-09-26T15:18:49.000Z | import itertools
import json
import re
from collections import OrderedDict, defaultdict
from os.path import abspath, dirname, join
import click
def ascii_encode(non_compatible_string):
"""Primarily used for ensuring terminal display compatibility"""
if non_compatible_string:
return non_compatible_... | 36.417344 | 90 | 0.598527 | import itertools
import json
import re
from collections import OrderedDict, defaultdict
from os.path import abspath, dirname, join
import click
def natural_sort(l):
convert = lambda text: int(text) if text.isdigit() else text.lower()
alphanum_key = lambda key: [convert(c) for c in re.split("([0-9]+)", key)]... | 4,525 | 0 | 314 |
da4d6902696eeeab8fc42d5ee76fbedcae018a29 | 1,062 | py | Python | src/scripts/metodos_painel_administrativo.py | danilopcarlotti/scdf | cb89216f6a07da94f765d101390a521861063c76 | [
"MIT"
] | 3 | 2019-11-28T22:58:50.000Z | 2020-08-20T12:23:38.000Z | src/scripts/metodos_painel_administrativo.py | danilopcarlotti/scdf | cb89216f6a07da94f765d101390a521861063c76 | [
"MIT"
] | null | null | null | src/scripts/metodos_painel_administrativo.py | danilopcarlotti/scdf | cb89216f6a07da94f765d101390a521861063c76 | [
"MIT"
] | 1 | 2019-03-21T20:13:51.000Z | 2019-03-21T20:13:51.000Z | import os
from dotenv import load_dotenv, find_dotenv
from pymongo import MongoClient
load_dotenv(find_dotenv())
mongo_url = os.getenv("mongo_url")
myclient = MongoClient(mongo_url)
mydb_master = myclient["SCDF"]
col = mydb_master["investigacoes"] | 33.1875 | 72 | 0.764595 | import os
from dotenv import load_dotenv, find_dotenv
from pymongo import MongoClient
load_dotenv(find_dotenv())
mongo_url = os.getenv("mongo_url")
myclient = MongoClient(mongo_url)
mydb_master = myclient["SCDF"]
col = mydb_master["investigacoes"]
def usuarios_ativos():
usuarios = []
for data in col.find({})... | 721 | 0 | 92 |
13a3177441684c7e57faf556b63af77fa9647257 | 9,185 | py | Python | eotile/eotile_cli.py | CS-SI/eotile | af395a0804af79ed1e7f25eb2cf3d875fcd85108 | [
"Apache-2.0"
] | 7 | 2021-09-21T09:08:13.000Z | 2021-09-30T13:16:51.000Z | eotile/eotile_cli.py | CS-SI/eotile | af395a0804af79ed1e7f25eb2cf3d875fcd85108 | [
"Apache-2.0"
] | 2 | 2021-11-16T15:20:46.000Z | 2022-02-11T17:12:52.000Z | eotile/eotile_cli.py | CS-SI/eotile | af395a0804af79ed1e7f25eb2cf3d875fcd85108 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2021 CS GROUP - France.
#
# This file is part of EOTile.
# See https://github.com/CS-SI/eotile for further info.
#
# 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... | 33.892989 | 103 | 0.583669 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2021 CS GROUP - France.
#
# This file is part of EOTile.
# See https://github.com/CS-SI/eotile for further info.
#
# 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... | 0 | 0 | 0 |
cf1d39991d50302fa1db47ade5d5dd38ded6bc27 | 3,812 | py | Python | backend/views/aws_model_view_set.py | crosspower/naruko | 4c524e2ef955610a711830bc86d730ffe4fc2bd8 | [
"MIT"
] | 17 | 2019-01-23T04:37:43.000Z | 2019-10-15T01:42:31.000Z | backend/views/aws_model_view_set.py | snickerjp/naruko | 4c524e2ef955610a711830bc86d730ffe4fc2bd8 | [
"MIT"
] | 1 | 2019-01-23T08:04:44.000Z | 2019-01-23T08:44:33.000Z | backend/views/aws_model_view_set.py | snickerjp/naruko | 4c524e2ef955610a711830bc86d730ffe4fc2bd8 | [
"MIT"
] | 6 | 2019-01-23T09:10:59.000Z | 2020-12-02T04:15:41.000Z | from rest_framework.viewsets import ViewSet
from backend.models import AwsEnvironmentModel, TenantModel
from backend.serializers.aws_environment_model_serializer import (AwsEnvironmentModelGetDetailSerializer,
AwsEnvironmentModelCreateSerializer,
... | 48.871795 | 116 | 0.695435 | from rest_framework.viewsets import ViewSet
from backend.models import AwsEnvironmentModel, TenantModel
from backend.serializers.aws_environment_model_serializer import (AwsEnvironmentModelGetDetailSerializer,
AwsEnvironmentModelCreateSerializer,
... | 2,686 | 399 | 24 |
106c341a5d8629033f9f396ac74dcbbce0511048 | 458 | py | Python | setup.py | openabis/openabis-fingerjetfx | 869eadd23a21a34dad6da69e26e2993495ddc7ba | [
"Apache-2.0"
] | 2 | 2021-09-13T18:34:33.000Z | 2021-10-30T19:18:32.000Z | setup.py | openabis/openabis-fingerjetfx | 869eadd23a21a34dad6da69e26e2993495ddc7ba | [
"Apache-2.0"
] | 2 | 2021-06-08T20:35:40.000Z | 2022-01-13T01:48:52.000Z | setup.py | openabis/openabis-fingerjetfx | 869eadd23a21a34dad6da69e26e2993495ddc7ba | [
"Apache-2.0"
] | null | null | null | from distutils.core import setup
setup(
name='openabis-fingerjetfx',
version='0.0.1',
packages=['openabis_fingerjetfx'],
url='https://github.com/newlogic42/openabis-fingerjetfx',
license='Apache License',
author='newlogic42',
author_email='',
description='OpenAbis\' plugin implementatio... | 24.105263 | 85 | 0.641921 | from distutils.core import setup
setup(
name='openabis-fingerjetfx',
version='0.0.1',
packages=['openabis_fingerjetfx'],
url='https://github.com/newlogic42/openabis-fingerjetfx',
license='Apache License',
author='newlogic42',
author_email='',
description='OpenAbis\' plugin implementatio... | 0 | 0 | 0 |
857d84388f45bda63af9b6545aeac3ca456dc9df | 4,050 | py | Python | cpu.py | WorldsApartDevTeam/py-snes | fc0c5be44a0ac8ef560f94eb5b0a29823666c4af | [
"MIT"
] | null | null | null | cpu.py | WorldsApartDevTeam/py-snes | fc0c5be44a0ac8ef560f94eb5b0a29823666c4af | [
"MIT"
] | null | null | null | cpu.py | WorldsApartDevTeam/py-snes | fc0c5be44a0ac8ef560f94eb5b0a29823666c4af | [
"MIT"
] | null | null | null | import memory
import instructions
cpu_flags = {
"N": 0x80, # negative
"V": 0x40, # overflow
"M": 0x20, # accumulator size (set => 8bits)
"X": 0x10, # index size (set => 8bits)
"D": 0x08, # decimal flag (does nothing on SNES, I think)
"I": 0x04, # IRQ disabled when set
"Z": 0x02, # zero
... | 28.125 | 85 | 0.53037 | import memory
import instructions
cpu_flags = {
"N": 0x80, # negative
"V": 0x40, # overflow
"M": 0x20, # accumulator size (set => 8bits)
"X": 0x10, # index size (set => 8bits)
"D": 0x08, # decimal flag (does nothing on SNES, I think)
"I": 0x04, # IRQ disabled when set
"Z": 0x02, # zero
... | 1,747 | 1,838 | 46 |
68036449168a00a08f919bb1b733ec487866094f | 3,778 | py | Python | camera_calibration.py | zyfccc/Spectral-Illumination-Correction-Achieving-Relative-Color-Constancy-Under-the-Spectral-Domain | 051af9662dbe53deaf2d493fe8dbf0c9adce7ccb | [
"MIT"
] | 8 | 2019-12-17T15:07:17.000Z | 2021-08-19T09:13:58.000Z | camera_calibration.py | zyfccc/Spectral-Illumination-Correction-Achieving-Relative-Color-Constancy-Under-the-Spectral-Domain | 051af9662dbe53deaf2d493fe8dbf0c9adce7ccb | [
"MIT"
] | null | null | null | camera_calibration.py | zyfccc/Spectral-Illumination-Correction-Achieving-Relative-Color-Constancy-Under-the-Spectral-Domain | 051af9662dbe53deaf2d493fe8dbf0c9adce7ccb | [
"MIT"
] | 3 | 2020-01-06T04:20:55.000Z | 2020-01-25T08:42:30.000Z | import cv2
import json
import statistics
import matplotlib.pyplot as plt
import numpy as np
import libs.method.QcImage as QcImage
import libs.method.SICCalibrationRegression_MB3 as SICCalibrationRegression_MB3
from libs.model.TrainingSet import TrainingSet
JSON_PATH = 'Dataset/data_color_chart/tags.json'
IMAGE_PATH =... | 30.967213 | 83 | 0.593965 | import cv2
import json
import statistics
import matplotlib.pyplot as plt
import numpy as np
import libs.method.QcImage as QcImage
import libs.method.SICCalibrationRegression_MB3 as SICCalibrationRegression_MB3
from libs.model.TrainingSet import TrainingSet
JSON_PATH = 'Dataset/data_color_chart/tags.json'
IMAGE_PATH =... | 0 | 0 | 0 |
50e801d52e406df4ca9071d550d4975d7ffab046 | 621 | py | Python | setup.py | im-na02/melke | f25a08aafb52c596ff839799ac05b3dd336afc42 | [
"MIT"
] | 2 | 2020-10-10T07:05:37.000Z | 2020-11-26T08:31:07.000Z | setup.py | im-na02/melke | f25a08aafb52c596ff839799ac05b3dd336afc42 | [
"MIT"
] | null | null | null | setup.py | im-na02/melke | f25a08aafb52c596ff839799ac05b3dd336afc42 | [
"MIT"
] | null | null | null |
from setuptools import setup, find_packages
setup(name = 'MELKE',
version = '1',
description = 'Extract entities and relations from BIO-text',
long_description = 'You can read brief description of MELKE here: \nhttps://github.com/im-na02/melke/',
url = 'https://github.com/im-na02/melke/... | 32.684211 | 110 | 0.587762 |
from setuptools import setup, find_packages
setup(name = 'MELKE',
version = '1',
description = 'Extract entities and relations from BIO-text',
long_description = 'You can read brief description of MELKE here: \nhttps://github.com/im-na02/melke/',
url = 'https://github.com/im-na02/melke/... | 0 | 0 | 0 |
28d0f1dc82637d31f1d9cbb5b22536dc42f77318 | 45 | py | Python | tests/__init__.py | krahabb/motion_frontend | 57576cc95d5105b604b8b270d449b6bf9be54356 | [
"MIT"
] | null | null | null | tests/__init__.py | krahabb/motion_frontend | 57576cc95d5105b604b8b270d449b6bf9be54356 | [
"MIT"
] | null | null | null | tests/__init__.py | krahabb/motion_frontend | 57576cc95d5105b604b8b270d449b6bf9be54356 | [
"MIT"
] | null | null | null | """Tests for motion_frontend integration."""
| 22.5 | 44 | 0.755556 | """Tests for motion_frontend integration."""
| 0 | 0 | 0 |
93541fed16a76521b9e6ed4cde781c0fa86a2f6c | 398 | py | Python | ex104.py | felipesch92/PythonExercicios | 73edcbde6beaabcfc86af3dd6e58473f1eecabd3 | [
"MIT"
] | null | null | null | ex104.py | felipesch92/PythonExercicios | 73edcbde6beaabcfc86af3dd6e58473f1eecabd3 | [
"MIT"
] | null | null | null | ex104.py | felipesch92/PythonExercicios | 73edcbde6beaabcfc86af3dd6e58473f1eecabd3 | [
"MIT"
] | null | null | null | # Crie um programa que tenha a função leiaInt(), que vai funcionar
# de forma semelhante ‘a função input() do Python, só que fazendo a
# validação para aceitar apenas um valor numérico. Ex: n = leiaInt(‘Digite um n: ‘)
n = leiaInt('Número: ')
print(n) | 30.615385 | 83 | 0.663317 | # Crie um programa que tenha a função leiaInt(), que vai funcionar
# de forma semelhante ‘a função input() do Python, só que fazendo a
# validação para aceitar apenas um valor numérico. Ex: n = leiaInt(‘Digite um n: ‘)
def leiaInt(msg):
num = input(msg)
if num.isnumeric():
return int(num)
else:
... | 125 | 0 | 22 |
c6c6ce5278640388d7790acb0f21dac193c29b5a | 24,111 | py | Python | DataHandler.py | COE420Group4/Donation-Nation | 58d62bc3a28aba0ce2b484ad68329ac0bd0680f2 | [
"MIT"
] | null | null | null | DataHandler.py | COE420Group4/Donation-Nation | 58d62bc3a28aba0ce2b484ad68329ac0bd0680f2 | [
"MIT"
] | null | null | null | DataHandler.py | COE420Group4/Donation-Nation | 58d62bc3a28aba0ce2b484ad68329ac0bd0680f2 | [
"MIT"
] | null | null | null | # Import our database and initialize it
from db import DB
import send_email
import re
import hashlib
import uuid
import traceback
from datetime import datetime
from base64 import standard_b64encode
sql = DB()
sql.clear_db()
sql.init_db()
sql.populate()
# Checker function to check all form variables
# Checker functi... | 36.42145 | 380 | 0.690017 | # Import our database and initialize it
from db import DB
import send_email
import re
import hashlib
import uuid
import traceback
from datetime import datetime
from base64 import standard_b64encode
sql = DB()
sql.clear_db()
sql.init_db()
sql.populate()
# Checker function to check all form variables
def check_form(fo... | 22,562 | 7 | 989 |
db78e595d47bb20e71fcc8360f4c0e8c6f29044c | 327 | py | Python | js/json2/__init__.py | fanstatic/js.json | 907c75b0867930fefba839cdaad3de22286d279d | [
"BSD-3-Clause"
] | null | null | null | js/json2/__init__.py | fanstatic/js.json | 907c75b0867930fefba839cdaad3de22286d279d | [
"BSD-3-Clause"
] | null | null | null | js/json2/__init__.py | fanstatic/js.json | 907c75b0867930fefba839cdaad3de22286d279d | [
"BSD-3-Clause"
] | null | null | null | from fanstatic import Library, Resource
from fanstatic.core import render_js
library = Library('json2', 'resources')
def earlier_than_ie8(url):
"""Native JSON support was introduced in IE8."""
return '<!--[if lt IE 8]>%s<![endif]-->' % render_js(url)
json2 = Resource(library, 'json2.js', renderer=earlier_tha... | 29.727273 | 64 | 0.712538 | from fanstatic import Library, Resource
from fanstatic.core import render_js
library = Library('json2', 'resources')
def earlier_than_ie8(url):
"""Native JSON support was introduced in IE8."""
return '<!--[if lt IE 8]>%s<![endif]-->' % render_js(url)
json2 = Resource(library, 'json2.js', renderer=earlier_tha... | 0 | 0 | 0 |
74ced1dbbb7b86d316e596ebb0e42efcb2687c49 | 45 | py | Python | gears/compilers/__init__.py | gears/gears | 5729c2525a8c04c185e998bd9a86233708972921 | [
"0BSD"
] | 9 | 2015-03-23T15:34:04.000Z | 2021-03-19T03:03:48.000Z | gears/compilers/__init__.py | gears/gears | 5729c2525a8c04c185e998bd9a86233708972921 | [
"0BSD"
] | 2 | 2015-08-31T03:19:27.000Z | 2016-01-20T09:54:01.000Z | gears/compilers/__init__.py | gears/gears | 5729c2525a8c04c185e998bd9a86233708972921 | [
"0BSD"
] | 3 | 2015-02-01T06:21:24.000Z | 2015-07-30T02:31:31.000Z | from .base import BaseCompiler, ExecCompiler
| 22.5 | 44 | 0.844444 | from .base import BaseCompiler, ExecCompiler
| 0 | 0 | 0 |
ea39ce6ed581ea5749f8a481a06db78673172cb8 | 1,148 | py | Python | sim_swiss.py | geordanr/tourneysim | cea8ee3ea60b9e622b2338d46b98b673d05bc0a2 | [
"MIT"
] | null | null | null | sim_swiss.py | geordanr/tourneysim | cea8ee3ea60b9e622b2338d46b98b673d05bc0a2 | [
"MIT"
] | null | null | null | sim_swiss.py | geordanr/tourneysim | cea8ee3ea60b9e622b2338d46b98b673d05bc0a2 | [
"MIT"
] | null | null | null | '''Swiss pairing simulation'''
import matplotlib
matplotlib.use('SVG')
import matplotlib.pyplot as plt
import numpy as np
from tournament import SwissTournament, PairingError
if __name__ == '__main__':
main()
| 31.027027 | 95 | 0.680314 | '''Swiss pairing simulation'''
import matplotlib
matplotlib.use('SVG')
import matplotlib.pyplot as plt
import numpy as np
from tournament import SwissTournament, PairingError
def main():
# SwissTournament.performance_sigma = 2
num_iterations = 1000
num_players = 64
tournament_points = np.empty([num_i... | 910 | 0 | 23 |
973f09129ea0344a429f65f36474f379bbe8c43b | 638 | py | Python | LabCalc/Ex02/plot.py | giuuliorusso/uni-physics | 11939b34cb09ca579d9e45fa224b23db0fb7e4f9 | [
"MIT"
] | 2 | 2020-11-06T15:45:46.000Z | 2020-11-08T15:52:15.000Z | LabCalc/Ex02/plot.py | giuuliorusso/uni-physics | 11939b34cb09ca579d9e45fa224b23db0fb7e4f9 | [
"MIT"
] | null | null | null | LabCalc/Ex02/plot.py | giuuliorusso/uni-physics | 11939b34cb09ca579d9e45fa224b23db0fb7e4f9 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
t, x, y = np.loadtxt("out/traiettoria.dat", skiprows=1, unpack=True)
# Traiettoria
plt.figure(figsize=(5, 5))
plt.plot(x, y, "-o", color="tab:blue", markersize=3)
plt.title("Traiettoria")
plt.xlabel("x(t)")
plt.ylabel("y(t)")
plt.savefig("out/traiettoria")
# x
plt.... | 18.228571 | 68 | 0.652038 | import matplotlib.pyplot as plt
import numpy as np
t, x, y = np.loadtxt("out/traiettoria.dat", skiprows=1, unpack=True)
# Traiettoria
plt.figure(figsize=(5, 5))
plt.plot(x, y, "-o", color="tab:blue", markersize=3)
plt.title("Traiettoria")
plt.xlabel("x(t)")
plt.ylabel("y(t)")
plt.savefig("out/traiettoria")
# x
plt.... | 0 | 0 | 0 |
860a5571e29f5dffb1eb769b525b0bee732faa7d | 9,185 | py | Python | src/main.py | igor97100/tf2up | d45d449f4f0cf325b758b0023fc2654c5232fe70 | [
"MIT"
] | null | null | null | src/main.py | igor97100/tf2up | d45d449f4f0cf325b758b0023fc2654c5232fe70 | [
"MIT"
] | null | null | null | src/main.py | igor97100/tf2up | d45d449f4f0cf325b758b0023fc2654c5232fe70 | [
"MIT"
] | null | null | null | """Simple wrapper to upgrade the files by github URL"""
import json
import logging
import os
import re
import shutil
import subprocess
import urllib
from hashlib import md5
from typing import Tuple, List
import requests
import tensorflow as tf
# TODO: install file properly with `pip install -e .`
import sys
sys.pat... | 31.892361 | 91 | 0.615133 | """Simple wrapper to upgrade the files by github URL"""
import json
import logging
import os
import re
import shutil
import subprocess
import urllib
from hashlib import md5
from typing import Tuple, List
import requests
import tensorflow as tf
# TODO: install file properly with `pip install -e .`
import sys
sys.pat... | 241 | 0 | 54 |
3117f09b419d9cef11d0b9cd97028c681b2e4929 | 177 | py | Python | A/resolve.py | staguchi0703/ABC174 | 7afa7c72cb26653808947538dbeaa9cb386f16af | [
"MIT"
] | null | null | null | A/resolve.py | staguchi0703/ABC174 | 7afa7c72cb26653808947538dbeaa9cb386f16af | [
"MIT"
] | null | null | null | A/resolve.py | staguchi0703/ABC174 | 7afa7c72cb26653808947538dbeaa9cb386f16af | [
"MIT"
] | null | null | null | def resolve():
'''
code here
'''
X = int(input())
if X >= 30:
print('Yes')
else:
print('No')
if __name__ == "__main__":
resolve()
| 11.8 | 26 | 0.429379 | def resolve():
'''
code here
'''
X = int(input())
if X >= 30:
print('Yes')
else:
print('No')
if __name__ == "__main__":
resolve()
| 0 | 0 | 0 |
2c59b084e6e7d905719a8cb30cf5382be7e6db57 | 405 | py | Python | twistedbot/plugins/core/chat_follow.py | lukleh/TwistedBot | 310509c037335845838e699f9f9d56af117e03c9 | [
"MIT"
] | 12 | 2015-01-21T00:24:06.000Z | 2021-07-01T03:06:39.000Z | twistedbot/plugins/core/chat_follow.py | lukleh/TwistedBot | 310509c037335845838e699f9f9d56af117e03c9 | [
"MIT"
] | 1 | 2015-01-21T00:23:24.000Z | 2015-01-21T20:21:09.000Z | twistedbot/plugins/core/chat_follow.py | lukleh/TwistedBot | 310509c037335845838e699f9f9d56af117e03c9 | [
"MIT"
] | 2 | 2015-01-20T21:31:10.000Z | 2018-06-19T09:12:04.000Z |
from twistedbot.plugins.base import PluginChatBase
from twistedbot.behavior_tree import FollowPlayer
plugin = Follow
| 20.25 | 62 | 0.718519 |
from twistedbot.plugins.base import PluginChatBase
from twistedbot.behavior_tree import FollowPlayer
class Follow(PluginChatBase):
@property
def command_verb(self):
return "follow"
@property
def help(self):
return "bot starts following you"
def command(self, sender, command, arg... | 145 | 116 | 23 |
d93a810f176bb70d03d48e1e3ea61908e1fdda6d | 914 | py | Python | tests/db/data/system_data.py | jamespfennell/realtimerail | 352dd7d185d3501d28276476e1390d3288735690 | [
"MIT"
] | 10 | 2018-10-25T13:07:42.000Z | 2022-02-08T20:49:07.000Z | tests/db/data/system_data.py | jamespfennell/realtimerail | 352dd7d185d3501d28276476e1390d3288735690 | [
"MIT"
] | 80 | 2019-04-06T23:01:44.000Z | 2022-02-05T23:35:54.000Z | tests/db/data/system_data.py | jamespfennell/realtimerail | 352dd7d185d3501d28276476e1390d3288735690 | [
"MIT"
] | 3 | 2021-05-07T16:43:39.000Z | 2021-07-15T18:06:07.000Z | import pytest
from transiter.db import models
@pytest.fixture
@pytest.fixture
@pytest.fixture
@pytest.fixture
| 20.772727 | 87 | 0.601751 | import pytest
from transiter.db import models
@pytest.fixture
def system_1(add_model):
return add_model(
models.System(
pk=1, id="2", status=models.System.SystemStatus.ACTIVE, name="System 1"
)
)
@pytest.fixture
def system_2(add_model):
return add_model(
models.Syste... | 707 | 0 | 88 |
8ce2e728b9e0427b8494a7449751f3f4fb8788cf | 4,934 | py | Python | zincbase/graph/Edge.py | complexdb/zincbase | 0c8ce46bc392dfa8ee99414877adb3b41648451e | [
"MIT"
] | 174 | 2020-02-04T08:36:09.000Z | 2022-01-03T15:53:05.000Z | zincbase/graph/Edge.py | complexdb/zincbase | 0c8ce46bc392dfa8ee99414877adb3b41648451e | [
"MIT"
] | 6 | 2020-02-08T18:11:36.000Z | 2021-03-07T20:00:20.000Z | zincbase/graph/Edge.py | complexdb/zincbase | 0c8ce46bc392dfa8ee99414877adb3b41648451e | [
"MIT"
] | 22 | 2020-02-07T03:17:17.000Z | 2022-03-08T15:02:18.000Z | from collections import defaultdict
import copy
import networkx as nx
from zincbase import context
class Edge:
"""Class representing an edge in the KB.
"""
@property
def nodes(self):
"""Return the nodes that this edge is connected to as tuple of (subject, object)
"""
return [... | 34.992908 | 109 | 0.585732 | from collections import defaultdict
import copy
import networkx as nx
from zincbase import context
class Edge:
"""Class representing an edge in the KB.
"""
def __init__(self, sub, pred, ob, data={}, watches=[]):
super().__setattr__('_name', str(sub) + '___' + str(pred) + '___' + str(ob))
... | 2,037 | 0 | 320 |
86c69a45f72b481968e7937e112e92137f543764 | 53,829 | py | Python | dataloader/dataset.py | XiaoJake/DS-Net | 8400da1bd7c7b1ccf4d5c6782b86372957e79a6b | [
"MIT"
] | null | null | null | dataloader/dataset.py | XiaoJake/DS-Net | 8400da1bd7c7b1ccf4d5c6782b86372957e79a6b | [
"MIT"
] | null | null | null | dataloader/dataset.py | XiaoJake/DS-Net | 8400da1bd7c7b1ccf4d5c6782b86372957e79a6b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
SemKITTI dataloader
"""
import os
import numpy as np
import torch
import random
import time
import numba as nb
import yaml
import pickle
from torch.utils import data
from tqdm import tqdm
from scipy import stats as s
from os.path import join
# load Semantic KITTI clas... | 41.598918 | 208 | 0.582734 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
SemKITTI dataloader
"""
import os
import numpy as np
import torch
import random
import time
import numba as nb
import yaml
import pickle
from torch.utils import data
from tqdm import tqdm
from scipy import stats as s
from os.path import join
# load Semantic KITTI clas... | 25,717 | 26,275 | 388 |
53798844621efdda39001d96aea1bde606980017 | 2,151 | py | Python | tests/test_utils_serialized.py | cwichel/embutils | 188d86d84637088bafef188b3312078048934113 | [
"MIT"
] | null | null | null | tests/test_utils_serialized.py | cwichel/embutils | 188d86d84637088bafef188b3312078048934113 | [
"MIT"
] | null | null | null | tests/test_utils_serialized.py | cwichel/embutils | 188d86d84637088bafef188b3312078048934113 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: ascii -*-
"""
Serialized usage test.
:date: 2021
:author: Christian Wiche
:contact: cwichel@gmail.com
:license: The MIT License (MIT)
"""
import unittest
from examples.stream_setup import SimplePacket
from embutils.utils import CRC
# -->> Definitions <<-----------------... | 27.935065 | 96 | 0.609484 | #!/usr/bin/python
# -*- coding: ascii -*-
"""
Serialized usage test.
:date: 2021
:author: Christian Wiche
:contact: cwichel@gmail.com
:license: The MIT License (MIT)
"""
import unittest
from examples.stream_setup import SimplePacket
from embutils.utils import CRC
# -->> Definitions <<-----------------... | 0 | 0 | 0 |
7cc74888d6101a1254757e95a5e30b2406237e2a | 22,720 | py | Python | src/sentry/models/release.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | 1 | 2019-10-17T17:46:16.000Z | 2019-10-17T17:46:16.000Z | src/sentry/models/release.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/models/release.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, print_function
import logging
import re
import six
import itertools
from django.db import models, IntegrityError, transaction
from django.db.models import F
from django.utils import timezone
from time import time
from sentry.app import locks
from sentry.db.models import (
... | 37.553719 | 99 | 0.548636 | from __future__ import absolute_import, print_function
import logging
import re
import six
import itertools
from django.db import models, IntegrityError, transaction
from django.db.models import F
from django.utils import timezone
from time import time
from sentry.app import locks
from sentry.db.models import (
... | 7,134 | 452 | 287 |
99f7d22741a69a05f92fb1e23cbfa5c23a93ecba | 992 | py | Python | 02/01/startswith.py | pylangstudy/201708 | 126b1af96a1d1f57522d5a1d435b58597bea2e57 | [
"CC0-1.0"
] | null | null | null | 02/01/startswith.py | pylangstudy/201708 | 126b1af96a1d1f57522d5a1d435b58597bea2e57 | [
"CC0-1.0"
] | 39 | 2017-07-31T22:54:01.000Z | 2017-08-31T00:19:03.000Z | 02/01/startswith.py | pylangstudy/201708 | 126b1af96a1d1f57522d5a1d435b58597bea2e57 | [
"CC0-1.0"
] | null | null | null | print('abc'.startswith('a'))
print('abc'.startswith('b'))
print('abc'.startswith('c'))
print('abc'.startswith('bc'))
print('abc'.startswith('abc'))
print('aBc'.casefold().startswith(('b', 'c')))
print('aBc'.casefold().startswith(('x', 'y')))
print('aBc'.casefold().startswith('A'.casefold()))
print('aBc'.casefold().st... | 29.176471 | 52 | 0.650202 | print('abc'.startswith('a'))
print('abc'.startswith('b'))
print('abc'.startswith('c'))
print('abc'.startswith('bc'))
print('abc'.startswith('abc'))
print('aBc'.casefold().startswith(('b', 'c')))
print('aBc'.casefold().startswith(('x', 'y')))
print('aBc'.casefold().startswith('A'.casefold()))
print('aBc'.casefold().st... | 0 | 0 | 0 |
cfe1dfed89332ce52c13620ed1c784c81c5d3d5c | 398 | py | Python | Esercizio 1/Codice/ex1.py | SymonLM/LabCalc1 | f30d5b37678e2b4ef15e8dea536aef6df30e08b4 | [
"Unlicense"
] | 7 | 2021-12-10T23:56:03.000Z | 2022-01-03T19:20:45.000Z | Esercizio 1/Codice/ex1.py | SymonLM/LabCalc1 | f30d5b37678e2b4ef15e8dea536aef6df30e08b4 | [
"Unlicense"
] | 4 | 2021-12-19T08:02:16.000Z | 2021-12-19T21:52:17.000Z | Esercizio 1/Codice/ex1.py | SymonLM/LabCalc1 | f30d5b37678e2b4ef15e8dea536aef6df30e08b4 | [
"Unlicense"
] | 1 | 2021-12-19T11:02:50.000Z | 2021-12-19T11:02:50.000Z | import matplotlib.pyplot as plt
import numpy as np
plt.title('Un primo plot con Python')
x, y = np.loadtxt('ex1.dat', unpack=True)
plt.plot(x ,y, 'o-.b', label='Temperature Convertite')
plt.xlim((-10,130)) # intervallo lungo asse x
plt.ylim((10,250)) # intervallo lungo asse y
plt.xlabel('Temperature Celsius')
plt.yl... | 33.166667 | 55 | 0.723618 | import matplotlib.pyplot as plt
import numpy as np
plt.title('Un primo plot con Python')
x, y = np.loadtxt('ex1.dat', unpack=True)
plt.plot(x ,y, 'o-.b', label='Temperature Convertite')
plt.xlim((-10,130)) # intervallo lungo asse x
plt.ylim((10,250)) # intervallo lungo asse y
plt.xlabel('Temperature Celsius')
plt.yl... | 0 | 0 | 0 |
d3f9dd1da4670ee11e553ff68eef69aec911d3ad | 2,591 | py | Python | tests/system/web/api_1_0/resources/test_software.py | dimensigon/dimensigon | 079d7c91a66e10f13510d89844fbadb27e005b40 | [
"Apache-2.0"
] | 2 | 2020-11-20T10:27:14.000Z | 2021-02-21T13:57:56.000Z | tests/system/web/api_1_0/resources/test_software.py | dimensigon/dimensigon | 079d7c91a66e10f13510d89844fbadb27e005b40 | [
"Apache-2.0"
] | null | null | null | tests/system/web/api_1_0/resources/test_software.py | dimensigon/dimensigon | 079d7c91a66e10f13510d89844fbadb27e005b40 | [
"Apache-2.0"
] | null | null | null | import os
from flask import url_for
from dimensigon.domain.entities import Software, Server
from dimensigon.utils.helpers import md5
from dimensigon.web import db
from tests.base import TestResourceBase
| 43.183333 | 121 | 0.642995 | import os
from flask import url_for
from dimensigon.domain.entities import Software, Server
from dimensigon.utils.helpers import md5
from dimensigon.web import db
from tests.base import TestResourceBase
class TestSoftwareList(TestResourceBase):
def fill_database(self):
self.soft1 = Software(id='1111111... | 2,207 | 20 | 158 |
d4e2aaf92bc444dd9c87d874c3f7b979927592ea | 183 | py | Python | detection_spam_project/clustering/urls.py | Altraya/detection_spam | 92404ab9fad5398ac17df885d559a6d96630db1d | [
"MIT"
] | null | null | null | detection_spam_project/clustering/urls.py | Altraya/detection_spam | 92404ab9fad5398ac17df885d559a6d96630db1d | [
"MIT"
] | null | null | null | detection_spam_project/clustering/urls.py | Altraya/detection_spam | 92404ab9fad5398ac17df885d559a6d96630db1d | [
"MIT"
] | null | null | null | from django.conf.urls import url, patterns
from . import views
urlpatterns = patterns('clustering.views',
url(r'^accueil$', 'home'),
url(r'^screen/(\d+)$', views.view_screen),
)
| 22.875 | 44 | 0.688525 | from django.conf.urls import url, patterns
from . import views
urlpatterns = patterns('clustering.views',
url(r'^accueil$', 'home'),
url(r'^screen/(\d+)$', views.view_screen),
)
| 0 | 0 | 0 |
0c1ae7368dcabf173521979dc546a65b378c1f59 | 1,829 | py | Python | setup.py | STARS4ALL/tessdb-import | 424569d66f2ff6f04f2b172d92278524aa0d0c12 | [
"MIT"
] | null | null | null | setup.py | STARS4ALL/tessdb-import | 424569d66f2ff6f04f2b172d92278524aa0d0c12 | [
"MIT"
] | null | null | null | setup.py | STARS4ALL/tessdb-import | 424569d66f2ff6f04f2b172d92278524aa0d0c12 | [
"MIT"
] | null | null | null | import os
import os.path
from setuptools import setup, Extension
import versioneer
# Default description in markdown
LONG_DESCRIPTION = open('README.md').read()
PKG_NAME = 'tessdb-cmdline'
AUTHOR = 'Rafael Gonzalez'
AUTHOR_EMAIL = 'astrorafael@yahoo.es'
DESCRIPTION = 'tessdb command line tool to manage t... | 27.298507 | 68 | 0.598688 | import os
import os.path
from setuptools import setup, Extension
import versioneer
# Default description in markdown
LONG_DESCRIPTION = open('README.md').read()
PKG_NAME = 'tessdb-cmdline'
AUTHOR = 'Rafael Gonzalez'
AUTHOR_EMAIL = 'astrorafael@yahoo.es'
DESCRIPTION = 'tessdb command line tool to manage t... | 0 | 0 | 0 |
33956487d1a7473e4e9523d340a69d50a0cca0c9 | 5,303 | py | Python | replace_text_with_number.py | nacbotics5/web-scraping-with-python | 5c5d89d58173ee2e6491283d7d5ba0a413d6961c | [
"BSD-3-Clause"
] | 3 | 2019-07-03T13:10:21.000Z | 2020-01-09T10:34:12.000Z | replace_text_with_number.py | nacbotics5/web-scraping-with-python | 5c5d89d58173ee2e6491283d7d5ba0a413d6961c | [
"BSD-3-Clause"
] | null | null | null | replace_text_with_number.py | nacbotics5/web-scraping-with-python | 5c5d89d58173ee2e6491283d7d5ba0a413d6961c | [
"BSD-3-Clause"
] | 1 | 2021-11-08T18:53:12.000Z | 2021-11-08T18:53:12.000Z | #-*-coding:utf8;-*-
import re
from random import choice
class sub(object):
""" a simple text to number evaluating class """
def text_to_number(self,text):
'''convert a number written as text to its real number equivalence'''
text = text.lower()
text = re.sub(r"ten", "10", text)
... | 44.191667 | 77 | 0.51518 | #-*-coding:utf8;-*-
import re
from random import choice
class sub(object):
""" a simple text to number evaluating class """
def text_to_number(self,text):
'''convert a number written as text to its real number equivalence'''
text = text.lower()
text = re.sub(r"ten", "10", text)
... | 0 | 0 | 0 |
2fb3b7760ce16f04dae9b780bc957d0768081080 | 1,106 | py | Python | examples/messaging_interactions_transcripts_example.py | estvar19x84/liveperson-api-python-wrapper | 27d8575f542ba029521e7d995bbabb5c4b90d131 | [
"MIT"
] | 1 | 2020-04-06T04:47:18.000Z | 2020-04-06T04:47:18.000Z | examples/messaging_interactions_transcripts_example.py | estvar19x84/liveperson-api-python-wrapper | 27d8575f542ba029521e7d995bbabb5c4b90d131 | [
"MIT"
] | null | null | null | examples/messaging_interactions_transcripts_example.py | estvar19x84/liveperson-api-python-wrapper | 27d8575f542ba029521e7d995bbabb5c4b90d131 | [
"MIT"
] | null | null | null | """
This example shows how to create a Messaging Interactions transcripts CSV flat file from the lp_api_wrapper library.
"""
from lp_api_wrapper import MessagingInteractions, UserLogin
from datetime import datetime, timedelta
import pandas as pd
# For User Login
auth = UserLogin(account_id='1234', username='YOURUSERN... | 29.891892 | 116 | 0.764919 | """
This example shows how to create a Messaging Interactions transcripts CSV flat file from the lp_api_wrapper library.
"""
from lp_api_wrapper import MessagingInteractions, UserLogin
from datetime import datetime, timedelta
import pandas as pd
# For User Login
auth = UserLogin(account_id='1234', username='YOURUSERN... | 0 | 0 | 0 |
e4943d0cbf2264ece34b5f12fed6a79240a520d8 | 855 | py | Python | main.py | kagaya25/How-to-Auto-Login-to-Zoom-using-python- | d2f0d2025f143256edaaef4392dc5c5f653961d0 | [
"MIT"
] | 1 | 2020-11-18T03:51:16.000Z | 2020-11-18T03:51:16.000Z | main.py | kagaya25/How-to-Auto-Login-to-Zoom-using-python- | d2f0d2025f143256edaaef4392dc5c5f653961d0 | [
"MIT"
] | null | null | null | main.py | kagaya25/How-to-Auto-Login-to-Zoom-using-python- | d2f0d2025f143256edaaef4392dc5c5f653961d0 | [
"MIT"
] | null | null | null | from selenium import webdriver
from time import sleep
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options
usr=input('Enter Email Address :')
pwd=input('Enter Password:')
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get('http... | 27.580645 | 110 | 0.749708 | from selenium import webdriver
from time import sleep
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options
usr=input('Enter Email Address :')
pwd=input('Enter Password:')
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get('http... | 0 | 0 | 0 |
0a3917d97fa2bfb17855ede4f3e057d098a6cc11 | 339 | py | Python | resumes/migrations/0004_remove_contactdetails_address_2.py | USUDR2604/Django-ResumeBuilder | 0c6066d96fd20c029e5d5b0a447eaa5e8fc80fb6 | [
"MIT"
] | null | null | null | resumes/migrations/0004_remove_contactdetails_address_2.py | USUDR2604/Django-ResumeBuilder | 0c6066d96fd20c029e5d5b0a447eaa5e8fc80fb6 | [
"MIT"
] | null | null | null | resumes/migrations/0004_remove_contactdetails_address_2.py | USUDR2604/Django-ResumeBuilder | 0c6066d96fd20c029e5d5b0a447eaa5e8fc80fb6 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-07-12 05:08
from django.db import migrations
| 18.833333 | 47 | 0.60472 | # Generated by Django 3.2.5 on 2021-07-12 05:08
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('resumes', '0003_auto_20210712_1037'),
]
operations = [
migrations.RemoveField(
model_name='contactdetails',
name='Address_2'... | 0 | 233 | 23 |
605cf64194db6eb62f12a4193d0dc608c00f00c9 | 1,508 | py | Python | src/ecsim/scrapers/census.py | fillstaley/ecsim | f775c8a975dba7a372d0d0831bf8b54df7c27cb2 | [
"MIT"
] | null | null | null | src/ecsim/scrapers/census.py | fillstaley/ecsim | f775c8a975dba7a372d0d0831bf8b54df7c27cb2 | [
"MIT"
] | null | null | null | src/ecsim/scrapers/census.py | fillstaley/ecsim | f775c8a975dba7a372d0d0831bf8b54df7c27cb2 | [
"MIT"
] | null | null | null | from logging import getLogger
from pandas import read_html
# from ecsim._scrapers.base import state_names
logger = getLogger(__name__)
url = "https://en.wikipedia.org/wiki/List_of_U.S._states_and_territories_by_historical_population"
# if __name__ == "__main__":
# data = scrape_data()
# for foo, bar i... | 27.925926 | 98 | 0.659814 | from logging import getLogger
from pandas import read_html
# from ecsim._scrapers.base import state_names
logger = getLogger(__name__)
url = "https://en.wikipedia.org/wiki/List_of_U.S._states_and_territories_by_historical_population"
def scrape_data():
global url
logger.debug(f"Getting US Census data fr... | 1,021 | 0 | 46 |
488b4cc09de4a2a0e1ff3f23b837efa088af88f0 | 2,227 | py | Python | minio/versioningconfig.py | neuneck/minio-py | a964d8c92a2533c3dcd01530308577e7864928de | [
"Apache-2.0"
] | 1 | 2021-01-06T21:13:01.000Z | 2021-01-06T21:13:01.000Z | minio/versioningconfig.py | neuneck/minio-py | a964d8c92a2533c3dcd01530308577e7864928de | [
"Apache-2.0"
] | null | null | null | minio/versioningconfig.py | neuneck/minio-py | a964d8c92a2533c3dcd01530308577e7864928de | [
"Apache-2.0"
] | 1 | 2019-04-02T16:13:36.000Z | 2019-04-02T16:13:36.000Z | # -*- coding: utf-8 -*-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage, (C)
# 2020 MinIO, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 32.75 | 76 | 0.660979 | # -*- coding: utf-8 -*-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage, (C)
# 2020 MinIO, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 478 | 0 | 27 |
1d1ba8f14377a03c56514916211c087f53426980 | 10,296 | py | Python | applications/TrilinosApplication/tests/test_trilinos_levelset_convection.py | qaumann/Kratos | fd1702687997322d7a94642fb58e3453f7d4b002 | [
"BSD-4-Clause"
] | null | null | null | applications/TrilinosApplication/tests/test_trilinos_levelset_convection.py | qaumann/Kratos | fd1702687997322d7a94642fb58e3453f7d4b002 | [
"BSD-4-Clause"
] | null | null | null | applications/TrilinosApplication/tests/test_trilinos_levelset_convection.py | qaumann/Kratos | fd1702687997322d7a94642fb58e3453f7d4b002 | [
"BSD-4-Clause"
] | null | null | null | from __future__ import print_function, absolute_import, division
import os
import KratosMultiphysics
import KratosMultiphysics.KratosUnittest as KratosUnittest
import KratosMultiphysics.MetisApplication as MetisApplication
import KratosMultiphysics.TrilinosApplication as TrilinosApplication
import KratosMult... | 43.627119 | 145 | 0.634421 | from __future__ import print_function, absolute_import, division
import os
import KratosMultiphysics
import KratosMultiphysics.KratosUnittest as KratosUnittest
import KratosMultiphysics.MetisApplication as MetisApplication
import KratosMultiphysics.TrilinosApplication as TrilinosApplication
import KratosMult... | 9,274 | 97 | 295 |
8724b25b1724a09fb92755e931aac4227407a53f | 331 | py | Python | tools/regression/xsl_reports/utils/zip.py | zyiacas/boost-doc-zh | 689e5a3a0a4dbead1a960f7b039e3decda54aa2c | [
"BSL-1.0"
] | 198 | 2015-01-13T05:47:18.000Z | 2022-03-09T04:46:46.000Z | tools/regression/xsl_reports/utils/zip.py | sdfict/boost-doc-zh | 689e5a3a0a4dbead1a960f7b039e3decda54aa2c | [
"BSL-1.0"
] | 9 | 2015-01-28T16:33:19.000Z | 2020-04-12T23:03:28.000Z | tools/regression/xsl_reports/utils/zip.py | sdfict/boost-doc-zh | 689e5a3a0a4dbead1a960f7b039e3decda54aa2c | [
"BSL-1.0"
] | 139 | 2015-01-15T20:09:31.000Z | 2022-01-31T15:21:16.000Z |
import zipfile
import os.path
| 25.461538 | 70 | 0.60423 |
import zipfile
import os.path
def unzip( archive_path, result_dir ):
z = zipfile.ZipFile( archive_path, 'r', zipfile.ZIP_DEFLATED )
for f in z.infolist():
result = open( os.path.join( result_dir, f.filename ), 'wb' )
result.write( z.read( f.filename ) )
result.close()
... | 272 | 0 | 25 |
0149416f32756f6d9180e1150524f22901eedcfb | 85 | py | Python | docs/docs_settings.py | leukeleu/django-fiber-multilingual | 4574fffb953c442ff7981c16ea1d460784e38eab | [
"Apache-2.0"
] | 143 | 2015-01-06T01:15:22.000Z | 2017-07-08T04:10:08.000Z | docs/docs_settings.py | check4anjil/django-fiber | 48d1af8867e19b9e27332d2b98ca07a47927de15 | [
"Apache-2.0"
] | 44 | 2015-01-22T14:21:32.000Z | 2017-05-31T16:59:23.000Z | docs/docs_settings.py | check4anjil/django-fiber | 48d1af8867e19b9e27332d2b98ca07a47927de15 | [
"Apache-2.0"
] | 53 | 2015-01-21T21:48:49.000Z | 2017-06-12T07:33:13.000Z | # Mock settings file imported by sphinx when building docs
SECRET_KEY = 'not empty'
| 21.25 | 58 | 0.776471 | # Mock settings file imported by sphinx when building docs
SECRET_KEY = 'not empty'
| 0 | 0 | 0 |
0536bbd1db2cb05cededd1cb0edc40a6651c3fac | 3,442 | py | Python | model/decode_heads/encnet/encnet.py | UESTC-Liuxin/CVMI_Sementic_Segmentation | dc5bf6e940cf6961ef65abb6e7ec372f29d55249 | [
"Apache-2.0"
] | null | null | null | model/decode_heads/encnet/encnet.py | UESTC-Liuxin/CVMI_Sementic_Segmentation | dc5bf6e940cf6961ef65abb6e7ec372f29d55249 | [
"Apache-2.0"
] | null | null | null | model/decode_heads/encnet/encnet.py | UESTC-Liuxin/CVMI_Sementic_Segmentation | dc5bf6e940cf6961ef65abb6e7ec372f29d55249 | [
"Apache-2.0"
] | null | null | null | '''
Author: Liu Xin
Date: 2021-11-29 11:08:53
LastEditors: Liu Xin
LastEditTime: 2021-11-30 19:43:19
Description: file content
FilePath: /CVMI_Sementic_Segmentation/model/decode_heads/encnet/encnet.py
'''
'''
Author: Liu Xin
Date: 2021-11-29 11:08:53
LastEditors: Liu Xin
LastEditTime: 2021-11-30 19:31:07
Description: f... | 35.122449 | 95 | 0.606334 | '''
Author: Liu Xin
Date: 2021-11-29 11:08:53
LastEditors: Liu Xin
LastEditTime: 2021-11-30 19:43:19
Description: file content
FilePath: /CVMI_Sementic_Segmentation/model/decode_heads/encnet/encnet.py
'''
'''
Author: Liu Xin
Date: 2021-11-29 11:08:53
LastEditors: Liu Xin
LastEditTime: 2021-11-30 19:31:07
Description: f... | 2,330 | 8 | 151 |
5283b9315291930963962a4c5aded09fae094e29 | 2,671 | py | Python | universal/algos/tco.py | richmanbtc/universal-portfolios | cd9db76e8f039edafe256b9992e4e65bca96ba7d | [
"MIT"
] | 506 | 2015-01-14T22:34:19.000Z | 2022-03-29T18:36:55.000Z | universal/algos/tco.py | richmanbtc/universal-portfolios | cd9db76e8f039edafe256b9992e4e65bca96ba7d | [
"MIT"
] | 56 | 2015-07-10T15:34:51.000Z | 2022-03-23T22:18:50.000Z | universal/algos/tco.py | richmanbtc/universal-portfolios | cd9db76e8f039edafe256b9992e4e65bca96ba7d | [
"MIT"
] | 165 | 2015-02-07T05:09:38.000Z | 2022-03-29T18:36:57.000Z | import numpy as np
import numpy.typing as npt
from .. import tools
from ..algo import Algo
class TCO(Algo):
"""Transaction costs optimization. The TCO algorithm needs just a next return prediction
to work, see the paper for more details.
Paper : https://ink.library.smu.edu.sg/cgi/viewcontent.cgi?referer... | 26.979798 | 118 | 0.585548 | import numpy as np
import numpy.typing as npt
from .. import tools
from ..algo import Algo
class TCO(Algo):
"""Transaction costs optimization. The TCO algorithm needs just a next return prediction
to work, see the paper for more details.
Paper : https://ink.library.smu.edu.sg/cgi/viewcontent.cgi?referer... | 880 | -10 | 206 |
3bc7505fd36246309e9da9e7e9a9eb38727f649e | 1,690 | py | Python | floodsystem/plot.py | ak2380/Flood-Warning- | 3efe644a211607d64d9e2a82234e779f45e8d703 | [
"MIT"
] | null | null | null | floodsystem/plot.py | ak2380/Flood-Warning- | 3efe644a211607d64d9e2a82234e779f45e8d703 | [
"MIT"
] | null | null | null | floodsystem/plot.py | ak2380/Flood-Warning- | 3efe644a211607d64d9e2a82234e779f45e8d703 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import matplotlib
from datetime import datetime, timedelta
from floodsystem.analysis import polyfit
| 30.727273 | 107 | 0.681657 | import matplotlib.pyplot as plt
import numpy as np
import matplotlib
from datetime import datetime, timedelta
from floodsystem.analysis import polyfit
def plot_water_levels(station, dates, levels):
high = station.typical_range[1]
low = station.typical_range[0]
# Plot
plt.plot(dates, levels)
plt.h... | 1,492 | 0 | 46 |
a824ce5bc8d317e3044eda2945064609a32f467d | 11,348 | py | Python | solution.py | matanmula172/dragons-and-princesses | 553c6f602d344b169190849b2b9c5469d2d11a00 | [
"MIT"
] | null | null | null | solution.py | matanmula172/dragons-and-princesses | 553c6f602d344b169190849b2b9c5469d2d11a00 | [
"MIT"
] | null | null | null | solution.py | matanmula172/dragons-and-princesses | 553c6f602d344b169190849b2b9c5469d2d11a00 | [
"MIT"
] | null | null | null | import sys
import numpy as np
'''
This function parses the yaml input file, assuming the input is correct The parsing works in the following way:
given a correct file that defines len = n, the function returns two arrays of length n - cell_value_arr (beauty/num
coins in each cell) and cell_title_arr (princess or drag... | 38.467797 | 120 | 0.695012 | import sys
import numpy as np
'''
This function parses the yaml input file, assuming the input is correct The parsing works in the following way:
given a correct file that defines len = n, the function returns two arrays of length n - cell_value_arr (beauty/num
coins in each cell) and cell_title_arr (princess or drag... | 7,071 | 0 | 276 |
c2de931d8aae197294b54a447961099c0d687325 | 2,115 | py | Python | bin/Utils/PostInstallRoutines.py | juergenhoetzel/craft | 9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd | [
"BSD-2-Clause"
] | 55 | 2016-11-20T17:08:19.000Z | 2022-03-11T22:19:43.000Z | bin/Utils/PostInstallRoutines.py | juergenhoetzel/craft | 9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd | [
"BSD-2-Clause"
] | 17 | 2017-09-20T07:52:17.000Z | 2021-12-03T10:03:00.000Z | bin/Utils/PostInstallRoutines.py | juergenhoetzel/craft | 9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd | [
"BSD-2-Clause"
] | 29 | 2016-12-10T15:00:11.000Z | 2021-12-02T12:54:05.000Z | # -*- coding: utf-8 -*-
# Copyright Hannah von Reth <vonreth@kde.org>
#
# 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 copyright
# notice, this list of condi... | 45 | 93 | 0.722931 | # -*- coding: utf-8 -*-
# Copyright Hannah von Reth <vonreth@kde.org>
#
# 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 copyright
# notice, this list of condi... | 603 | 58 | 23 |
5e5d7d94b77b2f4cff2e387b15a916c86023be7e | 475 | py | Python | ora_tools/commands/info.py | henry4k/ora_tools | 82fdd959445cfcfd1d2cb6df2f6e5057566a4a79 | [
"Unlicense"
] | null | null | null | ora_tools/commands/info.py | henry4k/ora_tools | 82fdd959445cfcfd1d2cb6df2f6e5057566a4a79 | [
"Unlicense"
] | null | null | null | ora_tools/commands/info.py | henry4k/ora_tools | 82fdd959445cfcfd1d2cb6df2f6e5057566a4a79 | [
"Unlicense"
] | null | null | null | import argparse
import ora_tools as ora
| 29.6875 | 72 | 0.686316 | import argparse
import ora_tools as ora
def run(prog, description, args):
parser = argparse.ArgumentParser(prog=prog, description=description)
parser.add_argument('file')
args = parser.parse_args(args)
reader = ora.OraFileReader(args.file)
print(str.format('width: {}',reader.width))
print(str... | 412 | 0 | 23 |
b871837f7be9abf54bd661a9cff043abe1183a8f | 178 | py | Python | src/escape_rooms/escape_rooms/organizations_app/apps.py | ivelinakaraivanova/Escape_rooms | de13925ebf1062d3012c5a8ef99511573bb7968c | [
"MIT"
] | null | null | null | src/escape_rooms/escape_rooms/organizations_app/apps.py | ivelinakaraivanova/Escape_rooms | de13925ebf1062d3012c5a8ef99511573bb7968c | [
"MIT"
] | null | null | null | src/escape_rooms/escape_rooms/organizations_app/apps.py | ivelinakaraivanova/Escape_rooms | de13925ebf1062d3012c5a8ef99511573bb7968c | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 25.428571 | 56 | 0.797753 | from django.apps import AppConfig
class OrganizationsAppConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'escape_rooms.organizations_app'
| 0 | 120 | 23 |
70f5555205b4865a9c68461702364c2ad515b5e7 | 391 | py | Python | Python/packages/databricks-test/tests/context_test.py | anandmrya/DataOps | 1a671c707e27b30030687a2a88e5fa94374ce780 | [
"MIT"
] | 42 | 2019-12-04T04:10:53.000Z | 2022-03-31T13:04:17.000Z | Python/packages/databricks-test/tests/context_test.py | anandmrya/DataOps | 1a671c707e27b30030687a2a88e5fa94374ce780 | [
"MIT"
] | 2 | 2020-02-25T11:24:34.000Z | 2020-03-05T06:12:59.000Z | Python/packages/databricks-test/tests/context_test.py | anandmrya/DataOps | 1a671c707e27b30030687a2a88e5fa94374ce780 | [
"MIT"
] | 18 | 2020-01-25T06:25:08.000Z | 2021-11-16T08:40:09.000Z | import databricks_test
from databricks_test import SessionAlreadyExistsException
| 32.583333 | 73 | 0.705882 | import databricks_test
from databricks_test import SessionAlreadyExistsException
def test_forbidden_concurrent_sessions():
with databricks_test.session() as dbrickstest: # noqa: F841
try:
with databricks_test.session() as dbrickstest2: # noqa: F841
assert False, "should have ... | 286 | 0 | 23 |
14e775b9ad6127d6b0049366425561eeaccc2489 | 1,496 | py | Python | vivintpy/devices/switch.py | natekspencer/vivintpy | ea65b05871b3f13326ba370112357a6696793bf6 | [
"MIT"
] | 3 | 2022-02-10T14:08:59.000Z | 2022-03-30T18:55:25.000Z | vivintpy/devices/switch.py | natekspencer/pyvivint | ea65b05871b3f13326ba370112357a6696793bf6 | [
"MIT"
] | null | null | null | vivintpy/devices/switch.py | natekspencer/pyvivint | ea65b05871b3f13326ba370112357a6696793bf6 | [
"MIT"
] | 2 | 2021-10-31T01:43:26.000Z | 2021-11-21T13:33:55.000Z | """Module that implements the Switch class."""
from __future__ import annotations
from ..const import SwitchAttribute, ZWaveDeviceAttribute
from . import VivintDevice
class Switch(VivintDevice):
"""Represents a Vivint switch device."""
@property
def is_on(self) -> bool:
"""Return True if switch ... | 29.333333 | 88 | 0.64639 | """Module that implements the Switch class."""
from __future__ import annotations
from ..const import SwitchAttribute, ZWaveDeviceAttribute
from . import VivintDevice
class Switch(VivintDevice):
"""Represents a Vivint switch device."""
@property
def is_on(self) -> bool:
"""Return True if switch ... | 0 | 0 | 0 |
bd6b5ce29bd5833af3d7a202866f802b488a2c3a | 12,044 | py | Python | examples/test-alg.py | luoxiangyong/sprp | cfac1f3e86787bc1a3686b5112e991b7413bfa7b | [
"BSD-2-Clause"
] | null | null | null | examples/test-alg.py | luoxiangyong/sprp | cfac1f3e86787bc1a3686b5112e991b7413bfa7b | [
"BSD-2-Clause"
] | null | null | null | examples/test-alg.py | luoxiangyong/sprp | cfac1f3e86787bc1a3686b5112e991b7413bfa7b | [
"BSD-2-Clause"
] | null | null | null | from sprp.core.alg import *
from sprp.export.shapefile import *
if __name__ == "__main__":
slc = SimpleLineCalculator(116.23589,39.90387,116.25291,39.90391,**{
"cameraWidth": 4000,
"cameraHeight":3000,
"focusLength":35,
"pixelSize":2,
"gsd":0.05,
"flightSpeed":80,
... | 35.528024 | 100 | 0.614912 | from sprp.core.alg import *
from sprp.export.shapefile import *
if __name__ == "__main__":
slc = SimpleLineCalculator(116.23589,39.90387,116.25291,39.90391,**{
"cameraWidth": 4000,
"cameraHeight":3000,
"focusLength":35,
"pixelSize":2,
"gsd":0.05,
"flightSpeed":80,
... | 9,190 | 0 | 114 |
32899b5f613e38cb4ca971a6b6f01f29369c98af | 2,379 | py | Python | django_kwalitee/management/commands/test.py | lincolnloop/django-kwalitee | 6f5fb8a2e44fdf8508700a8935b54c1b22c3c493 | [
"BSD-3-Clause"
] | 2 | 2015-09-28T10:08:16.000Z | 2015-11-08T11:32:55.000Z | django_kwalitee/management/commands/test.py | lincolnloop/django-kwalitee | 6f5fb8a2e44fdf8508700a8935b54c1b22c3c493 | [
"BSD-3-Clause"
] | null | null | null | django_kwalitee/management/commands/test.py | lincolnloop/django-kwalitee | 6f5fb8a2e44fdf8508700a8935b54c1b22c3c493 | [
"BSD-3-Clause"
] | null | null | null | import sys
from optparse import make_option
from django.core import management
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db.models import get_apps
from django_kwalitee.testrunners import get_runner | 39 | 83 | 0.642287 | import sys
from optparse import make_option
from django.core import management
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db.models import get_apps
from django_kwalitee.testrunners import get_runner
class Command(BaseCommand):
option_list = BaseCommand.option... | 1,363 | 739 | 23 |
d7c042c4f93d725a2d87b7099782de3718b57898 | 1,847 | py | Python | 题源分类/LeetCode/LeetCode日刷/python/76.最小覆盖子串.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | 题源分类/LeetCode/LeetCode日刷/python/76.最小覆盖子串.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | 题源分类/LeetCode/LeetCode日刷/python/76.最小覆盖子串.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode.cn id=76 lang=python3
#
# [76] 最小覆盖子串
#
# https://leetcode-cn.com/problems/minimum-window-substring/description/
#
# algorithms
# Hard (38.57%)
# Likes: 701
# Dislikes: 0
# Total Accepted: 72K
# Total Submissions: 186K
# Testcase Example: '"ADOBECODEBANC"\n"ABC"'
#
# 给你一个字符串 S、一个字符串 T 。请你设计一... | 22.52439 | 74 | 0.406064 | #
# @lc app=leetcode.cn id=76 lang=python3
#
# [76] 最小覆盖子串
#
# https://leetcode-cn.com/problems/minimum-window-substring/description/
#
# algorithms
# Hard (38.57%)
# Likes: 701
# Dislikes: 0
# Total Accepted: 72K
# Total Submissions: 186K
# Testcase Example: '"ADOBECODEBANC"\n"ABC"'
#
# 给你一个字符串 S、一个字符串 T 。请你设计一... | 564 | 58 | 22 |
e51dab5a6d0ee2d6fb561e01a4461596d41a9b00 | 913 | py | Python | amuustr-beseda-str-flood.py | Tripl0Color/Amuuterasuu-STR | e3ed7bab5ebf7570e9247e5a285c06f287a45bea | [
"Unlicense"
] | null | null | null | amuustr-beseda-str-flood.py | Tripl0Color/Amuuterasuu-STR | e3ed7bab5ebf7570e9247e5a285c06f287a45bea | [
"Unlicense"
] | null | null | null | amuustr-beseda-str-flood.py | Tripl0Color/Amuuterasuu-STR | e3ed7bab5ebf7570e9247e5a285c06f287a45bea | [
"Unlicense"
] | null | null | null | print ("""
Working.
@muuT3ra$$uu-kick-my-str-v.1
#FuckAllEverything.
by Tripl_color vk.com/Tripl_color""")
import vk_requests
import time
import random
token = "токен бота"
cid = str(input('Айди беседы = '))
photo = "photo472165736_457244077"
audio = "audio472165736_456239668"
msg = "fuck all. by Tripl_Color. @muuT3r... | 35.115385 | 121 | 0.75356 | print ("""
Working.
@muuT3ra$$uu-kick-my-str-v.1
#FuckAllEverything.
by Tripl_color vk.com/Tripl_color""")
import vk_requests
import time
import random
token = "токен бота"
cid = str(input('Айди беседы = '))
photo = "photo472165736_457244077"
audio = "audio472165736_456239668"
msg = "fuck all. by Tripl_Color. @muuT3r... | 0 | 0 | 0 |
97e77f096a9f70ae7478dc37934a2432277f2fea | 1,693 | py | Python | heads/round_head.py | virajmehta/procedural_objects | a5d2416ca5a444c2d20788c78f03a201e6993da2 | [
"MIT"
] | 2 | 2018-01-25T08:01:04.000Z | 2020-06-24T20:44:27.000Z | heads/round_head.py | virajmehta/procedural_objects | a5d2416ca5a444c2d20788c78f03a201e6993da2 | [
"MIT"
] | null | null | null | heads/round_head.py | virajmehta/procedural_objects | a5d2416ca5a444c2d20788c78f03a201e6993da2 | [
"MIT"
] | null | null | null | import random
from heads import Head
| 40.309524 | 200 | 0.534554 | import random
from heads import Head
class RoundHead(Head):
def __init__(self,
min_radius=1.5e-2,
max_radius=3e-2,
min_length=10e-2,
max_length=20e-2,
max_tilt=20,
z_offset=0,
constant_diameter_p... | 1,577 | 1 | 76 |