hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08fd26c9159c2adebf4baea0234b1ab5d72ec7eb
91,545
py
Python
localstack/services/cloudformation/service_models.py
PedroPini/localstack
4e15f778a1a4b4beebd0e25646277f6ae04a28ea
[ "Apache-2.0" ]
null
null
null
localstack/services/cloudformation/service_models.py
PedroPini/localstack
4e15f778a1a4b4beebd0e25646277f6ae04a28ea
[ "Apache-2.0" ]
null
null
null
localstack/services/cloudformation/service_models.py
PedroPini/localstack
4e15f778a1a4b4beebd0e25646277f6ae04a28ea
[ "Apache-2.0" ]
null
null
null
import json import logging import os import re from moto.cloudformation.exceptions import UnformattedGetAttTemplateException from moto.core.models import CloudFormationModel from moto.ec2.utils import generate_route_id from moto.iam.models import Role as MotoRole from moto.s3.models import FakeBucket from moto.sqs.mod...
37.002829
128
0.600066
import json import logging import os import re from moto.cloudformation.exceptions import UnformattedGetAttTemplateException from moto.core.models import CloudFormationModel from moto.ec2.utils import generate_route_id from moto.iam.models import Role as MotoRole from moto.s3.models import FakeBucket from moto.sqs.mod...
true
true
08fd26dd18d5bc1b171d780be133f02f51b9c248
60,840
py
Python
tensorflow/python/keras/_impl/keras/engine/training_test.py
mohammadzainabbas/tensorflow
352142267a1a151b04c6198de83b40b7e979d1d8
[ "Apache-2.0" ]
3
2019-04-27T07:14:25.000Z
2020-12-01T14:13:04.000Z
tensorflow/python/keras/_impl/keras/engine/training_test.py
mohammadzainabbas/tensorflow
352142267a1a151b04c6198de83b40b7e979d1d8
[ "Apache-2.0" ]
6
2020-04-21T20:38:18.000Z
2020-06-16T01:00:15.000Z
tensorflow/python/keras/_impl/keras/engine/training_test.py
mohammadzainabbas/tensorflow
352142267a1a151b04c6198de83b40b7e979d1d8
[ "Apache-2.0" ]
1
2020-05-14T14:39:27.000Z
2020-05-14T14:39:27.000Z
# Copyright 2016 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...
36.171225
95
0.585306
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import unittest import numpy as np from tensorflow.python.keras._impl import keras from tensorflow.python.keras._impl.keras import testing_utils from tensorflow.python.keras._impl.keras.engine.trai...
true
true
08fd272d94e7a76c8923966e84293e21a9254c3e
1,504
py
Python
lightning_transformers/core/callback.py
maksym-taranukhin/lightning-transformers
aa7202657973b5b65c3c36eb745621043859ebc4
[ "Apache-2.0" ]
null
null
null
lightning_transformers/core/callback.py
maksym-taranukhin/lightning-transformers
aa7202657973b5b65c3c36eb745621043859ebc4
[ "Apache-2.0" ]
null
null
null
lightning_transformers/core/callback.py
maksym-taranukhin/lightning-transformers
aa7202657973b5b65c3c36eb745621043859ebc4
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # 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 i...
38.564103
78
0.748005
import time import torch from pytorch_lightning import Callback from pytorch_lightning.utilities import rank_zero_info class CUDACallback(Callback): def on_train_epoch_start(self, trainer, pl_module): torch.cuda.reset_peak_memory_stats(trainer.root_gpu) torch.cuda.synchronize(trainer.roo...
true
true
08fd27ed51bd25f88cf791bb7f25f518137a4b09
6,095
py
Python
qa/rpc-tests/test_framework/authproxy.py
mirzaei-ce/core-popbit
e4230fcbfdf8a5bca54fb636e3019c42d40f0a14
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/authproxy.py
mirzaei-ce/core-popbit
e4230fcbfdf8a5bca54fb636e3019c42d40f0a14
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/authproxy.py
mirzaei-ce/core-popbit
e4230fcbfdf8a5bca54fb636e3019c42d40f0a14
[ "MIT" ]
null
null
null
""" Copyright 2011 Jeff Garzik AuthServiceProxy has the following improvements over python-jsonrpc's ServiceProxy class: - HTTP connections persist for the life of the AuthServiceProxy object (if server supports HTTP/1.1) - sends protocol 'version', per JSON-RPC 1.1 - sends proper, incrementing 'id' ...
36.939394
105
0.62018
try: import http.client as httplib except ImportError: import httplib import base64 import decimal import json import logging try: import urllib.parse as urlparse except ImportError: import urlparse USER_AGENT = "AuthServiceProxy/0.1" HTTP_TIMEOUT = 30 log = logging.getLogger("PopbitRPC") class JS...
true
true
08fd2910c5e312e0087dae102c90d5d78cf3df70
1,125
py
Python
HER2/Practice Testing/Epoch Experiment/3_get_model.py
raktim-mondol/DeepLearningCamelyon
443fc5d17f577b99fc3b17cc1adc7000ccab642e
[ "CC0-1.0" ]
70
2018-12-14T07:16:41.000Z
2022-02-03T07:40:23.000Z
HER2/Practice Testing/Epoch Experiment/3_get_model.py
raktim-mondol/DeepLearningCamelyon
443fc5d17f577b99fc3b17cc1adc7000ccab642e
[ "CC0-1.0" ]
null
null
null
HER2/Practice Testing/Epoch Experiment/3_get_model.py
raktim-mondol/DeepLearningCamelyon
443fc5d17f577b99fc3b17cc1adc7000ccab642e
[ "CC0-1.0" ]
24
2019-02-18T16:21:25.000Z
2022-03-06T15:39:45.000Z
def get_model(): model = Sequential() model.add(Lambda(lambda x: x * 1./255., input_shape=(120, 160, 3), output_shape=(120, 160, 3))) model.add(Conv2D(32, (3, 3), input_shape=(120, 160, 3))) model.add(Activation('relu')) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(Conv2D(32, (3, 3))) ...
28.846154
99
0.616
def get_model(): model = Sequential() model.add(Lambda(lambda x: x * 1./255., input_shape=(120, 160, 3), output_shape=(120, 160, 3))) model.add(Conv2D(32, (3, 3), input_shape=(120, 160, 3))) model.add(Activation('relu')) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(Conv2D(32, (3, 3))) ...
true
true
08fd2b2553be6e15311b6af5ce9f654b6115ed03
3,230
py
Python
alipay/aop/api/domain/AlipayOpenIotvspUserCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayOpenIotvspUserCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayOpenIotvspUserCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.IotVspOrgUserAddUserInfoRequest import IotVspOrgUserAddUserInfoRequest class AlipayOpenIotvspUserCreateModel(object): def __init__(self): self._component_out_id = Non...
32.959184
100
0.608669
import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.IotVspOrgUserAddUserInfoRequest import IotVspOrgUserAddUserInfoRequest class AlipayOpenIotvspUserCreateModel(object): def __init__(self): self._component_out_id = None self._isv_pid = None self._o...
true
true
08fd2ec80d595b1132f7da0e090410607f2992fd
1,347
py
Python
2015/12/main.py
mxw7265/Advent-Of-Code-Archive
70b70ebb326fbbf09fe1bfefa1199675882d3a5b
[ "MIT" ]
null
null
null
2015/12/main.py
mxw7265/Advent-Of-Code-Archive
70b70ebb326fbbf09fe1bfefa1199675882d3a5b
[ "MIT" ]
null
null
null
2015/12/main.py
mxw7265/Advent-Of-Code-Archive
70b70ebb326fbbf09fe1bfefa1199675882d3a5b
[ "MIT" ]
null
null
null
import json from pprint import pprint FILENAME = "input.txt" def flatten_json(json_obj, ignore_red=False): result = dict() def flatten(obj, name=""): if type(obj) is dict: if ignore_red: for key in obj: if obj[key] == "red": ret...
19.808824
70
0.555308
import json from pprint import pprint FILENAME = "input.txt" def flatten_json(json_obj, ignore_red=False): result = dict() def flatten(obj, name=""): if type(obj) is dict: if ignore_red: for key in obj: if obj[key] == "red": ret...
true
true
08fd2f56b6cad794396452f8717bcb378a24a899
72,973
py
Python
tensor2tensor/layers/common_layers.py
Mistobaan/tensor2tensor
91d4e1c83f9abb1ca8fcd94a65d6b74aaa3458da
[ "Apache-2.0" ]
null
null
null
tensor2tensor/layers/common_layers.py
Mistobaan/tensor2tensor
91d4e1c83f9abb1ca8fcd94a65d6b74aaa3458da
[ "Apache-2.0" ]
null
null
null
tensor2tensor/layers/common_layers.py
Mistobaan/tensor2tensor
91d4e1c83f9abb1ca8fcd94a65d6b74aaa3458da
[ "Apache-2.0" ]
1
2021-05-31T16:43:05.000Z
2021-05-31T16:43:05.000Z
# coding=utf-8 # Copyright 2017 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
34.699477
80
0.651652
from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import defaultdict import contextlib import math import random import numpy as np from six.moves import xrange from tensor2tensor.utils import expert_utils as eu import tensorflow as tf f...
true
true
08fd2f586d755fe74e6e916dafafd427fcfa3877
25
py
Python
modules/2.79/bpy/types/RenderView.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/RenderView.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/RenderView.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
RenderView.name = None
6.25
22
0.72
RenderView.name = None
true
true
08fd31b9f67d51974a11073f592f35dcfbacb64c
3,140
py
Python
blog/views.py
naritotakizawa/django-notify-sample
c9673e98503b822adcdae738accbb30182ba6817
[ "MIT" ]
2
2019-07-29T00:24:31.000Z
2019-08-04T13:28:13.000Z
blog/views.py
naritotakizawa/django-notify-sample
c9673e98503b822adcdae738accbb30182ba6817
[ "MIT" ]
null
null
null
blog/views.py
naritotakizawa/django-notify-sample
c9673e98503b822adcdae738accbb30182ba6817
[ "MIT" ]
null
null
null
import json from django.conf import settings from django.core.mail import EmailMessage from django.core.signing import BadSignature, SignatureExpired, loads, dumps from django.http import HttpResponseBadRequest, HttpResponse from django.shortcuts import render, redirect from django.template.loader import render_t...
28.545455
89
0.638535
import json from django.conf import settings from django.core.mail import EmailMessage from django.core.signing import BadSignature, SignatureExpired, loads, dumps from django.http import HttpResponseBadRequest, HttpResponse from django.shortcuts import render, redirect from django.template.loader import render_t...
true
true
08fd32c3bb964649a66021a7d27789b15c0bd243
3,214
py
Python
tahoe-viz/genolake/tahoe/io/test/test_bed.py
genolake/tahoe
c9cab1848f7b2afc8055325f8076d2d60706ea23
[ "Apache-2.0" ]
null
null
null
tahoe-viz/genolake/tahoe/io/test/test_bed.py
genolake/tahoe
c9cab1848f7b2afc8055325f8076d2d60706ea23
[ "Apache-2.0" ]
null
null
null
tahoe-viz/genolake/tahoe/io/test/test_bed.py
genolake/tahoe
c9cab1848f7b2afc8055325f8076d2d60706ea23
[ "Apache-2.0" ]
1
2019-11-05T05:24:33.000Z
2019-11-05T05:24:33.000Z
# # Licensed to Big Data Genomics (BDG) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The BDG licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this fil...
34.55914
109
0.662103
import unittest import json import pandas as pd from genolake.tahoe.io import * import genolake.tahoe.pileup as pileup from genolake.tahoe.pileup.track import * from genolake.tahoe.io.test import IOTestCase class BedFileTest(IOTestCase): def test_required_columns(self): dataframe = read_bed(self.example...
true
true
08fd32d46a8e601d15757e0bfd78168822a2db90
35,650
py
Python
intersight/apis/hyperflex_server_firmware_version_api.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/apis/hyperflex_server_firmware_version_api.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/apis/hyperflex_server_firmware_version_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...
50
818
0.619467
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 HyperflexServerFirmwareVersionApi(object): def __init__(self, api_client=None): config = Configuration() if api_...
true
true
08fd330a0e7a0012ef83c71cfe99fb3ec4783df7
782
py
Python
tests/terraform/checks/resource/gcp/test_GoogleContainerClusterMonitoringEnabled.py
gustavotabares/checkov
79250dba0fc5227ef3027b3c1300739f063b0d05
[ "Apache-2.0" ]
null
null
null
tests/terraform/checks/resource/gcp/test_GoogleContainerClusterMonitoringEnabled.py
gustavotabares/checkov
79250dba0fc5227ef3027b3c1300739f063b0d05
[ "Apache-2.0" ]
null
null
null
tests/terraform/checks/resource/gcp/test_GoogleContainerClusterMonitoringEnabled.py
gustavotabares/checkov
79250dba0fc5227ef3027b3c1300739f063b0d05
[ "Apache-2.0" ]
null
null
null
import unittest from checkov.terraform.checks.resource.gcp.GoogleContainerClusterMonitoringEnabled import check from checkov.common.models.enums import CheckResult class GoogleContainerClusterMonitoringEnabled(unittest.TestCase): def test_failure(self): resource_conf = {'name': ['google_cluster'], 'moni...
34
105
0.750639
import unittest from checkov.terraform.checks.resource.gcp.GoogleContainerClusterMonitoringEnabled import check from checkov.common.models.enums import CheckResult class GoogleContainerClusterMonitoringEnabled(unittest.TestCase): def test_failure(self): resource_conf = {'name': ['google_cluster'], 'moni...
true
true
08fd330b0c6b6b7bf9d012141245e6dca003d1d8
4,490
py
Python
google/ads/googleads/v7/services/services/account_link_service/transports/base.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
285
2018-10-05T16:47:58.000Z
2022-03-31T00:58:39.000Z
google/ads/googleads/v7/services/services/account_link_service/transports/base.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
425
2018-09-10T13:32:41.000Z
2022-03-31T14:50:05.000Z
google/ads/googleads/v7/services/services/account_link_service/transports/base.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
369
2018-11-28T07:01:00.000Z
2022-03-28T09:53:22.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
35.078125
78
0.664588
import abc import typing import pkg_resources from google import auth from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials from google.ads.googleads.v7.resources.types import account_link from google.ads.googleads.v7.services.types import account_lin...
true
true
08fd33927ba8d3d73cad374110b62835979b1f47
1,259
py
Python
setup.py
karolrom-intel/ptf
4b63876348e173923bbb6c7035ea56057c5bb7eb
[ "Apache-2.0" ]
1
2022-01-11T11:34:41.000Z
2022-01-11T11:34:41.000Z
setup.py
richardyu-ms/ptf
405513bcad2eae3092b0ac4ceb31e8dec5e32311
[ "Apache-2.0" ]
null
null
null
setup.py
richardyu-ms/ptf
405513bcad2eae3092b0ac4ceb31e8dec5e32311
[ "Apache-2.0" ]
null
null
null
import os from setuptools import setup project_root = os.path.dirname(os.path.realpath(__file__)) with open(os.path.join(project_root, 'README.md')) as readme_file: readme = readme_file.read() with open("requirements.txt", "r") as req: requirements = [] for l in req.readlines(): requirements.appen...
28.613636
66
0.629865
import os from setuptools import setup project_root = os.path.dirname(os.path.realpath(__file__)) with open(os.path.join(project_root, 'README.md')) as readme_file: readme = readme_file.read() with open("requirements.txt", "r") as req: requirements = [] for l in req.readlines(): requirements.appen...
true
true
08fd34154221bf6c2fcbe719fa32c2271154588c
1,641
py
Python
app/main/analysis/gas_kmeans_plt.py
DXYyang/shenNeng_gasAnalysis
d94e2451d1938c090d1377dfbd487d0c6a649188
[ "MIT" ]
1
2020-02-16T04:32:15.000Z
2020-02-16T04:32:15.000Z
app/main/analysis/gas_kmeans_plt.py
DXYyang/shenNeng_gasAnalysis
d94e2451d1938c090d1377dfbd487d0c6a649188
[ "MIT" ]
null
null
null
app/main/analysis/gas_kmeans_plt.py
DXYyang/shenNeng_gasAnalysis
d94e2451d1938c090d1377dfbd487d0c6a649188
[ "MIT" ]
null
null
null
def gas_kmeans_pit(dist,list,clusters): import matplotlib.pyplot as plt from sklearn.manifold import MDS plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签 plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号 MDS() mds = MDS(n_components=2, dissimilarity="precomputed", random_state=1) ...
41.025
74
0.599025
def gas_kmeans_pit(dist,list,clusters): import matplotlib.pyplot as plt from sklearn.manifold import MDS plt.rcParams['font.sans-serif'] = ['SimHei'] plt.rcParams['axes.unicode_minus'] = False MDS() mds = MDS(n_components=2, dissimilarity="precomputed", random_state=1) pos = mds.fit_transf...
true
true
08fd343855b1e1b0dbfe7a371ed2e7e0143ce3cf
7,451
py
Python
google_trends_scraper/google_trends_scraper.py
GregHilston/Google-Trends-Scraper
fa5ccd0443bccffa99299748759491acf040e561
[ "MIT" ]
5
2019-11-15T01:49:53.000Z
2020-12-11T10:12:49.000Z
google_trends_scraper/google_trends_scraper.py
orcaorcinus-code/Google-Trends-Scraper
fa5ccd0443bccffa99299748759491acf040e561
[ "MIT" ]
6
2019-12-06T14:21:36.000Z
2021-12-13T19:37:20.000Z
google_trends_scraper/google_trends_scraper.py
orcaorcinus-code/Google-Trends-Scraper
fa5ccd0443bccffa99299748759491acf040e561
[ "MIT" ]
4
2018-12-21T19:05:57.000Z
2020-12-11T10:12:51.000Z
import sys import os import time import pandas as pd from selenium import webdriver print(f"before path: {sys.path}") # Adding geckodriver to our path so whoever imports our library can run correctly sys.path.insert(0, "google_trends_scraper") print(f"after path: {sys.path}") class GoogleTrendsScraper: original...
39.010471
199
0.653201
import sys import os import time import pandas as pd from selenium import webdriver print(f"before path: {sys.path}") sys.path.insert(0, "google_trends_scraper") print(f"after path: {sys.path}") class GoogleTrendsScraper: original_output_file_name = "multiTimeline.csv" def __init__(self, query, start_date,...
true
true
08fd344ca1f8d3a204ac70af7b46d1fd83734142
291
py
Python
main.py
Gadeonio/IT_code
6d3b0330bdf7e324c7fed1b5a241c4a295226312
[ "MIT" ]
null
null
null
main.py
Gadeonio/IT_code
6d3b0330bdf7e324c7fed1b5a241c4a295226312
[ "MIT" ]
4
2022-02-20T16:15:50.000Z
2022-02-24T15:47:23.000Z
main.py
Gadeonio/IT_code
6d3b0330bdf7e324c7fed1b5a241c4a295226312
[ "MIT" ]
null
null
null
import telebot from setting import TOKEN bot = telebot.TeleBot(TOKEN) @bot.message_handler(content_types=['text']) def get_text_messages(message): username = message.from_user.username msg = f'Кто здесь. {username}' bot.send_message(message.from_user.id, msg) bot.polling()
19.4
47
0.745704
import telebot from setting import TOKEN bot = telebot.TeleBot(TOKEN) @bot.message_handler(content_types=['text']) def get_text_messages(message): username = message.from_user.username msg = f'Кто здесь. {username}' bot.send_message(message.from_user.id, msg) bot.polling()
true
true
08fd3579ee3a50e47b060c371fa3f9237f353d80
15,494
py
Python
tests/test_tracer.py
matthewpruett/angr
bfba2af1ea2eb941001339f47a1264a685c60eec
[ "BSD-2-Clause" ]
6,132
2015-08-06T23:24:47.000Z
2022-03-31T21:49:34.000Z
tests/test_tracer.py
matthewpruett/angr
bfba2af1ea2eb941001339f47a1264a685c60eec
[ "BSD-2-Clause" ]
2,272
2015-08-10T08:40:07.000Z
2022-03-31T23:46:44.000Z
tests/test_tracer.py
matthewpruett/angr
bfba2af1ea2eb941001339f47a1264a685c60eec
[ "BSD-2-Clause" ]
1,155
2015-08-06T23:37:39.000Z
2022-03-31T05:54:11.000Z
import os import sys import logging import nose import angr from common import bin_location, do_trace, load_cgc_pov, slow_test def tracer_cgc(filename, test_name, stdin, copy_states=False, follow_unsat=False): p = angr.Project(filename) p.simos.syscall_library.update(angr.SIM_LIBRARIES['cgcabi_tracer']) ...
51.135314
451
0.68207
import os import sys import logging import nose import angr from common import bin_location, do_trace, load_cgc_pov, slow_test def tracer_cgc(filename, test_name, stdin, copy_states=False, follow_unsat=False): p = angr.Project(filename) p.simos.syscall_library.update(angr.SIM_LIBRARIES['cgcabi_tracer']) ...
true
true
08fd370c136418684980061711496af6fda616ba
3,593
py
Python
crawler/spiders/jb51.py
felixyin/qdqtrj_website
43ae31af887cfe537d6f0cff5329dac619190210
[ "MIT" ]
null
null
null
crawler/spiders/jb51.py
felixyin/qdqtrj_website
43ae31af887cfe537d6f0cff5329dac619190210
[ "MIT" ]
null
null
null
crawler/spiders/jb51.py
felixyin/qdqtrj_website
43ae31af887cfe537d6f0cff5329dac619190210
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from locale import str import scrapy from pyquery import PyQuery as pd from blog.models import Article from crawler.items import Jb51Item class Jb51Spider(scrapy.Spider): name = 'jb51' allowed_domains = ['www.jb51.cc'] start_urls = ['http://www.jb51.cc/'] # start_urls = ['htt...
40.370787
141
0.605344
from locale import str import scrapy from pyquery import PyQuery as pd from blog.models import Article from crawler.items import Jb51Item class Jb51Spider(scrapy.Spider): name = 'jb51' allowed_domains = ['www.jb51.cc'] start_urls = ['http://www.jb51.cc/'] def parse(self, response): ...
true
true
08fd37559aaaf0b063b58e348fc8eb37ae2f9e7d
655
py
Python
packages/sqlserver/setup.py
Tonkonozhenko/soda-sql
a671cc3f20b814a074f064c8a24b4a10447f40f4
[ "Apache-2.0" ]
null
null
null
packages/sqlserver/setup.py
Tonkonozhenko/soda-sql
a671cc3f20b814a074f064c8a24b4a10447f40f4
[ "Apache-2.0" ]
null
null
null
packages/sqlserver/setup.py
Tonkonozhenko/soda-sql
a671cc3f20b814a074f064c8a24b4a10447f40f4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import sys from setuptools import setup, find_namespace_packages if sys.version_info < (3, 7): print('Error: Soda SQL requires at least Python 3.7') print('Error: Please upgrade your Python version to 3.7 or later') sys.exit(1) package_name = "soda-sql-sqlserver" package_version = '2...
25.192308
70
0.720611
import sys from setuptools import setup, find_namespace_packages if sys.version_info < (3, 7): print('Error: Soda SQL requires at least Python 3.7') print('Error: Please upgrade your Python version to 3.7 or later') sys.exit(1) package_name = "soda-sql-sqlserver" package_version = '2.1.0b10' description =...
true
true
08fd37ecf6d3cbcc52b72446411a158003fee2c2
7,357
py
Python
venv/microblog legacy/microblog-0.13/app/routes.py
josueisonfire/CBBAS_git
bf3516b2d9471b4b22194d5dd669a2e2ca27f4ac
[ "MIT" ]
null
null
null
venv/microblog legacy/microblog-0.13/app/routes.py
josueisonfire/CBBAS_git
bf3516b2d9471b4b22194d5dd669a2e2ca27f4ac
[ "MIT" ]
null
null
null
venv/microblog legacy/microblog-0.13/app/routes.py
josueisonfire/CBBAS_git
bf3516b2d9471b4b22194d5dd669a2e2ca27f4ac
[ "MIT" ]
null
null
null
from datetime import datetime from flask import render_template, flash, redirect, url_for, request, g from flask_login import login_user, logout_user, current_user, login_required from werkzeug.urls import url_parse from flask_babel import _, get_locale from app import app, db from app.forms import LoginForm, Registrat...
38.518325
138
0.656654
from datetime import datetime from flask import render_template, flash, redirect, url_for, request, g from flask_login import login_user, logout_user, current_user, login_required from werkzeug.urls import url_parse from flask_babel import _, get_locale from app import app, db from app.forms import LoginForm, Registrat...
true
true
08fd393cfeb09ab25a36b8857b47216df8dac255
1,230
py
Python
data/other.py
mvitsvk/ep-website
c01e6b6fc338b013de2e8bf8611621c3bfc6bb10
[ "MIT" ]
null
null
null
data/other.py
mvitsvk/ep-website
c01e6b6fc338b013de2e8bf8611621c3bfc6bb10
[ "MIT" ]
null
null
null
data/other.py
mvitsvk/ep-website
c01e6b6fc338b013de2e8bf8611621c3bfc6bb10
[ "MIT" ]
2
2020-07-03T13:19:52.000Z
2021-03-03T08:55:17.000Z
from translator.translator import _ intro = _( "<b>EyePoint</b> – системы для локализации неисправных электронных компонентов на печатных платах, " "а также для выявления контрафактных, перемаркерованных или поврежденных компонентов в BGA корпусах на " "основе метода аналогового сигнатурного анализа (АСА)....
43.928571
120
0.745528
from translator.translator import _ intro = _( "<b>EyePoint</b> – системы для локализации неисправных электронных компонентов на печатных платах, " "а также для выявления контрафактных, перемаркерованных или поврежденных компонентов в BGA корпусах на " "основе метода аналогового сигнатурного анализа (АСА)....
true
true
08fd3941f72abc27c2c05cb16671e3fbdf78cf05
11,541
py
Python
pysnmp/RADLAN-SSL.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/RADLAN-SSL.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/RADLAN-SSL.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module RADLAN-SSL (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RADLAN-SSL # Produced by pysmi-0.3.4 at Mon Apr 29 20:41:02 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:...
140.743902
2,105
0.810328
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.impo...
true
true
08fd39495401043c19a88d4d561f79c1c01c65b1
155,271
py
Python
lib/galaxy/tools/__init__.py
martenson/galaxy
ec294714cb6e73c5d68a3f873ecd64fc5a7063ca
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/tools/__init__.py
martenson/galaxy
ec294714cb6e73c5d68a3f873ecd64fc5a7063ca
[ "CC-BY-3.0" ]
20
2015-09-30T18:56:40.000Z
2019-04-12T19:32:59.000Z
lib/galaxy/tools/__init__.py
martenson/galaxy
ec294714cb6e73c5d68a3f873ecd64fc5a7063ca
[ "CC-BY-3.0" ]
1
2017-10-24T05:45:06.000Z
2017-10-24T05:45:06.000Z
""" Classes encapsulating galaxy tools and tool configuration. """ import itertools import json import logging import os import re import tarfile import tempfile import threading from datetime import datetime from pathlib import Path from typing import cast, Dict, List, NamedTuple, Optional, Tuple, Type, Union from url...
45.440737
225
0.630053
import itertools import json import logging import os import re import tarfile import tempfile import threading from datetime import datetime from pathlib import Path from typing import cast, Dict, List, NamedTuple, Optional, Tuple, Type, Union from urllib.parse import unquote_plus import packaging.version import webo...
true
true
08fd39a777138e01c98af5f9e2dca35f3a2455b2
290
py
Python
python_base/findSmallestInt.py
GlacierBo/python_learn
f604029a1ec449d8d24bb5d40215f25df2a2b027
[ "MIT" ]
1
2018-02-12T04:56:08.000Z
2018-02-12T04:56:08.000Z
python_base/findSmallestInt.py
GlacierBo/python_learn
f604029a1ec449d8d24bb5d40215f25df2a2b027
[ "MIT" ]
null
null
null
python_base/findSmallestInt.py
GlacierBo/python_learn
f604029a1ec449d8d24bb5d40215f25df2a2b027
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2017/12/15 13:11 # @Author : glacier # @Site : # @File : findSmallestInt.py # @Software: PyCharm Edu def findSmallestInt(arr): print(min(arr)) #Code here findSmallestInt([78,56,232,12,11,43])
16.111111
37
0.568966
def findSmallestInt(arr): print(min(arr)) findSmallestInt([78,56,232,12,11,43])
true
true
08fd3b630ad5c6b954ba7752bbfae90eeb1b7a8b
826
py
Python
jaclearn/vision/coco/setup.py
dapatil211/Jacinle
7638a46dc06223a1871d88f92aade644883f40a0
[ "MIT" ]
114
2018-01-25T04:44:07.000Z
2022-03-09T14:33:42.000Z
third_party/Jacinle/jaclearn/vision/coco/setup.py
dair-iitd/1oML_workdir
37117de4abf1774548786e9534c90977d67091d8
[ "Apache-2.0" ]
7
2018-05-08T17:02:24.000Z
2022-02-09T23:44:06.000Z
third_party/Jacinle/jaclearn/vision/coco/setup.py
dair-iitd/1oML_workdir
37117de4abf1774548786e9534c90977d67091d8
[ "Apache-2.0" ]
268
2018-04-08T10:54:35.000Z
2022-03-01T07:10:02.000Z
from setuptools import setup, Extension import numpy as np # To compile and install locally run "python setup.py build_ext --inplace" # To install library to Python site-packages run "python setup.py build_ext install" ext_modules = [ Extension( 'pycocotools._mask', sources=['src/maskApi.c', 'pyco...
27.533333
84
0.600484
from setuptools import setup, Extension import numpy as np ext_modules = [ Extension( 'pycocotools._mask', sources=['src/maskApi.c', 'pycocotools/_mask.pyx'], include_dirs = [np.get_include(), 'src'], extra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99'], ) ] if ...
true
true
08fd3c002a7bdb86532b23465860bad86e3b5401
6,936
py
Python
maro/data_lib/binary_converter.py
zhawan/maro
d8c98deea4296cdcb90efd1fb59bc571cec3a2ef
[ "MIT" ]
null
null
null
maro/data_lib/binary_converter.py
zhawan/maro
d8c98deea4296cdcb90efd1fb59bc571cec3a2ef
[ "MIT" ]
null
null
null
maro/data_lib/binary_converter.py
zhawan/maro
d8c98deea4296cdcb90efd1fb59bc571cec3a2ef
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import sys import time import warnings import calendar from struct import Struct from csv import DictReader from dateutil.parser import parse as parse_dt from dateutil.tz import gettz, UTC from maro.data_lib.item_meta import BinaryMet...
31.103139
137
0.596453
import os import sys import time import warnings import calendar from struct import Struct from csv import DictReader from dateutil.parser import parse as parse_dt from dateutil.tz import gettz, UTC from maro.data_lib.item_meta import BinaryMeta from maro.data_lib.common import dtype_convert_map, header_struct, SING...
true
true
08fd3c700f0be9dc350427f91950a2225cffcaac
73,332
py
Python
cathpy/core/align.py
UCL/cathpy
b296959deb8c635f70ff7f5100302ac2bbd8f58b
[ "MIT" ]
7
2019-04-15T19:18:44.000Z
2022-02-07T20:43:45.000Z
cathpy/core/align.py
UCL/cathpy
b296959deb8c635f70ff7f5100302ac2bbd8f58b
[ "MIT" ]
14
2019-04-24T11:47:38.000Z
2021-06-09T08:43:14.000Z
cathpy/core/align.py
UCL/cathpy
b296959deb8c635f70ff7f5100302ac2bbd8f58b
[ "MIT" ]
4
2019-04-15T16:32:12.000Z
2021-03-05T02:54:51.000Z
""" Manipulate protein sequences and alignments """ # core import io import gzip import logging import re import functools from typing import List # pip import dendropy # local from cathpy.core import error as err from cathpy.core.tests import is_valid_domain_id from cathpy.core.models import ( AminoAcid, AminoA...
37.858544
144
0.550633
import io import gzip import logging import re import functools from typing import List import dendropy from cathpy.core import error as err from cathpy.core.tests import is_valid_domain_id from cathpy.core.models import ( AminoAcid, AminoAcids, Residue, SegmentBase, StringSegment, NumericSegment) LOG = logging...
true
true
08fd3cbc0b56c2aa1810587f43c65204372c7793
724
py
Python
Week7/python/config.py
Milias/ModellingSimulation
005ea39ae16f171a2b5587794d1c05be526eeb57
[ "MIT" ]
1
2016-02-19T00:58:22.000Z
2016-02-19T00:58:22.000Z
Week7/python/config.py
Milias/ModellingSimulation
005ea39ae16f171a2b5587794d1c05be526eeb57
[ "MIT" ]
null
null
null
Week7/python/config.py
Milias/ModellingSimulation
005ea39ae16f171a2b5587794d1c05be526eeb57
[ "MIT" ]
null
null
null
# -*- coding: utf8 -*- from numpy import * import json def SaveInitFile(step_size, max_parts, beta, mu, r_cut, total_steps, save_interval, filename): data = {} data["MaxParticlesNumber"] = max_parts data["StepSize"] = step_size data["Beta"] = beta data["Mu"] = mu data["RCut"] = r_cut data["TotalSteps"] =...
24.965517
94
0.632597
from numpy import * import json def SaveInitFile(step_size, max_parts, beta, mu, r_cut, total_steps, save_interval, filename): data = {} data["MaxParticlesNumber"] = max_parts data["StepSize"] = step_size data["Beta"] = beta data["Mu"] = mu data["RCut"] = r_cut data["TotalSteps"] = total_steps data["Sa...
true
true
08fd3cf4d43b84b54801855b7c3d5744ae968ca8
1,327
py
Python
superset/migrations/versions/5a7bad26f2a7_.py
franksam007/incubator-superset
a0f572eb3ea4b89cb435a8af20436f8e1d34814e
[ "Apache-2.0" ]
108
2018-01-22T11:09:59.000Z
2021-01-15T10:53:04.000Z
superset/migrations/versions/5a7bad26f2a7_.py
franksam007/incubator-superset
a0f572eb3ea4b89cb435a8af20436f8e1d34814e
[ "Apache-2.0" ]
112
2018-01-25T22:57:21.000Z
2019-08-22T20:08:48.000Z
superset/migrations/versions/5a7bad26f2a7_.py
zhwXF/Superset
14c3488c79f8f3cdbd1123e8f7a92f8746c2db09
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
24
2018-01-19T22:54:39.000Z
2020-11-12T13:04:25.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
32.365854
83
0.752072
revision = '5a7bad26f2a7' down_revision = '4e6a06bad7a8' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('dashboards', sa.Column('css', sa.Text(), nullable=True)) op.add_column('dashboards', sa.Column('description', sa.Text(), nullable=True)) def downgrade(): op.drop_column...
true
true
08fd3cf54d80310cc6781048470305fb68f421f4
429
py
Python
siga/siga/urls.py
JenniferAmaral/DjangoSpike
768237bb0f3cffe7bbdbcab38a8bae6faa78e495
[ "Apache-2.0" ]
null
null
null
siga/siga/urls.py
JenniferAmaral/DjangoSpike
768237bb0f3cffe7bbdbcab38a8bae6faa78e495
[ "Apache-2.0" ]
2
2021-03-19T03:21:17.000Z
2021-03-30T13:24:07.000Z
siga/siga/urls.py
JenniferAmaral/DjangoSpike
768237bb0f3cffe7bbdbcab38a8bae6faa78e495
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from django.urls import path, include from django.views.generic.base import TemplateView urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('django.contrib.auth.urls')), path('', TemplateView.as_view(template_name='home.html'), name='home'), pat...
33
75
0.713287
from django.contrib import admin from django.urls import path, include from django.views.generic.base import TemplateView urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('django.contrib.auth.urls')), path('', TemplateView.as_view(template_name='home.html'), name='home'), pat...
true
true
08fd3dcc083a18b0a398e2a3bbadefa9fbb13f7f
140
py
Python
javatpoint/swap.py
pavaniuriti2000/python_files
89e3c6bd95af6756b49bc8ee1fa74f900ea6c681
[ "MIT" ]
null
null
null
javatpoint/swap.py
pavaniuriti2000/python_files
89e3c6bd95af6756b49bc8ee1fa74f900ea6c681
[ "MIT" ]
null
null
null
javatpoint/swap.py
pavaniuriti2000/python_files
89e3c6bd95af6756b49bc8ee1fa74f900ea6c681
[ "MIT" ]
null
null
null
#swap two variable a=int(input("Enter a value:")) b=int(input("Enter bvalue: ")) temp=a a=b b=a print("after swap a="+str(a)+", b="+str(b))
17.5
43
0.628571
a=int(input("Enter a value:")) b=int(input("Enter bvalue: ")) temp=a a=b b=a print("after swap a="+str(a)+", b="+str(b))
true
true
08fd3e80bdb6fe1b97b4195bddf10d1bb110ea28
13,785
py
Python
dpgen/algorithms/adaptive_svt_private.py
cmla-psu/dpgen
f9ba8bd140cc8978f20c52de175ed52cb870fe09
[ "MIT" ]
null
null
null
dpgen/algorithms/adaptive_svt_private.py
cmla-psu/dpgen
f9ba8bd140cc8978f20c52de175ed52cb870fe09
[ "MIT" ]
null
null
null
dpgen/algorithms/adaptive_svt_private.py
cmla-psu/dpgen
f9ba8bd140cc8978f20c52de175ed52cb870fe09
[ "MIT" ]
null
null
null
import time import numba import numpy as np import pyswarms as ps import sympy as sp LENGTH = 100 EPSILON = 1 @numba.njit def my_assert(cond): if not cond: return 1 else: return 0 @numba.njit def unpack_inputs(all_inputs): q, dq = all_inputs[:LENGTH], all_inputs[LENGTH:2 * LENGTH] ...
45.797342
230
0.538121
import time import numba import numpy as np import pyswarms as ps import sympy as sp LENGTH = 100 EPSILON = 1 @numba.njit def my_assert(cond): if not cond: return 1 else: return 0 @numba.njit def unpack_inputs(all_inputs): q, dq = all_inputs[:LENGTH], all_inputs[LENGTH:2 * LENGTH] ...
true
true
08fd3f416164508debc95a40d00d91e6e527f131
1,735
py
Python
ostinato/blog/models.py
andrewebdev/django-ostinato
2c435dea23319be6e9011e7381afca2b4092b5a2
[ "MIT" ]
5
2015-01-28T09:56:48.000Z
2020-05-22T21:07:30.000Z
ostinato/blog/models.py
andrewebdev/django-ostinato
2c435dea23319be6e9011e7381afca2b4092b5a2
[ "MIT" ]
18
2015-02-03T15:37:22.000Z
2020-06-05T16:41:15.000Z
ostinato/blog/models.py
andrewebdev/django-ostinato
2c435dea23319be6e9011e7381afca2b4092b5a2
[ "MIT" ]
2
2015-02-23T19:34:59.000Z
2017-01-22T02:10:12.000Z
from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from ostinato.blog.managers import BlogEntryManager from ostinato.blog.workflow import BlogEntryWorkflow class BlogEntryBase(models.Model): """ Our abstract BlogEntryBase model. Us...
36.145833
77
0.673199
from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from ostinato.blog.managers import BlogEntryManager from ostinato.blog.workflow import BlogEntryWorkflow class BlogEntryBase(models.Model): title = models.CharField(_("Title"), max_len...
true
true
08fd3f72ab2400ef9e1e9f6c50e300b0c22e9a9f
1,573
py
Python
design_patterns__examples/Proxy/example.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
117
2015-12-18T07:18:27.000Z
2022-03-28T00:25:54.000Z
design_patterns__examples/Proxy/example.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
8
2018-10-03T09:38:46.000Z
2021-12-13T19:51:09.000Z
design_patterns__examples/Proxy/example.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
28
2016-08-02T17:43:47.000Z
2022-03-21T08:31:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' # SOURCE: Design Patterns: Proxy - Заместитель # SOURCE: https://ru.wikipedia.org/wiki/Заместитель_(шаблон_проектирования) class IMath: """Интерфейс для прокси и реального субъекта""" def add(self, x, y): raise NotImplementedEr...
19.6625
75
0.546726
__author__ = 'ipetrash' class IMath: def add(self, x, y): raise NotImplementedError() def sub(self, x, y): raise NotImplementedError() def mul(self, x, y): raise NotImplementedError() def div(self, x, y): raise NotImplementedError() class Math(IMath): def ...
true
true
08fd3f73017ced5402e05710752df1584135bfe7
19,486
py
Python
python/cudf/cudf/core/column/lists.py
gdaisukesuzuki/cudf
aa5c8b686b1513dba7bce168200c1259f1eda908
[ "Apache-2.0" ]
1
2021-08-19T15:45:01.000Z
2021-08-19T15:45:01.000Z
python/cudf/cudf/core/column/lists.py
gdaisukesuzuki/cudf
aa5c8b686b1513dba7bce168200c1259f1eda908
[ "Apache-2.0" ]
null
null
null
python/cudf/cudf/core/column/lists.py
gdaisukesuzuki/cudf
aa5c8b686b1513dba7bce168200c1259f1eda908
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020-2021, NVIDIA CORPORATION. import pickle from typing import Sequence import numpy as np import pyarrow as pa import cudf from cudf._lib.copying import segmented_gather from cudf._lib.lists import ( concatenate_list_elements, concatenate_rows, contains_scalar, count_elements, d...
29.840735
78
0.51945
import pickle from typing import Sequence import numpy as np import pyarrow as pa import cudf from cudf._lib.copying import segmented_gather from cudf._lib.lists import ( concatenate_list_elements, concatenate_rows, contains_scalar, count_elements, drop_list_duplicates, extract_element, s...
true
true
08fd409e0038bb7da6e43c86677b01f8e1ec4734
652
py
Python
fastapi_lazy/models/models.py
loftwah/fastapi-lazy
6012b87ab6bb1bcfe32dc0ec36093a105bdcb6a9
[ "MIT" ]
74
2021-10-02T23:30:29.000Z
2022-02-28T19:55:54.000Z
fastapi_lazy/models/models.py
loftwah/fastapi-lazy
6012b87ab6bb1bcfe32dc0ec36093a105bdcb6a9
[ "MIT" ]
11
2021-10-03T11:32:03.000Z
2022-01-27T21:40:17.000Z
fastapi_lazy/models/models.py
loftwah/fastapi-lazy
6012b87ab6bb1bcfe32dc0ec36093a105bdcb6a9
[ "MIT" ]
10
2021-10-03T03:50:22.000Z
2022-02-25T07:13:51.000Z
from pydantic import BaseModel class User(BaseModel): """ User model Args: BaseModel (pydantic.BaseModel): Base model for pydantic """ name: str email: str password: str class ShowUser(BaseModel): """ Show user model Args: BaseModel (pydantic.BaseModel): Ba...
14.173913
63
0.576687
from pydantic import BaseModel class User(BaseModel): name: str email: str password: str class ShowUser(BaseModel): name: str email: str class Config: orm_mode = True class Login(BaseModel): username: str password: str
true
true
08fd413bbb9cb2f585c00b614bee7ae50a7f21d9
944
py
Python
kubernetes/test/test_v1_endpoint_subset.py
fooka03/python
073cf4d89e532f92b57e8955b4efc3d5d5eb80cf
[ "Apache-2.0" ]
2
2020-07-02T05:47:41.000Z
2020-07-02T05:50:34.000Z
kubernetes/test/test_v1_endpoint_subset.py
fooka03/python
073cf4d89e532f92b57e8955b4efc3d5d5eb80cf
[ "Apache-2.0" ]
1
2021-03-25T23:44:49.000Z
2021-03-25T23:44:49.000Z
k8sdeployment/k8sstat/python/kubernetes/test/test_v1_endpoint_subset.py
JeffYFHuang/gpuaccounting
afa934350ebbd0634beb60b9df4a147426ea0006
[ "MIT" ]
1
2021-10-13T17:45:37.000Z
2021-10-13T17:45:37.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.15.6 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import kube...
23.6
124
0.71928
from __future__ import absolute_import import unittest import kubernetes.client from kubernetes.client.models.v1_endpoint_subset import V1EndpointSubset from kubernetes.client.rest import ApiException class TestV1EndpointSubset(unittest.TestCase): def setUp(self): pass def tearDown(self): ...
true
true
08fd41ab2c6312f2f30bff852b3609468f064ff3
291
py
Python
codeforces/1151A-MaximAndBiology.py
0x8b/HackerRank
45e1a0e2be68950505c0a75218715bd3132a428b
[ "MIT" ]
3
2019-12-04T01:22:34.000Z
2020-12-10T15:31:00.000Z
codeforces/1151A-MaximAndBiology.py
0x8b/HackerRank
45e1a0e2be68950505c0a75218715bd3132a428b
[ "MIT" ]
null
null
null
codeforces/1151A-MaximAndBiology.py
0x8b/HackerRank
45e1a0e2be68950505c0a75218715bd3132a428b
[ "MIT" ]
1
2019-12-04T01:24:01.000Z
2019-12-04T01:24:01.000Z
n = int(input()) s = input() minumum = float("inf") for i in range(n - 4 + 1): total = 0 for a, b in zip("ACTG", s[i : i + 4]): distance = abs(ord(a) - ord(b)) total += min(distance, 26 - distance) minumum = min(minumum, total) print(minumum)
18.1875
46
0.505155
n = int(input()) s = input() minumum = float("inf") for i in range(n - 4 + 1): total = 0 for a, b in zip("ACTG", s[i : i + 4]): distance = abs(ord(a) - ord(b)) total += min(distance, 26 - distance) minumum = min(minumum, total) print(minumum)
true
true
08fd41d90f59355f4356fc5e00823e93f7b80dc6
2,340
py
Python
scripts/generate_parameters.py
netneurolab/markello_transcriptome
3abbc85596a5baacd93e5e9e56c906c9dbb080f3
[ "BSD-3-Clause" ]
1
2021-12-14T18:26:58.000Z
2021-12-14T18:26:58.000Z
scripts/generate_parameters.py
netneurolab/markello_transcriptome
3abbc85596a5baacd93e5e9e56c906c9dbb080f3
[ "BSD-3-Clause" ]
null
null
null
scripts/generate_parameters.py
netneurolab/markello_transcriptome
3abbc85596a5baacd93e5e9e56c906c9dbb080f3
[ "BSD-3-Clause" ]
1
2021-12-23T21:53:26.000Z
2021-12-23T21:53:26.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generates CSVs containing all combinations of processing parameters to test """ import itertools from pathlib import Path import uuid import pandas as pd DATA_DIR = Path('./data/derivatives').resolve() # generate giant list of lists of dict with different parameter ...
33.913043
76
0.567521
import itertools from pathlib import Path import uuid import pandas as pd DATA_DIR = Path('./data/derivatives').resolve() OPTS = [ [{key: val} for val in vals] for key, vals in [ ('ibf_threshold', [0, 0.25, 0.5]), ('probe_selection', ['average', 'max_intensity', 'corr_variance', ...
true
true
08fd41efc5f0ea58125fe957585643024fe80b16
1,515
py
Python
help.py
ZhiyongTu/Face
abd6a52d5699fd74d8e2198bf9cb61064fce14c6
[ "MIT" ]
2
2020-07-06T14:43:57.000Z
2021-07-13T07:49:38.000Z
help.py
ZhiyongTu/Face
abd6a52d5699fd74d8e2198bf9cb61064fce14c6
[ "MIT" ]
null
null
null
help.py
ZhiyongTu/Face
abd6a52d5699fd74d8e2198bf9cb61064fce14c6
[ "MIT" ]
null
null
null
import sys from PyQt5.QtCore import Qt from PyQt5.QtGui import QCursor from PyQt5.QtWidgets import QMainWindow from help_ui import * class help_hh(QMainWindow, Ui_help_hh): def __init__(self, parent=None): # 设置界面 super(help_hh, self).__init__(parent) self.setWindowFlag(QtCore.Qt.FramelessW...
29.134615
75
0.640264
import sys from PyQt5.QtCore import Qt from PyQt5.QtGui import QCursor from PyQt5.QtWidgets import QMainWindow from help_ui import * class help_hh(QMainWindow, Ui_help_hh): def __init__(self, parent=None): super(help_hh, self).__init__(parent) self.setWindowFlag(QtCore.Qt.FramelessWindowHi...
true
true
08fd42016d2795899d0a5aac0bfdc94e96820923
627
py
Python
tests/gsl.pkg/rng_float.py
avalentino/pyre
7e1f0287eb7eba1c6d1ef385e5160079283ac363
[ "BSD-3-Clause" ]
25
2018-04-23T01:45:39.000Z
2021-12-10T06:01:23.000Z
tests/gsl.pkg/rng_float.py
avalentino/pyre
7e1f0287eb7eba1c6d1ef385e5160079283ac363
[ "BSD-3-Clause" ]
53
2018-05-31T04:55:00.000Z
2021-10-07T21:41:32.000Z
tests/gsl.pkg/rng_float.py
avalentino/pyre
7e1f0287eb7eba1c6d1ef385e5160079283ac363
[ "BSD-3-Clause" ]
12
2018-04-23T22:50:40.000Z
2022-02-20T17:27:23.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2021 all rights reserved # """ Instantiate the known generators """ def test(): # access the package import gsl # pick an algorithm algorithm = 'ranlxs2' # instantiate the rng rng = gsl.rng(algo...
15.292683
42
0.623604
def test(): import gsl algorithm = 'ranlxs2' rng = gsl.rng(algorithm=algorithm) assert rng.algorithm == algorithm sample = rng.float() assert sample >= 0 and sample < 1 return gsl.rng if __name__ == "__main__": test()
true
true
08fd42317b0d30bfea147affc605c4d8feef7a76
2,293
py
Python
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/UnTagLiveResourcesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/UnTagLiveResourcesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/UnTagLiveResourcesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
34.742424
80
0.746184
from aliyunsdkcore.request import RpcRequest from aliyunsdklive.endpoint import endpoint_data class UnTagLiveResourcesRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'live', '2016-11-01', 'UnTagLiveResources','live') self.set_method('POST') if hasattr(self, "endpoint_map"): setattr(self...
true
true
08fd42737719826a5e31dbd56596fface3f648cd
272
py
Python
PyMOTW/source/linecache/linecache_empty_line.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2019-01-04T05:47:50.000Z
2019-01-04T05:47:50.000Z
PyMOTW/source/linecache/linecache_empty_line.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2020-07-18T03:52:03.000Z
2020-07-18T04:18:01.000Z
PyMOTW/source/linecache/linecache_empty_line.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
2
2021-03-06T04:28:32.000Z
2021-03-06T04:59:17.000Z
#!/usr/bin/env python3 """Example use of linecache module. """ #end_pymotw_header import linecache from linecache_data import * filename = make_tempfile() # Blank lines include the newline print('BLANK : {!r}'.format(linecache.getline(filename, 8))) cleanup(filename)
18.133333
60
0.75
import linecache from linecache_data import * filename = make_tempfile() print('BLANK : {!r}'.format(linecache.getline(filename, 8))) cleanup(filename)
true
true
08fd42a1b2537faaec4b255eb4221976e0927f84
54,379
py
Python
sdk/python/pulumi_azure_native/eventgrid/v20190201preview/_inputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_native/eventgrid/v20190201preview/_inputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_native/eventgrid/v20190201preview/_inputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
40.9789
588
0.659574
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from ._enums import * __all__ = [ 'BoolEqualsAdvancedFilterArgs', 'EventHubEventSubscriptionDestinationArgs', 'EventSubscriptionFilterArgs', 'HybridConnect...
true
true
08fd42c667f4a482e2f6104eacbf95b1c1194c85
3,707
py
Python
util/test_detect_blanks.py
TiankunZhou/dials
bd5c95b73c442cceb1c61b1690fd4562acf4e337
[ "BSD-3-Clause" ]
58
2015-10-15T09:28:20.000Z
2022-03-28T20:09:38.000Z
util/test_detect_blanks.py
TiankunZhou/dials
bd5c95b73c442cceb1c61b1690fd4562acf4e337
[ "BSD-3-Clause" ]
1,741
2015-11-24T08:17:02.000Z
2022-03-31T15:46:42.000Z
util/test_detect_blanks.py
TiankunZhou/dials
bd5c95b73c442cceb1c61b1690fd4562acf4e337
[ "BSD-3-Clause" ]
45
2015-10-14T13:44:16.000Z
2022-03-22T14:45:56.000Z
import pytest from dxtbx.model import ExperimentList from dials.array_family import flex from dials.util import detect_blanks def test_blank_counts_analysis(dials_data): expts = ExperimentList.from_file( dials_data("insulin_processed") / "imported.expt", check_format=False ) refl = flex.reflecti...
28.29771
88
0.574858
import pytest from dxtbx.model import ExperimentList from dials.array_family import flex from dials.util import detect_blanks def test_blank_counts_analysis(dials_data): expts = ExperimentList.from_file( dials_data("insulin_processed") / "imported.expt", check_format=False ) refl = flex.reflecti...
true
true
08fd4364553256e7df2fe9db88780ae2fa9af5d7
5,194
py
Python
Python/Filas/fila.py
isaias0rt0n/Estrutura-de-Dados
ba4fefdc2a10534e63f8ee3c67e8ef959ee531d4
[ "MIT" ]
null
null
null
Python/Filas/fila.py
isaias0rt0n/Estrutura-de-Dados
ba4fefdc2a10534e63f8ee3c67e8ef959ee531d4
[ "MIT" ]
null
null
null
Python/Filas/fila.py
isaias0rt0n/Estrutura-de-Dados
ba4fefdc2a10534e63f8ee3c67e8ef959ee531d4
[ "MIT" ]
null
null
null
from Listas.Listas_ligadas import ListaLigada class Fila(): def __init__(self): self.__elementos = ListaLigada() # metodo verifica se esta vazia def esta_vazia(self): self.__elementos.estar_vazia() # metodo inserir na fila def enfileirar(self, elemento): self...
26.773196
141
0.499615
from Listas.Listas_ligadas import ListaLigada class Fila(): def __init__(self): self.__elementos = ListaLigada() def esta_vazia(self): self.__elementos.estar_vazia() def enfileirar(self, elemento): self.__elementos.inserir(elemento) def desenfileirar...
true
true
08fd439707bd403c2da128d5c99b6f7750418806
3,804
py
Python
auth-api/src/auth_api/services/activity_log.py
shabeeb-aot/sbc-auth
a858cfdf8755560219d3e4c8531ebab82ceae923
[ "Apache-2.0" ]
null
null
null
auth-api/src/auth_api/services/activity_log.py
shabeeb-aot/sbc-auth
a858cfdf8755560219d3e4c8531ebab82ceae923
[ "Apache-2.0" ]
null
null
null
auth-api/src/auth_api/services/activity_log.py
shabeeb-aot/sbc-auth
a858cfdf8755560219d3e4c8531ebab82ceae923
[ "Apache-2.0" ]
null
null
null
# Copyright © 2019 Province of British Columbia # # 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 agr...
37.663366
111
0.671661
from typing import Dict from flask import current_app, g from jinja2 import Environment, FileSystemLoader from sbc_common_components.tracing.service_tracing import ServiceTracing from auth_api.models import ActivityLog as ActivityLogModel from auth_api.schemas import ActivityLogSchema from auth_api.services.authoriz...
true
true
08fd43bc7ea2c93a87a3b47e19399991c52876c9
1,236
py
Python
usage/models.py
CDAT/cdat_usage2.0
d675e91a6a76232a85b1fd94b9ef3bcc26b17c6a
[ "BSD-3-Clause" ]
null
null
null
usage/models.py
CDAT/cdat_usage2.0
d675e91a6a76232a85b1fd94b9ef3bcc26b17c6a
[ "BSD-3-Clause" ]
6
2020-04-10T20:14:30.000Z
2021-12-13T19:48:36.000Z
usage/models.py
CDAT/cdat_usage2.0
d675e91a6a76232a85b1fd94b9ef3bcc26b17c6a
[ "BSD-3-Clause" ]
1
2018-10-29T20:42:22.000Z
2018-10-29T20:42:22.000Z
from django.db import models from datetime import datetime # Create your models here. class Entry(models.Model): id = models.AutoField(primary_key=True, null=False, blank=False) platform = models.CharField(max_length=1024, blank=True, null=False) platform_version = models.CharField(max_length=1024, bl...
53.73913
81
0.7589
from django.db import models from datetime import datetime class Entry(models.Model): id = models.AutoField(primary_key=True, null=False, blank=False) platform = models.CharField(max_length=1024, blank=True, null=False) platform_version = models.CharField(max_length=1024, blank=True, null=False) h...
true
true
08fd43c17c54467c712a5a8fe6e4a76ed7367577
1,640
py
Python
tests/test_scatter.py
gjeusel/plotlyink
bd855e1144f3a7598e3b6e908506a850c2bcdae8
[ "MIT" ]
3
2018-04-26T12:32:59.000Z
2018-08-28T13:53:10.000Z
tests/test_scatter.py
gjeusel/plotlyink
bd855e1144f3a7598e3b6e908506a850c2bcdae8
[ "MIT" ]
null
null
null
tests/test_scatter.py
gjeusel/plotlyink
bd855e1144f3a7598e3b6e908506a850c2bcdae8
[ "MIT" ]
null
null
null
import json from plotly.utils import PlotlyJSONEncoder from plotlyink.colors import cl from plotlyink.testing import assert_figure_equal def test_pokemon_scatter_line(pokemon_recorder): r = pokemon_recorder('pokemon_scatter_lines_noargs') fig = r.df.iplot.scatter() # Verify if default params lead to sam...
30.37037
75
0.736585
import json from plotly.utils import PlotlyJSONEncoder from plotlyink.colors import cl from plotlyink.testing import assert_figure_equal def test_pokemon_scatter_line(pokemon_recorder): r = pokemon_recorder('pokemon_scatter_lines_noargs') fig = r.df.iplot.scatter() assert_figure_equal( json....
true
true
08fd445604269a1dbf33f3b6167132123d15313a
1,798
py
Python
scripts/waypoint_to_trajectory.py
AliGhadirzadeh/yumi_follow_trajectory
d30b05c979d6dc4d79f92bb207da47d1d527f9f5
[ "MIT" ]
2
2019-09-02T04:41:44.000Z
2020-05-28T07:35:13.000Z
scripts/waypoint_to_trajectory.py
AliGhadirzadeh/yumi_follow_trajectory
d30b05c979d6dc4d79f92bb207da47d1d527f9f5
[ "MIT" ]
null
null
null
scripts/waypoint_to_trajectory.py
AliGhadirzadeh/yumi_follow_trajectory
d30b05c979d6dc4d79f92bb207da47d1d527f9f5
[ "MIT" ]
2
2019-09-02T04:42:48.000Z
2020-10-28T07:30:00.000Z
#!/usr/bin/env python import numpy as np from time import sleep from scipy import interpolate import argparse import os import matplotlib.pyplot as plt parser = argparse.ArgumentParser() parser.add_argument("--file-name", type=str, default=None, help="Filename of the waypoint file with .npy extention") parser.add_argu...
33.924528
116
0.731368
import numpy as np from time import sleep from scipy import interpolate import argparse import os import matplotlib.pyplot as plt parser = argparse.ArgumentParser() parser.add_argument("--file-name", type=str, default=None, help="Filename of the waypoint file with .npy extention") parser.add_argument("--time-step", ty...
true
true
08fd45406a256a0ca3b7c2981abe5b7e5f46a737
859
py
Python
matcher/main.py
farshadjafari/parallel_corpus_generator
2397cfa4bd9b234539c211b100bfcfb5862f87af
[ "MIT" ]
8
2018-05-01T15:47:22.000Z
2021-11-14T17:18:15.000Z
matcher/main.py
farshadjafari/parallel_corpus_generator
2397cfa4bd9b234539c211b100bfcfb5862f87af
[ "MIT" ]
1
2021-06-01T22:23:11.000Z
2021-06-01T22:23:11.000Z
matcher/main.py
farshadjafari/parallel_corpus_generator
2397cfa4bd9b234539c211b100bfcfb5862f87af
[ "MIT" ]
2
2018-10-24T14:38:29.000Z
2021-06-04T05:35:43.000Z
import sys from tqdm import tqdm from matcher import match_dialogues from subtitles.models import Language, Subtitle, Movie def match_sentence_pairs(source_language_code, destination_language_code): source_language = Language.objects.get(code=source_language_code) destination_language = Language.objects.get(...
37.347826
99
0.748545
import sys from tqdm import tqdm from matcher import match_dialogues from subtitles.models import Language, Subtitle, Movie def match_sentence_pairs(source_language_code, destination_language_code): source_language = Language.objects.get(code=source_language_code) destination_language = Language.objects.get(...
false
true
08fd45cc081082af805f4cd9045c9ffccbc72d95
1,369
py
Python
simulation&control/webots_ros/source/catkin_webots_demo/src/webots_controller/scripts/7_gyro_sensor_ros_controller.py
Hinson-A/guyueclass
e59129526729542dccefa6c7232378a00dc0175a
[ "Apache-2.0" ]
227
2021-01-20T05:34:32.000Z
2022-03-29T12:43:05.000Z
simulation&control/webots_ros/source/catkin_webots_demo/src/webots_controller/scripts/7_gyro_sensor_ros_controller.py
qifeidedasima/guyueclass
99f4a58d47a1764cc13af7ef7fe483009e830108
[ "Apache-2.0" ]
1
2021-04-22T05:56:00.000Z
2021-05-26T06:00:17.000Z
simulation&control/webots_ros/source/catkin_webots_demo/src/webots_controller/scripts/7_gyro_sensor_ros_controller.py
qifeidedasima/guyueclass
99f4a58d47a1764cc13af7ef7fe483009e830108
[ "Apache-2.0" ]
239
2021-01-28T02:59:53.000Z
2022-03-29T08:02:17.000Z
#!/usr/bin/env python # _*_ coding:UTF-8 _*_ # Author:罗伯特祥 import rospy import math from std_msgs.msg import String from webots_ros.srv import set_float from webots_ros.srv import set_int from sensor_msgs.msg import Imu gyroValue = [] def getGyroSensorValue(data): """ 传感器数据获取回调函数 """ global gyroValue w_x ...
26.843137
77
0.705625
import rospy import math from std_msgs.msg import String from webots_ros.srv import set_float from webots_ros.srv import set_int from sensor_msgs.msg import Imu gyroValue = [] def getGyroSensorValue(data): global gyroValue w_x = data.angular_velocity.x w_y = data.angular_velocity.y w_z = data.angular_...
true
true
08fd460d1ff411898699d1e8d713e7eb74529fae
1,056
py
Python
numpynn/losses.py
tranlethaison/NumpyNeuralNet
8a22784348b07e9414c70bdc3674d9a51dd81641
[ "MIT" ]
null
null
null
numpynn/losses.py
tranlethaison/NumpyNeuralNet
8a22784348b07e9414c70bdc3674d9a51dd81641
[ "MIT" ]
null
null
null
numpynn/losses.py
tranlethaison/NumpyNeuralNet
8a22784348b07e9414c70bdc3674d9a51dd81641
[ "MIT" ]
null
null
null
import numpy as np class MSE: @staticmethod def f(y, a): return np.mean(0.5 * np.sum(np.square(y - a), axis=0)) @staticmethod def df_da(y, a): """Return partial derivative wrt `a` (element-wise).""" return a - y class CrossEntropy: @staticmethod def f(y, a): ...
23.466667
80
0.519886
import numpy as np class MSE: @staticmethod def f(y, a): return np.mean(0.5 * np.sum(np.square(y - a), axis=0)) @staticmethod def df_da(y, a): return a - y class CrossEntropy: @staticmethod def f(y, a): return np.mean(-np.sum(y * np.log(a) + (1 - y) * np.log(1 - a), ...
true
true
08fd46a2ca8fba9efe03d1ee053038ec1036bdfd
1,198
py
Python
src/svg.py
diracnote/cn-vector-map
56b44f54f35d9b70086b42ec621aec9541379e57
[ "WTFPL" ]
null
null
null
src/svg.py
diracnote/cn-vector-map
56b44f54f35d9b70086b42ec621aec9541379e57
[ "WTFPL" ]
null
null
null
src/svg.py
diracnote/cn-vector-map
56b44f54f35d9b70086b42ec621aec9541379e57
[ "WTFPL" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import json import os import requests '''\ dump svg version for administrative divisions of china from mca.org.cn NOTE: some of the svg files are malformed and may outdated. ''' def dump(path, gbcode = None): if not os.path.exists(path): os.mkdir(path) if no...
29.219512
94
0.619366
import json import os import requests def dump(path, gbcode = None): if not os.path.exists(path): os.mkdir(path) if not os.path.exists(os.path.join(path, 'svg')): os.mkdir(os.path.join(path, 'svg')) if not gbcode: prefectures = requests.post('http://202.108.98.30/selectJson', '{}...
true
true
08fd47012349dd0f09834ab136a6109919deb01b
1,694
py
Python
server.py
pygraz/2020-02-04
1c557846e1d15defdbc6931dd0735aa1ebe96f52
[ "MIT" ]
2
2020-02-06T20:56:41.000Z
2020-10-22T08:36:39.000Z
server.py
pygraz/2020-02-04
1c557846e1d15defdbc6931dd0735aa1ebe96f52
[ "MIT" ]
3
2021-06-08T20:54:47.000Z
2022-03-12T00:14:05.000Z
server.py
pygraz/2020-02-04
1c557846e1d15defdbc6931dd0735aa1ebe96f52
[ "MIT" ]
null
null
null
import logging from sense_hat import SenseHat from flask import Flask, render_template from flask_socketio import SocketIO #from fake_sense_hat import SenseHat app = Flask(__name__) app.config['SECRET_KEY'] = 'secret!' socketio = SocketIO(app) _log = logging.getLogger(__name__) sense = SenseHat() pixels_matrix = [[[...
21.717949
77
0.595041
import logging from sense_hat import SenseHat from flask import Flask, render_template from flask_socketio import SocketIO app = Flask(__name__) app.config['SECRET_KEY'] = 'secret!' socketio = SocketIO(app) _log = logging.getLogger(__name__) sense = SenseHat() pixels_matrix = [[[255, 255, 255] for _ in range(8)] for...
true
true
08fd47132c10044c2b718c62f34a2e3f3bd20bfd
271
py
Python
polls/api/permissions.py
Rusich90/polls
f31e9eee66b26874217a6aae91d490653d7d801d
[ "BSD-3-Clause" ]
null
null
null
polls/api/permissions.py
Rusich90/polls
f31e9eee66b26874217a6aae91d490653d7d801d
[ "BSD-3-Clause" ]
null
null
null
polls/api/permissions.py
Rusich90/polls
f31e9eee66b26874217a6aae91d490653d7d801d
[ "BSD-3-Clause" ]
null
null
null
from rest_framework.permissions import BasePermission class AdminPermission(BasePermission): def has_permission(self, request, view): if request.method in ["POST", "DELETE", "PATCH", "PUT"]: return request.user.is_superuser return True
27.1
64
0.697417
from rest_framework.permissions import BasePermission class AdminPermission(BasePermission): def has_permission(self, request, view): if request.method in ["POST", "DELETE", "PATCH", "PUT"]: return request.user.is_superuser return True
true
true
08fd4860c536837ff673b3358af73510b8d3b73a
1,582
py
Python
src/datarightsprotocol/models/core.py
consumer-reports-digital-lab/data-rights-protocol-cert
f416d80e96f01748d7d964bd31cd857cda37c42a
[ "Apache-2.0" ]
null
null
null
src/datarightsprotocol/models/core.py
consumer-reports-digital-lab/data-rights-protocol-cert
f416d80e96f01748d7d964bd31cd857cda37c42a
[ "Apache-2.0" ]
null
null
null
src/datarightsprotocol/models/core.py
consumer-reports-digital-lab/data-rights-protocol-cert
f416d80e96f01748d7d964bd31cd857cda37c42a
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from typing import List, Optional, Set from pydantic import HttpUrl, UUID4, validator, root_validator from datarightsprotocol.models.base import BaseModel from datarightsprotocol.models.invariants import RequestMD, Action, Regime, RequestStatus, RequestReason, is_valid_state_reason from d...
30.423077
127
0.711757
from datetime import datetime from typing import List, Optional, Set from pydantic import HttpUrl, UUID4, validator, root_validator from datarightsprotocol.models.base import BaseModel from datarightsprotocol.models.invariants import RequestMD, Action, Regime, RequestStatus, RequestReason, is_valid_state_reason from d...
true
true
08fd4877a04498180300c9895c60be1d292f5c8b
4,038
py
Python
salvia/consensus/constants.py
mikando/salvia-blockchain
02181d0b5a063374f01eea951570dbc661bddc34
[ "Apache-2.0" ]
6
2021-09-13T17:20:49.000Z
2022-02-09T04:31:47.000Z
salvia/consensus/constants.py
mikando/salvia-blockchain
02181d0b5a063374f01eea951570dbc661bddc34
[ "Apache-2.0" ]
21
2021-09-20T00:56:54.000Z
2022-03-22T01:12:12.000Z
salvia/consensus/constants.py
mikando/salvia-blockchain
02181d0b5a063374f01eea951570dbc661bddc34
[ "Apache-2.0" ]
9
2021-09-13T17:54:04.000Z
2022-03-15T08:38:35.000Z
import dataclasses from salvia.types.blockchain_format.sized_bytes import bytes32 from salvia.util.byte_types import hexstr_to_bytes from salvia.util.ints import uint8, uint32, uint64, uint128 import logging log = logging.getLogger(__name__) @dataclasses.dataclass(frozen=True) class ConsensusConstants: SLOT_BLO...
49.243902
118
0.736503
import dataclasses from salvia.types.blockchain_format.sized_bytes import bytes32 from salvia.util.byte_types import hexstr_to_bytes from salvia.util.ints import uint8, uint32, uint64, uint128 import logging log = logging.getLogger(__name__) @dataclasses.dataclass(frozen=True) class ConsensusConstants: SLOT_BLO...
true
true
08fd49debdad2f1475799e1ba87d36097c8c2d0a
3,299
py
Python
src/dxtbx/format/FormatCBFMiniEigerDLS16MSN160.py
toastisme/dxtbx
fc24e215a8052e7e17be4ad4b41f9dbb474d852a
[ "BSD-3-Clause" ]
3
2019-08-16T05:46:29.000Z
2020-09-18T08:38:37.000Z
src/dxtbx/format/FormatCBFMiniEigerDLS16MSN160.py
toastisme/dxtbx
fc24e215a8052e7e17be4ad4b41f9dbb474d852a
[ "BSD-3-Clause" ]
448
2019-04-06T01:20:56.000Z
2022-03-31T15:58:48.000Z
src/dxtbx/format/FormatCBFMiniEigerDLS16MSN160.py
toastisme/dxtbx
fc24e215a8052e7e17be4ad4b41f9dbb474d852a
[ "BSD-3-Clause" ]
10
2019-04-08T13:30:32.000Z
2021-09-30T14:48:50.000Z
import sys import libtbx from scitbx.array_family import flex from dxtbx.format.FormatCBFMiniEiger import FormatCBFMiniEiger from dxtbx.masking import GoniometerMaskerFactory class FormatCBFMiniEigerDLS16MSN160(FormatCBFMiniEiger): @staticmethod def understand(image_file): """Check to see if this fo...
30.546296
86
0.615035
import sys import libtbx from scitbx.array_family import flex from dxtbx.format.FormatCBFMiniEiger import FormatCBFMiniEiger from dxtbx.masking import GoniometerMaskerFactory class FormatCBFMiniEigerDLS16MSN160(FormatCBFMiniEiger): @staticmethod def understand(image_file): header =...
true
true
08fd4b32f874cd2319517b3a1eb9b3c5843accfc
489
py
Python
ecostake/simulator/simulator_constants.py
Ecostake-Network/ecostake-blockchain
8ea8bb9743c7caccb2f8c670853d93ee12d00c86
[ "Apache-2.0" ]
2
2022-03-29T23:36:29.000Z
2022-03-30T04:18:42.000Z
ecostake/simulator/simulator_constants.py
Ecostake-Network/ecostake-blockchain
8ea8bb9743c7caccb2f8c670853d93ee12d00c86
[ "Apache-2.0" ]
11
2022-03-31T06:30:52.000Z
2022-03-31T17:02:45.000Z
ecostake/simulator/simulator_constants.py
Ecostake-Network/ecostake-blockchain
8ea8bb9743c7caccb2f8c670853d93ee12d00c86
[ "Apache-2.0" ]
null
null
null
if __name__ == "__main__": from tests.block_tools import create_block_tools, test_constants from tests.util.keyring import TempKeyring from ecostake.util.default_root import DEFAULT_ROOT_PATH with TempKeyring() as keychain: # TODO: mariano: fix this with new consensus bt = create_block_...
40.75
79
0.750511
if __name__ == "__main__": from tests.block_tools import create_block_tools, test_constants from tests.util.keyring import TempKeyring from ecostake.util.default_root import DEFAULT_ROOT_PATH with TempKeyring() as keychain: bt = create_block_tools(root_path=DEFAULT_ROOT_PATH, keychain=k...
true
true
08fd4c858430c0d5d19b7b5a6e308c682f18990a
4,305
py
Python
gcn-master/gcn-master/gcn/Forced Implementation.py
poc1673/ML-for-Networks
201ca30ab51954a7b1471740eb404b98f1d26213
[ "MIT" ]
null
null
null
gcn-master/gcn-master/gcn/Forced Implementation.py
poc1673/ML-for-Networks
201ca30ab51954a7b1471740eb404b98f1d26213
[ "MIT" ]
null
null
null
gcn-master/gcn-master/gcn/Forced Implementation.py
poc1673/ML-for-Networks
201ca30ab51954a7b1471740eb404b98f1d26213
[ "MIT" ]
1
2021-03-28T14:52:12.000Z
2021-03-28T14:52:12.000Z
# -*- coding: utf-8 -*- """ Created on Sun Dec 6 16:45:47 2020 @author: USER """ import os os.chdir("C://Users//USER//Dropbox//Projects//Work on Graphs//gcn-master//gcn-master//gcn") import setup_for_forced_procedures from __future__ import division from __future__ import print_function import tim...
34.166667
104
0.681765
import os os.chdir("C://Users//USER//Dropbox//Projects//Work on Graphs//gcn-master//gcn-master//gcn") import setup_for_forced_procedures from __future__ import division from __future__ import print_function import time import tensorflow as tf seed = 123 np.random.seed(seed) tf.set_random_see...
true
true
08fd4d1ec0ddc3137a8f5b80107518d5cad21eae
1,553
py
Python
tests/pytests/functional/pillar/test_top.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
9,425
2015-01-01T05:59:24.000Z
2022-03-31T20:44:05.000Z
tests/pytests/functional/pillar/test_top.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
33,507
2015-01-01T00:19:56.000Z
2022-03-31T23:48:20.000Z
tests/pytests/functional/pillar/test_top.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
5,810
2015-01-01T19:11:45.000Z
2022-03-31T02:37:20.000Z
import pytest import salt.pillar pytestmark = [ pytest.mark.windows_whitelisted, ] def test_pillar_top_compound_match(salt_master, pillar_state_tree, grains): """ Test that a compound match topfile that refers to a nodegroup via N@ works as expected. """ top_file_contents = """ base: ...
33.76087
79
0.654862
import pytest import salt.pillar pytestmark = [ pytest.mark.windows_whitelisted, ] def test_pillar_top_compound_match(salt_master, pillar_state_tree, grains): top_file_contents = """ base: 'N@mins not L@minion': - ng1 'N@missing_minion': - ng2 """ ng1_pillar_contents =...
true
true
08fd4e8e5bf118121e4368485e90f71a0b372643
1,519
py
Python
setup.py
STEMinds/pi-rc522
6ebdbedc72a4a1e95afbd7483993b312acf1e417
[ "MIT" ]
null
null
null
setup.py
STEMinds/pi-rc522
6ebdbedc72a4a1e95afbd7483993b312acf1e417
[ "MIT" ]
null
null
null
setup.py
STEMinds/pi-rc522
6ebdbedc72a4a1e95afbd7483993b312acf1e417
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),'RC522_Python'))) from RC522_Python import __version__ sys.path.pop(0) setup( name='RC522-Pytho...
37.04878
93
0.666228
import os import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),'RC522_Python'))) from RC522_Python import __version__ sys.path.pop(0) setup( name='RC522-Python', packages=find_...
true
true
08fd4ee5e1b2c85ee90588da4c18b434c8f36571
2,002
py
Python
day7/day7.py
hmcc/advent-of-code-2020
827c952c30aca2e72fb37818050fba1076095161
[ "MIT" ]
null
null
null
day7/day7.py
hmcc/advent-of-code-2020
827c952c30aca2e72fb37818050fba1076095161
[ "MIT" ]
null
null
null
day7/day7.py
hmcc/advent-of-code-2020
827c952c30aca2e72fb37818050fba1076095161
[ "MIT" ]
null
null
null
import re p = re.compile(r'[0-9]*\s*(.*)\s+bag[s]?') p2 = re.compile(r'([0-9]+)\s*(.*)\s+bag[s]?') def read_input(filename): rel = {} with open(filename) as file: for line in file: item = line.strip() if item: new_rel = learn_children(item) for ...
24.716049
71
0.607892
import re p = re.compile(r'[0-9]*\s*(.*)\s+bag[s]?') p2 = re.compile(r'([0-9]+)\s*(.*)\s+bag[s]?') def read_input(filename): rel = {} with open(filename) as file: for line in file: item = line.strip() if item: new_rel = learn_children(item) for ...
true
true
08fd50c9e93765fe11e8959a1a1087b85059b025
3,997
py
Python
src/features/score_images.py
LeanderK/deeptech-ai
4a2fca638d7d33acd1c255755bb62c8d88a54c02
[ "MIT" ]
1
2019-05-26T14:07:37.000Z
2019-05-26T14:07:37.000Z
src/features/score_images.py
LeanderK/deeptech-ai
4a2fca638d7d33acd1c255755bb62c8d88a54c02
[ "MIT" ]
null
null
null
src/features/score_images.py
LeanderK/deeptech-ai
4a2fca638d7d33acd1c255755bb62c8d88a54c02
[ "MIT" ]
1
2019-05-26T14:25:28.000Z
2019-05-26T14:25:28.000Z
import subprocess from subprocess import PIPE import requests import json from io import BytesIO from PIL import Image from multiprocessing import Pool as ProcessPool from tqdm import tqdm import numpy as np import random from functools import partial import time NUM_IMAGES_KEEP = 3 err_urls = [] def get_keywords(u...
33.308333
154
0.618214
import subprocess from subprocess import PIPE import requests import json from io import BytesIO from PIL import Image from multiprocessing import Pool as ProcessPool from tqdm import tqdm import numpy as np import random from functools import partial import time NUM_IMAGES_KEEP = 3 err_urls = [] def get_keywords(u...
true
true
08fd50e9db423f47f291737eedc16d18ea24c9c1
1,710
py
Python
samples/generated_samples/aiplatform_generated_aiplatform_v1_endpoint_service_undeploy_model_async.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
180
2020-09-23T17:21:15.000Z
2022-03-30T17:25:47.000Z
samples/generated_samples/aiplatform_generated_aiplatform_v1_endpoint_service_undeploy_model_async.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
601
2020-09-23T16:23:44.000Z
2022-03-31T19:08:23.000Z
samples/generated_samples/aiplatform_generated_aiplatform_v1_endpoint_service_undeploy_model_async.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
109
2020-09-23T16:22:04.000Z
2022-03-28T21:18:29.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
33.529412
85
0.761404
from google.cloud import aiplatform_v1 async def sample_undeploy_model(): client = aiplatform_v1.EndpointServiceAsyncClient() request = aiplatform_v1.UndeployModelRequest( endpoint="projects/{project}/locations/{location}/endpoints/{endpoint}", deployed_model_id="deployed_model_id...
true
true
08fd50ed9f6682eba048ce09f5aa02306c18aa07
165
py
Python
Python Pattern Programs/Alphabetic Patterns/Pattern 78 Alternative.py
arun-jain-dev/Printing-Pattern-Programs
ebfd8298e2758edeea7df822b33a8ea6425cb382
[ "MIT" ]
null
null
null
Python Pattern Programs/Alphabetic Patterns/Pattern 78 Alternative.py
arun-jain-dev/Printing-Pattern-Programs
ebfd8298e2758edeea7df822b33a8ea6425cb382
[ "MIT" ]
null
null
null
Python Pattern Programs/Alphabetic Patterns/Pattern 78 Alternative.py
arun-jain-dev/Printing-Pattern-Programs
ebfd8298e2758edeea7df822b33a8ea6425cb382
[ "MIT" ]
null
null
null
#Another way for x in range(65, 70): for y in range(65, 70): if y < x: print(chr(y), end=" ") else: print(chr(x), end=" ") print()
18.333333
29
0.466667
for x in range(65, 70): for y in range(65, 70): if y < x: print(chr(y), end=" ") else: print(chr(x), end=" ") print()
true
true
08fd51721ff54558f88552b34849cd6e16fd7454
1,192
py
Python
tests/generate_test_data.py
RhetTbull/merge_photos_libraries
e83678c5192f4c9fb3159cb7db8270d8c124ce3b
[ "MIT" ]
1
2021-12-12T19:13:38.000Z
2021-12-12T19:13:38.000Z
tests/generate_test_data.py
RhetTbull/merge_photos_libraries
e83678c5192f4c9fb3159cb7db8270d8c124ce3b
[ "MIT" ]
null
null
null
tests/generate_test_data.py
RhetTbull/merge_photos_libraries
e83678c5192f4c9fb3159cb7db8270d8c124ce3b
[ "MIT" ]
1
2021-10-11T23:20:10.000Z
2021-10-11T23:20:10.000Z
"""Generate test data for merge_photos_libraries """ import json import pathlib import osxphotos def generate_test_data(): photosdb = osxphotos.PhotosDB() photos = photosdb.photos() records = {} for p in photos: filestem = pathlib.Path(p.original_filename).stem folder_albums = p.rend...
29.073171
77
0.571309
import json import pathlib import osxphotos def generate_test_data(): photosdb = osxphotos.PhotosDB() photos = photosdb.photos() records = {} for p in photos: filestem = pathlib.Path(p.original_filename).stem folder_albums = p.render_template("{folder_album,}") folder_albums ...
true
true
08fd5217daffce5fc085f4d73f0507385af738bf
925
py
Python
win32.py
iamdaguduizhang/Small_module
c2a0046f555b56085bac7ee87f2f70ccab4e073c
[ "MIT" ]
null
null
null
win32.py
iamdaguduizhang/Small_module
c2a0046f555b56085bac7ee87f2f70ccab4e073c
[ "MIT" ]
1
2019-06-21T09:54:37.000Z
2019-06-21T09:54:37.000Z
win32.py
iamdaguduizhang/Small_module
c2a0046f555b56085bac7ee87f2f70ccab4e073c
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import win32api import win32con import win32clipboard def set_text_to_clipboard(str=None): print('set text :', str) win32clipboard.OpenClipboard() win32clipboard.EmptyClipboard() win32clipboard.SetClipboardData(win32con.CF_TEXT, str) win32clipboard.CloseClipboard() def ctr...
28.030303
77
0.727568
import win32api import win32con import win32clipboard def set_text_to_clipboard(str=None): print('set text :', str) win32clipboard.OpenClipboard() win32clipboard.EmptyClipboard() win32clipboard.SetClipboardData(win32con.CF_TEXT, str) win32clipboard.CloseClipboard() def ctrl_v(): win32api.key...
true
true
08fd522a405a7ca2abc8926d6817bd4291367b7a
3,703
py
Python
how-to-use-azureml/automated-machine-learning/continuous-retraining/upload_weather_data.py
Jaboo9/MachineLearningNotebooks
6fe90ec1bfedcd51da4fa9f709583458cbddcf3c
[ "MIT" ]
2
2019-05-03T20:20:39.000Z
2019-05-05T17:54:43.000Z
how-to-use-azureml/automated-machine-learning/continuous-retraining/upload_weather_data.py
raybellwaves/MachineLearningNotebooks
d658c85208e25aabd815bab5544e5a068449834c
[ "MIT" ]
null
null
null
how-to-use-azureml/automated-machine-learning/continuous-retraining/upload_weather_data.py
raybellwaves/MachineLearningNotebooks
d658c85208e25aabd815bab5544e5a068449834c
[ "MIT" ]
5
2019-05-03T20:20:53.000Z
2019-05-04T13:01:49.000Z
import argparse import os from datetime import datetime from dateutil.relativedelta import relativedelta import pandas as pd import traceback from azureml.core import Dataset from azureml.core.run import Run, _OfflineRun from azureml.core import Workspace from azureml.opendatasets import NoaaIsdWeather run = Run.get_c...
41.144444
103
0.621658
import argparse import os from datetime import datetime from dateutil.relativedelta import relativedelta import pandas as pd import traceback from azureml.core import Dataset from azureml.core.run import Run, _OfflineRun from azureml.core import Workspace from azureml.opendatasets import NoaaIsdWeather run = Run.get_c...
true
true
08fd543915dc3324aa7e6e75f5490ae5b59a4eab
5,106
py
Python
src/htsql/core/split_sql.py
prometheusresearch/htsql
fd2dc19d145508d956ba50970abc76e7299669b0
[ "Apache-2.0" ]
15
2020-02-11T11:24:34.000Z
2022-03-03T20:46:34.000Z
src/htsql/core/split_sql.py
prometheusresearch/htsql
fd2dc19d145508d956ba50970abc76e7299669b0
[ "Apache-2.0" ]
1
2020-02-13T14:08:34.000Z
2020-02-13T14:16:04.000Z
src/htsql/core/split_sql.py
prometheusresearch/htsql
fd2dc19d145508d956ba50970abc76e7299669b0
[ "Apache-2.0" ]
2
2020-02-13T14:10:06.000Z
2021-02-25T04:36:05.000Z
# # Copyright (c) 2006-2013, Prometheus Research, LLC # """ :mod:`htsql.core.split_sql` =========================== This module declares the SQL splitter adapter. """ from .adapter import Utility from .util import maybe import re class SQLToken: """ Declares a regular expression pattern to be used by the...
30.57485
79
0.561692
from .adapter import Utility from .util import maybe import re class SQLToken: def __init__(self, pattern, min_level=None, max_level=None, only_level=None, delta=0, is_junk=False, is_end=False): assert isinstance(pattern, str) assert isinstance(min_le...
true
true
08fd544c8f72150f954e90138822c0408c90ce53
53,784
py
Python
PRESUBMIT.py
rafaelw/mojo
d3495a129dcbe679e2d5ac729c85a58acf38f8c4
[ "BSD-3-Clause" ]
5
2015-04-30T00:13:21.000Z
2019-07-10T02:17:24.000Z
PRESUBMIT.py
rafaelw/mojo
d3495a129dcbe679e2d5ac729c85a58acf38f8c4
[ "BSD-3-Clause" ]
null
null
null
PRESUBMIT.py
rafaelw/mojo
d3495a129dcbe679e2d5ac729c85a58acf38f8c4
[ "BSD-3-Clause" ]
1
2019-05-12T13:53:44.000Z
2019-05-12T13:53:44.000Z
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Top-level presubmit script for Chromium. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presu...
35.97592
102
0.655232
"""Top-level presubmit script for Chromium. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built into gcl. """ _EXCLUDED_PATHS = ( r"^breakpad[\\\/].*", r"^native_client_sdk[\\\/]src[\\\/]build_tools[\\\/]make_rules.py", r"^native_cli...
false
true
08fd552fdd19d63552b1090084f8b643143fed84
3,222
py
Python
func/core/lang.py
zenieldanaku/pygpj
b65e4a4b7d2f49a234558050a2f2cae6d06cb4b5
[ "MIT" ]
null
null
null
func/core/lang.py
zenieldanaku/pygpj
b65e4a4b7d2f49a234558050a2f2cae6d06cb4b5
[ "MIT" ]
2
2017-08-17T16:13:15.000Z
2017-08-17T16:15:32.000Z
func/core/lang.py
zenieldanaku/pygpj
b65e4a4b7d2f49a234558050a2f2cae6d06cb4b5
[ "MIT" ]
null
null
null
#lang.py import os import func.core.config as config def t (string): if string in config.textos: string = config.textos[string] return string def sel_idioma (): carpeta = 'func/data/' langs = [] for i in os.listdir(carpeta): if os.path.exists(carpeta+i+'/nombre.txt'): ...
31.588235
84
0.50869
import os import func.core.config as config def t (string): if string in config.textos: string = config.textos[string] return string def sel_idioma (): carpeta = 'func/data/' langs = [] for i in os.listdir(carpeta): if os.path.exists(carpeta+i+'/nombre.txt'): ar = ...
true
true
08fd554e5ecb6d10bb90d39935bd877ae1fb0166
1,912
py
Python
desktop/core/ext-py/Django-1.11/tests/str/tests.py
kokosing/hue
2307f5379a35aae9be871e836432e6f45138b3d9
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
tests/str/tests.py
287977288/test
142e3626ab3c676574631383ae6b5a4eced5a10e
[ "PSF-2.0", "BSD-3-Clause" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
tests/str/tests.py
287977288/test
142e3626ab3c676574631383ae6b5a4eced5a10e
[ "PSF-2.0", "BSD-3-Clause" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from unittest import skipIf from django.db import models from django.test import TestCase from django.test.utils import isolate_apps from django.utils import six from .models import Article, InternationalArticle class SimpleTests(TestC...
34.763636
80
0.643828
from __future__ import unicode_literals import datetime from unittest import skipIf from django.db import models from django.test import TestCase from django.test.utils import isolate_apps from django.utils import six from .models import Article, InternationalArticle class SimpleTests(TestCase): @skipIf(six.P...
true
true
08fd567005bb9d9ea8ed344e2299dbd53e31775c
18,459
py
Python
OptimizeBeacons.py
davisjk/NguIndustriesCalcs
c9d63373666f182357cae24e12378976df87f4e5
[ "MIT" ]
null
null
null
OptimizeBeacons.py
davisjk/NguIndustriesCalcs
c9d63373666f182357cae24e12378976df87f4e5
[ "MIT" ]
null
null
null
OptimizeBeacons.py
davisjk/NguIndustriesCalcs
c9d63373666f182357cae24e12378976df87f4e5
[ "MIT" ]
null
null
null
#! /bin/python3 import logging import os import sys from argparse import ArgumentParser from copy import deepcopy from math import ceil from time import time class NguiBeaconOptimizer: # constants all_combos = [(True, False, True, False), (False, True, True, False), (True, True, Tr...
45.465517
234
0.604312
import logging import os import sys from argparse import ArgumentParser from copy import deepcopy from math import ceil from time import time class NguiBeaconOptimizer: all_combos = [(True, False, True, False), (False, True, True, False), (True, True, True, False), ...
true
true
08fd56cc227e57157ae634fa53e28d0c58728c95
1,179
py
Python
myLib.py
vv31415926/python_lesson_07_UltraLite
8bd3a8b238a0e8eebe93c9ec37982366421b8821
[ "MIT" ]
null
null
null
myLib.py
vv31415926/python_lesson_07_UltraLite
8bd3a8b238a0e8eebe93c9ec37982366421b8821
[ "MIT" ]
null
null
null
myLib.py
vv31415926/python_lesson_07_UltraLite
8bd3a8b238a0e8eebe93c9ec37982366421b8821
[ "MIT" ]
null
null
null
from docx.shared import Cm from docxtpl import DocxTemplate, InlineImage def getContext( data ): dic = { 'model': '', 'volume': '', 'type': '', 'power': '', 'transmission': '', 'ntransmission': '', 'drive': '', 'body': '', 'country': '' }...
24.061224
103
0.444444
from docx.shared import Cm from docxtpl import DocxTemplate, InlineImage def getContext( data ): dic = { 'model': '', 'volume': '', 'type': '', 'power': '', 'transmission': '', 'ntransmission': '', 'drive': '', 'body': '', 'country': '' }...
true
true
08fd56ec3234618e1a744fc02e1a1e4b423cf7ac
350
py
Python
server.py
thomas-roux/MLproject
9d4eace9bb3934c205faddeaff2e86311679c1c6
[ "MIT" ]
null
null
null
server.py
thomas-roux/MLproject
9d4eace9bb3934c205faddeaff2e86311679c1c6
[ "MIT" ]
null
null
null
server.py
thomas-roux/MLproject
9d4eace9bb3934c205faddeaff2e86311679c1c6
[ "MIT" ]
null
null
null
#Import modules from flask import Flask, url_for, request, redirect, abort, jsonify # Create server instance app = Flask(__name__, static_url_path='', static_folder='staticpages') #Direct to root @app.route('/') def home(): return app.send_static_file('index.html') #Runs programe when called if __name__ == "__ma...
25
70
0.737143
from flask import Flask, url_for, request, redirect, abort, jsonify app = Flask(__name__, static_url_path='', static_folder='staticpages') @app.route('/') def home(): return app.send_static_file('index.html') if __name__ == "__main__": app.run(debug=True)
true
true
08fd578eb963ba32e8d28d30c170501ad205ee08
5,200
py
Python
recognition/model.py
watanka/CRAFTS_implementation
29ae4c016ebf93bc1a0355220dd12cb65295a7ad
[ "Apache-2.0" ]
null
null
null
recognition/model.py
watanka/CRAFTS_implementation
29ae4c016ebf93bc1a0355220dd12cb65295a7ad
[ "Apache-2.0" ]
null
null
null
recognition/model.py
watanka/CRAFTS_implementation
29ae4c016ebf93bc1a0355220dd12cb65295a7ad
[ "Apache-2.0" ]
null
null
null
""" Copyright (c) 2019-present NAVER 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 Unless required by applicable law or agreed to in writing,...
45.614035
150
0.635577
import torch.nn as nn from recognition.modules.transformation import TPS_SpatialTransformerNetwork from recognition.modules.feature_extraction import VGG_FeatureExtractor, RCNN_FeatureExtractor, ResNet_FeatureExtractor, SimpleResNet_FeatureExtractor from recognition.modules.sequence_modeling import BidirectionalLSTM ...
true
true
08fd581dd976ab6b6997ac034cb42d42aadf645c
1,453
bzl
Python
cc/private/rules_impl/cc_flags_supplier.bzl
veprbl/rules_cc
081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e
[ "Apache-2.0" ]
96
2018-12-15T00:47:41.000Z
2022-03-31T06:23:14.000Z
cc/private/rules_impl/cc_flags_supplier.bzl
veprbl/rules_cc
081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e
[ "Apache-2.0" ]
83
2019-02-05T14:48:25.000Z
2022-03-17T11:53:31.000Z
cc/private/rules_impl/cc_flags_supplier.bzl
veprbl/rules_cc
081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e
[ "Apache-2.0" ]
74
2019-01-18T09:14:49.000Z
2022-03-20T18:34:07.000Z
# Copyright 2018 The Bazel 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 applicable la...
40.361111
101
0.746731
load("//cc:action_names.bzl", "CC_FLAGS_MAKE_VARIABLE_ACTION_NAME") load("//cc:find_cc_toolchain.bzl", "find_cc_toolchain") load("//cc/private/rules_impl:cc_flags_supplier_lib.bzl", "build_cc_flags") def _cc_flags_supplier_impl(ctx): cc_toolchain = find_cc_toolchain(ctx) cc_flags = build_cc_flags(ctx, cc_tool...
true
true
08fd5859180f50fb22c63dfc9ff7acebee2a2509
1,763
py
Python
xcha/types/blockchain_format/tree_hash.py
xchaio/xcha-blockchain
7de0ba89056236e30069aef12fe25843f6093bcf
[ "Apache-2.0" ]
4
2021-09-07T20:29:13.000Z
2021-10-21T09:03:33.000Z
xcha/types/blockchain_format/tree_hash.py
xchaio/xcha-blockchain
7de0ba89056236e30069aef12fe25843f6093bcf
[ "Apache-2.0" ]
2
2021-08-30T08:11:15.000Z
2021-09-21T11:14:32.000Z
xcha/types/blockchain_format/tree_hash.py
xchaio/xcha-blockchain
7de0ba89056236e30069aef12fe25843f6093bcf
[ "Apache-2.0" ]
2
2021-10-04T16:55:51.000Z
2022-03-15T08:47:53.000Z
""" This is an implementation of `sha256_treehash`, used to calculate puzzle hashes in clvm. This implementation goes to great pains to be non-recursive so we don't have to worry about blowing out the python stack. """ from typing import Optional, Set from clvm import CLVMObject from xcha.types.blockchain_format.si...
29.881356
95
0.633579
from typing import Optional, Set from clvm import CLVMObject from xcha.types.blockchain_format.sized_bytes import bytes32 from xcha.util.hash import std_hash def sha256_treehash(sexp: CLVMObject, precalculated: Optional[Set[bytes32]] = None) -> bytes32: if precalculated is None: precalculated = set() ...
true
true
08fd58ed836a5c5698b25609278b6fc848d2077a
10,641
py
Python
experiments/train/src/gcn.py
Behrouz-Babaki/NCG4CVRP
87d63366c0b461f44ce8e982159a1e207af77b44
[ "MIT" ]
1
2022-03-06T04:43:37.000Z
2022-03-06T04:43:37.000Z
experiments/train/src/gcn.py
Behrouz-Babaki/NCG4CVRP
87d63366c0b461f44ce8e982159a1e207af77b44
[ "MIT" ]
null
null
null
experiments/train/src/gcn.py
Behrouz-Babaki/NCG4CVRP
87d63366c0b461f44ce8e982159a1e207af77b44
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F class PreNormException(Exception): pass class PreNormLayer(nn.Module): """ Our pre-normalization layer, whose purpose is to normalize an input layer to zero mean and unit variance to speed-up and stabilize GCN training. The layer's...
32.842593
143
0.614698
import torch import torch.nn as nn import torch.nn.functional as F class PreNormException(Exception): pass class PreNormLayer(nn.Module): def __init__(self, n_units, shift=True, scale=True): super(PreNormLayer, self).__init__() assert shift or scale if shift: self.register...
true
true
08fd5917983925298ff7b9e599dd4207c96f1a81
5,710
py
Python
tools.py
vaibhav02498/NumberPlateDetection
043183f5e7c0cf31ddfcf5179799c4d99f413ed4
[ "Apache-2.0" ]
null
null
null
tools.py
vaibhav02498/NumberPlateDetection
043183f5e7c0cf31ddfcf5179799c4d99f413ed4
[ "Apache-2.0" ]
null
null
null
tools.py
vaibhav02498/NumberPlateDetection
043183f5e7c0cf31ddfcf5179799c4d99f413ed4
[ "Apache-2.0" ]
null
null
null
""" Author : Vaibhav Goyal : Automatic licence plate detection and recognition """ from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier from sklearn.externals import joblib from matplotlib import pyplot as plt import scipy.ndimage import numpy as np import cv2 import...
26.192661
113
0.586865
from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier from sklearn.externals import joblib from matplotlib import pyplot as plt import scipy.ndimage import numpy as np import cv2 import os def square(img): squared_image = img h = img.shape[0] w ...
true
true
08fd5a0bf7bee11fc5a63d043d4c88f30dc2312b
25,892
py
Python
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pool_databases_operations.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
1
2021-09-07T18:39:05.000Z
2021-09-07T18:39:05.000Z
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pool_databases_operations.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
null
null
null
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pool_databases_operations.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.153298
241
0.670362
import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error f...
true
true
08fd5b69576c8a8234ee7cc8c00b1035599f2389
917
py
Python
aoc/day03/part2.py
Whatapalaver/aoc_21
6cf13aa09fcda60cf4f505f789ed145c3db25bf4
[ "MIT" ]
null
null
null
aoc/day03/part2.py
Whatapalaver/aoc_21
6cf13aa09fcda60cf4f505f789ed145c3db25bf4
[ "MIT" ]
null
null
null
aoc/day03/part2.py
Whatapalaver/aoc_21
6cf13aa09fcda60cf4f505f789ed145c3db25bf4
[ "MIT" ]
null
null
null
# Advent of Code - Day 3 - Part Two def process(input, position=0, commonest=True): zero_starts = [number for number in input if list(number)[position] == "0"] one_starts = [number for number in input if list(number)[position] == "1"] if len(zero_starts) > len(one_starts): if commonest: ...
26.970588
79
0.623773
def process(input, position=0, commonest=True): zero_starts = [number for number in input if list(number)[position] == "0"] one_starts = [number for number in input if list(number)[position] == "1"] if len(zero_starts) > len(one_starts): if commonest: input = zero_starts else: ...
true
true
08fd5f80aa7c4292d6a1dbe6b6136ab57693e856
11,021
py
Python
lesson6/hw7.py
sergiikyzyma/goit-python
d50a641b33017917a969d11dbd3804aab2ae8380
[ "MIT" ]
null
null
null
lesson6/hw7.py
sergiikyzyma/goit-python
d50a641b33017917a969d11dbd3804aab2ae8380
[ "MIT" ]
null
null
null
lesson6/hw7.py
sergiikyzyma/goit-python
d50a641b33017917a969d11dbd3804aab2ae8380
[ "MIT" ]
1
2020-12-27T08:55:10.000Z
2020-12-27T08:55:10.000Z
import os import pathlib import shutil import string import sys cortFolder = ("folder") cortImage = ("jpeg", "png", "jpg", "svg") cortVideo = ("avi", "mp4", "mov", "mpg") cortText = ("doc", "dcox", "txt", "odt") cortMusic = ("mp3", "ogg", "wav", "amr") cortArchive = ("zip", "eg", "tar", "gz") cortVarious = ("max", "vs...
46.897872
228
0.565375
import os import pathlib import shutil import string import sys cortFolder = ("folder") cortImage = ("jpeg", "png", "jpg", "svg") cortVideo = ("avi", "mp4", "mov", "mpg") cortText = ("doc", "dcox", "txt", "odt") cortMusic = ("mp3", "ogg", "wav", "amr") cortArchive = ("zip", "eg", "tar", "gz") cortVarious = ("max", "vs...
true
true
08fd5fd0332d5498439b81cac89ba39c81a0ceee
439
py
Python
blender/arm/logicnode/input/LN_get_gamepad_started.py
onelsonic/armory
55cfead0844923d419d75bf4bd677ebed714b4b5
[ "Zlib" ]
2,583
2016-07-27T08:25:47.000Z
2022-03-31T10:42:17.000Z
blender/arm/logicnode/input/LN_get_gamepad_started.py
N8n5h/armory
5b4d24f067a2354bafd3ab417bb8e30ee0c5aff8
[ "Zlib" ]
2,122
2016-07-31T14:20:04.000Z
2022-03-31T20:44:14.000Z
blender/arm/logicnode/input/LN_get_gamepad_started.py
N8n5h/armory
5b4d24f067a2354bafd3ab417bb8e30ee0c5aff8
[ "Zlib" ]
451
2016-08-12T05:52:58.000Z
2022-03-31T01:33:07.000Z
from arm.logicnode.arm_nodes import * class GetGamepadStartedNode(ArmLogicTreeNode): """.""" bl_idname = 'LNGetGamepadStartedNode' bl_label = 'Get Gamepad Started' arm_version = 1 def arm_init(self, context): self.add_input('ArmNodeSocketAction', 'In') self.add_input('ArmIntSocket'...
29.266667
53
0.681093
from arm.logicnode.arm_nodes import * class GetGamepadStartedNode(ArmLogicTreeNode): bl_idname = 'LNGetGamepadStartedNode' bl_label = 'Get Gamepad Started' arm_version = 1 def arm_init(self, context): self.add_input('ArmNodeSocketAction', 'In') self.add_input('ArmIntSocket', 'Index') ...
true
true
08fd6031d2c3b23b1a19c94ba36cd6602360b07f
1,330
py
Python
jdcloud_sdk/services/waf/models/TopN.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
jdcloud_sdk/services/waf/models/TopN.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
jdcloud_sdk/services/waf/models/TopN.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
35
133
0.704511
class TopN(object): def __init__(self, addr_top10=None, area_top10=None, url_top10=None, ua_top10=None, domain_anti_top10=None, url_anti_top10=None): self.addr_top10 = addr_top10 self.area_top10 = area_top10 self.url_top10 = url_top10 self.ua_top10 = ua_top10 self.domain...
true
true
08fd608c289a82d9aa84ea143c4a0caa9365a6e9
12,529
py
Python
brainbox/examples/plot_all_peths.py
ekellbuch/ibllib
6948f86c3f426cbebb39cc693f612d25079d7ef2
[ "MIT" ]
null
null
null
brainbox/examples/plot_all_peths.py
ekellbuch/ibllib
6948f86c3f426cbebb39cc693f612d25079d7ef2
[ "MIT" ]
null
null
null
brainbox/examples/plot_all_peths.py
ekellbuch/ibllib
6948f86c3f426cbebb39cc693f612d25079d7ef2
[ "MIT" ]
null
null
null
import numpy as np import os import matplotlib.pyplot as plt from pathlib import Path from brainbox.singlecell import peths from oneibl.one import ONE import alf.io as ioalf def get_session_path(sess_data_info): """ Return local session path given output of one.search Example usage: one = ONE() ...
37.28869
97
0.602283
import numpy as np import os import matplotlib.pyplot as plt from pathlib import Path from brainbox.singlecell import peths from oneibl.one import ONE import alf.io as ioalf def get_session_path(sess_data_info): alf_file = None fid = 0 while alf_file is None: tmp = np.where( [part == ...
true
true
08fd6092cdb80ec3b92fda56bc09a7c23ff1cb8a
27,979
py
Python
tests/ignite/contrib/handlers/test_visdom_logger.py
maxfrei750/ignite
0e97cb289f64de9679a04f18969c6e761aa146b0
[ "BSD-3-Clause" ]
null
null
null
tests/ignite/contrib/handlers/test_visdom_logger.py
maxfrei750/ignite
0e97cb289f64de9679a04f18969c6e761aa146b0
[ "BSD-3-Clause" ]
null
null
null
tests/ignite/contrib/handlers/test_visdom_logger.py
maxfrei750/ignite
0e97cb289f64de9679a04f18969c6e761aa146b0
[ "BSD-3-Clause" ]
null
null
null
import torch import pytest from unittest.mock import MagicMock, call, ANY from ignite.engine import Engine, Events, State from ignite.contrib.handlers.visdom_logger import * from ignite.contrib.handlers.visdom_logger import _DummyExecutor @pytest.fixture def visdom_server(): import time import subprocess ...
37.656797
119
0.645091
import torch import pytest from unittest.mock import MagicMock, call, ANY from ignite.engine import Engine, Events, State from ignite.contrib.handlers.visdom_logger import * from ignite.contrib.handlers.visdom_logger import _DummyExecutor @pytest.fixture def visdom_server(): import time import subprocess ...
true
true
08fd60a17acc8ac7a5cb951eb00f0964a8011827
3,106
py
Python
src/poolmonitor/uniswap.py
aleph-im/poolmonitor
8c370514bf2adec782270d8a76ec977ddfb04bab
[ "MIT" ]
2
2020-07-29T06:27:16.000Z
2020-08-10T02:33:39.000Z
src/poolmonitor/uniswap.py
aleph-im/poolmonitor
8c370514bf2adec782270d8a76ec977ddfb04bab
[ "MIT" ]
null
null
null
src/poolmonitor/uniswap.py
aleph-im/poolmonitor
8c370514bf2adec782270d8a76ec977ddfb04bab
[ "MIT" ]
1
2020-11-08T02:03:33.000Z
2020-11-08T02:03:33.000Z
import json import os from pathlib import Path from .settings import config from .ethereum import get_web3, get_logs from web3 import Web3 from web3._utils.events import ( construct_event_topic_set, ) from web3.middleware import geth_poa_middleware, local_filter_middleware from web3.contract import get_event_data...
35.701149
107
0.667096
import json import os from pathlib import Path from .settings import config from .ethereum import get_web3, get_logs from web3 import Web3 from web3._utils.events import ( construct_event_topic_set, ) from web3.middleware import geth_poa_middleware, local_filter_middleware from web3.contract import get_event_data...
true
true
08fd60acee94a82d9f5e5ce298d15ccd6faecf49
3,535
py
Python
setup.py
YANHAOsTHINGSdb/QUANTAXIS
8bc1706a13ea74ba2f0ff4df7ce5f29d9add0143
[ "MIT" ]
5
2017-12-05T08:13:10.000Z
2021-12-02T07:25:17.000Z
setup.py
YANHAOsTHINGSdb/QUANTAXIS
8bc1706a13ea74ba2f0ff4df7ce5f29d9add0143
[ "MIT" ]
1
2017-12-17T04:57:53.000Z
2017-12-17T04:57:53.000Z
setup.py
YANHAOsTHINGSdb/QUANTAXIS
8bc1706a13ea74ba2f0ff4df7ce5f29d9add0143
[ "MIT" ]
6
2017-11-27T02:26:39.000Z
2022-02-19T03:08:21.000Z
# coding=utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2017 yutiansut/QUANTAXIS # # 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 th...
31.008772
125
0.684583
import codecs import os import sys import QUANTAXIS try: from setuptools import setup except: from distutils.core import setup if sys.version_info.major != 3 or sys.version_info.minor not in [4, 5, 6]: print('wrong version, should be 3.4/3.5/3.6 version') sys.exit() def read(fname): return code...
true
true
08fd61a59013765c65c20cd7f671f686d23f1706
70
py
Python
guild/tests/samples/projects/op-main-package/src/pkg/main_impl.py
guildai/guild-cli
d3db493fb7a4952a334684e36578dd4b18afa124
[ "Apache-2.0" ]
63
2016-11-01T13:06:46.000Z
2018-08-21T08:38:36.000Z
guild/tests/samples/projects/op-main-package/src/pkg/main_impl.py
guildai/guild-cli
d3db493fb7a4952a334684e36578dd4b18afa124
[ "Apache-2.0" ]
28
2016-11-02T01:41:23.000Z
2018-10-19T22:57:06.000Z
guild/tests/samples/projects/op-main-package/src/pkg/main_impl.py
guildai/guild-cli
d3db493fb7a4952a334684e36578dd4b18afa124
[ "Apache-2.0" ]
8
2017-01-15T14:58:43.000Z
2018-07-27T11:51:39.000Z
def run(): print("hello from %s in %s" % (__name__, __package__))
23.333333
58
0.614286
def run(): print("hello from %s in %s" % (__name__, __package__))
true
true
08fd61f5d99945d186a20a464d5810718797d325
3,718
py
Python
NaiveBayes.py
srinirajaraman/Machine-Learning
2635061db54c608342f7d459378bc54c108bdaff
[ "MIT" ]
null
null
null
NaiveBayes.py
srinirajaraman/Machine-Learning
2635061db54c608342f7d459378bc54c108bdaff
[ "MIT" ]
null
null
null
NaiveBayes.py
srinirajaraman/Machine-Learning
2635061db54c608342f7d459378bc54c108bdaff
[ "MIT" ]
null
null
null
''' This python code is to test the naive-bayes-classifier-scratch-python http://machinelearningmastery.com/naive-bayes-classifier-scratch-python/ ''' import csv import os as os import math import random #Compute mean def computeMean(numbers): return sum(numbers)/float(len(numbers)) #Compute standard dev def...
30.227642
113
0.683163
''' This python code is to test the naive-bayes-classifier-scratch-python http://machinelearningmastery.com/naive-bayes-classifier-scratch-python/ ''' import csv import os as os import math import random def computeMean(numbers): return sum(numbers)/float(len(numbers)) def computeStdDev(numbers): avg = co...
false
true
08fd62758e362a8e74bcc13fec485eba5a8d8b8f
511
py
Python
tests/conftest.py
bogdan-kulynych/mia
2b25e9c6bf350737e2d65af32223e527908025ef
[ "MIT" ]
102
2018-09-26T17:19:06.000Z
2022-03-29T13:28:19.000Z
tests/conftest.py
bogdan-kulynych/mia
2b25e9c6bf350737e2d65af32223e527908025ef
[ "MIT" ]
13
2018-10-08T08:05:54.000Z
2021-09-28T06:44:20.000Z
tests/conftest.py
bogdan-kulynych/mia
2b25e9c6bf350737e2d65af32223e527908025ef
[ "MIT" ]
29
2018-10-23T08:28:01.000Z
2021-11-10T16:06:52.000Z
import pytest import keras from keras.datasets import cifar10 @pytest.fixture(scope="module") def data(): (X_train, y_train), (X_test, y_test) = cifar10.load_data() y_train = keras.utils.to_categorical(y_train) y_test = keras.utils.to_categorical(y_test) X_train = X_train.astype("float32") X_test...
26.894737
62
0.694716
import pytest import keras from keras.datasets import cifar10 @pytest.fixture(scope="module") def data(): (X_train, y_train), (X_test, y_test) = cifar10.load_data() y_train = keras.utils.to_categorical(y_train) y_test = keras.utils.to_categorical(y_test) X_train = X_train.astype("float32") X_test...
true
true
08fd629705243b28fee4a38e59c4f17da0d142e5
4,230
py
Python
IO.py
Akshay-Vs/Rock-Paper-Scissors
b0b7bb6775db68c7366f7cbc1eb4ca3797c01e35
[ "MIT" ]
3
2022-01-27T12:26:42.000Z
2022-01-28T12:18:36.000Z
IO.py
Akshay-Vs/Rock-Paper-Scissors
b0b7bb6775db68c7366f7cbc1eb4ca3797c01e35
[ "MIT" ]
null
null
null
IO.py
Akshay-Vs/Rock-Paper-Scissors
b0b7bb6775db68c7366f7cbc1eb4ca3797c01e35
[ "MIT" ]
null
null
null
import base64 import hashlib import os from Crypto import Random from Crypto.Cipher import AES key="key" class AESCipher(object): #Encrypt using AES Standard def __init__(self, key): #fetch key for encryption self.bs = AES.block_size self.key = hashlib.sha256(key.encode()).digest() ...
32.290076
81
0.591726
import base64 import hashlib import os from Crypto import Random from Crypto.Cipher import AES key="key" class AESCipher(object): def __init__(self, key): self.bs = AES.block_size self.key = hashlib.sha256(key.encode()).digest() def encrypt(self, raw): ra...
true
true
08fd65279d3ccf9db52d2a713e50648ed0d112e3
833
py
Python
Photogallery/urls.py
joankirui/Gallery
7c3cc5d549a0f3d116fd75fdf94833db6aedac32
[ "MIT" ]
null
null
null
Photogallery/urls.py
joankirui/Gallery
7c3cc5d549a0f3d116fd75fdf94833db6aedac32
[ "MIT" ]
null
null
null
Photogallery/urls.py
joankirui/Gallery
7c3cc5d549a0f3d116fd75fdf94833db6aedac32
[ "MIT" ]
null
null
null
"""Photogallery URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-...
34.708333
77
0.711885
from django.contrib import admin from django.conf.urls import url,include from django.urls import path urlpatterns = [ path(r'admin/', admin.site.urls), url(r'',include('gallery.urls')) ]
true
true
08fd65ef4a8acfbe33f959aea8f55e7ff0ac0ac2
410
py
Python
lab02/app/urls.py
vascoalramos/tpw
e0d1ab14f1e701dd2b2a77522c57cb22fda85e56
[ "MIT" ]
null
null
null
lab02/app/urls.py
vascoalramos/tpw
e0d1ab14f1e701dd2b2a77522c57cb22fda85e56
[ "MIT" ]
null
null
null
lab02/app/urls.py
vascoalramos/tpw
e0d1ab14f1e701dd2b2a77522c57cb22fda85e56
[ "MIT" ]
null
null
null
from django.urls import path from app import views urlpatterns = [ path("books", views.books, name="books"), path("book/<int:num>", views.book, name="book"), path("authors", views.authors, name="authors"), path("author/<int:num>", views.author, name="author"), path("publishers", views.publishers, ...
31.538462
67
0.663415
from django.urls import path from app import views urlpatterns = [ path("books", views.books, name="books"), path("book/<int:num>", views.book, name="book"), path("authors", views.authors, name="authors"), path("author/<int:num>", views.author, name="author"), path("publishers", views.publishers, ...
true
true
08fd66a90d60a53f2fabfb7aa4381472ea44ebfa
28,666
py
Python
quickjs/builtin_binding_generator.py
TomCaserta/ECMAScript
4d1715e3c52dea4f02ed8fe22a6981cca8e0f3da
[ "MIT" ]
null
null
null
quickjs/builtin_binding_generator.py
TomCaserta/ECMAScript
4d1715e3c52dea4f02ed8fe22a6981cca8e0f3da
[ "MIT" ]
null
null
null
quickjs/builtin_binding_generator.py
TomCaserta/ECMAScript
4d1715e3c52dea4f02ed8fe22a6981cca8e0f3da
[ "MIT" ]
1
2021-03-22T14:55:13.000Z
2021-03-22T14:55:13.000Z
#!/usr/bin/env python import json, os DIR = os.path.abspath( os.path.dirname(__file__) ) OUTPUT_FILE = os.path.join(DIR, "quickjs_builtin_binder.gen.cpp") API = json.load(open(os.path.join(DIR, '..', 'buitin_api.gen.json'), 'r')) VariantTypes = { "boolean": "Variant::BOOL", "number": "Variant::REAL", "string": "Va...
41.246043
187
0.687539
import json, os DIR = os.path.abspath( os.path.dirname(__file__) ) OUTPUT_FILE = os.path.join(DIR, "quickjs_builtin_binder.gen.cpp") API = json.load(open(os.path.join(DIR, '..', 'buitin_api.gen.json'), 'r')) VariantTypes = { "boolean": "Variant::BOOL", "number": "Variant::REAL", "string": "Variant::STRING", "Vect...
true
true