hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f721cae3818031e8891791ccb6fed599dead54df
12,458
py
Python
vectorbt/utils/decorators.py
RileyMShea/vectorbt
92ce571ce9fd0667f2994a2c922fb4cfcde10c88
[ "Apache-2.0" ]
1
2021-01-15T00:02:11.000Z
2021-01-15T00:02:11.000Z
vectorbt/utils/decorators.py
RileyMShea/vectorbt
92ce571ce9fd0667f2994a2c922fb4cfcde10c88
[ "Apache-2.0" ]
null
null
null
vectorbt/utils/decorators.py
RileyMShea/vectorbt
92ce571ce9fd0667f2994a2c922fb4cfcde10c88
[ "Apache-2.0" ]
null
null
null
"""Class and function decorators.""" from functools import wraps, lru_cache, RLock import inspect from vectorbt.utils import checks class class_or_instancemethod(classmethod): """Function decorator that binds `self` to a class if the function is called as class method, otherwise to an instance.""" def ...
34.70195
107
0.571922
from functools import wraps, lru_cache, RLock import inspect from vectorbt.utils import checks class class_or_instancemethod(classmethod): def __get__(self, instance, type_): descr_get = super().__get__ if instance is None else self.__func__.__get__ return descr_get(instance, type_) class cla...
true
true
f721cbcde3d04a0838563d9e89acdaf3fa845e47
799
py
Python
setup.py
alekslovesdata/lambdata
f9119b9d96a5d9c5f7b957471bf7c78553e07077
[ "MIT" ]
null
null
null
setup.py
alekslovesdata/lambdata
f9119b9d96a5d9c5f7b957471bf7c78553e07077
[ "MIT" ]
4
2020-03-24T18:00:50.000Z
2021-06-02T00:34:10.000Z
setup.py
alekslovesdata/lambdata
f9119b9d96a5d9c5f7b957471bf7c78553e07077
[ "MIT" ]
null
null
null
""" lambdata - a collection of data science helper functions for lambda school """ import setuptools REQUIRED = [ "numpy", "pandas" ] with open("README.md", "r") as fh: LONG_DESCRIPTION = fh.read() setuptools.setup( name="lambdata-alekslovesdata", version = "0.1.1", author = "alekslovesdat...
27.551724
74
0.675845
import setuptools REQUIRED = [ "numpy", "pandas" ] with open("README.md", "r") as fh: LONG_DESCRIPTION = fh.read() setuptools.setup( name="lambdata-alekslovesdata", version = "0.1.1", author = "alekslovesdata", description = "a collection of data science helper functions", long_des...
true
true
f721ccc15b9cee3e5e8517ee7ee869258a9a22fe
5,773
py
Python
py/test/plugin/pytest_doctest.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
1
2019-05-27T00:58:46.000Z
2019-05-27T00:58:46.000Z
py/test/plugin/pytest_doctest.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
py/test/plugin/pytest_doctest.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
import py class DoctestPlugin: def pytest_addoption(self, parser): parser.addoption("--doctest-modules", action="store_true", default=False, dest="doctestmodules") def pytest_collect_file(self, path, parent): if path.ext == ".py": if parent.config.getva...
33.563953
74
0.57076
import py class DoctestPlugin: def pytest_addoption(self, parser): parser.addoption("--doctest-modules", action="store_true", default=False, dest="doctestmodules") def pytest_collect_file(self, path, parent): if path.ext == ".py": if parent.config.getva...
false
true
f721ce2ca5cb8a400ff09a032cf59c3f22ccb2ff
718
py
Python
ApiRest/__init__.py
daycrom/fiscalberry
305248e720587753ad65db1aac0339aea30e9c0c
[ "Apache-2.0" ]
43
2017-04-18T01:26:02.000Z
2022-03-12T14:00:28.000Z
ApiRest/__init__.py
daycrom/fiscalberry
305248e720587753ad65db1aac0339aea30e9c0c
[ "Apache-2.0" ]
83
2017-04-07T14:38:26.000Z
2022-03-31T22:45:56.000Z
ApiRest/__init__.py
daycrom/fiscalberry
305248e720587753ad65db1aac0339aea30e9c0c
[ "Apache-2.0" ]
40
2017-04-25T13:39:19.000Z
2022-03-12T14:00:50.000Z
#!/usr/bin/python # -*- coding: latin-1 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is d...
42.235294
77
0.753482
__version__ = "1.0"
true
true
f721cee47df093b0c0ba33adbec9679bb5d8c2de
46,422
py
Python
google/cloud/firestore_admin_v1/services/firestore_admin/client.py
MShaffar19/python-firestore
1fb39140c26e06a3bc28e8304c56270b58a15b0b
[ "Apache-2.0" ]
null
null
null
google/cloud/firestore_admin_v1/services/firestore_admin/client.py
MShaffar19/python-firestore
1fb39140c26e06a3bc28e8304c56270b58a15b0b
[ "Apache-2.0" ]
null
null
null
google/cloud/firestore_admin_v1/services/firestore_admin/client.py
MShaffar19/python-firestore
1fb39140c26e06a3bc28e8304c56270b58a15b0b
[ "Apache-2.0" ]
1
2020-10-04T12:11:36.000Z
2020-10-04T12:11:36.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
42.588991
131
0.625652
from collections import OrderedDict from distutils import util import os import re from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib from google.api_core import exceptions from google.api_...
true
true
f721cf98bf4bca78c58d38f387c8dd63e1aabe26
279
py
Python
frontend/urls.py
0b01/autobasstab-web
b5ad0cef3d160b80ef1c91632b119e83325572d3
[ "MIT" ]
4
2020-10-07T19:25:41.000Z
2021-08-13T10:23:29.000Z
frontend/urls.py
0b01/autobasstab-web
b5ad0cef3d160b80ef1c91632b119e83325572d3
[ "MIT" ]
null
null
null
frontend/urls.py
0b01/autobasstab-web
b5ad0cef3d160b80ef1c91632b119e83325572d3
[ "MIT" ]
1
2021-06-29T07:52:05.000Z
2021-06-29T07:52:05.000Z
from django.urls import path from django.views.generic import TemplateView, RedirectView from . import views urlpatterns = [ path('', views.index), path('model.json', RedirectView.as_view(url='http://rickyhan.com/static/crepe_model_full/model.json', permanent=True)), ]
31
123
0.752688
from django.urls import path from django.views.generic import TemplateView, RedirectView from . import views urlpatterns = [ path('', views.index), path('model.json', RedirectView.as_view(url='http://rickyhan.com/static/crepe_model_full/model.json', permanent=True)), ]
true
true
f721d092cf36ee241d38b77f0107815dfdfd9986
30,721
py
Python
tests/__init__.py
ClementAcher/dd-trace-py
f36519313c64d912ab9010094205ec3a82f1e493
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tests/__init__.py
ClementAcher/dd-trace-py
f36519313c64d912ab9010094205ec3a82f1e493
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tests/__init__.py
ClementAcher/dd-trace-py
f36519313c64d912ab9010094205ec3a82f1e493
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
import contextlib from contextlib import contextmanager import inspect import os import sys from typing import List import pytest import ddtrace from ddtrace import Span from ddtrace import Tracer from ddtrace.compat import httplib from ddtrace.compat import parse from ddtrace.compat import to_unicode from ddtrace.co...
33.176026
111
0.603073
import contextlib from contextlib import contextmanager import inspect import os import sys from typing import List import pytest import ddtrace from ddtrace import Span from ddtrace import Tracer from ddtrace.compat import httplib from ddtrace.compat import parse from ddtrace.compat import to_unicode from ddtrace.co...
true
true
f721d0c46749a5a74c06f1c993568537b6bb35d9
257
py
Python
tests/falcon/app.py
neetjn/falcon-pagination-processor
547f10b4577933af97bd692866a1776d9f582773
[ "MIT" ]
2
2019-05-17T09:40:46.000Z
2020-02-25T03:16:10.000Z
tests/falcon/app.py
neetjn/falcon-pagination-processor
547f10b4577933af97bd692866a1776d9f582773
[ "MIT" ]
null
null
null
tests/falcon/app.py
neetjn/falcon-pagination-processor
547f10b4577933af97bd692866a1776d9f582773
[ "MIT" ]
null
null
null
import falcon from falcon_pagination_processor import PaginationProcessor from tests.falcon.resources import TestResourceCollection api = falcon.API(middleware=[PaginationProcessor()]) api.add_route(TestResourceCollection.route, TestResourceCollection())
32.125
69
0.863813
import falcon from falcon_pagination_processor import PaginationProcessor from tests.falcon.resources import TestResourceCollection api = falcon.API(middleware=[PaginationProcessor()]) api.add_route(TestResourceCollection.route, TestResourceCollection())
true
true
f721d144b892e99706ae1d0f4f99bff00bf06970
926
py
Python
ibllib/tests/extractors/test_ephys_passive.py
nbonacchi/ibllib
9066c00a8e9a65a1d209144a2ac54d0b87bec0b3
[ "MIT" ]
null
null
null
ibllib/tests/extractors/test_ephys_passive.py
nbonacchi/ibllib
9066c00a8e9a65a1d209144a2ac54d0b87bec0b3
[ "MIT" ]
null
null
null
ibllib/tests/extractors/test_ephys_passive.py
nbonacchi/ibllib
9066c00a8e9a65a1d209144a2ac54d0b87bec0b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Author: Niccolò Bonacchi # @Date: Friday, October 30th 2020, 10:42:49 am import unittest import ibllib.io.extractors.ephys_passive as passive import numpy as np class TestsPassiveExtractor(unittest.TestCase): def setUp(self): pass def test_load_passive...
28.9375
77
0.646868
import unittest import ibllib.io.extractors.ephys_passive as passive import numpy as np class TestsPassiveExtractor(unittest.TestCase): def setUp(self): pass def test_load_passive_stim_meta(self): meta = passive._load_passive_stim_meta() self.assertTrue(isinstance(meta, dict)) ...
true
true
f721d14b099b4093262cf01e174d72143b14627d
41,291
py
Python
openff/evaluator/datasets/curation/components/filtering.py
lilyminium/openff-evaluator
21da54363009d83110b54d57e4416ae31df3868b
[ "MIT" ]
null
null
null
openff/evaluator/datasets/curation/components/filtering.py
lilyminium/openff-evaluator
21da54363009d83110b54d57e4416ae31df3868b
[ "MIT" ]
null
null
null
openff/evaluator/datasets/curation/components/filtering.py
lilyminium/openff-evaluator
21da54363009d83110b54d57e4416ae31df3868b
[ "MIT" ]
null
null
null
import functools import itertools import logging from collections import defaultdict from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Union import numpy import pandas from pydantic import Field, root_validator, validator from scipy.optimize import linear_sum_assignment from typing_extensions import Liter...
32.901195
88
0.636071
import functools import itertools import logging from collections import defaultdict from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Union import numpy import pandas from pydantic import Field, root_validator, validator from scipy.optimize import linear_sum_assignment from typing_extensions import Liter...
true
true
f721d1659e4a76de250c7e3aa60844e53d5b0b27
1,929
py
Python
migrations/versions/9ede8d2d7089_initialize_migration.py
casio-ka/DailyBlog
4668a977c540308b2f00fcc86e5e02cb3878edc8
[ "MIT" ]
null
null
null
migrations/versions/9ede8d2d7089_initialize_migration.py
casio-ka/DailyBlog
4668a977c540308b2f00fcc86e5e02cb3878edc8
[ "MIT" ]
null
null
null
migrations/versions/9ede8d2d7089_initialize_migration.py
casio-ka/DailyBlog
4668a977c540308b2f00fcc86e5e02cb3878edc8
[ "MIT" ]
null
null
null
"""Initialize Migration Revision ID: 9ede8d2d7089 Revises: Create Date: 2020-09-28 00:25:38.033227 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '9ede8d2d7089' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands au...
33.842105
83
0.671332
from alembic import op import sqlalchemy as sa revision = '9ede8d2d7089' down_revision = None branch_labels = None depends_on = None def upgrade(): ) op.create_table('users', sa.Column('id', sa.Integer(), nullable=False), sa.Column('username', sa.String(length=255), nullable=True), sa.Column('e...
true
true
f721d2802ff021d2044c01d4e530003b8cd4e151
329
py
Python
sparkdq/analytics/states/ModeState.py
PasaLab/SparkDQ
16d50210747ef7de03cf36d689ce26ff7445f63a
[ "Apache-2.0" ]
1
2021-02-08T07:49:54.000Z
2021-02-08T07:49:54.000Z
sparkdq/analytics/states/ModeState.py
PasaLab/SparkDQ
16d50210747ef7de03cf36d689ce26ff7445f63a
[ "Apache-2.0" ]
null
null
null
sparkdq/analytics/states/ModeState.py
PasaLab/SparkDQ
16d50210747ef7de03cf36d689ce26ff7445f63a
[ "Apache-2.0" ]
null
null
null
from sparkdq.analytics.states.State import DoubleValuedState class ModeState(DoubleValuedState): def __init__(self, mode_value): self.mode_value = mode_value def metric_value(self): return self.mode_value # def sum(self, other): # return ModeState(max(self.mode_value, other.mode...
23.5
66
0.714286
from sparkdq.analytics.states.State import DoubleValuedState class ModeState(DoubleValuedState): def __init__(self, mode_value): self.mode_value = mode_value def metric_value(self): return self.mode_value
true
true
f721d29f05b3f1aa5d1ea37c61f38905f80ae65c
6,502
py
Python
otherCodeTaskSnippets/14.01.2022.py
s2812135/Data_Challenges_WiSe2122
a55372f444e7344af4e2e1f04e4244fb8cefeefe
[ "MIT" ]
null
null
null
otherCodeTaskSnippets/14.01.2022.py
s2812135/Data_Challenges_WiSe2122
a55372f444e7344af4e2e1f04e4244fb8cefeefe
[ "MIT" ]
null
null
null
otherCodeTaskSnippets/14.01.2022.py
s2812135/Data_Challenges_WiSe2122
a55372f444e7344af4e2e1f04e4244fb8cefeefe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Jan 14 16:03:32 2022 @author: dariu """ # -*- coding: utf-8 -*- """ Created on Tue Dec 7 12:43:25 2021 @author: dariu """ import numpy as np import pandas as pd import os from tqdm import tqdm import pacmap import matplotlib.pyplot as plt from sklearn.manifold import TSNE...
21.529801
120
0.652261
import numpy as np import pandas as pd import os from tqdm import tqdm import pacmap import matplotlib.pyplot as plt from sklearn.manifold import TSNE import umap from sklearn.cluster import KMeans from sklearn.cluster import DBSCAN from sklearn.decomposition import PCA from sklearn import metrics from sklearn.clu...
true
true
f721d55c74656c111fb68f8f7273731a712814c3
8,851
py
Python
archive/maketiles_old.py
arroqc/pandacancer_kaggle
a6945dcac041dac744570d61ee630ee6f32e7117
[ "MIT" ]
3
2020-07-23T02:02:19.000Z
2020-07-23T02:58:08.000Z
archive/maketiles_old.py
arroqc/pandacancer_kaggle
a6945dcac041dac744570d61ee630ee6f32e7117
[ "MIT" ]
null
null
null
archive/maketiles_old.py
arroqc/pandacancer_kaggle
a6945dcac041dac744570d61ee630ee6f32e7117
[ "MIT" ]
3
2020-07-23T02:02:45.000Z
2020-11-16T02:58:51.000Z
import skimage.io import numpy as np import pandas as pd import sys from pathlib import Path import pickle import argparse import cv2 parser = argparse.ArgumentParser() parser.add_argument("--base_dir", default='G:/Datasets/panda', required=False) parser.add_argument("--out_dir", default='D:/Datasets/panda', required...
38.316017
104
0.600949
import skimage.io import numpy as np import pandas as pd import sys from pathlib import Path import pickle import argparse import cv2 parser = argparse.ArgumentParser() parser.add_argument("--base_dir", default='G:/Datasets/panda', required=False) parser.add_argument("--out_dir", default='D:/Datasets/panda', required...
true
true
f721d6bf664d81374c648dd133a87502c3abb0e5
475
py
Python
mooring/migrations/0040_admissionsbooking_expirytime.py
jawaidm/moorings
22db3fa5917fb13cbee144e64529221ef862cb39
[ "Apache-2.0" ]
null
null
null
mooring/migrations/0040_admissionsbooking_expirytime.py
jawaidm/moorings
22db3fa5917fb13cbee144e64529221ef862cb39
[ "Apache-2.0" ]
2
2020-04-30T12:02:15.000Z
2021-03-19T22:41:46.000Z
mooring/migrations/0040_admissionsbooking_expirytime.py
jawaidm/moorings
22db3fa5917fb13cbee144e64529221ef862cb39
[ "Apache-2.0" ]
6
2020-01-13T08:45:09.000Z
2021-02-24T03:31:02.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-08-21 06:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mooring', '0039_admissionsbooking'), ] operations = [ migrations.AddField( ...
22.619048
62
0.629474
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mooring', '0039_admissionsbooking'), ] operations = [ migrations.AddField( model_name='admissionsbooking', name='expiryTim...
true
true
f721d7d8b4c42f9662d809895e1a8f8424cec320
445
py
Python
dexcom_reader/record_test.py
ijustlovemath/dexcom_reader
c7ee4cf0f5fa7f96f7186635513e7662fd845d16
[ "MIT" ]
1
2020-10-22T14:26:57.000Z
2020-10-22T14:26:57.000Z
dexcom_reader/record_test.py
ijustlovemath/dexcom_reader
c7ee4cf0f5fa7f96f7186635513e7662fd845d16
[ "MIT" ]
null
null
null
dexcom_reader/record_test.py
ijustlovemath/dexcom_reader
c7ee4cf0f5fa7f96f7186635513e7662fd845d16
[ "MIT" ]
1
2020-10-22T14:50:56.000Z
2020-10-22T14:50:56.000Z
from future import print_function import readdata dd = readdata.Dexcom.FindDevice() dr = readdata.Dexcom(dd) meter_records = dr.ReadRecords('METER_DATA') print('First Meter Record = ') print(meter_records[0]) print('Last Meter Record =') print(meter_records[-1]) insertion_records = dr.ReadRecords('INSERTION_TIME') p...
27.8125
52
0.768539
from future import print_function import readdata dd = readdata.Dexcom.FindDevice() dr = readdata.Dexcom(dd) meter_records = dr.ReadRecords('METER_DATA') print('First Meter Record = ') print(meter_records[0]) print('Last Meter Record =') print(meter_records[-1]) insertion_records = dr.ReadRecords('INSERTION_TIME') p...
true
true
f721d8be22e254b94549fbcd3026017e54e07cae
444
py
Python
microkg/releaser.py
goude/microkg
2d4007bc2dcd6e240b6ba84991189ff66ff80969
[ "MIT" ]
null
null
null
microkg/releaser.py
goude/microkg
2d4007bc2dcd6e240b6ba84991189ff66ff80969
[ "MIT" ]
1
2021-06-02T00:43:28.000Z
2021-06-02T00:43:28.000Z
microkg/releaser.py
goude/microkg
2d4007bc2dcd6e240b6ba84991189ff66ff80969
[ "MIT" ]
null
null
null
from pathlib import Path def release(data: dict, outfile: Path) -> None: with open(outfile, "w") as fh: fls = [dd["flags"] for dd in data["data"]] fh.write("|".join(fls)) def main() -> None: from . import parser infile = Path("sources/rout.txt") outfile = Path("releases/latest/windo...
21.142857
50
0.617117
from pathlib import Path def release(data: dict, outfile: Path) -> None: with open(outfile, "w") as fh: fls = [dd["flags"] for dd in data["data"]] fh.write("|".join(fls)) def main() -> None: from . import parser infile = Path("sources/rout.txt") outfile = Path("releases/latest/windo...
true
true
f721d928941c5327cd287c478c3dc6357184dfb5
528
py
Python
278. First Bad Version.py
patrick-luo/Leet-Code
989ec20c1069ce93e1d0e9ae4a4dfc59b1b1622a
[ "MIT" ]
null
null
null
278. First Bad Version.py
patrick-luo/Leet-Code
989ec20c1069ce93e1d0e9ae4a4dfc59b1b1622a
[ "MIT" ]
null
null
null
278. First Bad Version.py
patrick-luo/Leet-Code
989ec20c1069ce93e1d0e9ae4a4dfc59b1b1622a
[ "MIT" ]
null
null
null
# The isBadVersion API is already defined for you. # @param version, an integer # @return a bool # def isBadVersion(version): class Solution(object): def firstBadVersion(self, n): """ :type n: int :rtype: int """ low, high = 1, n while True: if isBadVersi...
24
50
0.482955
class Solution(object): def firstBadVersion(self, n): low, high = 1, n while True: if isBadVersion(low): return low mid = low + (high-low)/2 isBad = isBadVersion(mid) if isBad: high = mid else: ...
true
true
f721d9b1288c7cad5f15bfa3c14c94e43bf2cc77
3,624
py
Python
benchmarks/f3_wrong_hints/scaling_software_termination/2-2Nested_false-termination_21.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints/scaling_software_termination/2-2Nested_false-termination_21.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints/scaling_software_termination/2-2Nested_false-termination_21.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import Tuple, FrozenSet from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode import pysmt.typing as types from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
28.761905
77
0.561258
from typing import Tuple, FrozenSet from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode import pysmt.typing as types from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
true
true
f721db3583a7683724f3bd4358f1cd3bd9a389f6
236
py
Python
Python/Ex029.py
renato-rt/Python
ba033094e1da5b55cf9ce4c8a5cf2cd90247db36
[ "MIT" ]
null
null
null
Python/Ex029.py
renato-rt/Python
ba033094e1da5b55cf9ce4c8a5cf2cd90247db36
[ "MIT" ]
null
null
null
Python/Ex029.py
renato-rt/Python
ba033094e1da5b55cf9ce4c8a5cf2cd90247db36
[ "MIT" ]
1
2021-11-30T17:34:33.000Z
2021-11-30T17:34:33.000Z
v = int(input('\033[4;33;42mDigite a velocidade do carro: \033[m')) lim = 80 m = 7 km = (v-lim) if v > lim: print('\033[1;30;41mVocê será multado em R${:.2f}.\033[m'.format(km*m)) else: print('Parabéns você dirige com atenção!')
29.5
75
0.631356
v = int(input('\033[4;33;42mDigite a velocidade do carro: \033[m')) lim = 80 m = 7 km = (v-lim) if v > lim: print('\033[1;30;41mVocê será multado em R${:.2f}.\033[m'.format(km*m)) else: print('Parabéns você dirige com atenção!')
true
true
f721db77d83f00f40283fd23d4e3b37bc36d2b31
3,524
py
Python
kiddytimer/src/KTglob.py
TwolDE2/enigma2-plugins
06685a5ce6a65a8724d3b32c8f7906714650ca2c
[ "OLDAP-2.3" ]
30
2015-05-08T22:10:00.000Z
2022-03-13T22:09:31.000Z
kiddytimer/src/KTglob.py
TwolDE2/enigma2-plugins
06685a5ce6a65a8724d3b32c8f7906714650ca2c
[ "OLDAP-2.3" ]
124
2015-04-27T21:30:48.000Z
2022-03-29T10:21:39.000Z
kiddytimer/src/KTglob.py
TwolDE2/enigma2-plugins
06685a5ce6a65a8724d3b32c8f7906714650ca2c
[ "OLDAP-2.3" ]
193
2015-01-10T09:21:26.000Z
2022-03-21T08:19:33.000Z
from __future__ import absolute_import from .__init__ import _ from Components.config import config import time PLUGIN_BASE = "KiddyTimer" PLUGIN_VERSION = "1.3" DAYNAMES = (_("Sunday"), _("Monday"), _("Tuesday"), _("Wednesday"), _("Thursday"), _("Friday"), ...
50.342857
539
0.628547
from __future__ import absolute_import from .__init__ import _ from Components.config import config import time PLUGIN_BASE = "KiddyTimer" PLUGIN_VERSION = "1.3" DAYNAMES = (_("Sunday"), _("Monday"), _("Tuesday"), _("Wednesday"), _("Thursday"), _("Friday"), ...
true
true
f721dc0f7b2a6690beba2a884bde66614f03a8de
83,659
py
Python
Tax-Calculator-3.0.0/taxcalc/calcfunctions.py
grantseiter/Biden-Tax-Proposals
c215ff845264f3fce9281c7fbb343ed10758a4b6
[ "MIT" ]
null
null
null
Tax-Calculator-3.0.0/taxcalc/calcfunctions.py
grantseiter/Biden-Tax-Proposals
c215ff845264f3fce9281c7fbb343ed10758a4b6
[ "MIT" ]
null
null
null
Tax-Calculator-3.0.0/taxcalc/calcfunctions.py
grantseiter/Biden-Tax-Proposals
c215ff845264f3fce9281c7fbb343ed10758a4b6
[ "MIT" ]
null
null
null
""" Tax-Calculator functions that calculate payroll and individual income taxes. These functions are imported into the Calculator class. Note: the parameter_indexing_CPI_offset policy parameter is the only policy parameter that does not appear here; it is used in the policy.py file to possibly adjust the price inflat...
39.276526
124
0.632843
import math import copy import numpy as np from taxcalc.decorators import iterate_jit, JIT def BenefitPrograms(calc): zero = np.zeros(calc.array_len) if calc.policy_param('BEN_housing_repeal'): calc.array('housing_ben', zero) if calc.policy_param('BEN_ssi_repeal'): calc.array...
true
true
f721ddd3d8923aa8e66f4d2cdeb1b7bb82dc9246
1,791
py
Python
volttrontesting/services/test_pubsub_service.py
gnmerritt/volttron
ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3
[ "Apache-2.0" ]
406
2015-01-20T03:08:53.000Z
2022-03-31T20:59:07.000Z
volttrontesting/services/test_pubsub_service.py
gnmerritt/volttron
ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3
[ "Apache-2.0" ]
2,031
2015-01-05T21:35:45.000Z
2022-03-29T21:44:36.000Z
volttrontesting/services/test_pubsub_service.py
gnmerritt/volttron
ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3
[ "Apache-2.0" ]
219
2015-01-20T14:53:57.000Z
2022-03-06T00:37:41.000Z
from volttron.platform.vip.pubsubservice import PubSubService, ProtectedPubSubTopics from mock import Mock, MagicMock import pytest @pytest.fixture(params=[ dict(has_external_routing=True), dict(has_external_routing=False) ]) def pubsub_service(request): moc...
31.982143
119
0.713009
from volttron.platform.vip.pubsubservice import PubSubService, ProtectedPubSubTopics from mock import Mock, MagicMock import pytest @pytest.fixture(params=[ dict(has_external_routing=True), dict(has_external_routing=False) ]) def pubsub_service(request): moc...
true
true
f721de426c7c8a45eb5801626a616f226aca0644
108,032
py
Python
dante/vendor/pkg_resources/__init__.py
sbg/dante
104543c3ccb5e762d3e9cd6e8fa04c5fa91e2227
[ "Apache-2.0" ]
9
2017-11-03T15:53:01.000Z
2019-10-01T14:09:56.000Z
dante/vendor/pkg_resources/__init__.py
sbg/dante
104543c3ccb5e762d3e9cd6e8fa04c5fa91e2227
[ "Apache-2.0" ]
4
2019-10-01T12:53:58.000Z
2021-04-26T15:39:16.000Z
dante/vendor/pkg_resources/__init__.py
sbg/dante
104543c3ccb5e762d3e9cd6e8fa04c5fa91e2227
[ "Apache-2.0" ]
5
2017-11-03T15:50:40.000Z
2021-09-13T08:50:45.000Z
# coding: utf-8 """ Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path opera...
32.866444
92
0.620177
from __future__ import absolute_import import sys import os import io import time import re import types import zipfile import zipimport import warnings import stat import functools import pkgutil import operator import platform import collections import plistlib import email.parser import errno import tempfile impo...
true
true
f721df51ffd92a86fa4f5ed499e8968701513d30
3,931
py
Python
food_ke/scripts/candidate_edges.py
IBPA/FoodAtlas
0a431f0a391adaa8984b380f3f6f7189f27b9311
[ "Apache-2.0" ]
1
2022-02-07T10:04:35.000Z
2022-02-07T10:04:35.000Z
food_ke/scripts/candidate_edges.py
IBPA/FoodAtlas
0a431f0a391adaa8984b380f3f6f7189f27b9311
[ "Apache-2.0" ]
null
null
null
food_ke/scripts/candidate_edges.py
IBPA/FoodAtlas
0a431f0a391adaa8984b380f3f6f7189f27b9311
[ "Apache-2.0" ]
null
null
null
import uuid from collections import defaultdict from itertools import combinations from typing import Any, Dict, List, Tuple from dagster import OutputDefinition, pipeline, solid from tinydb import Query from food_ke.labelstudio import ( LSAnnotationResult, LSAnnotationValue, LSPreAnnotation, LSPredic...
31.198413
79
0.682524
import uuid from collections import defaultdict from itertools import combinations from typing import Any, Dict, List, Tuple from dagster import OutputDefinition, pipeline, solid from tinydb import Query from food_ke.labelstudio import ( LSAnnotationResult, LSAnnotationValue, LSPreAnnotation, LSPredic...
true
true
f721df7c81e5b22b791a270c424bdef9a82993ec
4,110
py
Python
sdk/python/pulumi_azure_native/resources/v20201001/get_deployment_at_scope.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/resources/v20201001/get_deployment_at_scope.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/resources/v20201001/get_deployment_at_scope.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
31.136364
151
0.625061
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetDeploymentAtScopeResult', 'AwaitableGetDeploymentAtScopeResult', 'get_deployment_at_scope', ] @pulumi.output_type cl...
true
true
f721e066c1aa8136fae4963f5e9d06ec258240a4
9,368
py
Python
bin.src/generate_lensed_hosts_agn.py
mpwiesner/sims_GCRCatSimInterface
831e78ec8eb610983768d4657fbff9744cb17249
[ "BSD-3-Clause" ]
null
null
null
bin.src/generate_lensed_hosts_agn.py
mpwiesner/sims_GCRCatSimInterface
831e78ec8eb610983768d4657fbff9744cb17249
[ "BSD-3-Clause" ]
null
null
null
bin.src/generate_lensed_hosts_agn.py
mpwiesner/sims_GCRCatSimInterface
831e78ec8eb610983768d4657fbff9744cb17249
[ "BSD-3-Clause" ]
2
2018-04-12T20:49:23.000Z
2018-08-04T00:08:46.000Z
import numpy as np import os import argparse import pylab as pl import subprocess as sp import astropy.io.fits as pyfits import pandas as pd import scipy.special as ss import om10_lensing_equations as ole data_dir = os.path.join(os.environ['SIMS_GCRCATSIMINTERFACE_DIR'], 'data') twinkles_data_dir = os.path....
41.635556
129
0.516652
import numpy as np import os import argparse import pylab as pl import subprocess as sp import astropy.io.fits as pyfits import pandas as pd import scipy.special as ss import om10_lensing_equations as ole data_dir = os.path.join(os.environ['SIMS_GCRCATSIMINTERFACE_DIR'], 'data') twinkles_data_dir = os.path....
true
true
f721e2171bf6d9f9e10e140e276f0503a8e3e20a
3,112
py
Python
spectramanipulator/dialogs/rename_dialog.py
dmadea/Spectra-Manipulator
ddc1b27cb4f4691096dfa7b2975df350d2eaf40e
[ "MIT" ]
1
2020-07-18T17:46:01.000Z
2020-07-18T17:46:01.000Z
spectramanipulator/dialogs/rename_dialog.py
dmadea/Spectra-Manipulator
ddc1b27cb4f4691096dfa7b2975df350d2eaf40e
[ "MIT" ]
null
null
null
spectramanipulator/dialogs/rename_dialog.py
dmadea/Spectra-Manipulator
ddc1b27cb4f4691096dfa7b2975df350d2eaf40e
[ "MIT" ]
null
null
null
from PyQt5 import QtWidgets from PyQt5.QtCore import Qt from .gui_rename_dialog import Ui_Dialog class RenameDialog(QtWidgets.QDialog, Ui_Dialog): # static variables is_opened = False _instance = None int32_max = 2147483647 def __init__(self, expression='', offset=0, c_mult_facotr=1, ...
30.811881
142
0.673843
from PyQt5 import QtWidgets from PyQt5.QtCore import Qt from .gui_rename_dialog import Ui_Dialog class RenameDialog(QtWidgets.QDialog, Ui_Dialog): is_opened = False _instance = None int32_max = 2147483647 def __init__(self, expression='', offset=0, c_mult_facotr=1, last_rena...
true
true
f721e218fc789c3f8ef3a8e08522e4afa077fe67
3,728
py
Python
Algorithm/BOJ/19238스타트택시.py
Nyapy/FMTG
dcf0a35dbbcd50d5bc861b04ac0db41d27e57b6e
[ "MIT" ]
null
null
null
Algorithm/BOJ/19238스타트택시.py
Nyapy/FMTG
dcf0a35dbbcd50d5bc861b04ac0db41d27e57b6e
[ "MIT" ]
null
null
null
Algorithm/BOJ/19238스타트택시.py
Nyapy/FMTG
dcf0a35dbbcd50d5bc861b04ac0db41d27e57b6e
[ "MIT" ]
null
null
null
import sys sys.stdin = open("19238.txt") from collections import deque N,M,oil = map(int, input().split()) jido = [0]+[[0]+list(map(int, input().split())) for _ in range(N)] tay, tax = map(int, input().split()) cst = [list(map(int, input().split())) for _ in range(M)] dx = [0, -1,1,0] dy = [-1, 0,0,1] for i in r...
30.809917
80
0.333691
import sys sys.stdin = open("19238.txt") from collections import deque N,M,oil = map(int, input().split()) jido = [0]+[[0]+list(map(int, input().split())) for _ in range(N)] tay, tax = map(int, input().split()) cst = [list(map(int, input().split())) for _ in range(M)] dx = [0, -1,1,0] dy = [-1, 0,0,1] for i in r...
true
true
f721e6187906d39f9020e1cf5b0b2268c9f06476
1,986
py
Python
verification/HMM/rtcf-h-table.py
thomasgibson/tabula-rasa
85abf26d6604b5a9a4d356f07aeb90d5b6453f33
[ "MIT" ]
3
2018-08-24T02:11:46.000Z
2021-06-15T12:53:36.000Z
verification/HMM/rtcf-h-table.py
thomasgibson/tabula-rasa
85abf26d6604b5a9a4d356f07aeb90d5b6453f33
[ "MIT" ]
null
null
null
verification/HMM/rtcf-h-table.py
thomasgibson/tabula-rasa
85abf26d6604b5a9a4d356f07aeb90d5b6453f33
[ "MIT" ]
1
2019-08-21T15:02:21.000Z
2019-08-21T15:02:21.000Z
import os import sys import pandas as pd data_set = ["results/H-RTCF-degree-0.csv", "results/H-RTCF-degree-1.csv", "results/H-RTCF-degree-2.csv", "results/H-RTCF-degree-3.csv"] for data in data_set: if not os.path.exists(data): print("Cannot find data file '%s'" % data...
31.52381
139
0.543303
import os import sys import pandas as pd data_set = ["results/H-RTCF-degree-0.csv", "results/H-RTCF-degree-1.csv", "results/H-RTCF-degree-2.csv", "results/H-RTCF-degree-3.csv"] for data in data_set: if not os.path.exists(data): print("Cannot find data file '%s'" % data...
true
true
f721e6da40641349c02a4345af82f81e8183b4e8
5,620
py
Python
docs/conf.py
husio/weave
7c46c7dee60614c3812c9e29796f62687085b933
[ "Apache-2.0" ]
null
null
null
docs/conf.py
husio/weave
7c46c7dee60614c3812c9e29796f62687085b933
[ "Apache-2.0" ]
null
null
null
docs/conf.py
husio/weave
7c46c7dee60614c3812c9e29796f62687085b933
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Path setup ------------------------------------------------------------...
29.424084
79
0.645018
def setup(app): app.add_stylesheet('css/custom.css') project = u'Weave' copyright = u'2018 - 2019, IOV SAS' author = u'Ethan Frey' version = u'0.2' release = u'0.2.1' extensions = [ 'sphinx.ext.todo', 'sphinx.ext.imgmath', ] templates_path = ['_templates'] source_s...
true
true
f721e85640e494bdebc1fb808b9ad090fa4b3d72
4,750
py
Python
src/sentry/integrations/bitbucket/issues.py
xzkostyan/sentry
21476700defcf0dddeadeec8471d3454cef6faa7
[ "BSD-3-Clause" ]
null
null
null
src/sentry/integrations/bitbucket/issues.py
xzkostyan/sentry
21476700defcf0dddeadeec8471d3454cef6faa7
[ "BSD-3-Clause" ]
null
null
null
src/sentry/integrations/bitbucket/issues.py
xzkostyan/sentry
21476700defcf0dddeadeec8471d3454cef6faa7
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.integrations.issues import IssueBasicMixin from sentry.integrations.exceptions import ApiError, IntegrationFormError ISSUE_TYPES = ( ('bug', 'Bug'), ('enhancement', 'Enhancement'), ('proposal', 'Proposal'), ('task', 'T...
32.534247
97
0.521053
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.integrations.issues import IssueBasicMixin from sentry.integrations.exceptions import ApiError, IntegrationFormError ISSUE_TYPES = ( ('bug', 'Bug'), ('enhancement', 'Enhancement'), ('proposal', 'Proposal'), ('task', 'T...
true
true
f721e86e8c416b8778de1f5a4d429e740eea897d
2,427
py
Python
conftest.py
viaviare/PyRepository
6520d558a76dab5bd36cf321c0a68298ff048f7a
[ "Apache-2.0" ]
null
null
null
conftest.py
viaviare/PyRepository
6520d558a76dab5bd36cf321c0a68298ff048f7a
[ "Apache-2.0" ]
null
null
null
conftest.py
viaviare/PyRepository
6520d558a76dab5bd36cf321c0a68298ff048f7a
[ "Apache-2.0" ]
null
null
null
import pytest import json import jsonpickle import os.path import importlib from fixture.application import Application from fixture.db import DbFixture fixture = None target = None def load_config(file): global target if target is None: config_file = os.path.join(os.path.dirname(os.path.abspath(__fi...
29.597561
145
0.694685
import pytest import json import jsonpickle import os.path import importlib from fixture.application import Application from fixture.db import DbFixture fixture = None target = None def load_config(file): global target if target is None: config_file = os.path.join(os.path.dirname(os.path.abspath(__fi...
true
true
f721e98693635493da8f166ed44f9befba0e31b8
4,170
py
Python
benchmark/startQiskit2925.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit2925.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit2925.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=42 import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_...
34.46281
140
0.64964
import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_xor(s: str, t: str) -> str: l...
true
true
f721eada49d0d24dce621475587d2b8e069721ef
23,626
py
Python
ocs_ci/ocs/ui/acm_ui.py
MeridianExplorer/ocs-ci
a33d5116128b88f176f5eff68a3ef805125cdba1
[ "MIT" ]
null
null
null
ocs_ci/ocs/ui/acm_ui.py
MeridianExplorer/ocs-ci
a33d5116128b88f176f5eff68a3ef805125cdba1
[ "MIT" ]
null
null
null
ocs_ci/ocs/ui/acm_ui.py
MeridianExplorer/ocs-ci
a33d5116128b88f176f5eff68a3ef805125cdba1
[ "MIT" ]
null
null
null
import os import logging import time from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.keys import Keys from ocs_ci.ocs import constants from ocs_ci.ocs.exceptions import ACMClusterDeployException from ocs_ci.ocs.ui.base_ui import BaseUI ...
37.561208
96
0.635698
import os import logging import time from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.keys import Keys from ocs_ci.ocs import constants from ocs_ci.ocs.exceptions import ACMClusterDeployException from ocs_ci.ocs.ui.base_ui import BaseUI ...
true
true
f721ec4d816bbef5bb4d08a3d8d876e428dfc432
990
py
Python
python/phonenumbers/shortdata/region_KG.py
ILMServices/python-phonenumbers
317b0b128162b031e156b9de69ade9a5c8cf4844
[ "Apache-2.0" ]
1
2015-01-31T01:17:14.000Z
2015-01-31T01:17:14.000Z
python/phonenumbers/shortdata/region_KG.py
ILMServices/python-phonenumbers
317b0b128162b031e156b9de69ade9a5c8cf4844
[ "Apache-2.0" ]
null
null
null
python/phonenumbers/shortdata/region_KG.py
ILMServices/python-phonenumbers
317b0b128162b031e156b9de69ade9a5c8cf4844
[ "Apache-2.0" ]
null
null
null
"""Auto-generated file, do not edit by hand. KG metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_KG = PhoneMetadata(id='KG', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='[14]\\d{2,3}', possible_number_pattern=...
76.153846
129
0.787879
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_KG = PhoneMetadata(id='KG', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='[14]\\d{2,3}', possible_number_pattern='\\d{3,4}'), toll_free=PhoneNumberDesc(national_number_p...
true
true
f721ec59857ef6e3afbbf06a165c7b74088bc96e
398
py
Python
app/model/mail_agent.py
dwdraugr/YADS
c8036d8196a3158636aaa4f1910033e70ec8ecb4
[ "Apache-2.0" ]
3
2019-09-02T11:26:58.000Z
2019-12-06T15:54:38.000Z
app/model/mail_agent.py
dwdraugr/YADS
c8036d8196a3158636aaa4f1910033e70ec8ecb4
[ "Apache-2.0" ]
null
null
null
app/model/mail_agent.py
dwdraugr/YADS
c8036d8196a3158636aaa4f1910033e70ec8ecb4
[ "Apache-2.0" ]
null
null
null
from flask import Flask from flask_mail import Message, Mail from app.lazy import lazy_async class MailAgent: def __init__(self, app: Flask): self.mail = Mail(app) self.app = app @lazy_async def _async_mail(self, msg: Message): with self.app.app_context(): self.mail.se...
22.111111
40
0.650754
from flask import Flask from flask_mail import Message, Mail from app.lazy import lazy_async class MailAgent: def __init__(self, app: Flask): self.mail = Mail(app) self.app = app @lazy_async def _async_mail(self, msg: Message): with self.app.app_context(): self.mail.se...
true
true
f721ec6e3ba1bb95049502e8c6e9d52d6173e217
1,059
py
Python
data_ai/comp3035/finews/spiders/news_spider.py
lonelyhentai/workspace
2a996af58d6b9be5d608ed040267398bcf72403b
[ "MIT" ]
2
2021-04-26T16:37:38.000Z
2022-03-15T01:26:19.000Z
data_ai/comp3035/finews/spiders/news_spider.py
lonelyhentai/workspace
2a996af58d6b9be5d608ed040267398bcf72403b
[ "MIT" ]
null
null
null
data_ai/comp3035/finews/spiders/news_spider.py
lonelyhentai/workspace
2a996af58d6b9be5d608ed040267398bcf72403b
[ "MIT" ]
1
2022-03-15T01:26:23.000Z
2022-03-15T01:26:23.000Z
import scrapy from os import path INDEX_PATH = './resources/index' RECORD_PATH = './resources/record' class NewsSpider(scrapy.Spider): name = "index" start_urls = ['http://fund.10jqka.com.cn/smxw_list/index_1.shtml'] def parse_record(self, response): filename: str = response.url.split('/')[-1] ...
36.517241
81
0.624174
import scrapy from os import path INDEX_PATH = './resources/index' RECORD_PATH = './resources/record' class NewsSpider(scrapy.Spider): name = "index" start_urls = ['http://fund.10jqka.com.cn/smxw_list/index_1.shtml'] def parse_record(self, response): filename: str = response.url.split('/')[-1] ...
true
true
f721ec7ee08947d5e5c3b440d62ccc09e6d6cbce
105,565
py
Python
addon/pycThermopack/pyctp/thermo.py
morteham/thermopack
67deaf74a2ae974e880be25026738cc32e3a6c1e
[ "MIT" ]
28
2020-10-14T07:51:21.000Z
2022-03-21T04:59:23.000Z
addon/pycThermopack/pyctp/thermo.py
morteham/thermopack
67deaf74a2ae974e880be25026738cc32e3a6c1e
[ "MIT" ]
20
2020-10-26T11:43:43.000Z
2022-03-30T22:06:30.000Z
addon/pycThermopack/pyctp/thermo.py
morteham/thermopack
67deaf74a2ae974e880be25026738cc32e3a6c1e
[ "MIT" ]
13
2020-10-27T13:04:19.000Z
2022-03-21T04:59:24.000Z
# Support for python2 from __future__ import print_function import sys from ctypes import * from os import path import numpy as np from . import plotutils, utils, platform_specifics if utils.gcc_major_version_greater_than(7): c_len_type = c_size_t # c_size_t on GCC > 7 else: c_len_type = c_int class thermop...
39.389925
182
0.491498
from __future__ import print_function import sys from ctypes import * from os import path import numpy as np from . import plotutils, utils, platform_specifics if utils.gcc_major_version_greater_than(7): c_len_type = c_size_t else: c_len_type = c_int class thermopack(object): def __init__(self): ...
true
true
f721ecf13fb9e94a63ae23e4f9196bc551a982b6
2,161
py
Python
matterhook/incoming.py
bobtiki/DripBot
f0335811cbb42744989c48f056a93d86b2a1564f
[ "MIT" ]
null
null
null
matterhook/incoming.py
bobtiki/DripBot
f0335811cbb42744989c48f056a93d86b2a1564f
[ "MIT" ]
null
null
null
matterhook/incoming.py
bobtiki/DripBot
f0335811cbb42744989c48f056a93d86b2a1564f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Modified to ignore SSL verification, since I can't currently # get it to accept proper SSL connections from the Omni CA import os import requests import urllib3 # Silence the SubjectAltNameWarning that our self-signed CA gives urllib3.disable_warnings(urllib3.exceptio...
28.813333
93
0.613605
# get it to accept proper SSL connections from the Omni CA import os import requests import urllib3 # Silence the SubjectAltNameWarning that our self-signed CA gives urllib3.disable_warnings(urllib3.exceptions.SubjectAltNameWarning) __all__ = ['Webhook'] class InvalidPayload(Exception): pass class HTTPEr...
true
true
f721ed4bfdccbf6ff15d5c7d23d84ae97fcf886d
3,214
py
Python
expanded_checklist/checklist/tests/abstract_tests/classification_test.py
amazon-research/generalized-fairness-metrics
69f4bb0a665b7d4d8f3967a5aa04e3a93d526d3c
[ "Apache-2.0" ]
3
2021-10-30T12:34:32.000Z
2022-02-24T10:27:23.000Z
expanded_checklist/checklist/tests/abstract_tests/classification_test.py
amazon-research/generalized-fairness-metrics
69f4bb0a665b7d4d8f3967a5aa04e3a93d526d3c
[ "Apache-2.0" ]
8
2021-08-18T19:13:53.000Z
2022-02-02T16:06:08.000Z
expanded_checklist/checklist/tests/abstract_tests/classification_test.py
amazon-research/generalized-fairness-metrics
69f4bb0a665b7d4d8f3967a5aa04e3a93d526d3c
[ "Apache-2.0" ]
4
2021-08-13T15:28:28.000Z
2022-03-29T05:25:00.000Z
from abc import abstractmethod from typing import Any, Dict import pandas as pd from .metric_test import MetricTest from overrides import overrides from munch import Munch from expanded_checklist.checklist.utils import \ DataShape, is_2d_list, ACCUMULATED_STR pd.options.display.float_format = "{:,.2f}".format cla...
33.479167
79
0.57654
from abc import abstractmethod from typing import Any, Dict import pandas as pd from .metric_test import MetricTest from overrides import overrides from munch import Munch from expanded_checklist.checklist.utils import \ DataShape, is_2d_list, ACCUMULATED_STR pd.options.display.float_format = "{:,.2f}".format cla...
true
true
f721eead0cd1072ec828af4f83a7a3286c86ec53
2,631
py
Python
tests/bm_interpolate_face_attributes.py
shubham-goel/pytorch3d
e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21
[ "BSD-3-Clause" ]
6
2021-02-09T05:58:53.000Z
2021-11-01T03:28:40.000Z
tests/bm_interpolate_face_attributes.py
shubham-goel/pytorch3d
e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21
[ "BSD-3-Clause" ]
null
null
null
tests/bm_interpolate_face_attributes.py
shubham-goel/pytorch3d
e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21
[ "BSD-3-Clause" ]
2
2021-03-12T07:00:39.000Z
2021-04-12T09:47:36.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. from itertools import product import torch from fvcore.common.benchmark import benchmark from pytorch3d.ops.interp_face_attrs import ( interpolate_face_attributes, interpolate_face_attributes_python, ) def _generate_data(N, S, K, F, D, ...
32.481481
84
0.662866
from itertools import product import torch from fvcore.common.benchmark import benchmark from pytorch3d.ops.interp_face_attrs import ( interpolate_face_attributes, interpolate_face_attributes_python, ) def _generate_data(N, S, K, F, D, device, requires_grad=False): pix_to_face = torch.randint(-10, F, (...
true
true
f721eefbaefb6fb86fcd8f4b856fa798ccad73fe
628
py
Python
packt-social-media-mining/Chap02-03/twitter_hashtag_frequency.py
bitwhys/mining-social-web
8d84c85a415d63bd53b8eb441a4258dc914f4d9f
[ "BSD-2-Clause" ]
null
null
null
packt-social-media-mining/Chap02-03/twitter_hashtag_frequency.py
bitwhys/mining-social-web
8d84c85a415d63bd53b8eb441a4258dc914f4d9f
[ "BSD-2-Clause" ]
7
2020-03-24T18:01:12.000Z
2021-06-08T20:47:00.000Z
packt-social-media-mining/Chap02-03/twitter_hashtag_frequency.py
bitwhys/mining-social-web
8d84c85a415d63bd53b8eb441a4258dc914f4d9f
[ "BSD-2-Clause" ]
null
null
null
# Chap02/twitter_hashtag_frequency.py import sys from collections import Counter import json def get_hashtags(tweet): entities = tweet.get('entities', {}) hashtags = entities.get('hashtags', []) return [tag['text'].lower() for tag in hashtags] if __name__ == '__main__': fname = sys.argv[1] with op...
29.904762
52
0.627389
import sys from collections import Counter import json def get_hashtags(tweet): entities = tweet.get('entities', {}) hashtags = entities.get('hashtags', []) return [tag['text'].lower() for tag in hashtags] if __name__ == '__main__': fname = sys.argv[1] with open(fname, 'r') as f: hashtags...
true
true
f721f0cb4d5df5a0d5895eb9316317e2aedfce7f
1,750
py
Python
apps/mail/tasks.py
magocod/djheavy
a7291edb6d2b406af73737c254be3bc3a66e44ae
[ "MIT" ]
2
2020-02-24T00:29:21.000Z
2021-01-13T02:41:01.000Z
apps/mail/tasks.py
magocod/djheavy
a7291edb6d2b406af73737c254be3bc3a66e44ae
[ "MIT" ]
6
2020-10-08T15:16:34.000Z
2021-09-22T18:37:58.000Z
apps/mail/tasks.py
magocod/djheavy
a7291edb6d2b406af73737c254be3bc3a66e44ae
[ "MIT" ]
1
2020-08-05T10:12:41.000Z
2020-08-05T10:12:41.000Z
from __future__ import absolute_import, unicode_literals # from time import sleep import binascii import os from celery import shared_task from django.conf import settings # Django from django.core.cache import cache from django.core.mail import send_mail from django.template.loader import render_to_string # local...
22.435897
70
0.667429
from __future__ import absolute_import, unicode_literals import binascii import os from celery import shared_task from django.conf import settings from django.core.cache import cache from django.core.mail import send_mail from django.template.loader import render_to_string from apps.mail.models import Mail ...
true
true
f721f1c921e737b25562b868ababcc6997318950
5,161
py
Python
wagtail_daterange/filter.py
michael-yin/wagtail-daterange
c56aba056b179cb46bfd70acf0dee9f65cc214c7
[ "MIT" ]
1
2022-03-18T09:15:01.000Z
2022-03-18T09:15:01.000Z
wagtail_daterange/filter.py
ivanguy/wagtail-daterange
e7d07f62271f81f3a79733938f8d5dd78aa83959
[ "MIT" ]
null
null
null
wagtail_daterange/filter.py
ivanguy/wagtail-daterange
e7d07f62271f81f3a79733938f8d5dd78aa83959
[ "MIT" ]
2
2018-07-26T23:39:57.000Z
2020-05-20T12:24:46.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import django try: import pytz except ImportError: pytz = None from collections import OrderedDict from django import forms from django.conf import settings from django.contrib import admin from django.utils import timezone fro...
33.083333
101
0.602596
from __future__ import unicode_literals import datetime import django try: import pytz except ImportError: pytz = None from collections import OrderedDict from django import forms from django.conf import settings from django.contrib import admin from django.utils import timezone from django.template.defau...
true
true
f721f2d846051c7aa457b3b1b26f7643c7d67fa0
9,344
py
Python
third_party/Paste/paste/urlmap.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/Paste/paste/urlmap.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
4,640
2015-07-08T16:19:08.000Z
2019-12-02T15:01:27.000Z
third_party/Paste/paste/urlmap.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
698
2015-06-02T19:18:35.000Z
2022-03-29T16:57:15.000Z
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Map URL prefixes to WSGI applications. See ``URLMap`` """ import re import os import cgi try: # Python 3 from collections import MutableM...
35.393939
84
0.585402
import re import os import cgi try: from collections import MutableMapping as DictMixin except ImportError: from UserDict import DictMixin from paste import httpexceptions __all__ = ['URLMap', 'PathProxyURLMap'] def urlmap_factory(loader, global_conf, **local_conf): if 'not_found_app' in loc...
true
true
f721f3ddf13fab1c1dd77ef776c52be317cf6e44
1,279
py
Python
lib/rabbitmq-dotnet-client-rabbitmq_v3_4_4/docs/pyle2-fcfcf7e/spanhandlers/attachment.py
CymaticLabs/Unity3d.Amqp
42ca5de66fcda21ef6a4040bade99118b2ad6374
[ "MIT" ]
83
2017-03-15T12:43:25.000Z
2022-03-31T12:38:44.000Z
lib/rabbitmq-dotnet-client-rabbitmq_v3_4_4/docs/pyle2-fcfcf7e/spanhandlers/attachment.py
CymaticLabs/Unity3d.Amqp
42ca5de66fcda21ef6a4040bade99118b2ad6374
[ "MIT" ]
18
2017-03-20T14:12:58.000Z
2021-07-28T09:11:55.000Z
lib/rabbitmq-dotnet-client-rabbitmq_v3_4_4/docs/pyle2-fcfcf7e/spanhandlers/attachment.py
CymaticLabs/Unity3d.Amqp
42ca5de66fcda21ef6a4040bade99118b2ad6374
[ "MIT" ]
25
2017-04-01T01:40:02.000Z
2022-02-20T11:08:12.000Z
import Inline import Core import web info = { "friendly_name": "Attachment", "example_template": "pagename:attachmentname", "summary": "Links to an attachment of this (or another, named) page.", "details": """ <p>If invoked as [attachment some.filename], it will either embed (if the attachment...
26.645833
74
0.634871
import Inline import Core import web info = { "friendly_name": "Attachment", "example_template": "pagename:attachmentname", "summary": "Links to an attachment of this (or another, named) page.", "details": """ <p>If invoked as [attachment some.filename], it will either embed (if the attachment...
true
true
f721f56cbde628047f9a4dc62bd67e702f776cbd
4,788
py
Python
Thesis@3.9.1/Lib/site-packages/mypyc/primitives/list_ops.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/mypyc/primitives/list_ops.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/mypyc/primitives/list_ops.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
"""List primitive ops.""" from typing import List from mypyc.ir.ops import ERR_MAGIC, ERR_NEVER, ERR_FALSE, EmitterInterface from mypyc.ir.rtypes import ( int_rprimitive, short_int_rprimitive, list_rprimitive, object_rprimitive, bool_rprimitive, ) from mypyc.primitives.registry import ( name_r...
25.604278
82
0.701337
from typing import List from mypyc.ir.ops import ERR_MAGIC, ERR_NEVER, ERR_FALSE, EmitterInterface from mypyc.ir.rtypes import ( int_rprimitive, short_int_rprimitive, list_rprimitive, object_rprimitive, bool_rprimitive, ) from mypyc.primitives.registry import ( name_ref_op, binary_op, ...
true
true
f721f80c825ad0a5b4d65ff002d6c6ca07631547
33,858
py
Python
tests/unit/test_notifications.py
klmitch/heyu
9bdc552115bb22d1d01910b0b851eb3cbc3b08d1
[ "Apache-2.0" ]
null
null
null
tests/unit/test_notifications.py
klmitch/heyu
9bdc552115bb22d1d01910b0b851eb3cbc3b08d1
[ "Apache-2.0" ]
null
null
null
tests/unit/test_notifications.py
klmitch/heyu
9bdc552115bb22d1d01910b0b851eb3cbc3b08d1
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Rackspace # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
42.3225
79
0.647528
import io import signal import sys import unittest import mock from heyu import notifications from heyu import protocol from heyu import util class TestException(Exception): pass class NotificationServerTest(unittest.TestCase): def _signal_test(self, notifier_server, mock_signal): s...
true
true
f721f976f94d622fc2a6a2309a5483d8547b33ec
4,780
py
Python
RecoLocalCalo/HcalRecAlgos/test/test_RecHitReflagger_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
RecoLocalCalo/HcalRecAlgos/test/test_RecHitReflagger_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
RecoLocalCalo/HcalRecAlgos/test/test_RecHitReflagger_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
from __future__ import print_function import FWCore.ParameterSet.Config as cms maxevents=10 isMC=False #isMC=True process = cms.Process('TEST') #process.load('JetMETAnalysis.PromptAnalysis.ntuple_cff') process.load('Configuration.StandardSequences.Services_cff') process.load('Configuration/StandardSequences/Geomet...
40.854701
124
0.730544
from __future__ import print_function import FWCore.ParameterSet.Config as cms maxevents=10 isMC=False process = cms.Process('TEST') process.load('Configuration.StandardSequences.Services_cff') process.load('Configuration/StandardSequences/GeometryExtended_cff') process.load('Configuration/StandardSequences/Reco...
true
true
f721f9a0a04d2003639f19899e390e586887dfde
1,478
py
Python
tests/test_ctc1.py
madhurkashyap/boundary_detection
f7fb98c8bcbc204b1fcd0eb34a8699f16a8725a3
[ "MIT" ]
null
null
null
tests/test_ctc1.py
madhurkashyap/boundary_detection
f7fb98c8bcbc204b1fcd0eb34a8699f16a8725a3
[ "MIT" ]
null
null
null
tests/test_ctc1.py
madhurkashyap/boundary_detection
f7fb98c8bcbc204b1fcd0eb34a8699f16a8725a3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Apr 26 15:15:55 2018 @author: Madhur Kashyap 2016EEZ8350 """ import os import sys import logging from keras.optimizers import Adam prog = os.path.basename(__file__) codedir = os.path.join(os.path.dirname(__file__),"..","code") sys.path.append(codedir) from ...
29.56
80
0.654263
import os import sys import logging from keras.optimizers import Adam prog = os.path.basename(__file__) codedir = os.path.join(os.path.dirname(__file__),"..","code") sys.path.append(codedir) from Utils import initlog from SpeechCorpus import Timit from AcousticModels import bidi_ctc_lstm2 from TrainUti...
true
true
f721f9a94d7bd0380939cb8f34a40ef3e45f8ffa
2,106
py
Python
tensorflow_federated/python/core/impl/computation_impl_test.py
iahsanujunda/federated
109a5653a305dc9d4bcbafc259257add4dc70365
[ "Apache-2.0" ]
5
2020-06-04T20:10:25.000Z
2020-07-22T02:15:38.000Z
tensorflow_federated/python/core/impl/computation_impl_test.py
iahsanujunda/federated
109a5653a305dc9d4bcbafc259257add4dc70365
[ "Apache-2.0" ]
7
2020-04-03T05:32:28.000Z
2020-05-15T01:28:25.000Z
tensorflow_federated/python/core/impl/computation_impl_test.py
iahsanujunda/federated
109a5653a305dc9d4bcbafc259257add4dc70365
[ "Apache-2.0" ]
2
2020-04-28T17:46:13.000Z
2022-02-10T02:40:40.000Z
# Copyright 2018, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
39
82
0.723172
from absl.testing import absltest import tensorflow as tf from tensorflow_federated.proto.v0 import computation_pb2 as pb from tensorflow_federated.python.core.api import computation_types from tensorflow_federated.python.core.impl import computation_impl from tensorflow_federated.python.core.impl.contex...
true
true
f721fa2c57691ec9594ce9f452796ed5cddcfa12
2,996
py
Python
ui/sentiment.py
minminfly68/Song-recommendation-Project-CAPP-30122-
9f97d6accdfd33c5bac267980b6c10d6d5b93bc7
[ "MIT" ]
null
null
null
ui/sentiment.py
minminfly68/Song-recommendation-Project-CAPP-30122-
9f97d6accdfd33c5bac267980b6c10d6d5b93bc7
[ "MIT" ]
6
2021-03-19T03:18:44.000Z
2021-09-22T19:00:52.000Z
ui/sentiment.py
minminfly68/Song-recommendation-Project-CAPP-30122-
9f97d6accdfd33c5bac267980b6c10d6d5b93bc7
[ "MIT" ]
null
null
null
''' Conduct Sentiment Analysis Chun Hu, Yimin Li, Tianyue Niu ''' import os import json import re import pandas as pd import nltk nltk.download('punkt') nltk.download('wordnet') nltk.download('stopwords') from nltk import word_tokenize, sent_tokenize from nltk.corpus import stopwords from nltk.stem import WordNetLemma...
25.176471
83
0.636515
import os import json import re import pandas as pd import nltk nltk.download('punkt') nltk.download('wordnet') nltk.download('stopwords') from nltk import word_tokenize, sent_tokenize from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer from textblob import TextBlob pd.set_option('mode.chained_...
true
true
f721fa58cff2f8d988c4fa6e76255de74891ffd2
2,117
py
Python
libs/EXTERNAL/capnproto/doc/_plugins/capnp_lexer.py
brycejh/vtr-verilog-to-routing
f61da5eb2d4e008728a01def827d55a0e9f285d0
[ "MIT" ]
4,518
2017-06-06T15:33:15.000Z
2022-03-31T16:43:23.000Z
doc/_plugins/capnp_lexer.py
seanwallawalla-forks/capnproto
8009588ff84cbdf233f6d23d1d507462b050b427
[ "MIT" ]
1,399
2015-07-24T22:09:09.000Z
2022-03-29T06:22:48.000Z
doc/_plugins/capnp_lexer.py
seanwallawalla-forks/capnproto
8009588ff84cbdf233f6d23d1d507462b050b427
[ "MIT" ]
492
2017-06-07T08:40:53.000Z
2022-03-30T20:57:05.000Z
#! /usr/bin/env python from pygments.lexer import RegexLexer from pygments.token import * class CapnpLexer(RegexLexer): name = "Cap'n Proto lexer" aliases = ['capnp'] filenames = ['*.capnp'] tokens = { 'root': [ (r'#.*?$', Comment.Single), (r'@[0-9a-zA-Z]*', Name.Decor...
32.569231
128
0.421351
from pygments.lexer import RegexLexer from pygments.token import * class CapnpLexer(RegexLexer): name = "Cap'n Proto lexer" aliases = ['capnp'] filenames = ['*.capnp'] tokens = { 'root': [ (r' (r'@[0-9a-zA-Z]*', Name.Decorator), (r'=', Literal, 'expression...
true
true
f721fc1798358232695a6e8277cd43f94a436dc0
875
gyp
Python
tools/android/memconsumer/memconsumer.gyp
domenic/mojo
53dda76fed90a47c35ed6e06baf833a0d44495b8
[ "BSD-3-Clause" ]
5
2015-04-30T00:13:21.000Z
2019-07-10T02:17:24.000Z
tools/android/memconsumer/memconsumer.gyp
domenic/mojo
53dda76fed90a47c35ed6e06baf833a0d44495b8
[ "BSD-3-Clause" ]
null
null
null
tools/android/memconsumer/memconsumer.gyp
domenic/mojo
53dda76fed90a47c35ed6e06baf833a0d44495b8
[ "BSD-3-Clause" ]
5
2016-12-23T04:21:10.000Z
2020-06-18T13:52:33.000Z
# Copyright 2013 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. { 'targets': [ { 'target_name': 'memconsumer', 'type': 'none', 'dependencies': [ 'memconsumer_apk', ], }, { ...
21.875
72
0.512
{ 'targets': [ { 'target_name': 'memconsumer', 'type': 'none', 'dependencies': [ 'memconsumer_apk', ], }, { 'target_name': 'memconsumer_apk', 'type': 'none', 'variables': { 'apk_name': 'MemConsumer', 'java_in_dir': 'java', 'reso...
true
true
f721fc81e52074ea25597094fc8f790020e21816
803
py
Python
ros2_sub/setup.py
ipa-rar/ros2_practice_workspace
6329085df960eb4e2cc849c7ee527b99be11571e
[ "MIT" ]
null
null
null
ros2_sub/setup.py
ipa-rar/ros2_practice_workspace
6329085df960eb4e2cc849c7ee527b99be11571e
[ "MIT" ]
null
null
null
ros2_sub/setup.py
ipa-rar/ros2_practice_workspace
6329085df960eb4e2cc849c7ee527b99be11571e
[ "MIT" ]
null
null
null
import os from glob import glob from setuptools import setup package_name = 'ros2_sub' setup( name=package_name, version='0.0.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + package_name, ['p...
26.766667
67
0.638854
import os from glob import glob from setuptools import setup package_name = 'ros2_sub' setup( name=package_name, version='0.0.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + package_name, ['p...
true
true
f721fd69cb07522a89aac4665560e173501eb593
1,527
py
Python
tests/h/oauth/tokens_test.py
tgiardina/rpp-h
fece590f901b052a59c19a24acfeba52cee33c84
[ "BSD-2-Clause" ]
null
null
null
tests/h/oauth/tokens_test.py
tgiardina/rpp-h
fece590f901b052a59c19a24acfeba52cee33c84
[ "BSD-2-Clause" ]
null
null
null
tests/h/oauth/tokens_test.py
tgiardina/rpp-h
fece590f901b052a59c19a24acfeba52cee33c84
[ "BSD-2-Clause" ]
null
null
null
from unittest import mock import pytest from oauthlib.common import Request as OAuthRequest from h.oauth.tokens import BearerToken class TestBearerToken: @pytest.mark.parametrize( "attr", [ "request_validator", "token_generator", "expires_in", "ref...
31.163265
87
0.664702
from unittest import mock import pytest from oauthlib.common import Request as OAuthRequest from h.oauth.tokens import BearerToken class TestBearerToken: @pytest.mark.parametrize( "attr", [ "request_validator", "token_generator", "expires_in", "ref...
true
true
f721ff9b0aca2610a6cdf14f769fcdcfe21e1189
1,242
py
Python
Python/flask/l10n/app.py
saneravi/ML_Stuff
74e1ed7ba9f4dccb555792315a14ba6071150304
[ "MIT" ]
209
2015-01-02T03:47:12.000Z
2022-03-06T16:54:47.000Z
Python/flask/l10n/app.py
Kerwin-Xie/algorithms
4347a9b7bf54ef378d16d26ef9e357ddc710664b
[ "MIT" ]
3
2015-12-06T14:40:34.000Z
2021-03-22T17:40:24.000Z
Python/flask/l10n/app.py
Kerwin-Xie/algorithms
4347a9b7bf54ef378d16d26ef9e357ddc710664b
[ "MIT" ]
114
2015-01-31T08:37:10.000Z
2022-02-23T04:42:28.000Z
#!/usr/bin/env python # core modules import datetime import flask_babel # 3rd party modules from flask import Flask, flash, render_template from flask_babel import Babel, _ def format_datetime(value, format="medium"): import flask_babel if format == "full": format = "EEEE, d. MMMM y 'at' HH:mm" ...
23
79
0.663446
import datetime import flask_babel from flask import Flask, flash, render_template from flask_babel import Babel, _ def format_datetime(value, format="medium"): import flask_babel if format == "full": format = "EEEE, d. MMMM y 'at' HH:mm" elif format == "medium": format = "EE dd.MM.y...
true
true
f72200339a1f28f8cc91946cd3c16de8ee514ef5
1,306
py
Python
test_models/data.py
OleguerCanal/transplanter
854fa727747a484dedde9092eeee6884d7d1b44b
[ "MIT" ]
1
2022-03-23T09:27:56.000Z
2022-03-23T09:27:56.000Z
test_models/data.py
OleguerCanal/transplanter
854fa727747a484dedde9092eeee6884d7d1b44b
[ "MIT" ]
null
null
null
test_models/data.py
OleguerCanal/transplanter
854fa727747a484dedde9092eeee6884d7d1b44b
[ "MIT" ]
null
null
null
from typing import Optional import pytorch_lightning as pl import torchvision import torchvision.transforms as transforms from torchvision.datasets import CIFAR10 from torch.utils.data import DataLoader, random_split class CIFARDataModule(pl.LightningDataModule): def __init__(self, data_dir: str = "./data", batch...
36.277778
96
0.69219
from typing import Optional import pytorch_lightning as pl import torchvision import torchvision.transforms as transforms from torchvision.datasets import CIFAR10 from torch.utils.data import DataLoader, random_split class CIFARDataModule(pl.LightningDataModule): def __init__(self, data_dir: str = "./data", batch...
true
true
f722004f53f62148f2709542630d070ec6adc442
560
py
Python
outreach/migrations/0002_auto_20161020_1929.py
atish3/mig-website
1bcf4c0b93078cccab6b4a25c93c29a2b5efa4be
[ "Apache-2.0" ]
4
2017-10-02T17:44:14.000Z
2020-02-14T17:13:57.000Z
outreach/migrations/0002_auto_20161020_1929.py
atish3/mig-website
1bcf4c0b93078cccab6b4a25c93c29a2b5efa4be
[ "Apache-2.0" ]
152
2015-01-04T00:08:44.000Z
2022-01-13T00:43:03.000Z
outreach/migrations/0002_auto_20161020_1929.py
atish3/mig-website
1bcf4c0b93078cccab6b4a25c93c29a2b5efa4be
[ "Apache-2.0" ]
4
2015-04-16T04:27:05.000Z
2021-03-21T20:45:24.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-20 23:29 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('outreach', '0001_initial'), ] operations = [ ...
25.454545
117
0.664286
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('outreach', '0001_initial'), ] operations = [ migrations.AlterField( model_name='outreacheventtype', ...
true
true
f722015ee354379fc8050d0825f9ed09fdd7e7d9
7,523
py
Python
chainer/functions/pooling/max_pooling_nd_kernel.py
zaltoprofen/chainer
3b03f9afc80fd67f65d5e0395ef199e9506b6ee1
[ "MIT" ]
3,705
2017-06-01T07:36:12.000Z
2022-03-30T10:46:15.000Z
chainer/functions/pooling/max_pooling_nd_kernel.py
zaltoprofen/chainer
3b03f9afc80fd67f65d5e0395ef199e9506b6ee1
[ "MIT" ]
5,998
2017-06-01T06:40:17.000Z
2022-03-08T01:42:44.000Z
chainer/functions/pooling/max_pooling_nd_kernel.py
zaltoprofen/chainer
3b03f9afc80fd67f65d5e0395ef199e9506b6ee1
[ "MIT" ]
1,150
2017-06-02T03:39:46.000Z
2022-03-29T02:29:32.000Z
import six from chainer.functions.pooling import pooling_nd_kernel from chainer.utils import conv_nd_kernel class MaxPoolingNDKernelForward(pooling_nd_kernel.PoolingNDKernelForward): def name(self): # max_pool_{N}d_fwd return 'max' def out_params(self): # T out, S indexes re...
36.342995
79
0.541938
import six from chainer.functions.pooling import pooling_nd_kernel from chainer.utils import conv_nd_kernel class MaxPoolingNDKernelForward(pooling_nd_kernel.PoolingNDKernelForward): def name(self): return 'max' def out_params(self): return ['S indexes'] def before(se...
true
true
f72201c4e1f81e14abadd52a79cbc75cada4ea22
870
py
Python
setup.py
paluh/wrestler
f00b4956765d8897322f63310b2c3e6668e6725d
[ "BSD-3-Clause" ]
null
null
null
setup.py
paluh/wrestler
f00b4956765d8897322f63310b2c3e6668e6725d
[ "BSD-3-Clause" ]
null
null
null
setup.py
paluh/wrestler
f00b4956765d8897322f63310b2c3e6668e6725d
[ "BSD-3-Clause" ]
null
null
null
try: from setuptools import setup except ImportError: from distutils.core import setup CLASSIFIERS = [ 'Development Status :: 1 - Planning', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Prog...
24.857143
62
0.662069
try: from setuptools import setup except ImportError: from distutils.core import setup CLASSIFIERS = [ 'Development Status :: 1 - Planning', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Prog...
true
true
f722029155968a27b82e4ff0a96fce5c6afb335d
1,571
py
Python
siliconcompiler/tools/openfpgaloader/openfpgaloader.py
hohe/siliconcompiler
497f272c87c8f247dcd29db76c8d6ed0c0939e50
[ "Apache-2.0" ]
1
2022-03-10T03:56:49.000Z
2022-03-10T03:56:49.000Z
siliconcompiler/tools/openfpgaloader/openfpgaloader.py
hohe/siliconcompiler
497f272c87c8f247dcd29db76c8d6ed0c0939e50
[ "Apache-2.0" ]
null
null
null
siliconcompiler/tools/openfpgaloader/openfpgaloader.py
hohe/siliconcompiler
497f272c87c8f247dcd29db76c8d6ed0c0939e50
[ "Apache-2.0" ]
null
null
null
import os import subprocess import re import sys import shutil import siliconcompiler #################################################################### # Make Docs #################################################################### def make_docs(): ''' The OpenFPGALoader is a universal utility for program...
27.086207
68
0.574793
import os import subprocess import re import sys import shutil import siliconcompiler
true
true
f72203fb31e7832dd9f7c4b06f45103f15916b3e
6,617
py
Python
chillapi/abc.py
andrescevp/chillapi
1c5f07600748eb65f413ad19f5e67653cce8b787
[ "Apache-2.0" ]
2
2021-05-05T10:54:34.000Z
2021-05-05T12:45:18.000Z
chillapi/abc.py
andrescevp/chillapi
1c5f07600748eb65f413ad19f5e67653cce8b787
[ "Apache-2.0" ]
null
null
null
chillapi/abc.py
andrescevp/chillapi
1c5f07600748eb65f413ad19f5e67653cce8b787
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod from typing import List from sqlalchemy.engine import CursorResult, Inspector from sqlalchemy.orm.scoping import ScopedSession from .database import _ALLOWED_DRIVERS from .exceptions.api_manager import ColumnNotExist, ConfigError class Repository(ABC): """ """ def __init...
25.847656
138
0.569291
from abc import ABC, abstractmethod from typing import List from sqlalchemy.engine import CursorResult, Inspector from sqlalchemy.orm.scoping import ScopedSession from .database import _ALLOWED_DRIVERS from .exceptions.api_manager import ColumnNotExist, ConfigError class Repository(ABC): def __init__(self, db:...
true
true
f722058a9fefec1defa9ea29827379f0c1c55fc1
6,172
py
Python
tools/marvin/marvin/marvinInit.py
pkoistin/cloudstack
fd43cf151663c48fe29f97323490d53a7c0f9d5b
[ "ECL-2.0", "Apache-2.0" ]
1
2020-10-29T04:14:14.000Z
2020-10-29T04:14:14.000Z
tools/marvin/marvin/marvinInit.py
alexoughsg/Albatross.Backup
050016dbf1d2d1f7e1a6e49b54cdeb3108a5d6b7
[ "Apache-2.0" ]
6
2020-11-16T20:46:14.000Z
2022-02-01T01:06:16.000Z
tools/marvin/marvin/marvinInit.py
pkoistin/cloudstack
fd43cf151663c48fe29f97323490d53a7c0f9d5b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.305882
77
0.586034
''' @Desc: Initializes the marvin and does required prerequisites for starting it. 1. Parses the configuration file passed to marvin and creates a parsed config 2. Initializes the logging required for marvin.All logs are now made available under a single timestamped folder. 3. Deploys the Da...
false
true
f72206e42403c11c1c1c1130d4e236efff455e1e
5,448
py
Python
pandas/tests/series/test_cumulative.py
mlline00/pandas
fd7db9819b8c7dba86b2887bee33f670b2715afc
[ "BSD-3-Clause" ]
1
2021-04-01T11:19:53.000Z
2021-04-01T11:19:53.000Z
pandas/tests/series/test_cumulative.py
ivan-vasilev/pandas
4071dde86e33434e1bee8304fa62074949f813cc
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/series/test_cumulative.py
ivan-vasilev/pandas
4071dde86e33434e1bee8304fa62074949f813cc
[ "BSD-3-Clause" ]
null
null
null
""" Tests for Series cumulative operations. See also -------- tests.frame.test_cumulative """ from itertools import product import numpy as np import pytest import pandas as pd import pandas.util.testing as tm def _check_accum_op(name, series, check_dtype=True): func = getattr(np, name) tm.assert_numpy_arr...
31.859649
88
0.558554
from itertools import product import numpy as np import pytest import pandas as pd import pandas.util.testing as tm def _check_accum_op(name, series, check_dtype=True): func = getattr(np, name) tm.assert_numpy_array_equal( func(series).values, func(np.array(series)), check_dtype=check_dtype, ) ...
true
true
f7220728cd8301f75d31c36ed0264f74be8b8b0f
187
py
Python
month02/day03/buffer.py
Amiao-miao/all-codes
ec50036d42d40086cac5fddf6baf4de18ac91e55
[ "Apache-2.0" ]
1
2021-02-02T02:17:37.000Z
2021-02-02T02:17:37.000Z
month02/day03/buffer.py
Amiao-miao/all-codes
ec50036d42d40086cac5fddf6baf4de18ac91e55
[ "Apache-2.0" ]
null
null
null
month02/day03/buffer.py
Amiao-miao/all-codes
ec50036d42d40086cac5fddf6baf4de18ac91e55
[ "Apache-2.0" ]
null
null
null
#行缓冲打开 file=open("3.txt",'wb',buffering=10) while True: data=input("<<") if not data: break file.write((data+"\n").encode()) # file.flush() #刷新缓冲 file.close()
14.384615
36
0.55615
file=open("3.txt",'wb',buffering=10) while True: data=input("<<") if not data: break file.write((data+"\n").encode()) .close()
true
true
f7220870e4ac64ce035175f7d9e02ed043831af2
1,987
py
Python
xknx/knxip/disconnect_request.py
marvin-w/xknx
9f8b80fa0906a345c7def519ac3c92c955990a26
[ "MIT" ]
null
null
null
xknx/knxip/disconnect_request.py
marvin-w/xknx
9f8b80fa0906a345c7def519ac3c92c955990a26
[ "MIT" ]
1
2019-01-06T11:40:16.000Z
2019-01-06T11:40:16.000Z
xknx/knxip/disconnect_request.py
marvin-w/xknx
9f8b80fa0906a345c7def519ac3c92c955990a26
[ "MIT" ]
null
null
null
""" Module for Serialization and Deserialization of a KNX Disconnect Request information. Connect requests are used to disconnect a tunnel from a KNX/IP device. """ from xknx.exceptions import CouldNotParseKNXIP from .body import KNXIPBody from .hpai import HPAI from .knxip_enum import KNXIPServiceType class Discon...
28.797101
85
0.617514
from xknx.exceptions import CouldNotParseKNXIP from .body import KNXIPBody from .hpai import HPAI from .knxip_enum import KNXIPServiceType class DisconnectRequest(KNXIPBody): service_type = KNXIPServiceType.DISCONNECT_REQUEST def __init__(self, xknx): super().__init__(xknx) self.comm...
true
true
f72209c4367259bfc0bdf1ad69eaae4ca6dd390a
80,107
py
Python
ibutsu_client/model_utils.py
rsnyman/ibutsu-client-python
451bae383a8bd1a35c3cf917749614cfcbd94283
[ "MIT" ]
null
null
null
ibutsu_client/model_utils.py
rsnyman/ibutsu-client-python
451bae383a8bd1a35c3cf917749614cfcbd94283
[ "MIT" ]
null
null
null
ibutsu_client/model_utils.py
rsnyman/ibutsu-client-python
451bae383a8bd1a35c3cf917749614cfcbd94283
[ "MIT" ]
null
null
null
""" Ibutsu API A system to store and query test results # noqa: E501 The version of the OpenAPI document: 1.13.4 Generated by: https://openapi-generator.tech """ from datetime import date, datetime # noqa: F401 import inspect import io import os import pprint import re import tempfile from dateut...
40.19418
115
0.628859
from datetime import date, datetime import inspect import io import os import pprint import re import tempfile from dateutil.parser import parse from ibutsu_client.exceptions import ( ApiKeyError, ApiAttributeError, ApiTypeError, ApiValueError, ) none_type = type(None) file_type = io.IOBase def...
true
true
f7220aec41876620567ec4f5a2fa2a87f3c48aab
4,306
py
Python
server.py
jsagurton/homekit-neopixel-rpi
0a0725bf5bb4b3c81c25d4909e2225b6c03411c0
[ "MIT" ]
2
2020-05-13T17:43:25.000Z
2020-06-01T04:13:28.000Z
server.py
jsagurton/homekit-neopixel-rpi
0a0725bf5bb4b3c81c25d4909e2225b6c03411c0
[ "MIT" ]
null
null
null
server.py
jsagurton/homekit-neopixel-rpi
0a0725bf5bb4b3c81c25d4909e2225b6c03411c0
[ "MIT" ]
null
null
null
import time import board import neopixel import threading from flask import Flask # Choose an open pin connected to the Data In of the NeoPixel strip, i.e. board.D18 # NeoPixels must be connected to D10, D12, D18 or D21 to work. pixel_pin = board.D21 # The number of NeoPixels num_pixels = 137 # The order of the pix...
27.602564
159
0.657687
import time import board import neopixel import threading from flask import Flask pixel_pin = board.D21 num_pixels = 137 ORDER = neopixel.GRB pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=1.0, auto_write=False, pixel_order=ORDER) app = Flask(__name__) rgb=(255,255,25...
true
true
f7220b27f22bbf7fe83a49aeb06fc164fc8a0b60
3,903
py
Python
test/flags.py
aleasims/Peach
bb56841e943d719d5101fee0a503ed34308eda04
[ "MIT" ]
null
null
null
test/flags.py
aleasims/Peach
bb56841e943d719d5101fee0a503ed34308eda04
[ "MIT" ]
null
null
null
test/flags.py
aleasims/Peach
bb56841e943d719d5101fee0a503ed34308eda04
[ "MIT" ]
1
2020-07-26T03:57:45.000Z
2020-07-26T03:57:45.000Z
''' Several testcases around <Flags> and <Flag>. ''' import sys sys.path.append("c:/peach") from Peach.Generators.dictionary import * from Peach.Generators.static import * import unittest import utils import struct def suite(): suite = unittest.TestSuite() suite.addTest(FlagsInputTestCase()) suite...
27.878571
104
0.658724
import sys sys.path.append("c:/peach") from Peach.Generators.dictionary import * from Peach.Generators.static import * import unittest import utils import struct def suite(): suite = unittest.TestSuite() suite.addTest(FlagsInputTestCase()) suite.addTest(FlagsOutputTestCase()) suite.addT...
true
true
f7220b6826ac6e6db12ecb47cf44face19cbbe4d
644
py
Python
src/python/pants/backend/experimental/docker/register.py
yoav-orca/pants
995448e9add343975844c7a43d5d64618fc4e4d9
[ "Apache-2.0" ]
1,806
2015-01-05T07:31:00.000Z
2022-03-31T11:35:41.000Z
src/python/pants/backend/experimental/docker/register.py
yoav-orca/pants
995448e9add343975844c7a43d5d64618fc4e4d9
[ "Apache-2.0" ]
9,565
2015-01-02T19:01:59.000Z
2022-03-31T23:25:16.000Z
src/python/pants/backend/experimental/docker/register.py
riisi/pants
b33327389fab67c47b919710ea32f20ca284b1a6
[ "Apache-2.0" ]
443
2015-01-06T20:17:57.000Z
2022-03-31T05:28:17.000Z
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.backend.codegen import export_codegen_goal from pants.backend.docker.goals.tailor import rules as tailor_rules from pants.backend.docker.rules import rules as docker_rules from ...
29.272727
67
0.75
from pants.backend.codegen import export_codegen_goal from pants.backend.docker.goals.tailor import rules as tailor_rules from pants.backend.docker.rules import rules as docker_rules from pants.backend.docker.target_types import DockerImageTarget from pants.backend.python.util_rules.pex import rules as pex_rules d...
true
true
f7220b72397b2f715a8c642f041b2601f7a9bea8
1,148
py
Python
15CSL76_Machine_Learning/lab/8-em-kmeans.py
Shivanisen16/vtulabs
2bc41d856612840cf035b570e6256ffc5bcbab5d
[ "MIT" ]
7
2019-04-30T13:25:01.000Z
2021-01-04T13:02:20.000Z
15CSL76_Machine_Learning/lab/8-em-kmeans.py
Shivanisen16/vtulabs
2bc41d856612840cf035b570e6256ffc5bcbab5d
[ "MIT" ]
4
2018-12-17T08:46:55.000Z
2019-11-12T11:47:24.000Z
15CSL76_Machine_Learning/lab/8-em-kmeans.py
cseas/vtulabs
2bc41d856612840cf035b570e6256ffc5bcbab5d
[ "MIT" ]
14
2018-12-03T06:55:18.000Z
2021-01-04T02:49:12.000Z
import copy import numpy as np import pandas as pd from matplotlib import pyplot as plt from sklearn.mixture import GaussianMixture from sklearn.cluster import KMeans # Importing the dataset data = pd.read_csv("ex.csv") print("Input Data and Shape:") print(data.head(3)) print("Shape:", data.shape) # Gett...
26.697674
76
0.655052
import copy import numpy as np import pandas as pd from matplotlib import pyplot as plt from sklearn.mixture import GaussianMixture from sklearn.cluster import KMeans data = pd.read_csv("ex.csv") print("Input Data and Shape:") print(data.head(3)) print("Shape:", data.shape) f1 = data['V1'].values f2 = ...
true
true
f7220c584b0c5c0a472d032b76d41c1b9f1c37f5
63,818
py
Python
gunicorn/config.py
Alexa3001/gunicorn
c0d05dad3d759f8cbbc465ba4698e1e94ed67cd7
[ "MIT" ]
null
null
null
gunicorn/config.py
Alexa3001/gunicorn
c0d05dad3d759f8cbbc465ba4698e1e94ed67cd7
[ "MIT" ]
null
null
null
gunicorn/config.py
Alexa3001/gunicorn
c0d05dad3d759f8cbbc465ba4698e1e94ed67cd7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. # Please remember to run "make -C docs html" after update "desc" attributes. import argparse import copy import grp import inspect import os import pwd import re import shlex import ssl impor...
28.225564
144
0.597684
import argparse import copy import grp import inspect import os import pwd import re import shlex import ssl import sys import textwrap from gunicorn import __version__, util from gunicorn.errors import ConfigError from gunicorn.reloader import reloader_engines KNOWN_SETTINGS = [] PLATFORM = sys.platform def...
true
true
f7220def58979cdc9b193f290962e4ce04a90b11
4,857
py
Python
tests/functional/test_echeck_credit.py
isunnapud/vantiv-sdk-for-python
85ea6ba160c2436a305b9326cbb7d6c8f127c57c
[ "MIT" ]
4
2017-11-16T16:02:06.000Z
2021-05-04T14:40:08.000Z
tests/functional/test_echeck_credit.py
isunnapud/vantiv-sdk-for-python
85ea6ba160c2436a305b9326cbb7d6c8f127c57c
[ "MIT" ]
7
2017-08-23T15:04:38.000Z
2020-04-07T20:20:15.000Z
tests/functional/test_echeck_credit.py
isunnapud/vantiv-sdk-for-python
85ea6ba160c2436a305b9326cbb7d6c8f127c57c
[ "MIT" ]
13
2017-10-17T22:07:57.000Z
2022-03-29T17:33:42.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2017 Vantiv eCommerce # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the 'Software'), to deal in the Software without # restriction, including without limitation the rights to use, # copy, ...
37.651163
91
0.690138
import os import sys import unittest package_root = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) sys.path.insert(0, package_root) from vantivsdk import * conf = utils.Configuration() class TestEcheckCredit(unittest.TestCase): def test_simple_echeck_credit...
true
true
f7220e84c9b8d8afe3e8a2e6bda57cd5127f2c56
8,471
py
Python
tests/notifier/notifiers/gcs_violations_test.py
mcunha/forseti-security
cbf25f6173c1a25d4e43a9738eca73f927361cb8
[ "Apache-2.0" ]
1
2018-10-06T23:16:59.000Z
2018-10-06T23:16:59.000Z
tests/notifier/notifiers/gcs_violations_test.py
mcunha/forseti-security
cbf25f6173c1a25d4e43a9738eca73f927361cb8
[ "Apache-2.0" ]
null
null
null
tests/notifier/notifiers/gcs_violations_test.py
mcunha/forseti-security
cbf25f6173c1a25d4e43a9738eca73f927361cb8
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
38.330317
94
0.673356
import mock import unittest from datetime import datetime from google.cloud.forseti.common.util import string_formats from google.cloud.forseti.notifier.notifiers import base_notification from google.cloud.forseti.notifier.notifiers import gcs_violations from tests.notifier.notifiers.test_data import f...
true
true
f7220ea8c6b758df8275d973e8e49958e05eaf25
8,061
py
Python
srcgen/tests/test_c.py
maedoc/inducer-f2py
fce51e6603f7474632d452437dbb8b194d6c879d
[ "BSD-3-Clause" ]
57
2015-10-20T15:58:29.000Z
2022-03-19T08:52:04.000Z
srcgen/tests/test_c.py
maedoc/inducer-f2py
fce51e6603f7474632d452437dbb8b194d6c879d
[ "BSD-3-Clause" ]
12
2016-03-14T16:02:42.000Z
2022-03-23T11:15:50.000Z
srcgen/tests/test_c.py
maedoc/inducer-f2py
fce51e6603f7474632d452437dbb8b194d6c879d
[ "BSD-3-Clause" ]
12
2015-12-30T15:41:23.000Z
2022-03-01T17:14:42.000Z
from __future__ import absolute_import import sys import difflib from six.moves import range def equal_strings(text1, text2, _cache=set()): if text1==text2: return True d = difflib.Differ() l = list(d.compare(text1.splitlines(1), text2.splitlines(1))) d = {} for i in range(len(l)): i...
22.835694
86
0.602283
from __future__ import absolute_import import sys import difflib from six.moves import range def equal_strings(text1, text2, _cache=set()): if text1==text2: return True d = difflib.Differ() l = list(d.compare(text1.splitlines(1), text2.splitlines(1))) d = {} for i in range(len(l)): i...
true
true
f7220f35f4559a6f1844d9fe02d22a0e119ad531
11,625
py
Python
tests/charmhelpers/contrib/openstack/amulet/deployment.py
ChrisMacNaughton/layer-ceph-mon
b21bc310d76f093c8496a2bf0340133c07a72270
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/charmhelpers/contrib/openstack/amulet/deployment.py
ChrisMacNaughton/layer-ceph-mon
b21bc310d76f093c8496a2bf0340133c07a72270
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/charmhelpers/contrib/openstack/amulet/deployment.py
ChrisMacNaughton/layer-ceph-mon
b21bc310d76f093c8496a2bf0340133c07a72270
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2014-2015 Canonical Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
39.273649
79
0.578409
import logging import re import sys import six from collections import OrderedDict from charmhelpers.contrib.amulet.deployment import ( AmuletDeployment ) DEBUG = logging.DEBUG ERROR = logging.ERROR class OpenStackAmuletDeployment(AmuletDeployment): def __init__(self, series=None, openstack=No...
true
true
f722121f430d09ff4c11053e6f33d6dc7fe709f8
2,694
py
Python
keras/integration_test/preprocessing_applied_in_dataset_test.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
keras/integration_test/preprocessing_applied_in_dataset_test.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
keras/integration_test/preprocessing_applied_in_dataset_test.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.818182
80
0.749814
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v2 as tf from keras.integration_test import preprocessing_test_utils as utils ds_combinations = tf.__internal__.distribute.combinations multi_process_runner = tf.__inter...
true
true
f72212bba8f6ba0a4c14cf6dd8b08907a1f2e61c
3,187
py
Python
pentest-tool/pentest/wordlist.py
Micr067/pentestdb
6aa06e1406589567d51ab63a88bfe47416e906e9
[ "Apache-2.0" ]
686
2016-02-06T15:11:12.000Z
2022-03-30T10:55:29.000Z
pentest-tool/pentest/wordlist.py
WinDyXuu/pentestdb
6aa06e1406589567d51ab63a88bfe47416e906e9
[ "Apache-2.0" ]
6
2016-08-14T15:13:31.000Z
2020-03-03T14:01:28.000Z
pentest-tool/pentest/wordlist.py
WinDyXuu/pentestdb
6aa06e1406589567d51ab63a88bfe47416e906e9
[ "Apache-2.0" ]
284
2015-12-19T07:42:05.000Z
2022-03-13T11:58:38.000Z
#!/usr/bin/env python #-*- coding:utf-8 -*- ''' Pentestdb, a database for penetration test. Copyright (c) 2015 alpha1e0 ===================================================================== 字典管理。将字典加入到数据库中去重、对重复项加权打分;从数据库导出字典文件 ''' import os import argparse from libs.commons import Output from libs.commons import W...
28.20354
90
0.595858
import os import argparse from libs.commons import Output from libs.commons import WordList from libs.commons import PenError from libs.orm import Model, DBManage from libs.orm import StringField from libs.orm import IntegerField class WordListModel(Model): _table = "wordlist" _database = "" word ...
true
true
f7221587402cacb28eaffcdbd2393c5f8fe1d6ff
714
py
Python
sesame/train_model.py
moha31x/SESAME
0956cbf081d1a033855173e989da6e21f0a13215
[ "MIT" ]
null
null
null
sesame/train_model.py
moha31x/SESAME
0956cbf081d1a033855173e989da6e21f0a13215
[ "MIT" ]
null
null
null
sesame/train_model.py
moha31x/SESAME
0956cbf081d1a033855173e989da6e21f0a13215
[ "MIT" ]
null
null
null
''' This is a script to train a model with a variety of estimators ''' import pickle import pandas as pd from sklearn.neural_network import MLPRegressor from config import Config # Creating a path to save our model Config.models_path.mkdir(parents=True, exist_ok=True) # Loading the training and testing features into ...
32.454545
71
0.777311
import pickle import pandas as pd from sklearn.neural_network import MLPRegressor from config import Config Config.models_path.mkdir(parents=True, exist_ok=True) x_train = pd.read_csv(str(Config.features_path / 'train_features.csv')) y_train = pd.read_csv(str(Config.features_path / 'train_target.csv')) model = ML...
true
true
f72215a4786136431026f7459d3643ac23aae05c
898
py
Python
src/match_pattern/pattern_matcher/test/interface.py
elsid/master
b3624a6fb3a007fff005c0811f05c5802344b46b
[ "MIT" ]
null
null
null
src/match_pattern/pattern_matcher/test/interface.py
elsid/master
b3624a6fb3a007fff005c0811f05c5802344b46b
[ "MIT" ]
null
null
null
src/match_pattern/pattern_matcher/test/interface.py
elsid/master
b3624a6fb3a007fff005c0811f05c5802344b46b
[ "MIT" ]
null
null
null
# coding: utf-8 import yaml from unittest import TestCase, main from hamcrest import assert_that, equal_to, starts_with from pattern_matcher.interface import Interface class MakeInterface(TestCase): def test_str_should_succeed(self): assert_that(str(Interface()), starts_with('interface anonymous_')) ...
32.071429
74
0.665924
import yaml from unittest import TestCase, main from hamcrest import assert_that, equal_to, starts_with from pattern_matcher.interface import Interface class MakeInterface(TestCase): def test_str_should_succeed(self): assert_that(str(Interface()), starts_with('interface anonymous_')) assert_that...
true
true
f72216636d7f71629b089edbadf65ae6c85a69fd
2,180
py
Python
ComputerVision_HW/3B-L3/match_two_strips.py
darynarr/CV_UKMA
2d0e5fe42c539b441e45c4281f7dc5d42939dd89
[ "MIT" ]
null
null
null
ComputerVision_HW/3B-L3/match_two_strips.py
darynarr/CV_UKMA
2d0e5fe42c539b441e45c4281f7dc5d42939dd89
[ "MIT" ]
null
null
null
ComputerVision_HW/3B-L3/match_two_strips.py
darynarr/CV_UKMA
2d0e5fe42c539b441e45c4281f7dc5d42939dd89
[ "MIT" ]
null
null
null
import cv2 import numpy as np import matplotlib.pyplot as plt # We will use the function implemented in the last quiz # Find best match def find_best_match(patch, strip): # TODO: Find patch in strip and return column index (x value) of topleft corner best_id = None min_diff = np.inf strip_n, patch_n =...
31.594203
83
0.703211
import cv2 import numpy as np import matplotlib.pyplot as plt def find_best_match(patch, strip): best_id = None min_diff = np.inf strip_n, patch_n = strip.shape[1], patch.shape[1] for i in range(strip_n-patch_n): temp = strip[:, i: i + patch_n] ssd = np.sum(np.power(temp - patch...
true
true
f722173bc0475354d47f306795749e2b99e3551a
6,214
py
Python
exmail/apis/user.py
fatelei/exmail-py
42c358fca0b0802387f691b47d2655f64c2d3f01
[ "Apache-2.0" ]
2
2017-07-24T04:40:25.000Z
2018-10-23T10:02:06.000Z
exmail/apis/user.py
fatelei/exmail-py
42c358fca0b0802387f691b47d2655f64c2d3f01
[ "Apache-2.0" ]
null
null
null
exmail/apis/user.py
fatelei/exmail-py
42c358fca0b0802387f691b47d2655f64c2d3f01
[ "Apache-2.0" ]
1
2019-05-19T08:02:29.000Z
2019-05-19T08:02:29.000Z
# -*- coding: utf8 -*- """ exmail.apis.contact. ~~~~~~~~~~~~~~~~~~~~~~~ Contact apis. """ from exmail import exceptions from exmail.apis.base import ExmailClient from exmail.helpers import required_params class UserApi(ExmailClient): """Contact apis.""" @required_params('userid', 'name', 'department', 'pa...
29.590476
75
0.52607
from exmail import exceptions from exmail.apis.base import ExmailClient from exmail.helpers import required_params class UserApi(ExmailClient): @required_params('userid', 'name', 'department', 'password') def create_user(self, userid=None, name=None, ...
true
true
f7221873d9ecbf77edfe45ec72ecc412e695cb21
11,169
py
Python
rmgweb/database/forms.py
sean-v8/RMG-website
db6c70670c83b3fbe71b02b0874613823c982c9b
[ "X11", "Unlicense", "MIT" ]
null
null
null
rmgweb/database/forms.py
sean-v8/RMG-website
db6c70670c83b3fbe71b02b0874613823c982c9b
[ "X11", "Unlicense", "MIT" ]
null
null
null
rmgweb/database/forms.py
sean-v8/RMG-website
db6c70670c83b3fbe71b02b0874613823c982c9b
[ "X11", "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # RMG Website - A Django-powered website for Reaction Mechanism Generator # # Copyright (c) 2011 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission ...
45.218623
179
0.637031
adjlist class EniSearchForm(forms.Form): """ Form for drawing molecule from adjacency list """ detergent_identifier = forms.CharField(label="Detergent Identifier", widget=forms.TextInput(attrs={'onchange':'resolve("detergent");','class':'identifier'}), required=False) detergent = forms....
false
true
f722193cd5e32f4fa56c0d5adf757148f05a634e
1,578
py
Python
sdk/python/pulumi_azure_native/machinelearningexperimentation/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_native/machinelearningexperimentation/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_native/machinelearningexperimentation/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables __al...
30.941176
89
0.665399
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables __all__ = [ 'StorageAccountPropertiesResponse', ] @pulumi.output_type class StorageAccountPropertiesResponse(dict): def __init__(__self__, *, a...
true
true
f7221975b001f6b137480353ce2f10a7afacc290
5,481
py
Python
mmdet/core/evaluation/class_names.py
Alphafrey946/Colocalization-of-fluorescent_signals-using-deep-learning-with-Manders-overlapping-coefficient
cc8386b6cc6cbe823983647119511aa87e121f23
[ "Apache-2.0" ]
2
2021-02-23T04:42:07.000Z
2021-02-23T07:22:42.000Z
mmdet/core/evaluation/class_names.py
Alphafrey946/Colocalization-of-fluorescent_signals-using-deep-learning-with-Manders-overlapping-coefficient
cc8386b6cc6cbe823983647119511aa87e121f23
[ "Apache-2.0" ]
null
null
null
mmdet/core/evaluation/class_names.py
Alphafrey946/Colocalization-of-fluorescent_signals-using-deep-learning-with-Manders-overlapping-coefficient
cc8386b6cc6cbe823983647119511aa87e121f23
[ "Apache-2.0" ]
1
2021-02-23T04:42:08.000Z
2021-02-23T04:42:08.000Z
import mmcv def wider_face_classes(): return ['face'] def voc_classes(): return [ 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor' ] ...
46.058824
79
0.580551
import mmcv def wider_face_classes(): return ['face'] def voc_classes(): return [ 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor' ] ...
true
true
f7221b06cd36fb3a6c04d9d0d0365009fef93286
5,629
py
Python
python/dask_cudf/dask_cudf/io/parquet.py
CZZLEGEND/cudf
5d2465d6738d00628673fffdc1fac51fad7ef9a7
[ "Apache-2.0" ]
1
2020-01-14T01:44:35.000Z
2020-01-14T01:44:35.000Z
python/dask_cudf/dask_cudf/io/parquet.py
CZZLEGEND/cudf
5d2465d6738d00628673fffdc1fac51fad7ef9a7
[ "Apache-2.0" ]
null
null
null
python/dask_cudf/dask_cudf/io/parquet.py
CZZLEGEND/cudf
5d2465d6738d00628673fffdc1fac51fad7ef9a7
[ "Apache-2.0" ]
null
null
null
from functools import partial import pyarrow.parquet as pq import dask.dataframe as dd from dask.dataframe.io.parquet.arrow import ArrowEngine import cudf from cudf.core.column import build_categorical_column class CudfEngine(ArrowEngine): @staticmethod def read_metadata(*args, **kwargs): meta, sta...
31.623596
79
0.554983
from functools import partial import pyarrow.parquet as pq import dask.dataframe as dd from dask.dataframe.io.parquet.arrow import ArrowEngine import cudf from cudf.core.column import build_categorical_column class CudfEngine(ArrowEngine): @staticmethod def read_metadata(*args, **kwargs): meta, sta...
true
true
f7221b1daebb09fb2c2136eca3ac9bf27cb12285
1,992
py
Python
scaffold/infer-distribution.py
ryought/3d-dna
caa187a272c2c3d5720727d846489d628092b680
[ "MIT" ]
null
null
null
scaffold/infer-distribution.py
ryought/3d-dna
caa187a272c2c3d5720727d846489d628092b680
[ "MIT" ]
null
null
null
scaffold/infer-distribution.py
ryought/3d-dna
caa187a272c2c3d5720727d846489d628092b680
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import dask.dataframe as ddf import pandas as pd import time from sklearn.neighbors.kde import KernelDensity from scipy.optimize import curve_fit import numpy as np def infer_distribution_from_contig(contacts, K, K0): """ """ longest_contig_name = contacts.loc[...
27.666667
83
0.568775
import dask.dataframe as ddf import pandas as pd import time from sklearn.neighbors.kde import KernelDensity from scipy.optimize import curve_fit import numpy as np def infer_distribution_from_contig(contacts, K, K0): longest_contig_name = contacts.loc[contacts.P1.idxmax()].N1 inter_contacts = contacts[ ...
true
true
f7221c2250d07f76c7ad1cd264fe694e723e2d5b
99
py
Python
29/03/1.py
pylangstudy/201705
c69de524faa67fa2d96267d5a51ed9794208f0e4
[ "CC0-1.0" ]
null
null
null
29/03/1.py
pylangstudy/201705
c69de524faa67fa2d96267d5a51ed9794208f0e4
[ "CC0-1.0" ]
38
2017-05-25T07:08:48.000Z
2017-05-31T01:42:41.000Z
29/03/1.py
pylangstudy/201705
c69de524faa67fa2d96267d5a51ed9794208f0e4
[ "CC0-1.0" ]
null
null
null
index = 0 for item in ['ab', 'cd', 'ef']: print("{0}: {1}".format(index, item)) index += 1
19.8
41
0.494949
index = 0 for item in ['ab', 'cd', 'ef']: print("{0}: {1}".format(index, item)) index += 1
true
true
f7221ce57bed2a1a2f972e888f4e54ba6db6ce0c
687
py
Python
Peak_calling_length_python_code.py
abhikbhattacharjee/Motifizer
ee816690f71325e3e17a554d43a7711f08a8c3a9
[ "MIT" ]
null
null
null
Peak_calling_length_python_code.py
abhikbhattacharjee/Motifizer
ee816690f71325e3e17a554d43a7711f08a8c3a9
[ "MIT" ]
null
null
null
Peak_calling_length_python_code.py
abhikbhattacharjee/Motifizer
ee816690f71325e3e17a554d43a7711f08a8c3a9
[ "MIT" ]
null
null
null
import pandas as pd import sys peak_calling=pd.read_excel(str(sys.argv[1]), str(sys.argv[4])) peak_calling['Length'] = peak_calling['End'] - peak_calling['Start'] peak_calling1=pd.read_excel(str(sys.argv[1]), str(sys.argv[3])) peak_calling1['Length'] = peak_calling1['End'] - peak_calling1['Start'] peak_calling2=pd...
38.166667
72
0.74818
import pandas as pd import sys peak_calling=pd.read_excel(str(sys.argv[1]), str(sys.argv[4])) peak_calling['Length'] = peak_calling['End'] - peak_calling['Start'] peak_calling1=pd.read_excel(str(sys.argv[1]), str(sys.argv[3])) peak_calling1['Length'] = peak_calling1['End'] - peak_calling1['Start'] peak_calling2=pd...
true
true
f7221d0551cd6f0b8fa57b66e6a2611f8ad92156
2,762
py
Python
main.py
danredtmf/RepoLoader
32edf66a2efb63d0123fa9ef0641d81eb062ee64
[ "MIT" ]
null
null
null
main.py
danredtmf/RepoLoader
32edf66a2efb63d0123fa9ef0641d81eb062ee64
[ "MIT" ]
null
null
null
main.py
danredtmf/RepoLoader
32edf66a2efb63d0123fa9ef0641d81eb062ee64
[ "MIT" ]
null
null
null
import requests from requests.structures import CaseInsensitiveDict from urllib.parse import urlparse import json import wget import os # Переменные программы repo_link = str() repo_segment = str() branch = int() branches_link = str() branches_list = [] branch_link = str() # Заголовки для запроса headers = CaseInsens...
29.382979
112
0.658219
import requests from requests.structures import CaseInsensitiveDict from urllib.parse import urlparse import json import wget import os repo_link = str() repo_segment = str() branch = int() branches_link = str() branches_list = [] branch_link = str() headers = CaseInsensitiveDict() headers['Authorization'] = 'Accep...
true
true
f7221dc3803de8020ab91c68973c173f7c0adb6f
34,578
py
Python
tests/test_migrate.py
1frag/aerich
2b9702efc86b78187656bc5f97e4ac56a54860b5
[ "Apache-2.0" ]
null
null
null
tests/test_migrate.py
1frag/aerich
2b9702efc86b78187656bc5f97e4ac56a54860b5
[ "Apache-2.0" ]
null
null
null
tests/test_migrate.py
1frag/aerich
2b9702efc86b78187656bc5f97e4ac56a54860b5
[ "Apache-2.0" ]
1
2021-05-28T14:47:58.000Z
2021-05-28T14:47:58.000Z
import pytest from pytest_mock import MockerFixture from aerich.ddl.mysql import MysqlDDL from aerich.ddl.postgres import PostgresDDL from aerich.ddl.sqlite import SqliteDDL from aerich.exceptions import NotSupportError from aerich.migrate import Migrate from aerich.utils import get_models_describe old_models_describ...
37.300971
208
0.440916
import pytest from pytest_mock import MockerFixture from aerich.ddl.mysql import MysqlDDL from aerich.ddl.postgres import PostgresDDL from aerich.ddl.sqlite import SqliteDDL from aerich.exceptions import NotSupportError from aerich.migrate import Migrate from aerich.utils import get_models_describe old_models_describ...
true
true
f7221df4f8a05e5f1d4020f35d37fa12dab3c87e
1,365
py
Python
test/unit/test_utils_weighted_clusters.py
bochuxt/envoy-control-plane-python3
6d63ad6e1ecff5365bb571f0021951b066f8e270
[ "Apache-2.0" ]
1
2020-07-08T19:37:09.000Z
2020-07-08T19:37:09.000Z
test/unit/test_utils_weighted_clusters.py
bochuxt/envoy-control-plane-python3
6d63ad6e1ecff5365bb571f0021951b066f8e270
[ "Apache-2.0" ]
null
null
null
test/unit/test_utils_weighted_clusters.py
bochuxt/envoy-control-plane-python3
6d63ad6e1ecff5365bb571f0021951b066f8e270
[ "Apache-2.0" ]
null
null
null
import pytest from sovereign.utils.weighted_clusters import fit_weights @pytest.mark.parametrize( "weights,normalized", [ pytest.param([1, 2, 3], [16, 33, 51] , id='1, 2, 3'), pytest.param([20, 25, 1], [43, 54, 3] , id='20, 25, 1'), pytest.param([20, 10, ...
44.032258
93
0.487179
import pytest from sovereign.utils.weighted_clusters import fit_weights @pytest.mark.parametrize( "weights,normalized", [ pytest.param([1, 2, 3], [16, 33, 51] , id='1, 2, 3'), pytest.param([20, 25, 1], [43, 54, 3] , id='20, 25, 1'), pytest.param([20, 10, ...
true
true
f7221e29383b3704423e51c4f3340c269de72359
2,121
py
Python
brightcove/EPG.py
asha-bc/BrightcovePY
52e220e8e95221745b4de52ba94689509d27c072
[ "MIT" ]
3
2020-12-14T23:08:09.000Z
2021-08-05T05:44:19.000Z
brightcove/EPG.py
asha-bc/BrightcovePY
52e220e8e95221745b4de52ba94689509d27c072
[ "MIT" ]
null
null
null
brightcove/EPG.py
asha-bc/BrightcovePY
52e220e8e95221745b4de52ba94689509d27c072
[ "MIT" ]
2
2021-10-19T15:24:28.000Z
2022-03-08T08:17:30.000Z
""" Implements wrapper class and methods to work with Brightcove's EPG API. See: https://apis.support.brightcove.com/epg/getting-started/overview-epg-api.html """ from requests.models import Response from .Base import Base from .OAuth import OAuth class EPG(Base): """ Class to wrap the Brightcove EPG API calls. In...
30.73913
106
0.708628
from requests.models import Response from .Base import Base from .OAuth import OAuth class EPG(Base): base_url ='https://cm.cloudplayout.brightcove.com/accounts/{account_id}' def __init__(self, oauth: OAuth, query: str='') -> None: super().__init__(oauth=oauth, query=query) def GetAllCPChannels(self, accoun...
true
true
f7221f00933b36ae67355884950172132b8d731e
1,488
py
Python
mirage/libs/bt_utils/hciconfig.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
123
2019-11-20T19:53:23.000Z
2022-03-07T19:51:03.000Z
mirage/libs/bt_utils/hciconfig.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
23
2019-10-22T13:53:34.000Z
2022-03-22T22:22:55.000Z
mirage/libs/bt_utils/hciconfig.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
25
2019-11-15T12:13:48.000Z
2021-12-22T00:21:15.000Z
from fcntl import ioctl import socket class HCIConfig(object): ''' This class allows to easily configure an HCI Interface. ''' @staticmethod def down(index): ''' This class method stops an HCI interface. Its role is equivalent to the following command : ``hciconfig hci<index> down`` :param index: index ...
19.84
82
0.677419
from fcntl import ioctl import socket class HCIConfig(object): @staticmethod def down(index): try: sock = socket.socket(31, socket.SOCK_RAW, 1) ioctl(sock.fileno(), 0x400448ca, index) sock.close() except IOError: return False return True @staticmethod def reset(index): try: sock = socke...
true
true
f7221f016309edf12b6b55dbb2027c830de5a1e1
1,581
py
Python
vue_backend/webapi/migrations/0002_auto_20201117_0251.py
hanson190505/coteam
8bd01f4edc2a0b2a65dc18d68e36efb11cbdf576
[ "MIT" ]
1
2021-03-18T17:04:52.000Z
2021-03-18T17:04:52.000Z
vue_backend/webapi/migrations/0002_auto_20201117_0251.py
hanson190505/coteam
8bd01f4edc2a0b2a65dc18d68e36efb11cbdf576
[ "MIT" ]
11
2020-04-03T04:16:24.000Z
2022-03-26T10:36:49.000Z
vue_backend/webapi/migrations/0002_auto_20201117_0251.py
hanson190505/coteam
8bd01f4edc2a0b2a65dc18d68e36efb11cbdf576
[ "MIT" ]
null
null
null
# Generated by Django 3.0.5 on 2020-11-17 02:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('webapi', '0001_initial'), ] operations = [ migrations.AddField( model_name='products', name='capacities', ...
32.265306
92
0.577483
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('webapi', '0001_initial'), ] operations = [ migrations.AddField( model_name='products', name='capacities', field=models.CharField(default='custom', max_...
true
true
f7221f4199a21ad48a1e78d734c001ee35792cf4
9,286
py
Python
TrafficMan/admin.py
mizunashi-sh/TrafficMan-DB
d02098dc86f7d126a79a67fc5bbf2140544fb187
[ "BSD-3-Clause" ]
5
2021-06-22T08:56:19.000Z
2022-01-14T13:18:58.000Z
TrafficMan/admin.py
mizunashi-sh/TrafficMan-DB
d02098dc86f7d126a79a67fc5bbf2140544fb187
[ "BSD-3-Clause" ]
null
null
null
TrafficMan/admin.py
mizunashi-sh/TrafficMan-DB
d02098dc86f7d126a79a67fc5bbf2140544fb187
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User, Group from .models import Vehicle from .models import VehicleLicense from .models import Violation from .models import UserProfile from .models import DriverLicense from .models...
32.355401
119
0.682317
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User, Group from .models import Vehicle from .models import VehicleLicense from .models import Violation from .models import UserProfile from .models import DriverLicense from .models...
true
true
f722228558d4f889610e571fcd4e2f7ff014bf26
2,803
py
Python
test/functional/keypool-topup.py
GoStartupsLtd/hydra-core
293c20204be9eb04e491420aa4c94b6c2adf6757
[ "MIT" ]
18
2021-02-11T16:36:38.000Z
2021-12-15T11:33:14.000Z
test/functional/keypool-topup.py
GoStartupsLtd/hydra-core
293c20204be9eb04e491420aa4c94b6c2adf6757
[ "MIT" ]
10
2021-01-17T05:57:32.000Z
2022-03-03T12:49:32.000Z
test/functional/keypool-topup.py
GoStartupsLtd/hydra-core
293c20204be9eb04e491420aa4c94b6c2adf6757
[ "MIT" ]
3
2021-08-23T05:29:30.000Z
2022-03-25T20:18:00.000Z
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test HD Wallet keypool restore function. Two nodes. Node1 is under test. Node0 is providing transactions an...
36.881579
164
0.686051
import shutil from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, connect_nodes_bi, sync_blocks, ) from test_framework.qtumconfig import COINBASE_MATURITY class KeypoolRestoreTest(BitcoinTestFramework): def set_test_params(self): s...
true
true
f7222360e95da6f77246679240f78ac6c5f9ef4b
105,292
py
Python
bin/cqlsh.py
shalinigr/CASSANDRA-13123
0f215e119fe25c8eec725edff7cf711b6f1395fe
[ "Apache-2.0" ]
null
null
null
bin/cqlsh.py
shalinigr/CASSANDRA-13123
0f215e119fe25c8eec725edff7cf711b6f1395fe
[ "Apache-2.0" ]
null
null
null
bin/cqlsh.py
shalinigr/CASSANDRA-13123
0f215e119fe25c8eec725edff7cf711b6f1395fe
[ "Apache-2.0" ]
1
2020-06-14T20:57:52.000Z
2020-06-14T20:57:52.000Z
#!/bin/sh # -*- mode: Python -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2....
39.435206
195
0.619126
""":" # bash code here; finds a suitable python interpreter and execs this file. # prefer unqualified "python" if suitable: python -c 'import sys; sys.exit(not (0x020700b0 < sys.hexversion < 0x03000000))' 2>/dev/null \ && exec python "$0" "$@" for pyver in 2.7; do which python$pyver > /dev/nu...
false
true