hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7fa18dacc1c9c0c60b03490e07fdafd357b7aad
479
py
Python
tests/test_my_module.py
sunxb05/pyworld
dfde82aefb74b614240e6bc138e2336fb6f102c8
[ "Apache-2.0" ]
1
2021-06-09T04:54:48.000Z
2021-06-09T04:54:48.000Z
tests/test_my_module.py
sunxb05/pyworld
dfde82aefb74b614240e6bc138e2336fb6f102c8
[ "Apache-2.0" ]
5
2021-06-09T05:14:44.000Z
2021-06-09T05:14:47.000Z
tests/test_my_module.py
sunxb05/pyworld
dfde82aefb74b614240e6bc138e2336fb6f102c8
[ "Apache-2.0" ]
null
null
null
"""Tests for the pyworld.my_module module. """ import pytest from pyworld.my_module import hello def test_hello(): assert hello('nlesc') == 'Hello nlesc!' def test_hello_with_error(): with pytest.raises(ValueError) as excinfo: hello('nobody') assert 'Can not say hello to nobody' in str(excinfo....
19.16
62
0.707724
import pytest from pyworld.my_module import hello def test_hello(): assert hello('nlesc') == 'Hello nlesc!' def test_hello_with_error(): with pytest.raises(ValueError) as excinfo: hello('nobody') assert 'Can not say hello to nobody' in str(excinfo.value) @pytest.fixture def some_name(): r...
true
true
f7fa1955c4f00dd581986a39a8e91f56990e3f61
2,704
py
Python
{{cookiecutter.project_directory_name}}/tests/test_logger_config.py
johnpneumann/cookiecutter-py
dc0110fcdeebd397c0ebde186cb5d2ffdef648d4
[ "MIT" ]
2
2017-01-19T05:59:46.000Z
2019-01-19T06:44:23.000Z
{{cookiecutter.project_directory_name}}/tests/test_logger_config.py
johnpneumann/cookiecutter-py
dc0110fcdeebd397c0ebde186cb5d2ffdef648d4
[ "MIT" ]
4
2016-10-29T04:33:48.000Z
2020-05-08T21:45:56.000Z
{{cookiecutter.project_directory_name}}/tests/test_logger_config.py
johnpneumann/cookiecutter-py
dc0110fcdeebd397c0ebde186cb5d2ffdef648d4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ tests.test_logger_config ~~~~~~~~~~~~~~~~~~~~~~~~ Tests the logger config. :copyright: (c) {{ cookiecutter.copyright_year }} by {% if cookiecutter.project_owner == "" %}{{ cookiecutter.author_name }}{% else %}{{ cookiecutter.project_owner }}{% endif %}. {%- if cookiecut...
37.041096
182
0.715607
""" tests.test_logger_config ~~~~~~~~~~~~~~~~~~~~~~~~ Tests the logger config. :copyright: (c) {{ cookiecutter.copyright_year }} by {% if cookiecutter.project_owner == "" %}{{ cookiecutter.author_name }}{% else %}{{ cookiecutter.project_owner }}{% endif %}. {%- if cookiecutter.open_source_license...
false
true
f7fa19b20a0b5ce18abe0cd934fbbe12145291b8
12,313
py
Python
tools/testrunner/local/testsuite.py
ADVAN-ELAA-8QM-PRC1/platform-external-v8
d424a9e93b8e25ab0e3ac5aead27a5fac0795a1b
[ "BSD-3-Clause" ]
27
2017-12-14T13:48:25.000Z
2020-12-31T15:46:55.000Z
tools/testrunner/local/testsuite.py
ADVAN-ELAA-8QM-PRC1/platform-external-v8
d424a9e93b8e25ab0e3ac5aead27a5fac0795a1b
[ "BSD-3-Clause" ]
10
2016-09-30T14:57:49.000Z
2017-06-30T12:56:01.000Z
tools/testrunner/local/testsuite.py
ADVAN-ELAA-8QM-PRC1/platform-external-v8
d424a9e93b8e25ab0e3ac5aead27a5fac0795a1b
[ "BSD-3-Clause" ]
23
2016-08-03T17:43:32.000Z
2021-03-04T17:09:00.000Z
# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
33.550409
79
0.659222
import imp import os from . import commands from . import statusfile from . import utils from ..objects import testcase from variants import ALL_VARIANTS, ALL_VARIANT_FLAGS, FAST_VARIANT_FLAGS FAST_VARIANTS = set(["default", "turbofan"]) STANDARD_VARIANT = set(["default"]) class Variant...
false
true
f7fa1a074af2265b09ac4db94b81f190e7723a36
4,353
py
Python
tfidf_matcher/matcher.py
LouisTsiattalou/tfidf_matcher
e95139f16329d149a2a3c1002d5b9bfe6da3b116
[ "MIT" ]
13
2020-02-24T18:29:15.000Z
2021-12-28T09:41:35.000Z
tfidf_matcher/matcher.py
LouisTsiattalou/tfidf_matcher
e95139f16329d149a2a3c1002d5b9bfe6da3b116
[ "MIT" ]
null
null
null
tfidf_matcher/matcher.py
LouisTsiattalou/tfidf_matcher
e95139f16329d149a2a3c1002d5b9bfe6da3b116
[ "MIT" ]
3
2020-07-21T04:32:45.000Z
2021-10-21T11:00:56.000Z
# AUTHOR: Louis Tsiattalou # DESCRIPTION: Match list items to closest tf-idf match in second list. import pandas as pd from tfidf_matcher.ngrams import ngrams from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.neighbors import NearestNeighbors def matcher(original = [], lookup = [], k_matches = ...
48.366667
112
0.699977
import pandas as pd from tfidf_matcher.ngrams import ngrams from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.neighbors import NearestNeighbors def matcher(original = [], lookup = [], k_matches = 5, ngram_length = 3): assert all([type(x) == type("string") for x in original]), "Origi...
true
true
f7fa1a5a5cbfdf1feb4c6cddf9f02f27f4229961
6,106
py
Python
composer/optim/optimizer_hparams.py
anisehsani/composer
42599682d50409b4a4eb7c91fad85d67418cee13
[ "Apache-2.0" ]
null
null
null
composer/optim/optimizer_hparams.py
anisehsani/composer
42599682d50409b4a4eb7c91fad85d67418cee13
[ "Apache-2.0" ]
null
null
null
composer/optim/optimizer_hparams.py
anisehsani/composer
42599682d50409b4a4eb7c91fad85d67418cee13
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved. from abc import ABC, abstractmethod from dataclasses import asdict, dataclass from typing import List, Type import torch import torch_optimizer import yahp as hp from composer.core.types import ModelParameters, Optimizer from composer.optim import DecoupledAdamW, Decou...
41.537415
120
0.706191
from abc import ABC, abstractmethod from dataclasses import asdict, dataclass from typing import List, Type import torch import torch_optimizer import yahp as hp from composer.core.types import ModelParameters, Optimizer from composer.optim import DecoupledAdamW, DecoupledSGDW @dataclass class OptimizerHparams(...
true
true
f7fa1a71209ef1ff9c0eb284d995d1d0f198b0e0
824
py
Python
models.py
chantellecv/E-commerce-Site
c5280e9d6c90d196242f77a6cdacc5850a0cf2a2
[ "MIT" ]
null
null
null
models.py
chantellecv/E-commerce-Site
c5280e9d6c90d196242f77a6cdacc5850a0cf2a2
[ "MIT" ]
null
null
null
models.py
chantellecv/E-commerce-Site
c5280e9d6c90d196242f77a6cdacc5850a0cf2a2
[ "MIT" ]
null
null
null
from db import db class User(db.Model): usr_id = db.Column(db.Integer, primary_key=True) fullname = db.Column(db.String(100), nullable=False) username = db.Column(db.String(50), unique=True, nullable=False) password = db.Column(db.String(250), nullable=False) def __repr__(self): return '<Name %r>' % self.fullna...
39.238095
65
0.731796
from db import db class User(db.Model): usr_id = db.Column(db.Integer, primary_key=True) fullname = db.Column(db.String(100), nullable=False) username = db.Column(db.String(50), unique=True, nullable=False) password = db.Column(db.String(250), nullable=False) def __repr__(self): return '<Name %r>' % self.fullna...
true
true
f7fa1adf716d6e64ab46ed050b6366a56b3b72d8
3,561
py
Python
backupKMyMoney.py
gregorybrancq/pythonScripts
4b8519b26859bc318089c615b3255a68b68e3252
[ "MIT" ]
null
null
null
backupKMyMoney.py
gregorybrancq/pythonScripts
4b8519b26859bc318089c615b3255a68b68e3252
[ "MIT" ]
null
null
null
backupKMyMoney.py
gregorybrancq/pythonScripts
4b8519b26859bc318089c615b3255a68b68e3252
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*-coding:Latin-1 -* ''' Backup KMyMoney files ''' ## Import import sys import os, os.path import re from datetime import datetime import filecmp import shutil from optparse import OptionParser ## common from python_common import * HEADER = "backupKMyMoney" ## directory homeDir = getHomeDi...
23.123377
112
0.440607
sys import os, os.path import re from datetime import datetime import filecmp import shutil from optparse import OptionParser thon_common import * HEADER = "backupKMyMoney" getHomeDir() logDir = getLogDir()
true
true
f7fa1b1ea0ccf21f2d9a41c53eae62153a4e19a2
641
py
Python
venv/bin/rst2xml.py
robertoweller/jogo_historia
011238e0488f282ef3bf3f3b6be8bd9ca3c32fd2
[ "CC0-1.0" ]
6
2020-04-10T14:36:25.000Z
2021-04-25T13:11:32.000Z
venv/bin/rst2xml.py
robertoweller/jogo_historia
011238e0488f282ef3bf3f3b6be8bd9ca3c32fd2
[ "CC0-1.0" ]
null
null
null
venv/bin/rst2xml.py
robertoweller/jogo_historia
011238e0488f282ef3bf3f3b6be8bd9ca3c32fd2
[ "CC0-1.0" ]
null
null
null
#!/home/roberto/Documentos/jogo_historia/venv/bin/python3 # $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing Docutils XML. """ try: import lo...
26.708333
70
0.74571
try: import locale locale.setlocale(locale.LC_ALL, '') except: pass from docutils.core import publish_cmdline, default_description description = ('Generates Docutils-native XML from standalone ' 'reStructuredText sources. ' + default_description) publish_cmdline(writer_name='xml',...
true
true
f7fa1f485ebb470340b5e30e36d66eb5496b358f
29,714
py
Python
perfkitbenchmarker/relational_db.py
cyberheb/PerfKitBenchmarker
3a250b2e61f09ac0e1d04b5fa239805cc1e771fe
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/relational_db.py
cyberheb/PerfKitBenchmarker
3a250b2e61f09ac0e1d04b5fa239805cc1e771fe
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/relational_db.py
cyberheb/PerfKitBenchmarker
3a250b2e61f09ac0e1d04b5fa239805cc1e771fe
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 PerfKitBenchmarker 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 appli...
38.094872
117
0.658276
from abc import abstractmethod import posixpath import random import re import string import uuid from absl import flags from perfkitbenchmarker import data from perfkitbenchmarker import resource from perfkitbenchmarker import vm_util import six flags.DEFINE_string('managed_db_engine', None, ...
true
true
f7fa1fedc19429389b6a3bc8e1bb2c09924aaec3
2,230
py
Python
glue/bitcoinlib/tests/test_net.py
LykkeCity/Notary
416c2c11c73e9caaf23a7c3a8eaae30a090823d4
[ "MIT" ]
null
null
null
glue/bitcoinlib/tests/test_net.py
LykkeCity/Notary
416c2c11c73e9caaf23a7c3a8eaae30a090823d4
[ "MIT" ]
null
null
null
glue/bitcoinlib/tests/test_net.py
LykkeCity/Notary
416c2c11c73e9caaf23a7c3a8eaae30a090823d4
[ "MIT" ]
4
2015-12-15T20:16:05.000Z
2020-09-08T07:29:51.000Z
# Copyright (C) 2013-2014 The python-bitcoinlib developers # # This file is part of python-bitcoinlib. # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-bitcoinlib, including this file, may be copied, modified, # propagated, or dist...
28.961039
79
0.670852
import unittest from bitcoinlib.net import CAddress class Test_CAddress(unittest.TestCase): def test_serializationSimple(self): c = CAddress() cSerialized = c.serialize() cDeserialized = CAddress.deserialize(cSerialized) cSerializedTwice = cDeserialized.serialize() ...
true
true
f7fa20167068a39de4cb6d6e77b77da288bcf085
23,706
py
Python
nets/efficientdet.py
Quentin-kt/efficientdet-pytorch
6a013481f9264a065ff1e3c5affe3102ef6066ce
[ "MIT" ]
null
null
null
nets/efficientdet.py
Quentin-kt/efficientdet-pytorch
6a013481f9264a065ff1e3c5affe3102ef6066ce
[ "MIT" ]
null
null
null
nets/efficientdet.py
Quentin-kt/efficientdet-pytorch
6a013481f9264a065ff1e3c5affe3102ef6066ce
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from utils.anchors import Anchors from nets.efficientnet import EfficientNet as EffNet from nets.layers import (Conv2dStaticSamePadding, MaxPool2dStaticSamePadding, MemoryEfficientSwish, Swish) #----------------------------------# # Xception中深度可分离卷积 # 先...
42.636691
129
0.531047
import torch import torch.nn as nn from utils.anchors import Anchors from nets.efficientnet import EfficientNet as EffNet from nets.layers import (Conv2dStaticSamePadding, MaxPool2dStaticSamePadding, MemoryEfficientSwish, Swish) class SeparableConvBlock(nn.Module): def __init__(self, ...
true
true
f7fa213c05b4fe9d1bb10feae5e7f577d91079db
130
py
Python
src/domain/errors/unable_to_get_all_glaucomatous_images_paths_failure.py
OzielFilho/ProjetoFinalPdi
c9e6fe415f1a985d6eeac204580d3ab623026665
[ "MIT" ]
null
null
null
src/domain/errors/unable_to_get_all_glaucomatous_images_paths_failure.py
OzielFilho/ProjetoFinalPdi
c9e6fe415f1a985d6eeac204580d3ab623026665
[ "MIT" ]
null
null
null
src/domain/errors/unable_to_get_all_glaucomatous_images_paths_failure.py
OzielFilho/ProjetoFinalPdi
c9e6fe415f1a985d6eeac204580d3ab623026665
[ "MIT" ]
null
null
null
from domain.errors.image_failure import ImageFailure class UnableToGetAllGlaucomatousImagesPathsFailure(ImageFailure): pass
21.666667
65
0.861538
from domain.errors.image_failure import ImageFailure class UnableToGetAllGlaucomatousImagesPathsFailure(ImageFailure): pass
true
true
f7fa21931bd82cc83a46973bb7ccd1c89a249317
795
py
Python
test/simple-test.py
rafaeldelrey/pyschedule
96ed5abc05fdad5d7e93393d627c5316e90102fe
[ "Apache-2.0" ]
null
null
null
test/simple-test.py
rafaeldelrey/pyschedule
96ed5abc05fdad5d7e93393d627c5316e90102fe
[ "Apache-2.0" ]
null
null
null
test/simple-test.py
rafaeldelrey/pyschedule
96ed5abc05fdad5d7e93393d627c5316e90102fe
[ "Apache-2.0" ]
null
null
null
from pyschedule import Scenario, solvers # the planning horizon has 10 periods S = Scenario('household',horizon=10) # two resources: Alice and Bob Alice, Bob = S.Resource('Alice'), S.Resource('Bob') # three tasks: cook, wash, and clean cook = S.Task('cook',length=1,delay_cost=1) wash = S.Task('wash',length=2,delay_c...
28.392857
51
0.65283
from pyschedule import Scenario, solvers S = Scenario('household',horizon=10) Alice, Bob = S.Resource('Alice'), S.Resource('Bob') cook = S.Task('cook',length=1,delay_cost=1) wash = S.Task('wash',length=2,delay_cost=1) clean = S.Task('clean',length=3,delay_cost=2) cook += Alice | Bob wash += Alice | Bob clean +=...
true
true
f7fa229686aa6986aa8b8f8a1dc2ccded74af095
5,940
py
Python
adam_visual_perception/head_gaze_estimator.py
isi-vista/adam-visual-perception
8ad6ed883b184b5407a1bf793617b226c78b3a13
[ "MIT" ]
1
2020-07-21T10:52:26.000Z
2020-07-21T10:52:26.000Z
adam_visual_perception/head_gaze_estimator.py
isi-vista/adam-visual-perception
8ad6ed883b184b5407a1bf793617b226c78b3a13
[ "MIT" ]
null
null
null
adam_visual_perception/head_gaze_estimator.py
isi-vista/adam-visual-perception
8ad6ed883b184b5407a1bf793617b226c78b3a13
[ "MIT" ]
2
2020-07-21T15:30:42.000Z
2021-01-20T21:54:09.000Z
from adam_visual_perception import LandmarkDetector from adam_visual_perception.utility import * import numpy as np import math import cv2 import os import sys class HeadGazeEstimator: """ A class for estimating gaze ray from facial landmarks """ def __init__(self, write_video=False): # 3D model poin...
35.783133
87
0.458754
from adam_visual_perception import LandmarkDetector from adam_visual_perception.utility import * import numpy as np import math import cv2 import os import sys class HeadGazeEstimator: def __init__(self, write_video=False): self.model_points = np.array( [ (0.0, 0.0, 0...
true
true
f7fa2299372fe17048452363068cff5c46f44949
1,515
py
Python
tuning-files-scripts/patid_translate.py
NACHC-CAD/linkage-agent-tools
324299e534bc55bd652eb670feb195ce5646f13e
[ "Apache-2.0" ]
null
null
null
tuning-files-scripts/patid_translate.py
NACHC-CAD/linkage-agent-tools
324299e534bc55bd652eb670feb195ce5646f13e
[ "Apache-2.0" ]
1
2021-10-01T15:13:15.000Z
2021-10-01T15:13:15.000Z
tuning-files-scripts/patid_translate.py
NACHC-CAD/linkage-agent-tools
324299e534bc55bd652eb670feb195ce5646f13e
[ "Apache-2.0" ]
null
null
null
import argparse import csv from pathlib import Path from dcctools.config import Configuration parser = argparse.ArgumentParser( description="Tool for translating linkage table to patid table for scoring" ) parser.add_argument( "--dotools", nargs=1, required=True, help="data-owner-tools project path" ) args = ...
30.918367
81
0.673267
import argparse import csv from pathlib import Path from dcctools.config import Configuration parser = argparse.ArgumentParser( description="Tool for translating linkage table to patid table for scoring" ) parser.add_argument( "--dotools", nargs=1, required=True, help="data-owner-tools project path" ) args = ...
true
true
f7fa22f365b75ce1372129858b1e1ffd535cb665
4,828
py
Python
app/user/tests/test_user_api.py
sunnyrpandya/recipe-app-api
92fbefb9bd80e967cd1111ddc25c3c8da5980c39
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
sunnyrpandya/recipe-app-api
92fbefb9bd80e967cd1111ddc25c3c8da5980c39
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
sunnyrpandya/recipe-app-api
92fbefb9bd80e967cd1111ddc25c3c8da5980c39
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') ME_URL = reverse('user:me') def create_user(**params...
35.5
77
0.660936
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') ME_URL = reverse('user:me') def create_user(**params...
true
true
f7fa23b09eb9b83fe4fd070c213a3a143a346fa0
7,639
py
Python
ml-agents/mlagents/trainers/tests/test_ghost.py
bobcy2015/ml-agents
5d02292ad889f1884fa98bd92f127f17cbfe0112
[ "Apache-2.0" ]
1
2021-02-09T09:42:13.000Z
2021-02-09T09:42:13.000Z
ml-agents/mlagents/trainers/tests/test_ghost.py
bobcy2015/ml-agents
5d02292ad889f1884fa98bd92f127f17cbfe0112
[ "Apache-2.0" ]
5
2020-09-26T01:23:05.000Z
2022-02-10T01:58:20.000Z
ml-agents/mlagents/trainers/tests/test_ghost.py
bobcy2015/ml-agents
5d02292ad889f1884fa98bd92f127f17cbfe0112
[ "Apache-2.0" ]
1
2021-10-01T06:54:08.000Z
2021-10-01T06:54:08.000Z
import pytest import numpy as np from mlagents.trainers.ghost.trainer import GhostTrainer from mlagents.trainers.ghost.controller import GhostController from mlagents.trainers.behavior_id_utils import BehaviorIdentifiers from mlagents.trainers.ppo.trainer import PPOTrainer from mlagents.trainers.brain import BrainPar...
35.86385
87
0.74604
import pytest import numpy as np from mlagents.trainers.ghost.trainer import GhostTrainer from mlagents.trainers.ghost.controller import GhostController from mlagents.trainers.behavior_id_utils import BehaviorIdentifiers from mlagents.trainers.ppo.trainer import PPOTrainer from mlagents.trainers.brain import BrainPar...
true
true
f7fa24d651fbf35d14fa24663e22558ba34c8d90
4,531
py
Python
python/raspberrypi/examples/tap/tap.py
cdjq/DFRobot_IIS2DLPC
87528abcc15a15dc499a3b446910ccdde1a8adfe
[ "MIT" ]
null
null
null
python/raspberrypi/examples/tap/tap.py
cdjq/DFRobot_IIS2DLPC
87528abcc15a15dc499a3b446910ccdde1a8adfe
[ "MIT" ]
null
null
null
python/raspberrypi/examples/tap/tap.py
cdjq/DFRobot_IIS2DLPC
87528abcc15a15dc499a3b446910ccdde1a8adfe
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- """ @file tap.py @brief Single click and double click detection @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com) @licence The MIT License (MIT) @author [fengli](li.feng@dfrobot.com) @version V1.0 @date 2021-01-16 @get from https://www.dfrobot.co...
37.446281
133
0.594571
import sys sys.path.append("../..") from DFRobot_IIS2DLPC import * import time RASPBERRY_PIN_CS = 27 acce = DFRobot_IIS2DLPC_SPI(RASPBERRY_PIN_CS) I2C_MODE = 0x01 ADDRESS_0 = 0x19 acce.begin() print("chip id :") print(acce.get_ID()) acce.soft_reset() ac...
true
true
f7fa254eb5afb9b7cbe5f1041ae6c0937b58180f
501
py
Python
tests/fixtures/defxmlschema/chapter13/example1338.py
nimish/xsdata
7afe2781b66982428cc1731f53c065086acd35c1
[ "MIT" ]
null
null
null
tests/fixtures/defxmlschema/chapter13/example1338.py
nimish/xsdata
7afe2781b66982428cc1731f53c065086acd35c1
[ "MIT" ]
null
null
null
tests/fixtures/defxmlschema/chapter13/example1338.py
nimish/xsdata
7afe2781b66982428cc1731f53c065086acd35c1
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import Optional @dataclass class ProductType: """ :ivar number: :ivar name: """ number: Optional[int] = field( default=None, metadata=dict( type="Element", namespace="", required=True )...
18.555556
40
0.506986
from dataclasses import dataclass, field from typing import Optional @dataclass class ProductType: number: Optional[int] = field( default=None, metadata=dict( type="Element", namespace="", required=True ) ) name: Optional[str] = field( de...
true
true
f7fa25e2e966613e108674abeb184f3e8636f74f
46,597
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/operations/_network_interfaces_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/operations/_network_interfaces_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/operations/_network_interfaces_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.212284
316
0.668326
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
f7fa264461ee7a1a80d8e7c0cf7d71c4d23225bf
7,521
py
Python
tensorflow/python/ops/quantized_conv_ops_test.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
52
2018-11-12T06:39:35.000Z
2022-03-08T05:31:27.000Z
tensorflow/python/ops/quantized_conv_ops_test.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
2
2018-12-04T08:35:40.000Z
2020-10-22T16:17:39.000Z
tensorflow/python/ops/quantized_conv_ops_test.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
17
2019-03-11T01:17:16.000Z
2022-02-21T00:44:47.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.509709
80
0.62505
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.ops import nn_ops from tensorflow.python.platform imp...
true
true
f7fa267b884d43f4d2627259e21a7a856b7d64f1
4,603
py
Python
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-07-23T08:59:24.000Z
2018-07-23T08:59:24.000Z
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-11-29T14:46:42.000Z
2018-11-29T14:46:42.000Z
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
52.908046
123
0.847056
from .protection_intent_operations import ProtectionIntentOperations from .backup_status_operations import BackupStatusOperations from .feature_support_operations import FeatureSupportOperations from .backup_jobs_operations import BackupJobsOperations from .job_details_operations import JobDetailsOperations ...
true
true
f7fa27a71420271bd51bcaa911ebeaf7366f0c78
4,529
py
Python
pynetlinux/brctl.py
youngage/pynetlinux
4bb6f2ce42c22bc853f7a2af10591da89968e1ff
[ "BSD-3-Clause" ]
1
2015-02-10T14:14:04.000Z
2015-02-10T14:14:04.000Z
pynetlinux/brctl.py
youngage/pynetlinux
4bb6f2ce42c22bc853f7a2af10591da89968e1ff
[ "BSD-3-Clause" ]
null
null
null
pynetlinux/brctl.py
youngage/pynetlinux
4bb6f2ce42c22bc853f7a2af10591da89968e1ff
[ "BSD-3-Clause" ]
null
null
null
import array import fcntl import os import struct from . import ifconfig SYSFS_NET_PATH = "/sys/class/net" # From linux/sockios.h SIOCBRADDBR = 0x89a0 SIOCBRDELBR = 0x89a1 SIOCBRADDIF = 0x89a2 SIOCBRDELIF = 0x89a3 SIOCDEVPRIVATE = 0x89F0 # From bridge-utils if_bridge.h BRCTL_SET_BRIDGE_FORWARD_DELAY = 8 BRCTL_SET_...
30.809524
88
0.632369
import array import fcntl import os import struct from . import ifconfig SYSFS_NET_PATH = "/sys/class/net" SIOCBRADDBR = 0x89a0 SIOCBRDELBR = 0x89a1 SIOCBRADDIF = 0x89a2 SIOCBRDELIF = 0x89a3 SIOCDEVPRIVATE = 0x89F0 BRCTL_SET_BRIDGE_FORWARD_DELAY = 8 BRCTL_SET_BRIDGE_STP_STATE = 14 BRCTL_GET_BRIDGE_INFO = 6 if n...
true
true
f7fa28d110e8b350f1736229ea8426be41350920
3,569
py
Python
intersight/models/sdcard_policy_ref.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/sdcard_policy_ref.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/sdcard_policy_ref.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 pprint import pformat from six import iteritems import re class SdcardPolicyRef(object): """ NOTE: This class...
23.793333
77
0.536285
from pprint import pformat from six import iteritems import re class SdcardPolicyRef(object): swagger_types = { 'moid': 'str', 'object_type': 'str' } attribute_map = { 'moid': 'Moid', 'object_type': 'ObjectType' } def __init__(self, moid=None, object_type=No...
true
true
f7fa29e5a7ab84acfe14c474fc4808dbb31215d9
1,956
py
Python
src/sagemaker/user_agent.py
billdoors/sagemaker-python-sdk
2df8fb616cc3e28032aae5dccdc93a0c340b6d8b
[ "Apache-2.0" ]
null
null
null
src/sagemaker/user_agent.py
billdoors/sagemaker-python-sdk
2df8fb616cc3e28032aae5dccdc93a0c340b6d8b
[ "Apache-2.0" ]
null
null
null
src/sagemaker/user_agent.py
billdoors/sagemaker-python-sdk
2df8fb616cc3e28032aae5dccdc93a0c340b6d8b
[ "Apache-2.0" ]
null
null
null
# Copyright 2017-2020 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
32.6
99
0.706033
from __future__ import absolute_import import platform import sys import pkg_resources import boto3 import botocore SDK_VERSION = pkg_resources.require("sagemaker")[0].version OS_NAME = platform.system() or "UnresolvedOS" OS_VERSION = platform.release() or "UnresolvedOSVersion" PYTHON_VERSION = "{}.{}.{}...
true
true
f7fa2b3d59211ad6105b40a77f692272a55b042e
416
py
Python
game (1).py
Deadly-Stricker/mango
8c63faa1584831bb95c5746920ea0d62d2f5e868
[ "MIT" ]
null
null
null
game (1).py
Deadly-Stricker/mango
8c63faa1584831bb95c5746920ea0d62d2f5e868
[ "MIT" ]
null
null
null
game (1).py
Deadly-Stricker/mango
8c63faa1584831bb95c5746920ea0d62d2f5e868
[ "MIT" ]
null
null
null
import random as r g=0 for i in range(0,100): a=r.randint(0,10) y=int(input("Enter a number between 0 and 10 (0 inclusive): ")) if y==a: g=g+1 print("You Guessed Right the answer was: ",a) print("You earned a guessing gem ,Your gems are: ",g) else: pri...
27.733333
68
0.538462
import random as r g=0 for i in range(0,100): a=r.randint(0,10) y=int(input("Enter a number between 0 and 10 (0 inclusive): ")) if y==a: g=g+1 print("You Guessed Right the answer was: ",a) print("You earned a guessing gem ,Your gems are: ",g) else: pri...
true
true
f7fa2c22df6055e8f1b0a42f510e899a632aaa49
2,437
py
Python
os_apply_config/collect_config.py
mail2nsrajesh/os-apply-config
c2e15c8424de6ee260bc7266f813030d62246945
[ "Apache-2.0" ]
null
null
null
os_apply_config/collect_config.py
mail2nsrajesh/os-apply-config
c2e15c8424de6ee260bc7266f813030d62246945
[ "Apache-2.0" ]
null
null
null
os_apply_config/collect_config.py
mail2nsrajesh/os-apply-config
c2e15c8424de6ee260bc7266f813030d62246945
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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...
34.323944
79
0.663931
import copy import json import os from os_apply_config import config_exception as exc def read_configs(config_files): for input_path in [x for x in config_files if x]: if os.path.exists(input_path): try: with open(input_path) as input_file: y...
true
true
f7fa2cc9fba52e7116ca3beec7518e45bd0501d7
423
py
Python
permission_check/permission_check.py
srgrj/permission_check
213c2e924c8de660103c203df50590e2da01884c
[ "MIT" ]
null
null
null
permission_check/permission_check.py
srgrj/permission_check
213c2e924c8de660103c203df50590e2da01884c
[ "MIT" ]
null
null
null
permission_check/permission_check.py
srgrj/permission_check
213c2e924c8de660103c203df50590e2da01884c
[ "MIT" ]
null
null
null
import os from permission_check.utils import Permission class PermissionCheck: def __init__(self, path): self.path = path self.stat = os.stat(self.path) self.permissions = oct(self.stat.st_mode)[-3:] self.owner = Permission(permission=self.permissions[0]) self.group = Permi...
32.538462
64
0.690307
import os from permission_check.utils import Permission class PermissionCheck: def __init__(self, path): self.path = path self.stat = os.stat(self.path) self.permissions = oct(self.stat.st_mode)[-3:] self.owner = Permission(permission=self.permissions[0]) self.group = Permi...
true
true
f7fa2d932f3bc20229b405dcc2c1eeedca11932a
3,312
py
Python
T800/winthread.py
sakurai-youhei/T800.winthread
30e9d61f003dc15d141e2633918abd29f5726eac
[ "MIT" ]
null
null
null
T800/winthread.py
sakurai-youhei/T800.winthread
30e9d61f003dc15d141e2633918abd29f5726eac
[ "MIT" ]
null
null
null
T800/winthread.py
sakurai-youhei/T800.winthread
30e9d61f003dc15d141e2633918abd29f5726eac
[ "MIT" ]
null
null
null
''' Created on 2017/05/11 Licensed under MIT @author: sakurai ''' from contextlib import contextmanager from ctypes import c_int from ctypes import POINTER from ctypes import windll from ctypes import WinError from ctypes import wintypes from threading import _active from threading import _active_limbo_lock from thre...
28.8
79
0.692633
from contextlib import contextmanager from ctypes import c_int from ctypes import POINTER from ctypes import windll from ctypes import WinError from ctypes import wintypes from threading import _active from threading import _active_limbo_lock from threading import Lock from threading import Thread import warnings __...
true
true
f7fa2f2fef8dbc0635ae065be6232efbdbf90d67
3,152
py
Python
sphericalpolygon/inertia.py
lcx366/SphericalPolygon
5594f54bcc2aef2c0ff2aca26a710f76548f050e
[ "MIT" ]
2
2020-01-10T14:21:53.000Z
2022-01-11T10:29:24.000Z
sphericalpolygon/inertia.py
lcx366/SphericalPolygon
5594f54bcc2aef2c0ff2aca26a710f76548f050e
[ "MIT" ]
null
null
null
sphericalpolygon/inertia.py
lcx366/SphericalPolygon
5594f54bcc2aef2c0ff2aca26a710f76548f050e
[ "MIT" ]
1
2021-11-15T13:10:57.000Z
2021-11-15T13:10:57.000Z
import numpy as np from scipy.integrate import dblquad from .excess_area import polygon_excess from .functions import * def polygon_inertia(vertices): ''' Calculate the geometrical inertia tensor of a spherical polygon over a unit sphere. Usage: inertia = polygon_inertia(vertices) Inputs: ver...
33.178947
132
0.576777
import numpy as np from scipy.integrate import dblquad from .excess_area import polygon_excess from .functions import * def polygon_inertia(vertices): N = len(vertices) sum11,sum22,sum33,sum12,sum13,sum23 = np.zeros(6) for i in range(N - 1): p1 = np.radians(vertices[i]) p2 = np.r...
true
true
f7fa2fe16e5e15e747920ac84b9b7e96c7c7b8a2
8,096
py
Python
fabfile.py
janbrrr/django-polls-improved
14ffea3a0477e94e6154a9eab08c380ff7415819
[ "MIT" ]
null
null
null
fabfile.py
janbrrr/django-polls-improved
14ffea3a0477e94e6154a9eab08c380ff7415819
[ "MIT" ]
null
null
null
fabfile.py
janbrrr/django-polls-improved
14ffea3a0477e94e6154a9eab08c380ff7415819
[ "MIT" ]
null
null
null
from getpass import getpass from fabric import Config, Connection, task from invoke import Responder from invoke import run as run_local REPOSITORY_URL = "github.com/janbrrr/django-polls-improved.git" # without the https:// HOSTS = { "local": {"address": "localhost"}, "prod": {"address": "YOUR-HOST", "proje...
39.492683
116
0.669837
from getpass import getpass from fabric import Config, Connection, task from invoke import Responder from invoke import run as run_local REPOSITORY_URL = "github.com/janbrrr/django-polls-improved.git" HOSTS = { "local": {"address": "localhost"}, "prod": {"address": "YOUR-HOST", "project_dir": "~/python/dja...
true
true
f7fa30565c238f3f862a6dc7fda40b74bae15450
4,936
py
Python
lite/tests/unittest_py/op/test_generate_proposals_op.py
liyupeng/Paddle-Lite
e821d4d6f62f71534f594afc74560738bf02a879
[ "Apache-2.0" ]
null
null
null
lite/tests/unittest_py/op/test_generate_proposals_op.py
liyupeng/Paddle-Lite
e821d4d6f62f71534f594afc74560738bf02a879
[ "Apache-2.0" ]
null
null
null
lite/tests/unittest_py/op/test_generate_proposals_op.py
liyupeng/Paddle-Lite
e821d4d6f62f71534f594afc74560738bf02a879
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle 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 appli...
41.133333
125
0.60859
import sys sys.path.append('../') from auto_scan_test import AutoScanTest, IgnoreReasons from program_config import TensorConfig, ProgramConfig, OpConfig, CxxConfig, TargetType, PrecisionType, DataLayoutType, Place import unittest import hypothesis from hypothesis import given, settings, seed, example, ...
true
true
f7fa305b79b7894b34e4865ca9355c4a05bbc097
113,086
py
Python
Lib/yp_test/test_codecs.py
Syeberman/nohtyP
59d7214a5a5474a03c54f45d79ad4fd037989a79
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/yp_test/test_codecs.py
Syeberman/nohtyP
59d7214a5a5474a03c54f45d79ad4fd037989a79
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/yp_test/test_codecs.py
Syeberman/nohtyP
59d7214a5a5474a03c54f45d79ad4fd037989a79
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
from yp import * import codecs import contextlib import io import locale import sys from yp_test import yp_unittest import warnings import encodings from yp_test import support # Extra assurance that we're not accidentally testing Python's types...unless we mean to _str = str def bytes( *args, **kwargs ): raise NotIm...
38.399321
113
0.544382
from yp import * import codecs import contextlib import io import locale import sys from yp_test import yp_unittest import warnings import encodings from yp_test import support _str = str def bytes( *args, **kwargs ): raise NotImplementedError( "convert script to yp_bytes here" ) def bytearray( *args, **kwargs ): ra...
true
true
f7fa316c85f6113e64369e1a1203eb7ce7ba6486
1,298
py
Python
tests/expectations/metrics/test_table_column_types.py
OmriBromberg/great_expectations
60eb81ebfb08fef5d37d55c316dc962928beb165
[ "Apache-2.0" ]
1
2021-04-11T20:54:23.000Z
2021-04-11T20:54:23.000Z
tests/expectations/metrics/test_table_column_types.py
OmriBromberg/great_expectations
60eb81ebfb08fef5d37d55c316dc962928beb165
[ "Apache-2.0" ]
53
2021-10-02T02:26:51.000Z
2021-12-28T20:49:25.000Z
tests/expectations/metrics/test_table_column_types.py
OmriBromberg/great_expectations
60eb81ebfb08fef5d37d55c316dc962928beb165
[ "Apache-2.0" ]
1
2022-03-03T16:47:32.000Z
2022-03-03T16:47:32.000Z
from great_expectations.data_context.util import file_relative_path from great_expectations.execution_engine import SqlAlchemyExecutionEngine from great_expectations.execution_engine.sqlalchemy_batch_data import ( SqlAlchemyBatchData, ) from great_expectations.expectations.metrics.import_manager import reflection f...
36.055556
81
0.747304
from great_expectations.data_context.util import file_relative_path from great_expectations.execution_engine import SqlAlchemyExecutionEngine from great_expectations.execution_engine.sqlalchemy_batch_data import ( SqlAlchemyBatchData, ) from great_expectations.expectations.metrics.import_manager import reflection f...
true
true
f7fa32076ec862689d2256ecc628e8edb2e78a76
102,458
py
Python
pandas/core/strings/accessor.py
shalarewicz/pandas
070341cf4958652343f798c74c04a8c15de2fd04
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/core/strings/accessor.py
shalarewicz/pandas
070341cf4958652343f798c74c04a8c15de2fd04
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/core/strings/accessor.py
shalarewicz/pandas
070341cf4958652343f798c74c04a8c15de2fd04
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
import codecs from functools import wraps import re from typing import ( Dict, List, Optional, ) import warnings import numpy as np import pandas._libs.lib as lib from pandas.util._decorators import Appender from pandas.core.dtypes.common import ( ensure_object, is_bool_dtype, is_categorical_...
32.310943
88
0.555691
import codecs from functools import wraps import re from typing import ( Dict, List, Optional, ) import warnings import numpy as np import pandas._libs.lib as lib from pandas.util._decorators import Appender from pandas.core.dtypes.common import ( ensure_object, is_bool_dtype, is_categorical_...
true
true
f7fa33aca37f41ebbd190f0d067a5693db3e8827
2,187
py
Python
homeassistant/scripts/keyring.py
kdschlosser/home-assistant
a94a24f6f83508642e220fadf2799789dc32a25b
[ "Apache-2.0" ]
4
2019-07-03T22:36:57.000Z
2019-08-10T15:33:25.000Z
homeassistant/scripts/keyring.py
kdschlosser/home-assistant
a94a24f6f83508642e220fadf2799789dc32a25b
[ "Apache-2.0" ]
7
2019-08-23T05:26:02.000Z
2022-03-11T23:57:18.000Z
homeassistant/scripts/keyring.py
kdschlosser/home-assistant
a94a24f6f83508642e220fadf2799789dc32a25b
[ "Apache-2.0" ]
3
2019-04-28T16:35:45.000Z
2020-05-28T15:21:59.000Z
"""Script to get, set and delete secrets stored in the keyring.""" import argparse import getpass import os from homeassistant.util.yaml import _SECRET_NAMESPACE REQUIREMENTS = ['keyring==17.1.1', 'keyrings.alt==3.1.1'] def run(args): """Handle keyring script.""" parser = argparse.ArgumentParser( de...
37.706897
77
0.622314
import argparse import getpass import os from homeassistant.util.yaml import _SECRET_NAMESPACE REQUIREMENTS = ['keyring==17.1.1', 'keyrings.alt==3.1.1'] def run(args): parser = argparse.ArgumentParser( description=("Modify Home Assistant secrets in the default keyring. " "Use the se...
true
true
f7fa33ce28fe81e083634e756ec089b7da29625f
2,002
py
Python
pyqode/core/modes/case_converter.py
SunChuquin/pyqode.core
edf29204446e3679701e74343288cf692eb07d86
[ "MIT" ]
42
2018-05-02T07:07:27.000Z
2022-02-01T19:49:49.000Z
pyqode/core/modes/case_converter.py
SunChuquin/pyqode.core
edf29204446e3679701e74343288cf692eb07d86
[ "MIT" ]
65
2018-03-08T11:53:13.000Z
2018-09-17T09:00:09.000Z
Lib/site-packages/pyqode/core/modes/case_converter.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
24
2015-01-09T14:16:41.000Z
2021-12-06T15:11:22.000Z
# -*- coding: utf-8 -*- """ Contains a case converter mode. """ from pyqode.core.api import TextHelper from pyqode.core.api.mode import Mode from pyqode.qt import QtCore, QtWidgets class CaseConverterMode(Mode): """ Provides context actions for converting case of the selected text. Converts selected text to ...
33.932203
75
0.660839
from pyqode.core.api import TextHelper from pyqode.core.api.mode import Mode from pyqode.qt import QtCore, QtWidgets class CaseConverterMode(Mode): def __init__(self): Mode.__init__(self) self._actions_created = False self.action_to_lower = None self.action_to_upper = None de...
true
true
f7fa33e3558687cee8af5b79e668aebfec435e6d
453
py
Python
users/models.py
sandeepagrawal8875/DjangoMultipleUser
81cfc4f679b29df777a0a36db524c9defac01a0b
[ "MIT" ]
null
null
null
users/models.py
sandeepagrawal8875/DjangoMultipleUser
81cfc4f679b29df777a0a36db524c9defac01a0b
[ "MIT" ]
null
null
null
users/models.py
sandeepagrawal8875/DjangoMultipleUser
81cfc4f679b29df777a0a36db524c9defac01a0b
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractUser class User(AbstractUser): is_student = models.BooleanField(default=False) is_teacher = models.BooleanField(default=False) class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) ...
30.2
74
0.732892
from django.db import models from django.contrib.auth.models import AbstractUser class User(AbstractUser): is_student = models.BooleanField(default=False) is_teacher = models.BooleanField(default=False) class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) ...
true
true
f7fa35208d27a1fd3736b882390bd2b44ca52789
2,321
py
Python
pytorch_datasets/datasets/object_net_3d.py
mpeven/Pytorch_Datasets
6a1709bfb59739b5e7ce299c70350b0080209c82
[ "Apache-2.0" ]
3
2019-01-22T19:19:49.000Z
2020-12-16T01:29:56.000Z
pytorch_datasets/datasets/object_net_3d.py
mpeven/Pytorch_Datasets
6a1709bfb59739b5e7ce299c70350b0080209c82
[ "Apache-2.0" ]
null
null
null
pytorch_datasets/datasets/object_net_3d.py
mpeven/Pytorch_Datasets
6a1709bfb59739b5e7ce299c70350b0080209c82
[ "Apache-2.0" ]
2
2019-01-22T19:20:01.000Z
2020-12-06T05:50:14.000Z
import os import glob from tqdm import tqdm from PIL import Image import scipy.io as sio import h5py import torch import pytorch_datasets.utils.cache_manager as cache class ObjectNet3D(torch.utils.data.Dataset): dset_location = '/hdd/Datasets/ObjectNet3D/' dset_cached_location = dset_location + "cached_datase...
36.84127
100
0.54847
import os import glob from tqdm import tqdm from PIL import Image import scipy.io as sio import h5py import torch import pytorch_datasets.utils.cache_manager as cache class ObjectNet3D(torch.utils.data.Dataset): dset_location = '/hdd/Datasets/ObjectNet3D/' dset_cached_location = dset_location + "cached_datase...
true
true
f7fa3559bb547fc7fdc1efdb984f0199d0a9b821
27
py
Python
6 - Function/builtin.py
pebueno/Python
d791be1e853f61d80f9eeeb2b1e888835a5bdb63
[ "MIT" ]
2
2022-02-09T19:56:31.000Z
2022-02-17T17:47:52.000Z
6 - Function/builtin.py
pebueno/Python
d791be1e853f61d80f9eeeb2b1e888835a5bdb63
[ "MIT" ]
null
null
null
6 - Function/builtin.py
pebueno/Python
d791be1e853f61d80f9eeeb2b1e888835a5bdb63
[ "MIT" ]
null
null
null
# help(input) # help(float)
13.5
13
0.666667
true
true
f7fa35cacd33049c24690ad9f8efe0d64b2b63f6
2,954
py
Python
generators/app/templates/echo/{{cookiecutter.bot_name}}/app.py
hangdong/botbuilder-python
8ff979a58fadc4356d76b9ce577f94da3245f664
[ "MIT" ]
null
null
null
generators/app/templates/echo/{{cookiecutter.bot_name}}/app.py
hangdong/botbuilder-python
8ff979a58fadc4356d76b9ce577f94da3245f664
[ "MIT" ]
null
null
null
generators/app/templates/echo/{{cookiecutter.bot_name}}/app.py
hangdong/botbuilder-python
8ff979a58fadc4356d76b9ce577f94da3245f664
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import asyncio import sys from datetime import datetime from types import MethodType from flask import Flask, request, Response from botbuilder.core import ( BotFrameworkAdapter, BotFrameworkAdapterSettings, Turn...
33.954023
95
0.703791
import asyncio import sys from datetime import datetime from types import MethodType from flask import Flask, request, Response from botbuilder.core import ( BotFrameworkAdapter, BotFrameworkAdapterSettings, TurnContext, ) from botbuilder.schema import Activity, ActivityTypes from bot import MyBot LOO...
true
true
f7fa35d41a177af1e34031c23ace8c8bd817d358
3,158
py
Python
handFiguration/hand_learning.py
CAU-OSP-02/T03
bd5e32eb76aa651d959c86439f13c07d7781004a
[ "MIT" ]
null
null
null
handFiguration/hand_learning.py
CAU-OSP-02/T03
bd5e32eb76aa651d959c86439f13c07d7781004a
[ "MIT" ]
null
null
null
handFiguration/hand_learning.py
CAU-OSP-02/T03
bd5e32eb76aa651d959c86439f13c07d7781004a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # v.1.1 import cv2 import mediapipe as mp import numpy as np gesture = { 0:'fist', 1:'one', 2:'two', 3:'three', 4:'four', 5:'five', 6:'six', 7:'rock', 8:'spiderman', 9:'yeah', 10:'ok' } #MediaPipe 제공 제스쳐 hand_gesture = { 0:'fist', 1:'one', 2:'gun', 3:'three', 4:'four', 5:'five', ...
38.987654
112
0.579164
import cv2 import mediapipe as mp import numpy as np gesture = { 0:'fist', 1:'one', 2:'two', 3:'three', 4:'four', 5:'five', 6:'six', 7:'rock', 8:'spiderman', 9:'yeah', 10:'ok' } hand_gesture = { 0:'fist', 1:'one', 2:'gun', 3:'three', 4:'four', 5:'five', 6:'promise', 7:'spiderman', 8:'niconiconi',...
true
true
f7fa35ee8fa6810fbc106dfbee55183269fe9b24
7,383
py
Python
vmtkScripts/vmtkcenterlineviewer.py
daron1337/vmtk
df401c88959ccf758b1bc6353786600473187683
[ "Apache-2.0" ]
3
2016-02-26T17:30:04.000Z
2017-11-09T03:24:04.000Z
vmtkScripts/vmtkcenterlineviewer.py
ElenaFagg/vmtk
5c90b786afae3b2d84c79df593e648ada26402e3
[ "Apache-2.0" ]
null
null
null
vmtkScripts/vmtkcenterlineviewer.py
ElenaFagg/vmtk
5c90b786afae3b2d84c79df593e648ada26402e3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ## Program: VMTK ## Module: $RCSfile: vmtkcenterlineviewer.py,v $ ## Language: Python ## Date: $Date: 2006/05/26 12:35:13 $ ## Version: $Revision: 1.3 $ ## Copyright (c) Luca Antiga, David Steinman. All rights reserved. ## See LICENCE file for details. ## This software is ...
41.477528
118
0.646214
= 256 self.vmtkRenderer = None self.OwnRenderer = 0 self.SetScriptName('vmtkcenterlineviewer') self.SetScriptDoc('') self.SetInputMembers([ ['Centerlines','i','vtkPolyData',1,'','the input surface','vmtksurfacereader'], ['PointDataArrayName','pointarra...
false
true
f7fa36c0be2d9710696527fe65ebe65716568d3b
5,713
py
Python
zipline/examples/pairtrade.py
colin1alexander/zipline
ba42e6d8b972dcce9271526562ceff0cddd3fa30
[ "Apache-2.0" ]
null
null
null
zipline/examples/pairtrade.py
colin1alexander/zipline
ba42e6d8b972dcce9271526562ceff0cddd3fa30
[ "Apache-2.0" ]
null
null
null
zipline/examples/pairtrade.py
colin1alexander/zipline
ba42e6d8b972dcce9271526562ceff0cddd3fa30
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2013 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
35.930818
77
0.636093
import logbook import matplotlib.pyplot as plt import numpy as np import statsmodels.api as sm from datetime import datetime import pytz from zipline.algorithm import TradingAlgorithm from zipline.transforms import batch_transform from zipline.utils.factory import load_from_yahoo from zipline.api impor...
true
true
f7fa36e765b643cef087a41180e1be7f91ad584a
3,522
py
Python
aperturelib/__init__.py
Aperture-py/aperture-lib
5c54af216319f297ddf96181a16f088cf1ba23f3
[ "MIT" ]
null
null
null
aperturelib/__init__.py
Aperture-py/aperture-lib
5c54af216319f297ddf96181a16f088cf1ba23f3
[ "MIT" ]
4
2021-03-18T20:57:02.000Z
2021-09-08T00:06:56.000Z
aperturelib/__init__.py
Aperture-py/aperture-lib
5c54af216319f297ddf96181a16f088cf1ba23f3
[ "MIT" ]
null
null
null
''' Aperturelib ''' # Supported formats may be found here: http://pillow.readthedocs.io/en/5.1.x/handbook/image-file-formats.html SUPPORTED_EXTENSIONS = ('.jpg', '.jpeg', '.gif', '.png') from PIL import Image from .resize import resize_image as resize from .watermark import watermark_image from .watermark import wate...
32.018182
109
0.617547
SUPPORTED_EXTENSIONS = ('.jpg', '.jpeg', '.gif', '.png') from PIL import Image from .resize import resize_image as resize from .watermark import watermark_image from .watermark import watermark_text def open(f): return Image.open(f) def format_image(path, options): image = Image.open(path) image_pipe...
true
true
f7fa374159192d68eb92a8a0ef092eaf359372ac
164
py
Python
Aula10 - Curso em Video/Exercicio_05.py
DheniMoura/Python_Curso-em-Video
60a00a36a188ff8a305a3ab92450c9d75cb25aee
[ "MIT" ]
null
null
null
Aula10 - Curso em Video/Exercicio_05.py
DheniMoura/Python_Curso-em-Video
60a00a36a188ff8a305a3ab92450c9d75cb25aee
[ "MIT" ]
null
null
null
Aula10 - Curso em Video/Exercicio_05.py
DheniMoura/Python_Curso-em-Video
60a00a36a188ff8a305a3ab92450c9d75cb25aee
[ "MIT" ]
null
null
null
num = [] for i in range(0,3): num.append(float(input('Digite um número: '))) maior = max(num) menor = min(num) print('maior: ', maior) print('menor: ', menor)
18.222222
50
0.615854
num = [] for i in range(0,3): num.append(float(input('Digite um número: '))) maior = max(num) menor = min(num) print('maior: ', maior) print('menor: ', menor)
true
true
f7fa37609a642250193991cca36aebd6128e5b13
8,105
py
Python
gpMgmt/sbin/gpgetstatususingtransition.py
gridgentoo/gpdb
f3dc101a7b4fa3d392f79cc5146b20c83894eb19
[ "PostgreSQL", "Apache-2.0" ]
9
2018-04-20T03:31:01.000Z
2020-05-13T14:10:53.000Z
gpMgmt/sbin/gpgetstatususingtransition.py
gridgentoo/gpdb
f3dc101a7b4fa3d392f79cc5146b20c83894eb19
[ "PostgreSQL", "Apache-2.0" ]
36
2017-09-21T09:12:27.000Z
2020-06-17T16:40:48.000Z
gpMgmt/sbin/gpgetstatususingtransition.py
gridgentoo/gpdb
f3dc101a7b4fa3d392f79cc5146b20c83894eb19
[ "PostgreSQL", "Apache-2.0" ]
32
2017-08-31T12:50:52.000Z
2022-03-01T07:34:53.000Z
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2010. All Rights Reserved. # # # THIS IMPORT MUST COME FIRST # import mainUtils FIRST to get python version check # from gppylib.mainUtils import * import os, sys import pickle, base64 from optparse import Option, OptionGroup, OptionParser, OptionValueError from...
39.536585
118
0.60839
from gppylib.mainUtils import * import os, sys import pickle, base64 from optparse import Option, OptionGroup, OptionParser, OptionValueError from gppylib.gpparseopts import OptParser, OptChecker from gppylib import gplog, gparray, pgconf from gppylib.commands import base, gp, pg, unix from gppylib.db import...
true
true
f7fa39044f61d18690d2a95b8ebc1ec9d49fee4e
11,919
py
Python
py/elfs/sections.py
pombredanne/debin
9abb5215b54077da1e9479bfcbc56cd860aac370
[ "Apache-2.0" ]
322
2018-12-06T03:32:37.000Z
2022-03-30T06:01:03.000Z
py/elfs/sections.py
pombredanne/debin
9abb5215b54077da1e9479bfcbc56cd860aac370
[ "Apache-2.0" ]
20
2019-01-30T20:22:33.000Z
2022-01-24T11:40:37.000Z
py/elfs/sections.py
pombredanne/debin
9abb5215b54077da1e9479bfcbc56cd860aac370
[ "Apache-2.0" ]
49
2019-02-13T00:25:19.000Z
2022-03-25T05:32:56.000Z
from common import constants from common import utils from common.constants import TEXT, RODATA, DATA, BSS, INIT, STRTAB from common.constants import FINI, PLT, DYNSYM, DYNSTR, GOTPLT, SYMTAB from common.constants import GOT, PLTGOT class Sections: def __init__(self, *args, **kwargs): self.binary = kwargs...
42.265957
120
0.596778
from common import constants from common import utils from common.constants import TEXT, RODATA, DATA, BSS, INIT, STRTAB from common.constants import FINI, PLT, DYNSYM, DYNSTR, GOTPLT, SYMTAB from common.constants import GOT, PLTGOT class Sections: def __init__(self, *args, **kwargs): self.binary = kwargs...
true
true
f7fa3be7601855ea8cced27ee6309668460fa5c0
3,664
py
Python
Python3/1312.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
854
2018-11-09T08:06:16.000Z
2022-03-31T06:05:53.000Z
Python3/1312.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
29
2019-06-02T05:02:25.000Z
2021-11-15T04:09:37.000Z
Python3/1312.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
347
2018-12-23T01:57:37.000Z
2022-03-12T14:51:21.000Z
__________________________________________________________________________________________________ sample 24 ms submission class Solution: def minInsertions(self, s: str) -> int: def jump(nums): if not nums or len(nums) == 1: return 0 graph = dict() end ...
44.682927
636
0.596616
__________________________________________________________________________________________________ sample 24 ms submission class Solution: def minInsertions(self, s: str) -> int: def jump(nums): if not nums or len(nums) == 1: return 0 graph = dict() end ...
false
true
f7fa3c98af72fc4111da2a402f5f8fb52908029a
100
py
Python
tests/common/boot/load_me_cdi.py
cesartalves/python-cdi
a5a13b5e0ad6a5255e686ecd934d4606a9c2a1f2
[ "BSD-3-Clause" ]
10
2017-02-02T19:23:12.000Z
2020-11-18T05:37:10.000Z
tests/common/boot/load_me_cdi.py
cesartalves/python-cdi
a5a13b5e0ad6a5255e686ecd934d4606a9c2a1f2
[ "BSD-3-Clause" ]
34
2017-07-29T21:03:20.000Z
2021-07-01T13:35:31.000Z
tests/common/boot/load_me_cdi.py
cesartalves/python-cdi
a5a13b5e0ad6a5255e686ecd934d4606a9c2a1f2
[ "BSD-3-Clause" ]
1
2019-06-05T14:45:36.000Z
2019-06-05T14:45:36.000Z
from pycdi import Producer @Producer(str, _context='load_me') def producer(): return __name__
14.285714
34
0.74
from pycdi import Producer @Producer(str, _context='load_me') def producer(): return __name__
true
true
f7fa3ca9106f79e3d5f56b1840dbb89bcbc5ccdb
13,839
py
Python
fairseq/options.py
jaehwlee/K-wav2vec
6ba33f0ef7d2399e4c52a3c80d83a092dac4daa9
[ "Apache-2.0" ]
33
2021-08-11T12:52:53.000Z
2022-03-08T03:03:21.000Z
fairseq/options.py
jaehwlee/K-wav2vec
6ba33f0ef7d2399e4c52a3c80d83a092dac4daa9
[ "Apache-2.0" ]
3
2022-01-09T07:34:38.000Z
2022-02-14T12:42:03.000Z
fairseq/options.py
jaehwlee/K-wav2vec
6ba33f0ef7d2399e4c52a3c80d83a092dac4daa9
[ "Apache-2.0" ]
4
2021-12-06T08:53:19.000Z
2022-01-25T06:37:50.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse from typing import Callable, List, Optional import torch from fairseq import utils from fairseq.data.indexed_dataset import g...
37.811475
88
0.681769
import argparse from typing import Callable, List, Optional import torch from fairseq import utils from fairseq.data.indexed_dataset import get_available_dataset_impl from fairseq.dataclass.configs import ( CheckpointConfig, CommonConfig, CommonEvalConfig, DatasetConfig, DistributedTrainingCon...
true
true
f7fa3cd0482257d2b9b331b917227a040202021b
4,348
py
Python
pandas_market_calendars/exchange_calendar_tase.py
gabglus/pandas_market_calendars
dc1453a240a34f569cfd2b4e8ffd396f82c34b14
[ "MIT" ]
null
null
null
pandas_market_calendars/exchange_calendar_tase.py
gabglus/pandas_market_calendars
dc1453a240a34f569cfd2b4e8ffd396f82c34b14
[ "MIT" ]
null
null
null
pandas_market_calendars/exchange_calendar_tase.py
gabglus/pandas_market_calendars
dc1453a240a34f569cfd2b4e8ffd396f82c34b14
[ "MIT" ]
null
null
null
from datetime import time from pandas import Timestamp from pytz import timezone from pandas_market_calendars import MarketCalendar TASEClosedDay = [ # 2019 Timestamp('2019-03-21', tz='Asia/Jerusalem'), Timestamp('2019-04-09', tz='Asia/Jerusalem'), Timestamp('2019-04-25', tz='Asia/Jerusalem'),...
35.349593
144
0.640524
from datetime import time from pandas import Timestamp from pytz import timezone from pandas_market_calendars import MarketCalendar TASEClosedDay = [ Timestamp('2019-03-21', tz='Asia/Jerusalem'), Timestamp('2019-04-09', tz='Asia/Jerusalem'), Timestamp('2019-04-25', tz='Asia/Jerusalem'), T...
true
true
f7fa3cd349f1ac8a1d4f4540a2bee092f29ec831
4,793
py
Python
sample_ml_code/kmeansandey.py
aws-samples/automation-ml-step-data-pipeline
835e6e746fd932b32f1a186006adc257778eeec6
[ "MIT-0" ]
6
2020-10-27T09:07:36.000Z
2021-12-27T00:25:19.000Z
sample_ml_code/kmeansandey.py
aws-samples/automation-ml-step-data-pipeline
835e6e746fd932b32f1a186006adc257778eeec6
[ "MIT-0" ]
null
null
null
sample_ml_code/kmeansandey.py
aws-samples/automation-ml-step-data-pipeline
835e6e746fd932b32f1a186006adc257778eeec6
[ "MIT-0" ]
8
2020-10-13T22:23:16.000Z
2022-02-15T21:29:37.000Z
#!/usr/bin/env python """ Anomaly detection, where anomalies are "too far" from one of k cluster centers. Calculate cluster centers for k clusters (where k is an input). Then: for each observation in the input file, assign it to the closest cluster and calculate the Mahalanobis distance from that point to the cluster...
39.61157
127
0.66305
""" Anomaly detection, where anomalies are "too far" from one of k cluster centers. Calculate cluster centers for k clusters (where k is an input). Then: for each observation in the input file, assign it to the closest cluster and calculate the Mahalanobis distance from that point to the cluster center. Output the o...
false
true
f7fa3d230e37b5992cf1b5209c6bf723230cb81d
1,018
py
Python
src/Install/private.py
DBrianKimmel/PyHouse_Install
9c7ff397299e0f2e63782d4a955d2f8bf840ef6f
[ "MIT" ]
1
2015-10-13T15:01:48.000Z
2015-10-13T15:01:48.000Z
src/Install/private.py
DBrianKimmel/PyHouse_Install
9c7ff397299e0f2e63782d4a955d2f8bf840ef6f
[ "MIT" ]
null
null
null
src/Install/private.py
DBrianKimmel/PyHouse_Install
9c7ff397299e0f2e63782d4a955d2f8bf840ef6f
[ "MIT" ]
null
null
null
""" @name: PyHouse_Install/src/Install/private.py @author: D. Brian Kimmel @contact: D.BrianKimmel@gmail.com @copyright: (c) 2016-2016 by D. Brian Kimmel @license: MIT License @note: Created May 13, 2016 @Summary: Create .private Create the /etc/pyhouse/.private.yaml file that will hold the secret i...
19.207547
108
0.633595
import yaml Y_FILE = '/etc/pyhouse/.private.yaml' class Private(object): def __init__(self): self.hostname = None class API(object): def __init__(self): self.m_private = Private() self.read_yaml() def read_yaml(self): l_file = open(Y_FILE) self.m_priv...
true
true
f7fa3ddc6f0ec4da6918d148a7a91e09eb47a328
2,000
py
Python
lib/surface/eventarc/channel_connections/list.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/eventarc/channel_connections/list.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/eventarc/channel_connections/list.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
31.25
103
0.7375
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.eventarc import channel_connections from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.eventarc import flags _DETAILED_HELP = { "DESCRIPTIO...
true
true
f7fa3e113624a8b4cb37438fb0d9c9ef30af3f3b
72
py
Python
omb/backend/__init__.py
lhqing/omb
3476a6c377dbac621e6328004d6fd73f7b7c4fbb
[ "MIT" ]
4
2020-08-28T01:00:09.000Z
2022-03-25T23:00:47.000Z
omb/backend/__init__.py
lhqing/omb
3476a6c377dbac621e6328004d6fd73f7b7c4fbb
[ "MIT" ]
2
2020-11-08T23:55:08.000Z
2020-12-24T06:05:17.000Z
omb/backend/__init__.py
lhqing/omb
3476a6c377dbac621e6328004d6fd73f7b7c4fbb
[ "MIT" ]
null
null
null
from .Dataset import Dataset from .ingest import * dataset = Dataset()
14.4
28
0.75
from .Dataset import Dataset from .ingest import * dataset = Dataset()
true
true
f7fa3e876f5f1fdd3fd9a03bbcae2a10d57ea60b
76,636
py
Python
python/pyspark/pandas/tests/test_ops_on_diff_frames.py
geosmart/spark
9c5bcac61ee56fbb271e890cc33f9a983612c5b0
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2016-06-03T07:29:48.000Z
2016-06-03T07:29:48.000Z
python/pyspark/pandas/tests/test_ops_on_diff_frames.py
geosmart/spark
9c5bcac61ee56fbb271e890cc33f9a983612c5b0
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
python/pyspark/pandas/tests/test_ops_on_diff_frames.py
geosmart/spark
9c5bcac61ee56fbb271e890cc33f9a983612c5b0
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2016-03-31T11:26:36.000Z
2016-03-31T11:26:36.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 us...
38.4333
100
0.534997
from distutils.version import LooseVersion from itertools import product import unittest import pandas as pd import numpy as np from pyspark import pandas as ps from pyspark.pandas.config import set_option, reset_option from pyspark.pandas.frame import DataFrame from pyspark.testing.pandasutils impor...
true
true
f7fa3ea0d3d0549f395e122654ded5814882e7f6
4,658
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/packaging/language/test_gem.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/packaging/language/test_gem.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/packaging/language/test_gem.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# Copyright (c) 2018 Antoine Catton # MIT License (see licenses/MIT-license.txt or https://opensource.org/licenses/MIT) import copy import pytest from ansible_collections.community.general.plugins.modules.packaging.language import gem from ansible_collections.community.general.tests.unit.modules.utils import AnsibleE...
33.271429
140
0.647059
import copy import pytest from ansible_collections.community.general.plugins.modules.packaging.language import gem from ansible_collections.community.general.tests.unit.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args def get_command(run_command): args = run_command.call_...
true
true
f7fa3f1a45b3381ac2f4e41174846e979ed5f25d
5,001
py
Python
app/account/forms.py
hack4impact/women-veterans-rock
7de5f5645819dbe67ba71a1f0b29f84a45e35789
[ "MIT" ]
16
2015-10-26T20:30:35.000Z
2017-02-01T01:45:35.000Z
app/account/forms.py
hack4impact/women-veterans-rock
7de5f5645819dbe67ba71a1f0b29f84a45e35789
[ "MIT" ]
34
2015-10-21T02:58:42.000Z
2017-02-24T06:57:07.000Z
app/account/forms.py
hack4impact/women-veterans-rock
7de5f5645819dbe67ba71a1f0b29f84a45e35789
[ "MIT" ]
1
2015-10-23T21:32:28.000Z
2015-10-23T21:32:28.000Z
from flask import url_for from flask.ext.wtf import Form from wtforms.fields import ( StringField, PasswordField, BooleanField, SubmitField, TextAreaField, DateField, SelectMultipleField ) from wtforms.fields.html5 import EmailField from wtforms.validators import ( Length, Email, ...
29.946108
79
0.618276
from flask import url_for from flask.ext.wtf import Form from wtforms.fields import ( StringField, PasswordField, BooleanField, SubmitField, TextAreaField, DateField, SelectMultipleField ) from wtforms.fields.html5 import EmailField from wtforms.validators import ( Length, Email, ...
true
true
f7fa3f64974fb0bb7564275775f996229970cfe7
2,723
py
Python
Router/routersploit/modules/exploits/dlink/dir_300_320_615_auth_bypass.py
dendisuhubdy/grokmachine
120a21a25c2730ed356739231ec8b99fc0575c8b
[ "BSD-3-Clause" ]
46
2017-05-15T11:15:08.000Z
2018-07-02T03:32:52.000Z
Router/routersploit/modules/exploits/dlink/dir_300_320_615_auth_bypass.py
dendisuhubdy/grokmachine
120a21a25c2730ed356739231ec8b99fc0575c8b
[ "BSD-3-Clause" ]
null
null
null
Router/routersploit/modules/exploits/dlink/dir_300_320_615_auth_bypass.py
dendisuhubdy/grokmachine
120a21a25c2730ed356739231ec8b99fc0575c8b
[ "BSD-3-Clause" ]
24
2017-05-17T03:26:17.000Z
2018-07-09T07:00:50.000Z
from routersploit import ( exploits, print_success, print_error, sanitize_url, http_request, mute, ) class Exploit(exploits.Exploit): """ Exploit implementation for D-Link DIR-300, DIR-320, DIR-615 Authentication Bypass vulnerability. If the target is vulnerable link to bypass auth...
38.9
201
0.618068
from routersploit import ( exploits, print_success, print_error, sanitize_url, http_request, mute, ) class Exploit(exploits.Exploit): """ Exploit implementation for D-Link DIR-300, DIR-320, DIR-615 Authentication Bypass vulnerability. If the target is vulnerable link to bypass auth...
false
true
f7fa4004f6aaa9bd35ddd4d2a4a715e9cff1dad4
2,128
py
Python
app.py
hackedu/sheets-backup
b9db1e1fecab8555baddd0e0505af25e99b13179
[ "MIT" ]
3
2017-03-08T15:24:04.000Z
2021-09-26T14:00:10.000Z
app.py
hackclub/sheets-backup
b9db1e1fecab8555baddd0e0505af25e99b13179
[ "MIT" ]
1
2015-11-25T00:50:07.000Z
2015-11-25T00:50:07.000Z
app.py
hackedu/sheets-backup
b9db1e1fecab8555baddd0e0505af25e99b13179
[ "MIT" ]
null
null
null
import os import sys import requests import re from contextlib import contextmanager from flask import Flask, request from sh import cd, git, soffice GIT_REMOTE = os.environ['GIT_REMOTE'] app = Flask(__name__) repo = None def init(): if os.path.exists('repo'): if not os.path.isdir('repo/.git'): ...
25.95122
114
0.640977
import os import sys import requests import re from contextlib import contextmanager from flask import Flask, request from sh import cd, git, soffice GIT_REMOTE = os.environ['GIT_REMOTE'] app = Flask(__name__) repo = None def init(): if os.path.exists('repo'): if not os.path.isdir('repo/.git'): ...
true
true
f7fa40ab65005e934dab750f97e8216b91b792b1
23,200
py
Python
evalutils/evalutils.py
GabyRumc/evalutils
d77c80d6420980a886302237ca321d09478a3db2
[ "MIT" ]
17
2018-10-31T18:46:21.000Z
2022-01-27T05:07:56.000Z
evalutils/evalutils.py
GabyRumc/evalutils
d77c80d6420980a886302237ca321d09478a3db2
[ "MIT" ]
117
2018-03-29T08:39:22.000Z
2022-03-30T07:47:15.000Z
evalutils/evalutils.py
GabyRumc/evalutils
d77c80d6420980a886302237ca321d09478a3db2
[ "MIT" ]
8
2018-07-23T13:40:15.000Z
2022-03-31T13:28:52.000Z
import json import logging from abc import ABC, abstractmethod from os import PathLike from pathlib import Path from typing import ( Any, Callable, Dict, Iterable, List, Optional, Pattern, Set, Tuple, Union, ) from warnings import warn import SimpleITK from pandas import DataFra...
33.142857
84
0.597759
import json import logging from abc import ABC, abstractmethod from os import PathLike from pathlib import Path from typing import ( Any, Callable, Dict, Iterable, List, Optional, Pattern, Set, Tuple, Union, ) from warnings import warn import SimpleITK from pandas import DataFra...
true
true
f7fa40ec5aa438fecbe7602876ea17b732a736ff
23,891
py
Python
auxiliary/views.py
Tudmotu/Open-Knesset
005adff8422ad34af8f78b0f32e7052b65a5bad3
[ "BSD-3-Clause" ]
1
2018-12-11T01:43:25.000Z
2018-12-11T01:43:25.000Z
auxiliary/views.py
Tudmotu/Open-Knesset
005adff8422ad34af8f78b0f32e7052b65a5bad3
[ "BSD-3-Clause" ]
null
null
null
auxiliary/views.py
Tudmotu/Open-Knesset
005adff8422ad34af8f78b0f32e7052b65a5bad3
[ "BSD-3-Clause" ]
null
null
null
import csv, random, tagging, logging from actstream import action from annotatetext.views import post_annotation as annotatetext_post_annotation from django.conf import settings from django.contrib.auth.decorators import login_required, permission_required from django.contrib.comments.models import Comment from django....
39.294408
147
0.633544
import csv, random, tagging, logging from actstream import action from annotatetext.views import post_annotation as annotatetext_post_annotation from django.conf import settings from django.contrib.auth.decorators import login_required, permission_required from django.contrib.comments.models import Comment from django....
true
true
f7fa41252ca5286426a644c2a0f58379888142d3
7,037
py
Python
Tensile/Tests/unit/test_Component.py
ufo2011/Tensile
f8fe37a2708f757a7e97171ca9e40c7581bd40dd
[ "MIT" ]
116
2017-06-29T08:52:55.000Z
2022-03-25T03:01:43.000Z
Tensile/Tests/unit/test_Component.py
ufo2011/Tensile
f8fe37a2708f757a7e97171ca9e40c7581bd40dd
[ "MIT" ]
431
2017-07-19T16:29:54.000Z
2022-03-31T19:40:12.000Z
Tensile/Tests/unit/test_Component.py
ufo2011/Tensile
f8fe37a2708f757a7e97171ca9e40c7581bd40dd
[ "MIT" ]
107
2017-10-14T01:38:41.000Z
2022-03-07T08:49:09.000Z
################################################################################ # Copyright 2020 Advanced Micro Devices, Inc. All rights reserved. # # 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 So...
36.46114
114
0.554356
true
true
f7fa41af81c49e6f6e970ef316571ea89fcdd869
240
py
Python
pacote-download/d012 - valor do produto de dar 5% desconto.py
Carlos-DOliveira/cursoemvideo-python3
4546c8a7360155243e2f7ecbbb80c57868f770a2
[ "MIT" ]
null
null
null
pacote-download/d012 - valor do produto de dar 5% desconto.py
Carlos-DOliveira/cursoemvideo-python3
4546c8a7360155243e2f7ecbbb80c57868f770a2
[ "MIT" ]
null
null
null
pacote-download/d012 - valor do produto de dar 5% desconto.py
Carlos-DOliveira/cursoemvideo-python3
4546c8a7360155243e2f7ecbbb80c57868f770a2
[ "MIT" ]
null
null
null
''' 012 Faça um algoritmo que leia o preço de um produto e mostre seu novo preço, com 5% de desconto''' valor = float(input('Digite o valor do protudo: R$ ')) print(f'O Valor do produto com 5% de desconto é {valor - (valor * 5)/100:.2f}')
48
103
0.683333
valor = float(input('Digite o valor do protudo: R$ ')) print(f'O Valor do produto com 5% de desconto é {valor - (valor * 5)/100:.2f}')
true
true
f7fa43056e7a13c78632ab592112a94dfe59e9d5
17,688
py
Python
mindmeld/models/text_models.py
BuildJet/mindmeld
615e40288695990188adb15b9952484a967e94a8
[ "Apache-2.0" ]
null
null
null
mindmeld/models/text_models.py
BuildJet/mindmeld
615e40288695990188adb15b9952484a967e94a8
[ "Apache-2.0" ]
1
2021-03-16T12:47:59.000Z
2021-03-16T12:47:59.000Z
mindmeld/models/text_models.py
isabella232/mindmeld
82b063b21d6012b36ba2a4321edfa56b8c4b8c90
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Cisco Systems, Inc. and others. 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...
37.004184
96
0.609
import logging import operator import random import numpy as np from sklearn.ensemble import RandomForestClassifier from sklearn.feature_extraction import DictVectorizer from sklearn.feature_selection import SelectFromModel, SelectPercentile from sklearn.linear_model import LogisticRegression from sklearn...
true
true
f7fa44a77c0ababe4dea55be8f086fb223ae61c2
280
py
Python
autovirt/mail/interface/mail.py
xlam/autovirt
a19f9237c8b1123ce4f4b8b396dc88122019d4f8
[ "MIT" ]
null
null
null
autovirt/mail/interface/mail.py
xlam/autovirt
a19f9237c8b1123ce4f4b8b396dc88122019d4f8
[ "MIT" ]
null
null
null
autovirt/mail/interface/mail.py
xlam/autovirt
a19f9237c8b1123ce4f4b8b396dc88122019d4f8
[ "MIT" ]
null
null
null
import abc from autovirt.structs import Message class MailGateway(abc.ABC): @abc.abstractmethod def get_messages_by_subject(self, subject: str) -> list[Message]: pass @abc.abstractmethod def delete_messages(self, messages: list[Message]): pass
20
69
0.703571
import abc from autovirt.structs import Message class MailGateway(abc.ABC): @abc.abstractmethod def get_messages_by_subject(self, subject: str) -> list[Message]: pass @abc.abstractmethod def delete_messages(self, messages: list[Message]): pass
true
true
f7fa451ddd286b694225e6d832e26e4b1b0e775d
8,237
py
Python
ravenframework/Metrics/metrics/SklMetric.py
khurrumsaleem/raven
3a158f9ae3851d3eca51b4bd91ea6494e5c0ed89
[ "Apache-2.0" ]
null
null
null
ravenframework/Metrics/metrics/SklMetric.py
khurrumsaleem/raven
3a158f9ae3851d3eca51b4bd91ea6494e5c0ed89
[ "Apache-2.0" ]
null
null
null
ravenframework/Metrics/metrics/SklMetric.py
khurrumsaleem/raven
3a158f9ae3851d3eca51b4bd91ea6494e5c0ed89
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Battelle Energy Alliance, 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 agreed t...
51.48125
156
0.653272
import numpy as np import ast from ...utils import utils from .MetricInterface import MetricInterface from ...utils import InputData, InputTypes class SKL(MetricInterface): availMetrics ={} @classmethod def getInputSpecification(cls): inputSpecification = super().getInputSpecification() ...
true
true
f7fa45ab027269032a18ee9b788e4395c7ec595c
4,996
py
Python
ros/src/twist_controller/dbw_node.py
Az4z3l/CarND-SuperAI-Capstone
a9b96618bcfb1a93a8e332b4132f3b7ce0213d4f
[ "MIT" ]
1
2020-06-30T10:40:32.000Z
2020-06-30T10:40:32.000Z
ros/src/twist_controller/dbw_node.py
Az4z3l/CarND-SuperAI-Capstone
a9b96618bcfb1a93a8e332b4132f3b7ce0213d4f
[ "MIT" ]
null
null
null
ros/src/twist_controller/dbw_node.py
Az4z3l/CarND-SuperAI-Capstone
a9b96618bcfb1a93a8e332b4132f3b7ce0213d4f
[ "MIT" ]
2
2020-03-19T12:58:56.000Z
2020-07-10T09:14:58.000Z
#!/usr/bin/env python import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport from geometry_msgs.msg import TwistStamped import math from twist_controller import Controller ''' This node will subscribe: 'dbw_enabled' --------> Boolean value represent...
35.685714
104
0.635909
import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport from geometry_msgs.msg import TwistStamped import math from twist_controller import Controller PUBLISH_RATE = 50 GAS_DENSITY = 2.858 ONE_MPH = 0.44704 class VehicleParams(object): ...
true
true
f7fa45ec75b3960d95119de764163e3b74e4d488
5,767
py
Python
remoteappmanager/db/tests/abc_test_interfaces.py
robertopreste/simphony-remote
4b07ecd0cf7a66b534e215225bc4a97e903feabb
[ "BSD-3-Clause" ]
null
null
null
remoteappmanager/db/tests/abc_test_interfaces.py
robertopreste/simphony-remote
4b07ecd0cf7a66b534e215225bc4a97e903feabb
[ "BSD-3-Clause" ]
1
2021-07-30T11:01:56.000Z
2021-07-30T11:01:56.000Z
remoteappmanager/db/tests/abc_test_interfaces.py
robertopreste/simphony-remote
4b07ecd0cf7a66b534e215225bc4a97e903feabb
[ "BSD-3-Clause" ]
null
null
null
from abc import abstractmethod, ABCMeta import inspect as _inspect import string from remoteappmanager.db.interfaces import ABCApplication, ABCApplicationPolicy from remoteappmanager.db import exceptions class ABCTestDatabaseInterface(metaclass=ABCMeta): def assertApplicationEqual(self, app1, app2, msg=None): ...
37.940789
81
0.587134
from abc import abstractmethod, ABCMeta import inspect as _inspect import string from remoteappmanager.db.interfaces import ABCApplication, ABCApplicationPolicy from remoteappmanager.db import exceptions class ABCTestDatabaseInterface(metaclass=ABCMeta): def assertApplicationEqual(self, app1, app2, msg=None): ...
true
true
f7fa47561052691d4b48455dcaa0aa388dc50277
358
py
Python
hard-gists/5808d73731b50f8abbdcb3c3c5c1e6fa/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
21
2019-07-08T08:26:45.000Z
2022-01-24T23:53:25.000Z
hard-gists/5808d73731b50f8abbdcb3c3c5c1e6fa/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
5
2019-06-15T14:47:47.000Z
2022-02-26T05:02:56.000Z
hard-gists/5808d73731b50f8abbdcb3c3c5c1e6fa/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
17
2019-05-16T03:50:34.000Z
2021-01-14T14:35:12.000Z
from PIL import Image if __name__ == "__main__": im = Image.open("mr.zhang.jpg") x, y = im.size for i in range(x): for j in range(y): r, g, b = im.getpixel((i,j)) if (20< r < 180) and (80< g < 250) and (180< b< 265): r, g, b = 255, 255, 255 im.putp...
29.833333
65
0.458101
from PIL import Image if __name__ == "__main__": im = Image.open("mr.zhang.jpg") x, y = im.size for i in range(x): for j in range(y): r, g, b = im.getpixel((i,j)) if (20< r < 180) and (80< g < 250) and (180< b< 265): r, g, b = 255, 255, 255 im.putp...
true
true
f7fa481d50235b6b7c21246d7eaf8f9e9c4fadf4
50,689
py
Python
python/pyspark/streaming/tests.py
yongjiaw/spark
b25723af88412520aecab1aebaf12cb63c4d696c
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
null
null
null
python/pyspark/streaming/tests.py
yongjiaw/spark
b25723af88412520aecab1aebaf12cb63c4d696c
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
null
null
null
python/pyspark/streaming/tests.py
yongjiaw/spark
b25723af88412520aecab1aebaf12cb63c4d696c
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
2
2020-07-23T13:31:01.000Z
2021-05-06T15:46:24.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 us...
38.226998
100
0.592239
import glob import os import sys from itertools import chain import time import operator import tempfile import random import struct import shutil from functools import reduce try: import xmlrunner except ImportError: xmlrunner = None if sys.version_info[:2] <= (2, 6): try: import...
true
true
f7fa483194a4be04920b80ded13583a783e3c37f
2,163
py
Python
Python/HandTracking/HandTracking_module.py
vermayash7980/Hacktoberfest2021
66e190608c5e3f9ad983ba8f707e499ca5bc6da0
[ "MIT" ]
39
2021-10-03T05:40:26.000Z
2021-10-31T18:09:23.000Z
Python/HandTracking/HandTracking_module.py
vermayash7980/Hacktoberfest2021
66e190608c5e3f9ad983ba8f707e499ca5bc6da0
[ "MIT" ]
26
2021-10-03T04:50:47.000Z
2021-10-16T07:39:22.000Z
Python/HandTracking/HandTracking_module.py
vermayash7980/Hacktoberfest2021
66e190608c5e3f9ad983ba8f707e499ca5bc6da0
[ "MIT" ]
215
2021-10-03T04:35:47.000Z
2021-10-31T17:37:42.000Z
import cv2 import mediapipe as mp import time class HandDetector(): def __init__(self, mode = False, maxHands = 2, detectionCon = 0.5, trackCon = 0.5): self.mode = mode self.maxHands = maxHands self.detectionCon = detectionCon self.trackCon = trackCon self.mpHand...
30.9
100
0.548775
import cv2 import mediapipe as mp import time class HandDetector(): def __init__(self, mode = False, maxHands = 2, detectionCon = 0.5, trackCon = 0.5): self.mode = mode self.maxHands = maxHands self.detectionCon = detectionCon self.trackCon = trackCon self.mpHand...
true
true
f7fa4c08ec747242c9254c959ee137fb898db039
5,601
py
Python
toodledo2nozbe.py
dodiggitydag/Toodledo-To-Nozbe
5185e1fd1e8e8d0b8d876b1dff8837d04ee1dd01
[ "CC0-1.0" ]
null
null
null
toodledo2nozbe.py
dodiggitydag/Toodledo-To-Nozbe
5185e1fd1e8e8d0b8d876b1dff8837d04ee1dd01
[ "CC0-1.0" ]
null
null
null
toodledo2nozbe.py
dodiggitydag/Toodledo-To-Nozbe
5185e1fd1e8e8d0b8d876b1dff8837d04ee1dd01
[ "CC0-1.0" ]
null
null
null
""" Python script to convert Toodledo to Wunderlist backup json file format for importing into Nozbe. It is unable to retain the following fields: repeating tasks, timer values, complex due dates, due times, lengths, locations, goals, statuses, start dates and times. Example: python toodledo2nozbe.py toodledo.xml forN...
36.848684
182
0.628102
import argparse import json from bs4 import BeautifulSoup if __name__ == '__main__': parser = argparse.ArgumentParser(description=__doc__, usage='python toodledo2nozbe.py src_xml_file out_file') parser.add_argument('src_xml_file') parser.add_argument('out_file') args = parser.parse_args() with ope...
true
true
f7fa4c71261b9e280dda72cc0e1fb465dab19360
1,974
py
Python
R_ev3dev/motor/motor.py
thomasvolk/R_ev3dev
53b8c83af49e88eb4766deea0a690c55d1304d6a
[ "Apache-2.0" ]
null
null
null
R_ev3dev/motor/motor.py
thomasvolk/R_ev3dev
53b8c83af49e88eb4766deea0a690c55d1304d6a
[ "Apache-2.0" ]
null
null
null
R_ev3dev/motor/motor.py
thomasvolk/R_ev3dev
53b8c83af49e88eb4766deea0a690c55d1304d6a
[ "Apache-2.0" ]
null
null
null
from R_ev3dev.peripheral import BackgroundPeripheralCommand, PeripheralAction from R_ev3dev.interpreter import Command from R_ev3dev.ev3 import ev3dev2 class ListMotors(Command): """ list all motors """ def invoke(self, interpreter_context, args): return [{'driver_name': m.driver_name, 'address': m.ad...
29.462687
106
0.648936
from R_ev3dev.peripheral import BackgroundPeripheralCommand, PeripheralAction from R_ev3dev.interpreter import Command from R_ev3dev.ev3 import ev3dev2 class ListMotors(Command): def invoke(self, interpreter_context, args): return [{'driver_name': m.driver_name, 'address': m.address} for m in ev3dev2.moto...
true
true
f7fa4e63aaa6eb69cc2d8bd5c00905d7a5668834
6,606
py
Python
friartuck/quote_source.py
codesociety/friartuck
450adae920ac64a4d3bca5258512295d3eaecea5
[ "MIT" ]
157
2017-10-18T04:46:50.000Z
2021-12-15T04:30:47.000Z
friartuck/quote_source.py
codesociety/friartuck
450adae920ac64a4d3bca5258512295d3eaecea5
[ "MIT" ]
13
2017-11-04T21:29:05.000Z
2019-09-18T14:53:31.000Z
friartuck/quote_source.py
codesociety/friartuck
450adae920ac64a4d3bca5258512295d3eaecea5
[ "MIT" ]
32
2017-12-04T21:53:22.000Z
2020-06-21T15:51:41.000Z
""" MIT License Copyright (c) 2017 Code Society Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
42.619355
193
0.653497
import logging import time import urllib.request from abc import abstractmethod from datetime import datetime import pandas as pd import numpy as np from friartuck.iextrading import iextrading from friartuck.alphavantage import alphavantage log = logging.getLogger("friar_tuck") class QuoteSourceAbstract: @abs...
true
true
f7fa51a2f1515c96d15ae82974a5e496920259f6
6,062
py
Python
saleor/graphql/webhook/enums.py
DustinBracy/saleor
625d4f704721bd771a8ba8f06a44f83c18f2a090
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/webhook/enums.py
DustinBracy/saleor
625d4f704721bd771a8ba8f06a44f83c18f2a090
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/webhook/enums.py
DustinBracy/saleor
625d4f704721bd771a8ba8f06a44f83c18f2a090
[ "CC-BY-4.0" ]
null
null
null
import graphene from ...webhook.event_types import WebhookEventAsyncType, WebhookEventSyncType from ..core.utils import str_to_enum checkout_updated_event_enum_description = ( "A checkout is updated. It also triggers all updates related to the checkout." ) order_confirmed_event_enum_description = ( "An order...
48.111111
87
0.776641
import graphene from ...webhook.event_types import WebhookEventAsyncType, WebhookEventSyncType from ..core.utils import str_to_enum checkout_updated_event_enum_description = ( "A checkout is updated. It also triggers all updates related to the checkout." ) order_confirmed_event_enum_description = ( "An order...
true
true
f7fa51cf7ef754862417bcd19836f12f0cc023d0
1,048
py
Python
Hydro/datapoint/models.py
p-v-o-s/hydro
34eaf227043c69b921650aa120516533d61c6854
[ "BSD-3-Clause" ]
null
null
null
Hydro/datapoint/models.py
p-v-o-s/hydro
34eaf227043c69b921650aa120516533d61c6854
[ "BSD-3-Clause" ]
null
null
null
Hydro/datapoint/models.py
p-v-o-s/hydro
34eaf227043c69b921650aa120516533d61c6854
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from django.utils.translation import gettext_lazy as _ from Hydro.device.models import Device class Point(models.Model): _lat = models.DecimalField(_("Latitude"), max_digits=12, decimal_places=9) _lng = models.DecimalField(_("Longitude"), max_digits=12, decimal_places=9) def ...
31.757576
79
0.695611
from django.db import models from django.utils.translation import gettext_lazy as _ from Hydro.device.models import Device class Point(models.Model): _lat = models.DecimalField(_("Latitude"), max_digits=12, decimal_places=9) _lng = models.DecimalField(_("Longitude"), max_digits=12, decimal_places=9) def ...
true
true
f7fa51e6dd823c589d63187f0513757e034c6cb0
1,142
py
Python
scripts/qclog.py
pizzathief/PyFluxPro
c075c0040b4a9d6c9ab75ca1cef158f1307f8396
[ "BSD-3-Clause" ]
null
null
null
scripts/qclog.py
pizzathief/PyFluxPro
c075c0040b4a9d6c9ab75ca1cef158f1307f8396
[ "BSD-3-Clause" ]
null
null
null
scripts/qclog.py
pizzathief/PyFluxPro
c075c0040b4a9d6c9ab75ca1cef158f1307f8396
[ "BSD-3-Clause" ]
null
null
null
import logging import os def init_logger(logger_name="pfp_log", file_handler="pfp.log"): """ Purpose: Returns a logger object. Usage: logger = qclog.init_logger() Author: PRI with acknowledgement to James Cleverly Date: September 2016 """ logger = logging.getLogger(name=logger_nam...
32.628571
128
0.687391
import logging import os def init_logger(logger_name="pfp_log", file_handler="pfp.log"): logger = logging.getLogger(name=logger_name) logger.setLevel(logging.DEBUG) if not os.path.exists("logfiles"): os.makedirs("logfiles") log_file_path = os.path.join("logfiles", file_handler) ...
true
true
f7fa54f709934dc22d84619d9c426e01818e5efb
1,488
py
Python
topview/results/make_latex_accuracies.py
mmlab-cv/ICIP-2021-2346
d208a5b89acfb0405475664bc83d289d5c3eae33
[ "MIT" ]
1
2021-08-20T11:47:33.000Z
2021-08-20T11:47:33.000Z
topview/results/make_latex_accuracies.py
mmlab-cv/ICIP-2021-2346
d208a5b89acfb0405475664bc83d289d5c3eae33
[ "MIT" ]
null
null
null
topview/results/make_latex_accuracies.py
mmlab-cv/ICIP-2021-2346
d208a5b89acfb0405475664bc83d289d5c3eae33
[ "MIT" ]
null
null
null
import sys sys.path.append('../../') import numpy as np import pandas as pd import matplotlib.pyplot as plt import pathlib from accuracy import * from plot import * def get_accuracy_for_joints(experiment, needed_acc = 0.1): current_file_path = pathlib.Path(__file__).parent.absolute() gt_file = f'{current_fil...
32.347826
196
0.691532
import sys sys.path.append('../../') import numpy as np import pandas as pd import matplotlib.pyplot as plt import pathlib from accuracy import * from plot import * def get_accuracy_for_joints(experiment, needed_acc = 0.1): current_file_path = pathlib.Path(__file__).parent.absolute() gt_file = f'{current_fil...
true
true
f7fa556c98600aa30c24a77fbda4680bcccf435c
49,810
py
Python
unfurl/tosca.py
onecommons/giterop
9d9c6730ac5bce63f26dd1fd1e151006bc8230dd
[ "MIT" ]
null
null
null
unfurl/tosca.py
onecommons/giterop
9d9c6730ac5bce63f26dd1fd1e151006bc8230dd
[ "MIT" ]
null
null
null
unfurl/tosca.py
onecommons/giterop
9d9c6730ac5bce63f26dd1fd1e151006bc8230dd
[ "MIT" ]
null
null
null
# Copyright (c) 2020 Adam Souzis # SPDX-License-Identifier: MIT """ TOSCA implementation """ import functools import copy from .tosca_plugins import TOSCA_VERSION from .util import UnfurlError, UnfurlValidationError, get_base_dir, check_class_registry from .eval import Ref, RefContext, map_value from .result import Res...
37.005944
126
0.598615
import functools import copy from .tosca_plugins import TOSCA_VERSION from .util import UnfurlError, UnfurlValidationError, get_base_dir, check_class_registry from .eval import Ref, RefContext, map_value from .result import ResourceRef, ResultsList from .merge import patch_dict, merge_dicts from .logs import get_cons...
true
true
f7fa563f7239b2037be8bcca3b3bcd0f687e6435
1,388
py
Python
tests/integrations/test_allennlp_integration.py
altescy/konoha
3870227f7a23913affa429aeea2613b0f6c68d8b
[ "MIT" ]
149
2020-01-23T18:33:06.000Z
2022-03-27T16:27:44.000Z
tests/integrations/test_allennlp_integration.py
altescy/konoha
3870227f7a23913affa429aeea2613b0f6c68d8b
[ "MIT" ]
32
2020-01-14T18:03:10.000Z
2021-12-18T22:42:51.000Z
tests/integrations/test_allennlp_integration.py
altescy/konoha
3870227f7a23913affa429aeea2613b0f6c68d8b
[ "MIT" ]
16
2020-01-15T08:55:23.000Z
2021-12-17T18:11:46.000Z
import tempfile from typing import List, Optional import allennlp.commands.train from allennlp.models.basic_classifier import BasicClassifier import pytest from konoha.integrations.allennlp import KonohaTokenizer @pytest.fixture def raw_text(): return "吾輩は猫である" @pytest.mark.parametrize( "token_surfaces,t...
28.326531
78
0.662824
import tempfile from typing import List, Optional import allennlp.commands.train from allennlp.models.basic_classifier import BasicClassifier import pytest from konoha.integrations.allennlp import KonohaTokenizer @pytest.fixture def raw_text(): return "吾輩は猫である" @pytest.mark.parametrize( "token_surfaces,t...
true
true
f7fa56459f92fef474ac7580e88247786ba3d0e8
3,363
py
Python
sdk/keyvault/azure-keyvault/azure/keyvault/v7_3_preview/models/deleted_storage_bundle_py3.py
mccoyp/azure-keyvault-7.3-preview
da351753a9d3d2bf97c27566865cd88bae7faa55
[ "MIT" ]
null
null
null
sdk/keyvault/azure-keyvault/azure/keyvault/v7_3_preview/models/deleted_storage_bundle_py3.py
mccoyp/azure-keyvault-7.3-preview
da351753a9d3d2bf97c27566865cd88bae7faa55
[ "MIT" ]
null
null
null
sdk/keyvault/azure-keyvault/azure/keyvault/v7_3_preview/models/deleted_storage_bundle_py3.py
mccoyp/azure-keyvault-7.3-preview
da351753a9d3d2bf97c27566865cd88bae7faa55
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
43.115385
83
0.641094
from .storage_bundle_py3 import StorageBundle class DeletedStorageBundle(StorageBundle): _validation = { 'id': {'readonly': True}, 'resource_id': {'readonly': True}, 'active_key_name': {'readonly': True}, 'auto_regenerate_key': {'readonly': True}, 'regeneration_...
true
true
f7fa56e1a0d8e96cef92233154f85df4df1ee54e
3,875
py
Python
run_phash.py
levan92/imagededup
f89eb2377712470da868cbe7e5bbf7dfd77af124
[ "Apache-2.0" ]
1
2020-07-15T01:01:25.000Z
2020-07-15T01:01:25.000Z
run_phash.py
levan92/imagededup
f89eb2377712470da868cbe7e5bbf7dfd77af124
[ "Apache-2.0" ]
null
null
null
run_phash.py
levan92/imagededup
f89eb2377712470da868cbe7e5bbf7dfd77af124
[ "Apache-2.0" ]
1
2021-03-08T05:05:30.000Z
2021-03-08T05:05:30.000Z
import time import argparse from pathlib import Path from shutil import copy from clustering import clustering from imagededup.methods import PHash # IMG_EXTS = ['.png', '.jpg', '.jpeg', '.tiff', '.bmp'] # IMG_EXTS = [ e.lower() for e in IMG_EXTS] # IMG_EXTS.extend( [ e.upper() for e in IMG_EXTS ]) parser = argparse...
39.948454
192
0.709935
import time import argparse from pathlib import Path from shutil import copy from clustering import clustering from imagededup.methods import PHash parser = argparse.ArgumentParser() parser.add_argument('directory', help='Path to root directory of images') parser.add_argument('--thresh', help='distance threshold ...
true
true
f7fa56f251ff4d397528035160fc02c57dae6c8b
6,063
py
Python
Tw.finance.py
yejh90093/Py.finance
e5c660970d4bb890cbf401d288d70829d3e6c966
[ "Apache-2.0" ]
null
null
null
Tw.finance.py
yejh90093/Py.finance
e5c660970d4bb890cbf401d288d70829d3e6c966
[ "Apache-2.0" ]
null
null
null
Tw.finance.py
yejh90093/Py.finance
e5c660970d4bb890cbf401d288d70829d3e6c966
[ "Apache-2.0" ]
null
null
null
import os import numpy import requests import datetime import time import math import pandas as pd import functions import xlwt import numpy as np from tqdm import tqdm import gspread from gspread_dataframe import set_with_dataframe from oauth2client.service_account import ServiceAccountCredentials debug_mode = False...
29.289855
114
0.697674
import os import numpy import requests import datetime import time import math import pandas as pd import functions import xlwt import numpy as np from tqdm import tqdm import gspread from gspread_dataframe import set_with_dataframe from oauth2client.service_account import ServiceAccountCredentials debug_mode = False...
true
true
f7fa56f85ee4447930f9aa334e3348214a0600f9
5,500
py
Python
campaigns/serializers.py
alimahdiyar/Developing-Community-Web
a663a687e0f286f197d4a7bf347f67cd130275f7
[ "MIT" ]
2
2018-06-02T12:30:00.000Z
2018-07-19T14:41:39.000Z
campaigns/serializers.py
Developing-Community/Developing-Community-Web
a663a687e0f286f197d4a7bf347f67cd130275f7
[ "MIT" ]
5
2021-06-08T19:09:00.000Z
2022-03-11T23:25:14.000Z
campaigns/serializers.py
Developing-Community/web
a663a687e0f286f197d4a7bf347f67cd130275f7
[ "MIT" ]
2
2018-05-27T14:58:34.000Z
2018-05-27T15:03:04.000Z
from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from enumfields.drf.serializers import EnumSupportSerializerMixin from rest_framework.fields import SerializerMethodField from rest_framework.serializers import ( ModelSerializer ) from sorl_thumbnail_serialize...
25.700935
99
0.578182
from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from enumfields.drf.serializers import EnumSupportSerializerMixin from rest_framework.fields import SerializerMethodField from rest_framework.serializers import ( ModelSerializer ) from sorl_thumbnail_serialize...
true
true
f7fa577bbe138646112aa69c5b9324924fbdd88d
483
py
Python
data_into_dvc.py
EAKSHITHA/mlops_main
84c5fe417e138ef3cbef1bf299ad653e60a6644a
[ "MIT" ]
null
null
null
data_into_dvc.py
EAKSHITHA/mlops_main
84c5fe417e138ef3cbef1bf299ad653e60a6644a
[ "MIT" ]
null
null
null
data_into_dvc.py
EAKSHITHA/mlops_main
84c5fe417e138ef3cbef1bf299ad653e60a6644a
[ "MIT" ]
null
null
null
# NOTE: For windows user- # This file must be created in the root of the project # where Training and Prediction batch file as are present import os from glob import glob from tqdm import tqdm data_dirs = ["Training_Batch_Files","Prediction_Batch_files"] for data_dir in data_dirs: files = glob(data_dir + r"/*.c...
28.411765
61
0.691511
import os from glob import glob from tqdm import tqdm data_dirs = ["Training_Batch_Files","Prediction_Batch_files"] for data_dir in data_dirs: files = glob(data_dir + r"/*.csv") for filePath in tqdm(files): os.system(f"dvc add {filePath}") print("\n #### all files added to dvc ####")
true
true
f7fa57c65892d5f11374402f2ee7beaa40568a84
9,544
py
Python
packages/sqlmap-master/plugins/dbms/postgresql/fingerprint.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
packages/sqlmap-master/plugins/dbms/postgresql/fingerprint.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
packages/sqlmap-master/plugins/dbms/postgresql/fingerprint.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ Copyright (c) 2006-2021 sqlmap developers (http://sqlmap.org/) See the file 'LICENSE' for copying permission """ from lib.core.common import Backend from lib.core.common import Format from lib.core.common import hashDBRetrieve from lib.core.common import hashDBWrite from lib.core.data import...
42.607143
237
0.588433
from lib.core.common import Backend from lib.core.common import Format from lib.core.common import hashDBRetrieve from lib.core.common import hashDBWrite from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger from lib.core.enums import DBMS from lib.core.enums import FORK from l...
true
true
f7fa58bd3643415f06359217c1633d15d0f8ee98
6,463
py
Python
torch/jit/__init__.py
Hacky-DH/pytorch
80dc4be615854570aa39a7e36495897d8a040ecc
[ "Intel" ]
60,067
2017-01-18T17:21:31.000Z
2022-03-31T21:37:45.000Z
torch/jit/__init__.py
Hacky-DH/pytorch
80dc4be615854570aa39a7e36495897d8a040ecc
[ "Intel" ]
66,955
2017-01-18T17:21:38.000Z
2022-03-31T23:56:11.000Z
torch/jit/__init__.py
Hacky-DH/pytorch
80dc4be615854570aa39a7e36495897d8a040ecc
[ "Intel" ]
19,210
2017-01-18T17:45:04.000Z
2022-03-31T23:51:56.000Z
import torch._C from contextlib import contextmanager from typing import Iterator from torch.utils import set_module # These are imported so users can access them from the `torch.jit` module from torch._jit_internal import ( Final, Future, _IgnoreContextManager, _overload, _overload_method, i...
31.837438
109
0.677704
import torch._C from contextlib import contextmanager from typing import Iterator from torch.utils import set_module from torch._jit_internal import ( Final, Future, _IgnoreContextManager, _overload, _overload_method, ignore, _isinstance, is_scripting, export, unused, ) from ...
true
true
f7fa590bbaf628ff0d821095d8057efca299ba7b
1,588
py
Python
scholariumat/products/migrations/0002_auto_20180924_1351.py
valuehack/scholariumat
47c13f3429b95b9ad5ca59b45cf971895260bb5c
[ "MIT" ]
null
null
null
scholariumat/products/migrations/0002_auto_20180924_1351.py
valuehack/scholariumat
47c13f3429b95b9ad5ca59b45cf971895260bb5c
[ "MIT" ]
232
2018-06-30T11:40:52.000Z
2020-04-29T23:55:41.000Z
scholariumat/products/migrations/0002_auto_20180924_1351.py
valuehack/scholariumat
47c13f3429b95b9ad5ca59b45cf971895260bb5c
[ "MIT" ]
3
2018-05-31T12:57:03.000Z
2020-02-27T16:25:44.000Z
# Generated by Django 2.0.8 on 2018-09-24 11:51 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('users', '0001_initial'), ('products', '0001_initial'), ] operations = [ migrati...
33.083333
125
0.602645
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('users', '0001_initial'), ('products', '0001_initial'), ] operations = [ migrations.AddField( model_name='purchase'...
true
true
f7fa593a4995e101544e3415266dad0ef673d73c
28,316
py
Python
nipype/workflows/smri/freesurfer/recon.py
felixsc1/nipype
e722d6170593583f16ddfcb95473e5d30b5f1d7c
[ "Apache-2.0" ]
8
2019-05-29T09:38:30.000Z
2021-01-20T03:36:59.000Z
nipype/workflows/smri/freesurfer/recon.py
felixsc1/nipype
e722d6170593583f16ddfcb95473e5d30b5f1d7c
[ "Apache-2.0" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
nipype/workflows/smri/freesurfer/recon.py
felixsc1/nipype
e722d6170593583f16ddfcb95473e5d30b5f1d7c
[ "Apache-2.0" ]
1
2020-07-17T12:49:49.000Z
2020-07-17T12:49:49.000Z
# -*- coding: utf-8 -*- from __future__ import (print_function, division, unicode_literals, absolute_import) from ....pipeline import engine as pe from ....interfaces import freesurfer as fs from ....interfaces import utility as niu from .autorecon1 import create_AutoRecon1 from .autorecon2 impo...
46.803306
110
0.583945
from __future__ import (print_function, division, unicode_literals, absolute_import) from ....pipeline import engine as pe from ....interfaces import freesurfer as fs from ....interfaces import utility as niu from .autorecon1 import create_AutoRecon1 from .autorecon2 import create_AutoRecon2 fr...
true
true
f7fa59dd551cd47423e0065e991b4f3d1b3d1bfd
712
py
Python
snmp/tests/conftest.py
andersenleo/integrations-core
e521b88e32820a286a70c7797a663d4f9ba41110
[ "BSD-3-Clause" ]
2
2019-05-28T03:48:29.000Z
2019-07-05T07:05:58.000Z
snmp/tests/conftest.py
andersenleo/integrations-core
e521b88e32820a286a70c7797a663d4f9ba41110
[ "BSD-3-Clause" ]
4
2019-07-03T02:53:19.000Z
2019-07-10T14:52:14.000Z
snmp/tests/conftest.py
andersenleo/integrations-core
e521b88e32820a286a70c7797a663d4f9ba41110
[ "BSD-3-Clause" ]
1
2020-01-15T16:58:51.000Z
2020-01-15T16:58:51.000Z
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os import pytest from datadog_checks.dev import docker_run from datadog_checks.snmp import SnmpCheck from .common import COMPOSE_DIR, SCALAR_OBJECTS, SCALAR_OBJECTS_WITH_TAGS, TABULAR_OBJECTS, generate_instan...
28.48
116
0.769663
import os import pytest from datadog_checks.dev import docker_run from datadog_checks.snmp import SnmpCheck from .common import COMPOSE_DIR, SCALAR_OBJECTS, SCALAR_OBJECTS_WITH_TAGS, TABULAR_OBJECTS, generate_instance_config @pytest.fixture(scope='session') def dd_environment(): env = {'COMPOSE_DIR': COMPO...
true
true
f7fa5a68d486a959e38f57337dcb4a5a4de51095
2,188
py
Python
Z_ALL_FILE/Jy1/fnstr-checkpoint.py
omikabir/omEngin
b8c04a5c2c12ffc3d0b67c2ceba9e5741d3f9195
[ "Apache-2.0" ]
null
null
null
Z_ALL_FILE/Jy1/fnstr-checkpoint.py
omikabir/omEngin
b8c04a5c2c12ffc3d0b67c2ceba9e5741d3f9195
[ "Apache-2.0" ]
null
null
null
Z_ALL_FILE/Jy1/fnstr-checkpoint.py
omikabir/omEngin
b8c04a5c2c12ffc3d0b67c2ceba9e5741d3f9195
[ "Apache-2.0" ]
1
2021-04-29T21:46:02.000Z
2021-04-29T21:46:02.000Z
#!/usr/bin/env python # coding: utf-8 # In[38]: import pandas as pd import os import numpy import MySQLdb conn= MySQLdb.connect("localhost","root","admin","omdb") file = os.getcwd() + "\\" + "BK1.csv" class omstring: def __init__(self): print('x') def chk_rcut(self,txt,findchr): x = txt.fin...
18.542373
96
0.601463
import pandas as pd import os import numpy import MySQLdb conn= MySQLdb.connect("localhost","root","admin","omdb") file = os.getcwd() + "\\" + "BK1.csv" class omstring: def __init__(self): print('x') def chk_rcut(self,txt,findchr): x = txt.find(findchr) ln = len(txt) if x...
true
true
f7fa5a8644796b54aed45902658c76f0c6461e47
634
py
Python
frontend/batterycycling/manage.py
atomisticnet/gibbsml
43a0e176160b522208320754d07966c8ed9a54a2
[ "MIT" ]
5
2021-12-02T07:59:23.000Z
2022-02-12T06:03:56.000Z
frontend/batterycycling/manage.py
atomisticnet/gibbsml
43a0e176160b522208320754d07966c8ed9a54a2
[ "MIT" ]
null
null
null
frontend/batterycycling/manage.py
atomisticnet/gibbsml
43a0e176160b522208320754d07966c8ed9a54a2
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'batterycycling.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise...
28.818182
78
0.68612
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'batterycycling.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and ...
true
true
f7fa5b17bcc2bc7d454ac4089c0cb6c4f4eac213
3,205
py
Python
huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/model/create_privateip_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/model/create_privateip_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/model/create_privateip_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class CreatePrivateipResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name ...
27.869565
79
0.570047
import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class CreatePrivateipResponse(SdkResponse): sensitive_list = [] openapi_types = { 'privateips': 'list[Privateip]' } attribute_map = {...
true
true
f7fa5b44230f67e825a60b537683511b06137f6a
2,330
py
Python
ingestors/email/msg.py
simonwoerpel/ingest-file
1ff68be0abb92e50bf726a1c8c1f8ff12d8b2fc0
[ "MIT" ]
23
2017-05-25T01:08:58.000Z
2019-06-22T19:35:50.000Z
ingestors/email/msg.py
simonwoerpel/ingest-file
1ff68be0abb92e50bf726a1c8c1f8ff12d8b2fc0
[ "MIT" ]
153
2020-10-07T13:42:08.000Z
2022-03-18T08:11:37.000Z
ingestors/email/msg.py
simonwoerpel/ingest-file
1ff68be0abb92e50bf726a1c8c1f8ff12d8b2fc0
[ "MIT" ]
9
2020-10-22T08:54:20.000Z
2022-02-01T10:23:22.000Z
import email import logging from email.policy import default from email.errors import MessageError from pantomime import normalize_mimetype from followthemoney import model from ingestors.ingestor import Ingestor from ingestors.support.email import EmailSupport from ingestors.support.encoding import EncodingSupport fr...
36.40625
78
0.68412
import email import logging from email.policy import default from email.errors import MessageError from pantomime import normalize_mimetype from followthemoney import model from ingestors.ingestor import Ingestor from ingestors.support.email import EmailSupport from ingestors.support.encoding import EncodingSupport fr...
true
true
f7fa5b4de84cf3770e571b0a5aafd8c69e34588c
3,268
py
Python
validate.py
ggzhang0071/Self-Supervised-Embedding-Fusion-Transformer
91ad5276bf9a796b93a9f8f2200ce75747725fed
[ "MIT" ]
45
2020-09-30T23:09:40.000Z
2022-03-01T08:31:56.000Z
validate.py
ggzhang0071/Self-Supervised-Embedding-Fusion-Transformer
91ad5276bf9a796b93a9f8f2200ce75747725fed
[ "MIT" ]
8
2020-11-05T04:44:21.000Z
2021-12-20T03:26:59.000Z
validate.py
ggzhang0071/Self-Supervised-Embedding-Fusion-Transformer
91ad5276bf9a796b93a9f8f2200ce75747725fed
[ "MIT" ]
10
2020-10-04T17:25:27.000Z
2021-12-23T02:40:28.000Z
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import t...
30.830189
88
0.655141
import torch from fairseq import checkpoint_utils, options, progress_bar, utils def main(args, override_args=None): utils.import_user_module(args) use_fp16 = args.fp16 use_cuda = torch.cuda.is_available() and not args.cpu if override_args is not None: overrides = vars(override_...
true
true
f7fa5ba72903d65c6cf4f6c5af2e049b382a1af6
818
py
Python
webapp/roasterui/urls.py
markturansky/coffeeroaster
238217ce4abbd2f18383ba4811f4cca14ee0fb8f
[ "MIT" ]
null
null
null
webapp/roasterui/urls.py
markturansky/coffeeroaster
238217ce4abbd2f18383ba4811f4cca14ee0fb8f
[ "MIT" ]
null
null
null
webapp/roasterui/urls.py
markturansky/coffeeroaster
238217ce4abbd2f18383ba4811f4cca14ee0fb8f
[ "MIT" ]
null
null
null
"""webapp URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
35.565217
79
0.698044
from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^roasts/', include('roasts.urls')), ]
true
true
f7fa5d25c543d762ee653ca2780563f3feaa3132
2,248
py
Python
research2018/test/tabular_cfr_test.py
dmorrill10/research2018
3604e3fb774f6d882e41cc217ceb85038d3775e5
[ "MIT" ]
null
null
null
research2018/test/tabular_cfr_test.py
dmorrill10/research2018
3604e3fb774f6d882e41cc217ceb85038d3775e5
[ "MIT" ]
null
null
null
research2018/test/tabular_cfr_test.py
dmorrill10/research2018
3604e3fb774f6d882e41cc217ceb85038d3775e5
[ "MIT" ]
null
null
null
import tensorflow as tf tf.compat.v1.enable_eager_execution() from research2018.tabular_cfr import TabularCfr, TabularCfrCurrent class TabularCfrTest(tf.test.TestCase): def setUp(self): tf.random.set_seed(42) def test_zeros(self): num_info_sets = 2 num_actions = 3 patient = Ta...
35.125
77
0.598754
import tensorflow as tf tf.compat.v1.enable_eager_execution() from research2018.tabular_cfr import TabularCfr, TabularCfrCurrent class TabularCfrTest(tf.test.TestCase): def setUp(self): tf.random.set_seed(42) def test_zeros(self): num_info_sets = 2 num_actions = 3 patient = Ta...
true
true
f7fa5d46732df96a84ddbc17c5a4b4cd7b4ec96a
1,160
py
Python
catalog/admin.py
kainar1823/django_local_library
92ad9d4d008fad4ff11c016d0747d618059c3144
[ "Unlicense" ]
null
null
null
catalog/admin.py
kainar1823/django_local_library
92ad9d4d008fad4ff11c016d0747d618059c3144
[ "Unlicense" ]
null
null
null
catalog/admin.py
kainar1823/django_local_library
92ad9d4d008fad4ff11c016d0747d618059c3144
[ "Unlicense" ]
null
null
null
from django.contrib import admin from .models import Author, Genre, Book, BookInstance # admin.site.register(Genre) # admin.site.register(Author) # admin.site.register(Book) # admin.site.register(BookInstance) @admin.register(Genre) class GenreAdmin(admin.ModelAdmin): pass @admin.register(Author) class AuthorA...
24.680851
76
0.643966
from django.contrib import admin from .models import Author, Genre, Book, BookInstance @admin.register(Genre) class GenreAdmin(admin.ModelAdmin): pass @admin.register(Author) class AuthorAdmin(admin.ModelAdmin): list_display = ('last_name', 'first_name', 'date_of_birth', 'date_of_de...
true
true