hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f748d9727b5bb6d3699a498090b02c28b42e8c55
8,687
py
Python
dump_sqlite.py
lmorgadodacosta/NTUMC
e195e24edf936e869bd602f4cb603bc3aa49f84a
[ "MIT" ]
2
2019-01-03T00:37:31.000Z
2020-05-01T06:55:41.000Z
dump_sqlite.py
lmorgadodacosta/NTUMC
e195e24edf936e869bd602f4cb603bc3aa49f84a
[ "MIT" ]
2
2019-01-13T09:47:25.000Z
2019-07-10T09:43:12.000Z
dump_sqlite.py
lmorgadodacosta/NTUMC
e195e24edf936e869bd602f4cb603bc3aa49f84a
[ "MIT" ]
1
2019-01-03T00:37:54.000Z
2019-01-03T00:37:54.000Z
import os, sys, time, sqlite3 from collections import defaultdict as dd from lxml import etree import argparse ################################################################################ # TO DO ################################################################################ # - warn if requested docs do not exis...
37.769565
118
0.463912
import os, sys, time, sqlite3 from collections import defaultdict as dd from lxml import etree import argparse
true
true
f748da6e832cd39540e42910b74689f6ba037a32
3,435
py
Python
data-preprocessing/view.py
eth-ait/motion-infilling
be814cfe971ec58d0e66c7644db3cdc89f71d092
[ "BSD-3-Clause" ]
14
2021-04-12T12:23:54.000Z
2022-03-24T23:44:53.000Z
data-preprocessing/view.py
eth-ait/motion-infilling
be814cfe971ec58d0e66c7644db3cdc89f71d092
[ "BSD-3-Clause" ]
2
2021-05-07T03:27:30.000Z
2021-10-08T09:34:03.000Z
data-preprocessing/view.py
eth-ait/motion-infilling
be814cfe971ec58d0e66c7644db3cdc89f71d092
[ "BSD-3-Clause" ]
1
2021-12-27T07:56:09.000Z
2021-12-27T07:56:09.000Z
import os import numpy as np import matplotlib.animation as animation import matplotlib.colors as colors import matplotlib.patheffects as pe import matplotlib.pyplot as plt from matplotlib.animation import ArtistAnimation from mpl_toolkits.mplot3d import Axes3D from Quaternions import Quaternions def animation_plot(...
34.009901
120
0.555167
import os import numpy as np import matplotlib.animation as animation import matplotlib.colors as colors import matplotlib.patheffects as pe import matplotlib.pyplot as plt from matplotlib.animation import ArtistAnimation from mpl_toolkits.mplot3d import Axes3D from Quaternions import Quaternions def animation_plot(...
true
true
f748dbe7f562ac9b1c9fa6a29eb565a539a10612
98
py
Python
config/settings/__init__.py
Pysuper/ZanHu
7d895cc44a461dee3cfe668e7f0de573196ec594
[ "MIT" ]
null
null
null
config/settings/__init__.py
Pysuper/ZanHu
7d895cc44a461dee3cfe668e7f0de573196ec594
[ "MIT" ]
5
2021-01-07T11:06:23.000Z
2022-03-31T04:07:16.000Z
config/settings/__init__.py
Pysuper/ZanHu
7d895cc44a461dee3cfe668e7f0de573196ec594
[ "MIT" ]
null
null
null
# import pymysql # # pymysql.version_info = (1, 4, 14, "final", 0) # pymysql.install_as_MySQLdb()
19.6
47
0.683673
true
true
f748dc6bc56bcba88a0f28d37ef6657b0fce351f
1,951
py
Python
cvtest/reporter.py
AndreyChertckov/opencv-log
a9051e6c9ac0789633da44526897b11fe9e5daba
[ "MIT" ]
7
2020-02-10T13:04:50.000Z
2020-02-14T13:29:15.000Z
cvtest/reporter.py
AndreyChertckov/opencv-log
a9051e6c9ac0789633da44526897b11fe9e5daba
[ "MIT" ]
null
null
null
cvtest/reporter.py
AndreyChertckov/opencv-log
a9051e6c9ac0789633da44526897b11fe9e5daba
[ "MIT" ]
null
null
null
import os import traceback from uuid import uuid4 import cv2 from cvlog import log from cvlog.config import Config from cvtest.csv_reporter import CsvReporter class Reporter: def __new__(cls): if not hasattr(cls, 'instance') or not cls.instance: cls.instance = super().__new__(cls) ...
31.467742
80
0.620195
import os import traceback from uuid import uuid4 import cv2 from cvlog import log from cvlog.config import Config from cvtest.csv_reporter import CsvReporter class Reporter: def __new__(cls): if not hasattr(cls, 'instance') or not cls.instance: cls.instance = super().__new__(cls) ...
true
true
f748dc7746349b7e2bbeee1188558279510af3dc
671
py
Python
chocs/serverless/wrapper.py
danballance/chocs
8a64ce47d98ec327ce709b46c6389c5c627f4157
[ "MIT" ]
null
null
null
chocs/serverless/wrapper.py
danballance/chocs
8a64ce47d98ec327ce709b46c6389c5c627f4157
[ "MIT" ]
null
null
null
chocs/serverless/wrapper.py
danballance/chocs
8a64ce47d98ec327ce709b46c6389c5c627f4157
[ "MIT" ]
null
null
null
from typing import Callable from chocs.http_request import HttpRequest from chocs.http_response import HttpResponse from chocs.middleware.middleware import MiddlewarePipeline from chocs.routing import Route from .aws import AwsServerlessFunction from .serverless import IS_AWS_ENVIRONMENT, ServerlessFunction def cre...
29.173913
103
0.821162
from typing import Callable from chocs.http_request import HttpRequest from chocs.http_response import HttpResponse from chocs.middleware.middleware import MiddlewarePipeline from chocs.routing import Route from .aws import AwsServerlessFunction from .serverless import IS_AWS_ENVIRONMENT, ServerlessFunction def cre...
true
true
f748dc95deb90d1e6fb7f72281b136f70ca8886b
555
py
Python
leetcode/0720_longest_word_in_dictionary.py
jacquerie/leetcode
a05e6b832eb0e0740aaff7b2eb3109038ad404bf
[ "MIT" ]
3
2018-05-10T09:56:49.000Z
2020-11-07T18:09:42.000Z
leetcode/0720_longest_word_in_dictionary.py
jacquerie/leetcode
a05e6b832eb0e0740aaff7b2eb3109038ad404bf
[ "MIT" ]
null
null
null
leetcode/0720_longest_word_in_dictionary.py
jacquerie/leetcode
a05e6b832eb0e0740aaff7b2eb3109038ad404bf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- class Solution: def longestWord(self, words): wordsSet = set(words) result = [] for word in words: if all(word[:i] in wordsSet for i in range(1, len(word))): result.append(word) return min(result, key=lambda el: (-len(el), el)) ...
26.428571
98
0.54955
class Solution: def longestWord(self, words): wordsSet = set(words) result = [] for word in words: if all(word[:i] in wordsSet for i in range(1, len(word))): result.append(word) return min(result, key=lambda el: (-len(el), el)) if __name__ == '__mai...
true
true
f748dcd6dce40a8285655219740ec4aed6067f09
1,811
py
Python
src/predictions/trainers/trainer.py
sqoshi/masked-face-recognizer
40f66d776b203a1875200647b62d623f696d88a4
[ "MIT" ]
null
null
null
src/predictions/trainers/trainer.py
sqoshi/masked-face-recognizer
40f66d776b203a1875200647b62d623f696d88a4
[ "MIT" ]
11
2021-10-20T20:01:02.000Z
2021-12-19T19:56:42.000Z
src/predictions/trainers/trainer.py
sqoshi/masked-face-recognizer
40f66d776b203a1875200647b62d623f696d88a4
[ "MIT" ]
null
null
null
import logging import pickle from abc import ABC, abstractmethod from typing import Any, Dict, List, Optional, Union from numpy.typing import NDArray from sklearn.preprocessing import LabelEncoder from predictions.face_recognizer import ModelType from settings import output logger = logging.getLogger(__name__) def...
32.927273
84
0.66317
import logging import pickle from abc import ABC, abstractmethod from typing import Any, Dict, List, Optional, Union from numpy.typing import NDArray from sklearn.preprocessing import LabelEncoder from predictions.face_recognizer import ModelType from settings import output logger = logging.getLogger(__name__) def...
true
true
f748dcd871f3a356def80ca6bc57398b2b19614f
244
py
Python
tests/functional/conftest.py
SevanSSP/inquire-modeltest-sdk
6d58bdec17d2c7039be0f58922efffba7691a176
[ "MIT" ]
4
2021-02-16T19:52:41.000Z
2022-01-11T10:35:05.000Z
tests/functional/conftest.py
SevanSSP/inquire-modeltest-sdk
6d58bdec17d2c7039be0f58922efffba7691a176
[ "MIT" ]
7
2021-02-16T19:35:28.000Z
2021-12-10T11:46:52.000Z
tests/functional/conftest.py
SevanSSP/inquire-modeltest-sdk
6d58bdec17d2c7039be0f58922efffba7691a176
[ "MIT" ]
null
null
null
import pytest from modeltestSDK import Client @pytest.fixture(scope="module") def client(): """ Expose an SDK API client configured for testing """ client = Client() # TODO: Konfigurer en test API (lokalt?) return client
20.333333
63
0.680328
import pytest from modeltestSDK import Client @pytest.fixture(scope="module") def client(): client = Client() return client
true
true
f748dd36c3f1e6f285c84e343c3214106e20255d
172
py
Python
Projet9/review/admin.py
S0Imyr/Projet9
0717718e0878b49dac10aefc0901d94bd5ebebd0
[ "MIT" ]
1
2021-09-03T10:37:07.000Z
2021-09-03T10:37:07.000Z
Projet9/review/admin.py
S0Imyr/Projet9
0717718e0878b49dac10aefc0901d94bd5ebebd0
[ "MIT" ]
null
null
null
Projet9/review/admin.py
S0Imyr/Projet9
0717718e0878b49dac10aefc0901d94bd5ebebd0
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Ticket, Review, UserFollows admin.site.register(Ticket) admin.site.register(Review) admin.site.register(UserFollows)
21.5
47
0.819767
from django.contrib import admin from .models import Ticket, Review, UserFollows admin.site.register(Ticket) admin.site.register(Review) admin.site.register(UserFollows)
true
true
f748dd816e77fd10d9303d28f33fb543f57bb766
10
py
Python
main.py
Tyranicangel/555
a69abb505a10060cd40f92e81fb6496f3d7e3643
[ "Unlicense" ]
null
null
null
main.py
Tyranicangel/555
a69abb505a10060cd40f92e81fb6496f3d7e3643
[ "Unlicense" ]
null
null
null
main.py
Tyranicangel/555
a69abb505a10060cd40f92e81fb6496f3d7e3643
[ "Unlicense" ]
null
null
null
#Main code
10
10
0.8
true
true
f748de04df7dfabeb50d21b1b45f39e5886d5f6a
6,190
py
Python
game.py
bronval/breakout_pygame
7820d63cd65eabb6078615bdcc805bc847860211
[ "MIT" ]
null
null
null
game.py
bronval/breakout_pygame
7820d63cd65eabb6078615bdcc805bc847860211
[ "MIT" ]
null
null
null
game.py
bronval/breakout_pygame
7820d63cd65eabb6078615bdcc805bc847860211
[ "MIT" ]
null
null
null
##################################################### # # breakout game with pygame # for Python stage in Technofutur TIC (Belgium) # Authors : Bastien Wiaux and Benoit Ronval # ##################################################### import pygame from constants import * from player import Player from b...
34.775281
151
0.554927
self.stop_game = True return self.ball = Ball() def check_collision(self): self.collide_screen() # verifie la collision avec l'ecran indices = self.collide_list_of_bricks() for i, idx in enumerate(indices): del(self.bricks[idx-i]...
true
true
f748de1b3648e19f84ddddf94d018b351c5f91a7
2,679
py
Python
python/setup.in.py
ashokei/ngraph-bridge
2c23bc32d73778e9ccd999481b63f5cbcb6166ac
[ "Apache-2.0" ]
null
null
null
python/setup.in.py
ashokei/ngraph-bridge
2c23bc32d73778e9ccd999481b63f5cbcb6166ac
[ "Apache-2.0" ]
null
null
null
python/setup.in.py
ashokei/ngraph-bridge
2c23bc32d73778e9ccd999481b63f5cbcb6166ac
[ "Apache-2.0" ]
null
null
null
# ============================================================================== # Copyright 2018-2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://ww...
34.346154
115
0.671892
from platform import system from setuptools import setup from wheel.bdist_wheel import bdist_wheel import os class BinaryBdistWheel(bdist_wheel): def finalize_options(self): bdist_wheel.finalize_options(self) self.root_is_pure = False def get_tag(self): _, _, p...
false
true
f748de971f3568f4ca5722428566f8d63007de7b
2,473
py
Python
pyqt-official/pyuic/compile-on-the-fly.py
a358003542/pyside2_examples
5f337211e615a726541bf6766455d4f2c9d0f551
[ "MIT" ]
1
2020-02-11T08:22:28.000Z
2020-02-11T08:22:28.000Z
pyqt-official/pyuic/compile-on-the-fly.py
a358003542/pyside2_examples
5f337211e615a726541bf6766455d4f2c9d0f551
[ "MIT" ]
null
null
null
pyqt-official/pyuic/compile-on-the-fly.py
a358003542/pyside2_examples
5f337211e615a726541bf6766455d4f2c9d0f551
[ "MIT" ]
null
null
null
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited. ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## You may use this file under the terms of the BSD license as follows: ## ## "Redistrib...
36.367647
77
0.688637
true
true
f748e0e629c51a839fd5e7e9590bedb4d1cc1e9d
5,483
py
Python
google/ads/googleads/v4/services/types/extension_feed_item_service.py
batardo/google-ads-python
a39748521847e85138fca593f3be2681352ad024
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v4/services/types/extension_feed_item_service.py
batardo/google-ads-python
a39748521847e85138fca593f3be2681352ad024
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v4/services/types/extension_feed_item_service.py
batardo/google-ads-python
a39748521847e85138fca593f3be2681352ad024
[ "Apache-2.0" ]
null
null
null
# -*- 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...
35.374194
140
0.692504
import proto from google.ads.googleads.v4.resources.types import extension_feed_item from google.protobuf import field_mask_pb2 as field_mask from google.rpc import status_pb2 as status __protobuf__ = proto.module( package="google.ads.googleads.v4.services", marshal="google.ads.google...
true
true
f748e151620714b3bf085cffaa8015a060de619f
3,050
py
Python
huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_sp_res_response.py
githubmilesma/huaweicloud-sdk-python-v3
9d9449ed68a609ca65f0aa50b5b2a1c28445bf03
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_sp_res_response.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_sp_res_response.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class ShowSpResResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): ...
27.477477
86
0.574754
import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class ShowSpResResponse(SdkResponse): sensitive_list = [] openapi_types = { 'used_accounts_count': 'int' } attribute_map = { 'used_accounts_count': 'usedAccountsCount' } def __...
true
true
f748e1ee43310bda1b925a33f07e367e3c328d9c
618
py
Python
contacts/migrations/0005_contact_company.py
renzyndrome/lits-crm
32daea8c76f91780b8cc8c3f107d04df606c0ec8
[ "MIT" ]
1,334
2017-06-04T07:47:14.000Z
2022-03-30T17:12:37.000Z
contacts/migrations/0005_contact_company.py
AhmedDoudou/Django-CRM-1
5faf22acb30aeb32f5830898fd5d8ecd1ac0bbd8
[ "MIT" ]
317
2017-06-04T07:48:13.000Z
2022-03-29T19:24:26.000Z
contacts/migrations/0005_contact_company.py
AhmedDoudou/Django-CRM-1
5faf22acb30aeb32f5830898fd5d8ecd1ac0bbd8
[ "MIT" ]
786
2017-06-06T09:18:48.000Z
2022-03-29T01:29:29.000Z
# Generated by Django 2.2.10 on 2020-04-23 10:29 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("common", "0020_auto_20200409_1653"), ("contacts", "0004_contact_teams"), ] operations = [ migratio...
23.769231
61
0.558252
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("common", "0020_auto_20200409_1653"), ("contacts", "0004_contact_teams"), ] operations = [ migrations.AddField( model_name="contact", ...
true
true
f748e39e321ceab4f6f560a77a109e4c3328236e
7,116
py
Python
tsrc/cli/push_gitlab.py
tst2005/tsrc
af378db4950b3d557bc6839dcec2f0d0070f982e
[ "BSD-3-Clause" ]
null
null
null
tsrc/cli/push_gitlab.py
tst2005/tsrc
af378db4950b3d557bc6839dcec2f0d0070f982e
[ "BSD-3-Clause" ]
null
null
null
tsrc/cli/push_gitlab.py
tst2005/tsrc
af378db4950b3d557bc6839dcec2f0d0070f982e
[ "BSD-3-Clause" ]
null
null
null
""" Entry point for tsrc push """ import argparse import itertools from typing import cast, Any, List, Optional, Set # noqa from gitlab import Gitlab from gitlab.v4.objects import Group, User, Project, ProjectMergeRequest # noqa from gitlab.exceptions import GitlabGetError import ui import tsrc import tsrc.config...
33.097674
93
0.627178
import argparse import itertools from typing import cast, Any, List, Optional, Set from gitlab import Gitlab from gitlab.v4.objects import Group, User, Project, ProjectMergeRequest from gitlab.exceptions import GitlabGetError import ui import tsrc import tsrc.config import tsrc.gitlab import tsrc.git import tsr...
true
true
f748e3f6be5429067c9e84388c7c7c4cf0d68d4b
2,470
py
Python
tests/api/endpoints/test_invitation.py
gzy403999903/seahub
992e5852579a6d9e0cfdaf18c77ce0191cb64449
[ "Apache-2.0" ]
null
null
null
tests/api/endpoints/test_invitation.py
gzy403999903/seahub
992e5852579a6d9e0cfdaf18c77ce0191cb64449
[ "Apache-2.0" ]
6
2019-12-13T09:55:45.000Z
2022-03-11T23:47:29.000Z
tests/api/endpoints/test_invitation.py
gzy403999903/seahub
992e5852579a6d9e0cfdaf18c77ce0191cb64449
[ "Apache-2.0" ]
1
2019-05-16T06:58:16.000Z
2019-05-16T06:58:16.000Z
import json from mock import patch from seahub.base.accounts import UserPermissions from seahub.invitations.models import Invitation from seahub.test_utils import BaseTestCase from seahub.api2.permissions import CanInviteGuest class InvitationsTest(BaseTestCase): def setUp(self): self.login_as(self.user)...
34.305556
85
0.69919
import json from mock import patch from seahub.base.accounts import UserPermissions from seahub.invitations.models import Invitation from seahub.test_utils import BaseTestCase from seahub.api2.permissions import CanInviteGuest class InvitationsTest(BaseTestCase): def setUp(self): self.login_as(self.user)...
true
true
f748e41d7ce23f21f2c4caf504aff217d6701f26
3,104
py
Python
pystac/iserv/footprint.py
lossyrob/pystac
9f71e4ac3e14dae37f4b3a780825ac35ef8df063
[ "Apache-2.0" ]
null
null
null
pystac/iserv/footprint.py
lossyrob/pystac
9f71e4ac3e14dae37f4b3a780825ac35ef8df063
[ "Apache-2.0" ]
null
null
null
pystac/iserv/footprint.py
lossyrob/pystac
9f71e4ac3e14dae37f4b3a780825ac35ef8df063
[ "Apache-2.0" ]
null
null
null
"""Creates a data/tile footprint""" import json import logging import os import subprocess import tempfile import rasterio from geojson import Polygon from pystac.utils.io import get_tempdir logger = logging.getLogger(__name__) def generate_thumbnail(prefix: str, tif_path: str) -> str: """Generates thumbnail f...
35.272727
89
0.628222
import json import logging import os import subprocess import tempfile import rasterio from geojson import Polygon from pystac.utils.io import get_tempdir logger = logging.getLogger(__name__) def generate_thumbnail(prefix: str, tif_path: str) -> str: with get_tempdir() as temp_dir: logger.info('Beginn...
true
true
f748e49f1bf6381c9f448ef9f7ebb16942ab6910
17,795
py
Python
openpyexcel/drawing/geometry.py
sciris/openpyexcel
1fde667a1adc2f4988279fd73a2ac2660706b5ce
[ "MIT" ]
2
2019-07-03T06:37:42.000Z
2020-05-15T00:28:13.000Z
openpyexcel/drawing/geometry.py
sciris/openpyexcel
1fde667a1adc2f4988279fd73a2ac2660706b5ce
[ "MIT" ]
null
null
null
openpyexcel/drawing/geometry.py
sciris/openpyexcel
1fde667a1adc2f4988279fd73a2ac2660706b5ce
[ "MIT" ]
1
2020-01-06T10:01:42.000Z
2020-01-06T10:01:42.000Z
from __future__ import absolute_import # Copyright (c) 2010-2019 openpyexcel from openpyexcel.descriptors.serialisable import Serialisable from openpyexcel.descriptors import ( Typed, Float, Integer, Bool, MinMax, Set, NoneSet, String, Alias, ) from openpyexcel.descriptors.excel imp...
29.80737
98
0.588648
from __future__ import absolute_import from openpyexcel.descriptors.serialisable import Serialisable from openpyexcel.descriptors import ( Typed, Float, Integer, Bool, MinMax, Set, NoneSet, String, Alias, ) from openpyexcel.descriptors.excel import Coordinate, Percentage from open...
true
true
f748e509a92580a64d8b6c31f9bc6a86ebac8b2a
1,601
py
Python
golden/go/diff/testdata/get_diffmetric.py
isabella232/skia-buildbot
6bfdd3e57760c114fdd6b207a4a254e01c0579be
[ "BSD-3-Clause" ]
119
2015-01-09T20:49:54.000Z
2022-02-20T03:03:54.000Z
golden/go/diff/testdata/get_diffmetric.py
isabella232/skia-buildbot
6bfdd3e57760c114fdd6b207a4a254e01c0579be
[ "BSD-3-Clause" ]
74
2018-06-22T09:57:11.000Z
2022-03-28T14:10:25.000Z
golden/go/diff/testdata/get_diffmetric.py
isabella232/skia-buildbot
6bfdd3e57760c114fdd6b207a4a254e01c0579be
[ "BSD-3-Clause" ]
55
2015-01-23T13:45:32.000Z
2022-02-20T03:11:46.000Z
#!/usr/bin/env python # Usage: get_diffmetric.py img1 img2 # # Helper script that calculates the DiffMetric between two given images. # For debugging purposes only. # # Note: This requires PIL or Pillow to be installed. from __future__ import print_function import sys from PIL import Image ## Main program. img1_pat...
26.683333
75
0.657089
from __future__ import print_function import sys from PIL import Image s.argv[1] img2_path = sys.argv[2] img1 = Image.open(img1_path) img2 = Image.open(img2_path) has_alpha = (img1.mode == img2.mode) xMin = min(img1.size[0], img2.size[0]) yMin = min(img1.size[1], img2.size[1]) xMax = max(img1.size[0], img2...
true
true
f748e51dcd1ea370eb197cbae823f26353bb34ee
3,152
py
Python
tests/transformers/test_feature_selector.py
awesome-archive/tsfresh
9419aa15bb26a3725291f39636354e67c9b04caa
[ "MIT" ]
null
null
null
tests/transformers/test_feature_selector.py
awesome-archive/tsfresh
9419aa15bb26a3725291f39636354e67c9b04caa
[ "MIT" ]
null
null
null
tests/transformers/test_feature_selector.py
awesome-archive/tsfresh
9419aa15bb26a3725291f39636354e67c9b04caa
[ "MIT" ]
1
2020-11-09T03:46:27.000Z
2020-11-09T03:46:27.000Z
# -*- coding: utf-8 -*- # This file as well as the whole tsfresh package are licenced under the MIT licence (see the LICENCE.txt) # Maximilian Christ (maximilianchrist.com), Blue Yonder Gmbh, 2016 from unittest import TestCase import pandas as pd import numpy as np from tsfresh.transformers.feature_selector import F...
30.601942
106
0.607868
from unittest import TestCase import pandas as pd import numpy as np from tsfresh.transformers.feature_selector import FeatureSelector class FeatureSelectorTestCase(TestCase): def setUp(self): np.random.seed(0) def test_not_fitted(self): selector = FeatureSelector() X = pd.Data...
true
true
f748e5d885c37df326b84dec3eaa5a56bd27c4d1
4,724
py
Python
test/Fortran/F90FLAGS.py
clemens-tolboom/scons
cd722bdc5f6b1163d56246ee0afc63c28ecc138e
[ "MIT" ]
null
null
null
test/Fortran/F90FLAGS.py
clemens-tolboom/scons
cd722bdc5f6b1163d56246ee0afc63c28ecc138e
[ "MIT" ]
null
null
null
test/Fortran/F90FLAGS.py
clemens-tolboom/scons
cd722bdc5f6b1163d56246ee0afc63c28ecc138e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish,...
35.253731
73
0.662574
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os import TestSCons _python_ = TestSCons._python_ test = TestSCons.TestSCons() _exe = TestSCons._exe test.file_fixture('mylink.py') test.file_fixture(['fixture', 'myfortran_flags.py']) test.write('SConstruct', """ env = E...
true
true
f748e77bffc00146fa633b52180051925eb35b29
541
py
Python
manage.py
eunjungleecub/jessica42
6bbf24226d1d42e029937d8055a4b18f2c075980
[ "Apache-2.0" ]
1
2019-11-11T22:58:15.000Z
2019-11-11T22:58:15.000Z
manage.py
eunjungleecub/jessica42
6bbf24226d1d42e029937d8055a4b18f2c075980
[ "Apache-2.0" ]
null
null
null
manage.py
eunjungleecub/jessica42
6bbf24226d1d42e029937d8055a4b18f2c075980
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'jessica42.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Ar...
33.8125
73
0.687616
import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'jessica42.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's insta...
true
true
f748e7ac05858ec431163cdf6ff73d364a07d2f1
3,815
py
Python
mis-bot/scraper/spiders/results_spider.py
bleeptrack/MIS-Bot
ae6eeec3f7f14fdbc2dfed4a1e58be70b253cdac
[ "MIT" ]
null
null
null
mis-bot/scraper/spiders/results_spider.py
bleeptrack/MIS-Bot
ae6eeec3f7f14fdbc2dfed4a1e58be70b253cdac
[ "MIT" ]
null
null
null
mis-bot/scraper/spiders/results_spider.py
bleeptrack/MIS-Bot
ae6eeec3f7f14fdbc2dfed4a1e58be70b253cdac
[ "MIT" ]
null
null
null
from os import environ import base64 from multiprocessing import Process, Queue from scrapy.spiders.init import InitSpider from scrapy.http import Request, FormRequest from scrapy_splash import SplashRequest import scrapy.crawler as crawler from twisted.internet import reactor from ..captcha import captcha_solver cla...
40.585106
118
0.639843
from os import environ import base64 from multiprocessing import Process, Queue from scrapy.spiders.init import InitSpider from scrapy.http import Request, FormRequest from scrapy_splash import SplashRequest import scrapy.crawler as crawler from twisted.internet import reactor from ..captcha import captcha_solver cla...
true
true
f748e7e34ff5855e1ed6244238645c3a92f11b6f
1,387
py
Python
pyVmomi/Version.py
virtdevninja/pyvmomi-ce
c14de2e0cdcb891dbaaf59cd4da5ebbdb05f5f9e
[ "Apache-2.0" ]
2
2015-09-09T16:31:26.000Z
2015-09-10T06:39:53.000Z
pyVmomi/Version.py
x1unix/pyvmomi-playbook
28f9b86c44e804442e71ddc882e6b59142f8932e
[ "Apache-2.0" ]
null
null
null
pyVmomi/Version.py
x1unix/pyvmomi-playbook
28f9b86c44e804442e71ddc882e6b59142f8932e
[ "Apache-2.0" ]
null
null
null
# VMware vSphere Python SDK # Copyright (c) 2008-2014 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
37.486486
89
0.71305
from __future__ import absolute_import from pyVmomi.VmomiSupport import nsMap, versionMap, versionIdMap, serviceNsMap, parentMap ion, ns, versionId='', isLegacy=0, serviceNs=''): if not ns: ns = serviceNs if not (version in parentMap): nsMap[version] = ns if len(versionId) > 0: ...
true
true
f748e8817a9b64a677b70926648ce6e2675299b7
12,923
py
Python
modules.py
Xinghanzzy/transformer-simple
e34592c41829e2c35955fa38e802765116dc1c35
[ "Apache-2.0" ]
null
null
null
modules.py
Xinghanzzy/transformer-simple
e34592c41829e2c35955fa38e802765116dc1c35
[ "Apache-2.0" ]
null
null
null
modules.py
Xinghanzzy/transformer-simple
e34592c41829e2c35955fa38e802765116dc1c35
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- #/usr/bin/python2 ''' June 2017 by kyubyong park. kbpark.linguist@gmail.com. https://www.github.com/kyubyong/transformer ''' from __future__ import print_function import tensorflow as tf import numpy as np def normalize(inputs, epsilon = 1e-8, scope="ln", ...
35.797784
113
0.572003
from __future__ import print_function import tensorflow as tf import numpy as np def normalize(inputs, epsilon = 1e-8, scope="ln", reuse=None): with tf.variable_scope(scope, reuse=reuse): inputs_shape = inputs.get_shape() params_shape = inputs_shape[-1:...
true
true
f748e8cb9cf05333499b7c45049069a2d4129432
4,200
py
Python
ckan/controllers/home.py
dadosgovbr/ckan
f2ed9a03581c3229cf01209baa9a02a71642e0b6
[ "BSD-3-Clause" ]
2
2015-11-05T12:04:52.000Z
2017-08-09T11:29:11.000Z
ckan/controllers/home.py
dadosgovbr/ckan
f2ed9a03581c3229cf01209baa9a02a71642e0b6
[ "BSD-3-Clause" ]
null
null
null
ckan/controllers/home.py
dadosgovbr/ckan
f2ed9a03581c3229cf01209baa9a02a71642e0b6
[ "BSD-3-Clause" ]
null
null
null
import random from pylons.i18n import set_lang import sqlalchemy.exc import ckan.logic from ckan.lib.search import SearchError from ckan.lib.base import * from ckan.lib.helpers import url_for CACHE_PARAMETER = '__cache' class HomeController(BaseController): repo = model.repo def __before__(self, action, **...
38.181818
94
0.538095
import random from pylons.i18n import set_lang import sqlalchemy.exc import ckan.logic from ckan.lib.search import SearchError from ckan.lib.base import * from ckan.lib.helpers import url_for CACHE_PARAMETER = '__cache' class HomeController(BaseController): repo = model.repo def __before__(self, action, **...
false
true
f748e9fe959abf00c485cc72963079029d52f6bc
702
py
Python
tensorflow_datasets/structured/web_nlg/__init__.py
harsh020/datasets
b4ad3617b279ec65356e696c4c860458621976f6
[ "Apache-2.0" ]
1
2020-12-10T06:37:27.000Z
2020-12-10T06:37:27.000Z
tensorflow_datasets/structured/web_nlg/__init__.py
Jinwook-shim/datasets
815037e87150e3c8a557d91a68b07e8ffb6a2a86
[ "Apache-2.0" ]
1
2021-02-23T20:16:05.000Z
2021-02-23T20:16:05.000Z
tensorflow_datasets/structured/web_nlg/__init__.py
Jinwook-shim/datasets
815037e87150e3c8a557d91a68b07e8ffb6a2a86
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets 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 appl...
36.947368
74
0.769231
from tensorflow_datasets.structured.web_nlg.web_nlg import WebNlg
true
true
f748eb8732a59f9b26a4269bda0b39fdf3774ed0
14,053
py
Python
tests/test_integration_workflows.py
diazandr3s/MONAI
209db9e08129855df878634639d4c2700d9acd83
[ "Apache-2.0" ]
null
null
null
tests/test_integration_workflows.py
diazandr3s/MONAI
209db9e08129855df878634639d4c2700d9acd83
[ "Apache-2.0" ]
null
null
null
tests/test_integration_workflows.py
diazandr3s/MONAI
209db9e08129855df878634639d4c2700d9acd83
[ "Apache-2.0" ]
null
null
null
# Copyright (c) MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
38.396175
115
0.653597
import os import shutil import tempfile import unittest import warnings from glob import glob import nibabel as nib import numpy as np import torch from ignite.metrics import Accuracy from torch.utils.tensorboard import SummaryWriter import monai from monai.data import create_test_image_3d from monai.engin...
true
true
f748ed91b13964e49ab424371d25909e85c1e72f
1,686
py
Python
tests/customConfig/arm_build_with_custom_config.py
goshow-jp/Kraken
7088b474b6cc2840cea7ab642c5938e4a3290b6c
[ "BSD-3-Clause" ]
null
null
null
tests/customConfig/arm_build_with_custom_config.py
goshow-jp/Kraken
7088b474b6cc2840cea7ab642c5938e4a3290b6c
[ "BSD-3-Clause" ]
null
null
null
tests/customConfig/arm_build_with_custom_config.py
goshow-jp/Kraken
7088b474b6cc2840cea7ab642c5938e4a3290b6c
[ "BSD-3-Clause" ]
1
2021-12-08T08:31:48.000Z
2021-12-08T08:31:48.000Z
from kraken import plugins from kraken.core.maths import Xfo, Vec3, Quat from kraken.core.configs.config import Config from kraken_components.biped.arm_component import ArmComponentGuide, ArmComponentRig class CustomConfig(Config): """Base Configuration for Kraken builders.""" def __init__(self): s...
25.938462
86
0.609727
from kraken import plugins from kraken.core.maths import Xfo, Vec3, Quat from kraken.core.configs.config import Config from kraken_components.biped.arm_component import ArmComponentGuide, ArmComponentRig class CustomConfig(Config): def __init__(self): super(CustomConfig, self).__init__() ...
true
true
f748edbce51542056ecc0e94570f3ed1e7341b73
8,013
py
Python
build-scripts/cpe_generate.py
caitelatte/content
e3d6f00f3e6fbd76cc66525f4ea36156a5bea7e2
[ "BSD-3-Clause" ]
1
2019-01-07T10:43:25.000Z
2019-01-07T10:43:25.000Z
build-scripts/cpe_generate.py
caitelatte/content
e3d6f00f3e6fbd76cc66525f4ea36156a5bea7e2
[ "BSD-3-Clause" ]
1
2020-02-20T16:02:32.000Z
2020-02-26T11:57:26.000Z
build-scripts/cpe_generate.py
caitelatte/content
e3d6f00f3e6fbd76cc66525f4ea36156a5bea7e2
[ "BSD-3-Clause" ]
1
2019-12-12T12:08:14.000Z
2019-12-12T12:08:14.000Z
#!/usr/bin/env python2 from __future__ import print_function import fnmatch import sys import os import ssg import argparse import ssg.build_cpe import ssg.id_translate import ssg.xml # This script requires two arguments: an OVAL file and a CPE dictionary file. # It is designed to extract any inventory definitions ...
44.516667
93
0.64645
from __future__ import print_function import fnmatch import sys import os import ssg import argparse import ssg.build_cpe import ssg.id_translate import ssg.xml oval_ns = "http://oval.mitre.org/XMLSchema/oval-definitions-5" xccdf_ns = "http://checklists.nist.gov/xccdf/1.1" cpe_ns = "http://cpe.mitre.org/dicti...
true
true
f748edd98940cce239560bfdf78570f0ecc45978
987
py
Python
nikola/data/themes/base/messages/messages_tl.py
schettino72/nikola
d690d74f75abbf566c389d1ba3a53fac14b56d8f
[ "MIT" ]
null
null
null
nikola/data/themes/base/messages/messages_tl.py
schettino72/nikola
d690d74f75abbf566c389d1ba3a53fac14b56d8f
[ "MIT" ]
null
null
null
nikola/data/themes/base/messages/messages_tl.py
schettino72/nikola
d690d74f75abbf566c389d1ba3a53fac14b56d8f
[ "MIT" ]
null
null
null
# -*- encoding:utf-8 -*- from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", "(active)": "", "Also available in:": "", "Archive": "", "Categories": "", "Comments": "", "LANGUAGE": "Ingles", "Languages:": "Mga Wika:", "More posts about %s": "", "N...
24.675
42
0.480243
from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", "(active)": "", "Also available in:": "", "Archive": "", "Categories": "", "Comments": "", "LANGUAGE": "Ingles", "Languages:": "Mga Wika:", "More posts about %s": "", "Newer posts": "", "Ne...
true
true
f748eeb57b09b5447551729f821295aed52d3d61
427
py
Python
backend/infrastructure/repository/mock/product.py
uesleicarvalhoo/Ecommerce
1d8d0f0c522dcd27fd90e315989b6fa93caf62b8
[ "MIT" ]
null
null
null
backend/infrastructure/repository/mock/product.py
uesleicarvalhoo/Ecommerce
1d8d0f0c522dcd27fd90e315989b6fa93caf62b8
[ "MIT" ]
null
null
null
backend/infrastructure/repository/mock/product.py
uesleicarvalhoo/Ecommerce
1d8d0f0c522dcd27fd90e315989b6fa93caf62b8
[ "MIT" ]
null
null
null
from typing import List from backend.infrastructure.contracts import QueryProduct from backend.infrastructure.schemas import ProductSchema class MockProductRepository: def select_one(self, query: QueryProduct) -> ProductSchema: return None def select_all(self, query: QueryProduct) -> List[ProductSch...
26.6875
69
0.744731
from typing import List from backend.infrastructure.contracts import QueryProduct from backend.infrastructure.schemas import ProductSchema class MockProductRepository: def select_one(self, query: QueryProduct) -> ProductSchema: return None def select_all(self, query: QueryProduct) -> List[ProductSch...
true
true
f748ef73f36d6598b49bf69719d254304d088380
22,720
py
Python
platform-tools/systrace/catapult/telemetry/third_party/web-page-replay/replay.py
nbasingh5/dragons
7926c79f95b46ca1ff44617b1d8cdc633343774b
[ "MIT" ]
226
2015-01-01T23:21:53.000Z
2021-08-25T06:20:54.000Z
replay.py
DalavanCloud/web-page-replay
472351e1122bb1beb936952c7e75ae58bf8a69f1
[ "Apache-2.0" ]
55
2015-01-15T17:21:11.000Z
2021-08-18T10:12:31.000Z
replay.py
DalavanCloud/web-page-replay
472351e1122bb1beb936952c7e75ae58bf8a69f1
[ "Apache-2.0" ]
64
2015-01-07T14:04:43.000Z
2022-01-04T12:08:16.000Z
#!/usr/bin/env python # Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
40.283688
95
0.691373
"""Replays web pages under simulated network conditions. Must be run as administrator (sudo). To record web pages: 1. Start the program in record mode. $ sudo ./replay.py --record archive.wpr 2. Load the web pages you want to record in a web browser. It is important to clear browser cache...
false
true
f748f007ba7f0e2e57f1b930c2e06f52c7c3eebe
1,068
py
Python
ghtools/command/browse.py
alphagov/ghtools
be10c9251197c4c170e617f8328c1f94f5f45dca
[ "MIT" ]
3
2015-02-09T12:19:40.000Z
2016-07-20T18:19:11.000Z
ghtools/command/browse.py
alphagov/ghtools
be10c9251197c4c170e617f8328c1f94f5f45dca
[ "MIT" ]
3
2015-02-06T13:39:31.000Z
2016-10-03T09:33:33.000Z
ghtools/command/browse.py
alphagov/ghtools
be10c9251197c4c170e617f8328c1f94f5f45dca
[ "MIT" ]
3
2017-10-12T10:33:20.000Z
2021-04-10T19:55:50.000Z
from __future__ import print_function import json from argh import ArghParser, arg from ghtools import cli from ghtools.api import GithubAPIClient parser = ArghParser(description="Browse the GitHub API") @arg('github', nargs='?', help='GitHub instance nickname (e.g "enterprise")') @arg('url', help='URL to browse')...
26.04878
92
0.635768
from __future__ import print_function import json from argh import ArghParser, arg from ghtools import cli from ghtools.api import GithubAPIClient parser = ArghParser(description="Browse the GitHub API") @arg('github', nargs='?', help='GitHub instance nickname (e.g "enterprise")') @arg('url', help='URL to browse')...
true
true
f748f01c30a28181bfb72e01d9874c42664e1a50
599
py
Python
tests/test_scheme.py
Strubbl/map-machine
e2c6f8cd373bc5dba322129112cfa58874a8321b
[ "MIT" ]
62
2021-09-18T02:37:03.000Z
2022-03-21T22:58:35.000Z
tests/test_scheme.py
Strubbl/map-machine
e2c6f8cd373bc5dba322129112cfa58874a8321b
[ "MIT" ]
52
2021-09-11T09:43:24.000Z
2022-03-24T07:08:22.000Z
tests/test_scheme.py
Strubbl/map-machine
e2c6f8cd373bc5dba322129112cfa58874a8321b
[ "MIT" ]
6
2021-10-13T07:27:21.000Z
2022-02-10T03:57:29.000Z
""" Test scheme parsing. """ from map_machine.scheme import Scheme def test_verification() -> None: assert ( Scheme( { "colors": {"default": "#444444"}, "node_icons": [{"tags": [{"tags": {"a": "b"}}]}], } ) .node_matchers[0] ....
19.966667
65
0.382304
from map_machine.scheme import Scheme def test_verification() -> None: assert ( Scheme( { "colors": {"default": "#444444"}, "node_icons": [{"tags": [{"tags": {"a": "b"}}]}], } ) .node_matchers[0] .verify() is True ...
true
true
f748f05f817b7b62121b4eb129e41a358aa5f460
1,329
py
Python
Basics/04 - while loop.py
Piraato/Learn-Python
ae33680b61bbf41f5c0c29c79544b54e59df80b2
[ "MIT" ]
null
null
null
Basics/04 - while loop.py
Piraato/Learn-Python
ae33680b61bbf41f5c0c29c79544b54e59df80b2
[ "MIT" ]
null
null
null
Basics/04 - while loop.py
Piraato/Learn-Python
ae33680b61bbf41f5c0c29c79544b54e59df80b2
[ "MIT" ]
null
null
null
# The While Loop monty = 0 python = 10 # While the value of monty is smaller than python's value # everything within the loop will be executed while monty < python: print('Currently at: ' + str(monty)) # Python does not allow the increment operator: monty++ won't work monty += 1 # A ...
25.557692
113
0.638074
monty = 0 python = 10 # everything within the loop will be executed while monty < python: print('Currently at: ' + str(monty)) # Python does not allow the increment operator: monty++ won't work monty += 1 name = '' while name != 'ur name m8': print('pls type ur name m8') ...
true
true
f748f0f244c7abe02c4fc573604a463dd2aa2d5c
6,188
py
Python
objdump.py
vrjuliao/pyobjdump
fbfef9c7cda165c3475784d59674aa3f6c05fbd1
[ "MIT" ]
null
null
null
objdump.py
vrjuliao/pyobjdump
fbfef9c7cda165c3475784d59674aa3f6c05fbd1
[ "MIT" ]
null
null
null
objdump.py
vrjuliao/pyobjdump
fbfef9c7cda165c3475784d59674aa3f6c05fbd1
[ "MIT" ]
null
null
null
import capstone as cp from elftools.elf.elffile import ELFFile import bisect from diffObjdump import FunctionFeatures class Objdump: __local_code_begin = 0 __local_code_end = 0 __linked_code_begin = 0 __linked_code_end = 0 def __init__(self, filename): self.__name = filename with open(filename, 'rb'...
39.666667
103
0.704913
import capstone as cp from elftools.elf.elffile import ELFFile import bisect from diffObjdump import FunctionFeatures class Objdump: __local_code_begin = 0 __local_code_end = 0 __linked_code_begin = 0 __linked_code_end = 0 def __init__(self, filename): self.__name = filename with open(filename, 'rb'...
true
true
f748f106ec4e2305b9e94a1507273a54f37c396d
10,813
py
Python
sdk/servicebus/azure-servicebus/azure/servicebus/aio/async_message.py
anuchandy/azure-sdk-for-python
589b9890554ebf261aa2184e8f1c6507f01a207c
[ "MIT" ]
null
null
null
sdk/servicebus/azure-servicebus/azure/servicebus/aio/async_message.py
anuchandy/azure-sdk-for-python
589b9890554ebf261aa2184e8f1c6507f01a207c
[ "MIT" ]
null
null
null
sdk/servicebus/azure-servicebus/azure/servicebus/aio/async_message.py
anuchandy/azure-sdk-for-python
589b9890554ebf261aa2184e8f1c6507f01a207c
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ------------------------------------------------------------------------- import date...
48.272321
113
0.689078
import datetime import functools from azure.servicebus.common import message from azure.servicebus.common.utils import get_running_loop from azure.servicebus.common.errors import MessageSettleFailed from azure.servicebus.common.constants import DEADLETTERNAME class Message(message.Message): def __init__(s...
true
true
f748f15c17ba17d7913883500106cb7800d7447f
3,779
py
Python
src/sima/riflex/sumforceresponsestorage.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/riflex/sumforceresponsestorage.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/riflex/sumforceresponsestorage.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# This an autogenerated file # # Generated with SumForceResponseStorage from typing import Dict,Sequence,List from dmt.entity import Entity from dmt.blueprint import Blueprint from .blueprints.sumforceresponsestorage import SumForceResponseStorageBlueprint from typing import Dict from sima.riflex.additionalfileformatc...
29.992063
129
0.643027
from typing import Dict,Sequence,List from dmt.entity import Entity from dmt.blueprint import Blueprint from .blueprints.sumforceresponsestorage import SumForceResponseStorageBlueprint from typing import Dict from sima.riflex.additionalfileformatcode import AdditionalFileFormatCode from sima.riflex.elementreference ...
true
true
f748f1958033da09055407d50c39349cb1e4fe5d
382
py
Python
slot/migrations/0002_remove_request_approved.py
bibhasmondal/slot_allocation
8415ec091e66a800dcedefe551ba244dede9c9e9
[ "MIT" ]
null
null
null
slot/migrations/0002_remove_request_approved.py
bibhasmondal/slot_allocation
8415ec091e66a800dcedefe551ba244dede9c9e9
[ "MIT" ]
null
null
null
slot/migrations/0002_remove_request_approved.py
bibhasmondal/slot_allocation
8415ec091e66a800dcedefe551ba244dede9c9e9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-07-01 05:05 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('slot', '0001_initial'), ] operations = [ migrations.RemoveField( model_...
19.1
48
0.602094
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('slot', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='request', name='approved', ), ]
true
true
f748f29d0ca6bbd9b86ef40b93e96903a21c6116
2,456
py
Python
dataset/kaggle.py
sirmarcel/cmlkit-examples
fe9d15b16095af2730875dc9a98d2918eede6f5e
[ "MIT" ]
null
null
null
dataset/kaggle.py
sirmarcel/cmlkit-examples
fe9d15b16095af2730875dc9a98d2918eede6f5e
[ "MIT" ]
null
null
null
dataset/kaggle.py
sirmarcel/cmlkit-examples
fe9d15b16095af2730875dc9a98d2918eede6f5e
[ "MIT" ]
null
null
null
import qmmlpack as qmml import numpy as np import ase.io as asio import csv from cmlkit.dataset import Dataset, Subset import cmlkit.indices as cmli # The following assumes that you have downloaded the Kaggle dataset from # https://www.kaggle.com/c/nomad2018-predict-transparent-conductors/data, # in particular train.c...
29.590361
119
0.693811
import qmmlpack as qmml import numpy as np import ase.io as asio import csv from cmlkit.dataset import Dataset, Subset import cmlkit.indices as cmli z = [] r = [] b = [] for i in range(2400): f = 'train/{}/geometry.xyz'.format(i + 1) structure = asio.read(f, format='aims') z.append(structure.nu...
true
true
f748f2c949ac305e8834dce539f101b3e06cbc0d
3,772
py
Python
validate.py
scovetta/Project-Security-Reviews
e21300ac7fc118f7b36099282c38e6998a174744
[ "Apache-2.0" ]
null
null
null
validate.py
scovetta/Project-Security-Reviews
e21300ac7fc118f7b36099282c38e6998a174744
[ "Apache-2.0" ]
1
2021-02-09T22:12:23.000Z
2021-02-09T22:12:23.000Z
validate.py
scovetta/Project-Security-Reviews
e21300ac7fc118f7b36099282c38e6998a174744
[ "Apache-2.0" ]
2
2021-02-09T20:10:37.000Z
2021-02-09T21:57:57.000Z
#!env python import sys from typing import List import os import re from better_profanity import profanity class SecurityReviewValidator: results = None def __init__(self): pass def validate_path(self, path: str) -> List[str]: results = [] for root, _, files in os.walk(path, topd...
32.517241
128
0.566278
import sys from typing import List import os import re from better_profanity import profanity class SecurityReviewValidator: results = None def __init__(self): pass def validate_path(self, path: str) -> List[str]: results = [] for root, _, files in os.walk(path, topdown=False): ...
true
true
f748f37d68d2e11bb2e0ff359cd1df4633cf0d23
51,569
py
Python
src/rsc_rc.py
mjbonnington/uistyle
f2102e408a9ba6aa7cc7f37ec3f4a4d3bf134b10
[ "MIT" ]
null
null
null
src/rsc_rc.py
mjbonnington/uistyle
f2102e408a9ba6aa7cc7f37ec3f4a4d3bf134b10
[ "MIT" ]
null
null
null
src/rsc_rc.py
mjbonnington/uistyle
f2102e408a9ba6aa7cc7f37ec3f4a4d3bf134b10
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.9.1) # # WARNING! All changes made in this file will be lost! from Qt import QtCore qt_resource_data = b"\ \x00\x00\x00\x74\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x1f\x00\x...
55.629989
129
0.724001
from Qt import QtCore qt_resource_data = b"\ \x00\x00\x00\x74\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x1f\x00\x00\x00\x1f\x08\x06\x00\x00\x00\x1f\xae\x16\x39\ \x00\x00\x00\x3b\x49\x44\x41\x54\x48\x89\xed\xd5\xb1\x0d\x00\x20\ \x0c\x03\x41\x87\x61\xb3\x93\xa7\x85\x26\x13...
true
true
f748f46f61effad2f3d6e553fcb9f5558ebd0202
663
py
Python
normal_forms/examples/normal_form/for_plotting.py
joepatmckenna/normal_forms
e506304295a2592cfc050a2a688add89715aa5ff
[ "MIT" ]
null
null
null
normal_forms/examples/normal_form/for_plotting.py
joepatmckenna/normal_forms
e506304295a2592cfc050a2a688add89715aa5ff
[ "MIT" ]
null
null
null
normal_forms/examples/normal_form/for_plotting.py
joepatmckenna/normal_forms
e506304295a2592cfc050a2a688add89715aa5ff
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np def before_and_after(f, h, x_min=-1, x_max=1, y_min=-1, y_max=1): fig, ax = plt.subplots(1, 2, figsize=(8, 3)) x = np.linspace(x_min, x_max, 500) y = np.linspace(y_min, y_max, 500) X, Y = np.meshgrid(x, y) Z = np.array([[f(xi, yi) for xi in x] fo...
30.136364
65
0.511312
import matplotlib.pyplot as plt import numpy as np def before_and_after(f, h, x_min=-1, x_max=1, y_min=-1, y_max=1): fig, ax = plt.subplots(1, 2, figsize=(8, 3)) x = np.linspace(x_min, x_max, 500) y = np.linspace(y_min, y_max, 500) X, Y = np.meshgrid(x, y) Z = np.array([[f(xi, yi) for xi in x] fo...
true
true
f748f4cb1125fe5e10f52dac54c2c85b4e6a8f47
2,017
py
Python
src/leetcode_2078_two_furthest_houses_with_different_colors.py
yurirocha15/coding_practice
952506932c47414da689454853ee745637413160
[ "MIT" ]
2
2020-12-08T13:59:10.000Z
2021-05-01T05:07:39.000Z
src/leetcode_2078_two_furthest_houses_with_different_colors.py
yurirocha15/coding_practice
952506932c47414da689454853ee745637413160
[ "MIT" ]
null
null
null
src/leetcode_2078_two_furthest_houses_with_different_colors.py
yurirocha15/coding_practice
952506932c47414da689454853ee745637413160
[ "MIT" ]
1
2021-05-02T17:42:02.000Z
2021-05-02T17:42:02.000Z
# @l2g 2078 python3 # [2078] Two Furthest Houses With Different Colors # Difficulty: Easy # https://leetcode.com/problems/two-furthest-houses-with-different-colors # # There are n houses evenly lined up on the street,and each house is beautifully painted. # You are given a 0-indexed integer array colors of length n, # ...
31.030769
101
0.68121
from typing import List class Solution: def maxDistance(self, colors: List[int]) -> int: for i in range(len(colors)): if colors[i] != colors[-1] or colors[0] != colors[-1 - i]: return len(colors) - i - 1 return 1 if __nam...
true
true
f748f56f4e1a24811310c06c94386e264b91bd57
12,063
py
Python
schemes/parse_scheme_table.py
gold2718/ccpp-framework
66f1a069b6b15748e08adbe940b8ceb9b39619ab
[ "Apache-2.0" ]
null
null
null
schemes/parse_scheme_table.py
gold2718/ccpp-framework
66f1a069b6b15748e08adbe940b8ceb9b39619ab
[ "Apache-2.0" ]
39
2019-01-25T21:50:33.000Z
2021-09-03T16:57:43.000Z
schemes/parse_scheme_table.py
gold2718/ccpp-framework
66f1a069b6b15748e08adbe940b8ceb9b39619ab
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Usage: ./parse_scheme_table.py filename1 [filename2 filename3 ...] # Input: fortran filenames with doxygen-compliant and CCPP-compliant physics schemes; the argument tables should have the following format: # !! \section arg_table_schemename_run # !! | local_name | standard_name ...
54.09417
233
0.521346
import argparse from xml.etree import ElementTree as ET elem, level=0): i = "\n" + level*" " if len(elem): if not elem.text or not elem.text.strip(): elem.text = i + " " if not elem.tail or not elem.tail.strip(): elem.tail = i for elem in elem: indent(elem, le...
false
true
f748f71f2f2b7fe0e5abe428f08d42aa07cdf815
1,604
py
Python
crossbuild/crossbuildmain.py
smohantty/tbuild
7afaf13922314fc17daa31bc03871647593258ce
[ "MIT" ]
null
null
null
crossbuild/crossbuildmain.py
smohantty/tbuild
7afaf13922314fc17daa31bc03871647593258ce
[ "MIT" ]
null
null
null
crossbuild/crossbuildmain.py
smohantty/tbuild
7afaf13922314fc17daa31bc03871647593258ce
[ "MIT" ]
null
null
null
import sys import os import argparse import subprocess class CommandLineParser: def __init__(self): self.term_width = 100 self.formater = lambda prog: argparse.HelpFormatter(prog, max_help_position=int(self.term_width / 2), width=self.term_width) self.commands = {} self.hidden_comm...
29.703704
132
0.644638
import sys import os import argparse import subprocess class CommandLineParser: def __init__(self): self.term_width = 100 self.formater = lambda prog: argparse.HelpFormatter(prog, max_help_position=int(self.term_width / 2), width=self.term_width) self.commands = {} self.hidden_comm...
true
true
f748f77a0bd7f441d426554bfa471279ec8f164f
5,826
py
Python
remove-dead-domains.py
desbma/referer-spam-domains-blacklist
7f29f0016e780dd0f7f436e64de0159cb7291282
[ "WTFPL" ]
19
2015-11-25T14:28:22.000Z
2021-11-11T22:57:12.000Z
remove-dead-domains.py
desbma/referer-spam-domains-blacklist
7f29f0016e780dd0f7f436e64de0159cb7291282
[ "WTFPL" ]
13
2015-11-17T21:24:44.000Z
2020-10-18T20:08:36.000Z
remove-dead-domains.py
desbma/referer-spam-domains-blacklist
7f29f0016e780dd0f7f436e64de0159cb7291282
[ "WTFPL" ]
10
2015-09-11T02:19:38.000Z
2020-08-07T04:47:13.000Z
#!/usr/bin/env python3 """ Remove dead domains from list. """ import argparse import asyncio import collections import errno import itertools import random import resource from typing import Dict, List, Optional import aiodns import tqdm DNS_SERVERS = ( ("8.8.8.8", "8.8.4.4"), # Google DNS ("208.67.222.222...
35.962963
117
0.646584
import argparse import asyncio import collections import errno import itertools import random import resource from typing import Dict, List, Optional import aiodns import tqdm DNS_SERVERS = ( ("8.8.8.8", "8.8.4.4"), ("208.67.222.222", "208.67.220.220"), ("84.200.69.80", "84.200.70.40"), ("209...
true
true
f748f805b62cd8213b26cf4d71000e9f6d25f634
598
py
Python
metecho/api/migrations/0098_add_task_assignee_ids.py
VaccineCloud/Metecho-Vax
48762a2b5bb53d0d5633d1871e4f1451f5e3e91c
[ "BSD-3-Clause" ]
21
2020-04-02T21:39:58.000Z
2022-01-31T19:43:47.000Z
metecho/api/migrations/0098_add_task_assignee_ids.py
VaccineCloud/Metecho-Vax
48762a2b5bb53d0d5633d1871e4f1451f5e3e91c
[ "BSD-3-Clause" ]
1,613
2020-03-26T16:39:57.000Z
2022-03-07T14:54:16.000Z
metecho/api/migrations/0098_add_task_assignee_ids.py
oddbird/MetaShare
71fb667eaea6990e9d89be13d9a47e76db2a6c46
[ "BSD-3-Clause" ]
21
2020-07-21T11:58:47.000Z
2021-11-25T00:48:21.000Z
# Generated by Django 3.2 on 2021-04-20 21:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("api", "0097_githubrepository_permissions"), ] operations = [ migrations.AddField( model_name="task", name="assigned_de...
24.916667
73
0.59699
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("api", "0097_githubrepository_permissions"), ] operations = [ migrations.AddField( model_name="task", name="assigned_dev_id", field=models.CharField(bla...
true
true
f748f82be9f660d66159d93738a19e8cde5ffeaa
3,899
py
Python
pyscf/symm/test/test_Dmatrix.py
QuESt-Calculator/pyscf
0ed03633b699505c7278f1eb501342667d0aa910
[ "Apache-2.0" ]
501
2018-12-06T23:48:17.000Z
2022-03-31T11:53:18.000Z
pyscf/symm/test/test_Dmatrix.py
QuESt-Calculator/pyscf
0ed03633b699505c7278f1eb501342667d0aa910
[ "Apache-2.0" ]
710
2018-11-26T22:04:52.000Z
2022-03-30T03:53:12.000Z
pyscf/symm/test/test_Dmatrix.py
QuESt-Calculator/pyscf
0ed03633b699505c7278f1eb501342667d0aa910
[ "Apache-2.0" ]
273
2018-11-26T10:10:24.000Z
2022-03-30T12:25:28.000Z
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
43.808989
99
0.606053
from functools import reduce import unittest import numpy from pyscf import gto, lib from pyscf.symm import Dmatrix, geom class KnownValues(unittest.TestCase): def test_Dmatrix(self): self.assertAlmostEqual(lib.finger(Dmatrix.Dmatrix(0, -.7, .5, .2)), 1, 12) self.assertAlmostEqual(l...
true
true
f748f83319e575c96bb8c9a4c6cb38719a0a9590
1,335
py
Python
code/linear_dates_only.py
zygmuntz/project-rhubarb
d12fbdcdff817710c072f2e3128aae3a641c10ff
[ "BSD-2-Clause" ]
10
2017-05-22T14:35:30.000Z
2019-05-06T16:31:27.000Z
code/linear_dates_only.py
zygmuntz/project-rhubarb
d12fbdcdff817710c072f2e3128aae3a641c10ff
[ "BSD-2-Clause" ]
null
null
null
code/linear_dates_only.py
zygmuntz/project-rhubarb
d12fbdcdff817710c072f2e3128aae3a641c10ff
[ "BSD-2-Clause" ]
5
2017-09-29T18:42:13.000Z
2020-01-15T08:09:51.000Z
#!/usr/bin/env python "the benchmark with date features only" "0.30421 on public leaderboard" import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression # train_file = '../data/train.csv' test_file = '../data/test.csv' output_file = 'linear_regression_with_date_features_only.csv' lo...
21.885246
80
0.710861
import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression train_file = '../data/train.csv' test_file = '../data/test.csv' output_file = 'linear_regression_with_date_features_only.csv' log_transform = True train = pd.read_csv( train_file, parse_dates = [ 'date' ]) test = pd.rea...
true
true
f748f87a5e0c09a04600ca0fe807352ab64d396e
2,009
py
Python
fetch/country.py
itzmeanjan/country
aa6a02e1ebc459aad3556a0c94cec50a2ba23f6e
[ "MIT" ]
4
2019-07-08T08:09:59.000Z
2019-07-16T10:55:12.000Z
fetch/country.py
itzmeanjan/country
aa6a02e1ebc459aad3556a0c94cec50a2ba23f6e
[ "MIT" ]
1
2019-07-01T08:44:14.000Z
2019-07-10T09:54:24.000Z
fetch/country.py
itzmeanjan/country
aa6a02e1ebc459aad3556a0c94cec50a2ba23f6e
[ "MIT" ]
1
2019-07-10T07:29:25.000Z
2019-07-10T07:29:25.000Z
#!/usr/bin/python3 from __future__ import annotations from typing import Dict from requests import get from json import dumps from os.path import join, abspath, dirname, exists, realpath from os import mkdir def build(target_file: str = abspath(join(dirname(realpath(__file__)), '../data/country.json'))) -> Dict[str,...
42.744681
584
0.610752
from __future__ import annotations from typing import Dict from requests import get from json import dumps from os.path import join, abspath, dirname, exists, realpath from os import mkdir def build(target_file: str = abspath(join(dirname(realpath(__file__)), '../data/country.json'))) -> Dict[str, str]: code = ...
true
true
f748f8bcb06390a7f7ae3dd28b5cc9156b22e54b
4,277
py
Python
pysc2/maps/lib.py
zeuseyera/pysc2
df837baa43afd486d9f70a83c64bf12ff1962781
[ "Apache-2.0" ]
21
2018-12-27T05:04:49.000Z
2021-05-20T16:20:32.000Z
pysc2/maps/lib.py
paraskuk/pysc2
a9f093493c4c77adb385602790a480e7f238b97d
[ "Apache-2.0" ]
1
2021-12-08T04:09:49.000Z
2021-12-08T04:09:49.000Z
pysc2/maps/lib.py
paraskuk/pysc2
a9f093493c4c77adb385602790a480e7f238b97d
[ "Apache-2.0" ]
13
2019-01-02T08:35:45.000Z
2021-02-23T20:55:02.000Z
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
31.218978
80
0.692308
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import logging import os class DuplicateMapException(Exception): pass class NoMapException(Exception): pass class Map(object): directory = "" filename = None download = N...
true
true
f748f8ee3cc1f09a4b14cdc557e9924839cfc02b
1,160
py
Python
presidio-analyzer/tests/test_entity_recognizer.py
teamlumos/presidio
1044495f41ea8bf6d1b1339bcddcbb46c2fe4de1
[ "MIT" ]
3
2020-12-30T15:27:26.000Z
2021-02-04T17:20:28.000Z
presidio-analyzer/tests/test_entity_recognizer.py
DeepHiveMind/AI_powered_PII-Protection-and-Anonymization_Image-Text_Service
d658394078fec2fc3ebe70bd68af82c72e4c6388
[ "MIT" ]
null
null
null
presidio-analyzer/tests/test_entity_recognizer.py
DeepHiveMind/AI_powered_PII-Protection-and-Anonymization_Image-Text_Service
d658394078fec2fc3ebe70bd68af82c72e4c6388
[ "MIT" ]
1
2019-12-05T14:01:27.000Z
2019-12-05T14:01:27.000Z
from presidio_analyzer import EntityRecognizer def test_to_dict_correct_dictionary(): ent_recognizer = EntityRecognizer(["ENTITY"]) entity_rec_dict = ent_recognizer.to_dict() assert entity_rec_dict is not None assert entity_rec_dict["supported_entities"] == ["ENTITY"] assert entity_rec_dict["supp...
34.117647
86
0.681897
from presidio_analyzer import EntityRecognizer def test_to_dict_correct_dictionary(): ent_recognizer = EntityRecognizer(["ENTITY"]) entity_rec_dict = ent_recognizer.to_dict() assert entity_rec_dict is not None assert entity_rec_dict["supported_entities"] == ["ENTITY"] assert entity_rec_dict["supp...
true
true
f748fa545213e635ff3f16b17cbdbc1d8f7dc1ff
4,550
py
Python
picard/_tools.py
arnodelorme/picard
f8fb90c2bd2e21087e565da186664c4e54626e41
[ "BSD-3-Clause" ]
1
2021-03-26T04:01:47.000Z
2021-03-26T04:01:47.000Z
picard/_tools.py
arnodelorme/picard
f8fb90c2bd2e21087e565da186664c4e54626e41
[ "BSD-3-Clause" ]
null
null
null
picard/_tools.py
arnodelorme/picard
f8fb90c2bd2e21087e565da186664c4e54626e41
[ "BSD-3-Clause" ]
null
null
null
# Authors: Pierre Ablin <pierre.ablin@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Jean-Francois Cardoso <cardoso@iap.fr> # # License: BSD (3-clause) import numbers import numpy as np from scipy.linalg import expm def gradient(Y, psiY): ''' Compute the gradient for the cu...
27.245509
78
0.572527
import numbers import numpy as np from scipy.linalg import expm def gradient(Y, psiY): _, T = Y.shape return np.inner(psiY, Y) / float(T) def proj_hessian_approx(Y, psidY_mean, G): N, _ = Y.shape diag = psidY_mean[:, None] * np.ones(N)[None, :] off_diag = np.diag(G) return 0.5 * (diag...
true
true
f748fa825deefacd9a81314dee7c08a7e7cbf7cc
18,062
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/aio/operations/_virtual_hub_bgp_connection_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/aio/operations/_virtual_hub_bgp_connection_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/aio/operations/_virtual_hub_bgp_connection_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.593838
223
0.678995
from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impo...
true
true
f748fa9a0c4b7013d25d2ad232eeaaee81f62647
339
py
Python
aliyun/api/rest/Mts20140618QueryAnalysisJobListRequest.py
francisar/rds_manager
458298669bf7d1990a85648b466b88f905256690
[ "MIT" ]
14
2015-11-30T02:35:18.000Z
2019-05-14T11:49:24.000Z
aliyun/api/rest/Mts20140618QueryAnalysisJobListRequest.py
francisar/rds_manager
458298669bf7d1990a85648b466b88f905256690
[ "MIT" ]
2
2015-11-30T02:51:40.000Z
2017-03-16T01:51:45.000Z
aliyun/api/rest/Mts20140618QueryAnalysisJobListRequest.py
francisar/rds_manager
458298669bf7d1990a85648b466b88f905256690
[ "MIT" ]
12
2016-01-04T06:48:17.000Z
2020-11-07T14:08:25.000Z
''' Created by auto_sdk on 2015.06.23 ''' from aliyun.api.base import RestApi class Mts20140618QueryAnalysisJobListRequest(RestApi): def __init__(self,domain='mts.aliyuncs.com',port=80): RestApi.__init__(self,domain, port) self.AnalysisJobIds = None def getapiname(self): return 'mts.aliyuncs.com.QueryAnalysisJ...
28.25
59
0.778761
from aliyun.api.base import RestApi class Mts20140618QueryAnalysisJobListRequest(RestApi): def __init__(self,domain='mts.aliyuncs.com',port=80): RestApi.__init__(self,domain, port) self.AnalysisJobIds = None def getapiname(self): return 'mts.aliyuncs.com.QueryAnalysisJobList.2014-06-18'
true
true
f748fb0673812365c15b6a5ca989e6715202ca3b
189
py
Python
10/10.3/write_file.py
singi2016cn/python-scaffold
274e508d1919da67e599aa73be139800c043bce4
[ "MIT" ]
null
null
null
10/10.3/write_file.py
singi2016cn/python-scaffold
274e508d1919da67e599aa73be139800c043bce4
[ "MIT" ]
null
null
null
10/10.3/write_file.py
singi2016cn/python-scaffold
274e508d1919da67e599aa73be139800c043bce4
[ "MIT" ]
null
null
null
"""写入文件""" file_name = 'user_input.txt' user_input = input('请输入您要存储的信息:\n') with open(file_name, 'w',encoding='utf8') as file_object: file_object.write(user_input) print('写入成功')
18.9
57
0.687831
file_name = 'user_input.txt' user_input = input('请输入您要存储的信息:\n') with open(file_name, 'w',encoding='utf8') as file_object: file_object.write(user_input) print('写入成功')
true
true
f748fc4330d30f11b58698956957bc33bc43a351
24,115
py
Python
Database_Generate/TRUCKS_V2.py
sassystacks/Brisco_Devel
4543ac2f6fda3f2cefdfd56709b9c897edf03a97
[ "MIT" ]
null
null
null
Database_Generate/TRUCKS_V2.py
sassystacks/Brisco_Devel
4543ac2f6fda3f2cefdfd56709b9c897edf03a97
[ "MIT" ]
null
null
null
Database_Generate/TRUCKS_V2.py
sassystacks/Brisco_Devel
4543ac2f6fda3f2cefdfd56709b9c897edf03a97
[ "MIT" ]
null
null
null
from Tkinter import * import ttk, tkFont, tkMessageBox import itertools import datetime from Connect_Brisco_DB import Connect_DB from DB_searchandFill import DB_search from psycopg2 import sql import serial from psycopg2.extensions import AsIs class GUIatFrontDesk: def __init__(self,master): from PIL imp...
38.957997
190
0.599295
from Tkinter import * import ttk, tkFont, tkMessageBox import itertools import datetime from Connect_Brisco_DB import Connect_DB from DB_searchandFill import DB_search from psycopg2 import sql import serial from psycopg2.extensions import AsIs class GUIatFrontDesk: def __init__(self,master): from PIL imp...
false
true
f748fcb43c71f51f839698ed866aff8e7681fab0
913
py
Python
connectorx-python/connectorx/tests/test_polars.py
ives9638/connector-x
be3817fa0b140aa5cfef825dced15b943fa2ddf0
[ "MIT" ]
565
2021-04-15T21:13:16.000Z
2022-03-31T22:38:59.000Z
connectorx-python/connectorx/tests/test_polars.py
ives9638/connector-x
be3817fa0b140aa5cfef825dced15b943fa2ddf0
[ "MIT" ]
111
2021-04-13T05:55:23.000Z
2022-03-31T17:50:13.000Z
connectorx-python/connectorx/tests/test_polars.py
ives9638/connector-x
be3817fa0b140aa5cfef825dced15b943fa2ddf0
[ "MIT" ]
41
2021-04-14T18:57:05.000Z
2022-03-19T22:10:44.000Z
import os import pandas as pd import pytest import polars as pl from .. import read_sql @pytest.fixture(scope="module") # type: ignore def postgres_url() -> str: conn = os.environ["POSTGRES_URL"] return conn def test_modin(postgres_url: str) -> None: query = "SELECT * FROM test_table" df = read_s...
23.410256
64
0.555312
import os import pandas as pd import pytest import polars as pl from .. import read_sql @pytest.fixture(scope="module") def postgres_url() -> str: conn = os.environ["POSTGRES_URL"] return conn def test_modin(postgres_url: str) -> None: query = "SELECT * FROM test_table" df = read_sql( po...
true
true
f748fd635f7d5ffeb48a27e7b9a467e16bcd773c
4,001
py
Python
via/config_extractor.py
SenseTW/via
17e2865b0f7a3771ac2031cc8b2bee432aec8209
[ "MIT" ]
null
null
null
via/config_extractor.py
SenseTW/via
17e2865b0f7a3771ac2031cc8b2bee432aec8209
[ "MIT" ]
null
null
null
via/config_extractor.py
SenseTW/via
17e2865b0f7a3771ac2031cc8b2bee432aec8209
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import logging from urllib import urlencode from urlparse import parse_qsl, urlparse, urlunparse def rewrite_location_header(name, value, params): """ Rewrite "Location" header to append params to the URL's query string. Returns other headers unmodified. :par...
34.791304
93
0.659835
from __future__ import unicode_literals import logging from urllib import urlencode from urlparse import parse_qsl, urlparse, urlunparse def rewrite_location_header(name, value, params): if name.lower() != 'location': return (name, value) try: parsed_url = urlparse(value) parsed_que...
true
true
f748fdc731195e145279701eecbc7fdacc79b82a
9,994
py
Python
ml_debiaser/randomized_threshold.py
pedersor/google-research
6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6
[ "Apache-2.0" ]
1
2022-03-30T07:14:49.000Z
2022-03-30T07:14:49.000Z
ml_debiaser/randomized_threshold.py
pedersor/google-research
6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6
[ "Apache-2.0" ]
null
null
null
ml_debiaser/randomized_threshold.py
pedersor/google-research
6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
38.291188
80
0.655493
import math import numpy as np class RandomizedThreshold: def __init__(self, gamma=1.0, eps=0.0, rho=None): if eps < 0: raise ValueError('eps must be non-negative.') if gamma <= 0: raise ValueError('gamma must be a strictly positive number.') if rho is not None and rho <=...
true
true
f748fdeb78bad0f24cba9a8e5dbd3c43fbb7b9ec
3,385
py
Python
dayonetools/services/__init__.py
durden/dayonetools
ff1a0a5378a17db96fa4a837042b3e2d21c1d6c6
[ "MIT" ]
9
2015-02-09T19:19:09.000Z
2017-12-07T04:37:08.000Z
dayonetools/services/__init__.py
durden/dayonetools
ff1a0a5378a17db96fa4a837042b3e2d21c1d6c6
[ "MIT" ]
null
null
null
dayonetools/services/__init__.py
durden/dayonetools
ff1a0a5378a17db96fa4a837042b3e2d21c1d6c6
[ "MIT" ]
null
null
null
# -*- mode: python; coding: utf-8; -*- """Common services code""" import os AVAILABLE_SERVICES = ['habit_list', 'idonethis', 'nikeplus', 'pedometerpp', 'sleep_cycle'] def get_service_module(service_name): """Import given service from dayonetools.services package""" import importlib ...
33.85
109
0.646677
import os AVAILABLE_SERVICES = ['habit_list', 'idonethis', 'nikeplus', 'pedometerpp', 'sleep_cycle'] def get_service_module(service_name): import importlib services_pkg = 'dayonetools.services' module = '%s.%s' % (services_pkg, service_name) return importlib.import_module(m...
true
true
f748fe828bfd8c507cc25481782051de2b923c94
103,242
py
Python
python/tvm/relay/frontend/tensorflow.py
alexwong/tvm
0b0bc3ed92b5578c481662287a39556f9b1a2535
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
python/tvm/relay/frontend/tensorflow.py
alexwong/tvm
0b0bc3ed92b5578c481662287a39556f9b1a2535
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
python/tvm/relay/frontend/tensorflow.py
alexwong/tvm
0b0bc3ed92b5578c481662287a39556f9b1a2535
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-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 ...
40.062864
108
0.547674
from __future__ import absolute_import as _abs from __future__ import print_function import warnings from collections import defaultdict import numpy as np import tvm from tvm.relay.prelude import Prelude from .. import analysis from .. import expr as _expr from .. import op as _op from ..expr_f...
true
true
f748ff3400cfbc96f543a55aac2f140e1e1f2e20
7,203
py
Python
anchorecli/cli/repo.py
dspalmer99/anchore-cli
d62822326cb604b6a3ecb1ae6a701ef5a921a98b
[ "Apache-2.0" ]
null
null
null
anchorecli/cli/repo.py
dspalmer99/anchore-cli
d62822326cb604b6a3ecb1ae6a701ef5a921a98b
[ "Apache-2.0" ]
null
null
null
anchorecli/cli/repo.py
dspalmer99/anchore-cli
d62822326cb604b6a3ecb1ae6a701ef5a921a98b
[ "Apache-2.0" ]
null
null
null
import sys import json import click import anchorecli.clients.apiexternal import anchorecli.cli.utils config = {} @click.group(name="repo", short_help="Repository operations") @click.pass_obj def repo(ctx_config): global config config = ctx_config try: anchorecli.cli.utils.check_access(config) ...
30.782051
99
0.605859
import sys import json import click import anchorecli.clients.apiexternal import anchorecli.cli.utils config = {} @click.group(name="repo", short_help="Repository operations") @click.pass_obj def repo(ctx_config): global config config = ctx_config try: anchorecli.cli.utils.check_access(config) ...
true
true
f748ffc94273f4060cf32adba44cc46cdd202830
402
py
Python
tensorFlow/sklearn/a3.py
kopanya/good-sunday
dcd92edfa1866ca7b5806879ba6bd1f7c628da6e
[ "MIT" ]
3
2018-06-05T02:51:42.000Z
2018-06-05T02:51:52.000Z
tensorFlow/sklearn/a3.py
kopanya/good-sunday
dcd92edfa1866ca7b5806879ba6bd1f7c628da6e
[ "MIT" ]
null
null
null
tensorFlow/sklearn/a3.py
kopanya/good-sunday
dcd92edfa1866ca7b5806879ba6bd1f7c628da6e
[ "MIT" ]
null
null
null
from sklearn import datasets from sklearn.linear_model import LinearRegression import matplotlib.pyplot as plt loaded_data = datasets.load_boston() data_x = loaded_data.data data_y = loaded_data.target model = LinearRegression() model.fit(data_x, data_y) ## print(model.predict(data_x[:4, :])) print(model.coef_) pr...
22.333333
49
0.791045
from sklearn import datasets from sklearn.linear_model import LinearRegression import matplotlib.pyplot as plt loaded_data = datasets.load_boston() data_x = loaded_data.data data_y = loaded_data.target model = LinearRegression() model.fit(data_x, data_y) rcept_) print(model.get_params()) print(model.score(data_x, d...
true
true
f74901ab5a36bbb330cacd91e5c4b63cea005791
1,805
py
Python
braille_experience/braille_translator_kor/korean_decomposer.py
firekim2/braille_experience_django
1c3ad48a6a16ef05e2703b8bef4fe58ca531ea90
[ "MIT" ]
2
2019-08-07T12:22:06.000Z
2021-07-20T15:17:44.000Z
braille_experience/braille_translator_kor/korean_decomposer.py
firekim2/braille_experience_django
1c3ad48a6a16ef05e2703b8bef4fe58ca531ea90
[ "MIT" ]
null
null
null
braille_experience/braille_translator_kor/korean_decomposer.py
firekim2/braille_experience_django
1c3ad48a6a16ef05e2703b8bef4fe58ca531ea90
[ "MIT" ]
1
2021-04-27T04:28:33.000Z
2021-04-27T04:28:33.000Z
import re """ 초성 중성 종성 분리 하기 유니코드 한글은 0xAC00 으로부터 초성 19개, 중상21개, 종성28개로 이루어지고 이들을 조합한 11,172개의 문자를 갖는다. 한글코드의 값 = ((초성 * 21) + 중성) * 28 + 종성 + 0xAC00 (0xAC00은 'ㄱ'의 코드값) 따라서 다음과 같은 계산 식이 구해진다. 유니코드 한글 문자 코드 값이 X일 때, 초성 = ((X - 0xAC00) / 28) / 21 중성 = ((X - 0xAC00) / 28) % 21 종성 = (X - 0xAC00) % 28 이 때 초성,...
31.12069
77
0.471468
import re BASE_CODE, CHOSUNG, JUNGSUNG = 44032, 588, 28 CHOSUNG_LIST = ['ㄱ', 'ㄲ', 'ㄴ', 'ㄷ', 'ㄸ', 'ㄹ', 'ㅁ', 'ㅂ', 'ㅃ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅉ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ'] JUNGSUNG_LIST = ['ㅏ', 'ㅐ', 'ㅑ', 'ㅒ', 'ㅓ', 'ㅔ', 'ㅕ', 'ㅖ', 'ㅗ', 'ㅘ', 'ㅙ', 'ㅚ', 'ㅛ', 'ㅜ', ...
true
true
f74901cbb7ef50e044e3ffa3aa9ab722b7bc541c
829
py
Python
manage.py
banctilrobitaille/RockETS-Basestation
4c8e6f73ab4da5188c0014a5a23de2aa1dde8433
[ "MIT" ]
1
2018-06-11T14:31:45.000Z
2018-06-11T14:31:45.000Z
manage.py
banctilrobitaille/RockETS-Basestation
4c8e6f73ab4da5188c0014a5a23de2aa1dde8433
[ "MIT" ]
18
2017-02-21T15:11:15.000Z
2021-06-10T18:20:48.000Z
manage.py
banctilrobitaille/RockETS-Basestation
4c8e6f73ab4da5188c0014a5a23de2aa1dde8433
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "RockETS_Basestation.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensu...
36.043478
83
0.638118
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "RockETS_Basestation.settings") try: from django.core.management import execute_from_command_line except ImportError: try: import django except Imp...
true
true
f74902a5ff605fe247d3a0a79fc3bacdfb2f46e0
4,747
py
Python
saleor/graphql/payment/types.py
nlkhagva/saleor
0d75807d08ac49afcc904733724ac870e8359c10
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/payment/types.py
nlkhagva/saleor
0d75807d08ac49afcc904733724ac870e8359c10
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/payment/types.py
nlkhagva/saleor
0d75807d08ac49afcc904733724ac870e8359c10
[ "CC-BY-4.0" ]
null
null
null
import graphene from graphene import relay from ...payment import models from ..core.connection import CountableDjangoObjectType from ..core.types import Money from .enums import OrderAction, PaymentChargeStatusEnum class Transaction(CountableDjangoObjectType): amount = graphene.Field(Money, description="Total a...
30.429487
86
0.62945
import graphene from graphene import relay from ...payment import models from ..core.connection import CountableDjangoObjectType from ..core.types import Money from .enums import OrderAction, PaymentChargeStatusEnum class Transaction(CountableDjangoObjectType): amount = graphene.Field(Money, description="Total a...
true
true
f74903deb54ec0299e4a33114894e96edc586686
30,669
py
Python
pyNastran/op2/result_objects/stress_object.py
jtran10/pyNastran
4aed8e05b91576c2b50ee835f0497a9aad1d2cb0
[ "BSD-3-Clause" ]
null
null
null
pyNastran/op2/result_objects/stress_object.py
jtran10/pyNastran
4aed8e05b91576c2b50ee835f0497a9aad1d2cb0
[ "BSD-3-Clause" ]
null
null
null
pyNastran/op2/result_objects/stress_object.py
jtran10/pyNastran
4aed8e05b91576c2b50ee835f0497a9aad1d2cb0
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function import sys from collections import OrderedDict import numpy as np #vm_word = get_plate_stress_strain( #model, key, is_stress, vm_word, itime, #oxx, oyy, txy, max_principal, min_principal, ovm, is_element_on, #header_dict, keys_map) class StressObject(object): def ...
39.268886
101
0.52121
from __future__ import print_function import sys from collections import OrderedDict import numpy as np class StressObject(object): def __init__(self, model, key, all_eids, is_stress=True): self.model = model self.vm_word = None self.header_dict = OrderedDict() ...
true
true
f7490452a943528c19f8273e031e8c7c57ae83f6
3,614
py
Python
opyum/optimizations/__init__.py
Amper/opyum
daa2320eb4e70f6c535a589b71bb9db4868aedfc
[ "BSD-3-Clause" ]
2
2016-01-24T16:48:02.000Z
2016-02-02T04:31:02.000Z
opyum/optimizations/__init__.py
Amper/opyum
daa2320eb4e70f6c535a589b71bb9db4868aedfc
[ "BSD-3-Clause" ]
null
null
null
opyum/optimizations/__init__.py
Amper/opyum
daa2320eb4e70f6c535a589b71bb9db4868aedfc
[ "BSD-3-Clause" ]
null
null
null
""" """ import sys import os import pkgutil from ast import NodeTransformer from abc import ABCMeta, abstractproperty from inspect import isabstract from importlib import import_module from ..utils import classproperty __all__ =\ [ "BasicOptimization" , "ASTOptimization" , "ByteCodeOptimi...
24.924138
106
0.57637
import sys import os import pkgutil from ast import NodeTransformer from abc import ABCMeta, abstractproperty from inspect import isabstract from importlib import import_module from ..utils import classproperty __all__ =\ [ "BasicOptimization" , "ASTOptimization" , "ByteCodeOptimization" ...
true
true
f74904caba86d1d4584a52a0fd3bed18f4f8043f
2,560
py
Python
nfcconfig-develop/asm_generic_ioctl.py
Nirj2004/nfc_config_in_python_nirj2004
5615ded2ccbdf74b24f9e82acdb1356809c2cc2f
[ "MIT" ]
3
2021-07-24T16:23:12.000Z
2022-02-27T11:04:36.000Z
nfcconfig-develop/asm_generic_ioctl.py
Nirj2004/nfc_config_in_python_nirj2004
5615ded2ccbdf74b24f9e82acdb1356809c2cc2f
[ "MIT" ]
null
null
null
nfcconfig-develop/asm_generic_ioctl.py
Nirj2004/nfc_config_in_python_nirj2004
5615ded2ccbdf74b24f9e82acdb1356809c2cc2f
[ "MIT" ]
null
null
null
of the published Quick2Wire API. # # Converted from <asm-generic/ioctl.h> # ioctl command encoding: 32 bits total, command in lower 16 bits, # size of the parameter structure in the lower 14 bits of the # upper 16 bits. # # Encoding the size of the parameter structure in the ioctl request # is useful for catc...
29.090909
72
0.699219
of the published Quick2Wire API. # a type field. De facto, however, the top 8 bits of the lower 16 # bits are indeed used as a type field, so we might just as well make # this explicit here. Please be sure to use the decoding macros # below from now on. import ctypes _IOC_NRBITS = 8 _IOC_...
false
true
f74905a3332d7705e2afaa1438db227a3d5f80b8
35,875
py
Python
tests/integration/test_listen_to_fedmsg.py
bcrocker15/packit-service
184b4f3ef50c435d6045024190a867d34812cd9e
[ "MIT" ]
null
null
null
tests/integration/test_listen_to_fedmsg.py
bcrocker15/packit-service
184b4f3ef50c435d6045024190a867d34812cd9e
[ "MIT" ]
null
null
null
tests/integration/test_listen_to_fedmsg.py
bcrocker15/packit-service
184b4f3ef50c435d6045024190a867d34812cd9e
[ "MIT" ]
null
null
null
# Copyright Contributors to the Packit project. # SPDX-License-Identifier: MIT import json import pytest import requests from celery.canvas import Signature from flexmock import flexmock from ogr.abstract import CommitStatus from ogr.services.github import GithubProject from ogr.utils import RequestResponse from pack...
36.019076
88
0.70269
import json import pytest import requests from celery.canvas import Signature from flexmock import flexmock from ogr.abstract import CommitStatus from ogr.services.github import GithubProject from ogr.utils import RequestResponse from packit.config import JobConfig, JobType, JobConfigTriggerType from packit.config....
true
true
f749062197438f7922dd8e8b7ee219525df3da3d
993
py
Python
glance/db/sqlalchemy/migrate_repo/versions/044_update_metadef_os_nova_server.py
daespinel/glance
c8a00ea1f45679ce937146f9d7dadbbb056f1a48
[ "Apache-2.0" ]
null
null
null
glance/db/sqlalchemy/migrate_repo/versions/044_update_metadef_os_nova_server.py
daespinel/glance
c8a00ea1f45679ce937146f9d7dadbbb056f1a48
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
glance/db/sqlalchemy/migrate_repo/versions/044_update_metadef_os_nova_server.py
daespinel/glance
c8a00ea1f45679ce937146f9d7dadbbb056f1a48
[ "Apache-2.0" ]
6
2018-09-06T14:50:23.000Z
2018-11-27T21:32:51.000Z
# Copyright (c) 2016 Hewlett Packard Enterprise Software, 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 ...
36.777778
79
0.723061
from sqlalchemy import MetaData, Table def upgrade(migrate_engine): meta = MetaData() meta.bind = migrate_engine resource_types_table = Table('metadef_resource_types', meta, autoload=True) resource_types_table.update(values={'name': 'OS::Nova::Server'}).where( resource_types_t...
true
true
f74906671f7a8dd5f9797cf79dcba680dbcd907a
1,874
py
Python
transperth/silver_rails/reference_data.py
Mause/pytransperth
411c6a38b8451dc917927bdc4fdb70aeb9acd52b
[ "MIT" ]
null
null
null
transperth/silver_rails/reference_data.py
Mause/pytransperth
411c6a38b8451dc917927bdc4fdb70aeb9acd52b
[ "MIT" ]
null
null
null
transperth/silver_rails/reference_data.py
Mause/pytransperth
411c6a38b8451dc917927bdc4fdb70aeb9acd52b
[ "MIT" ]
null
null
null
import gzip import json from hashlib import md5 from concurrent import futures from operator import itemgetter import requests from .utils import prepare_url from . import BASE class InvalidReferenceData(Exception): pass def _load_single_file(url): r = requests.get(url['url']) data = gzip.decompress(r...
21.05618
69
0.627535
import gzip import json from hashlib import md5 from concurrent import futures from operator import itemgetter import requests from .utils import prepare_url from . import BASE class InvalidReferenceData(Exception): pass def _load_single_file(url): r = requests.get(url['url']) data = gzip.decompress(r...
true
true
f74906a6430e3e2efcc9d0d78890a0704a70d3f5
13,854
py
Python
modules/optimum/tests/openvino/test_modeling_ov_auto.py
xlla/openvino_contrib
bc2bd3007375883580fe2923478b8bf849a357b6
[ "Apache-2.0" ]
null
null
null
modules/optimum/tests/openvino/test_modeling_ov_auto.py
xlla/openvino_contrib
bc2bd3007375883580fe2923478b8bf849a357b6
[ "Apache-2.0" ]
null
null
null
modules/optimum/tests/openvino/test_modeling_ov_auto.py
xlla/openvino_contrib
bc2bd3007375883580fe2923478b8bf849a357b6
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import os import unittest from packaging import version import numpy as np import transformers from transformers import AutoTokenizer import datasets from datasets import DatasetDict, load_dataset try: from transformers.testing_ut...
37.142091
119
0.617511
import os import unittest from packaging import version import numpy as np import transformers from transformers import AutoTokenizer import datasets from datasets import DatasetDict, load_dataset try: from transformers.testing_utils import require_tf, require_torch except ImportError: from transformers.f...
true
true
f74907b936eb00941f148a9f06560e3d56a0302c
715
py
Python
products/models.py
benoitboyer/DjangoBio
415e048e7207f4abc6ac9b6bde7b7c7043aab78a
[ "MIT" ]
null
null
null
products/models.py
benoitboyer/DjangoBio
415e048e7207f4abc6ac9b6bde7b7c7043aab78a
[ "MIT" ]
null
null
null
products/models.py
benoitboyer/DjangoBio
415e048e7207f4abc6ac9b6bde7b7c7043aab78a
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class Product(models.Model): product_brand = models.CharField(max_length=50) product_article_code = models.CharField(max_length=20) product_code= models.IntegerField() product_name= models.CharField(max_length=150) product_unit_packaging_number = models.Inte...
29.791667
67
0.80979
from django.db import models class Product(models.Model): product_brand = models.CharField(max_length=50) product_article_code = models.CharField(max_length=20) product_code= models.IntegerField() product_name= models.CharField(max_length=150) product_unit_packaging_number = models.IntegerField(default=1) produ...
true
true
f74907d392d5d895a9c32b3266d452eea41dc867
7,125
py
Python
homeassistant/components/cloud/google_config.py
uniosmarthome/core
dd56b1c17606fff40968940a27db6f64bb71abec
[ "Apache-2.0" ]
1
2021-03-17T10:07:33.000Z
2021-03-17T10:07:33.000Z
homeassistant/components/cloud/google_config.py
uniosmarthome/core
dd56b1c17606fff40968940a27db6f64bb71abec
[ "Apache-2.0" ]
null
null
null
homeassistant/components/cloud/google_config.py
uniosmarthome/core
dd56b1c17606fff40968940a27db6f64bb71abec
[ "Apache-2.0" ]
null
null
null
"""Google config for Cloud.""" import asyncio import logging from hass_uniocloud import cloud_api from hass_uniocloud.google_report_state import ErrorResponse from homeassistant.components.google_assistant.helpers import AbstractConfig from homeassistant.const import ( CLOUD_NEVER_EXPOSED_ENTITIES, EVENT_HOME...
34.090909
87
0.674667
import asyncio import logging from hass_uniocloud import cloud_api from hass_uniocloud.google_report_state import ErrorResponse from homeassistant.components.google_assistant.helpers import AbstractConfig from homeassistant.const import ( CLOUD_NEVER_EXPOSED_ENTITIES, EVENT_HOMEASSISTANT_STARTED, HTTP_OK,...
true
true
f749082fa67f8030d48365f1efb20d8eaa5afe3f
794
py
Python
setup.py
cvlabmiet/docx-replace
30db49740b1ce3745182c459435bf472162e51ce
[ "MIT" ]
2
2019-07-15T00:59:01.000Z
2021-03-01T13:27:29.000Z
setup.py
cvlabmiet/docx-replace
30db49740b1ce3745182c459435bf472162e51ce
[ "MIT" ]
null
null
null
setup.py
cvlabmiet/docx-replace
30db49740b1ce3745182c459435bf472162e51ce
[ "MIT" ]
null
null
null
#!/usr/bin/env python from setuptools import setup import re script_content = open('docx-replace').read() metadata = dict(re.findall("__([a-z]+)__\s*=\s*'([^']+)'", script_content)) setup( name="docx-replace", version=metadata['version'], description="Replace text inside docx file", url="https://gith...
28.357143
75
0.615869
from setuptools import setup import re script_content = open('docx-replace').read() metadata = dict(re.findall("__([a-z]+)__\s*=\s*'([^']+)'", script_content)) setup( name="docx-replace", version=metadata['version'], description="Replace text inside docx file", url="https://github.com/cvlabmiet/docx...
true
true
f74909fb60ada34fad6592054a84512c7fa87b40
185
py
Python
app/api/admin/__init__.py
WycliffeMuchumi/Stream-101-API
9892685c37ff6f3e1e9017bfa5321968a5255c9e
[ "MIT" ]
null
null
null
app/api/admin/__init__.py
WycliffeMuchumi/Stream-101-API
9892685c37ff6f3e1e9017bfa5321968a5255c9e
[ "MIT" ]
1
2021-06-04T09:45:05.000Z
2021-06-04T09:45:05.000Z
app/api/admin/__init__.py
muchumi/Stream-101-API
9892685c37ff6f3e1e9017bfa5321968a5255c9e
[ "MIT" ]
1
2021-06-04T09:43:58.000Z
2021-06-04T09:43:58.000Z
from flask import Blueprint """ Admin Blueprint """ blueprint = Blueprint( 'admin_blueprint', __name__, url_prefix = '/admin' ) from app.api.admin.views import admin
13.214286
37
0.675676
from flask import Blueprint blueprint = Blueprint( 'admin_blueprint', __name__, url_prefix = '/admin' ) from app.api.admin.views import admin
true
true
f7490b74d909203010c28f98f6bda1f10ca9f88a
13,657
py
Python
flink-ai-flow/lib/airflow/airflow/contrib/jobs/dagrun_event_manager.py
kwohting/flink-ai-extended
406b0d01c7400769f2d68e103ae59b159b06a71f
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
flink-ai-flow/lib/airflow/airflow/contrib/jobs/dagrun_event_manager.py
kwohting/flink-ai-extended
406b0d01c7400769f2d68e103ae59b159b06a71f
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
flink-ai-flow/lib/airflow/airflow/contrib/jobs/dagrun_event_manager.py
kwohting/flink-ai-extended
406b0d01c7400769f2d68e103ae59b159b06a71f
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
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...
42.281734
119
0.654243
import threading from concurrent.futures import Future from concurrent.futures.thread import ThreadPoolExecutor from queue import Queue, Empty from typing import Optional, Set, Dict, cast from notification_service.base_notification import BaseEvent from airflow.contrib.jobs.background_service import B...
true
true
f7490bf81c9bc3ae6dacb9cc0c3518ef3193c163
2,602
py
Python
pydl/conftest.py
jhennawi/pydl
3926aab6fd57c27e13d571156077de41343881c1
[ "BSD-3-Clause" ]
null
null
null
pydl/conftest.py
jhennawi/pydl
3926aab6fd57c27e13d571156077de41343881c1
[ "BSD-3-Clause" ]
null
null
null
pydl/conftest.py
jhennawi/pydl
3926aab6fd57c27e13d571156077de41343881c1
[ "BSD-3-Clause" ]
null
null
null
# This file is used to configure the behavior of pytest when using the Astropy # test infrastructure. from astropy.version import version as astropy_version if astropy_version < '3.0': # With older versions of Astropy, we actually need to import the pytest # plugins themselves in order to make them discoverabl...
40.030769
84
0.746733
from astropy.version import version as astropy_version if astropy_version < '3.0': from astropy.tests.pytest_plugins import * else: # not necessary to import them here, but we still need to import global # variables that are used for configuration. from astropy.tests.plugins.displ...
true
true
f7490d4792552583a1ed5528e747d2df7d821e7a
522
py
Python
tests/fake_packages/FakeApp/setup.py
huntcsg/plaster_pastedeploy
411db74fd5155061e7990b674458d856a2c543d9
[ "MIT" ]
null
null
null
tests/fake_packages/FakeApp/setup.py
huntcsg/plaster_pastedeploy
411db74fd5155061e7990b674458d856a2c543d9
[ "MIT" ]
null
null
null
tests/fake_packages/FakeApp/setup.py
huntcsg/plaster_pastedeploy
411db74fd5155061e7990b674458d856a2c543d9
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name="FakeApp", version="1.0", packages=find_packages(), entry_points={ 'paste.app_factory': """ basic_app=fakeapp.apps:make_basic_app other=fakeapp.apps:make_basic_app2 configed=fakeapp.configapps:SimpleApp.make_app ...
24.857143
54
0.609195
from setuptools import setup, find_packages setup( name="FakeApp", version="1.0", packages=find_packages(), entry_points={ 'paste.app_factory': """ basic_app=fakeapp.apps:make_basic_app other=fakeapp.apps:make_basic_app2 configed=fakeapp.configapps:SimpleApp.make_app ...
true
true
f7490e1fe1d0c8051803e187c805954ce4221a14
47,898
py
Python
tests/gclient_scm_test.py
superisaac/depot_tools
ea1884b651e69975e897b15cf2063f36317538a4
[ "BSD-3-Clause" ]
null
null
null
tests/gclient_scm_test.py
superisaac/depot_tools
ea1884b651e69975e897b15cf2063f36317538a4
[ "BSD-3-Clause" ]
null
null
null
tests/gclient_scm_test.py
superisaac/depot_tools
ea1884b651e69975e897b15cf2063f36317538a4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env vpython3 # Copyright (c) 2012 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. """Unit tests for gclient_scm.py.""" # pylint: disable=E1103 from __future__ import unicode_literals from subprocess import P...
35.771471
80
0.648086
from __future__ import unicode_literals from subprocess import Popen, PIPE, STDOUT import json import logging import os import re import sys import tempfile import unittest if sys.version_info.major == 2: from cStringIO import StringIO else: from io import StringIO sys.path.insert(0, os.path.dirname(os...
true
true
f7490f354598f97c817adf34d81b730bd50a827a
12,172
py
Python
localstack/config.py
BisratYalew/localstack
8c69fbe314fd69abc76371e8f9b7b0b49da24ded
[ "Apache-2.0" ]
1
2020-03-25T17:33:37.000Z
2020-03-25T17:33:37.000Z
localstack/config.py
BisratYalew/localstack
8c69fbe314fd69abc76371e8f9b7b0b49da24ded
[ "Apache-2.0" ]
null
null
null
localstack/config.py
BisratYalew/localstack
8c69fbe314fd69abc76371e8f9b7b0b49da24ded
[ "Apache-2.0" ]
null
null
null
import re import os import socket import logging import platform import tempfile import subprocess from os.path import expanduser import six from boto3 import Session from localstack.constants import ( DEFAULT_SERVICE_PORTS, LOCALHOST, DEFAULT_PORT_WEB_UI, TRUE_STRINGS, FALSE_STRINGS, DEFAULT_LAMBDA_CONTAINER_R...
39.519481
120
0.714427
import re import os import socket import logging import platform import tempfile import subprocess from os.path import expanduser import six from boto3 import Session from localstack.constants import ( DEFAULT_SERVICE_PORTS, LOCALHOST, DEFAULT_PORT_WEB_UI, TRUE_STRINGS, FALSE_STRINGS, DEFAULT_LAMBDA_CONTAINER_R...
true
true
f7490f8cfae22ab31bfdae744cc90bcc98a2fd1c
2,684
py
Python
tests/dataset/bdv/test_bdv.py
thhsieh00/utoolbox-core
e46704348d60985c205a16f41788d2c185e11fb6
[ "Apache-2.0" ]
3
2020-08-21T02:34:32.000Z
2021-04-06T06:56:46.000Z
tests/dataset/bdv/test_bdv.py
liuyenting/utoolbox-core
d1430967458204b99780c547eaca60d066490946
[ "Apache-2.0" ]
null
null
null
tests/dataset/bdv/test_bdv.py
liuyenting/utoolbox-core
d1430967458204b99780c547eaca60d066490946
[ "Apache-2.0" ]
null
null
null
import logging import os from pprint import pprint from shutil import rmtree import pandas as pd from dask.distributed import Client from prompt_toolkit.shortcuts import button_dialog from utoolbox.io import open_dataset from utoolbox.io.dataset import BigDataViewerDataset, TiledDatasetIterator logger = ...
30.5
87
0.621088
import logging import os from pprint import pprint from shutil import rmtree import pandas as pd from dask.distributed import Client from prompt_toolkit.shortcuts import button_dialog from utoolbox.io import open_dataset from utoolbox.io.dataset import BigDataViewerDataset, TiledDatasetIterator logger = ...
true
true
f7491103f4de3223deb966e7c67993f1497ee69b
15,271
py
Python
datasets.py
fepegar/resseg-ijcars
963e5548fb02c777038ef550c969149377071cfc
[ "MIT" ]
5
2021-02-23T03:31:32.000Z
2022-03-26T08:59:59.000Z
datasets.py
fepegar/resseg-ijcars
963e5548fb02c777038ef550c969149377071cfc
[ "MIT" ]
1
2022-03-28T12:12:08.000Z
2022-03-31T05:34:51.000Z
datasets.py
fepegar/resseg-ijcars
963e5548fb02c777038ef550c969149377071cfc
[ "MIT" ]
2
2021-02-23T03:31:33.000Z
2021-08-06T11:24:32.000Z
import hashlib from pathlib import Path import torch import pandas as pd import torchio as tio from tqdm import tqdm from resector import RandomResection from sklearn.model_selection import KFold from utils import sglob, get_stem class DataModule: def __init__( self, datasets_dir, ...
36.101655
118
0.66086
import hashlib from pathlib import Path import torch import pandas as pd import torchio as tio from tqdm import tqdm from resector import RandomResection from sklearn.model_selection import KFold from utils import sglob, get_stem class DataModule: def __init__( self, datasets_dir, ...
true
true
f749118fb7808910c4fc9e58c1737136a1ab13ca
8,779
py
Python
resources/dot_PyCharm/system/python_stubs/-762174762/PySide/QtGui/QTreeView.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
1
2020-04-20T02:27:20.000Z
2020-04-20T02:27:20.000Z
resources/dot_PyCharm/system/python_stubs/cache/8cdc475d469a13122bc4bc6c3ac1c215d93d5f120f5cc1ef33a8f3088ee54d8e/PySide/QtGui/QTreeView.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
null
null
null
resources/dot_PyCharm/system/python_stubs/cache/8cdc475d469a13122bc4bc6c3ac1c215d93d5f120f5cc1ef33a8f3088ee54d8e/PySide/QtGui/QTreeView.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
null
null
null
# encoding: utf-8 # module PySide.QtGui # from C:\Python27\lib\site-packages\PySide\QtGui.pyd # by generator 1.147 # no doc # imports import PySide.QtCore as __PySide_QtCore import Shiboken as __Shiboken from QAbstractItemView import QAbstractItemView class QTreeView(QAbstractItemView): # no doc def allColu...
28.228296
106
0.640506
import PySide.QtCore as __PySide_QtCore import Shiboken as __Shiboken from QAbstractItemView import QAbstractItemView class QTreeView(QAbstractItemView): def allColumnsShowFocus(self, *args, **kwargs): pass def autoExpandDelay(self, *args, **kwargs): pass def collapse(self...
true
true
f74911a71d5ad4437ee668dbca4a1ac0f37a2a0e
2,041
py
Python
.venv/lib/python3.7/site-packages/prompt_toolkit/contrib/regular_languages/validation.py
ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos
4acdbc423428fb2e0068720add69e7870c87929a
[ "Apache-2.0" ]
17
2020-06-10T23:33:11.000Z
2021-01-02T20:38:25.000Z
.venv/lib/python3.7/site-packages/prompt_toolkit/contrib/regular_languages/validation.py
ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos
4acdbc423428fb2e0068720add69e7870c87929a
[ "Apache-2.0" ]
24
2020-03-25T19:35:43.000Z
2022-02-10T11:46:50.000Z
.venv/lib/python3.7/site-packages/prompt_toolkit/contrib/regular_languages/validation.py
ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos
4acdbc423428fb2e0068720add69e7870c87929a
[ "Apache-2.0" ]
11
2019-01-21T17:51:48.000Z
2021-08-10T07:04:33.000Z
""" Validator for a regular language. """ from typing import Dict from prompt_toolkit.document import Document from prompt_toolkit.validation import ValidationError, Validator from .compiler import _CompiledGrammar __all__ = [ "GrammarValidator", ] class GrammarValidator(Validator): """ Validator which...
33.459016
87
0.609505
from typing import Dict from prompt_toolkit.document import Document from prompt_toolkit.validation import ValidationError, Validator from .compiler import _CompiledGrammar __all__ = [ "GrammarValidator", ] class GrammarValidator(Validator): def __init__( self, compiled_grammar: _CompiledGrammar, ...
true
true
f74911ff7be4b8723a8e7b646dbf7963fccfdaf0
5,732
py
Python
bindings/python/ensmallen_graph/datasets/networkrepository/opsahlpowergrid.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/networkrepository/opsahlpowergrid.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/networkrepository/opsahlpowergrid.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph opsahl-powergrid. The graph is automatically retrieved from the NetworkRepository repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime:...
32.022346
94
0.686671
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def OpsahlPowergrid( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/networkrepository", **additional_graph_kwargs: Dict ) -> EnsmallenGraph:...
true
true
f7491200ded9f69ce77625818b12c9f79275ffac
3,501
py
Python
django/contrib/gis/gdal/prototypes/srs.py
PirosB3/django
9b729ddd8f2040722971ccfb3b12f7d8162633d1
[ "BSD-3-Clause" ]
2
2016-09-27T09:30:19.000Z
2016-10-17T01:47:43.000Z
django/contrib/gis/gdal/prototypes/srs.py
PirosB3/django
9b729ddd8f2040722971ccfb3b12f7d8162633d1
[ "BSD-3-Clause" ]
10
2019-12-26T17:31:31.000Z
2022-03-21T22:17:33.000Z
django/contrib/gis/gdal/prototypes/srs.py
PirosB3/django
9b729ddd8f2040722971ccfb3b12f7d8162633d1
[ "BSD-3-Clause" ]
1
2020-10-01T08:23:34.000Z
2020-10-01T08:23:34.000Z
from ctypes import c_char_p, c_int, c_void_p, POINTER from django.contrib.gis.gdal.libgdal import lgdal, std_call from django.contrib.gis.gdal.prototypes.generation import (const_string_output, double_output, int_output, srs_output, string_output, void_output) ## Shortcut generation for routines with known parame...
47.310811
130
0.789489
from ctypes import c_char_p, c_int, c_void_p, POINTER from django.contrib.gis.gdal.libgdal import lgdal, std_call from django.contrib.gis.gdal.prototypes.generation import (const_string_output, double_output, int_output, srs_output, string_output, void_output) , POINTER(c_int)], errcheck=True) def units_func(f)...
true
true
f749130115c3085cf5561b57d5d6892b767eceee
69,059
py
Python
text/src/autogluon/text/text_prediction/mx/models.py
rxjx/autogluon
648c19b8b76a6d663a2a8b42b9f3463e60c63e2c
[ "Apache-2.0" ]
null
null
null
text/src/autogluon/text/text_prediction/mx/models.py
rxjx/autogluon
648c19b8b76a6d663a2a8b42b9f3463e60c63e2c
[ "Apache-2.0" ]
null
null
null
text/src/autogluon/text/text_prediction/mx/models.py
rxjx/autogluon
648c19b8b76a6d663a2a8b42b9f3463e60c63e2c
[ "Apache-2.0" ]
null
null
null
import numpy as np import scipy.special import os import math import logging import pandas as pd import warnings import time import json import pickle import functools import tqdm from typing import Tuple from autogluon.core.scheduler.scheduler_factory import scheduler_factory from autogluon.core.utils import set_logg...
45.704169
198
0.600125
import numpy as np import scipy.special import os import math import logging import pandas as pd import warnings import time import json import pickle import functools import tqdm from typing import Tuple from autogluon.core.scheduler.scheduler_factory import scheduler_factory from autogluon.core.utils import set_logg...
true
true
f74913568217f69ced12a5bafdcff5b583fec2ba
5,432
py
Python
db_worker.py
customr/retranslator
c5ccebe9784e4c804c48c27cffbab7a5d60311a2
[ "MIT" ]
null
null
null
db_worker.py
customr/retranslator
c5ccebe9784e4c804c48c27cffbab7a5d60311a2
[ "MIT" ]
null
null
null
db_worker.py
customr/retranslator
c5ccebe9784e4c804c48c27cffbab7a5d60311a2
[ "MIT" ]
null
null
null
import pymysql import time import os import socket import threading from time import sleep from copy import deepcopy from contextlib import closing from json import loads from queue import Queue from datetime import datetime from binascii import hexlify from src.retranslators import Wialon, EGTS, WialonIPS, GalileoSk...
29.68306
211
0.653166
import pymysql import time import os import socket import threading from time import sleep from copy import deepcopy from contextlib import closing from json import loads from queue import Queue from datetime import datetime from binascii import hexlify from src.retranslators import Wialon, EGTS, WialonIPS, GalileoSk...
true
true
f7491364ac84e44a87cb479b5551e325712ae014
16,445
py
Python
pypy/module/pypyjit/test_pypy_c/test_ffi.py
Qointum/pypy
c0ed88efbc135a75a535f4534ca1f3baf0bf39d8
[ "Apache-2.0", "OpenSSL" ]
null
null
null
pypy/module/pypyjit/test_pypy_c/test_ffi.py
Qointum/pypy
c0ed88efbc135a75a535f4534ca1f3baf0bf39d8
[ "Apache-2.0", "OpenSSL" ]
null
null
null
pypy/module/pypyjit/test_pypy_c/test_ffi.py
Qointum/pypy
c0ed88efbc135a75a535f4534ca1f3baf0bf39d8
[ "Apache-2.0", "OpenSSL" ]
null
null
null
import sys, py from pypy.module.pypyjit.test_pypy_c.test_00_model import BaseTestPyPyC class Test__ffi(BaseTestPyPyC): def test__ffi_call(self): from rpython.rlib.test.test_clibffi import get_libm_name def main(libm_name): try: from _rawffi.alt import CDLL, types ...
37.631579
117
0.522894
import sys, py from pypy.module.pypyjit.test_pypy_c.test_00_model import BaseTestPyPyC class Test__ffi(BaseTestPyPyC): def test__ffi_call(self): from rpython.rlib.test.test_clibffi import get_libm_name def main(libm_name): try: from _rawffi.alt import CDLL, types ...
true
true
f749154db0685f00145a372b55c4f47f72f52655
24,982
py
Python
python/tests/test_getitem.py
HDembinski/aghast
f3d45a6960033f48fb8f6b7e906cb36b9d9d8e95
[ "BSD-3-Clause" ]
18
2019-04-15T14:39:35.000Z
2021-12-21T15:01:02.000Z
python/tests/test_getitem.py
HDembinski/aghast
f3d45a6960033f48fb8f6b7e906cb36b9d9d8e95
[ "BSD-3-Clause" ]
27
2019-04-12T20:24:00.000Z
2021-12-03T08:51:56.000Z
python/tests/test_getitem.py
diana-hep/stagg
ed97e9abc870e729d300622253aa7e9c870f77ec
[ "BSD-3-Clause" ]
11
2019-04-15T14:41:00.000Z
2021-11-16T13:28:10.000Z
#!/usr/bin/env python # BSD 3-Clause License; see https://github.com/scikit-hep/aghast/blob/master/LICENSE import sys import unittest import numpy from aghast import * class Test(unittest.TestCase): def runTest(self): pass def test_getitem_twodim(self): a = Histogram( [Axis(In...
32.151866
115
0.376151
import sys import unittest import numpy from aghast import * class Test(unittest.TestCase): def runTest(self): pass def test_getitem_twodim(self): a = Histogram( [Axis(IntegerBinning(0, 3)), Axis(IntegerBinning(0, 2))], UnweightedCounts( Interpret...
true
true
f7491617103f0f3d95f104cfed0631924220cd1e
4,644
py
Python
corehq/apps/data_dictionary/models.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/data_dictionary/models.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/data_dictionary/models.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime from django.db import models from django.utils.translation import ugettext as _ from dimagi.utils.couch import CriticalSection from dimagi.utils.parsing import ISO_DATE_FORMAT from corehq.apps.case_importer import exceptions PROPERTY_TYPE_CHOICES = ( ('date', _('Date')), ('pla...
34.917293
100
0.650301
from datetime import datetime from django.db import models from django.utils.translation import ugettext as _ from dimagi.utils.couch import CriticalSection from dimagi.utils.parsing import ISO_DATE_FORMAT from corehq.apps.case_importer import exceptions PROPERTY_TYPE_CHOICES = ( ('date', _('Date')), ('pla...
true
true
f7491876fd727200c96f830157bcfab9d64d60ee
1,658
py
Python
Chapter06/tweep.py
carltyndall/Serverless-Design-Patterns-and-Best-Practices
c15f8b8d0023f40c8f8e49e5e43ce42408a4ca59
[ "MIT" ]
37
2017-11-13T14:22:43.000Z
2022-03-08T17:09:19.000Z
Chapter06/tweep.py
saibaldas/Serverless-Design-Patterns-and-Best-Practices
c15f8b8d0023f40c8f8e49e5e43ce42408a4ca59
[ "MIT" ]
4
2021-03-01T23:27:55.000Z
2022-03-08T22:51:30.000Z
Chapter06/tweep.py
carltyndall/Serverless-Design-Patterns-and-Best-Practices
c15f8b8d0023f40c8f8e49e5e43ce42408a4ca59
[ "MIT" ]
24
2018-04-13T09:08:12.000Z
2022-03-31T15:16:44.000Z
import os import tweepy from pprint import pprint as pp consumer_key = os.environ['TWITTER_CONSUMER_KEY'] consumer_secret = os.environ['TWITTER_CONSUMER_SECRET'] access_token = os.environ['TWITTER_ACCESS_TOKEN'] access_token_secret = os.environ['TWITTER_ACCESS_SECRET'] auth = tweepy.OAuthHandler(consumer_key, consum...
29.087719
93
0.650181
import os import tweepy from pprint import pprint as pp consumer_key = os.environ['TWITTER_CONSUMER_KEY'] consumer_secret = os.environ['TWITTER_CONSUMER_SECRET'] access_token = os.environ['TWITTER_ACCESS_TOKEN'] access_token_secret = os.environ['TWITTER_ACCESS_SECRET'] auth = tweepy.OAuthHandler(consumer_key, consum...
false
true
f74918b8270c4095a692ef14c09d678c0e4deff6
951
py
Python
pythia/pyre/parsing/locators/SimpleFileLocator.py
willic3/pythia
2657b95a0c07fd3c914ab6b5f7ec89a8edba004c
[ "BSD-3-Clause" ]
1
2015-11-30T08:01:39.000Z
2015-11-30T08:01:39.000Z
pythia/pyre/parsing/locators/SimpleFileLocator.py
willic3/pythia
2657b95a0c07fd3c914ab6b5f7ec89a8edba004c
[ "BSD-3-Clause" ]
27
2018-05-24T18:31:25.000Z
2021-10-16T03:57:52.000Z
pythia/pyre/parsing/locators/SimpleFileLocator.py
willic3/pythia
2657b95a0c07fd3c914ab6b5f7ec89a8edba004c
[ "BSD-3-Clause" ]
7
2019-07-19T02:30:56.000Z
2021-06-02T22:00:01.000Z
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~...
19.8125
80
0.460568
class SimpleFileLocator(object): def __init__(self, source): self.source = source return def __str__(self): return "{file=%r}" % (self.source) def __getstate__(self): return dict(source = self.source) def __setstate__(self, dict): self.s...
true
true