hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7648a7aa25604a36d71afdd9089df6c8d719b1b
2,630
py
Python
util/TestMetrics.py
XiaoleiDiao/LowLevelVision-Pipeline-pytorch
5b04fb75641d02638feccefc2eec4cecf495ced2
[ "MIT" ]
2
2022-03-29T14:03:16.000Z
2022-03-29T14:03:54.000Z
util/TestMetrics.py
XiaoleiDiao/LowLevelVision-Pipeline-pytorch
5b04fb75641d02638feccefc2eec4cecf495ced2
[ "MIT" ]
null
null
null
util/TestMetrics.py
XiaoleiDiao/LowLevelVision-Pipeline-pytorch
5b04fb75641d02638feccefc2eec4cecf495ced2
[ "MIT" ]
1
2022-03-29T14:05:16.000Z
2022-03-29T14:05:16.000Z
import cv2 import os import numpy as np from skimage.metrics import mean_squared_error from skimage.metrics import peak_signal_noise_ratio from skimage.metrics import structural_similarity def get_PSNR(img1, img2): # MSE = mean_squared_error(img1, img2) PSNR = peak_signal_noise_ratio(img1, img2) ...
30.941176
122
0.558935
import cv2 import os import numpy as np from skimage.metrics import mean_squared_error from skimage.metrics import peak_signal_noise_ratio from skimage.metrics import structural_similarity def get_PSNR(img1, img2): PSNR = peak_signal_noise_ratio(img1, img2) return PSNR def get_SSIM(img1...
true
true
f7648aa7d1f59f90dcc14d767ffd6c5044d951fb
9,640
py
Python
AWERA/resource_analysis/download_era5_data.py
lthUniBonn/AWERA
fa7f210516318bcfcbe1c99abbb5954b0cbaf682
[ "MIT" ]
null
null
null
AWERA/resource_analysis/download_era5_data.py
lthUniBonn/AWERA
fa7f210516318bcfcbe1c99abbb5954b0cbaf682
[ "MIT" ]
null
null
null
AWERA/resource_analysis/download_era5_data.py
lthUniBonn/AWERA
fa7f210516318bcfcbe1c99abbb5954b0cbaf682
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """Downloads all the ERA5 data via the Climate Data Store (CDS) API and saves it to the location as specified in config.py. First `install CDS API key`_. The data used for this analysis is not listed in the CDS download data web form. ECMWF MARS keywords are used to reque...
35.970149
120
0.592739
import cdsapi import re import os import datetime as dt from multiprocessing import Process from .config import area, era5_data_dir, model_level_file_name_format, surface_file_name_format, \ start_year, final_year, upper_level client = cdsapi.Client() def area_type(s): lat_regex = r"-?[0-9]{1,2}(\.[0-9][0-...
true
true
f7648c8b3acf828c2b352316c826575d020442c6
876
py
Python
lstail/dto/kibana_saved_search.py
eht16/lstail
8fb61e9d07b05b27e3d45e988afe0c198010248d
[ "MIT" ]
5
2021-03-10T18:34:16.000Z
2021-09-23T15:57:32.000Z
lstail/dto/kibana_saved_search.py
eht16/lstail
8fb61e9d07b05b27e3d45e988afe0c198010248d
[ "MIT" ]
null
null
null
lstail/dto/kibana_saved_search.py
eht16/lstail
8fb61e9d07b05b27e3d45e988afe0c198010248d
[ "MIT" ]
2
2021-05-04T11:21:58.000Z
2021-11-03T13:44:54.000Z
# -*- coding: utf-8 -*- # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. ######################################################################## class KibanaSavedSearch: # ------------------------------------------------------------------...
35.04
93
0.428082
class KibanaSavedSearch: def __init__(self, title, columns): self.title = title self.columns = columns def __eq__(self, other): if isinstance(other, KibanaSavedSearch): return self.title == other.title and self.columns == other.columns return False ...
true
true
f7648c9324e6dc63831d25c69da975f3c5b3da18
3,805
py
Python
paper/convergence_analysis/convergence_helper.py
barbagroup/pygbe_lspr
8653771cac5d650dc85b6ecb4a8d9bbe52402b05
[ "CC-BY-3.0" ]
3
2017-04-28T20:35:57.000Z
2021-12-01T03:24:31.000Z
paper/convergence_analysis/convergence_helper.py
barbagroup/pygbe_lspr
8653771cac5d650dc85b6ecb4a8d9bbe52402b05
[ "CC-BY-3.0" ]
null
null
null
paper/convergence_analysis/convergence_helper.py
barbagroup/pygbe_lspr
8653771cac5d650dc85b6ecb4a8d9bbe52402b05
[ "CC-BY-3.0" ]
1
2021-12-01T03:24:35.000Z
2021-12-01T03:24:35.000Z
'''This file contains functions that help to analyze and plot data related to the convergence analysis. ''' import numpy import pickle from matplotlib import pyplot, rcParams def pickleload(pickle_file): '''Loads a pickle file and assins it to a variable. ''' with open(pickle_file, 'rb') as f: dic...
29.96063
106
0.6318
import numpy import pickle from matplotlib import pyplot, rcParams def pickleload(pickle_file): with open(pickle_file, 'rb') as f: dict_res = pickle.load(f) return dict_res def ord_convergence(array, rate): ord_conv = numpy.log((array[-3] - array[-2])/(array[-2] - array[-1]))/numpy.log(rate) ...
true
true
f7648ef3e60926690d3a4afe47d93697b7244327
9,740
py
Python
flexmeasures/data/models/planning/solver.py
SeitaBV/flexmeasures
f715012c9c35d38d3382bd88d36ef86ce9728d10
[ "Apache-2.0" ]
37
2021-02-16T11:18:20.000Z
2021-11-04T22:04:56.000Z
flexmeasures/data/models/planning/solver.py
SeitaBV/flexmeasures
f715012c9c35d38d3382bd88d36ef86ce9728d10
[ "Apache-2.0" ]
165
2021-02-16T15:27:20.000Z
2021-12-06T14:19:20.000Z
flexmeasures/data/models/planning/solver.py
SeitaBV/flexmeasures
f715012c9c35d38d3382bd88d36ef86ce9728d10
[ "Apache-2.0" ]
5
2021-02-23T12:05:42.000Z
2021-11-04T13:58:40.000Z
from typing import List, Tuple, Union from flask import current_app import pandas as pd import numpy as np from pandas.tseries.frequencies import to_offset from pyomo.core import ( ConcreteModel, Var, RangeSet, Param, Reals, Constraint, Objective, minimize, ) from pyomo.environ import U...
39.755102
118
0.657187
from typing import List, Tuple, Union from flask import current_app import pandas as pd import numpy as np from pandas.tseries.frequencies import to_offset from pyomo.core import ( ConcreteModel, Var, RangeSet, Param, Reals, Constraint, Objective, minimize, ) from pyomo.environ import U...
true
true
f7648fe3158319560ffd804af5c967c7b543daeb
149
py
Python
scripts-python/teste01.py
hariadiny-mantovam/curso-python
fb8e3df961fd511c7ddd5275846891072e9fd24d
[ "MIT" ]
null
null
null
scripts-python/teste01.py
hariadiny-mantovam/curso-python
fb8e3df961fd511c7ddd5275846891072e9fd24d
[ "MIT" ]
null
null
null
scripts-python/teste01.py
hariadiny-mantovam/curso-python
fb8e3df961fd511c7ddd5275846891072e9fd24d
[ "MIT" ]
null
null
null
nome = input('Qual é o seu nome?') idade = input('Quantos anos você tem?') peso = input ('Quantos quilos você pesa?') print(nome, idade, peso)
21.285714
42
0.657718
nome = input('Qual é o seu nome?') idade = input('Quantos anos você tem?') peso = input ('Quantos quilos você pesa?') print(nome, idade, peso)
true
true
f764905da96b1c1c5e64b042788cc60f1c992764
473
py
Python
quiz/migrations/0007_auto_20200615_1705.py
smahesh29/KnowYourLockdown
49e1adc219547b5789b0b484b0ffd607d5a7ec66
[ "MIT" ]
1
2020-08-09T09:52:28.000Z
2020-08-09T09:52:28.000Z
quiz/migrations/0007_auto_20200615_1705.py
smahesh29/KnowYourLockdown
49e1adc219547b5789b0b484b0ffd607d5a7ec66
[ "MIT" ]
13
2021-03-30T14:14:36.000Z
2021-06-30T07:03:21.000Z
quiz/migrations/0007_auto_20200615_1705.py
smahesh29/KnowYourLockdown
49e1adc219547b5789b0b484b0ffd607d5a7ec66
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-06-15 11:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quiz', '0006_auto_20200615_1704'), ] operations = [ migrations.AlterField( model_name='quiz', name='fe...
24.894737
107
0.575053
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quiz', '0006_auto_20200615_1704'), ] operations = [ migrations.AlterField( model_name='quiz', name='feelings_due_to_lockdown', field=model...
true
true
f7649097b32ff72016e4f74df0449dc2125f59ca
8,127
py
Python
api/dictionary/entry.py
radomd92/botjagwar
1dc96600c40041057a9f9afde38c31ca34b8db38
[ "MIT" ]
7
2015-01-23T17:24:04.000Z
2022-01-12T16:54:24.000Z
api/dictionary/entry.py
radomd92/botjagwar
1dc96600c40041057a9f9afde38c31ca34b8db38
[ "MIT" ]
18
2017-12-09T01:11:23.000Z
2021-09-22T13:26:24.000Z
api/dictionary/entry.py
radomd92/botjagwar
1dc96600c40041057a9f9afde38c31ca34b8db38
[ "MIT" ]
1
2015-06-22T02:17:55.000Z
2015-06-22T02:17:55.000Z
import asyncio import json import logging from aiohttp.web import Response from aiohttp.web_exceptions import HTTPNoContent, HTTPOk from database.dictionary import Definition, Word from database.exceptions.http import WordAlreadyExistsException, WordDoesNotExistException, InvalidJsonReceivedException from .routines i...
29.445652
120
0.645995
import asyncio import json import logging from aiohttp.web import Response from aiohttp.web_exceptions import HTTPNoContent, HTTPOk from database.dictionary import Definition, Word from database.exceptions.http import WordAlreadyExistsException, WordDoesNotExistException, InvalidJsonReceivedException from .routines i...
true
true
f764912536356b743cc0b8c9a01affebadc9eb22
585
py
Python
handler/evt_90003_ducts_test_loop_bio.py
iflb/ducts-tutorial-202107
d5724d2c620ba20eb294c52eae98d34e19223b29
[ "Apache-2.0" ]
null
null
null
handler/evt_90003_ducts_test_loop_bio.py
iflb/ducts-tutorial-202107
d5724d2c620ba20eb294c52eae98d34e19223b29
[ "Apache-2.0" ]
null
null
null
handler/evt_90003_ducts_test_loop_bio.py
iflb/ducts-tutorial-202107
d5724d2c620ba20eb294c52eae98d34e19223b29
[ "Apache-2.0" ]
null
null
null
from ducts.spi import EventHandler from datetime import datetime from io import BytesIO import logging logger = logging.getLogger(__name__) class Handler(EventHandler): def __init__(self): super().__init__() def setup(self, handler_spec, manager): handler_spec.set_description('echo back tes...
22.5
54
0.641026
from ducts.spi import EventHandler from datetime import datetime from io import BytesIO import logging logger = logging.getLogger(__name__) class Handler(EventHandler): def __init__(self): super().__init__() def setup(self, handler_spec, manager): handler_spec.set_description('echo back tes...
true
true
f76492712c4768c19c0b4839a7667f159fea9b7d
5,794
py
Python
tests/sentry/integrations/bitbucket_server/testutils.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/integrations/bitbucket_server/testutils.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/integrations/bitbucket_server/testutils.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from collections import OrderedDict EXAMPLE_PRIVATE_KEY = """-----BEGIN RSA PRIVATE KEY----- MIICWwIBAAKBgQC1cd9t8sA03awggLiX2gjZxyvOVUPJksLly1E662tttTeR3Wm9 eo6onNeI8HRD+O4wubUp4h4Chc7DtLDmFEPhUZ8Qkwztiifm99Xo3s0nUq4Pygp5 AU09KXTEPbzHLh1dnXLcxVLmGDE4drh0NWmYsd/Zp7XNIZq2TRQQ3NTdV...
31.835165
107
0.42009
from __future__ import absolute_import from collections import OrderedDict EXAMPLE_PRIVATE_KEY = """-----BEGIN RSA PRIVATE KEY----- MIICWwIBAAKBgQC1cd9t8sA03awggLiX2gjZxyvOVUPJksLly1E662tttTeR3Wm9 eo6onNeI8HRD+O4wubUp4h4Chc7DtLDmFEPhUZ8Qkwztiifm99Xo3s0nUq4Pygp5 AU09KXTEPbzHLh1dnXLcxVLmGDE4drh0NWmYsd/Zp7XNIZq2TRQQ3NTdV...
true
true
f7649415f247164572734d5bcf7f3b180de62a9d
6,928
py
Python
pandas/tests/extension/base/methods.py
16umm001/pandas
a2e599499667b256bc5b8b13a75f0601eccfd432
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2020-06-18T07:57:35.000Z
2020-06-18T07:57:35.000Z
pandas/tests/extension/base/methods.py
16umm001/pandas
a2e599499667b256bc5b8b13a75f0601eccfd432
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/extension/base/methods.py
16umm001/pandas
a2e599499667b256bc5b8b13a75f0601eccfd432
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
import numpy as np import pytest import pandas as pd import pandas.util.testing as tm from .base import BaseExtensionTests class BaseMethodsTests(BaseExtensionTests): """Various Series and DataFrame methods.""" @pytest.mark.parametrize('dropna', [True, False]) def test_value_counts(self, all_data, drop...
39.141243
77
0.602627
import numpy as np import pytest import pandas as pd import pandas.util.testing as tm from .base import BaseExtensionTests class BaseMethodsTests(BaseExtensionTests): @pytest.mark.parametrize('dropna', [True, False]) def test_value_counts(self, all_data, dropna): all_data = all_data[:10] if...
true
true
f76494bc9512a5776b2f45b1c4b1febb9dd02cb0
1,864
py
Python
tests/test_io_maus.py
michaelhaaf/PolyglotDB
7640212c7062cf44ae911081241ce83a26ced2eb
[ "MIT" ]
25
2016-01-28T20:47:07.000Z
2021-11-29T16:13:07.000Z
tests/test_io_maus.py
michaelhaaf/PolyglotDB
7640212c7062cf44ae911081241ce83a26ced2eb
[ "MIT" ]
120
2016-04-07T17:55:09.000Z
2022-03-24T18:30:10.000Z
tests/test_io_maus.py
PhonologicalCorpusTools/PolyglotDB
7640212c7062cf44ae911081241ce83a26ced2eb
[ "MIT" ]
10
2015-12-03T20:06:58.000Z
2021-02-11T03:02:48.000Z
import pytest import os from polyglotdb.io import inspect_maus from polyglotdb import CorpusContext from polyglotdb.exceptions import ParseError def test_load_aus(maus_test_dir, graph_db): with CorpusContext('test_mfa', **graph_db) as c: c.reset() testFilePath = os.path.join(maus_test_dir, "maus...
31.066667
84
0.619099
import pytest import os from polyglotdb.io import inspect_maus from polyglotdb import CorpusContext from polyglotdb.exceptions import ParseError def test_load_aus(maus_test_dir, graph_db): with CorpusContext('test_mfa', **graph_db) as c: c.reset() testFilePath = os.path.join(maus_test_dir, "maus...
true
true
f76494c3291a30f8bf5f6318c4d9213b4850bd10
7,057
py
Python
model/model_se_spec/6.py
Tommy-Liu/MovieQA_Contest
4281bf4a731aa14a0d19f18adda31d59a4a297cb
[ "MIT" ]
null
null
null
model/model_se_spec/6.py
Tommy-Liu/MovieQA_Contest
4281bf4a731aa14a0d19f18adda31d59a4a297cb
[ "MIT" ]
null
null
null
model/model_se_spec/6.py
Tommy-Liu/MovieQA_Contest
4281bf4a731aa14a0d19f18adda31d59a4a297cb
[ "MIT" ]
null
null
null
import tensorflow as tf from tensorflow.contrib import layers from config import MovieQAPath from raw_input import Input _mp = MovieQAPath() hp = {'emb_dim': 300, 'feat_dim': 512, 'dropout_rate': 0.1} def dropout(x, training): return tf.layers.dropout(x, hp['dropout_rate'], training=training) def l2_norm(x, a...
40.791908
108
0.561995
import tensorflow as tf from tensorflow.contrib import layers from config import MovieQAPath from raw_input import Input _mp = MovieQAPath() hp = {'emb_dim': 300, 'feat_dim': 512, 'dropout_rate': 0.1} def dropout(x, training): return tf.layers.dropout(x, hp['dropout_rate'], training=training) def l2_norm(x, a...
true
true
f76495d5264c64bf97402ae78843d4f3178a6738
3,444
py
Python
example_project/settings.py
asulibraries/django-historicalrecords
168cea823f757425e694f4890e82871e783e12e5
[ "BSD-3-Clause" ]
4
2015-06-04T14:39:32.000Z
2017-08-25T14:37:54.000Z
example_project/settings.py
asulibraries/django-historicalrecords
168cea823f757425e694f4890e82871e783e12e5
[ "BSD-3-Clause" ]
1
2015-04-26T01:46:20.000Z
2015-04-26T01:46:20.000Z
example_project/settings.py
smn/django-historicalrecords
fb96c0a54d86874bf9e5bd7e0eddd457e60b2060
[ "BSD-3-Clause" ]
null
null
null
# Django settings for example_project project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. ...
35.142857
122
0.695703
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'example_app.db', 'USER': '', 'PASSWORD': '', 'HOST': '', ...
true
true
f764964d293520b5b249042c13c6acbcbb393ca2
1,060
py
Python
var/spack/repos/builtin/packages/perl-termreadkey/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2019-09-15T23:55:48.000Z
2019-09-15T23:55:48.000Z
var/spack/repos/builtin/packages/perl-termreadkey/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/perl-termreadkey/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2017-01-21T17:19:32.000Z
2017-01-21T17:19:32.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PerlTermreadkey(PerlPackage): """Term::ReadKey is a compiled perl module dedicated to prov...
46.086957
94
0.760377
from spack import * class PerlTermreadkey(PerlPackage): homepage = "http://search.cpan.org/perldoc/Term::ReadKey" url = "http://www.cpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.37.tar.gz" version('2.38', sha256='5a645878dc570ac33661581fbb090ff24ebce17d43ea53fd22e105a856a47290') version('2.37', sha...
true
true
f764964e3e4988b001c7859aa143fa9c61df4810
568
py
Python
examples/webserver-py/__main__.py
pulumi-bot/pulumi-aws
756c60135851e015232043c8206567101b8ebd85
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
examples/webserver-py/__main__.py
pulumi-bot/pulumi-aws
756c60135851e015232043c8206567101b8ebd85
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
examples/webserver-py/__main__.py
pulumi-bot/pulumi-aws
756c60135851e015232043c8206567101b8ebd85
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2016-2018, Pulumi Corporation. All rights reserved. import pulumi from pulumi_aws import ec2 from ami import get_linux_ami size = 't2.micro' group = ec2.SecurityGroup('web-secgrp', description='Enable HTTP access', ingress=[ { 'protocol': 'tcp', 'from_port': 80, 'to_port': 80, 'cidr_bloc...
27.047619
91
0.700704
import pulumi from pulumi_aws import ec2 from ami import get_linux_ami size = 't2.micro' group = ec2.SecurityGroup('web-secgrp', description='Enable HTTP access', ingress=[ { 'protocol': 'tcp', 'from_port': 80, 'to_port': 80, 'cidr_blocks': ['0.0.0.0/0'] } ]) server = ec2.Instance('web-server-www...
true
true
f76496eaa3186be16237c0a18a4b6cc6c6c55fef
712
py
Python
seed_bruteforcing/old-gentable.py
ihaveamac/random-tools
8c4ddb72642ece22ffa698c6843e76cfb062f89d
[ "MIT" ]
3
2017-06-06T11:18:15.000Z
2021-08-17T18:21:30.000Z
seed_bruteforcing/old-gentable.py
ihaveamac/random-tools
8c4ddb72642ece22ffa698c6843e76cfb062f89d
[ "MIT" ]
null
null
null
seed_bruteforcing/old-gentable.py
ihaveamac/random-tools
8c4ddb72642ece22ffa698c6843e76cfb062f89d
[ "MIT" ]
1
2017-12-17T20:18:58.000Z
2017-12-17T20:18:58.000Z
#!/usr/bin/env python3 import glob # easiest thing I see import json total = 0 toprint = "" for fn in glob.glob("info/0004*.txt"): total += 1 with open(fn, "r") as f: titleinfo = json.load(f) toprint += "{0} | {1} | `{2}`\n".format(titleinfo[0].replace('\n', '<br>').replace('`', '\\`').replace...
39.555556
191
0.573034
import glob import json total = 0 toprint = "" for fn in glob.glob("info/0004*.txt"): total += 1 with open(fn, "r") as f: titleinfo = json.load(f) toprint += "{0} | {1} | `{2}`\n".format(titleinfo[0].replace('\n', '<br>').replace('`', '\\`').replace('*', '\\*').replace('(', '\\(').replace(')',...
true
true
f76496fc10e07787e64cea0193d42a7d4a54e821
6,884
py
Python
tests/flatpages_tests/test_views.py
iMerica/dj-models
fbe4a55ac362f9355a2298f58aa0deb0b6082e19
[ "BSD-3-Clause" ]
5
2019-02-15T16:47:50.000Z
2021-12-26T18:52:23.000Z
tests/flatpages_tests/test_views.py
iMerica/dj-models
fbe4a55ac362f9355a2298f58aa0deb0b6082e19
[ "BSD-3-Clause" ]
null
null
null
tests/flatpages_tests/test_views.py
iMerica/dj-models
fbe4a55ac362f9355a2298f58aa0deb0b6082e19
[ "BSD-3-Clause" ]
2
2021-08-09T02:29:09.000Z
2021-08-20T03:30:11.000Z
from djmodels.conf import settings from djmodels.contrib.auth.models import User from djmodels.contrib.flatpages.models import FlatPage from djmodels.contrib.sites.models import Site from djmodels.test import TestCase, modify_settings, override_settings from .settings import FLATPAGES_TEMPLATES class TestDataMixin: ...
42.757764
105
0.685793
from djmodels.conf import settings from djmodels.contrib.auth.models import User from djmodels.contrib.flatpages.models import FlatPage from djmodels.contrib.sites.models import Site from djmodels.test import TestCase, modify_settings, override_settings from .settings import FLATPAGES_TEMPLATES class TestDataMixin: ...
true
true
f76497b8ee575d3a9f7468398b7d653ac600c9d4
5,718
py
Python
salt/modules/linux_ip.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
12
2015-01-21T00:18:25.000Z
2021-07-11T07:35:26.000Z
salt/modules/linux_ip.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
86
2017-01-27T11:54:46.000Z
2020-05-20T06:25:26.000Z
salt/modules/linux_ip.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
12
2015-01-05T09:50:42.000Z
2019-08-19T01:43:40.000Z
# -*- coding: utf-8 -*- ''' The networking module for Non-RH/Deb Linux distros ''' # Import Python libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt libs import salt.utils.files import salt.utils.path import salt.utils.platform import salt.utils.stringutils from salt.ext.six....
28.029412
81
0.563484
from __future__ import absolute_import, print_function, unicode_literals import salt.utils.files import salt.utils.path import salt.utils.platform import salt.utils.stringutils from salt.ext.six.moves import zip __virtualname__ = 'ip' def __virtual__(): if salt.utils.platform.is_windows(): return (Fals...
true
true
f76499607784882b14f2ea2b9114af70a5c441c3
2,287
py
Python
src/tickets/ticket.py
Attornado/de-trains
f18b511cbdca24a966adc4f6a4733d03966d369c
[ "MIT" ]
null
null
null
src/tickets/ticket.py
Attornado/de-trains
f18b511cbdca24a966adc4f6a4733d03966d369c
[ "MIT" ]
null
null
null
src/tickets/ticket.py
Attornado/de-trains
f18b511cbdca24a966adc4f6a4733d03966d369c
[ "MIT" ]
null
null
null
import json from datetime import datetime EURO_WEI = 370816960785710 TICKET_PRICE_SHORT = EURO_WEI TICKET_PRICE_MEDIUM = 2 * EURO_WEI TICKET_PRICE_LONG = 3 * EURO_WEI MIN_STATION_MEDIUM = 5 MIN_STATION_LONG = 13 class Ticket: def __init__(self, start_station: str, end_station: str, station_num: int, date: str, u...
24.591398
115
0.621338
import json from datetime import datetime EURO_WEI = 370816960785710 TICKET_PRICE_SHORT = EURO_WEI TICKET_PRICE_MEDIUM = 2 * EURO_WEI TICKET_PRICE_LONG = 3 * EURO_WEI MIN_STATION_MEDIUM = 5 MIN_STATION_LONG = 13 class Ticket: def __init__(self, start_station: str, end_station: str, station_num: int, date: str, u...
true
true
f76499a13dffb4e7c9e1266725c79bc195309ae7
1,367
py
Python
2020/day7/puzzle.py
verma7/advent_of_code
9eabd60573cc6b44f874f47539b40ffdcd956287
[ "Apache-2.0" ]
null
null
null
2020/day7/puzzle.py
verma7/advent_of_code
9eabd60573cc6b44f874f47539b40ffdcd956287
[ "Apache-2.0" ]
null
null
null
2020/day7/puzzle.py
verma7/advent_of_code
9eabd60573cc6b44f874f47539b40ffdcd956287
[ "Apache-2.0" ]
null
null
null
from collections import defaultdict def get_graph(filename): graph = defaultdict(list) rev_graph = defaultdict(list) with open(filename) as f: for line in f.readlines(): b = line.split(' bags contain ') src = b[0] dest = [] if b[1].strip() != "no oth...
24.854545
64
0.569129
from collections import defaultdict def get_graph(filename): graph = defaultdict(list) rev_graph = defaultdict(list) with open(filename) as f: for line in f.readlines(): b = line.split(' bags contain ') src = b[0] dest = [] if b[1].strip() != "no oth...
false
true
f76499d74922af0a98fe8428134116e4dae709fa
31
py
Python
lib/python3.6/imp.py
trikyas/django-project
d258d8e0d40def6c382aadde112de0f58b7fac6c
[ "MIT" ]
1
2021-02-08T10:04:39.000Z
2021-02-08T10:04:39.000Z
lib/python3.6/imp.py
trikyas/django-project
d258d8e0d40def6c382aadde112de0f58b7fac6c
[ "MIT" ]
7
2020-02-11T23:52:31.000Z
2022-02-10T09:10:58.000Z
lib/python3.6/imp.py
trikyas/django-project
d258d8e0d40def6c382aadde112de0f58b7fac6c
[ "MIT" ]
1
2019-03-26T00:23:02.000Z
2019-03-26T00:23:02.000Z
/anaconda3/lib/python3.6/imp.py
31
31
0.806452
/anaconda3/lib/python3.6/imp.py
false
true
f7649b91e7f9d5364b447bda901d2322b7cb99ea
3,903
py
Python
examples/quadrupedal_NN.py
michaelyeah7/magics_sim
3e5b7116769ebd175b170c92caff6e3c079b6382
[ "MIT" ]
1
2022-03-31T08:42:17.000Z
2022-03-31T08:42:17.000Z
examples/quadrupedal_NN.py
michaelyeah7/magics_sim
3e5b7116769ebd175b170c92caff6e3c079b6382
[ "MIT" ]
null
null
null
examples/quadrupedal_NN.py
michaelyeah7/magics_sim
3e5b7116769ebd175b170c92caff6e3c079b6382
[ "MIT" ]
null
null
null
import jax.numpy as jnp import matplotlib.pyplot as plt import jax from jax import lax from envs import Qaudrupedal from agents import Deep_Qaudrupedal import copy import pickle from time import gmtime, strftime from jaxRBDL.Dynamics.ForwardDynamics import ForwardDynamics, ForwardDynamicsCore import numpy as np from j...
27.680851
142
0.608506
import jax.numpy as jnp import matplotlib.pyplot as plt import jax from jax import lax from envs import Qaudrupedal from agents import Deep_Qaudrupedal import copy import pickle from time import gmtime, strftime from jaxRBDL.Dynamics.ForwardDynamics import ForwardDynamics, ForwardDynamicsCore import numpy as np from j...
true
true
f7649c5dd0b02d4f39164c579929805d4eff041c
723
py
Python
script/rmNAforBothBeds.py
ASLeonard/danbing-tk
15540124ff408777d0665ace73698b0c2847d1cc
[ "BSD-3-Clause" ]
17
2020-08-16T14:28:11.000Z
2022-03-23T23:30:47.000Z
script/rmNAforBothBeds.py
ASLeonard/danbing-tk
15540124ff408777d0665ace73698b0c2847d1cc
[ "BSD-3-Clause" ]
7
2021-01-25T15:26:18.000Z
2022-03-31T14:30:46.000Z
script/rmNAforBothBeds.py
ASLeonard/danbing-tk
15540124ff408777d0665ace73698b0c2847d1cc
[ "BSD-3-Clause" ]
2
2020-11-01T20:41:38.000Z
2021-05-29T03:22:24.000Z
#!/usr/bin/env python3 import sys if len(sys.argv) != 5: print("usage: program in.bed0 in.bed1 out.bed0 out.bed1") exit in0, in1, out0, out1 = sys.argv[1:] badids = set() with open(in0) as f: for ids, line in enumerate(f): if line[:2] == "NA": badids.add(ids) with open(in1) as f: ...
24.1
61
0.539419
import sys if len(sys.argv) != 5: print("usage: program in.bed0 in.bed1 out.bed0 out.bed1") exit in0, in1, out0, out1 = sys.argv[1:] badids = set() with open(in0) as f: for ids, line in enumerate(f): if line[:2] == "NA": badids.add(ids) with open(in1) as f: for ids, line in enumer...
true
true
f7649c8c19614244f4aee7a7a49aa03c5b440d85
9,891
py
Python
python/helpers/pydev/pydevd_tracing.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/helpers/pydev/pydevd_tracing.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/helpers/pydev/pydevd_tracing.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
import ctypes import os from _pydev_bundle import pydev_log, pydev_monkey from _pydevd_bundle.pydevd_constants import get_frame, IS_PY2, IS_PY37_OR_GREATER, IS_CPYTHON, IS_WINDOWS, IS_LINUX, IS_MACOS, \ IS_64BIT_PROCESS, IS_PYCHARM_ATTACH from _pydev_imps._pydev_saved_modules import thread, threading try: impo...
38.337209
128
0.628147
import ctypes import os from _pydev_bundle import pydev_log, pydev_monkey from _pydevd_bundle.pydevd_constants import get_frame, IS_PY2, IS_PY37_OR_GREATER, IS_CPYTHON, IS_WINDOWS, IS_LINUX, IS_MACOS, \ IS_64BIT_PROCESS, IS_PYCHARM_ATTACH from _pydev_imps._pydev_saved_modules import thread, threading try: impo...
true
true
f7649d064e46aa95770ee328095af458fc9bd096
3,769
py
Python
test/settings.py
tom-010/django-presentable-exception
9015ad11e83deb71bd7d2a01ccff72b1f8d74681
[ "Apache-2.0" ]
null
null
null
test/settings.py
tom-010/django-presentable-exception
9015ad11e83deb71bd7d2a01ccff72b1f8d74681
[ "Apache-2.0" ]
null
null
null
test/settings.py
tom-010/django-presentable-exception
9015ad11e83deb71bd7d2a01ccff72b1f8d74681
[ "Apache-2.0" ]
null
null
null
''' Django settings for settings project. Generated by 'django-admin startproject' using Django 3.2.6. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ ''' from pathli...
25.993103
91
0.702839
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-51gahd1*0wm(3a#sz9k=&%)07#pe3aqvoa3ag6(asla@cprq_f' DEBUG = True ALLOWED_HOSTS = ['*'] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib...
true
true
f7649d76d2cd7091e6884e16c4c724baf8548118
1,405
py
Python
sample/web_assistant.py
janakhpon/PersonalAssistant
bacd6743d23d139af1199df12c7bf99d092764b1
[ "MIT" ]
null
null
null
sample/web_assistant.py
janakhpon/PersonalAssistant
bacd6743d23d139af1199df12c7bf99d092764b1
[ "MIT" ]
null
null
null
sample/web_assistant.py
janakhpon/PersonalAssistant
bacd6743d23d139af1199df12c7bf99d092764b1
[ "MIT" ]
null
null
null
import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException from bs4 import BeautifulSoup from urllib.parse import ...
28.1
76
0.631317
import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException from bs4 import BeautifulSoup from urllib.parse import ...
true
true
f7649d8278deaf5f14bbdb01b00d8665d98831b6
503
py
Python
PYTHON/ex100.py
george-git-dev/CursoemVideo
307933ef91f1ad3a0be11bfb326fe86211f2f156
[ "MIT" ]
null
null
null
PYTHON/ex100.py
george-git-dev/CursoemVideo
307933ef91f1ad3a0be11bfb326fe86211f2f156
[ "MIT" ]
null
null
null
PYTHON/ex100.py
george-git-dev/CursoemVideo
307933ef91f1ad3a0be11bfb326fe86211f2f156
[ "MIT" ]
1
2021-04-01T22:31:19.000Z
2021-04-01T22:31:19.000Z
from random import randint from time import sleep def sorteia(lista): print("Sorteando 5 valores da lista: ", end="") for cont in range(0, 5): n = randint(1, 10) lista.append(n) print(f"{n} ", end="") sleep(0.3) print("PRONTO!") def somaPar(lista): soma = 0 for va...
20.12
63
0.578529
from random import randint from time import sleep def sorteia(lista): print("Sorteando 5 valores da lista: ", end="") for cont in range(0, 5): n = randint(1, 10) lista.append(n) print(f"{n} ", end="") sleep(0.3) print("PRONTO!") def somaPar(lista): soma = 0 for va...
true
true
f7649df6bb81168a136b7befd9696fbf7beedc6c
1,201
py
Python
emojiweather/voice/views.py
richardcornish/conference
7bc49a40524020c78beb8f35def78ce5473d2f67
[ "BSD-3-Clause" ]
5
2018-01-04T17:03:42.000Z
2019-10-05T18:47:32.000Z
emojiweather/voice/views.py
richardcornish/smsweather
7bc49a40524020c78beb8f35def78ce5473d2f67
[ "BSD-3-Clause" ]
10
2018-04-12T14:00:24.000Z
2021-09-22T17:55:34.000Z
emojiweather/voice/views.py
richardcornish/smsweather
7bc49a40524020c78beb8f35def78ce5473d2f67
[ "BSD-3-Clause" ]
null
null
null
from django.http import HttpResponse from django.template.loader import render_to_string from django.urls import reverse from django.views.generic.edit import FormView from twilio.twiml.voice_response import Gather, VoiceResponse from emojiweather.mixins import CsrfExemptMixin from .forms import VoiceWeatherForm cl...
36.393939
68
0.698585
from django.http import HttpResponse from django.template.loader import render_to_string from django.urls import reverse from django.views.generic.edit import FormView from twilio.twiml.voice_response import Gather, VoiceResponse from emojiweather.mixins import CsrfExemptMixin from .forms import VoiceWeatherForm cl...
true
true
f7649f87efdcd6d7aebb74be712741caf66fd287
1,748
py
Python
CondTools/Ecal/python/EcalLaser_express_popcon.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
CondTools/Ecal/python/EcalLaser_express_popcon.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
CondTools/Ecal/python/EcalLaser_express_popcon.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from CondCore.Utilities.popcon2dropbox_job_conf import options, psetForRecord, setup_popcon import CondTools.Ecal.db_credentials as auth recordName = "EcalLaserAPDPNRatiosRcd" tagTimeType = "timestamp" process = setup_popcon( recordName, tagTimeType ) process.MessageLogger = ...
37.191489
91
0.693364
import FWCore.ParameterSet.Config as cms from CondCore.Utilities.popcon2dropbox_job_conf import options, psetForRecord, setup_popcon import CondTools.Ecal.db_credentials as auth recordName = "EcalLaserAPDPNRatiosRcd" tagTimeType = "timestamp" process = setup_popcon( recordName, tagTimeType ) process.MessageLogger = ...
true
true
f7649ffff7331e8a580fe3a884ac02ba86892c10
2,630
py
Python
demo/MAX30100_definitions.py
MicrochipTech/Azure-IoT-Heart-rate-monitor
e0854f549e137d3afc8d934d9f9beaa344a8cf40
[ "MIT" ]
4
2019-06-21T00:54:16.000Z
2021-09-24T01:22:44.000Z
demo/MAX30100_definitions.py
MicrochipTech/Azure-IoT-Heart-rate-monitor
e0854f549e137d3afc8d934d9f9beaa344a8cf40
[ "MIT" ]
null
null
null
demo/MAX30100_definitions.py
MicrochipTech/Azure-IoT-Heart-rate-monitor
e0854f549e137d3afc8d934d9f9beaa344a8cf40
[ "MIT" ]
4
2019-11-29T04:31:43.000Z
2021-09-13T11:12:30.000Z
I2C_ADR = 0x57 #DATA_IS_READY() ( DATA_READY == 0 ) #DATA_IS_NOT_READY() ( DATA_READY != 0 ) # registers' addresses INT_STATUS = 0x00 INT_ENABLE = 0x01 FIFO_WRITE_PTR = 0x02 OVER_FLOW_CNT = 0x03 FIFO_READ_PTR = 0x04 FIFO_DATA_REG = 0x05 MODE_CONFIG = 0x06 SPO2_CONFIG = 0x0...
26.836735
49
0.661597
I2C_ADR = 0x57 INT_STATUS = 0x00 INT_ENABLE = 0x01 FIFO_WRITE_PTR = 0x02 OVER_FLOW_CNT = 0x03 FIFO_READ_PTR = 0x04 FIFO_DATA_REG = 0x05 MODE_CONFIG = 0x06 SPO2_CONFIG = 0x07 LED_CONFIG = 0x09 TEMP_INTEGER = 0x16 TEMP_FRACTION = 0x17 REVISION_ID = 0xFE PART_ID...
true
true
f764a0365875ceee5c730756a801403f6befa228
16,249
py
Python
huawei2.py
berrnd/linuxfabrik-lib
c999d682a39ee806c170045f21dfc7aea44dbacf
[ "Unlicense" ]
null
null
null
huawei2.py
berrnd/linuxfabrik-lib
c999d682a39ee806c170045f21dfc7aea44dbacf
[ "Unlicense" ]
null
null
null
huawei2.py
berrnd/linuxfabrik-lib
c999d682a39ee806c170045f21dfc7aea44dbacf
[ "Unlicense" ]
null
null
null
#! /usr/bin/env python2 # -*- coding: utf-8; py-indent-offset: 4 -*- # # Author: Linuxfabrik GmbH, Zurich, Switzerland # Contact: info (at) linuxfabrik (dot) ch # https://www.linuxfabrik.ch/ # License: The Unlicense, see LICENSE file. # https://github.com/Linuxfabrik/monitoring-plugins/blob/main/CONTRIBUTING...
28.912811
94
0.564466
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland' __version__ = '2022021601' import time import base2 import cache2 import url2 def get_creds(args): ibasetoken = cache2.get('huawei-{}-ibasetoken'.format(args.DEVICE_ID)) cookie = cache2.get('huawei-{}-cookie'.format(args.DEVICE_ID)) if ibase...
true
true
f764a07a1e561797be2fde910fdaf3c7a851257b
446
py
Python
backend/quizapp/migrations/0002_userparticipated_status.py
Floran-Github/CoderHifi-Code
6264edcea55fa5945d401d55d8cd7493bf4114eb
[ "Apache-2.0" ]
1
2021-02-24T13:43:42.000Z
2021-02-24T13:43:42.000Z
backend/quizapp/migrations/0002_userparticipated_status.py
Floran-Github/CoderHifi-Code
6264edcea55fa5945d401d55d8cd7493bf4114eb
[ "Apache-2.0" ]
null
null
null
backend/quizapp/migrations/0002_userparticipated_status.py
Floran-Github/CoderHifi-Code
6264edcea55fa5945d401d55d8cd7493bf4114eb
[ "Apache-2.0" ]
1
2021-10-05T19:17:51.000Z
2021-10-05T19:17:51.000Z
# Generated by Django 3.0.7 on 2021-05-17 14:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quizapp', '0001_initial'), ] operations = [ migrations.AddField( model_name='userparticipated', name='status', ...
23.473684
113
0.589686
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quizapp', '0001_initial'), ] operations = [ migrations.AddField( model_name='userparticipated', name='status', field=models.CharField(choices=[('Pass', ...
true
true
f764a24e544802e0b0e9b465bc2213bb777188f9
702
py
Python
pypro/turmas/models.py
taniodev/curso-django
aa5b0edd6ca55d2ea7f73220644d5c64a96c60df
[ "MIT" ]
null
null
null
pypro/turmas/models.py
taniodev/curso-django
aa5b0edd6ca55d2ea7f73220644d5c64a96c60df
[ "MIT" ]
19
2019-11-26T20:38:55.000Z
2021-09-22T18:08:51.000Z
pypro/turmas/models.py
taniodev/curso-django
aa5b0edd6ca55d2ea7f73220644d5c64a96c60df
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.db import models class Turma(models.Model): nome = models.CharField(max_length=64) slug = models.SlugField(max_length=64) inicio = models.DateField() fim = models.DateField() alunos = models.ManyToManyField(get_user_model(), through='Matri...
29.25
75
0.706553
from django.contrib.auth import get_user_model from django.db import models class Turma(models.Model): nome = models.CharField(max_length=64) slug = models.SlugField(max_length=64) inicio = models.DateField() fim = models.DateField() alunos = models.ManyToManyField(get_user_model(), through='Matri...
true
true
f764a2ad36f97f931bdeb0c1eb9dad7dbb39fcbc
703
py
Python
topic04/lab04.01-grade.py
juliandunne1234/pands-problems-2020gmit
f829415c7ee82da6eea5aa1943286236b6a7f878
[ "MIT" ]
null
null
null
topic04/lab04.01-grade.py
juliandunne1234/pands-problems-2020gmit
f829415c7ee82da6eea5aa1943286236b6a7f878
[ "MIT" ]
null
null
null
topic04/lab04.01-grade.py
juliandunne1234/pands-problems-2020gmit
f829415c7ee82da6eea5aa1943286236b6a7f878
[ "MIT" ]
null
null
null
# This program reads a students # exam result and determines # if they have to repeat # the test. x = float(input("Please enter your exam result: ")) if x < 0 or x > 100: print("Please re-execute code with correct test result.") elif x < 40: print("You scored a percentage of: ", x) print("That is a Fail")...
28.12
61
0.633001
x = float(input("Please enter your exam result: ")) if x < 0 or x > 100: print("Please re-execute code with correct test result.") elif x < 40: print("You scored a percentage of: ", x) print("That is a Fail") elif x >= 40 and x < 50: print("You scored a percentage of: ", x) print("That is a Pass") e...
true
true
f764a2d3ee645b7357737e55215b4dbf96847202
5,347
py
Python
src/transformers/convert_pegasus_tf_to_pytorch.py
suliuzh/transformers
f34372a9ff99f6bc8619ac83dc07f7afe6b92141
[ "Apache-2.0" ]
12
2021-06-05T03:51:23.000Z
2022-03-05T05:09:41.000Z
src/transformers/convert_pegasus_tf_to_pytorch.py
suliuzh/transformers
f34372a9ff99f6bc8619ac83dc07f7afe6b92141
[ "Apache-2.0" ]
5
2021-12-01T04:34:07.000Z
2022-01-28T08:28:18.000Z
src/transformers/convert_pegasus_tf_to_pytorch.py
suliuzh/transformers
f34372a9ff99f6bc8619ac83dc07f7afe6b92141
[ "Apache-2.0" ]
3
2022-01-18T10:56:05.000Z
2022-01-28T01:46:43.000Z
# coding=utf-8 # Copyright 2020 Google and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
40.203008
113
0.711988
import argparse import os from pathlib import Path from typing import Dict import tensorflow as tf import torch from tqdm import tqdm from transformers import PegasusConfig, PegasusForConditionalGeneration, PegasusTokenizer from transformers.configuration_pegasus import DEFAULTS, task_specific_params PATTERNS = [ ...
true
true
f764a5e4b6572409444e45b365f22af6176b225e
7,049
py
Python
model_zoo/official/cv/ctpn/src/ctpn.py
Vincent34/mindspore
a39a60878a46e7e9cb02db788c0bca478f2fa6e5
[ "Apache-2.0" ]
2
2021-07-08T13:10:42.000Z
2021-11-08T02:48:57.000Z
model_zoo/official/cv/ctpn/src/ctpn.py
peixinhou/mindspore
fcb2ec2779b753e95c762cf292b23bd81d1f561b
[ "Apache-2.0" ]
null
null
null
model_zoo/official/cv/ctpn/src/ctpn.py
peixinhou/mindspore
fcb2ec2779b753e95c762cf292b23bd81d1f561b
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
46.993333
113
0.598099
import numpy as np import mindspore.nn as nn from mindspore import Tensor, Parameter from mindspore.common import dtype as mstype from mindspore.ops import operations as P from src.CTPN.rpn import RPN from src.CTPN.anchor_generator import AnchorGenerator from src.CTPN.proposal_generator import Proposal from src.CTPN.v...
true
true
f764a62dc4a088e4dcb54b0b5661b06394ca1318
10,740
py
Python
yt/frontends/boxlib/tests/test_outputs.py
smressle/yt
29869405f139d9341101793a6e849497bd85f5ea
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/boxlib/tests/test_outputs.py
smressle/yt
29869405f139d9341101793a6e849497bd85f5ea
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/boxlib/tests/test_outputs.py
smressle/yt
29869405f139d9341101793a6e849497bd85f5ea
[ "BSD-3-Clause-Clear" ]
null
null
null
""" Boxlib frontend tests """ #----------------------------------------------------------------------------- # Copyright (c) 2017, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #---------------------...
35.681063
88
0.641806
from yt.testing import \ assert_equal, \ requires_file, \ units_override_check from yt.utilities.answer_testing.framework import \ requires_ds, \ small_patch_amr, \ data_dir_load, \ GridValuesTest from yt.frontends.boxlib.api import \ OrionDataset, \ NyxDataset, \ WarpXDataset,...
true
true
f764a677331bafef2604d219abbac91ca8666b1a
2,281
py
Python
blog/libs/yuntongxun/sms.py
Asura0528/blog
dafed165b34b9370e0194e6055869814c8d3fc95
[ "MIT" ]
null
null
null
blog/libs/yuntongxun/sms.py
Asura0528/blog
dafed165b34b9370e0194e6055869814c8d3fc95
[ "MIT" ]
null
null
null
blog/libs/yuntongxun/sms.py
Asura0528/blog
dafed165b34b9370e0194e6055869814c8d3fc95
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- from libs.yuntongxun.CCPRestSDK import REST # 说明:主账号,登陆云通讯网站后,可在"控制台-应用"中看到开发者主账号ACCOUNT SID _accountSid = '8a216da87291bbcd0172acc0f2950e35' # 说明:主账号Token,登陆云通讯网站后,可在控制台-应用中看到开发者主账号AUTH TOKEN _accountToken = '69b0e93b93fb402eb0ce3ff09bb012d9' # 请使用管理控制台首页的APPID或自己创建应用的APPID _appId = '8a216da...
28.160494
75
0.624726
from libs.yuntongxun.CCPRestSDK import REST _accountSid = '8a216da87291bbcd0172acc0f2950e35' _accountToken = '69b0e93b93fb402eb0ce3ff09bb012d9' _appId = '8a216da87291bbcd0172acc0f3ac0e3c' _serverIP = 'sandboxapp.cloopen.com' _serverPort = "8883" _softVersion = '2013-12-26' class CCP(object): def __new__(...
true
true
f764a689d366410e338c9be30ce080c5de88ea2d
522
py
Python
Lib/site-packages/PyInstaller/hooks/hook-PyQt4.QtHelp.py
fhqjgd/python2.7
6533019b8b2fbe113aa552e44247c054bdd8a75b
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/PyInstaller/hooks/hook-PyQt4.QtHelp.py
fhqjgd/python2.7
6533019b8b2fbe113aa552e44247c054bdd8a75b
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/PyInstaller/hooks/hook-PyQt4.QtHelp.py
fhqjgd/python2.7
6533019b8b2fbe113aa552e44247c054bdd8a75b
[ "bzip2-1.0.6" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2013-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
29
78
0.492337
hiddenimports = [ 'sip', 'PyQt4.QtCore', 'PyQt4.QtGui', 'PyQt4.QtSql', 'PyQt4.QtNetwork', ]
true
true
f764a6f01fd53ec754183f23377a364af9ffba81
1,469
py
Python
satchmo/apps/payment/modules/giftcertificate/migrations/0002_giftcertificateproduct_giftcertificateusage.py
eyeyunianto/satchmo
e67495e78dd685eeae3bbd332c6e416c62e02ae6
[ "BSD-3-Clause" ]
1
2019-10-08T16:19:59.000Z
2019-10-08T16:19:59.000Z
satchmo/apps/payment/modules/giftcertificate/migrations/0002_giftcertificateproduct_giftcertificateusage.py
opencoca/Satchmo
d2f6c086f4742b10743075701caec3e170f112bf
[ "BSD-3-Clause" ]
null
null
null
satchmo/apps/payment/modules/giftcertificate/migrations/0002_giftcertificateproduct_giftcertificateusage.py
opencoca/Satchmo
d2f6c086f4742b10743075701caec3e170f112bf
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('product', '0001_initial'), ('giftcertificate', '0001_initial'), ] operations = [ migrations.CreateModel( ...
36.725
131
0.579306
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('product', '0001_initial'), ('giftcertificate', '0001_initial'), ] operations = [ migrations.CreateModel( name='GiftCertificatePr...
true
true
f764a6f35b550ac9e35a32cc1440776340ba04c6
821
py
Python
290_Word-Pattern.py
Coalin/Daily-LeetCode-Exercise
a064dcdc3a82314be4571d342c4807291a24f69f
[ "MIT" ]
3
2018-07-05T05:51:10.000Z
2019-05-04T08:35:44.000Z
290_Word-Pattern.py
Coalin/Daily-LeetCode-Exercise
a064dcdc3a82314be4571d342c4807291a24f69f
[ "MIT" ]
null
null
null
290_Word-Pattern.py
Coalin/Daily-LeetCode-Exercise
a064dcdc3a82314be4571d342c4807291a24f69f
[ "MIT" ]
null
null
null
class Solution: def wordPattern(self, pattern, str): """ :type pattern: str :type str: str :rtype: bool """ str_ = str.split(" ") dic_s = {} dic_p = {} res_s = [] res_p = [] for i in range(len(str_)): if str...
23.457143
43
0.387333
class Solution: def wordPattern(self, pattern, str): str_ = str.split(" ") dic_s = {} dic_p = {} res_s = [] res_p = [] for i in range(len(str_)): if str_[i] in dic_s: dic_s[str_[i]].append(i) else: dic_s...
true
true
f764aae8e67e90ee4cb876783de81c6a1f58d94c
1,380
py
Python
artemis/general/dict_ops.py
peteroconnor-bc/artemis
ad2871fae7d986bf10580eec27aee5b7315adad5
[ "BSD-2-Clause-FreeBSD" ]
235
2016-08-26T14:18:51.000Z
2022-03-13T10:54:39.000Z
artemis/general/dict_ops.py
peteroconnor-bc/artemis
ad2871fae7d986bf10580eec27aee5b7315adad5
[ "BSD-2-Clause-FreeBSD" ]
112
2016-04-30T11:48:38.000Z
2021-01-12T20:17:32.000Z
artemis/general/dict_ops.py
peteroconnor-bc/artemis
ad2871fae7d986bf10580eec27aee5b7315adad5
[ "BSD-2-Clause-FreeBSD" ]
31
2016-11-05T19:09:19.000Z
2021-09-13T07:35:40.000Z
import itertools __author__ = 'peter' def cross_dict_dicts(*dicts): """ Combine two or more dictionaries of dictionaries by turning every pairwise combination of their keys, and creating a new dict whose keys are tuples (containing these key-combinations) and whose values are the the combined dictioniona...
31.363636
138
0.577536
import itertools __author__ = 'peter' def cross_dict_dicts(*dicts): cross_dict = dict((keys, merge_dicts(*[d[k] for d, k in zip(dicts, keys)])) for keys in itertools.product(*[d.keys() for d in dicts])) return cross_dict def merge_dicts(*dicts): return dict((k, v) for d in dicts for k, v in d.items())
true
true
f764ab70ced3c9f4a31df5b3d3e8dda9deb85e58
671
py
Python
models/t_global_script_task.py
THM-MA/XSDATA-waypoint
dd94442f9d6677c525bf3ebb03c15fec52fa1079
[ "MIT" ]
null
null
null
models/t_global_script_task.py
THM-MA/XSDATA-waypoint
dd94442f9d6677c525bf3ebb03c15fec52fa1079
[ "MIT" ]
null
null
null
models/t_global_script_task.py
THM-MA/XSDATA-waypoint
dd94442f9d6677c525bf3ebb03c15fec52fa1079
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import Optional from .script import Script from .t_global_task import TGlobalTask __NAMESPACE__ = "http://www.omg.org/spec/BPMN/20100524/MODEL" @dataclass class TGlobalScriptTask(TGlobalTask): class Meta: name = "tGlobalScriptTask" script: Optiona...
23.964286
71
0.615499
from dataclasses import dataclass, field from typing import Optional from .script import Script from .t_global_task import TGlobalTask __NAMESPACE__ = "http://www.omg.org/spec/BPMN/20100524/MODEL" @dataclass class TGlobalScriptTask(TGlobalTask): class Meta: name = "tGlobalScriptTask" script: Optiona...
true
true
f764abcf525d560266321b01b40e3b61fbf99744
387
py
Python
app/migrations/0034_auto_20190818_2047.py
thomasemurphy/django-channels-react-multiplayer
2d8bbf408442f73cba461beb2ef2b50a33d23cae
[ "MIT" ]
57
2019-08-22T00:02:09.000Z
2022-03-14T14:46:32.000Z
app/migrations/0034_auto_20190818_2047.py
aduranil/django-channels-react-hooks-multiplayer
2d8bbf408442f73cba461beb2ef2b50a33d23cae
[ "MIT" ]
1
2019-08-07T14:09:18.000Z
2019-08-07T14:09:18.000Z
app/migrations/0034_auto_20190818_2047.py
aduranil/django-channels-react-hooks-multiplayer
2d8bbf408442f73cba461beb2ef2b50a33d23cae
[ "MIT" ]
11
2019-11-02T19:38:47.000Z
2022-01-10T23:37:01.000Z
# Generated by Django 2.1.7 on 2019-08-18 20:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("app", "0033_gameplayer_loser")] operations = [ migrations.AlterField( model_name="move", name="action_type", field=mo...
22.764706
70
0.627907
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("app", "0033_gameplayer_loser")] operations = [ migrations.AlterField( model_name="move", name="action_type", field=models.CharField(default="no_move", max_length=200...
true
true
f764ac198fcf45e742f0152e99dc7240b6f690d4
32,846
py
Python
google/cloud/servicemanagement_v1/services/service_manager/transports/grpc.py
anukaal/python-service-management
e8cfe431795f63dba1f77dfc9a5fd5bd43e37f11
[ "Apache-2.0" ]
null
null
null
google/cloud/servicemanagement_v1/services/service_manager/transports/grpc.py
anukaal/python-service-management
e8cfe431795f63dba1f77dfc9a5fd5bd43e37f11
[ "Apache-2.0" ]
null
null
null
google/cloud/servicemanagement_v1/services/service_manager/transports/grpc.py
anukaal/python-service-management
e8cfe431795f63dba1f77dfc9a5fd5bd43e37f11
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
44.088591
100
0.651312
import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union from google.api_core import grpc_helpers from google.api_core import operations_v1 from google.api_core import gapic_v1 import google.auth from google.auth import credentials as ga_credentials from google.auth.transport.grpc impor...
true
true
f764ae002468fb34a672051636753f64726fc5e3
12,780
py
Python
tasks/cangbaotu.py
8Avalon8/pisces_af
d973f07ba31fa39e01e953e15c29e3030ba9ab32
[ "MIT" ]
null
null
null
tasks/cangbaotu.py
8Avalon8/pisces_af
d973f07ba31fa39e01e953e15c29e3030ba9ab32
[ "MIT" ]
null
null
null
tasks/cangbaotu.py
8Avalon8/pisces_af
d973f07ba31fa39e01e953e15c29e3030ba9ab32
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- task = Task("cangbaotu",desc = u"藏宝图") #task.addSetupActionSet("RefreshGame",tag="pre1",desc="RefreshGame") task.addTeardownActionSet("TypeCommand", tag = "37", desc = u"清除任务标记", mp={'command':'$cleartask 1'}) task.addTeardownActionSet("TypeCommand", tag = "37", desc = u"清除任务标记", mp={'command':'...
34.540541
117
0.630829
task = Task("cangbaotu",desc = u"藏宝图") task.addTeardownActionSet("TypeCommand", tag = "37", desc = u"清除任务标记", mp={'command':'$cleartask 1'}) task.addTeardownActionSet("TypeCommand", tag = "37", desc = u"清除任务标记", mp={'command':'$dropall -1'}) tasksuit.addTask(task) step = Step("step0.5", u"登陆") step.addActionSet("TypeC...
true
true
f764b0013221edfda983d5fe585e4856417043f2
3,967
py
Python
bin/import-enacted-bills.py
Lunga001/pmg-cms-2
10cea3979711716817b0ba2a41987df73f2c7642
[ "Apache-2.0" ]
2
2019-06-11T20:46:43.000Z
2020-08-27T22:50:32.000Z
bin/import-enacted-bills.py
Lunga001/pmg-cms-2
10cea3979711716817b0ba2a41987df73f2c7642
[ "Apache-2.0" ]
70
2017-05-26T14:04:06.000Z
2021-06-30T10:21:58.000Z
bin/import-enacted-bills.py
OpenUpSA/pmg-cms-2
ec5f259dae81674ac7a8cdb80f124a8b0f167780
[ "Apache-2.0" ]
4
2017-08-29T10:09:30.000Z
2021-05-25T11:29:03.000Z
#!/bin/env python from pmg.models import Bill, BillVersion, File, db, BillType import json import re bills = json.load(open("data/bills-with-files.json")) bill_pages = json.load(open("data/bill-pages.json")) nids = json.load(open("data/nid_url.json")) pages_by_nid = {p["nid"]: p for p in bill_pages} nids_by_url = {n...
29.169118
312
0.580035
from pmg.models import Bill, BillVersion, File, db, BillType import json import re bills = json.load(open("data/bills-with-files.json")) bill_pages = json.load(open("data/bill-pages.json")) nids = json.load(open("data/nid_url.json")) pages_by_nid = {p["nid"]: p for p in bill_pages} nids_by_url = {n["url"]: n for n i...
true
true
f764b19d6a3a054566e7288b06075c48c5256115
373
py
Python
python/ray/workflow/examples/comparisons/google_cloud_workflows/sub_workflows_workflow.py
linyiyue/ray
90d2456ec70270a1f894ec3ef6f3004533859e03
[ "Apache-2.0" ]
21,382
2016-09-26T23:12:52.000Z
2022-03-31T21:47:45.000Z
python/ray/workflow/examples/comparisons/google_cloud_workflows/sub_workflows_workflow.py
linyiyue/ray
90d2456ec70270a1f894ec3ef6f3004533859e03
[ "Apache-2.0" ]
19,689
2016-09-17T08:21:25.000Z
2022-03-31T23:59:30.000Z
python/ray/workflow/examples/comparisons/google_cloud_workflows/sub_workflows_workflow.py
gramhagen/ray
c18caa4db36d466718bdbcb2229aa0b2dc03da1f
[ "Apache-2.0" ]
4,114
2016-09-23T18:54:01.000Z
2022-03-31T15:07:32.000Z
from ray import workflow @workflow.step def hello(name: str) -> str: return format_name.step(name) @workflow.step def format_name(name: str) -> str: return "hello, {}".format(name) @workflow.step def report(msg: str) -> None: print(msg) if __name__ == "__main__": workflow.init() r1 = hello.s...
15.541667
35
0.640751
from ray import workflow @workflow.step def hello(name: str) -> str: return format_name.step(name) @workflow.step def format_name(name: str) -> str: return "hello, {}".format(name) @workflow.step def report(msg: str) -> None: print(msg) if __name__ == "__main__": workflow.init() r1 = hello.s...
true
true
f764b4e1239030458869e3d46d6ea94bfe1cb252
127,012
py
Python
pysnmp-with-texts/HUAWEI-RSVPTE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/HUAWEI-RSVPTE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/HUAWEI-RSVPTE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module HUAWEI-RSVPTE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-RSVPTE-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:48:18 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
166.463958
12,243
0.792783
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.impo...
true
true
f764b71b6fd7db83f978d69a16c42a97d48da611
194
py
Python
src/common/rotation.py
VMoM/Tertris
aefd7927c5362ca85376f92870a2c49b5d00c2bb
[ "MIT" ]
3
2020-10-30T09:10:20.000Z
2020-11-01T11:26:29.000Z
src/common/rotation.py
VMoM/Tertris
aefd7927c5362ca85376f92870a2c49b5d00c2bb
[ "MIT" ]
null
null
null
src/common/rotation.py
VMoM/Tertris
aefd7927c5362ca85376f92870a2c49b5d00c2bb
[ "MIT" ]
null
null
null
""" File that contains the declaration of the Rotation class (enumeration) """ import enum class Rotation(enum.Enum): LEFT = enum.auto() RIGHT = enum.auto() REVERSE = enum.auto()
16.166667
70
0.670103
import enum class Rotation(enum.Enum): LEFT = enum.auto() RIGHT = enum.auto() REVERSE = enum.auto()
true
true
f764b73bc1430b475d86f478d170682b12629a99
1,834
py
Python
login/migrations/0001_initial.py
alvin-tz/DevOps
897000c5f24fff41d0b948d80888678ad41773f3
[ "Apache-2.0" ]
null
null
null
login/migrations/0001_initial.py
alvin-tz/DevOps
897000c5f24fff41d0b948d80888678ad41773f3
[ "Apache-2.0" ]
null
null
null
login/migrations/0001_initial.py
alvin-tz/DevOps
897000c5f24fff41d0b948d80888678ad41773f3
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.4 on 2018-12-24 08:40 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ConfirmString', fields=[ ...
35.960784
114
0.539258
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ConfirmString', fields=[ ('id', models.AutoField(auto_crea...
true
true
f764b76ff11fd93456692e3d2e6fd6c1bd2ae374
2,891
py
Python
onnxruntime/core/flatbuffers/ort_flatbuffers_py/fbs/RuntimeOptimizationRecordContainerEntry.py
lchang20/onnxruntime
97b8f6f394ae02c73ed775f456fd85639c91ced1
[ "MIT" ]
669
2018-12-03T22:00:31.000Z
2019-05-06T19:42:49.000Z
onnxruntime/core/flatbuffers/ort_flatbuffers_py/fbs/RuntimeOptimizationRecordContainerEntry.py
lchang20/onnxruntime
97b8f6f394ae02c73ed775f456fd85639c91ced1
[ "MIT" ]
440
2018-12-03T21:09:56.000Z
2019-05-06T20:47:23.000Z
onnxruntime/core/flatbuffers/ort_flatbuffers_py/fbs/RuntimeOptimizationRecordContainerEntry.py
lchang20/onnxruntime
97b8f6f394ae02c73ed775f456fd85639c91ced1
[ "MIT" ]
140
2018-12-03T21:15:28.000Z
2019-05-06T18:02:36.000Z
# automatically generated by the FlatBuffers compiler, do not modify # namespace: fbs import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class RuntimeOptimizationRecordContainerEntry(object): __slots__ = ['_tab'] @classmethod def GetRootAsRuntimeOptimizationRecordContaine...
45.171875
228
0.751643
import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class RuntimeOptimizationRecordContainerEntry(object): __slots__ = ['_tab'] @classmethod def GetRootAsRuntimeOptimizationRecordContainerEntry(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffse...
true
true
f764b7a7f16577706c5cddeb25c4ea37a3b8050d
7,500
py
Python
tools/demo.py
yihui-he/MNC-for-ultrasound-segmentation
a7d0d8bd0029ccb8941726bf61842b0c6074f3d6
[ "BSD-2-Clause" ]
2
2016-11-30T05:59:31.000Z
2019-12-01T22:20:17.000Z
tools/demo.py
yihui-he/MNC-for-ultrasound-segmentation
a7d0d8bd0029ccb8941726bf61842b0c6074f3d6
[ "BSD-2-Clause" ]
null
null
null
tools/demo.py
yihui-he/MNC-for-ultrasound-segmentation
a7d0d8bd0029ccb8941726bf61842b0c6074f3d6
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python # -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------...
39.267016
93
0.613067
import os import argparse import time import cv2 import numpy as np import _init_paths import caffe from mnc_config import cfg from transform.bbox_transform import clip_boxes from utils.blob import prep_im_for_blob, im_list_to_blob from transform.mask_transform import gpu_mask_voting import matplotlib.pyplot as plt f...
false
true
f764b935cffca16d0d61a3db9494259ad2956d56
858
py
Python
lpyHardway/funcions/ex7.py
oreanroy/learn_modules
fb1debc612940b65c409d8f5b35a3b4e16e67494
[ "MIT" ]
null
null
null
lpyHardway/funcions/ex7.py
oreanroy/learn_modules
fb1debc612940b65c409d8f5b35a3b4e16e67494
[ "MIT" ]
17
2019-12-01T16:56:29.000Z
2022-03-02T04:49:51.000Z
lpyHardway/funcions/ex7.py
oreanroy/learn_modules
fb1debc612940b65c409d8f5b35a3b4e16e67494
[ "MIT" ]
1
2019-09-28T00:43:54.000Z
2019-09-28T00:43:54.000Z
def break_words(stuff): words = stuff.split(' ') return words def sort_words(words): return sorted(words) def print_first_word(words): word = words.pop(0) print word def print_last_word(words): word = words.pop(-1) print word def sort_sentence(sentence): words = break_words(sentence) return sort_words(word...
22
58
0.770396
def break_words(stuff): words = stuff.split(' ') return words def sort_words(words): return sorted(words) def print_first_word(words): word = words.pop(0) print word def print_last_word(words): word = words.pop(-1) print word def sort_sentence(sentence): words = break_words(sentence) return sort_words(word...
false
true
f764ba033e42c514d68b8b3aab8a0553075a72b0
1,852
py
Python
tests/time_out_assert.py
zcomputerwiz/silicoin-light-wallet
1cdc3784effec229cc841a04655078b1d9913d33
[ "Apache-2.0" ]
null
null
null
tests/time_out_assert.py
zcomputerwiz/silicoin-light-wallet
1cdc3784effec229cc841a04655078b1d9913d33
[ "Apache-2.0" ]
null
null
null
tests/time_out_assert.py
zcomputerwiz/silicoin-light-wallet
1cdc3784effec229cc841a04655078b1d9913d33
[ "Apache-2.0" ]
null
null
null
import asyncio import logging import time from typing import Callable from silicoin.protocols.protocol_message_types import ProtocolMessageTypes log = logging.getLogger(__name__) async def time_out_assert_custom_interval(timeout: int, interval, function, value=True, *args, **kwargs): start = time.time() las...
33.672727
105
0.651728
import asyncio import logging import time from typing import Callable from silicoin.protocols.protocol_message_types import ProtocolMessageTypes log = logging.getLogger(__name__) async def time_out_assert_custom_interval(timeout: int, interval, function, value=True, *args, **kwargs): start = time.time() las...
true
true
f764bde37ea7a265f39d0dc07c8a57b8aecc6373
1,302
py
Python
test/unit/test_ruleset.py
zmallen/ftw
edd1ff62c5999fd4285a7ed55b954757b15ea841
[ "Apache-2.0" ]
264
2016-05-13T20:13:03.000Z
2022-02-23T09:31:25.000Z
test/unit/test_ruleset.py
KevinHock/ftw
0fc68d243030762f280b8a7d365dbbb91888e786
[ "Apache-2.0" ]
78
2016-05-13T18:35:19.000Z
2022-03-16T04:13:56.000Z
test/unit/test_ruleset.py
KevinHock/ftw
0fc68d243030762f280b8a7d365dbbb91888e786
[ "Apache-2.0" ]
68
2016-05-13T18:26:19.000Z
2022-03-23T08:34:13.000Z
from ftw import ruleset, errors import pytest def test_output(): with pytest.raises(errors.TestError) as excinfo: output = ruleset.Output({}) assert(excinfo.value.args[0].startswith('Need at least')) with pytest.raises(ValueError) as excinfo: output = ruleset.Output({'status': 'derp'}) ...
35.189189
105
0.65361
from ftw import ruleset, errors import pytest def test_output(): with pytest.raises(errors.TestError) as excinfo: output = ruleset.Output({}) assert(excinfo.value.args[0].startswith('Need at least')) with pytest.raises(ValueError) as excinfo: output = ruleset.Output({'status': 'derp'}) ...
true
true
f764beaa05b7ae555e8c3e74c3589a786085d705
3,743
py
Python
models/Global-Flow-Local-Attention/util/task.py
xianjian-xie/pose-generation
ad0495e80c6fe1e7690fa8691f1eb11b4e9bca32
[ "MIT" ]
null
null
null
models/Global-Flow-Local-Attention/util/task.py
xianjian-xie/pose-generation
ad0495e80c6fe1e7690fa8691f1eb11b4e9bca32
[ "MIT" ]
null
null
null
models/Global-Flow-Local-Attention/util/task.py
xianjian-xie/pose-generation
ad0495e80c6fe1e7690fa8691f1eb11b4e9bca32
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F import torchvision.transforms as transforms from random import randint import numpy as np import cv2 from PIL import Image import random ################################################################### # random mask generation ############################################...
30.185484
83
0.52311
import torch import torch.nn.functional as F import torchvision.transforms as transforms from random import randint import numpy as np import cv2 from PIL import Image import random def random_regular_mask(img): mask = torch.ones_like(img) s = img.size() N_mask = random.randint(1, 5) limx = s[1] - s[...
true
true
f764bec49396745ab785f1b6a090e7c7a63d09cc
715
py
Python
src/environment_provider/splitter/__init__.py
andjoe-axis/etos-environment-provider
e95f3e67a22ee08382265ea55070f9cd98b544e4
[ "Apache-2.0" ]
null
null
null
src/environment_provider/splitter/__init__.py
andjoe-axis/etos-environment-provider
e95f3e67a22ee08382265ea55070f9cd98b544e4
[ "Apache-2.0" ]
15
2020-09-28T12:01:46.000Z
2022-03-11T11:38:04.000Z
src/environment_provider/splitter/__init__.py
t-persson/etos-environment-provider
bf01dc2fe8f989bfc5c97dd543a15a15f0383540
[ "Apache-2.0" ]
4
2020-09-25T11:16:20.000Z
2021-02-03T12:21:36.000Z
# Copyright 2020 Axis Communications AB. # # For a full list of individual contributors, please see the commit history. # # 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.apac...
42.058824
76
0.765035
true
true
f764bfa4757fe7c1bdbeaf3d570814cf2e2ab9c1
5,705
py
Python
temboo/core/Library/Yahoo/Finance/GetStockQuote.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/Yahoo/Finance/GetStockQuote.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/Yahoo/Finance/GetStockQuote.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
# -*- coding: utf-8 -*- ############################################################################### # # GetStockQuote # Retrieves information for the specified stock symbol from Yahoo Finance. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the ...
39.895105
176
0.65872
from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class GetStockQuote(Choreography): def __init__(self, temboo_session): super(GetStockQuot...
true
true
f764c135f0a27304938a1dd8bf49196f816f7763
452
py
Python
order/migrations/0007_auto_20110101_0009.py
Njaya2019/Store
a5f5b3df935d35c7d874b41bffb57069239dcdfd
[ "MIT" ]
null
null
null
order/migrations/0007_auto_20110101_0009.py
Njaya2019/Store
a5f5b3df935d35c7d874b41bffb57069239dcdfd
[ "MIT" ]
null
null
null
order/migrations/0007_auto_20110101_0009.py
Njaya2019/Store
a5f5b3df935d35c7d874b41bffb57069239dcdfd
[ "MIT" ]
null
null
null
# Generated by Django 3.1.6 on 2010-12-31 21:09 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('order', '0006_auto_20210302_1708'), ] operations = [ migrations.AlterField( model_name='orders', nam...
22.6
96
0.619469
import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('order', '0006_auto_20210302_1708'), ] operations = [ migrations.AlterField( model_name='orders', name='date_ordered', field=models.DateT...
true
true
f764c17c2e33a44a7c94028d2e191b1722c3c319
28,338
py
Python
sdk/python/pulumi_azure/devtest/global_vm_shutdown_schedule.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
109
2018-06-18T00:19:44.000Z
2022-02-20T05:32:57.000Z
sdk/python/pulumi_azure/devtest/global_vm_shutdown_schedule.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
663
2018-06-18T21:08:46.000Z
2022-03-31T20:10:11.000Z
sdk/python/pulumi_azure/devtest/global_vm_shutdown_schedule.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
41
2018-07-19T22:37:38.000Z
2022-03-14T10:56:26.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
50.876122
242
0.671325
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * __all__ = ['GlobalVMShutdownScheduleArgs', 'GlobalVMShutdownSchedule'] @pulumi.input_type class GlobalVMShutdownScheduleArgs:...
true
true
f764c18f8843cd4e2d106d4c5bd85ba67f337b00
6,406
py
Python
python_modules/libraries/lakehouse/lakehouse_tests/test_decorators.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
2
2021-06-21T17:50:26.000Z
2021-06-21T19:14:23.000Z
python_modules/libraries/lakehouse/lakehouse_tests/test_decorators.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
7
2022-03-16T06:55:04.000Z
2022-03-18T07:03:25.000Z
python_modules/libraries/lakehouse/lakehouse_tests/test_decorators.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
1
2021-09-26T07:29:17.000Z
2021-09-26T07:29:17.000Z
from lakehouse import Column, computed_asset, computed_table, source_asset, source_table def test_computed_asset_no_deps(): @computed_asset(storage_key="filesystem") def casset() -> str: return "a" assert casset.computation assert casset.path == ("casset",) assert casset.computation.outpu...
35.988764
98
0.689354
from lakehouse import Column, computed_asset, computed_table, source_asset, source_table def test_computed_asset_no_deps(): @computed_asset(storage_key="filesystem") def casset() -> str: return "a" assert casset.computation assert casset.path == ("casset",) assert casset.computation.outpu...
true
true
f764c2478919a8286499ceb1eb49f0eb0f9894f5
143,710
py
Python
core/domain/state_domain.py
hardikkat24/oppia
c194b58bae8a1acdb6af1d123b0e1c9d7cca5fac
[ "Apache-2.0" ]
null
null
null
core/domain/state_domain.py
hardikkat24/oppia
c194b58bae8a1acdb6af1d123b0e1c9d7cca5fac
[ "Apache-2.0" ]
null
null
null
core/domain/state_domain.py
hardikkat24/oppia
c194b58bae8a1acdb6af1d123b0e1c9d7cca5fac
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
42.05736
80
0.612678
from __future__ import absolute_import from __future__ import unicode_literals import collections import copy import itertools import logging import re import android_validation_constants from constants import constants from core.domain import customization_args_util from core.domain import html_cleaner from core...
true
true
f764c29613be37f9c0092117b0d1d763a8b677da
8,180
py
Python
networkx/algorithms/connectivity/tests/test_kcomponents.py
Dosenpfand/networkx
77eb43b8f03fe8afdfdce94a88bc65d7c904b398
[ "BSD-3-Clause" ]
null
null
null
networkx/algorithms/connectivity/tests/test_kcomponents.py
Dosenpfand/networkx
77eb43b8f03fe8afdfdce94a88bc65d7c904b398
[ "BSD-3-Clause" ]
null
null
null
networkx/algorithms/connectivity/tests/test_kcomponents.py
Dosenpfand/networkx
77eb43b8f03fe8afdfdce94a88bc65d7c904b398
[ "BSD-3-Clause" ]
1
2019-01-30T17:57:36.000Z
2019-01-30T17:57:36.000Z
# Test for Moody and White k-components algorithm from nose.tools import assert_equal, assert_true, raises, assert_greater_equal import networkx as nx from networkx.algorithms.connectivity.kcomponents import ( build_k_number_dict, _consolidate, ) ## ## A nice synthetic graph ## def torrents_and_ferraro_graph()...
32.983871
89
0.547555
from nose.tools import assert_equal, assert_true, raises, assert_greater_equal import networkx as nx from networkx.algorithms.connectivity.kcomponents import ( build_k_number_dict, _consolidate, ) def torrents_and_ferraro_graph(): G = nx.convert_node_labels_to_integers( nx.grid_graph([5, 5]), ...
true
true
f764c3a55073f608e853d829375bb9bb26289ba7
1,189
py
Python
num/wave.py
milankl/misc
40c74d927e6d18b44a6edb51bffda85cafb347e1
[ "Apache-2.0" ]
1
2018-05-04T11:43:34.000Z
2018-05-04T11:43:34.000Z
num/wave.py
milankl/misc
40c74d927e6d18b44a6edb51bffda85cafb347e1
[ "Apache-2.0" ]
null
null
null
num/wave.py
milankl/misc
40c74d927e6d18b44a6edb51bffda85cafb347e1
[ "Apache-2.0" ]
1
2018-05-04T11:43:47.000Z
2018-05-04T11:43:47.000Z
## WAVE EQUATION import numpy as np import matplotlib.pyplot as plt import pylan as pn ## constants and grid H = 10 L = 1e5 g = 9.8 F = 0.01/1e3/H #tau/rho0/H dx = 5e3 dt = 300 cfl = np.sqrt(g*H)*dt/dx print('cfl = %1.3f' % cfl) T = 48*3600 N = int(T/dt)+1 ## staggered grid xu = np.arange(0,L+dx,dx) xe = xu[:-1]+...
17.231884
72
0.60471
import numpy as np import matplotlib.pyplot as plt import pylan as pn H = 10 L = 1e5 g = 9.8 F = 0.01/1e3/H dx = 5e3 dt = 300 cfl = np.sqrt(g*H)*dt/dx print('cfl = %1.3f' % cfl) T = 48*3600 N = int(T/dt)+1 xu = np.arange(0,L+dx,dx) xe = xu[:-1]+dx/2 nxu = xu.shape[0] - 2 nxe = xe.shape[0] t = np.arange(0,T+dt,d...
true
true
f764c4befbb7736f21934e66dcd14faaa1aa61a1
108
py
Python
virtual/lib/python3.6/site-packages/plotly/offline/_plotlyjs_version.py
jameskomo/coffee-data-visualization
6b0812c8791c9cbcb264bafae0cf1d02a6ea30b8
[ "MIT" ]
null
null
null
virtual/lib/python3.6/site-packages/plotly/offline/_plotlyjs_version.py
jameskomo/coffee-data-visualization
6b0812c8791c9cbcb264bafae0cf1d02a6ea30b8
[ "MIT" ]
null
null
null
virtual/lib/python3.6/site-packages/plotly/offline/_plotlyjs_version.py
jameskomo/coffee-data-visualization
6b0812c8791c9cbcb264bafae0cf1d02a6ea30b8
[ "MIT" ]
null
null
null
# DO NOT EDIT # This file is generated by the updatebundle setup.py command __plotlyjs_version__ = "1.49.1"
27
61
0.768519
__plotlyjs_version__ = "1.49.1"
true
true
f764c4dc79de0e5d8864224efc77b814a3cb2eae
1,328
py
Python
apps/utils/email_send.py
custertian/DjangoLMS
ead0edc61402d9e6bede5caa0669ff4854b5c1d7
[ "Apache-2.0" ]
null
null
null
apps/utils/email_send.py
custertian/DjangoLMS
ead0edc61402d9e6bede5caa0669ff4854b5c1d7
[ "Apache-2.0" ]
null
null
null
apps/utils/email_send.py
custertian/DjangoLMS
ead0edc61402d9e6bede5caa0669ff4854b5c1d7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'custer' __date__ = '2017/7/27 11:41' from random import Random from django.core.mail import send_mail from users.models import EmailVerifyRecord from MxOnline.settings import EMAIL_FROM def random_str(randomlength=8): str = '' chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqR...
30.181818
83
0.670181
__author__ = 'custer' __date__ = '2017/7/27 11:41' from random import Random from django.core.mail import send_mail from users.models import EmailVerifyRecord from MxOnline.settings import EMAIL_FROM def random_str(randomlength=8): str = '' chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456...
true
true
f764c4e63de11cb84a3bc5689f7f38266650f007
61,258
py
Python
autotest/gdrivers/grib.py
juloaiza/gdal-mrr
9a42aa773d56cd82d610bef252322122921c066a
[ "MIT" ]
null
null
null
autotest/gdrivers/grib.py
juloaiza/gdal-mrr
9a42aa773d56cd82d610bef252322122921c066a
[ "MIT" ]
null
null
null
autotest/gdrivers/grib.py
juloaiza/gdal-mrr
9a42aa773d56cd82d610bef252322122921c066a
[ "MIT" ]
1
2021-04-26T14:47:38.000Z
2021-04-26T14:47:38.000Z
#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test GRIB driver. # Author: Frank Warmerdam <warmerdam@pobox.com> # #######################################################################...
49.124298
596
0.619837
import os import struct import shutil from osgeo import gdal from osgeo import osr import pytest import gdaltest pytestmark = pytest.mark.require_driver('GRIB') def has_jp2kdrv(): for i in range(gdal.GetDriverCount()): if gdal.GetDriver(i).ShortName.startswith('JP2'): return True retur...
true
true
f764c4ffa1731b3a87a1c29f9144cf765dbc765c
250
py
Python
src/oci_cli/cli.py
rosalexander/oci-cli
2ab654c639a50431903dd6b81b0143fb602b0864
[ "Apache-2.0" ]
null
null
null
src/oci_cli/cli.py
rosalexander/oci-cli
2ab654c639a50431903dd6b81b0143fb602b0864
[ "Apache-2.0" ]
null
null
null
src/oci_cli/cli.py
rosalexander/oci-cli
2ab654c639a50431903dd6b81b0143fb602b0864
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. from .cli_root import cli from . import final_command_processor # noqa: F401 from . import cli_setup # noqa: F401 if __name__ == '__main__': cli()
25
78
0.716
from .cli_root import cli from . import final_command_processor from . import cli_setup if __name__ == '__main__': cli()
true
true
f764c5a748d22f741c2af5bb5999b6429dc0b14c
456
py
Python
Medium/Jump Game III.py
Koushik-Deb/LeetCode
de2e3f6222f89d42ef716076b4846173d01f69a2
[ "MIT" ]
null
null
null
Medium/Jump Game III.py
Koushik-Deb/LeetCode
de2e3f6222f89d42ef716076b4846173d01f69a2
[ "MIT" ]
null
null
null
Medium/Jump Game III.py
Koushik-Deb/LeetCode
de2e3f6222f89d42ef716076b4846173d01f69a2
[ "MIT" ]
3
2021-07-29T14:06:48.000Z
2021-07-29T16:54:13.000Z
class Solution: def canReach(self, arr: List[int], start: int) -> bool: q = [start] n = len(arr) while q: node = q.pop() if arr[node] == 0: return True if arr[node] < 0: continue for i in [node + arr[node], nod...
24
59
0.39693
class Solution: def canReach(self, arr: List[int], start: int) -> bool: q = [start] n = len(arr) while q: node = q.pop() if arr[node] == 0: return True if arr[node] < 0: continue for i in [node + arr[node], nod...
true
true
f764c5bb0f0402f1defa39993f0143f39edc23cc
1,182
py
Python
parlai/chat_service/services/messenger/worlds.py
takatoy/ParlAI
58aa4e0bf068b6bdd28b705da22b7a0269e32714
[ "MIT" ]
12
2020-03-30T02:56:25.000Z
2021-09-10T05:42:55.000Z
parlai/chat_service/services/messenger/worlds.py
takatoy/ParlAI
58aa4e0bf068b6bdd28b705da22b7a0269e32714
[ "MIT" ]
3
2020-04-18T02:14:24.000Z
2020-06-21T06:48:57.000Z
parlai/chat_service/services/messenger/worlds.py
takatoy/ParlAI
58aa4e0bf068b6bdd28b705da22b7a0269e32714
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # 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. from parlai.core.worlds import World # ----- Baseline overworld that simply defers to the default world ----- # class ...
23.64
78
0.667513
from parlai.core.worlds import World class SimpleMessengerOverworld(World): def __init__(self, opt, agent): self.agent = agent self.opt = opt def return_overworld(self): pass @staticmethod def generate_world(opt, agents): return SimpleMessengerOverworld(opt, agents...
true
true
f764c5e93286295c3c18cb18321aedfd8cf39f3b
2,356
py
Python
bindings/python/setup.py
songwanguw/tokenizers
fd316bdc61d7a7f3cec0ced2154baace81620c1f
[ "Apache-2.0" ]
null
null
null
bindings/python/setup.py
songwanguw/tokenizers
fd316bdc61d7a7f3cec0ced2154baace81620c1f
[ "Apache-2.0" ]
null
null
null
bindings/python/setup.py
songwanguw/tokenizers
fd316bdc61d7a7f3cec0ced2154baace81620c1f
[ "Apache-2.0" ]
null
null
null
from setuptools import setup from setuptools_rust import Binding, RustExtension extras = {} extras["testing"] = ["pytest", "requests", "numpy", "datasets"] extras["docs"] = ["sphinx", "sphinx_rtd_theme", "setuptools_rust"] setup( name="tokenizers", version="0.10.3", description="Fast and Customizable Toke...
39.266667
96
0.631579
from setuptools import setup from setuptools_rust import Binding, RustExtension extras = {} extras["testing"] = ["pytest", "requests", "numpy", "datasets"] extras["docs"] = ["sphinx", "sphinx_rtd_theme", "setuptools_rust"] setup( name="tokenizers", version="0.10.3", description="Fast and Customizable Toke...
true
true
f764c614476e48560340d5df850a30654be3c29d
948
py
Python
apc_state_machine/state_machine/scripts/chooseWhereToGoState.py
Juxi/apb-baseline
fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce
[ "BSD-3-Clause" ]
9
2017-02-06T10:24:56.000Z
2022-02-27T20:59:52.000Z
apc_state_machine/state_machine/scripts/chooseWhereToGoState.py
Juxi/apb-baseline
fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce
[ "BSD-3-Clause" ]
null
null
null
apc_state_machine/state_machine/scripts/chooseWhereToGoState.py
Juxi/apb-baseline
fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce
[ "BSD-3-Clause" ]
2
2017-10-15T08:33:37.000Z
2019-03-05T07:29:38.000Z
import rospy import smach import smach_ros import threading from operator import itemgetter import numpy as np from apc_msgs.srv import DetectObject2D from apc_msgs.srv import DetectObject2DRequest from geometry_msgs.msg import Pose, Point, Quaternion # ========================================================== class...
32.689655
86
0.589662
import rospy import smach import smach_ros import threading from operator import itemgetter import numpy as np from apc_msgs.srv import DetectObject2D from apc_msgs.srv import DetectObject2DRequest from geometry_msgs.msg import Pose, Point, Quaternion class ChooseWhereToGoState(smach.State): def __init__(self): ...
true
true
f764c69de7d44fc08bb7170e199db641e8e4897e
3,003
py
Python
scripts/GIS/hourlyShapefile.py
akrherz/weppwebsite
f5663b0ad9c5c05c3af5a37b0432e8d6b089351f
[ "MIT" ]
1
2019-03-06T23:52:01.000Z
2019-03-06T23:52:01.000Z
scripts/GIS/hourlyShapefile.py
akrherz/weppwebsite
f5663b0ad9c5c05c3af5a37b0432e8d6b089351f
[ "MIT" ]
2
2017-05-02T16:12:48.000Z
2020-06-25T01:46:19.000Z
scripts/GIS/hourlyShapefile.py
akrherz/weppwebsite
f5663b0ad9c5c05c3af5a37b0432e8d6b089351f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Need to generate a shapefile with hourly rainfall totals in it! # Daryl Herzmann 28 May 2004 import pg, shapelib, dbflib, re, mx.DateTime, sys from Scientific.IO.ArrayIO import * mydb = pg.connect("wepp", 'iemdb') y = int(sys.argv[1]) m = int(sys.argv[2]) d = int(sys.argv[3]) day = mx.DateTime...
30.03
98
0.666667
import pg, shapelib, dbflib, re, mx.DateTime, sys from Scientific.IO.ArrayIO import * mydb = pg.connect("wepp", 'iemdb') y = int(sys.argv[1]) m = int(sys.argv[2]) d = int(sys.argv[3]) day = mx.DateTime.DateTime(y, m, d) fname = day.strftime("%Y%m%d") hrap_shapes = {} hrain = {} rs = mydb.query("SELECT transform(the_...
true
true
f764c6c209bbb819b72218f566af8bb5c01ecea9
502
py
Python
create_database.py
ramonpaolo/api-b3
5ed279d8914e40fc58026712a660b0160643a3cb
[ "MIT" ]
9
2021-04-24T22:47:47.000Z
2022-02-24T12:05:44.000Z
create_database.py
ramonpaolo/api-b3
5ed279d8914e40fc58026712a660b0160643a3cb
[ "MIT" ]
null
null
null
create_database.py
ramonpaolo/api-b3
5ed279d8914e40fc58026712a660b0160643a3cb
[ "MIT" ]
2
2021-06-26T02:34:50.000Z
2021-07-27T02:38:46.000Z
import sqlite3 from connections_db.connections_cryptocurrencies import ConnectionDBCryptoCurrencies dbTickers = sqlite3.connect("database/tickers.db") dbTickers.execute("create table dataStock(nome text, logo text, info text, ticker text, dy number, precoMinimoCotaEmUmAno number, precoMaximoCotaEmUmAno number, dividen...
62.75
285
0.846614
import sqlite3 from connections_db.connections_cryptocurrencies import ConnectionDBCryptoCurrencies dbTickers = sqlite3.connect("database/tickers.db") dbTickers.execute("create table dataStock(nome text, logo text, info text, ticker text, dy number, precoMinimoCotaEmUmAno number, precoMaximoCotaEmUmAno number, dividen...
true
true
f764c75fa055cfaaeee5ef43f8c816ad22dfd52c
7,026
py
Python
models/cnn_model.py
GiorgosNikitopoulos/Mine_Vulnerable_Code
e8770698b501a3681b1cf1a978a4cc409d359b3c
[ "MIT" ]
null
null
null
models/cnn_model.py
GiorgosNikitopoulos/Mine_Vulnerable_Code
e8770698b501a3681b1cf1a978a4cc409d359b3c
[ "MIT" ]
1
2021-12-13T20:51:43.000Z
2021-12-13T20:51:43.000Z
models/cnn_model.py
GiorgosNikitopoulos/Mine_Vulnerable_Code
e8770698b501a3681b1cf1a978a4cc409d359b3c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ CNN model for text classification implemented in TensorFlow 2. This implementation is based on the original paper of Yoon Kim [1] for classification using words. Besides I add charachter level input [2]. # References - [1] [Convolutional Neural Networks for Sentence Classification](https://...
43.639752
120
0.637916
import tensorflow as tf from tensorflow.keras import layers class CNN(tf.keras.Model): __version__ = '0.2.0' def __init__(self, embedding_layer=None, num_words=None, embedding_dim=None, max_seq_length=100, kernel_sizes=[3, 4, 5], feature_maps=[100, 100, 100], use_char=False...
true
true
f764c79ece296625e7a00b5e0b431fb02082004a
3,053
py
Python
validator/gossip/token_bucket.py
jrineck/sawtooth-core
e3eb79f32c97a25993c87eda7f77a02fd2086c7c
[ "Apache-2.0" ]
null
null
null
validator/gossip/token_bucket.py
jrineck/sawtooth-core
e3eb79f32c97a25993c87eda7f77a02fd2086c7c
[ "Apache-2.0" ]
null
null
null
validator/gossip/token_bucket.py
jrineck/sawtooth-core
e3eb79f32c97a25993c87eda7f77a02fd2086c7c
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
33.549451
80
0.624632
import logging import time logger = logging.getLogger(__name__) class TokenBucket(object): DefaultDripRate = 32000 DefaultCapacity = DefaultDripRate * 2 def __init__(self, rate=None, capacity=None): self.DripRate = rate or self.DefaultDripRate self.Capacity = capacity or self.DefaultCa...
true
true
f764c8290579652c80007e864c92af6e375f39da
395
py
Python
dailyfresh/df_goods/admin.py
myworldhere/dailyfresh
5c4e78095a08442feacce7038818f9978e1e0880
[ "MIT" ]
null
null
null
dailyfresh/df_goods/admin.py
myworldhere/dailyfresh
5c4e78095a08442feacce7038818f9978e1e0880
[ "MIT" ]
null
null
null
dailyfresh/df_goods/admin.py
myworldhere/dailyfresh
5c4e78095a08442feacce7038818f9978e1e0880
[ "MIT" ]
null
null
null
from django.contrib import admin from models import * # Register your models here. class CategoryAdmin(admin.ModelAdmin): list_display = ['id', 'title'] class GoodsInfoAdmin(admin.ModelAdmin): list_display = ['id', 'title', 'price', 'unit', 'click', 'inventory', 'detail', 'desc', 'image'] admin.site.regis...
26.333333
100
0.726582
from django.contrib import admin from models import * class CategoryAdmin(admin.ModelAdmin): list_display = ['id', 'title'] class GoodsInfoAdmin(admin.ModelAdmin): list_display = ['id', 'title', 'price', 'unit', 'click', 'inventory', 'detail', 'desc', 'image'] admin.site.register(Category, CategoryAdmin) ...
true
true
f764c830a012ff169f765e7ce5cc58f3e2410f2d
8,618
py
Python
src/awkward/_v2/forms/form.py
scikit-hep/awkward-1.0
a440328f8097d22c2ba053fd117fed543829afc0
[ "BSD-3-Clause" ]
519
2019-10-17T12:36:22.000Z
2022-03-26T23:28:19.000Z
src/awkward/_v2/forms/form.py
scikit-hep/awkward-1.0
a440328f8097d22c2ba053fd117fed543829afc0
[ "BSD-3-Clause" ]
924
2019-11-03T21:05:01.000Z
2022-03-31T22:44:30.000Z
src/awkward/_v2/forms/form.py
scikit-hep/awkward-1.0
a440328f8097d22c2ba053fd117fed543829afc0
[ "BSD-3-Clause" ]
56
2019-12-17T15:49:22.000Z
2022-03-09T20:34:06.000Z
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE from __future__ import absolute_import import json import awkward as ak np = ak.nplike.NumpyMetadata.instance() def from_iter(input): if input is None: return None if ak._util.isstr(input): return ak._...
30.452297
87
0.579833
from __future__ import absolute_import import json import awkward as ak np = ak.nplike.NumpyMetadata.instance() def from_iter(input): if input is None: return None if ak._util.isstr(input): return ak._v2.forms.numpyform.NumpyForm(primitive=input) assert isinstance(input, dict) ha...
true
true
f764c8516a19f1ed0e3d488c1c92d9197de61034
444
py
Python
bundles/sysctl/items.py
bborbe/bw
a89441855431f759b8466b1864c3679f86e522f5
[ "BSD-2-Clause" ]
1
2020-02-01T17:22:55.000Z
2020-02-01T17:22:55.000Z
bundles/sysctl/items.py
bborbe/bw
a89441855431f759b8466b1864c3679f86e522f5
[ "BSD-2-Clause" ]
null
null
null
bundles/sysctl/items.py
bborbe/bw
a89441855431f759b8466b1864c3679f86e522f5
[ "BSD-2-Clause" ]
null
null
null
if node.os != 'ubuntu' and node.os != 'raspbian': raise Exception('{} {} is not supported by this bundle'.format(node.os, node.os_version)) svc_systemd = {} files = {} svc_systemd['systemd-sysctl'] = { 'running': True, 'enabled': True, } files['/etc/sysctl.d/60-custom.conf'] = { 'content_type': 'mak...
22.2
93
0.601351
if node.os != 'ubuntu' and node.os != 'raspbian': raise Exception('{} {} is not supported by this bundle'.format(node.os, node.os_version)) svc_systemd = {} files = {} svc_systemd['systemd-sysctl'] = { 'running': True, 'enabled': True, } files['/etc/sysctl.d/60-custom.conf'] = { 'content_type': 'mak...
true
true
f764c904c7cdf7bf1b9ac992c8dd60e41371b610
1,057
py
Python
Community/bulk_register_ip_address/__init__.py
hungtranusa/gateway-workflows
379a5d323818befcfe5d2764f93db5b41b9b9884
[ "Apache-2.0" ]
null
null
null
Community/bulk_register_ip_address/__init__.py
hungtranusa/gateway-workflows
379a5d323818befcfe5d2764f93db5b41b9b9884
[ "Apache-2.0" ]
null
null
null
Community/bulk_register_ip_address/__init__.py
hungtranusa/gateway-workflows
379a5d323818befcfe5d2764f93db5b41b9b9884
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 BlueCat Networks (USA) Inc. and its affiliates # -*- coding: utf-8 -*- # # 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 # # Unle...
35.233333
85
0.709555
type = 'ui' sub_pages = [ { 'name' : 'bulk_register_ip_address_page', 'title' : "Bulk IP Address Registration", 'endpoint' : 'bulk_register_ip_address/bulk_register_ip_address_endpoint', 'description' : "Bulk IP Address Registration from CSV File." }, ]
true
true
f764c92c11e0bfac26fdce782287138a5676a68c
763
py
Python
configs/beit/upernet_beit-base_640x640_160k_ade20k_ms.py
rehohoho/mmsegmentation
a73ae7a421e07741fda62c9d81b335cbc4b7f7d6
[ "Apache-2.0" ]
1
2022-03-07T19:46:03.000Z
2022-03-07T19:46:03.000Z
configs/beit/upernet_beit-base_640x640_160k_ade20k_ms.py
rehohoho/mmsegmentation
a73ae7a421e07741fda62c9d81b335cbc4b7f7d6
[ "Apache-2.0" ]
2
2022-02-25T03:07:23.000Z
2022-03-08T12:54:05.000Z
configs/beit/upernet_beit-base_640x640_160k_ade20k_ms.py
rehohoho/mmsegmentation
a73ae7a421e07741fda62c9d81b335cbc4b7f7d6
[ "Apache-2.0" ]
1
2022-02-14T09:44:41.000Z
2022-02-14T09:44:41.000Z
_base_ = './upernet_beit-base_8x2_640x640_160k_ade20k.py' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) test_pipeline = [ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(2560, 640), img_ratios=[0.5, 0.75, 1...
30.52
77
0.589777
_base_ = './upernet_beit-base_8x2_640x640_160k_ade20k.py' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) test_pipeline = [ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(2560, 640), img_ratios=[0.5, 0.75, 1...
true
true
f764ca99341f6b0b7704e6fcd04f5c7775902a82
4,277
py
Python
heltour/tournament/slackapi.py
colwem/heltour
e6666f864e588b64ade337590f305ac4d796e929
[ "MIT" ]
1
2019-02-13T01:39:18.000Z
2019-02-13T01:39:18.000Z
heltour/tournament/slackapi.py
colwem/heltour
e6666f864e588b64ade337590f305ac4d796e929
[ "MIT" ]
8
2019-06-17T15:03:56.000Z
2019-07-14T00:29:28.000Z
heltour/tournament/slackapi.py
colwem/heltour
e6666f864e588b64ade337590f305ac4d796e929
[ "MIT" ]
null
null
null
import requests from heltour import settings from collections import namedtuple import logging logger = logging.getLogger(__name__) def _get_slack_token(): with open(settings.SLACK_API_TOKEN_FILE_PATH) as fin: return fin.read().strip() def _get_slack_webhook(): try: with open(settings.SLACK_W...
34.216
187
0.617723
import requests from heltour import settings from collections import namedtuple import logging logger = logging.getLogger(__name__) def _get_slack_token(): with open(settings.SLACK_API_TOKEN_FILE_PATH) as fin: return fin.read().strip() def _get_slack_webhook(): try: with open(settings.SLACK_W...
true
true
f764cae6280cae9b878c94cb909e34627dcbde79
724
py
Python
exercises/simplify-conditionals/mix_ice_cream.py
xilaluna/ACS-4931-Testing-and-Architecture
523d09cf56c2aa7d169689903056c7c72bd5a354
[ "MIT" ]
null
null
null
exercises/simplify-conditionals/mix_ice_cream.py
xilaluna/ACS-4931-Testing-and-Architecture
523d09cf56c2aa7d169689903056c7c72bd5a354
[ "MIT" ]
null
null
null
exercises/simplify-conditionals/mix_ice_cream.py
xilaluna/ACS-4931-Testing-and-Architecture
523d09cf56c2aa7d169689903056c7c72bd5a354
[ "MIT" ]
null
null
null
# by Kami Bigdely # Consolidate duplicate conditional fragments def add(mix, ingrediants): mix.append(ingrediants) return mix def mixer_ice_with_cream(): print('mixed ice with cream.') return ['ice', 'cream'] def if_milkskake(drink): return 'strawberry milkshake' in drink def if_coffee(drink)...
19.567568
67
0.651934
def add(mix, ingrediants): mix.append(ingrediants) return mix def mixer_ice_with_cream(): print('mixed ice with cream.') return ['ice', 'cream'] def if_milkskake(drink): return 'strawberry milkshake' in drink def if_coffee(drink): return 'coffee' in drink def make_drink(drink, addons): ...
true
true
f764cc55c43f1f4429e5b5bf497f054dc2273fcf
2,632
py
Python
neutronclient/tests/unit/qos/test_cli20_qos.py
teresa-ho/stx-python-neutronclient
35ea6c2c96cbf98755a82cb7c19138648552b778
[ "Apache-2.0" ]
null
null
null
neutronclient/tests/unit/qos/test_cli20_qos.py
teresa-ho/stx-python-neutronclient
35ea6c2c96cbf98755a82cb7c19138648552b778
[ "Apache-2.0" ]
null
null
null
neutronclient/tests/unit/qos/test_cli20_qos.py
teresa-ho/stx-python-neutronclient
35ea6c2c96cbf98755a82cb7c19138648552b778
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack Foundation. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
36.555556
79
0.612082
import sys from mox3 import mox from neutronclient.neutron.v2_0.qos import qos from neutronclient.tests.unit import test_cli20 class CLITestV20QoSJson(test_cli20.CLITestV20Base): def setUp(self): super(CLITestV20QoSJson, self).setUp(plurals={'qoses': 'qos'}) def _test_create_qos_with_params(s...
true
true
f764cc5cfe52c01ce8b6dbdadd50cd8dedad13ee
1,012
py
Python
detection/convert-pretrain-to-detectron2.py
dczifra/TWIST
3b5461c33e7c3a83ae1028e0c4ba71b74be787f6
[ "Apache-2.0" ]
30
2021-10-23T01:27:56.000Z
2022-03-26T20:22:35.000Z
detection/convert-pretrain-to-detectron2.py
dczifra/TWIST
3b5461c33e7c3a83ae1028e0c4ba71b74be787f6
[ "Apache-2.0" ]
2
2021-11-26T08:43:14.000Z
2022-03-16T11:38:12.000Z
detection/convert-pretrain-to-detectron2.py
dczifra/TWIST
3b5461c33e7c3a83ae1028e0c4ba71b74be787f6
[ "Apache-2.0" ]
6
2021-11-15T01:18:14.000Z
2022-02-08T19:16:28.000Z
#!/usr/bin/env python import pickle as pkl import sys import torch from lars import * if __name__ == "__main__": input = sys.argv[1] obj = torch.load(input, map_location="cpu") if 'backbone' in obj: obj = obj["backbone"] elif 'state_dict' in obj: obj = obj["state_dict"] newmodel ...
25.3
69
0.51581
import pickle as pkl import sys import torch from lars import * if __name__ == "__main__": input = sys.argv[1] obj = torch.load(input, map_location="cpu") if 'backbone' in obj: obj = obj["backbone"] elif 'state_dict' in obj: obj = obj["state_dict"] newmodel = {} for k, v in o...
true
true
f764ce045ce472c4771042948830f68b72d429b4
13,711
py
Python
custom_components/opencwb/core/commons/location_tw.py
bluefoxlee/OpenCWB
95f899247f1c0ff71d47973311016f31b4b4f0ad
[ "MIT" ]
null
null
null
custom_components/opencwb/core/commons/location_tw.py
bluefoxlee/OpenCWB
95f899247f1c0ff71d47973311016f31b4b4f0ad
[ "MIT" ]
null
null
null
custom_components/opencwb/core/commons/location_tw.py
bluefoxlee/OpenCWB
95f899247f1c0ff71d47973311016f31b4b4f0ad
[ "MIT" ]
null
null
null
""" The location id and name of Taiwan in Opendata CWB """ LOCATIONS = { # Taiwan "F-D0047-091": ["%E5%AE%9C%E8%98%AD%E7%B8%A3","%E8%8A%B1%E8%93%AE%E7%B8%A3","%E8%87%BA%E6%9D%B1%E7%B8%A3","%E6%BE%8E%E6%B9%96%E7%B8%A3","%E9%87%91%E9%96%80%E7%B8%A3","%E9%80%A3%E6%B1%9F%E7%B8%A3","%E8%87%BA%E5%8C%97%E5%B8%82","%E6...
268.843137
1,185
0.601342
LOCATIONS = { "F-D0047-091": ["%E5%AE%9C%E8%98%AD%E7%B8%A3","%E8%8A%B1%E8%93%AE%E7%B8%A3","%E8%87%BA%E6%9D%B1%E7%B8%A3","%E6%BE%8E%E6%B9%96%E7%B8%A3","%E9%87%91%E9%96%80%E7%B8%A3","%E9%80%A3%E6%B1%9F%E7%B8%A3","%E8%87%BA%E5%8C%97%E5%B8%82","%E6%96%B0%E5%8C%97%E5%B8%82","%E6%A1%83%E5%9C%92%E5%B8%82","%E8%87%BA%E...
true
true
f764ced3c56a7161a1dd5778ee935c9e98c17c56
816
py
Python
python-algorithm/leetcode/problem_419.py
isudox/leetcode-solution
60085e64deaf396a171367affc94b18114565c43
[ "MIT" ]
5
2017-06-11T09:19:34.000Z
2019-01-16T16:58:31.000Z
python-algorithm/leetcode/problem_419.py
isudox/leetcode-solution
60085e64deaf396a171367affc94b18114565c43
[ "MIT" ]
null
null
null
python-algorithm/leetcode/problem_419.py
isudox/leetcode-solution
60085e64deaf396a171367affc94b18114565c43
[ "MIT" ]
1
2019-03-02T15:50:43.000Z
2019-03-02T15:50:43.000Z
"""419. Battleships in a Board https://leetcode.com/problems/battleships-in-a-board/ """ from typing import List class Solution: def countBattleships(self, board: List[List[str]]) -> int: def helper(r: int, c: int): found = False board[r][c] = '.' for dr, dc in ([0, 1],...
28.137931
72
0.408088
from typing import List class Solution: def countBattleships(self, board: List[List[str]]) -> int: def helper(r: int, c: int): found = False board[r][c] = '.' for dr, dc in ([0, 1], [1, 0]): if found: return nr = r + d...
true
true
f764cfabe796b6e983020eaddba17827e98c354e
37,298
py
Python
src/spl/token/instructions.py
broper2/solana-py
146390d959f017e137238335ee6fa362ad1a1ab4
[ "MIT" ]
477
2020-08-28T08:49:49.000Z
2022-03-30T16:19:03.000Z
src/spl/token/instructions.py
broper2/solana-py
146390d959f017e137238335ee6fa362ad1a1ab4
[ "MIT" ]
195
2020-08-27T11:55:42.000Z
2022-03-31T18:59:55.000Z
src/spl/token/instructions.py
broper2/solana-py
146390d959f017e137238335ee6fa362ad1a1ab4
[ "MIT" ]
143
2020-08-27T03:10:55.000Z
2022-03-30T17:27:35.000Z
"""SPL token instructions.""" from enum import IntEnum from typing import Any, List, NamedTuple, Optional, Union from solana.publickey import PublicKey from solana.system_program import SYS_PROGRAM_ID from solana.sysvar import SYSVAR_RENT_PUBKEY from solana.transaction import AccountMeta, TransactionInstruction from ...
39.343882
119
0.705668
from enum import IntEnum from typing import Any, List, NamedTuple, Optional, Union from solana.publickey import PublicKey from solana.system_program import SYS_PROGRAM_ID from solana.sysvar import SYSVAR_RENT_PUBKEY from solana.transaction import AccountMeta, TransactionInstruction from solana.utils.validate import v...
true
true
f764cfbb4bbe1357bf49fed0657ac469a2c88e3b
1,087
py
Python
app/models.py
osman2491/News-highlights
d98573abb1d241ee123b9af7db8b57efd1ef4794
[ "MIT" ]
null
null
null
app/models.py
osman2491/News-highlights
d98573abb1d241ee123b9af7db8b57efd1ef4794
[ "MIT" ]
null
null
null
app/models.py
osman2491/News-highlights
d98573abb1d241ee123b9af7db8b57efd1ef4794
[ "MIT" ]
2
2019-11-19T05:18:00.000Z
2020-09-15T05:07:29.000Z
class Sources: ''' Source class that defines source objects ''' def __init__(self,id,name,description,url,category,language,country): self.id = id self.name = name self.description = description self.url = url self.category = category self.language = langu...
27.871795
89
0.672493
class Sources: def __init__(self,id,name,description,url,category,language,country): self.id = id self.name = name self.description = description self.url = url self.category = category self.language = language self.country = country class Top_Headlines : d...
true
true
f764d091b3a085d00802ab7f140d23d2ba7a09fd
125
py
Python
0x04-python-more_data_structures/1-search_replace.py
omarcherni007/holbertonschool-higher_level_programming
65f3430ab0310f85368d73cb72e139631e8c6f1e
[ "MIT" ]
1
2022-01-04T11:07:56.000Z
2022-01-04T11:07:56.000Z
0x04-python-more_data_structures/1-search_replace.py
omarcherni007/holbertonschool-higher_level_programming
65f3430ab0310f85368d73cb72e139631e8c6f1e
[ "MIT" ]
null
null
null
0x04-python-more_data_structures/1-search_replace.py
omarcherni007/holbertonschool-higher_level_programming
65f3430ab0310f85368d73cb72e139631e8c6f1e
[ "MIT" ]
null
null
null
#!/usr/bin/python3 def search_replace(my_list, search, replace): return [replace if i == search else i for i in my_list]
31.25
59
0.72
def search_replace(my_list, search, replace): return [replace if i == search else i for i in my_list]
true
true
f764d11996d8f8e22fc0bc7e90d1d1f73a81d784
34,436
py
Python
PROYECTO-01-Rodriguez-Braulio.py
brauliorguez/Proyecto1_BraulioRguez
1ac555217ecdf71e0b2209bed01de80e39b9df66
[ "MIT" ]
null
null
null
PROYECTO-01-Rodriguez-Braulio.py
brauliorguez/Proyecto1_BraulioRguez
1ac555217ecdf71e0b2209bed01de80e39b9df66
[ "MIT" ]
null
null
null
PROYECTO-01-Rodriguez-Braulio.py
brauliorguez/Proyecto1_BraulioRguez
1ac555217ecdf71e0b2209bed01de80e39b9df66
[ "MIT" ]
null
null
null
#Autor: Braulio Arturo Rodriguez Hernandez #Fecha: 07/Septiembre/2021 #importamos las librerias necesarias import json #esta biblioteca la utilizaremos para la gestion de credenciales de los usuarios import lifestore_file as datos #importamos los datos contenidos en el archivo y lo nombramos como datos from pret...
54.229921
380
0.624927
import json import lifestore_file as datos from prettytable import PrettyTable from colorama import init, Fore, Back, Style productos = datos.lifestore_products ventas = datos.lifestore_sales busquedas= datos.lifestore_searches def imprime_tabla(lista_productos, tipo): init(autoreset=True)...
true
true
f764d2d4e91289756d35f9fc7244a0bb921aaa54
122
py
Python
lib/solutions/SUM/sum_solution.py
DPNT-Sourcecode/CHK-yqrr01
1dd3b4fc21ab238204180a3efa78684b5c4e8422
[ "Apache-2.0" ]
null
null
null
lib/solutions/SUM/sum_solution.py
DPNT-Sourcecode/CHK-yqrr01
1dd3b4fc21ab238204180a3efa78684b5c4e8422
[ "Apache-2.0" ]
null
null
null
lib/solutions/SUM/sum_solution.py
DPNT-Sourcecode/CHK-yqrr01
1dd3b4fc21ab238204180a3efa78684b5c4e8422
[ "Apache-2.0" ]
null
null
null
# noinspection PyShadowingBuiltins,PyUnusedLocal def compute(x, y): # raise NotImplementedError() return x + y
15.25
48
0.721311
def compute(x, y): return x + y
true
true
f764d2ff36d245cbecac867460ff493c6bea9237
2,729
py
Python
tests/test_bitmex_websocket.py
sureshkrishiev/alpha-rptr
925ccc736501127352535e8279b4cf9f86b47c96
[ "MIT" ]
200
2020-08-18T10:55:06.000Z
2022-03-29T19:15:48.000Z
tests/test_bitmex_websocket.py
sureshkrishiev/alpha-rptr
925ccc736501127352535e8279b4cf9f86b47c96
[ "MIT" ]
8
2020-08-26T02:03:19.000Z
2022-03-17T20:58:23.000Z
tests/test_bitmex_websocket.py
sureshkrishiev/alpha-rptr
925ccc736501127352535e8279b4cf9f86b47c96
[ "MIT" ]
48
2020-08-18T08:28:33.000Z
2022-03-29T15:57:01.000Z
# coding: UTF-8 import time import unittest from src.bitmex_websocket import BitMexWs class TestBitMexWs(unittest.TestCase): account = "bitmex" pair = "XBTUSD" wait = False def setUp(self): self.wait = True def complete(self): self.wait = False def wait_complete(self): ...
20.992308
59
0.550751
import time import unittest from src.bitmex_websocket import BitMexWs class TestBitMexWs(unittest.TestCase): account = "bitmex" pair = "XBTUSD" wait = False def setUp(self): self.wait = True def complete(self): self.wait = False def wait_complete(self): i = 0 ...
true
true
f764d3a4f86b0231a4c7c6f74870e8b8cfbe843f
8,451
py
Python
src/tests/unit/fixtures/platform/mock_alerts.py
fslds/carbon-black-cloud-sdk-python
248a3c63d6b36d6fcdbcb3f51fb7751f062ed372
[ "MIT" ]
24
2020-10-16T22:07:38.000Z
2022-03-24T14:58:03.000Z
src/tests/unit/fixtures/platform/mock_alerts.py
fslds/carbon-black-cloud-sdk-python
248a3c63d6b36d6fcdbcb3f51fb7751f062ed372
[ "MIT" ]
63
2020-10-26T18:26:15.000Z
2022-03-31T17:31:02.000Z
src/tests/unit/fixtures/platform/mock_alerts.py
fslds/carbon-black-cloud-sdk-python
248a3c63d6b36d6fcdbcb3f51fb7751f062ed372
[ "MIT" ]
10
2020-11-09T11:54:23.000Z
2022-03-24T20:44:00.000Z
"""Mock responses for alert queries.""" GET_ALERT_RESP = { "type": "CB_ANALYTICS", "id": "86123310980efd0b38111eba4bfa5e98aa30b19", "legacy_alert_id": "62802DCE", "org_key": "4JDT3MX9Q", "create_time": "2021-05-13T00:20:46.474Z", "last_update_time": "2021-05-13T00:27:22.846Z", "first_event_...
36.90393
100
0.641699
GET_ALERT_RESP = { "type": "CB_ANALYTICS", "id": "86123310980efd0b38111eba4bfa5e98aa30b19", "legacy_alert_id": "62802DCE", "org_key": "4JDT3MX9Q", "create_time": "2021-05-13T00:20:46.474Z", "last_update_time": "2021-05-13T00:27:22.846Z", "first_event_time": "2021-05-13T00:20:13.043Z", "...
true
true
f764d551da52c331fcfca6c5215056e646180de8
4,619
py
Python
2018/tutorials/neural_data.py
mehrdad-shokri/cs375
00554ac497b4a2608ae475099f94ab9635d67b9e
[ "MIT" ]
32
2017-09-19T21:40:38.000Z
2020-07-26T02:40:23.000Z
2018/tutorials/neural_data.py
mehrdad-shokri/cs375
00554ac497b4a2608ae475099f94ab9635d67b9e
[ "MIT" ]
null
null
null
2018/tutorials/neural_data.py
mehrdad-shokri/cs375
00554ac497b4a2608ae475099f94ab9635d67b9e
[ "MIT" ]
17
2017-10-04T23:43:56.000Z
2019-04-22T16:44:39.000Z
""" Provide a dataset_func which builds a tensorflow dataset object for neural data See below for an example about how to use this function """ import tensorflow as tf from tfutils.imagenet_data import color_normalize import os, sys import numpy as np import pdb import h5py class Generator(object): """ Calla...
34.214815
79
0.56614
import tensorflow as tf from tfutils.imagenet_data import color_normalize import os, sys import numpy as np import pdb import h5py class Generator(object): NUM_IMGS = 5760 def __init__( self, data_path, index_list=None, filter_func=None): assert os.path.isfile(da...
true
true
f764d5863df085c67cf462549442d82ef895d117
653
py
Python
rhasspy_weather/parser/nlu_intent.py
arniebarni/rhasspy_weather
6a9df72adad3e5dafa7962c2be37c824dc04137b
[ "MIT" ]
5
2020-03-29T01:00:30.000Z
2022-02-06T20:00:00.000Z
rhasspy_weather/parser/nlu_intent.py
arniebarni/rhasspy_weather
6a9df72adad3e5dafa7962c2be37c824dc04137b
[ "MIT" ]
12
2020-04-02T15:09:05.000Z
2021-10-11T00:44:21.000Z
rhasspy_weather/parser/nlu_intent.py
arniebarni/rhasspy_weather
6a9df72adad3e5dafa7962c2be37c824dc04137b
[ "MIT" ]
5
2020-03-25T08:33:02.000Z
2021-05-18T08:47:41.000Z
import logging from rhasspy_weather.data_types.request import WeatherRequest from rhasspy_weather.parser import rhasspy_intent from rhasspyhermes.nlu import NluIntent log = logging.getLogger(__name__) def parse_intent_message(intent_message: NluIntent) -> WeatherRequest: """ Parses any of the rhasspy weathe...
26.12
80
0.793262
import logging from rhasspy_weather.data_types.request import WeatherRequest from rhasspy_weather.parser import rhasspy_intent from rhasspyhermes.nlu import NluIntent log = logging.getLogger(__name__) def parse_intent_message(intent_message: NluIntent) -> WeatherRequest: return rhasspy_intent.parse_intent_messa...
true
true
f764d5c9d7839945019b0f2437ceabd4b6cdcd13
9,388
py
Python
models/segmentation/adv_unet_train_val_late/structure.py
neurips2021vat/Variance-Aware-Training
2dcd017ef06e81e299448bdd9da65fa682835127
[ "BSD-2-Clause" ]
null
null
null
models/segmentation/adv_unet_train_val_late/structure.py
neurips2021vat/Variance-Aware-Training
2dcd017ef06e81e299448bdd9da65fa682835127
[ "BSD-2-Clause" ]
null
null
null
models/segmentation/adv_unet_train_val_late/structure.py
neurips2021vat/Variance-Aware-Training
2dcd017ef06e81e299448bdd9da65fa682835127
[ "BSD-2-Clause" ]
null
null
null
import torch import torch.nn as nn from time import time import numpy as np from models.pytorch_revgrad import RevGrad class DoubleConvBN(nn.Module): """(convolution => [BN] => ReLU) * 2""" def __init__(self, in_channels, out_channels, kernel_size, dropout): super().__init__() self.conv1 = n...
31.716216
122
0.568811
import torch import torch.nn as nn from time import time import numpy as np from models.pytorch_revgrad import RevGrad class DoubleConvBN(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, dropout): super().__init__() self.conv1 = nn.Conv2d( in_channels, out_chann...
true
true
f764d6cd423eb3ade745a9948b0b866d812db00a
12,035
py
Python
ecs.py
LearnPythonAndMakeGames/ecs
fbc1bf917d10c7d5addfab9435a98307b58cde5e
[ "Apache-2.0" ]
6
2017-04-10T16:57:40.000Z
2021-06-18T07:36:35.000Z
ecs.py
LearnPythonAndMakeGames/ecs
fbc1bf917d10c7d5addfab9435a98307b58cde5e
[ "Apache-2.0" ]
null
null
null
ecs.py
LearnPythonAndMakeGames/ecs
fbc1bf917d10c7d5addfab9435a98307b58cde5e
[ "Apache-2.0" ]
1
2018-07-13T16:56:32.000Z
2018-07-13T16:56:32.000Z
#!/usr/bin/env python ''' Entity Component System for Python ecs.py provides a convenient library to utilize for the ECS pattern. ''' from collections import OrderedDict as dict import json from uuid import uuid4 import sys __version__ = '0.1.3' __license__ = 'Apache 2.0' __url__ = 'http://learnpythonandmakegames.gi...
32.439353
148
0.583631
from collections import OrderedDict as dict import json from uuid import uuid4 import sys __version__ = '0.1.3' __license__ = 'Apache 2.0' __url__ = 'http://learnpythonandmakegames.github.io/ecs/' __author__ = 'Learn Python and Make Games' class Entity(object): Catalog = {} __slots__ = ('uid', 'name', 'comp...
true
true