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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f7469fb8a042bc51c1b58abd3e3454c5eedc909d
8,377
py
Python
shmup_detect/fhog.py
KyGao/pygame_tracker
c1c4cc4a74c478e6655aa02aa4950d2ab97f6eae
[ "MIT" ]
1
2021-05-22T05:08:19.000Z
2021-05-22T05:08:19.000Z
shmup_detect/fhog.py
KyGao/pygame-tracker
c1c4cc4a74c478e6655aa02aa4950d2ab97f6eae
[ "MIT" ]
null
null
null
shmup_detect/fhog.py
KyGao/pygame-tracker
c1c4cc4a74c478e6655aa02aa4950d2ab97f6eae
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -* import numpy as np import cv2 from numba import njit import time NUM_SECTOR = 9 FLT_EPSILON = 1e-07 @njit def func1(dx, dy, boundary_x, boundary_y, height, width, numChannels): r = np.zeros((height, width), dtype=np.float32) alfa = np.zeros((height, width, 2), np.int32) for j in...
36.107759
157
0.523576
import numpy as np import cv2 from numba import njit import time NUM_SECTOR = 9 FLT_EPSILON = 1e-07 @njit def func1(dx, dy, boundary_x, boundary_y, height, width, numChannels): r = np.zeros((height, width), dtype=np.float32) alfa = np.zeros((height, width, 2), np.int32) for j in range(1, height-1): ...
true
true
f7469fed2a07c002413bc00809fce9038ea48e4e
3,366
py
Python
COLREGsBasedRiskDomain/RiskSubjection.py
wylloong/TDMOA-USV
3a8690559f6df76f0ed457a89dcec2ec268db34f
[ "MIT" ]
10
2020-12-04T02:28:11.000Z
2022-02-15T14:04:22.000Z
COLREGsBasedRiskDomain/RiskSubjection.py
wylloong/TDMOA-USV
3a8690559f6df76f0ed457a89dcec2ec268db34f
[ "MIT" ]
null
null
null
COLREGsBasedRiskDomain/RiskSubjection.py
wylloong/TDMOA-USV
3a8690559f6df76f0ed457a89dcec2ec268db34f
[ "MIT" ]
2
2020-11-21T18:20:02.000Z
2021-05-29T08:18:21.000Z
# -*- coding: utf-8 -*- import math from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np import GeoCommonBase as CoordinateBase # 危险隶属度函数,障碍物周围隶属度函数随着方向和速度逐渐变小 # 改进:隶属度范围和速度大小有关 def riskSubjection(boatPnt,currPnt,boatVelo,boatOrien,evaluTime,impactFactor): #考虑...
37.4
161
0.687463
import math from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np import GeoCommonBase as CoordinateBase def riskSubjection(boatPnt,currPnt,boatVelo,boatOrien,evaluTime,impactFactor): evaluDistance=boatVelo*evaluTime realDistance=CoordinateBase.D...
true
true
f746a00e88d506f9017cf3aaab378ebccb96a50d
8,847
py
Python
intersight/model/niatelemetry_syslog_remote_dest_list_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/niatelemetry_syslog_remote_dest_list_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/niatelemetry_syslog_remote_dest_list_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
50.267045
1,678
0.644399
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def la...
true
true
f746a1973297f706a0e5c6fe9b63241697ed8358
11,567
py
Python
workspace_tools/toolchains/gcc.py
heldercs/ProjectMbed
c41ed5352face550df4bf5bed89672e1955d6599
[ "Apache-2.0" ]
null
null
null
workspace_tools/toolchains/gcc.py
heldercs/ProjectMbed
c41ed5352face550df4bf5bed89672e1955d6599
[ "Apache-2.0" ]
null
null
null
workspace_tools/toolchains/gcc.py
heldercs/ProjectMbed
c41ed5352face550df4bf5bed89672e1955d6599
[ "Apache-2.0" ]
null
null
null
""" mbed SDK Copyright (c) 2011-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
43.980989
241
0.594882
import re from os.path import join, basename, splitext from workspace_tools.toolchains import mbedToolchain from workspace_tools.settings import GCC_ARM_PATH, GCC_CR_PATH, GCC_CS_PATH, CW_EWL_PATH, CW_GCC_PATH from workspace_tools.settings import GOANNA_PATH from workspace_tools.hooks import hook_tool class GCC(mbedT...
true
true
f746a29c9b3ff34c4e3afd3122d2d172bb4e1948
6,531
py
Python
test_libs/pyspec/eth2spec/utils/ssz/test_ssz_typing.py
prestonvanloon/eth2.0-specs
a63de3dc374148fe8adacd8718f67f8c7ba54f2e
[ "CC0-1.0" ]
null
null
null
test_libs/pyspec/eth2spec/utils/ssz/test_ssz_typing.py
prestonvanloon/eth2.0-specs
a63de3dc374148fe8adacd8718f67f8c7ba54f2e
[ "CC0-1.0" ]
null
null
null
test_libs/pyspec/eth2spec/utils/ssz/test_ssz_typing.py
prestonvanloon/eth2.0-specs
a63de3dc374148fe8adacd8718f67f8c7ba54f2e
[ "CC0-1.0" ]
1
2021-08-15T03:06:19.000Z
2021-08-15T03:06:19.000Z
from .ssz_typing import ( SSZValue, SSZType, BasicValue, BasicType, Series, ElementsType, Elements, bit, boolean, Container, List, Vector, Bytes, BytesN, byte, uint, uint8, uint16, uint32, uint64, uint128, uint256, Bytes32, Bytes48 ) def expect_value_error(fn, msg): try: fn() raise...
27.910256
108
0.608636
from .ssz_typing import ( SSZValue, SSZType, BasicValue, BasicType, Series, ElementsType, Elements, bit, boolean, Container, List, Vector, Bytes, BytesN, byte, uint, uint8, uint16, uint32, uint64, uint128, uint256, Bytes32, Bytes48 ) def expect_value_error(fn, msg): try: fn() raise...
true
true
f746a33e67fa17c611e9ebd340b3d36dae158aa9
2,368
py
Python
src/main/python/reldata/vocab/vocab_element.py
phohenecker/rel-data
1664336442aaadd0828a275c5b6e13284b6da824
[ "BSD-2-Clause" ]
1
2020-03-01T22:48:17.000Z
2020-03-01T22:48:17.000Z
src/main/python/reldata/vocab/vocab_element.py
phohenecker/rel-data
1664336442aaadd0828a275c5b6e13284b6da824
[ "BSD-2-Clause" ]
1
2020-03-03T03:23:45.000Z
2020-03-03T23:23:42.000Z
src/main/python/reldata/vocab/vocab_element.py
phohenecker/rel-data
1664336442aaadd0828a275c5b6e13284b6da824
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import abc __author__ = "Patrick Hohenecker" __copyright__ = ( "Copyright (c) 2017, Patrick Hohenecker\n" "All rights reserved.\n" "\n" "Redistribution and use in source and binary forms, with or without\n" "modification, are permitted provided that th...
42.285714
114
0.67652
import abc __author__ = "Patrick Hohenecker" __copyright__ = ( "Copyright (c) 2017, Patrick Hohenecker\n" "All rights reserved.\n" "\n" "Redistribution and use in source and binary forms, with or without\n" "modification, are permitted provided that the following conditions ...
true
true
f746a39d24d65982089e7e3a38c2972fadbe2fb2
1,482
py
Python
tasks.py
tejesh95/cautious-octo-goggles
772f2049c4e59d830ffc01463b3afce3f97c769a
[ "Apache-2.0" ]
null
null
null
tasks.py
tejesh95/cautious-octo-goggles
772f2049c4e59d830ffc01463b3afce3f97c769a
[ "Apache-2.0" ]
null
null
null
tasks.py
tejesh95/cautious-octo-goggles
772f2049c4e59d830ffc01463b3afce3f97c769a
[ "Apache-2.0" ]
null
null
null
# dependencies # pydrive # redis # celery import urllib2 import csv import json from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from celery import Celery from celery.decorators import periodic_task from celery.utils.log import get_task_logger from celery.task.schedules import crontab app = ...
26
101
0.659919
import urllib2 import csv import json from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from celery import Celery from celery.decorators import periodic_task from celery.utils.log import get_task_logger from celery.task.schedules import crontab app = Celery('tasks', broker='redis://localh...
true
true
f746a58bed77b6892283a87b31b1998d87dfe51f
100
py
Python
kbdtest/__init__.py
Ruunyox/kbdtest
b7c38907cb1ea4e89a7d746d7ea93e34278dbc66
[ "MIT" ]
12
2021-08-15T04:38:25.000Z
2021-08-16T18:17:25.000Z
kbdtest/__init__.py
Ruunyox/kbdtest
b7c38907cb1ea4e89a7d746d7ea93e34278dbc66
[ "MIT" ]
null
null
null
kbdtest/__init__.py
Ruunyox/kbdtest
b7c38907cb1ea4e89a7d746d7ea93e34278dbc66
[ "MIT" ]
2
2021-08-15T09:29:43.000Z
2021-11-17T05:41:41.000Z
from .tui import curses_init, term_resize, KeyboardDisplay from .interface import KeyboardInterface
33.333333
58
0.86
from .tui import curses_init, term_resize, KeyboardDisplay from .interface import KeyboardInterface
true
true
f746a5dff2265c60ade5e2428ea240bbd6464f69
9,795
py
Python
projects/bootloader/scripts/can_datagram.py
Citrusboa/firmware_xiv
4379cefae900fd67bd14d930da6b8acfce625176
[ "MIT" ]
null
null
null
projects/bootloader/scripts/can_datagram.py
Citrusboa/firmware_xiv
4379cefae900fd67bd14d930da6b8acfce625176
[ "MIT" ]
null
null
null
projects/bootloader/scripts/can_datagram.py
Citrusboa/firmware_xiv
4379cefae900fd67bd14d930da6b8acfce625176
[ "MIT" ]
null
null
null
# pylint: skip-file """This client script handles datagram protocol communication between devices on the CAN.""" import zlib import can DEFAULT_CHANNEL = "can0" PROT_VER = 1 CAN_BITRATE = 500000 MESSAGE_SIZE = 8 HEADER_SIZE = 6 MIN_BYTEARRAY_SIZE = 9 DATA_SIZE_SIZE = 2 PROTOCOL_VERSION_OFFSET = 0 CRC_32_OFFSET = 1 ...
34.611307
100
0.629199
import zlib import can DEFAULT_CHANNEL = "can0" PROT_VER = 1 CAN_BITRATE = 500000 MESSAGE_SIZE = 8 HEADER_SIZE = 6 MIN_BYTEARRAY_SIZE = 9 DATA_SIZE_SIZE = 2 PROTOCOL_VERSION_OFFSET = 0 CRC_32_OFFSET = 1 DATAGRAM_TYPE_OFFSET = 5 NUM_NODE_ID_OFFSET = 6 NODE_ID_OFFSET = 7 CAN_START_ARBITRATION_ID = 0b00000010000 CAN...
true
true
f746a68f81c96e38ad9eb71b5b3294a844532d58
2,845
py
Python
services/datalad/datalad_service/handlers/snapshots.py
build3/openneuro
ae8f6edbab243703b38cefd729629c1741eb3839
[ "MIT" ]
null
null
null
services/datalad/datalad_service/handlers/snapshots.py
build3/openneuro
ae8f6edbab243703b38cefd729629c1741eb3839
[ "MIT" ]
null
null
null
services/datalad/datalad_service/handlers/snapshots.py
build3/openneuro
ae8f6edbab243703b38cefd729629c1741eb3839
[ "MIT" ]
null
null
null
import os import logging import gevent import falcon from datalad_service.tasks.dataset import create_snapshot from datalad_service.tasks.snapshots import get_snapshot, get_snapshots from datalad_service.tasks.files import get_files from datalad_service.tasks.publish import publish_snapshot, monitor_remote_configs fr...
36.012658
85
0.60703
import os import logging import gevent import falcon from datalad_service.tasks.dataset import create_snapshot from datalad_service.tasks.snapshots import get_snapshot, get_snapshots from datalad_service.tasks.files import get_files from datalad_service.tasks.publish import publish_snapshot, monitor_remote_configs fr...
true
true
f746a7c2a7ee6b3e6b99232fb4da444e2efb80bd
7,229
py
Python
train_model_LSTM.py
nchlis/image_captioning
e1ac6ae9ed9b398417a91563f1cfe316705c8e58
[ "MIT" ]
4
2019-07-07T12:19:53.000Z
2020-09-10T13:42:49.000Z
train_model_LSTM.py
nchlis/image_captioning
e1ac6ae9ed9b398417a91563f1cfe316705c8e58
[ "MIT" ]
1
2019-05-26T18:47:27.000Z
2019-05-27T11:55:00.000Z
train_model_LSTM.py
nchlis/image_captioning
e1ac6ae9ed9b398417a91563f1cfe316705c8e58
[ "MIT" ]
1
2021-12-24T06:34:52.000Z
2021-12-24T06:34:52.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu May 3 19:22:59 2018 @author: nikos """ import os import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.io import loadmat from skimage.transform import rescale, resize, downscale_local_mean from lmfit.models import GaussianM...
34.42381
111
0.720017
import os import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.io import loadmat from skimage.transform import rescale, resize, downscale_local_mean from lmfit.models import GaussianModel, ConstantModel from keras.preprocessing import image from keras.applications.resnet50 import prepro...
true
true
f746a7defc1bfce38920e696c7413563e497ec45
4,314
py
Python
tests/core/indexes/test_base.py
cda-group/baloo
0d442117c2a919b177e0a96024cbdc82762cb646
[ "BSD-3-Clause" ]
11
2018-12-16T00:19:39.000Z
2021-01-06T04:56:02.000Z
tests/core/indexes/test_base.py
monner/baloo
f6e05e35b73a75e8a300754c6bdc575e5f2d53b9
[ "BSD-3-Clause" ]
6
2019-02-21T23:22:14.000Z
2021-06-01T22:39:32.000Z
tests/core/indexes/test_base.py
monner/baloo
f6e05e35b73a75e8a300754c6bdc575e5f2d53b9
[ "BSD-3-Clause" ]
6
2019-02-12T14:30:43.000Z
2020-03-15T17:17:56.000Z
import numpy as np import pytest from baloo import Index def assert_index_equal(actual, expected, sort=False): actual = actual.evaluate() expected = expected.evaluate() actual_values = actual.values expected_values = expected.values if sort: actual_values = np.sort(actual_values) ...
31.035971
80
0.617524
import numpy as np import pytest from baloo import Index def assert_index_equal(actual, expected, sort=False): actual = actual.evaluate() expected = expected.evaluate() actual_values = actual.values expected_values = expected.values if sort: actual_values = np.sort(actual_values) ...
true
true
f746a8aa2279c04ae74e6d5c98d5a44598f6003d
7,705
py
Python
wnet/utils/soft_n_cut_loss.py
EdgarLefevre/wnet_pytorch
ba8fa5465f72351f349c18fe7df20a60a7c7f3c5
[ "MIT" ]
1
2022-01-07T12:38:40.000Z
2022-01-07T12:38:40.000Z
wnet/utils/soft_n_cut_loss.py
EdgarLefevre/wnet_pytorch
ba8fa5465f72351f349c18fe7df20a60a7c7f3c5
[ "MIT" ]
null
null
null
wnet/utils/soft_n_cut_loss.py
EdgarLefevre/wnet_pytorch
ba8fa5465f72351f349c18fe7df20a60a7c7f3c5
[ "MIT" ]
1
2021-12-13T09:49:26.000Z
2021-12-13T09:49:26.000Z
# Some methods in this file ported to Pytorch from https://github.com/Ashish77IITM/W-Net/ import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from scipy.stats import norm from torch import Tensor # The weight matrix w is a measure of the weight between each pixel and # every other pi...
37.769608
116
0.656846
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from scipy.stats import norm from torch import Tensor def soft_n_cut_loss(inputs, segmentations): loss = 0 for i in range(inputs.shape[0]): flatten_image = torch.mean(inputs[i], dim=0) flatten...
true
true
f746a98f1c3278abc5805860dcccef5f56f5c3d2
10,265
py
Python
quad.py
LCOGT/image_align
12ddfb924301039a3cba5007106f6f8ff27f925e
[ "MIT" ]
null
null
null
quad.py
LCOGT/image_align
12ddfb924301039a3cba5007106f6f8ff27f925e
[ "MIT" ]
null
null
null
quad.py
LCOGT/image_align
12ddfb924301039a3cba5007106f6f8ff27f925e
[ "MIT" ]
null
null
null
import numpy as np import os from astropy.io import fits import operator import itertools class ImgCat: """ Represent an individual image and its associated catalog, starlist, quads etc. """ def __init__(self, filepath, hdu=0, cat=None): """ :param filepath: Path to the FITS file, or ...
32.178683
158
0.553142
import numpy as np import os from astropy.io import fits import operator import itertools class ImgCat: def __init__(self, filepath, hdu=0, cat=None): self.filepath = filepath (imgdir, filename) = os.path.split(filepath) (common, ext) = os.path.splitext(filename) self.name = commo...
true
true
f746ab401b1336506d00403cc0ce7f323fabbffa
22,274
py
Python
src/olympia/promoted/tests/test_admin.py
dbxnr/addons-server
bb3e2807009de36cacd5a36692e4603ba900fbd0
[ "BSD-3-Clause" ]
null
null
null
src/olympia/promoted/tests/test_admin.py
dbxnr/addons-server
bb3e2807009de36cacd5a36692e4603ba900fbd0
[ "BSD-3-Clause" ]
null
null
null
src/olympia/promoted/tests/test_admin.py
dbxnr/addons-server
bb3e2807009de36cacd5a36692e4603ba900fbd0
[ "BSD-3-Clause" ]
null
null
null
from olympia import amo from olympia.amo.tests import addon_factory, TestCase, user_factory, version_factory from olympia.amo.tests.test_helpers import get_uploaded_file from olympia.amo.urlresolvers import django_reverse, reverse from olympia.constants.promoted import ( LINE, RECOMMENDED, VERIFIED, NOT...
40.794872
88
0.602317
from olympia import amo from olympia.amo.tests import addon_factory, TestCase, user_factory, version_factory from olympia.amo.tests.test_helpers import get_uploaded_file from olympia.amo.urlresolvers import django_reverse, reverse from olympia.constants.promoted import ( LINE, RECOMMENDED, VERIFIED, NOT...
true
true
f746acc4b73b98e3456a6bd16a84e8c6d5bb60d8
7,850
py
Python
authors/apps/articles/tests/test_articles.py
andela-gad/Ah-backend-aquaman
29cf560063171c2bb8c8aed1ff36436acbc47bc9
[ "BSD-3-Clause" ]
3
2021-02-20T15:21:33.000Z
2021-08-20T10:23:08.000Z
authors/apps/articles/tests/test_articles.py
andela-gad/Ah-backend-aquaman
29cf560063171c2bb8c8aed1ff36436acbc47bc9
[ "BSD-3-Clause" ]
130
2019-11-07T02:35:18.000Z
2021-07-30T02:17:11.000Z
authors/apps/articles/tests/test_articles.py
CryceTruly/Ah-backend-aquaman
29cf560063171c2bb8c8aed1ff36436acbc47bc9
[ "BSD-3-Clause" ]
6
2019-06-29T12:09:37.000Z
2020-03-06T07:02:55.000Z
from django.urls import reverse from rest_framework import status from authors.apps.articles.tests.base_class import ArticlesBaseTest from .test_data import valid_article from ..models import Article class TestArticle(ArticlesBaseTest): def test_create_article(self): """ Tests method tests wethe...
43.611111
77
0.623312
from django.urls import reverse from rest_framework import status from authors.apps.articles.tests.base_class import ArticlesBaseTest from .test_data import valid_article from ..models import Article class TestArticle(ArticlesBaseTest): def test_create_article(self): self.register_and_login_user() ...
true
true
f746ace8c83efa32579defc563f0a90dd5f92b48
628
py
Python
pip_services_runtime/ITiming.py
pip-services-archive/pip-services-runtime-python
70eca1ffc44bfdc45c9c65b0ee347fa578368849
[ "MIT" ]
null
null
null
pip_services_runtime/ITiming.py
pip-services-archive/pip-services-runtime-python
70eca1ffc44bfdc45c9c65b0ee347fa578368849
[ "MIT" ]
null
null
null
pip_services_runtime/ITiming.py
pip-services-archive/pip-services-runtime-python
70eca1ffc44bfdc45c9c65b0ee347fa578368849
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ pip_services_runtime.ITiming ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Callback interface to complete measuring time interval. :copyright: Digital Living Software Corp. 2015-2016, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ class ITimi...
25.12
86
0.609873
class ITiming(object): def end_timing(self): pass
true
true
f746acf3c9158c5cbd57c4ca61100529f745282a
33,552
py
Python
src/sage/coding/linear_rank_metric.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
10
2018-06-01T21:54:53.000Z
2022-03-14T20:11:34.000Z
src/sage/coding/linear_rank_metric.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
2
2021-04-02T20:43:29.000Z
2021-04-05T23:38:58.000Z
src/sage/coding/linear_rank_metric.py
dimpase/sage
468f23815ade42a2192b0a9cd378de8fdc594dcd
[ "BSL-1.0" ]
15
2020-07-23T10:46:25.000Z
2022-01-25T15:37:24.000Z
# -*- coding: utf-8 -*- r""" Generic structures for linear codes over the rank metric Rank Metric =========== In coding theory, the most common metric is the Hamming metric, where distance between two codewords is given by the number of positions in which they differ. An alternative to this is the rank metric. Take ...
37.488268
168
0.601007
from sage.categories.fields import Fields from sage.matrix.constructor import Matrix from sage.structure.element import is_Matrix, is_Vector from sage.modules.free_module_element import vector from sage.rings.infinity import Infinity from .linear_code_no_metric import AbstractLinearCodeNoMetric from .linea...
true
true
f746add4901dcd71ca73e80cb3e867174b19473a
3,168
py
Python
eshop_account/forms.py
mahdikhaligh/store
ed1eb1e76af977d34bbfb01ee5e3ed3d54eff928
[ "Apache-2.0" ]
null
null
null
eshop_account/forms.py
mahdikhaligh/store
ed1eb1e76af977d34bbfb01ee5e3ed3d54eff928
[ "Apache-2.0" ]
null
null
null
eshop_account/forms.py
mahdikhaligh/store
ed1eb1e76af977d34bbfb01ee5e3ed3d54eff928
[ "Apache-2.0" ]
null
null
null
from django import forms from django.contrib.auth.models import User from django.core import validators class LoginForm(forms.Form): username = forms.CharField( widget=forms.TextInput(attrs={'placeholder': 'pls enter your username'}), label='username' ) password = forms.CharField( ...
34.434783
97
0.63447
from django import forms from django.contrib.auth.models import User from django.core import validators class LoginForm(forms.Form): username = forms.CharField( widget=forms.TextInput(attrs={'placeholder': 'pls enter your username'}), label='username' ) password = forms.CharField( ...
true
true
f746ae33440e4dad3cba783fd1b3382adf9f2a1f
1,508
py
Python
spinup/algos/tf1/td3/core.py
ANCL/QuadPPO
b7ed0574467bd321f4259175621a12ff7aeb7d12
[ "MIT" ]
6,983
2018-11-08T08:40:45.000Z
2022-03-31T11:53:44.000Z
spinup/algos/tf1/td3/core.py
ANCL/QuadPPO
b7ed0574467bd321f4259175621a12ff7aeb7d12
[ "MIT" ]
300
2018-11-08T20:53:05.000Z
2022-03-30T07:14:28.000Z
spinup/algos/tf1/td3/core.py
ANCL/QuadPPO
b7ed0574467bd321f4259175621a12ff7aeb7d12
[ "MIT" ]
1,880
2018-11-08T18:12:48.000Z
2022-03-31T10:26:24.000Z
import numpy as np import tensorflow as tf def placeholder(dim=None): return tf.placeholder(dtype=tf.float32, shape=(None,dim) if dim else (None,)) def placeholders(*args): return [placeholder(dim) for dim in args] def mlp(x, hidden_sizes=(32,), activation=tf.tanh, output_activation=None): for h in hidd...
38.666667
109
0.671751
import numpy as np import tensorflow as tf def placeholder(dim=None): return tf.placeholder(dtype=tf.float32, shape=(None,dim) if dim else (None,)) def placeholders(*args): return [placeholder(dim) for dim in args] def mlp(x, hidden_sizes=(32,), activation=tf.tanh, output_activation=None): for h in hidd...
true
true
f746ae92a2cda957c4f054def1ab066ee7675580
1,931
py
Python
tabular/src/autogluon/tabular/utils/features/generators/drop_unique.py
mseeger/autogluon-1
e8d82363ce07fd8e3087bcdd2d71c6f6bd8fd7a0
[ "Apache-2.0" ]
1
2020-03-20T08:01:35.000Z
2020-03-20T08:01:35.000Z
tabular/src/autogluon/tabular/utils/features/generators/drop_unique.py
mseeger/autogluon-1
e8d82363ce07fd8e3087bcdd2d71c6f6bd8fd7a0
[ "Apache-2.0" ]
null
null
null
tabular/src/autogluon/tabular/utils/features/generators/drop_unique.py
mseeger/autogluon-1
e8d82363ce07fd8e3087bcdd2d71c6f6bd8fd7a0
[ "Apache-2.0" ]
2
2021-02-13T04:41:33.000Z
2021-07-10T07:14:59.000Z
import logging from pandas import DataFrame from .abstract import AbstractFeatureGenerator from ..feature_metadata import FeatureMetadata, R_CATEGORY, R_OBJECT logger = logging.getLogger(__name__) # TODO: Not necessary to exist after fitting, can just update outer context feature_out/feature_in and then delete thi...
41.085106
159
0.721906
import logging from pandas import DataFrame from .abstract import AbstractFeatureGenerator from ..feature_metadata import FeatureMetadata, R_CATEGORY, R_OBJECT logger = logging.getLogger(__name__) class DropUniqueFeatureGenerator(AbstractFeatureGenerator): def __init__(self, max_unique_ratio=0.99, **kwargs): ...
true
true
f746aee8473f35c5e5e0d4620781939cd0abb7cf
883
py
Python
tests/test_plotters/test_styles.py
spectrochempy/spectrochempy
829b290f465e630078785e303dbab197cd78b815
[ "Apache-2.0", "CECILL-B", "BSD-3-Clause" ]
44
2020-05-14T01:56:40.000Z
2022-03-23T11:16:30.000Z
tests/test_plotters/test_styles.py
spectrochempy/spectrochempy
829b290f465e630078785e303dbab197cd78b815
[ "Apache-2.0", "CECILL-B", "BSD-3-Clause" ]
210
2020-05-22T17:33:22.000Z
2022-03-20T16:50:30.000Z
tests/test_plotters/test_styles.py
spectrochempy/spectrochempy
829b290f465e630078785e303dbab197cd78b815
[ "Apache-2.0", "CECILL-B", "BSD-3-Clause" ]
9
2020-05-16T15:36:02.000Z
2022-03-23T11:16:56.000Z
# -*- coding: utf-8 -*- # ====================================================================================================================== # Copyright (©) 2015-2022 LCS - Laboratoire Catalyse et Spectrochimie, Caen, France. = # CeCILL-B FREE SOFTWARE LICENSE AGREEMENT - See ful...
38.391304
120
0.454134
import pytest from spectrochempy import preferences, plt, os prefs = preferences styles = ["poster", "talk", "scpy", "sans", "serif", "grayscale", "notebook", "paper"] @pytest.mark.parametrize("style", styles) def test_styles(style): try: plt.style.use(style) except OSError: plt.styl...
true
true
f746af6fcfd85dae32b69f9b7617b638bdf3ea62
4,433
py
Python
tests/svm_test.py
QuanZhang-William/mythril-classic
f72387f749a142d8a4e6d1586365d6e9e96a2fed
[ "MIT" ]
6
2021-02-13T05:03:32.000Z
2021-09-19T14:57:58.000Z
tests/svm_test.py
cryptobarbossa/mythril-classic
5dd544d301238db2bc536d7cee69b96e9a15e9c4
[ "MIT" ]
null
null
null
tests/svm_test.py
cryptobarbossa/mythril-classic
5dd544d301238db2bc536d7cee69b96e9a15e9c4
[ "MIT" ]
2
2020-05-26T15:03:20.000Z
2021-07-29T09:09:05.000Z
import json from mythril.analysis.security import get_detection_module_hooks from mythril.analysis.symbolic import SymExecWrapper from mythril.analysis.callgraph import generate_graph from mythril.ethereum.evmcontract import EVMContract from mythril.solidity.soliditycontract import SolidityContract from mythril.mythril...
36.04065
281
0.648996
import json from mythril.analysis.security import get_detection_module_hooks from mythril.analysis.symbolic import SymExecWrapper from mythril.analysis.callgraph import generate_graph from mythril.ethereum.evmcontract import EVMContract from mythril.solidity.soliditycontract import SolidityContract from mythril.mythril...
true
true
f746afb10af17c592a0f51fcb687870bef119b00
6,792
py
Python
blueoil/cmd/convert.py
yasumura-lm/blueoil
2149f97862e9a0684f816cc27f16d461b8dcc3ad
[ "Apache-2.0" ]
null
null
null
blueoil/cmd/convert.py
yasumura-lm/blueoil
2149f97862e9a0684f816cc27f16d461b8dcc3ad
[ "Apache-2.0" ]
null
null
null
blueoil/cmd/convert.py
yasumura-lm/blueoil
2149f97862e9a0684f816cc27f16d461b8dcc3ad
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018 The Blueoil Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
31.155963
109
0.669317
import os import shutil import subprocess from executor.export import run as run_export from scripts.generate_project import run as run_generate_project def create_output_directory(output_root_dir, output_template_dir=None): base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ...
true
true
f746afe7bab596101cfd5f940012ebf667197801
1,234
py
Python
nox/_typing.py
Spectre5/nox
8261d2ad0a8e3d720c093c30ac56488f53605f85
[ "Apache-2.0" ]
700
2018-05-13T11:35:04.000Z
2022-03-19T12:58:56.000Z
nox/_typing.py
Spectre5/nox
8261d2ad0a8e3d720c093c30ac56488f53605f85
[ "Apache-2.0" ]
427
2018-05-12T14:18:03.000Z
2022-03-10T20:46:05.000Z
nox/_typing.py
Spectre5/nox
8261d2ad0a8e3d720c093c30ac56488f53605f85
[ "Apache-2.0" ]
126
2018-08-22T21:41:02.000Z
2022-03-19T09:15:57.000Z
# Copyright 2020 Alethea Katherine Flowers # # 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...
27.422222
74
0.734198
__all__ = ["TYPE_CHECKING", "ClassVar", "NoReturn", "Python"] import typing as _typing try: from typing import TYPE_CHECKING except ImportError: try: from typing_extensions import TYPE_CHECKING except ImportError: TYPE_CHECKING = False try: from typing import NoReturn ex...
true
true
f746b0716a0264b102a1cdb10e6cf8496ba322b7
488
py
Python
ml3d/utils/__init__.py
krshrimali/Open3D-ML
e6352ee84d38a4b90c71dd7f376f5570fe849537
[ "MIT" ]
447
2020-10-14T23:16:41.000Z
2021-07-27T06:57:45.000Z
ml3d/utils/__init__.py
krshrimali/Open3D-ML
e6352ee84d38a4b90c71dd7f376f5570fe849537
[ "MIT" ]
179
2021-07-27T15:32:33.000Z
2022-03-30T14:32:53.000Z
ml3d/utils/__init__.py
krshrimali/Open3D-ML
e6352ee84d38a4b90c71dd7f376f5570fe849537
[ "MIT" ]
92
2021-07-28T13:50:52.000Z
2022-03-30T09:24:33.000Z
"""Utils for 3D ML.""" from .config import Config from .log import LogRecord, get_runid, code2md from .builder import (MODEL, PIPELINE, DATASET, SAMPLER, get_module, convert_framework_name, convert_device_name) from .dataset_helper import get_hash, make_dir, Cache __all__ = [ 'Config', 'make...
34.857143
78
0.69877
from .config import Config from .log import LogRecord, get_runid, code2md from .builder import (MODEL, PIPELINE, DATASET, SAMPLER, get_module, convert_framework_name, convert_device_name) from .dataset_helper import get_hash, make_dir, Cache __all__ = [ 'Config', 'make_dir', 'LogRecord', 'MO...
true
true
f746b15fcc46d6cf344f68d57cccb5896e523f6a
3,994
py
Python
benchmark/startQiskit1126.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit1126.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit1126.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=5 # total number=42 import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy as np import networkx as ...
31.448819
82
0.616174
import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy as np import networkx as nx def build_oracle(n: int, f) -...
true
true
f746b449beaffa6e2367aee4f16fcb7c47023d51
1,078
py
Python
validator/integer.py
honmaple/validator
c8fd3f7637418c7ccb846d1a0a4f8247f69e6bbe
[ "BSD-3-Clause" ]
null
null
null
validator/integer.py
honmaple/validator
c8fd3f7637418c7ccb846d1a0a4f8247f69e6bbe
[ "BSD-3-Clause" ]
null
null
null
validator/integer.py
honmaple/validator
c8fd3f7637418c7ccb846d1a0a4f8247f69e6bbe
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # ************************************************************************** # Copyright © 2016 jianglin # File Name: integer.py # Author: jianglin # Email: xiyang0807@gmail.com # Created: 2016-12-20 21:30:29 (CST) # Last Update:星期五 2016-12-23 17:16:21 (CST) # By: ...
29.135135
76
0.479592
from .base import Validator class ValidatorInteger(Validator): def __call__(self, value): self.value = value min = self.kwargs.get('min') max = self.kwargs.get('max') size = self.kwargs.get('size') if min is not None and max is not None: assert min <...
true
true
f746b46f2bfb4496c08d270486fbebedd491a220
849
py
Python
src/app.py
MateoProjects/SimplePDFReader
ca20e304d5e897c8ecbf42d25457ab1c893b17c0
[ "Apache-2.0" ]
null
null
null
src/app.py
MateoProjects/SimplePDFReader
ca20e304d5e897c8ecbf42d25457ab1c893b17c0
[ "Apache-2.0" ]
null
null
null
src/app.py
MateoProjects/SimplePDFReader
ca20e304d5e897c8ecbf42d25457ab1c893b17c0
[ "Apache-2.0" ]
null
null
null
import PySimpleGUI as sg from readerFile import * sg.theme("BlueMono") sg.set_options(font=('Helvetica', 10)) layout = [[sg.T("")], [sg.Text("Choose a file: "), sg.Input(key="-IN2-", change_submits=True), sg.FileBrowse(key="-IN-")], [sg.Text("Choose a folder"), sg.Input(key="-IN3-", change_submits=...
30.321429
113
0.573616
import PySimpleGUI as sg from readerFile import * sg.theme("BlueMono") sg.set_options(font=('Helvetica', 10)) layout = [[sg.T("")], [sg.Text("Choose a file: "), sg.Input(key="-IN2-", change_submits=True), sg.FileBrowse(key="-IN-")], [sg.Text("Choose a folder"), sg.Input(key="-IN3-", change_submits=...
true
true
f746b4d01878a79dd3f5643cfb3323d0b01c9597
6,261
py
Python
testplan/exporters/testing/pdf/__init__.py
ymn1k/testplan
b1bde8495c449d75a74a7fe4e7c6501b0476f833
[ "Apache-2.0" ]
null
null
null
testplan/exporters/testing/pdf/__init__.py
ymn1k/testplan
b1bde8495c449d75a74a7fe4e7c6501b0476f833
[ "Apache-2.0" ]
null
null
null
testplan/exporters/testing/pdf/__init__.py
ymn1k/testplan
b1bde8495c449d75a74a7fe4e7c6501b0476f833
[ "Apache-2.0" ]
1
2019-09-11T09:13:18.000Z
2019-09-11T09:13:18.000Z
""" PDF Export logic for test reports via ReportLab. """ import os import uuid import warnings try: from urllib import pathname2url # Python 2.x except: from urllib.request import pathname2url # Python 3.x from schema import Schema, Or try: from reportlab.platypus import SimpleDocTemplate except Exc...
30.100962
79
0.659639
import os import uuid import warnings try: from urllib import pathname2url except: from urllib.request import pathname2url from schema import Schema, Or try: from reportlab.platypus import SimpleDocTemplate except Exception as exc: warnings.warn('reportlab must be supported: {}'.format(exc)) tr...
true
true
f746b55b25b5e7164320c849c9023e69d705d48e
1,343
py
Python
scripts/add_taxonomies_to_paleoarxiv.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
628
2015-01-15T04:33:22.000Z
2022-03-30T06:40:10.000Z
scripts/add_taxonomies_to_paleoarxiv.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
4,712
2015-01-02T01:41:53.000Z
2022-03-30T14:18:40.000Z
scripts/add_taxonomies_to_paleoarxiv.py
Johnetordoff/osf.io
de10bf249c46cede04c78f7e6f7e352c69e6e6b5
[ "Apache-2.0" ]
371
2015-01-12T16:14:08.000Z
2022-03-31T18:58:29.000Z
import os import json import logging import sys from django.db import transaction from django.apps import apps from scripts import utils as script_utils from scripts.populate_preprint_providers import update_or_create from osf.models import PreprintProvider, Subject from website.app import init_app from website impor...
30.522727
116
0.760983
import os import json import logging import sys from django.db import transaction from django.apps import apps from scripts import utils as script_utils from scripts.populate_preprint_providers import update_or_create from osf.models import PreprintProvider, Subject from website.app import init_app from website impor...
true
true
f746b62b4f4b6d73439630f4f196227fbc7aaa2f
3,836
py
Python
cirq/ion/convert_to_ion_gates_test.py
kunalq/Cirq
e73c9bef672e83143ab04e7f169988149055d630
[ "Apache-2.0" ]
1
2019-09-04T16:55:30.000Z
2019-09-04T16:55:30.000Z
cirq/ion/convert_to_ion_gates_test.py
1eedaegon/Cirq
de0c5e855069bba71e55b070fc9b06f58c07a861
[ "Apache-2.0" ]
null
null
null
cirq/ion/convert_to_ion_gates_test.py
1eedaegon/Cirq
de0c5e855069bba71e55b070fc9b06f58c07a861
[ "Apache-2.0" ]
1
2020-12-18T16:36:41.000Z
2020-12-18T16:36:41.000Z
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
36.884615
78
0.62513
import pytest import numpy as np import cirq class OtherX(cirq.SingleQubitGate): def _unitary_(self) -> np.ndarray: return np.array([[0, 1], [1, 0]]) class NoUnitary(cirq.SingleQubitGate): pass class OtherCNOT(cirq.TwoQubitGate): def _unitary_(self) -> np.ndarray: retur...
true
true
f746b72f49efbd08191b62aed9bd17f6909c04fe
7,365
py
Python
tf2onnx/rewriter/quantization_ops_rewriter.py
garymm/tensorflow-onnx
a8f78ac7903493dee579304b7b1717aa9ec9706f
[ "Apache-2.0" ]
1
2022-03-28T06:21:16.000Z
2022-03-28T06:21:16.000Z
tf2onnx/rewriter/quantization_ops_rewriter.py
garymm/tensorflow-onnx
a8f78ac7903493dee579304b7b1717aa9ec9706f
[ "Apache-2.0" ]
null
null
null
tf2onnx/rewriter/quantization_ops_rewriter.py
garymm/tensorflow-onnx
a8f78ac7903493dee579304b7b1717aa9ec9706f
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 """ tf2onnx.rewriter - rewrite tensorflow QuantizeAndDequantizeV2|QuantizeAndDequantizeV3|QuantizeAndDequantizeV4 op """ import numpy as np from onnx import TensorProto, helper from tf2onnx.graph_matcher import OpTypePattern, GraphMatcher from tf2onnx import utils # pylint: dis...
44.101796
120
0.605431
import numpy as np from onnx import TensorProto, helper from tf2onnx.graph_matcher import OpTypePattern, GraphMatcher from tf2onnx import utils def extract_numpy_array(node): return np.frombuffer(node.attr["value"].t.raw_data, dtype="float32") def create_qdq_nodes(g, match_results): for match in match_...
true
true
f746b920b0fc19c99823bce18311d967c046d7b6
2,364
py
Python
sciva/loss.py
ChengF-Lab/scIVA
f70a927531dd16236dff30decbe77f0552ad4f2d
[ "MIT" ]
null
null
null
sciva/loss.py
ChengF-Lab/scIVA
f70a927531dd16236dff30decbe77f0552ad4f2d
[ "MIT" ]
null
null
null
sciva/loss.py
ChengF-Lab/scIVA
f70a927531dd16236dff30decbe77f0552ad4f2d
[ "MIT" ]
1
2022-01-30T17:55:44.000Z
2022-01-30T17:55:44.000Z
#!/usr/bin/env python """ # # # File Name: loss_function.py # Description: """ import torch import torch.nn.functional as F import math def kl_divergence(mu, logvar): """ Computes the KL-divergence of some element z. KL(q||p) = -∫ q(z) log [ p(z) / q(z) ] = -E[log p(z) ...
27.811765
119
0.555415
import torch import torch.nn.functional as F import math def kl_divergence(mu, logvar): return -0.5 * torch.sum(1 + logvar - mu.pow(2) - logvar.exp(), dim=1) def binary_cross_entropy(recon_x, x): return -torch.sum(x * torch.log(recon_x + 1e-8) + (1 - x) * torch.log(1 - recon_x + 1e-8), dim=-1) def elbo(r...
true
true
f746b932f92e4f9c29b61eb26e6f230bdad1ae71
9,158
py
Python
patch_manager_sdk/model/collector_service/alias_metric_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
patch_manager_sdk/model/collector_service/alias_metric_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
patch_manager_sdk/model/collector_service/alias_metric_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: alias_metric.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobu...
47.450777
938
0.764359
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
f746b9933bb631ad1c774ed46f134cf7ad85afb2
3,979
py
Python
NiaPy/util/argparser.py
lukapecnik/NiaPy
a40ac08a4c06a13019ec5e39cc137461884928b0
[ "MIT" ]
null
null
null
NiaPy/util/argparser.py
lukapecnik/NiaPy
a40ac08a4c06a13019ec5e39cc137461884928b0
[ "MIT" ]
null
null
null
NiaPy/util/argparser.py
lukapecnik/NiaPy
a40ac08a4c06a13019ec5e39cc137461884928b0
[ "MIT" ]
1
2020-03-25T16:20:36.000Z
2020-03-25T16:20:36.000Z
# encoding=utf8 # pylint: disable=mixed-indentation, line-too-long, multiple-statements, too-many-function-args import sys import logging from argparse import ArgumentParser from numpy import inf from NiaPy.util.utility import OptimizationType import NiaPy.benchmarks as bencs logging.basicConfig() logger = logging.get...
34.6
170
0.707213
import sys import logging from argparse import ArgumentParser from numpy import inf from NiaPy.util.utility import OptimizationType import NiaPy.benchmarks as bencs logging.basicConfig() logger = logging.getLogger('NiaPy.util.argparse') logger.setLevel('INFO') __all__ = ['MakeArgParser', 'getArgs', 'getDictArgs'] ...
true
true
f746bad1d975630dd21180afa88f5600bd13a5f5
113
py
Python
openjij/__init__.py
y-yu/OpenJij
ed08460b7c9f8e553d4d33e08977d465472e9c44
[ "Apache-2.0" ]
null
null
null
openjij/__init__.py
y-yu/OpenJij
ed08460b7c9f8e553d4d33e08977d465472e9c44
[ "Apache-2.0" ]
null
null
null
openjij/__init__.py
y-yu/OpenJij
ed08460b7c9f8e553d4d33e08977d465472e9c44
[ "Apache-2.0" ]
null
null
null
from .sampler import Sampler, SASampler, SQASampler from .model import BinaryQuadraticModel from .utils import *
28.25
51
0.823009
from .sampler import Sampler, SASampler, SQASampler from .model import BinaryQuadraticModel from .utils import *
true
true
f746bad9218690891dac47f8b8643f458cd66fff
1,278
py
Python
code_week15_83_89/palindrome_pairs_hard.py
dylanlee101/leetcode
b059afdadb83d504e62afd1227107de0b59557af
[ "Apache-2.0" ]
null
null
null
code_week15_83_89/palindrome_pairs_hard.py
dylanlee101/leetcode
b059afdadb83d504e62afd1227107de0b59557af
[ "Apache-2.0" ]
null
null
null
code_week15_83_89/palindrome_pairs_hard.py
dylanlee101/leetcode
b059afdadb83d504e62afd1227107de0b59557af
[ "Apache-2.0" ]
null
null
null
''' 给定一组唯一的单词, 找出所有不同 的索引对(i, j),使得列表中的两个单词, words[i] + words[j] ,可拼接成回文串。 示例 1: 输入: ["abcd","dcba","lls","s","sssll"] 输出: [[0,1],[1,0],[3,2],[2,4]] 解释: 可拼接成的回文串为 ["dcbaabcd","abcddcba","slls","llssssll"] 示例 2: 输入: ["bat","tab","cat"] 输出: [[0,1],[1,0]] 解释: 可拼接成的回文串为 ["battab","tabbat"] 来源:力扣(LeetCode) 链接:https://le...
31.170732
70
0.503912
class Solution: def palindromePairs(self, words: List[str]) -> List[List[int]]: def findWord(s,left,right): return indices.get(s[left:right+1],-1) def isPalindrome(s,left,right): return (sub := s[left:right+1]) == sub[::-1] n = len(words) indices = {word[::-1...
true
true
f746bb2d949c6f81d55b80da5938ebb5349804e8
12,941
py
Python
tensorflow/python/framework/function_def_to_graph.py
sighingnow/tensorflow
12579f9a795da54db405b5918f709665e2a7c07f
[ "Apache-2.0" ]
null
null
null
tensorflow/python/framework/function_def_to_graph.py
sighingnow/tensorflow
12579f9a795da54db405b5918f709665e2a7c07f
[ "Apache-2.0" ]
null
null
null
tensorflow/python/framework/function_def_to_graph.py
sighingnow/tensorflow
12579f9a795da54db405b5918f709665e2a7c07f
[ "Apache-2.0" ]
1
2022-01-26T18:52:28.000Z
2022-01-26T18:52:28.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.952532
93
0.70211
import itertools from tensorflow.core.framework import function_pb2 from tensorflow.core.framework import graph_pb2 from tensorflow.core.framework import tensor_shape_pb2 from tensorflow.core.framework import types_pb2 from tensorflow.core.framework import versions_pb2 from tensorflow.python.eager impo...
true
true
f746bbffac729c7d59fe0ffc5a0ea91974977612
15,722
py
Python
intersight/apis/iaas_license_info_api.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/apis/iaas_license_info_api.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/apis/iaas_license_info_api.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Intersight REST API This is Intersight REST API OpenAPI spec version: 1.0.9-262 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os import re # python 2 and python 3 compatibility library from s...
55.55477
818
0.644129
from __future__ import absolute_import import sys import os import re from six import iteritems from ..configuration import Configuration from ..api_client import ApiClient class IaasLicenseInfoApi(object): def __init__(self, api_client=None): config = Configuration() if api_client: ...
true
true
f746bc2386bea1def31b6b8300da4462f7ec7411
3,731
py
Python
subcmds/download.py
phamvandai/git-repo
d92076d930af11bb9a3025a6b2f12ca139c0436f
[ "Apache-2.0" ]
22
2017-05-02T07:48:13.000Z
2021-12-23T10:22:23.000Z
subcmds/download.py
phamvandai/git-repo
d92076d930af11bb9a3025a6b2f12ca139c0436f
[ "Apache-2.0" ]
null
null
null
subcmds/download.py
phamvandai/git-repo
d92076d930af11bb9a3025a6b2f12ca139c0436f
[ "Apache-2.0" ]
18
2017-07-07T06:31:44.000Z
2021-12-06T08:11:17.000Z
# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # # 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 re...
32.443478
74
0.591262
from __future__ import print_function import re import sys from command import Command from error import GitError CHANGE_RE = re.compile(r'^([1-9][0-9]*)(?:[/\.-]([1-9][0-9]*))?$') class Download(Command): common = True helpSummary = "Download and checkout a change" helpUsage = """ %prog {[proj...
true
true
f746be3e52038c4ee6654b7a2f232765d0b88aba
6,645
py
Python
tempest/api/compute/v3/servers/test_server_metadata_negative.py
rcbops-qe/tempest
88960aa32c473b64072671541a136dbae41b1d4c
[ "Apache-2.0" ]
3
2015-03-03T15:43:06.000Z
2016-10-24T06:12:40.000Z
tempest/api/compute/v3/servers/test_server_metadata_negative.py
rcbops-qe/tempest
88960aa32c473b64072671541a136dbae41b1d4c
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/v3/servers/test_server_metadata_negative.py
rcbops-qe/tempest
88960aa32c473b64072671541a136dbae41b1d4c
[ "Apache-2.0" ]
1
2017-07-11T13:54:27.000Z
2017-07-11T13:54:27.000Z
# Copyright 2014 NEC Corporation. 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 ...
42.596154
79
0.621219
from tempest.api.compute import base from tempest.common.utils import data_utils from tempest import exceptions from tempest import test class ServerMetadataV3NegativeTest(base.BaseV3ComputeTest): @classmethod def setUpClass(cls): super(ServerMetadataV3NegativeTest, cls).setUpClass() ...
true
true
f746be672f6519792c9906419d65f11978bbca04
7,360
py
Python
benchmarks/01-LE10-Thick-Plate/Model_Code_Aster/mesh_convergence/salome_prepare_mesh.py
dantelimac/CoFEA
b5520c66fa5f62d0ceadffd7cef6cae463ea5084
[ "BSD-4-Clause" ]
null
null
null
benchmarks/01-LE10-Thick-Plate/Model_Code_Aster/mesh_convergence/salome_prepare_mesh.py
dantelimac/CoFEA
b5520c66fa5f62d0ceadffd7cef6cae463ea5084
[ "BSD-4-Clause" ]
null
null
null
benchmarks/01-LE10-Thick-Plate/Model_Code_Aster/mesh_convergence/salome_prepare_mesh.py
dantelimac/CoFEA
b5520c66fa5f62d0ceadffd7cef6cae463ea5084
[ "BSD-4-Clause" ]
null
null
null
#!/usr/bin/env python """ Script for running in salome to automatically create regular mesh for thick_plate_benchmark Change PATH_TO_EXPORT_MESH to your own path. You can also change MESH_MULTIPLIER to make mesh more or less dense. """ ### ### SALOME v9.3.0 ### import sys import salome salome.salome_init() import s...
36.984925
112
0.690489
salome_init() import salome_notebook notebook = salome_notebook.NoteBook() geomBuilder import math import SALOMEDS print("###") PATH_TO_EXPORT_MESH = sys.argv[1] print(f"PATH_TO_EXPORT_MESH: {PATH_TO_EXPORT_MESH} type:{type(PATH_TO_EXPORT_MESH)}") MESH_MULTIPLIER = int(sys.argv[2]) print(f"MESH_MULTIPLIER: {M...
true
true
f746be82411ef1ae9bce517ff6eaf845ce70fdce
2,344
py
Python
tensorflow/python/kernel_tests/array_ops/denormal_test.py
KosingZhu/tensorflow
7ac2521a4e609ddef0f0ea3ffc2e76102da934d7
[ "Apache-2.0" ]
190,993
2015-11-09T13:17:30.000Z
2022-03-31T23:05:27.000Z
tensorflow/python/kernel_tests/denormal_test.py
govl-psb/tensorflow-1
60028072a1c3b4376e145b6fea8e4ccd3324377f
[ "Apache-2.0" ]
48,461
2015-11-09T14:21:11.000Z
2022-03-31T23:17:33.000Z
tensorflow/python/kernel_tests/denormal_test.py
govl-psb/tensorflow-1
60028072a1c3b4376e145b6fea8e4ccd3324377f
[ "Apache-2.0" ]
104,981
2015-11-09T13:40:17.000Z
2022-03-31T19:51:54.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.42623
89
0.703925
import numpy as np import platform from tensorflow.python.framework import constant_op from tensorflow.python.framework import test_util from tensorflow.python.platform import test class DenormalTest(test.TestCase): def testPythonHasDenormals(self): for dtype in np.float32, np.float64: ti...
true
true
f746bf3372d58ae4dd8afbafebbf61219b2d6bb4
5,577
py
Python
tfx/dsl/compiler/testdata/iris_pipeline_async.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
1
2022-03-29T23:06:54.000Z
2022-03-29T23:06:54.000Z
tfx/dsl/compiler/testdata/iris_pipeline_async.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
null
null
null
tfx/dsl/compiler/testdata/iris_pipeline_async.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
1
2020-12-13T22:07:53.000Z
2020-12-13T22:07:53.000Z
# Copyright 2020 Google LLC. 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 a...
39.274648
80
0.711135
import os import tensorflow_model_analysis as tfma from tfx.components import CsvExampleGen from tfx.components import Evaluator from tfx.components import ExampleValidator from tfx.components import Pusher from tfx.components import SchemaGen from tfx.components import StatisticsGen from tfx.components i...
true
true
f746bf5296f93da1338862dd2aa3e74f395bbdb5
37,398
py
Python
xclim/indices/_conversion.py
UCL/xclim
118441f89d221cfffbd2e1fd0b966517e731378d
[ "Apache-2.0" ]
null
null
null
xclim/indices/_conversion.py
UCL/xclim
118441f89d221cfffbd2e1fd0b966517e731378d
[ "Apache-2.0" ]
2
2021-07-16T16:05:54.000Z
2021-11-15T13:02:10.000Z
xclim/indices/_conversion.py
UCL/xclim
118441f89d221cfffbd2e1fd0b966517e731378d
[ "Apache-2.0" ]
1
2021-07-16T16:49:05.000Z
2021-07-16T16:49:05.000Z
# noqa: D100 from typing import Optional, Tuple import numpy as np import xarray as xr from xclim.core.calendar import date_range, datetime_to_decimal_year from xclim.core.units import amount2rate, convert_units_to, declare_units, units2pint __all__ = [ "humidex", "tas", "uas_vas_2_sfcwind", "sfcwind...
37.435435
313
0.625221
from typing import Optional, Tuple import numpy as np import xarray as xr from xclim.core.calendar import date_range, datetime_to_decimal_year from xclim.core.units import amount2rate, convert_units_to, declare_units, units2pint __all__ = [ "humidex", "tas", "uas_vas_2_sfcwind", "sfcwind_2_uas_vas",...
true
true
f746c149980b20019a3598c376b1be40dd61b9ca
7,823
py
Python
tests/test_ORACLE.py
AQ18/skimpy
435fc50244f2ca815bbb39d525a82a4692f5c0ac
[ "Apache-2.0" ]
13
2020-11-05T10:59:13.000Z
2022-03-21T01:38:31.000Z
tests/test_ORACLE.py
AQ18/skimpy
435fc50244f2ca815bbb39d525a82a4692f5c0ac
[ "Apache-2.0" ]
4
2022-01-27T10:23:40.000Z
2022-03-10T18:16:06.000Z
tests/test_ORACLE.py
AQ18/skimpy
435fc50244f2ca815bbb39d525a82a4692f5c0ac
[ "Apache-2.0" ]
6
2020-08-04T17:01:33.000Z
2022-03-21T01:38:32.000Z
# -*- coding: utf-8 -*- """ .. module:: skimpy :platform: Unix, Windows :synopsis: Simple Kinetic Models in Python .. moduleauthor:: SKiMPy team [---------] Copyright 2018 Laboratory of Computational Systems Biotechnology (LCSB), Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland Licensed under the ...
31.292
108
0.715327
import pytest import numpy as np import pytfa from pytfa.io import import_matlab_model, load_thermoDB from pytfa.io.viz import get_reaction_data from skimpy.utils.namespace import * from skimpy.sampling.simple_parameter_sampler import SimpleParameterSampler from skimpy.core.solution import ODESolutionPopulation fr...
true
true
f746c206a17a8a36f618dd9485f2a33be4d66bff
13,852
py
Python
src/oci/data_integration/models/schedule_summary.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/data_integration/models/schedule_summary.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/data_integration/models/schedule_summary.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
32.139211
245
0.648137
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class ScheduleSummary(object): def __init__(self, **kwargs): self.swagger_types = { 'key': 'str', ...
true
true
f746c231bfdd9b1bb8345e10ed8625959a208a0e
10,166
py
Python
stolos/runner.py
sailthru/stolos
7b74da527033b2da7f3ccd6d19ed6fb0245ea0fc
[ "Apache-2.0" ]
121
2015-01-20T08:58:35.000Z
2021-08-08T15:13:11.000Z
stolos/runner.py
sailthru/stolos
7b74da527033b2da7f3ccd6d19ed6fb0245ea0fc
[ "Apache-2.0" ]
3
2015-01-20T22:19:49.000Z
2016-02-10T10:48:11.000Z
stolos/runner.py
sailthru/stolos
7b74da527033b2da7f3ccd6d19ed6fb0245ea0fc
[ "Apache-2.0" ]
20
2016-02-03T17:08:31.000Z
2021-04-19T10:43:28.000Z
""" This code fetches jobs from the queue, decides whether to run jobs, and then runs them or manipulates its own and parent/child queues """ import importlib from stolos import argparse_shared as at from stolos import log from stolos import dag_tools as dt, exceptions from stolos import queue_backend as qb from stolo...
37.10219
79
0.627681
import importlib from stolos import argparse_shared as at from stolos import log from stolos import dag_tools as dt, exceptions from stolos import queue_backend as qb from stolos import configuration_backend as cb from stolos.initializer import initialize def main(ns): assert ns.app_name in dt.get_task_names() ...
true
true
f746c27550ecb45c5b905798c8ae426acbabea66
1,264
py
Python
entertainment.py
Shubhamkansal20/movie_trailer_website
b2b0541f9778a255d76d68a445c86ced4a63e9cc
[ "MIT" ]
null
null
null
entertainment.py
Shubhamkansal20/movie_trailer_website
b2b0541f9778a255d76d68a445c86ced4a63e9cc
[ "MIT" ]
null
null
null
entertainment.py
Shubhamkansal20/movie_trailer_website
b2b0541f9778a255d76d68a445c86ced4a63e9cc
[ "MIT" ]
null
null
null
import fresh_tomatoes # import fresh_tomatoes from library import media # import class # first object created Bahubali = media.Movies('Bahubali', 'The ancient kingdom of Mahishmati' , 'https://i.ytimg.com/vi/JS4drCVGIms/maxresdefault.jpg' ...
28.727273
116
0.584652
import fresh_tomatoes import media Bahubali = media.Movies('Bahubali', 'The ancient kingdom of Mahishmati' , 'https://i.ytimg.com/vi/JS4drCVGIms/maxresdefault.jpg' , 'https://www.youtube.com/watch?v=sw6VKIClRMY') Don = m...
true
true
f746c484d6cd7abb6e36c1fdde335679097ff559
293
py
Python
python3/web/Scanner_website/robots.py
SaiHarshaK/Penetration-Testing-Tools
83cffc252b011a979c862e1f1cce7fa84a13dfd1
[ "MIT" ]
null
null
null
python3/web/Scanner_website/robots.py
SaiHarshaK/Penetration-Testing-Tools
83cffc252b011a979c862e1f1cce7fa84a13dfd1
[ "MIT" ]
null
null
null
python3/web/Scanner_website/robots.py
SaiHarshaK/Penetration-Testing-Tools
83cffc252b011a979c862e1f1cce7fa84a13dfd1
[ "MIT" ]
null
null
null
import urllib.request import io def robots(url): if url.endswith('/'): path = url else: path = url + '/' req = urllib.request.Request(path + "robots.txt", data = None) #request resp = urllib.request.urlopen(req) #response data = resp.read() return data
24.416667
75
0.607509
import urllib.request import io def robots(url): if url.endswith('/'): path = url else: path = url + '/' req = urllib.request.Request(path + "robots.txt", data = None) resp = urllib.request.urlopen(req) data = resp.read() return data
true
true
f746c4856da5c257bd5aa8b3d66a805cf965b560
776
py
Python
tests/src/components/finder_opponent_tab.py
Alpaca00/alpaca_web
1db33978f774addbe456f750ffadf32d2f223610
[ "MIT" ]
4
2021-09-14T07:36:27.000Z
2021-09-18T15:10:24.000Z
tests/src/components/finder_opponent_tab.py
Alpaca00/alpaca_web
1db33978f774addbe456f750ffadf32d2f223610
[ "MIT" ]
1
2021-12-14T20:32:29.000Z
2021-12-15T13:28:29.000Z
tests/src/components/finder_opponent_tab.py
Alpaca00/squash-opponent
1db33978f774addbe456f750ffadf32d2f223610
[ "MIT" ]
null
null
null
from tests.src import BasePage from tests.src.elements.select import SelectList from tests.src.validator_error import ValidatorPhoneMixin class FinderOpponentTab(BasePage): def __init__(self, phone: str, district: str, category: str, datetime_: str,): super().__init__() self.phone = phone ...
33.73913
82
0.681701
from tests.src import BasePage from tests.src.elements.select import SelectList from tests.src.validator_error import ValidatorPhoneMixin class FinderOpponentTab(BasePage): def __init__(self, phone: str, district: str, category: str, datetime_: str,): super().__init__() self.phone = phone ...
true
true
f746c5c2afd3843e9b80c3352787b32e53811725
8,117
py
Python
argoverse/evaluation/eval_forecasting.py
alliecc/argoverse-api
8d96ebd92195a4fdb228d45b4584fdc61d4522c9
[ "MIT" ]
1
2021-09-19T15:24:40.000Z
2021-09-19T15:24:40.000Z
argoverse/evaluation/eval_forecasting.py
alliecc/argoverse-api
8d96ebd92195a4fdb228d45b4584fdc61d4522c9
[ "MIT" ]
null
null
null
argoverse/evaluation/eval_forecasting.py
alliecc/argoverse-api
8d96ebd92195a4fdb228d45b4584fdc61d4522c9
[ "MIT" ]
null
null
null
# <Copyright 2019, Argo AI, LLC. Released under the MIT license.> """This module evaluates the forecasted trajectories against the ground truth.""" import math import pickle as pkl from typing import Dict, List, Optional, Tuple import numpy as np from argoverse.map_representation.map_api import ArgoverseMap LOW_PR...
39.789216
118
0.665517
import math import pickle as pkl from typing import Dict, List, Optional, Tuple import numpy as np from argoverse.map_representation.map_api import ArgoverseMap LOW_PROB_THRESHOLD_FOR_METRICS = 0.05 def get_ade(forecasted_trajectory: np.ndarray, gt_trajectory: np.ndarray) -> float: pred_len = forecasted_tra...
true
true
f746c5e2032e96da058f5e6f19297a8d8d66e2b9
1,219
py
Python
hood/migrations/0008_posts.py
fkinyae/vigilante-hood
cb151dc99d27bf3b0a4e6976ed7dd9878b82e8c3
[ "MIT" ]
null
null
null
hood/migrations/0008_posts.py
fkinyae/vigilante-hood
cb151dc99d27bf3b0a4e6976ed7dd9878b82e8c3
[ "MIT" ]
null
null
null
hood/migrations/0008_posts.py
fkinyae/vigilante-hood
cb151dc99d27bf3b0a4e6976ed7dd9878b82e8c3
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-09-25 06:33 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('hood', '0007_rename_user_business_owner'), ] operations = [ migrations.CreateModel( name='Posts...
46.884615
333
0.636587
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('hood', '0007_rename_user_business_owner'), ] operations = [ migrations.CreateModel( name='Posts', fields=[ ('id', ...
true
true
f746c6a43189381f0cb0b1696ee33906961bc7c6
1,288
py
Python
app/auth/forms.py
HenryKanyoro/Pitch
919eb200717081c7dff5f6b7db1bc76653193501
[ "MIT" ]
1
2020-09-21T07:02:24.000Z
2020-09-21T07:02:24.000Z
app/auth/forms.py
HenryKanyoro/Pitch
919eb200717081c7dff5f6b7db1bc76653193501
[ "MIT" ]
null
null
null
app/auth/forms.py
HenryKanyoro/Pitch
919eb200717081c7dff5f6b7db1bc76653193501
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField,PasswordField,BooleanField ,SubmitField,TextAreaField from wtforms.validators import Required, Email, EqualTo from ..models import User from wtforms import ValidationError class RegistrationForm(FlaskForm): email = StringField('Your Email Address',val...
44.413793
128
0.736801
from flask_wtf import FlaskForm from wtforms import StringField,PasswordField,BooleanField ,SubmitField,TextAreaField from wtforms.validators import Required, Email, EqualTo from ..models import User from wtforms import ValidationError class RegistrationForm(FlaskForm): email = StringField('Your Email Address',val...
true
true
f746c6e050d40ab412f2e3704c46255dc17120bf
7,411
py
Python
hexrd/ui/list_editor.py
HEXRD/hexrdgui
d92915463f237e0521b5830655ae73bc5bcd9f80
[ "BSD-3-Clause" ]
13
2020-02-18T00:23:02.000Z
2022-02-24T20:04:36.000Z
hexrd/ui/list_editor.py
HEXRD/hexrdgui
d92915463f237e0521b5830655ae73bc5bcd9f80
[ "BSD-3-Clause" ]
656
2020-01-14T02:33:40.000Z
2022-03-26T15:31:17.000Z
hexrd/ui/list_editor.py
HEXRD/hexrdgui
d92915463f237e0521b5830655ae73bc5bcd9f80
[ "BSD-3-Clause" ]
6
2020-01-17T15:02:53.000Z
2020-11-01T22:02:48.000Z
from PySide2.QtCore import QItemSelectionModel, QObject, Signal from PySide2.QtWidgets import QDialog, QTableWidgetItem, QVBoxLayout from hexrd.ui.ui_loader import UiLoader from hexrd.ui.utils import block_signals, unique_name class ListEditor(QObject): """A string list editor that doesn't allow duplicates""" ...
27.756554
77
0.640669
from PySide2.QtCore import QItemSelectionModel, QObject, Signal from PySide2.QtWidgets import QDialog, QTableWidgetItem, QVBoxLayout from hexrd.ui.ui_loader import UiLoader from hexrd.ui.utils import block_signals, unique_name class ListEditor(QObject): items_rearranged = Signal() items_dele...
true
true
f746c7b0b9182fcbc1c8b3ae1b739ff13adb6ac5
7,320
py
Python
utils/cCirc.py
rscalzo/sami
7ac5632e018cdf2384f5ff067c503177684f61c8
[ "BSD-3-Clause" ]
1
2021-12-07T08:30:38.000Z
2021-12-07T08:30:38.000Z
utils/cCirc.py
rscalzo/sami
7ac5632e018cdf2384f5ff067c503177684f61c8
[ "BSD-3-Clause" ]
null
null
null
utils/cCirc.py
rscalzo/sami
7ac5632e018cdf2384f5ff067c503177684f61c8
[ "BSD-3-Clause" ]
3
2021-02-15T19:51:59.000Z
2021-05-04T05:48:46.000Z
from __future__ import print_function """ Wrapper for the C++ drizzle overlap code. History ------- Created by Jon Nielsen in 2012 Updated for the new cubing algorithm by Francesco D'Eugenio 16/02/2017 Notes ----- This module contains a testing function. At the moment it requires that the libraries path be hardcode...
35.023923
110
0.614071
from __future__ import print_function import ctypes as C import numpy as np import os.path try: libcm = C.CDLL(os.path.join(os.path.dirname(__file__), "libcCirc.so")) except: raise ImportError pass libcm.weight_map.argtypes = [ C.c_long, C.c_long, C.c_double, C.c_double, C.c_double, np...
true
true
f746c7e1ae687d20d173dd2f81cb14285a2f5ee8
2,206
py
Python
scripts/preprocessing_squad.py
xiye17/diffmask
6ae62ce58bf9bf5ea0b0ac23b196c52b7ee97c48
[ "MIT" ]
45
2020-05-01T08:44:19.000Z
2022-03-25T12:18:03.000Z
scripts/preprocessing_squad.py
xiye17/diffmask
6ae62ce58bf9bf5ea0b0ac23b196c52b7ee97c48
[ "MIT" ]
1
2020-09-04T03:33:41.000Z
2020-09-27T12:21:09.000Z
scripts/preprocessing_squad.py
xiye17/diffmask
6ae62ce58bf9bf5ea0b0ac23b196c52b7ee97c48
[ "MIT" ]
2
2021-02-04T17:21:32.000Z
2021-03-05T12:46:16.000Z
#!/usr/bin/env python # coding: utf-8 import argparse import json from tqdm.auto import tqdm from transformers import AutoTokenizer def pre_processing(tokenizer, file_input, file_output): with open(file_input, "r") as f: data = json.load(f)["data"] new_data = {} for p in tqdm([p for d in data fo...
32.441176
103
0.558024
import argparse import json from tqdm.auto import tqdm from transformers import AutoTokenizer def pre_processing(tokenizer, file_input, file_output): with open(file_input, "r") as f: data = json.load(f)["data"] new_data = {} for p in tqdm([p for d in data for p in d["paragraphs"]]): fo...
true
true
f746c90708a5201580f7801d6612a3abbb008154
45,087
py
Python
tests/compute/test_transform.py
ShihanYang/dgl
ec2e24be6dcc3bcc3d4ad5dff78212735f9db00f
[ "Apache-2.0" ]
1
2020-07-26T01:21:45.000Z
2020-07-26T01:21:45.000Z
tests/compute/test_transform.py
ShihanYang/dgl
ec2e24be6dcc3bcc3d4ad5dff78212735f9db00f
[ "Apache-2.0" ]
null
null
null
tests/compute/test_transform.py
ShihanYang/dgl
ec2e24be6dcc3bcc3d4ad5dff78212735f9db00f
[ "Apache-2.0" ]
null
null
null
from scipy import sparse as spsp import unittest import networkx as nx import numpy as np import dgl import dgl.function as fn import backend as F from dgl.graph_index import from_scipy_sparse_matrix import unittest from utils import parametrize_dtype D = 5 # line graph related def test_line_graph(): N = 5 G...
42.375
168
0.600195
from scipy import sparse as spsp import unittest import networkx as nx import numpy as np import dgl import dgl.function as fn import backend as F from dgl.graph_index import from_scipy_sparse_matrix import unittest from utils import parametrize_dtype D = 5 def test_line_graph(): N = 5 G = dgl.DGLGraph(nx.s...
true
true
f746c90f8434ef6641634d7b1b3a48ce8effce9e
1,051
py
Python
tests/pksetup_data/pksetupunit2/setup.py
radiasoft/pykern
bf5946e20d77d13ceab387c33ac75c59b6579de6
[ "Apache-2.0" ]
8
2016-10-26T13:23:44.000Z
2022-03-02T22:03:01.000Z
tests/pksetup_data/pksetupunit2/setup.py
radiasoft/pykern
bf5946e20d77d13ceab387c33ac75c59b6579de6
[ "Apache-2.0" ]
124
2016-03-01T15:32:54.000Z
2022-03-31T17:42:40.000Z
tests/pksetup_data/pksetupunit2/setup.py
radiasoft/pykern
bf5946e20d77d13ceab387c33ac75c59b6579de6
[ "Apache-2.0" ]
10
2015-05-09T14:17:36.000Z
2020-02-10T18:42:53.000Z
# -*- coding: utf-8 -*- u"""pksetupunit2 setup script :copyright: Copyright (c) 2016 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ import pykern.pksetup pykern.pksetup.setup( name='pksetupunit2', author='RadiaSoft LLC', author_email='pip@radiasoft.net',...
31.848485
67
0.62607
import pykern.pksetup pykern.pksetup.setup( name='pksetupunit2', author='RadiaSoft LLC', author_email='pip@radiasoft.net', description='optional args like extras_require', license='http://www.apache.org/licenses/LICENSE-2.0.html', url='https://github.com/radiasoft/pksetupunit2', extras_req...
true
true
f746c9e0decce08b8c6a476cccb6e9f662237d61
27,828
py
Python
tests/sandbox/.venv_ccf_sandbox/lib/python3.8/site-packages/sklearn/base.py
iLuSIAnn/test
10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e
[ "Apache-2.0" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
tests/sandbox/.venv_ccf_sandbox/lib/python3.8/site-packages/sklearn/base.py
iLuSIAnn/test
10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e
[ "Apache-2.0" ]
37
2020-10-20T08:30:53.000Z
2020-12-22T13:15:45.000Z
tests/sandbox/.venv_ccf_sandbox/lib/python3.8/site-packages/sklearn/base.py
iLuSIAnn/test
10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e
[ "Apache-2.0" ]
13
2020-09-07T07:24:35.000Z
2022-02-24T04:56:16.000Z
""" Base classes for all estimators. Used for VotingClassifier """ # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import copy import warnings from collections import defaultdict import platform import inspect import re import numpy as np from . import __version__ from ._config imp...
34.483271
79
0.58301
import copy import warnings from collections import defaultdict import platform import inspect import re import numpy as np from . import __version__ from ._config import get_config from .utils import _IS_32BIT from .utils.validation import check_X_y from .utils.validation import check_array from .utils._estimato...
true
true
f746cafdce0739db79c62b049f4e11a0a905558c
1,220
py
Python
setup.py
smn/heatherrd
1c02b8e2c9ce8297570326cb539b9361790450ab
[ "BSD-3-Clause" ]
1
2016-02-12T13:13:23.000Z
2016-02-12T13:13:23.000Z
setup.py
praekeltfoundation/heatherrd
1c02b8e2c9ce8297570326cb539b9361790450ab
[ "BSD-3-Clause" ]
1
2016-02-12T19:20:56.000Z
2016-02-12T19:20:56.000Z
setup.py
praekeltfoundation/heatherrd
1c02b8e2c9ce8297570326cb539b9361790450ab
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('requirements.txt') as req_file: requirements = req_file.read().split('\n') with open('...
24.4
64
0.644262
try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('requirements.txt') as req_file: requirements = req_file.read().split('\n') with open('requirements-dev.txt') as req_file: requ...
true
true
f746cb79af044b042985e917b6ae63f19c028b52
22,147
py
Python
plugins/taskwarrior/__init__.py
bergercookie/-awesome-albert-plugins
7cd62f80681f0063821d46bc635bc5475cc96370
[ "MIT" ]
null
null
null
plugins/taskwarrior/__init__.py
bergercookie/-awesome-albert-plugins
7cd62f80681f0063821d46bc635bc5475cc96370
[ "MIT" ]
null
null
null
plugins/taskwarrior/__init__.py
bergercookie/-awesome-albert-plugins
7cd62f80681f0063821d46bc635bc5475cc96370
[ "MIT" ]
null
null
null
"""Interact with Taskwarrior.""" import datetime import os import re import threading import traceback from pathlib import Path from shutil import which from subprocess import PIPE, Popen from typing import List, Optional, Tuple, Union import albert as v0 # type: ignore import dateutil import gi import taskw from fu...
33.303759
2,001
0.585903
import datetime import os import re import threading import traceback from pathlib import Path from shutil import which from subprocess import PIPE, Popen from typing import List, Optional, Tuple, Union import albert as v0 import dateutil import gi import taskw from fuzzywuzzy import process from overrides import o...
true
true
f746cbba413a8b795c67d5fef94f88d070614d5b
1,200
py
Python
HTTP_scan/async_http_response_code_checker.py
esirotinski/py3
313552b9e66319e6c4a0a53f8c6accfd34b2a7b0
[ "MIT" ]
null
null
null
HTTP_scan/async_http_response_code_checker.py
esirotinski/py3
313552b9e66319e6c4a0a53f8c6accfd34b2a7b0
[ "MIT" ]
null
null
null
HTTP_scan/async_http_response_code_checker.py
esirotinski/py3
313552b9e66319e6c4a0a53f8c6accfd34b2a7b0
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Read a lists of IP addresses from file and performs a HEAD request. Outputs HTTP response code, IP address and HTTP headers. """ import asyncio import time import aiohttp from pathlib import Path import sys async def get_header(session, ip): async with session.head(f"http://{ip}/", all...
33.333333
105
0.7
import asyncio import time import aiohttp from pathlib import Path import sys async def get_header(session, ip): async with session.head(f"http://{ip}/", allow_redirects=False) as response: print(response.status, ip, response.raw_headers) async def get_headers(ip_addresses): headers = {"Connection"...
true
true
f746cc147481dcc19818d569f3afcfaa2aff19bb
14,625
py
Python
nova/virt/powervm/driver.py
citrix-openstack-build/nova
e5fc28adda4b95325f74402fe63ea969e816e6c3
[ "Apache-2.0" ]
null
null
null
nova/virt/powervm/driver.py
citrix-openstack-build/nova
e5fc28adda4b95325f74402fe63ea969e816e6c3
[ "Apache-2.0" ]
null
null
null
nova/virt/powervm/driver.py
citrix-openstack-build/nova
e5fc28adda4b95325f74402fe63ea969e816e6c3
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 IBM Corp. # # 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 # # ...
41.905444
79
0.626667
import socket import time from oslo.config import cfg from nova.compute import flavors from nova.compute import utils as compute_utils from nova.image import glance from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt import driver from nova....
true
true
f746cc417321e735747a850facbc561320ffce92
3,086
py
Python
src/mixed-reality/azext_mixed_reality/tests/latest/test_spatial_anchors_account.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/mixed-reality/azext_mixed_reality/tests/latest/test_spatial_anchors_account.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/mixed-reality/azext_mixed_reality/tests/latest/test_spatial_anchors_account.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
50.590164
120
0.61698
from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) from .recording_processors import KeyReplacer class SpatialAnchorsAccountScenarioTest(ScenarioTest): def __init__(self, method_name): super(SpatialAnchorsAccountScenarioTest, self).__init__( method_name, recording_proces...
true
true
f746cd6ddaaa49cc813bf8783c9a5b14f88666e1
325
py
Python
arcade_solutions/the_core/alphabet_subsequence.py
nickaigi/automatic-dollop
eb8222475c7871c1d5710242c5aed8c70ea0d2c8
[ "Unlicense" ]
null
null
null
arcade_solutions/the_core/alphabet_subsequence.py
nickaigi/automatic-dollop
eb8222475c7871c1d5710242c5aed8c70ea0d2c8
[ "Unlicense" ]
null
null
null
arcade_solutions/the_core/alphabet_subsequence.py
nickaigi/automatic-dollop
eb8222475c7871c1d5710242c5aed8c70ea0d2c8
[ "Unlicense" ]
null
null
null
def alphabet_subsequence(s): return ''.join(sorted(s)) == s and len(set(s)) == len(s) def alphabet_subsequence_two(s): """ I like this solution better. Clear and concise """ return all(s[i]<s[i+1] for i in range(len(s) -1)) if __name__ == '__main__': s = 'effg' print(alphabet_subsequence...
21.666667
60
0.618462
def alphabet_subsequence(s): return ''.join(sorted(s)) == s and len(set(s)) == len(s) def alphabet_subsequence_two(s): return all(s[i]<s[i+1] for i in range(len(s) -1)) if __name__ == '__main__': s = 'effg' print(alphabet_subsequence(s))
true
true
f746cdc252f121d71b7228e30ebe61102ebbbc77
10,426
py
Python
calm segment extractor py34 v5 20170918.py
realchrisward/RodentPlethysmography
6b27e08a65b4c0b399e5b20173c0d134f5dbca38
[ "MIT" ]
null
null
null
calm segment extractor py34 v5 20170918.py
realchrisward/RodentPlethysmography
6b27e08a65b4c0b399e5b20173c0d134f5dbca38
[ "MIT" ]
3
2017-12-21T22:42:56.000Z
2018-09-18T15:04:34.000Z
calm segment extractor py34 v5 20170918.py
realchrisward/RodentPlethysmography
6b27e08a65b4c0b399e5b20173c0d134f5dbca38
[ "MIT" ]
null
null
null
#!usr/bin/env python3 ## /\ compatability line ## distribution notes - Calm Segment Extractor py34 v4.py """ Calm Segment Extractor by Chris Ward (C) 2015 updated for python 3.4 compatability by Chris Ward (C) 2016 provided free for non-commercial/fair use. This program attempts to define periods of calm beh...
42.040323
171
0.610589
y imestamps,movement,pd,bs,rt): timestamps=[float(i) for i in timestamps] movement=[float(i) for i in movement] thresh=numpy.percentile(movement,bs)*rt crossings=wardcode.getbelowthresh(movement,thresh) diffcross=wardcode.getdifflist(crossings) starts=wardcode.getlistfromfilt...
true
true
f746ceb00e5bbac4e5f1d0161b3c2c401174c11f
3,144
py
Python
pyrfu/mms/eis_skymap_combine_sc.py
ablotekar/irfu-python
740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e
[ "MIT" ]
null
null
null
pyrfu/mms/eis_skymap_combine_sc.py
ablotekar/irfu-python
740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e
[ "MIT" ]
null
null
null
pyrfu/mms/eis_skymap_combine_sc.py
ablotekar/irfu-python
740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # 3rd party imports import numpy as np import xarray as xr __author__ = "Louis Richard" __email__ = "louisr@irfu.se" __copyright__ = "Copyright 2020-2021" __license__ = "MIT" __version__ = "2.3.7" __status__ = "Prototype" def _idx_closest(lst0, lst1): return [(np.ab...
32.081633
78
0.648537
import numpy as np import xarray as xr __author__ = "Louis Richard" __email__ = "louisr@irfu.se" __copyright__ = "Copyright 2020-2021" __license__ = "MIT" __version__ = "2.3.7" __status__ = "Prototype" def _idx_closest(lst0, lst1): return [(np.abs(np.asarray(lst0) - k)).argmin() for k in lst1] def eis_skym...
true
true
f746d0a6dd0eec87ac2f9e941b807709b7c42219
4,483
py
Python
graph_objs/treemap/marker/_pad.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
graph_objs/treemap/marker/_pad.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
graph_objs/treemap/marker/_pad.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pad(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "treemap.marker" _path_str = "treemap.marker.pad" _valid_props = {"b", "l", "r", "t"} # b ...
24.36413
82
0.47892
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pad(_BaseTraceHierarchyType): _parent_path_str = "treemap.marker" _path_str = "treemap.marker.pad" _valid_props = {"b", "l", "r", "t"} @property def b(self): ...
true
true
f746d2008e10f3ca7d9d0b33c92077ded4f75f65
3,274
py
Python
homeassistant/components/fixer/sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
null
null
null
homeassistant/components/fixer/sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
3
2021-09-08T03:34:57.000Z
2022-03-12T00:59:48.000Z
homeassistant/components/fixer/sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
null
null
null
"""Currency exchange rate support that comes from fixer.io.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUTION, CONF_API_KEY, CONF_NAME import homeassistant.helpers.config_validation as ...
28.224138
74
0.667074
from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUTION, CONF_API_KEY, CONF_NAME import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity REQUIREMENT...
true
true
f746d20bd889d84a6a251f5d3e2537625a0effa0
17,838
py
Python
routes.py
charukiewicz/beer-manager
edde7139e31a5b6cb38f5e83b04050b8254fb97b
[ "MIT" ]
null
null
null
routes.py
charukiewicz/beer-manager
edde7139e31a5b6cb38f5e83b04050b8254fb97b
[ "MIT" ]
null
null
null
routes.py
charukiewicz/beer-manager
edde7139e31a5b6cb38f5e83b04050b8254fb97b
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import hashlib from flask import Flask, request, make_response, abort from flask.ext.sqlalchemy import SQLAlchemy from flask import jsonify from sqlalchemy import desc, asc, Table, insert # Author: Christian Charukiewicz # Email: c.charukiewicz@gmail.com app = Flask(__name__) db = SQLA...
27.275229
106
0.659659
import os import hashlib from flask import Flask, request, make_response, abort from flask.ext.sqlalchemy import SQLAlchemy from flask import jsonify from sqlalchemy import desc, asc, Table, insert app = Flask(__name__) db = SQLAlchemy(app) app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://username:passwo...
true
true
f746d2176a82a3dcd6b37bae54c5b35de5cc7231
23,261
py
Python
csv2po.py
might-and-magic/mm678_i18n
ddc37c743ac37169908641dcd5328a7ccae5138f
[ "MIT" ]
17
2020-02-25T14:37:23.000Z
2022-02-21T15:33:09.000Z
csv2po.py
might-and-magic/mm678_i18n
ddc37c743ac37169908641dcd5328a7ccae5138f
[ "MIT" ]
1
2022-01-09T02:14:56.000Z
2022-02-13T10:08:11.000Z
csv2po.py
might-and-magic/mm678_i18n
ddc37c743ac37169908641dcd5328a7ccae5138f
[ "MIT" ]
3
2020-10-06T20:38:13.000Z
2021-02-17T02:11:17.000Z
# CSV2PO Python (csv2po.py) v1.0.0 # By Tom CHEN <tomchen.org@gmail.com> (tomchen.org) # MIT License # Python 3.8+ import re import glob import os import time import random import importlib.util import gettext import polib from pathlib import Path from pluralforms import pluralforms import settings __version__ = '1....
34.00731
196
0.662783
import re import glob import os import time import random import importlib.util import gettext import polib from pathlib import Path from pluralforms import pluralforms import settings __version__ = '1.0.0' import sys sys.setrecursionlimit(10000) def setDefaults(defaultsDict): for key in defaultsDict: if ...
true
true
f746d45a7d11ecb1d470cccbbda3bbed6ec093e2
14,949
py
Python
venv/lib/python3.6/site-packages/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bgp_global/bgp_global.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bgp_global/bgp_global.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bgp_global/bgp_global.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
# # -*- coding: utf-8 -*- # Copyright 2021 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # from __future__ import absolute_import, division, print_function __metaclass__ = type """ The nxos_bgp_global config file. It is in this file where the current configura...
34.92757
103
0.533748
from __future__ import absolute_import, division, print_function __metaclass__ = type from copy import deepcopy from ansible.module_utils.six import iteritems from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import ( dict_merge, ) from ansible_collections.ansible.netco...
true
true
f746d46b7e017f77221a964663de7c42aa9b4b48
282
py
Python
app.py
mcvenkat/Python-Programs
2ff66bbd5b07c8e093b11360e1dcac06740a5024
[ "CC0-1.0", "MIT" ]
null
null
null
app.py
mcvenkat/Python-Programs
2ff66bbd5b07c8e093b11360e1dcac06740a5024
[ "CC0-1.0", "MIT" ]
5
2020-05-22T14:10:02.000Z
2022-03-25T19:13:05.000Z
app.py
mcvenkat/Python-Programs
2ff66bbd5b07c8e093b11360e1dcac06740a5024
[ "CC0-1.0", "MIT" ]
null
null
null
#flask app from flask import Flask, render_template #instantiate the flask app app = Flask(__name__) #create index page function @app.route("/") def index(): return render_template("index.html") #run the app if __name__ == "__main__": app.run(debug=True)
17.625
41
0.680851
from flask import Flask, render_template app = Flask(__name__) @app.route("/") def index(): return render_template("index.html") if __name__ == "__main__": app.run(debug=True)
true
true
f746d5769a9e3a9cee3eb1fd17bb1dbca207d6fe
998
py
Python
azure/mgmt/network/v2017_08_01/models/application_gateway_available_waf_rule_sets_result.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
azure/mgmt/network/v2017_08_01/models/application_gateway_available_waf_rule_sets_result.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_08_01/models/application_gateway_available_waf_rule_sets_result.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# 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 ...
34.413793
83
0.624248
from msrest.serialization import Model class ApplicationGatewayAvailableWafRuleSetsResult(Model): _attribute_map = { 'value': {'key': 'value', 'type': '[ApplicationGatewayFirewallRuleSet]'}, } def __init__(self, value=None): self.value = value
true
true
f746d672279269b5cf3831d23906b4f0d4b3b1ec
805
py
Python
sublimetext/FSharp/sublime_plugin_lib/context.py
ShalokShalom/zarchive-fsharpbinding
e3e1fc00c6bb027030c63c4b0d25abbb28b39797
[ "Apache-2.0" ]
182
2017-03-05T07:43:13.000Z
2022-03-15T13:09:07.000Z
sublimetext/FSharp/sublime_plugin_lib/context.py
ShalokShalom/zarchive-fsharpbinding
e3e1fc00c6bb027030c63c4b0d25abbb28b39797
[ "Apache-2.0" ]
141
2015-01-01T19:39:18.000Z
2017-04-13T14:36:18.000Z
sublimetext/FSharp/sublime_plugin_lib/context.py
ShalokShalom/zarchive-fsharpbinding
e3e1fc00c6bb027030c63c4b0d25abbb28b39797
[ "Apache-2.0" ]
37
2015-01-08T14:23:09.000Z
2017-09-10T20:58:57.000Z
# Copyright (c) 2014, Guillermo López-Anglada. Please see the AUTHORS file for details. # All rights reserved. Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file.) import sublime class ContextProviderMixin(object): '''Provides a method to evaluate contexts. Us...
33.541667
87
0.632298
import sublime class ContextProviderMixin(object): def _check(self, value, operator, operand, match_all): if operator == sublime.OP_EQUAL: if operand == True: return value elif operand == False: return not value elif operator == sublime.O...
true
true
f746d7d6cffee5503e603ec229c85d2a644dd56f
28,459
py
Python
datatableview/tests/test_datatables.py
Virako/django-datatable-view
6fda8318f146fbe8b45b8f89b0c221641975841e
[ "Apache-2.0" ]
null
null
null
datatableview/tests/test_datatables.py
Virako/django-datatable-view
6fda8318f146fbe8b45b8f89b0c221641975841e
[ "Apache-2.0" ]
null
null
null
datatableview/tests/test_datatables.py
Virako/django-datatable-view
6fda8318f146fbe8b45b8f89b0c221641975841e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from inspect import isgenerator from django.apps import apps from .testcase import DatatableViewTestCase from datatableview.exceptions import ColumnError from datatableview.datatables import Datatable, ValuesDatatable from datatableview.views import DatatableJSONResponseMixin, DatatableView fr...
38.878415
160
0.592045
from inspect import isgenerator from django.apps import apps from .testcase import DatatableViewTestCase from datatableview.exceptions import ColumnError from datatableview.datatables import Datatable, ValuesDatatable from datatableview.views import DatatableJSONResponseMixin, DatatableView from datatableview.column...
true
true
f746d8249849f52561e169f7b73fe85761cae5db
4,857
py
Python
homeassistant/components/shelly/button.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/shelly/button.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/shelly/button.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Button for Shelly.""" from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass from typing import Final, cast from homeassistant.components.button import ( ButtonDeviceClass, ButtonEntity, ButtonEntityDescription, ) from homeassistant.config_entries impo...
33.267123
85
0.70558
from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass from typing import Final, cast from homeassistant.components.button import ( ButtonDeviceClass, ButtonEntity, ButtonEntityDescription, ) from homeassistant.config_entries import ConfigEntry from homea...
true
true
f746d83c54b7d92516127ee83926b651806f07ca
534
py
Python
altair/vegalite/v2/examples/scatter_tooltips.py
alchemyst/altair
cf6284408b2828e1989712ea1e0a0c18f56db1bf
[ "BSD-3-Clause" ]
1
2019-03-08T09:29:59.000Z
2019-03-08T09:29:59.000Z
altair/vegalite/v2/examples/scatter_tooltips.py
Zhujunnan/altair
3ee552ad672eb54e7c92d8ad9dd1dfdaf60f7d26
[ "BSD-3-Clause" ]
null
null
null
altair/vegalite/v2/examples/scatter_tooltips.py
Zhujunnan/altair
3ee552ad672eb54e7c92d8ad9dd1dfdaf60f7d26
[ "BSD-3-Clause" ]
null
null
null
""" Scatter Plot with Tooltips -------------------------- A scatter plot of the cars dataset, with tooltips showing selected column values when you hover over points. We make the points larger so that it is easier to hover over them. """ # category: simple charts import altair as alt from vega_datasets import data so...
25.428571
74
0.696629
import altair as alt from vega_datasets import data source = data.cars() alt.Chart(source).mark_circle(size=60).encode( x='Horsepower', y='Miles_per_Gallon', color='Origin', tooltip=['Name', 'Origin', 'Horsepower', 'Miles_per_Gallon'] ).interactive()
true
true
f746d8c779f24e0457e8bf6fc1904e3949a959ff
8,431
py
Python
merge.py
DrPlantabyte/better-git
f53db17a0ba5956270f35a9b0f0254caa22cca31
[ "CC-BY-4.0" ]
null
null
null
merge.py
DrPlantabyte/better-git
f53db17a0ba5956270f35a9b0f0254caa22cca31
[ "CC-BY-4.0" ]
null
null
null
merge.py
DrPlantabyte/better-git
f53db17a0ba5956270f35a9b0f0254caa22cca31
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/python3 # Author: Dr. Christopher C. Hall, aka DrPlantabyte # Copyright 2021 Christopher C. Hall # Permission granted to use and redistribute this code in accordance with the Creative Commons (CC BY 4.0) License: # https://creativecommons.org/licenses/by/4.0/ from subprocess import call, Popen, PIPE, STDOUT ...
39.957346
122
0.666113
from subprocess import call, Popen, PIPE, STDOUT import os, sys, re from os import path def main(): if not merge_in_progress(): changes = run('git', 'status', '-uall', '--porcelain', capture_stdout=True, fail_msg='Cannot merge, current working directory is not in a git repository!') short', '-q',...
true
true
f746d9164d8d117bd5633aafdc008724f0680784
185
py
Python
lab3/17.bin_triangle.py
aritra1911/tnt
0ea75cc0b9e20fa3b608ac413d3b142548826a52
[ "MIT" ]
null
null
null
lab3/17.bin_triangle.py
aritra1911/tnt
0ea75cc0b9e20fa3b608ac413d3b142548826a52
[ "MIT" ]
null
null
null
lab3/17.bin_triangle.py
aritra1911/tnt
0ea75cc0b9e20fa3b608ac413d3b142548826a52
[ "MIT" ]
null
null
null
def main(): n = int(input("Enter no. of rows: ")) for i in range(n): for j in range(i+1): print(str((i + j + 1) % 2) + " ", end='') print() if __name__ == '__main__': main()
18.5
44
0.518919
def main(): n = int(input("Enter no. of rows: ")) for i in range(n): for j in range(i+1): print(str((i + j + 1) % 2) + " ", end='') print() if __name__ == '__main__': main()
true
true
f746d9b3ddfaafbeb897a2a63bc06617d2f3ff0c
3,627
py
Python
study.py
heikal-b/BirdNameStudy
e4d900e4ea55ba6691246c6eeaf93d60b5beb7fe
[ "MIT" ]
null
null
null
study.py
heikal-b/BirdNameStudy
e4d900e4ea55ba6691246c6eeaf93d60b5beb7fe
[ "MIT" ]
null
null
null
study.py
heikal-b/BirdNameStudy
e4d900e4ea55ba6691246c6eeaf93d60b5beb7fe
[ "MIT" ]
null
null
null
import pickle import nltk import measurements as msr import csv def main(): """ Collect and present data on the names of North American birds (US + Canada) :return: """ # Load list of NamedBirds birds_pickle = open('built_birds.pickle', 'rb') birds = pickle.load(birds_pickle) # Divide...
34.216981
103
0.670527
import pickle import nltk import measurements as msr import csv def main(): birds_pickle = open('built_birds.pickle', 'rb') birds = pickle.load(birds_pickle) bop_names = [b.mod_name for b in birds if b.is_bop()] nbop_names = [b.mod_name for b in birds if not b.is_bop()] cond_obs =...
true
true
f746dabd55d61f7c61004c59513948e2daa6dcc5
14,457
py
Python
ansible_collections/arista/cvp/plugins/modules/cv_facts.py
apollocreed/ansible-cvp
13c8d2e0b5e2f32807a1bcba16a66effb9f228e5
[ "Apache-2.0" ]
null
null
null
ansible_collections/arista/cvp/plugins/modules/cv_facts.py
apollocreed/ansible-cvp
13c8d2e0b5e2f32807a1bcba16a66effb9f228e5
[ "Apache-2.0" ]
null
null
null
ansible_collections/arista/cvp/plugins/modules/cv_facts.py
apollocreed/ansible-cvp
13c8d2e0b5e2f32807a1bcba16a66effb9f228e5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # coding: utf-8 -*- # # FIXME: required to pass ansible-test # GNU General Public License v3.0+ # # Copyright 2019 Arista Networks AS-EMEA # # 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 t...
32.270089
112
0.627862
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'community' } import logging from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.conne...
true
true
f746dafbbd33064edfde29842763046ad52d3214
1,671
py
Python
solarviewer/app/plot.py
RobertJaro/qt-solar-viewer
dcecdc8040f457abf8d978a5ecbff61396358c32
[ "BSD-3-Clause" ]
null
null
null
solarviewer/app/plot.py
RobertJaro/qt-solar-viewer
dcecdc8040f457abf8d978a5ecbff61396358c32
[ "BSD-3-Clause" ]
null
null
null
solarviewer/app/plot.py
RobertJaro/qt-solar-viewer
dcecdc8040f457abf8d978a5ecbff61396358c32
[ "BSD-3-Clause" ]
null
null
null
from abc import abstractmethod from matplotlib import pyplot as plt from matplotlib.backends.backend_qt5 import NavigationToolbar2QT from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from qtpy import QtWidgets from solarviewer.config.base import Viewer, DataModel from solarviewer.ui.plo...
29.315789
80
0.664273
from abc import abstractmethod from matplotlib import pyplot as plt from matplotlib.backends.backend_qt5 import NavigationToolbar2QT from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from qtpy import QtWidgets from solarviewer.config.base import Viewer, DataModel from solarviewer.ui.plo...
true
true
f746db58442ca9eda351988cd889fb7097c29789
10,508
py
Python
glanceclient/common/http.py
darren-wang/glc
dd00d2b21e81a6472b3a76d6a1c0ca56ff5391b3
[ "Apache-2.0" ]
null
null
null
glanceclient/common/http.py
darren-wang/glc
dd00d2b21e81a6472b3a76d6a1c0ca56ff5391b3
[ "Apache-2.0" ]
null
null
null
glanceclient/common/http.py
darren-wang/glc
dd00d2b21e81a6472b3a76d6a1c0ca56ff5391b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack Foundation # 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 requ...
36.741259
79
0.591073
import copy import logging import socket from oslo_utils import importutils from oslo_utils import netutils import requests try: from requests.packages.urllib3.exceptions import ProtocolError except ImportError: ProtocolError = requests.exceptions.ConnectionError import six from six.moves.urllib...
true
true
f746dc7dad357acb09f04caba4451d2162cf3379
425
py
Python
buidl/buidl/__init__.py
rugrah/ru
ebe5451709ebcc94e58f4de368fd66cc91c92d21
[ "Unlicense" ]
null
null
null
buidl/buidl/__init__.py
rugrah/ru
ebe5451709ebcc94e58f4de368fd66cc91c92d21
[ "Unlicense" ]
null
null
null
buidl/buidl/__init__.py
rugrah/ru
ebe5451709ebcc94e58f4de368fd66cc91c92d21
[ "Unlicense" ]
null
null
null
# TODO: specify what specifically to import from .block import * from .bloomfilter import * from .ecc import * from .hd import * from .helper import * from .merkleblock import * from .mnemonic import * from .network import * from .op import * from .pbkdf2 import * from .psbt import * from .script import * from .tx impo...
22.368421
43
0.745882
from .block import * from .bloomfilter import * from .ecc import * from .hd import * from .helper import * from .merkleblock import * from .mnemonic import * from .network import * from .op import * from .pbkdf2 import * from .psbt import * from .script import * from .tx import * from .witness import * from .hd impor...
true
true
f746ddff3c589b685b17d323599ac311199c3997
1,138
py
Python
server/feedback/wsgi.py
mvdbroek/geo-userfeedback
1eefa8dada63ba93a928cfd7f11fe3e6fce35243
[ "BSD-3-Clause" ]
null
null
null
server/feedback/wsgi.py
mvdbroek/geo-userfeedback
1eefa8dada63ba93a928cfd7f11fe3e6fce35243
[ "BSD-3-Clause" ]
null
null
null
server/feedback/wsgi.py
mvdbroek/geo-userfeedback
1eefa8dada63ba93a928cfd7f11fe3e6fce35243
[ "BSD-3-Clause" ]
null
null
null
""" WSGI config for feedback project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION``...
39.241379
79
0.807557
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "feedback.settings") # setting points here. from django.core.wsgi import get_wsgi_application application = get_wsgi_application() # Apply WSGI middleware here. # from helloworld.wsgi import HelloWorldApplication # application = HelloWorldApplication(applic...
true
true
f746deb5a729885bcafd104b241845b8fe92920c
1,177
py
Python
DeepLearning/Python/Chapter 1/Ch01-01-interpreter.py
BlueWay-KU/Study
a86405cdc3011eaed1b980b562b75df1e9ce90a8
[ "MIT" ]
null
null
null
DeepLearning/Python/Chapter 1/Ch01-01-interpreter.py
BlueWay-KU/Study
a86405cdc3011eaed1b980b562b75df1e9ce90a8
[ "MIT" ]
null
null
null
DeepLearning/Python/Chapter 1/Ch01-01-interpreter.py
BlueWay-KU/Study
a86405cdc3011eaed1b980b562b75df1e9ce90a8
[ "MIT" ]
null
null
null
# terminal # > python --version # > python # >>> 1 + 2 # >>> 1 - 2 # >>> 4 * 5 # >>> 7 / 5 # >>> 3 ** 2 # >>> type(10) # >>> type(2.718) # >>> type("hello") # >>> x = 10 # >>> print(x) # >>> x = 100 # >>> print(x) # >>> y = 3.14 # >>> x * y # >>> type(x * y) # >>> a = [1, 2, 3, 4, 5] # >>> print(a) ...
18.390625
41
0.372133
# ... # >>> hungry = False # >>> if hungry: # ... print("I'm hungry") # ... print("I;m sleepy") # ... # >>> for i in [1, 2, 3]: # ... print(i) # >>> def hello(): # ... print("Hello World!") # ... # >>> hello() # >>> def hello(object): # ... ...
true
true
f746df3be6a1197b1cf4c5aba9f89091ece573b4
4,096
py
Python
src/build/android/gyp/util/diff_utils.py
Mr-Sheep/naiveproxy
9f6e9768295f6d1d41517a15a621d4756bd7d6be
[ "BSD-3-Clause" ]
6
2020-12-22T05:48:31.000Z
2022-02-08T19:49:49.000Z
src/build/android/gyp/util/diff_utils.py
Mr-Sheep/naiveproxy
9f6e9768295f6d1d41517a15a621d4756bd7d6be
[ "BSD-3-Clause" ]
54
2020-06-23T17:34:04.000Z
2022-03-31T02:04:06.000Z
src/build/android/gyp/util/diff_utils.py
Mr-Sheep/naiveproxy
9f6e9768295f6d1d41517a15a621d4756bd7d6be
[ "BSD-3-Clause" ]
12
2020-07-14T23:59:57.000Z
2022-03-22T09:59:18.000Z
#!/usr/bin/env python # # Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import difflib from util import build_utils def _SkipOmitted(line): """ Skip lines that are to be intenti...
33.032258
91
0.689453
import os import sys import difflib from util import build_utils def _SkipOmitted(line): if line.rstrip().endswith('# OMIT FROM EXPECTATIONS'): return '# THIS LINE WAS OMITTED\n' return line def _GenerateDiffWithOnlyAdditons(expected_path, actual_data): # whitespace). with open(expected_...
true
true
f746dfe1c696899e4e45e7b2d4141ff280b9df0a
5,815
py
Python
fastgame/widget/label.py
stripepython/fastgame
6bf399753600ba4745b181b5256c6ff7e1c9cf88
[ "MIT" ]
1
2022-01-31T05:28:53.000Z
2022-01-31T05:28:53.000Z
fastgame/widget/label.py
stripepython/fastgame
6bf399753600ba4745b181b5256c6ff7e1c9cf88
[ "MIT" ]
null
null
null
fastgame/widget/label.py
stripepython/fastgame
6bf399753600ba4745b181b5256c6ff7e1c9cf88
[ "MIT" ]
null
null
null
""" fastgame.widget.label Fastgame文本组件。 """ from typing import Tuple import pygame import fastgame from fastgame.exceptions import * from fastgame.utils.color import * __all__ = ['Label'] class Label(pygame.sprite.Sprite): def __init__(self, text: str, font: str = None, size: int = 16, use_...
26.674312
112
0.505761
from typing import Tuple import pygame import fastgame from fastgame.exceptions import * from fastgame.utils.color import * __all__ = ['Label'] class Label(pygame.sprite.Sprite): def __init__(self, text: str, font: str = None, size: int = 16, use_sys_font: bool = False, color: C...
true
true
f746e02febfbccf656590eb5278fec9de3c4a34a
37
py
Python
src/dosertools/image_processing/__init__.py
rlearsch/dosertools
9cd3784dabdcea3f8c54e9e2236025755493e0fd
[ "MIT" ]
1
2022-03-10T18:37:31.000Z
2022-03-10T18:37:31.000Z
src/dosertools/image_processing/__init__.py
rlearsch/dosertools
9cd3784dabdcea3f8c54e9e2236025755493e0fd
[ "MIT" ]
2
2022-03-07T22:36:23.000Z
2022-03-29T23:49:42.000Z
src/dosertools/image_processing/__init__.py
rlearsch/dosertools
9cd3784dabdcea3f8c54e9e2236025755493e0fd
[ "MIT" ]
null
null
null
__all__ = ["tiff_handling","binary"]
18.5
36
0.702703
__all__ = ["tiff_handling","binary"]
true
true
f746e080e25ffb5ffc2b66fee911decc544da3e6
6,629
py
Python
azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account.py
jmalobicky/azure-sdk-for-python
61234a3d83f8fb481d1dd2386e54e888864878fd
[ "MIT" ]
1
2018-07-23T08:59:24.000Z
2018-07-23T08:59:24.000Z
azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account.py
jmalobicky/azure-sdk-for-python
61234a3d83f8fb481d1dd2386e54e888864878fd
[ "MIT" ]
null
null
null
azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account.py
jmalobicky/azure-sdk-for-python
61234a3d83f8fb481d1dd2386e54e888864878fd
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.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 ...
50.992308
122
0.683361
from .resource import Resource class DatabaseAccount(Resource): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, 'document_endpoint': {'readonly': True}, 'database_account_o...
true
true
f746e0d0b3d6b11eed2e77ec136a44ed5b9ede78
84
py
Python
Python/School/C3/exercise 6.py
abdalrhmanyasser/Abdalrhman_Rep
e0fc3caa2cc04e92f591ccd7934586986d194000
[ "CC0-1.0" ]
null
null
null
Python/School/C3/exercise 6.py
abdalrhmanyasser/Abdalrhman_Rep
e0fc3caa2cc04e92f591ccd7934586986d194000
[ "CC0-1.0" ]
null
null
null
Python/School/C3/exercise 6.py
abdalrhmanyasser/Abdalrhman_Rep
e0fc3caa2cc04e92f591ccd7934586986d194000
[ "CC0-1.0" ]
null
null
null
sec = eval(input("input secs")) print(sec, "seconds", sec//60, "min", sec%60, "sec")
42
52
0.619048
sec = eval(input("input secs")) print(sec, "seconds", sec//60, "min", sec%60, "sec")
true
true
f746e1fca8dd854b219341f61188e5f948f1ebf7
2,336
py
Python
git/__init__.py
zengqingfu1442/GitPython
f0c6e1164f390081a27de952552aa83d34035f2a
[ "BSD-3-Clause" ]
null
null
null
git/__init__.py
zengqingfu1442/GitPython
f0c6e1164f390081a27de952552aa83d34035f2a
[ "BSD-3-Clause" ]
null
null
null
git/__init__.py
zengqingfu1442/GitPython
f0c6e1164f390081a27de952552aa83d34035f2a
[ "BSD-3-Clause" ]
null
null
null
# __init__.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php # flake8: noqa # @PydevCodeAnalysisIgnore from git.exc import * # @NoMove @IgnorePep8 import inspec...
25.11828
105
0.65839
from git.exc import * import inspect import os import sys import os.path as osp from typing import Optional from git.types import PathLike __version__ = "git" def _init_externals() -> None: if __version__ == "git" and "PYOXIDIZER" not in os.environ: sys.path.insert(1, osp.join(osp.dirname(__fi...
true
true
f746e2417be82e26e63f723ad3dda8c4de184a51
14,432
py
Python
python/ccxt/__init__.py
yw910915/ccxt
fb4115b1b90a23a87687789f6715f11ac9d4fb1e
[ "MIT" ]
1
2021-06-13T06:49:03.000Z
2021-06-13T06:49:03.000Z
python/ccxt/__init__.py
yw910915/ccxt
fb4115b1b90a23a87687789f6715f11ac9d4fb1e
[ "MIT" ]
null
null
null
python/ccxt/__init__.py
yw910915/ccxt
fb4115b1b90a23a87687789f6715f11ac9d4fb1e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """CCXT: CryptoCurrency eXchange Trading Library""" # MIT License # Copyright (c) 2017 Igor Kroitor # 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 restricti...
46.25641
80
0.535754
__version__ = '1.50.91' from ccxt.base.exchange import Exchange from ccxt.base.decimal_to_precision import decimal_to_precision from ccxt.base.decimal_to_precision import TRUNCATE from ccxt.base.decimal_to_precision import ROUND from ccxt....
true
true
f746e353028bfde5efb882a546886705ad672b84
346
py
Python
ep009_generatornotcomprehension.py
jpch89/effectivepython
97ba297bf987f346219bf8de5198c0817f5146e0
[ "MIT" ]
null
null
null
ep009_generatornotcomprehension.py
jpch89/effectivepython
97ba297bf987f346219bf8de5198c0817f5146e0
[ "MIT" ]
null
null
null
ep009_generatornotcomprehension.py
jpch89/effectivepython
97ba297bf987f346219bf8de5198c0817f5146e0
[ "MIT" ]
null
null
null
value = [len(x) for x in open('ep001_version.py')] print(value) """ [11, 24, 19, 1, 4, 76, 77, 4] """ it = (len(x) for x in open('ep001_version.py')) print(it) print(next(it)) print(next(it)) """ <generator object <genexpr> at 0x0000023D58EAAA40> 11 24 """ roots = ((x, x ** 0.5) for x in it) print(next(roots)) """ (1...
15.727273
50
0.612717
value = [len(x) for x in open('ep001_version.py')] print(value) it = (len(x) for x in open('ep001_version.py')) print(it) print(next(it)) print(next(it)) roots = ((x, x ** 0.5) for x in it) print(next(roots))
true
true
f746e375889bcd3575888cb97d35b19739a76953
2,267
py
Python
popbl_servicesapp/flask_app/order/application/models.py
xetxezarreta/master-popbl1
253880b9ba358f63f666893cdbbffe7391fcd096
[ "MIT" ]
null
null
null
popbl_servicesapp/flask_app/order/application/models.py
xetxezarreta/master-popbl1
253880b9ba358f63f666893cdbbffe7391fcd096
[ "MIT" ]
1
2021-06-02T00:57:11.000Z
2021-06-02T00:57:11.000Z
popbl_servicesapp/flask_app/order/application/models.py
xetxezarreta/master-popbl1
253880b9ba358f63f666893cdbbffe7391fcd096
[ "MIT" ]
null
null
null
from sqlalchemy import Column, DateTime, Integer, String, TEXT, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.sql import func from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class BaseModel(Base): __abstract__ = True creation_date = Column(DateTime(timez...
34.876923
98
0.676224
from sqlalchemy import Column, DateTime, Integer, String, TEXT, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.sql import func from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class BaseModel(Base): __abstract__ = True creation_date = Column(DateTime(timez...
true
true
f746e3a5ab649ccd995197e2bbba67bad42f2923
1,602
py
Python
python/architectures/sentinel2-ndwi.py
geotrellis/deeplab-nlcd
9444299597e1d1bc34ee187f2092890449c188be
[ "MIT" ]
null
null
null
python/architectures/sentinel2-ndwi.py
geotrellis/deeplab-nlcd
9444299597e1d1bc34ee187f2092890449c188be
[ "MIT" ]
7
2019-08-21T20:01:12.000Z
2020-07-15T19:59:23.000Z
python/architectures/sentinel2-ndwi.py
geotrellis/deeplab-nlcd
9444299597e1d1bc34ee187f2092890449c188be
[ "MIT" ]
2
2019-08-21T20:44:18.000Z
2021-01-29T02:58:15.000Z
# The MIT License (MIT) # ===================== # # Copyright © 2020 Azavea # # 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...
37.255814
87
0.716604
class SentinelNDWI(torch.nn.Module): def __init__(self, band_count): super(SentinelNDWI, self).__init__() self.no_weights = True def forward(self, x): self.nir = x[:, 7:8, :, :] self.green = x[:, 2:3, :, :] return (self.green - self.nir)/(self...
true
true
f746e3e3e112fbe4d817f76958e6cb48a6f9f1db
10,437
py
Python
src/fireo/managers/managers.py
site-hopper/FireO
17fc675f587402c26621bcbb1c5c695ec31e3a66
[ "Apache-2.0" ]
null
null
null
src/fireo/managers/managers.py
site-hopper/FireO
17fc675f587402c26621bcbb1c5c695ec31e3a66
[ "Apache-2.0" ]
null
null
null
src/fireo/managers/managers.py
site-hopper/FireO
17fc675f587402c26621bcbb1c5c695ec31e3a66
[ "Apache-2.0" ]
null
null
null
import base64 import json from fireo.fields import NestedModel from fireo.fields.errors import FieldNotFound from fireo.queries import query_set as queries class ManagerError(Exception): pass class ManagerDescriptor: """Restrict user to get `Manager` from model instance and from abstract model""" def _...
33.451923
118
0.637444
import base64 import json from fireo.fields import NestedModel from fireo.fields.errors import FieldNotFound from fireo.queries import query_set as queries class ManagerError(Exception): pass class ManagerDescriptor: def __init__(self, manager): self.manager = manager def __get__(self, instanc...
true
true