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
f7123f12300ced262eeefd582f872e462ce81f9c
7,765
py
Python
heat/engine/resources/openstack/neutron/security_group_rule.py
noironetworks/heat
7cdadf1155f4d94cf8f967635b98e4012a7acfb7
[ "Apache-2.0" ]
265
2015-01-02T09:33:22.000Z
2022-03-26T23:19:54.000Z
heat/engine/resources/openstack/neutron/security_group_rule.py
noironetworks/heat
7cdadf1155f4d94cf8f967635b98e4012a7acfb7
[ "Apache-2.0" ]
8
2015-09-01T15:43:19.000Z
2021-12-14T05:18:23.000Z
heat/engine/resources/openstack/neutron/security_group_rule.py
noironetworks/heat
7cdadf1155f4d94cf8f967635b98e4012a7acfb7
[ "Apache-2.0" ]
295
2015-01-06T07:00:40.000Z
2021-09-06T08:05:06.000Z
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
38.825
79
0.601159
from heat.common import exception from heat.common.i18n import _ from heat.engine import constraints from heat.engine import properties from heat.engine.resources.openstack.neutron import neutron from heat.engine import support from heat.engine import translation class SecurityGroupRule(neutron.NeutronResource): ...
true
true
f71240543196f4b9a6220f776cabb7841625bc38
10,627
py
Python
noxfile.py
FasterSpeeding/Tanjun
7eedeaef3b1c2a5bad221980f99f6d10904e6ae9
[ "BSD-3-Clause" ]
87
2021-01-28T06:46:02.000Z
2022-03-22T03:23:38.000Z
noxfile.py
FasterSpeeding/Tanjun
7eedeaef3b1c2a5bad221980f99f6d10904e6ae9
[ "BSD-3-Clause" ]
54
2020-11-23T12:54:21.000Z
2022-03-31T10:47:24.000Z
noxfile.py
FasterSpeeding/Tanjun
7eedeaef3b1c2a5bad221980f99f6d10904e6ae9
[ "BSD-3-Clause" ]
16
2021-08-07T02:11:15.000Z
2022-03-14T06:15:33.000Z
# -*- coding: utf-8 -*- # cython: language_level=3 # BSD 3-Clause License # # Copyright (c) 2020-2021, Faster Speeding # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of sour...
37.551237
120
0.681848
from __future__ import annotations import pathlib import tempfile import nox nox.options.sessions = ["reformat", "lint", "spell-check", "type-check", "test"] GENERAL_TARGETS = ["./examples", "./noxfile.py", "./tanjun", "./tests"] PYTHON_VERSIONS = ["3.9", "3.10"] def install_requirements(session: nox.Session, *o...
true
true
f71242f9ab918650330ea675fb534cee2bfc7681
752
py
Python
benchmarks/test_jaxga.py
RobinKa/jaxga
6345af6d30e04fc4e96877f2a6ed65f9999ee605
[ "MIT" ]
7
2021-11-02T10:01:52.000Z
2021-12-30T17:33:58.000Z
benchmarks/test_jaxga.py
RobinKa/jaxga
6345af6d30e04fc4e96877f2a6ed65f9999ee605
[ "MIT" ]
2
2021-12-27T18:08:06.000Z
2022-01-08T19:04:31.000Z
benchmarks/test_jaxga.py
RobinKa/jaxga
6345af6d30e04fc4e96877f2a6ed65f9999ee605
[ "MIT" ]
1
2021-12-29T18:44:07.000Z
2021-12-29T18:44:07.000Z
import os os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import pytest import jax.numpy as jnp from jaxga.mv import MultiVector from jaxga.signatures import positive_signature def _jaxga_mul(a, b): return a * b def _mv_ones(num_elements, num_bases): return MultiVector( values=jnp.ones([nu...
23.5
71
0.674202
import os os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import pytest import jax.numpy as jnp from jaxga.mv import MultiVector from jaxga.signatures import positive_signature def _jaxga_mul(a, b): return a * b def _mv_ones(num_elements, num_bases): return MultiVector( values=jnp.ones([nu...
true
true
f71243803ce1bc2a361996539dec6a669b9363c9
702
py
Python
20.trench-map/py/part1.py
rolandbernard/adventofcode-2021
9249815af62d0fcf79b71357330a1456ea3be1ed
[ "BSD-2-Clause" ]
null
null
null
20.trench-map/py/part1.py
rolandbernard/adventofcode-2021
9249815af62d0fcf79b71357330a1456ea3be1ed
[ "BSD-2-Clause" ]
null
null
null
20.trench-map/py/part1.py
rolandbernard/adventofcode-2021
9249815af62d0fcf79b71357330a1456ea3be1ed
[ "BSD-2-Clause" ]
null
null
null
import sys import numpy as np rawalgo, rawimg = sys.stdin.read().strip().split('\n\n') algo = np.array([1 if c == '#' else 0 for c in rawalgo], dtype=np.int8) img = np.array([[1 if c == '#' else 0 for c in line] for line in rawimg.split('\n')], dtype=np.int8) def enhance(img, algo): img = np.pad(img, 2, 'edge')...
27
100
0.554131
import sys import numpy as np rawalgo, rawimg = sys.stdin.read().strip().split('\n\n') algo = np.array([1 if c == '#' else 0 for c in rawalgo], dtype=np.int8) img = np.array([[1 if c == '#' else 0 for c in line] for line in rawimg.split('\n')], dtype=np.int8) def enhance(img, algo): img = np.pad(img, 2, 'edge')...
true
true
f71244b627a2238654f8268e49d47c78ad4f7f61
4,869
py
Python
rally/plugins/openstack/scenarios/nova/keypairs.py
sergeygalkin/rally
8b63ceb10dd36087403f6bbc62f768155ce96c22
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/scenarios/nova/keypairs.py
sergeygalkin/rally
8b63ceb10dd36087403f6bbc62f768155ce96c22
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/scenarios/nova/keypairs.py
sergeygalkin/rally
8b63ceb10dd36087403f6bbc62f768155ce96c22
[ "Apache-2.0" ]
null
null
null
# Copyright 2015: Hewlett-Packard Development Company, L.P. # 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-...
38.642857
78
0.678784
from rally.common import logging from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.nova import utils from rally.task import types from rally.task import validation @validation.add("required_services", services=[consts.Service.NOVA]) @validation.add("requir...
true
true
f712464fd8c067f8b96f7295548792f5d3a1d1b5
272
py
Python
.history/serverSide/Truncate_20211213123549.py
Mastour-mouhcine/rodProject
3c4066ce78272752a286f57245fb5969c6340fda
[ "MIT" ]
null
null
null
.history/serverSide/Truncate_20211213123549.py
Mastour-mouhcine/rodProject
3c4066ce78272752a286f57245fb5969c6340fda
[ "MIT" ]
null
null
null
.history/serverSide/Truncate_20211213123549.py
Mastour-mouhcine/rodProject
3c4066ce78272752a286f57245fb5969c6340fda
[ "MIT" ]
1
2022-01-11T12:20:59.000Z
2022-01-11T12:20:59.000Z
import mysql.connector import pandas as pd mydb = mysql.connector.connect( host="135.148.9.103", user="admin", password="rod@2021", database="rod_input", ) mycursor1 = mydb.cursor() mycursor1.execute("TRUNCATE TABLE `data_input_test`") mydb.commit() print("Bien")
20.923077
53
0.727941
import mysql.connector import pandas as pd mydb = mysql.connector.connect( host="135.148.9.103", user="admin", password="rod@2021", database="rod_input", ) mycursor1 = mydb.cursor() mycursor1.execute("TRUNCATE TABLE `data_input_test`") mydb.commit() print("Bien")
true
true
f71246b3af86095563537972f1a55674f494959d
654
py
Python
utils/log_words_entity.py
gmaterni/teimedpy
f9cf58a37ec30fde406dce677e160bcbb120f746
[ "MIT" ]
null
null
null
utils/log_words_entity.py
gmaterni/teimedpy
f9cf58a37ec30fde406dce677e160bcbb120f746
[ "MIT" ]
null
null
null
utils/log_words_entity.py
gmaterni/teimedpy
f9cf58a37ec30fde406dce677e160bcbb120f746
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from teimedlib.textentities import TextEntities from teimedlib.textentities_log import * from teimedlib.ualog import Log def do_main(path_src,path_tags): path_err=path_src.replace(".txt","_words.ERR.log") log_err=Log("w").open(path_err,1).log te = T...
29.727273
54
0.721713
import sys from teimedlib.textentities import TextEntities from teimedlib.textentities_log import * from teimedlib.ualog import Log def do_main(path_src,path_tags): path_err=path_src.replace(".txt","_words.ERR.log") log_err=Log("w").open(path_err,1).log te = TextEntities(path_src, path_tags,log_err) ls...
true
true
f71247690219d395b7f014e772cfe1c76a7f3179
2,415
py
Python
tests/integrationTests/tests/tutorial_05_cpp_static_analysis/__init__.py
hifiadi/Submitty
62a8239313cff7e3f841ff66aeda6b0557e9c15b
[ "BSD-3-Clause" ]
null
null
null
tests/integrationTests/tests/tutorial_05_cpp_static_analysis/__init__.py
hifiadi/Submitty
62a8239313cff7e3f841ff66aeda6b0557e9c15b
[ "BSD-3-Clause" ]
null
null
null
tests/integrationTests/tests/tutorial_05_cpp_static_analysis/__init__.py
hifiadi/Submitty
62a8239313cff7e3f841ff66aeda6b0557e9c15b
[ "BSD-3-Clause" ]
null
null
null
# Necessary imports. Provides library functions to ease writing tests. from lib import prebuild, testcase, SUBMITTY_TUTORIAL_DIR import subprocess import os import glob ############################################################################ # COPY THE ASSIGNMENT FROM THE SAMPLE ASSIGNMENTS DIRECTORIES SAMPLE_AS...
30.1875
92
0.616977
from lib import prebuild, testcase, SUBMITTY_TUTORIAL_DIR import subprocess import os import glob SAMPLE_ASSIGNMENT_CONFIG = SUBMITTY_TUTORIAL_DIR + "/examples/05_cpp_static_analysis/config" SAMPLE_SUBMISSIONS = SUBMITTY_TUTORIAL_DIR + "/examples/05_cpp_static_analysis/submissions/" @prebuild def initialize(test): ...
true
true
f7124798254c4f69f542ce07896e7d16bd1c23e1
6,514
py
Python
torchvision/models/quantization/resnet.py
ZJUGuoShuai/vision
a9940fe4b2b63bd82a2f853616e00fd0bd112f9a
[ "BSD-3-Clause" ]
null
null
null
torchvision/models/quantization/resnet.py
ZJUGuoShuai/vision
a9940fe4b2b63bd82a2f853616e00fd0bd112f9a
[ "BSD-3-Clause" ]
null
null
null
torchvision/models/quantization/resnet.py
ZJUGuoShuai/vision
a9940fe4b2b63bd82a2f853616e00fd0bd112f9a
[ "BSD-3-Clause" ]
1
2020-01-10T12:50:14.000Z
2020-01-10T12:50:14.000Z
from typing import Any, Type, Union, List import torch import torch.nn as nn from torch import Tensor from torch.quantization import fuse_modules from torchvision.models.resnet import Bottleneck, BasicBlock, ResNet, model_urls from ..._internally_replaced_utils import load_state_dict_from_url from .utils import _repl...
33.57732
118
0.652441
from typing import Any, Type, Union, List import torch import torch.nn as nn from torch import Tensor from torch.quantization import fuse_modules from torchvision.models.resnet import Bottleneck, BasicBlock, ResNet, model_urls from ..._internally_replaced_utils import load_state_dict_from_url from .utils import _repl...
true
true
f71248f669af52817d55b7c555118d57f6813046
5,798
py
Python
CasoPractico01.py
jonathanyepez/Master-C3
37a3a13ef2bc8f51d3da3ca1b3704569ef83ef3d
[ "MIT" ]
null
null
null
CasoPractico01.py
jonathanyepez/Master-C3
37a3a13ef2bc8f51d3da3ca1b3704569ef83ef3d
[ "MIT" ]
null
null
null
CasoPractico01.py
jonathanyepez/Master-C3
37a3a13ef2bc8f51d3da3ca1b3704569ef83ef3d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Jul 6 18:03:09 2020 @author: Jonathan A. Yepez M. """ #Task Description """ En el archivo auto.csv se encuentran los siguientes datos de diferentes automoviles: * Cilindros * Cilindrada * Potencia * Peso * Aceleracion * Año del coche ...
42.948148
124
0.719386
import pandas as pd from pandas.plotting import scatter_matrix from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error import seaborn as sns import matplotlib.pyplot as plt df = pd.read_csv("auto.csv") print("--------...
true
true
f7124a93dad08bea989c633a1f66b10b640c44b3
806
py
Python
ballots/admin.py
cpsimpson/pollcat
0db893142bf0d56aa5ffaa3ea7f6857ede3fb3e3
[ "MIT" ]
null
null
null
ballots/admin.py
cpsimpson/pollcat
0db893142bf0d56aa5ffaa3ea7f6857ede3fb3e3
[ "MIT" ]
null
null
null
ballots/admin.py
cpsimpson/pollcat
0db893142bf0d56aa5ffaa3ea7f6857ede3fb3e3
[ "MIT" ]
null
null
null
from django.contrib import admin from ballots.models import Poll, Category, CategoryItem, Ballot, Vote, Answer, AnswerItem # class ItemInline(admin.TabularInline): # model = CategoryItem # # # class CategoryAdmin(admin.ModelAdmin): # inlines = [ItemInline, # ] class CategoryInline(admin.Tabul...
21.783784
89
0.719603
from django.contrib import admin from ballots.models import Poll, Category, CategoryItem, Ballot, Vote, Answer, AnswerItem class CategoryInline(admin.TabularInline): model = Category class PollAdmin(admin.ModelAdmin): inlines = [CategoryInline, ] class VoteInline(admin.TabularInline): ...
true
true
f7124be9dab39a1dc34f4b7c512d0a9848594406
30,962
py
Python
tests/components/automation/test_numeric_state.py
ziotibia81/home-assistant
8925cd0aaa0af72f58e75b928a4d39bfd9ae19ed
[ "Apache-2.0" ]
null
null
null
tests/components/automation/test_numeric_state.py
ziotibia81/home-assistant
8925cd0aaa0af72f58e75b928a4d39bfd9ae19ed
[ "Apache-2.0" ]
null
null
null
tests/components/automation/test_numeric_state.py
ziotibia81/home-assistant
8925cd0aaa0af72f58e75b928a4d39bfd9ae19ed
[ "Apache-2.0" ]
null
null
null
"""The tests for numeric state automation.""" from datetime import timedelta import unittest from unittest.mock import patch import homeassistant.components.automation as automation from homeassistant.core import Context, callback from homeassistant.setup import setup_component import homeassistant.util.dt as dt_util ...
35.304447
79
0.486984
from datetime import timedelta import unittest from unittest.mock import patch import homeassistant.components.automation as automation from homeassistant.core import Context, callback from homeassistant.setup import setup_component import homeassistant.util.dt as dt_util from tests.common import ( get_test_home_...
true
true
f7124c1dd93923ed20d01c8bc867037ad275bf8d
16,620
py
Python
materials/migrations/0001_initial.py
lueho/BRIT
1eae630c4da6f072aa4e2139bc406db4f4756391
[ "MIT" ]
null
null
null
materials/migrations/0001_initial.py
lueho/BRIT
1eae630c4da6f072aa4e2139bc406db4f4756391
[ "MIT" ]
4
2022-03-29T20:52:31.000Z
2022-03-29T20:52:31.000Z
materials/migrations/0001_initial.py
lueho/BRIT
1eae630c4da6f072aa4e2139bc406db4f4756391
[ "MIT" ]
null
null
null
# Generated by Django 3.2.10 on 2022-03-30 10:18 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import materials.models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alte...
69.831933
248
0.641456
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import materials.models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), migration...
true
true
f7124c7c8256e2f612b43b475016407864f60ced
1,033
py
Python
deployments/migrations/0043_personnel_country_to_fill.py
IFRCGo/ifrcgo-api
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
[ "MIT" ]
null
null
null
deployments/migrations/0043_personnel_country_to_fill.py
IFRCGo/ifrcgo-api
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
[ "MIT" ]
null
null
null
deployments/migrations/0043_personnel_country_to_fill.py
IFRCGo/ifrcgo-api
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
[ "MIT" ]
null
null
null
# Generated manually on 2022-01-24 17:40 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('deployments', '0042_personnel_country_to'), ] operations = [ migrations.RunSQL( sql=[("update deployme...
38.259259
98
0.608906
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('deployments', '0042_personnel_country_to'), ] operations = [ migrations.RunSQL( sql=[("update deployments_personnel " + "set ...
true
true
f7124d76471e6510404be64349b5aa4c8f88cfcd
26,890
py
Python
the_ark/screen_capture.py
meltmedia/the-ark
d559897494e02a2e2048fdc44014f17af89691bb
[ "Apache-2.0" ]
null
null
null
the_ark/screen_capture.py
meltmedia/the-ark
d559897494e02a2e2048fdc44014f17af89691bb
[ "Apache-2.0" ]
51
2015-01-27T18:13:41.000Z
2022-03-11T23:16:29.000Z
the_ark/screen_capture.py
meltmedia/the-ark
d559897494e02a2e2048fdc44014f17af89691bb
[ "Apache-2.0" ]
null
null
null
import math import numpy from PIL import Image from the_ark.selenium_helpers import SeleniumHelperExceptions, ElementNotVisibleError, ElementError from StringIO import StringIO import time import traceback DEFAULT_SCROLL_PADDING = 100 SCREENSHOT_FILE_EXTENSION = "png" DEFAULT_PIXEL_MATCH_OFFSET = 100 FIREFOX_HEAD_HEIG...
47.425044
120
0.62659
import math import numpy from PIL import Image from the_ark.selenium_helpers import SeleniumHelperExceptions, ElementNotVisibleError, ElementError from StringIO import StringIO import time import traceback DEFAULT_SCROLL_PADDING = 100 SCREENSHOT_FILE_EXTENSION = "png" DEFAULT_PIXEL_MATCH_OFFSET = 100 FIREFOX_HEAD_HEIG...
true
true
f7124d7bbf9e937a785e5dd86c044c0a23a370bc
4,798
py
Python
8term/MM/lab5/TwoDimRandomValue.py
nik-sergeson/bsuir-informatics-labs
14805fb83b8e2324580b6253158565068595e804
[ "Apache-2.0" ]
null
null
null
8term/MM/lab5/TwoDimRandomValue.py
nik-sergeson/bsuir-informatics-labs
14805fb83b8e2324580b6253158565068595e804
[ "Apache-2.0" ]
null
null
null
8term/MM/lab5/TwoDimRandomValue.py
nik-sergeson/bsuir-informatics-labs
14805fb83b8e2324580b6253158565068595e804
[ "Apache-2.0" ]
null
null
null
from __future__ import division def get_x_distribution_series(x_values, probabilites): distr_series = {} for i, x in enumerate(x_values): prob_sum = 0 for prob in probabilites[i]: prob_sum += prob distr_series[x] = prob_sum return distr_series def get_x_distribution_f...
29.256098
104
0.609837
from __future__ import division def get_x_distribution_series(x_values, probabilites): distr_series = {} for i, x in enumerate(x_values): prob_sum = 0 for prob in probabilites[i]: prob_sum += prob distr_series[x] = prob_sum return distr_series def get_x_distribution_f...
true
true
f7124e1487300d57e0d52fdfbcbf64f2198b1ede
209
py
Python
src/openprocurement/agreement/cfaua/adapters/configurator.py
pontostroy/api
5afdd3a62a8e562cf77e2d963d88f1a26613d16a
[ "Apache-2.0" ]
3
2020-03-13T06:44:23.000Z
2020-11-05T18:25:29.000Z
src/openprocurement/agreement/cfaua/adapters/configurator.py
pontostroy/api
5afdd3a62a8e562cf77e2d963d88f1a26613d16a
[ "Apache-2.0" ]
2
2021-03-25T23:27:04.000Z
2022-03-21T22:18:15.000Z
src/openprocurement/agreement/cfaua/adapters/configurator.py
scrubele/prozorro-testing
42b93ea2f25d8cc40e66c596f582c7c05e2a9d76
[ "Apache-2.0" ]
3
2020-10-16T16:25:14.000Z
2021-05-22T12:26:20.000Z
from openprocurement.agreement.core.adapters.configurator import BaseAgreementConfigurator class CFAgreementUAConfigurator(BaseAgreementConfigurator): name = "CFA configurator" model = None # TODO:
29.857143
90
0.813397
from openprocurement.agreement.core.adapters.configurator import BaseAgreementConfigurator class CFAgreementUAConfigurator(BaseAgreementConfigurator): name = "CFA configurator" model = None
true
true
f7124e1f4d368b31c5aa9ed0fef22d5140aab8cc
261
py
Python
UC. Curso em Aula II/A1D6.py
Shezkycg/Estudando_Python
6c3832815b3e86cd80cf3c4fabec1c9cc03601dd
[ "MIT" ]
null
null
null
UC. Curso em Aula II/A1D6.py
Shezkycg/Estudando_Python
6c3832815b3e86cd80cf3c4fabec1c9cc03601dd
[ "MIT" ]
null
null
null
UC. Curso em Aula II/A1D6.py
Shezkycg/Estudando_Python
6c3832815b3e86cd80cf3c4fabec1c9cc03601dd
[ "MIT" ]
null
null
null
ano = int(input('Digite o ano do seu nascimento: ')) idade = 2020-ano if idade <= 10: print('Mirim') elif idade <= 15: print('Infantil') elif idade <= 19: print('Junior') elif idade <= 20: print('Sênior') else: print('Master') print(idade)
17.4
52
0.613027
ano = int(input('Digite o ano do seu nascimento: ')) idade = 2020-ano if idade <= 10: print('Mirim') elif idade <= 15: print('Infantil') elif idade <= 19: print('Junior') elif idade <= 20: print('Sênior') else: print('Master') print(idade)
true
true
f7124e3c9ed792e7f43ac6d1446bdf360c7eb299
2,860
py
Python
array_backed_grid/array_backed_grid_oop_2.py
CrtomirJuren/pygame-projects
f710f36050bfe3ece866bbda7d570caa1e037d7a
[ "MIT" ]
null
null
null
array_backed_grid/array_backed_grid_oop_2.py
CrtomirJuren/pygame-projects
f710f36050bfe3ece866bbda7d570caa1e037d7a
[ "MIT" ]
null
null
null
array_backed_grid/array_backed_grid_oop_2.py
CrtomirJuren/pygame-projects
f710f36050bfe3ece866bbda7d570caa1e037d7a
[ "MIT" ]
null
null
null
"""Snake Game Python Tutorial youtube video: https://www.youtube.com/watch?v=CD4qAhfFuLo current time: 33:00 """ import sys import math import random import pygame from pygame.locals import * import tkinter as tk from tkinter import messagebox WHITE = (255,255,255) BLACK = (0,0,0) RED = (255,0,0) GREEN = (0,255,0) BLU...
24.655172
94
0.587063
import sys import math import random import pygame from pygame.locals import * import tkinter as tk from tkinter import messagebox WHITE = (255,255,255) BLACK = (0,0,0) RED = (255,0,0) GREEN = (0,255,0) BLUE = (0,0,255) class cube(object): w = 500 rows = 20 def __init__(self,start,dirnx=1,dirny=0,color=R...
true
true
f7124f9fa751ec5f2e249f00d6757aecff25ac68
5,544
py
Python
scripts/katcp_cli.py
ewanbarr/meerkat_interfaces
618205f1376fee4e5e2593cf05e2f1f78ea19780
[ "MIT" ]
null
null
null
scripts/katcp_cli.py
ewanbarr/meerkat_interfaces
618205f1376fee4e5e2593cf05e2f1f78ea19780
[ "MIT" ]
null
null
null
scripts/katcp_cli.py
ewanbarr/meerkat_interfaces
618205f1376fee4e5e2593cf05e2f1f78ea19780
[ "MIT" ]
1
2020-02-03T08:22:04.000Z
2020-02-03T08:22:04.000Z
#!/usr/bin/env python import logging import sys import traceback import katcp import readline import codecs import re from optparse import OptionParser from cmd2 import Cmd from katcp import DeviceClient logging.basicConfig(level=logging.INFO, stream=sys.stderr, format="%(asctim...
32.611765
93
0.59145
import logging import sys import traceback import katcp import readline import codecs import re from optparse import OptionParser from cmd2 import Cmd from katcp import DeviceClient logging.basicConfig(level=logging.INFO, stream=sys.stderr, format="%(asctime)s - %(name)s - %(fil...
false
true
f71251283cedf39dcddec5a82e7d99b19deb0cf0
2,940
py
Python
webapp/opentamilapp/urls.py
Parathantl/open-tamil
b2d64163637c7bce20b08e3bfe86e3d767cc7672
[ "MIT" ]
1
2019-11-24T00:55:31.000Z
2019-11-24T00:55:31.000Z
webapp/opentamilapp/urls.py
AasaiAlangaram/open-tamil
6679c60148f0dddc287a892b8c9aaf8a159e99f0
[ "MIT" ]
null
null
null
webapp/opentamilapp/urls.py
AasaiAlangaram/open-tamil
6679c60148f0dddc287a892b8c9aaf8a159e99f0
[ "MIT" ]
null
null
null
"""opentamilweb URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cla...
45.9375
87
0.636054
import sys from django.shortcuts import redirect from django.conf.urls import url from .views import * PYTHON26 = sys.version.find('2.6') >= 0 urlpatterns = [ url(r'^$', index,name="home"), url(r'^apidoc/$',lambda r: redirect("/static/sphinx_doc/_build/html/index.html")), url(r'^tts_demo/$',tts_demo,name=...
true
true
f712512bd28371ebedcd43e31bf1aa39fcef6bdd
468
py
Python
SpiMediaGallery/main/migrations/0005_auto_20190624_1407.py
Swiss-Polar-Institute/spi-media-gallery
2f66f938cbe1a7a25a5971d42abb1b0b5deca31e
[ "MIT" ]
5
2020-02-21T20:38:50.000Z
2022-02-19T11:00:46.000Z
SpiMediaGallery/main/migrations/0005_auto_20190624_1407.py
Swiss-Polar-Institute/spi-media-gallery
2f66f938cbe1a7a25a5971d42abb1b0b5deca31e
[ "MIT" ]
23
2019-10-01T17:13:39.000Z
2022-01-21T20:02:26.000Z
SpiMediaGallery/main/migrations/0005_auto_20190624_1407.py
Swiss-Polar-Institute/spi-media-gallery
2f66f938cbe1a7a25a5971d42abb1b0b5deca31e
[ "MIT" ]
2
2022-02-03T08:52:51.000Z
2022-02-03T08:58:00.000Z
# Generated by Django 2.2.2 on 2019-06-24 14:07 import django.contrib.gis.db.models.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('main', '0004_auto_20190624_1355'), ] operations = [ migrations.AlterField( model_name='photo'...
23.4
99
0.634615
import django.contrib.gis.db.models.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('main', '0004_auto_20190624_1355'), ] operations = [ migrations.AlterField( model_name='photo', name='position', field...
true
true
f71251d4c4d7b9569aacdc2d3c414fd59856790f
19,842
py
Python
train.py
feng-y16/Hamiltonian-Generative-Networks
702d3ff3aec40eba20e17c5a1612b5b0b1e2f831
[ "MIT" ]
29
2020-09-14T11:59:03.000Z
2022-03-10T16:31:19.000Z
train.py
feng-y16/Hamiltonian-Generative-Networks
702d3ff3aec40eba20e17c5a1612b5b0b1e2f831
[ "MIT" ]
49
2020-09-14T12:33:51.000Z
2021-01-21T22:52:17.000Z
train.py
feng-y16/Hamiltonian-Generative-Networks
702d3ff3aec40eba20e17c5a1612b5b0b1e2f831
[ "MIT" ]
7
2020-11-10T16:20:31.000Z
2022-01-09T10:49:59.000Z
"""Script to train the Hamiltonian Generative Network """ import ast import argparse import copy import pprint import os import warnings import yaml import numpy as np import torch import tqdm from utilities.integrator import Integrator from utilities.training_logger import TrainingLogger from utilities import loader...
42.855292
148
0.615865
import ast import argparse import copy import pprint import os import warnings import yaml import numpy as np import torch import tqdm from utilities.integrator import Integrator from utilities.training_logger import TrainingLogger from utilities import loader from utilities.loader import load_hgn, get_online_dataloa...
true
true
f71252dfda75df7effc13a50f446c5781c2396df
4,364
py
Python
tests/net/c_find_test.py
Therapixel/pacsanini
8d8e61601a9df39eaa7aa4b8e9a7e1ccd1ee253d
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
10
2021-07-05T16:59:03.000Z
2022-02-09T11:13:03.000Z
tests/net/c_find_test.py
Therapixel/pacsanini
8d8e61601a9df39eaa7aa4b8e9a7e1ccd1ee253d
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
51
2021-07-05T08:29:35.000Z
2021-11-30T08:30:10.000Z
tests/net/c_find_test.py
Therapixel/pacsanini
8d8e61601a9df39eaa7aa4b8e9a7e1ccd1ee253d
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
2
2021-07-06T06:35:37.000Z
2021-07-09T10:26:38.000Z
# Copyright (C) 2019-2020, Therapixel SA. # All rights reserved. # This file is subject to the terms and conditions described in the # LICENSE file distributed in this package. """Test the C-Find message are correctly sent and can provide useful results. """ import os from datetime import datetime, timedelta from path...
30.305556
81
0.700275
import os from datetime import datetime, timedelta from pathlib import Path from typing import Generator import pytest from pynetdicom import debug_logger from pytest import CaptureFixture from pacsanini.config import PacsaniniConfig from pacsanini.models import QueryLevel from pacsanini.net import c_find def val...
true
true
f712536308213bae44edc75d27945b79fdeabcd2
10,956
py
Python
pull_external.py
craigbox/spiffe.io
41eec800ef509b67ed227d08323ee644dabe8e0a
[ "Apache-2.0" ]
null
null
null
pull_external.py
craigbox/spiffe.io
41eec800ef509b67ed227d08323ee644dabe8e0a
[ "Apache-2.0" ]
null
null
null
pull_external.py
craigbox/spiffe.io
41eec800ef509b67ed227d08323ee644dabe8e0a
[ "Apache-2.0" ]
null
null
null
import yaml import os import shutil import re import toml from typing import List, Set, Tuple, Pattern, Match from urllib.parse import urlparse from pathlib import Path CHECKOUT_DIR = "checkouts" GIT_CLONE_CMD = "git clone {{}} ./{}/{{}}/{{}}".format(CHECKOUT_DIR) RE_EXTRACT_TITLE: Pattern[str] = re.compile("([#\s]*)(...
34.670886
101
0.627054
import yaml import os import shutil import re import toml from typing import List, Set, Tuple, Pattern, Match from urllib.parse import urlparse from pathlib import Path CHECKOUT_DIR = "checkouts" GIT_CLONE_CMD = "git clone {{}} ./{}/{{}}/{{}}".format(CHECKOUT_DIR) RE_EXTRACT_TITLE: Pattern[str] = re.compile("([#\s]*)(...
true
true
f712547a83988dc9e633b889f1d7fce1900666fe
44,927
py
Python
yt_dlp/postprocessor/ffmpeg.py
Assasans/yt-dlp-service
203a93d087d88c3cee74555e1ce6e311379eb3f3
[ "Unlicense" ]
null
null
null
yt_dlp/postprocessor/ffmpeg.py
Assasans/yt-dlp-service
203a93d087d88c3cee74555e1ce6e311379eb3f3
[ "Unlicense" ]
null
null
null
yt_dlp/postprocessor/ffmpeg.py
Assasans/yt-dlp-service
203a93d087d88c3cee74555e1ce6e311379eb3f3
[ "Unlicense" ]
null
null
null
from __future__ import unicode_literals import io import itertools import os import subprocess import time import re import json from .common import AudioConversionError, PostProcessor from ..compat import compat_str from ..utils import ( dfxp2srt, encodeArgument, encodeFilename, float_or_none, _...
41.029224
137
0.584437
from __future__ import unicode_literals import io import itertools import os import subprocess import time import re import json from .common import AudioConversionError, PostProcessor from ..compat import compat_str from ..utils import ( dfxp2srt, encodeArgument, encodeFilename, float_or_none, _...
true
true
f7125533e4ea51430c6c6e8ef801e226c3ad0f15
976
py
Python
setup.py
jackgithup/AllLogin
908fa9ff9fcfdb31b53986e5913d9f90db10e897
[ "MIT" ]
null
null
null
setup.py
jackgithup/AllLogin
908fa9ff9fcfdb31b53986e5913d9f90db10e897
[ "MIT" ]
null
null
null
setup.py
jackgithup/AllLogin
908fa9ff9fcfdb31b53986e5913d9f90db10e897
[ "MIT" ]
1
2021-04-12T10:48:31.000Z
2021-04-12T10:48:31.000Z
''' Function: setup Author: Charles 微信公众号: Charles的皮卡丘 GitHub: https://github.com/CharlesPikachu 更新日期: 2020-02-20 ''' import DecryptLogin from setuptools import setup, find_packages '''readme''' with open('README.md', 'r', encoding='utf-8') as f: long_description = f.read() '''setup''' setup( name='DecryptLo...
23.238095
101
0.717213
import DecryptLogin from setuptools import setup, find_packages with open('README.md', 'r', encoding='utf-8') as f: long_description = f.read() setup( name='DecryptLogin', version=DecryptLogin.__version__, description='Login some website using requests.', long_description=long_description, long_description_co...
true
true
f71255e87d17718d38f36a27ea54ed6a5e21e119
3,424
py
Python
DeepLearningExamples/PyTorch/Recommendation/DLRM/preproc/parquet_to_binary.py
puririshi98/benchmark
79f554f1e1cf36f62994c78e0e6e5b360f554022
[ "BSD-3-Clause" ]
1
2021-07-30T06:20:40.000Z
2021-07-30T06:20:40.000Z
preproc/parquet_to_binary.py
henryqin1997/Adalars
2440b3b6e177a9b38011eff3ec25f3b6052acfd0
[ "Apache-2.0" ]
null
null
null
preproc/parquet_to_binary.py
henryqin1997/Adalars
2440b3b6e177a9b38011eff3ec25f3b6052acfd0
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
36.817204
125
0.721379
import numpy as np import pandas as pd import os from joblib import Parallel, delayed import glob import argparse import tqdm import subprocess def process_file(f, dst): label = '_c0' dense_columns = [f'_c{i}' for i in range(1, 14)] categorical_columns = [f'_c{i}' for i in range(14, 40)] all_columns_...
true
true
f712576fda75ef99f289f3395aba844751d2feb4
416
py
Python
challenge_3/python/whiterd/src/find_major.py
rchicoli/2017-challenges
44f0b672e5dea34de1dde131b6df837d462f8e29
[ "Apache-2.0" ]
271
2017-01-01T22:58:36.000Z
2021-11-28T23:05:29.000Z
challenge_3/python/whiterd/src/find_major.py
AakashOfficial/2017Challenges
a8f556f1d5b43c099a0394384c8bc2d826f9d287
[ "Apache-2.0" ]
283
2017-01-01T23:26:05.000Z
2018-03-23T00:48:55.000Z
challenge_3/python/whiterd/src/find_major.py
AakashOfficial/2017Challenges
a8f556f1d5b43c099a0394384c8bc2d826f9d287
[ "Apache-2.0" ]
311
2017-01-01T22:59:23.000Z
2021-09-23T00:29:12.000Z
#!/usr/bin/env python ''' Input: An array of integers. Output: The single integer that occurs most often. ''' from __future__ import print_function from collections import Counter given_array = [2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7] def find_major(array): co...
20.8
95
0.682692
from __future__ import print_function from collections import Counter given_array = [2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7] def find_major(array): counted = Counter(array) return counted.most_common(1)[0][0] print(find_major(given_array))
true
true
f71257c8afa7dddbbfd42e4191dcc68d64d717ab
3,504
py
Python
demos/unanimous.py
hitimr/mpyc_benchmark
26a78f9b7b38cedf9be3e8aec6aedbf1428481c5
[ "MIT" ]
null
null
null
demos/unanimous.py
hitimr/mpyc_benchmark
26a78f9b7b38cedf9be3e8aec6aedbf1428481c5
[ "MIT" ]
null
null
null
demos/unanimous.py
hitimr/mpyc_benchmark
26a78f9b7b38cedf9be3e8aec6aedbf1428481c5
[ "MIT" ]
null
null
null
"""Demo unanimous voting: multiparty matching without embarrassments. Unanimous voting between parties P[0],...,P[t] is implemented by securely evaluating the product of their votes (using 1s and 0s to encode "yes" and "no" votes, respectively) and revealing only whether the product equals 1 (unanimous agreement)...
45.506494
82
0.737158
import sys from mpyc.runtime import mpc m = len(mpc.parties) if m%2 == 0: print('Odd number of parties required.') sys.exit() t = m//2 voters = list(range(t+1)) if mpc.pid in voters: vote = int(sys.argv[1]) if sys.argv[1:] else 1 else: vote = None secbit = mpc.SecInt(1) mpc....
true
true
f71257f631b919e2f7469a4ee079c181160a3eff
3,661
py
Python
pip_helper.py
isyouxi/pip_helper
646acd82a50d8ee37a9c072008cc9eeb14e905d7
[ "MIT" ]
null
null
null
pip_helper.py
isyouxi/pip_helper
646acd82a50d8ee37a9c072008cc9eeb14e905d7
[ "MIT" ]
null
null
null
pip_helper.py
isyouxi/pip_helper
646acd82a50d8ee37a9c072008cc9eeb14e905d7
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ @file:pip_util.py @des:下载|安装 对应(win或any)pip版本的安装包 # pip 命令说明 # https://pip.pypa.io/en/stable/user_guide/ # pip uninstall SomePackage 卸载包 # pip search SomePackage 卸载包 # pip uninstall SomePackage 卸载包 # pip show ...
29.055556
79
0.480743
from pip._internal.cli.main import main pip_source = { '官方源': 'https://pypi.org/simple/', '阿里云': 'http://mirrors.aliyun.com/pypi/simple/', } local_down_dir = { 'base': 'Z:\\var\\log\\mine\\', 'win': 'win-pages', 'any': 'any-pages', } def get_pip_link(page_name): if page_name.find(...
true
true
f712586f39135ba17740d670d55179e097e0a8db
4,291
py
Python
maskrcnn_benchmark/config/paths_catalog.py
xuhuaze707313/retinamask
b1d2e966c2b230b94007f35a3d3ef9e9d85223cd
[ "MIT" ]
1
2019-01-14T03:12:28.000Z
2019-01-14T03:12:28.000Z
maskrcnn_benchmark/config/paths_catalog.py
xuhuaze707313/retinamask
b1d2e966c2b230b94007f35a3d3ef9e9d85223cd
[ "MIT" ]
null
null
null
maskrcnn_benchmark/config/paths_catalog.py
xuhuaze707313/retinamask
b1d2e966c2b230b94007f35a3d3ef9e9d85223cd
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """Centralized catalog of paths.""" import os class DatasetCatalog(object): DATA_DIR = "datasets" DATASETS = { "coco_test-dev": ( "coco/test2017", "coco/annotations/image_info_test-dev2017.json", ...
38.657658
117
0.633652
import os class DatasetCatalog(object): DATA_DIR = "datasets" DATASETS = { "coco_test-dev": ( "coco/test2017", "coco/annotations/image_info_test-dev2017.json", ), "coco_2017_test": ( "coco/test2017", "coco/annotations/image_info_test201...
true
true
f7125a848dc8bc26024fa83c94a6f2ed576d1ce2
4,680
py
Python
druid_client/client/config.py
paul-rogers/pydruid2
9fe00b7a5dfa9aae6f1e53b897793ecee0148316
[ "Apache-2.0" ]
null
null
null
druid_client/client/config.py
paul-rogers/pydruid2
9fe00b7a5dfa9aae6f1e53b897793ecee0148316
[ "Apache-2.0" ]
null
null
null
druid_client/client/config.py
paul-rogers/pydruid2
9fe00b7a5dfa9aae6f1e53b897793ecee0148316
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Paul Rogers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36
93
0.654701
from .util import dict_get, split_host_url, service_url from . import consts from .extensions import load_extensions class ServiceMapper: def url_for(self, host, http_port, tls_port, prefer_tls): if (prefer_tls and tls_port != -1) or http_port == -1: return (consts.TLS_PROTOCOL, host, tls_por...
true
true
f7125a8e147b6c4ba98b346faa3bc38df5d28ff1
1,226
py
Python
setup.py
AudioSceneDescriptionFormat/splines
0faf87ffddf3be01087959f80d9c43a4da2ae862
[ "MIT" ]
6
2021-06-21T11:41:02.000Z
2022-02-15T19:18:47.000Z
setup.py
AudioSceneDescriptionFormat/splines
0faf87ffddf3be01087959f80d9c43a4da2ae862
[ "MIT" ]
3
2018-07-09T17:47:29.000Z
2022-01-28T19:55:55.000Z
setup.py
AudioSceneDescriptionFormat/splines
0faf87ffddf3be01087959f80d9c43a4da2ae862
[ "MIT" ]
3
2020-05-15T18:34:42.000Z
2021-12-28T06:29:54.000Z
from setuptools import setup # "import" __version__ __version__ = 'unknown' for line in open('src/splines/__init__.py'): if line.startswith('__version__'): exec(line) break setup( name='splines', packages=['splines'], package_dir={'': 'src'}, version=__version__, author='Matthi...
31.435897
88
0.646003
from setuptools import setup __version__ = 'unknown' for line in open('src/splines/__init__.py'): if line.startswith('__version__'): exec(line) break setup( name='splines', packages=['splines'], package_dir={'': 'src'}, version=__version__, author='Matthias Geier', author_e...
true
true
f7125af58b237785c5910dba2e348f1c316e9de4
788
py
Python
src/biobionews/biobio.py
brianl9995/biobionews
11f41731510ee3f4c2a868cd867daf417a19d9fc
[ "MIT" ]
1
2020-08-03T20:56:11.000Z
2020-08-03T20:56:11.000Z
src/biobionews/biobio.py
brianl9995/biobionews
11f41731510ee3f4c2a868cd867daf417a19d9fc
[ "MIT" ]
null
null
null
src/biobionews/biobio.py
brianl9995/biobionews
11f41731510ee3f4c2a868cd867daf417a19d9fc
[ "MIT" ]
null
null
null
from dataclasses import dataclass from typing import List import click import desert import marshmallow import requests API_URL = "https://www.biobiochile.cl/lista/api/get-todo?limit={limit}" @dataclass class New: post_hour: str post_title: str post_content: str schema = desert.schema(New, meta={"unkn...
23.176471
77
0.682741
from dataclasses import dataclass from typing import List import click import desert import marshmallow import requests API_URL = "https://www.biobiochile.cl/lista/api/get-todo?limit={limit}" @dataclass class New: post_hour: str post_title: str post_content: str schema = desert.schema(New, meta={"unkn...
true
true
f7125cbb6168bfd20cbc2cf0268d1b2dbe61c384
37,965
py
Python
dolfyn/io/rdi.py
jklymak/dolfyn
eea98fe0021886cf654e25293c385c5c3707ff8d
[ "BSD-3-Clause" ]
null
null
null
dolfyn/io/rdi.py
jklymak/dolfyn
eea98fe0021886cf654e25293c385c5c3707ff8d
[ "BSD-3-Clause" ]
null
null
null
dolfyn/io/rdi.py
jklymak/dolfyn
eea98fe0021886cf654e25293c385c5c3707ff8d
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import xarray as xr from .. import time as tmlib import warnings from os.path import getsize from ._read_bin import bin_reader from .base import _find_userdata, _create_dataset, _abspath from ..rotate.rdi import _calc_beam_orientmat, _calc_orientmat from ..rotate.base import _set_coords from ..rotate...
39.505723
91
0.488871
import numpy as np import xarray as xr from .. import time as tmlib import warnings from os.path import getsize from ._read_bin import bin_reader from .base import _find_userdata, _create_dataset, _abspath from ..rotate.rdi import _calc_beam_orientmat, _calc_orientmat from ..rotate.base import _set_coords from ..rotate...
true
true
f7125ceb0181b9a8dfb4064f8f3457514d4b94b3
15,386
py
Python
netbox/ipam/filters.py
habalux/netbox
dd7249d2ef09a8f09139c228b8186683237ad3ee
[ "Apache-2.0" ]
2
2019-03-11T12:34:06.000Z
2021-04-22T12:55:04.000Z
netbox/ipam/filters.py
habalux/netbox
dd7249d2ef09a8f09139c228b8186683237ad3ee
[ "Apache-2.0" ]
2
2021-09-08T00:50:06.000Z
2022-01-13T01:06:14.000Z
netbox/ipam/filters.py
habalux/netbox
dd7249d2ef09a8f09139c228b8186683237ad3ee
[ "Apache-2.0" ]
1
2021-05-11T07:10:44.000Z
2021-05-11T07:10:44.000Z
import django_filters import netaddr from django.core.exceptions import ValidationError from django.db.models import Q from netaddr.core import AddrFormatError from dcim.models import Site, Device, Interface from extras.filters import CustomFieldFilterSet from tenancy.models import Tenant from utilities.filters import...
30.588469
115
0.627259
import django_filters import netaddr from django.core.exceptions import ValidationError from django.db.models import Q from netaddr.core import AddrFormatError from dcim.models import Site, Device, Interface from extras.filters import CustomFieldFilterSet from tenancy.models import Tenant from utilities.filters import...
true
true
f7125d05cb08289361b3d477709138d136639707
705
py
Python
src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/__init__.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/__init__.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/__init__.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
33.571429
76
0.609929
from .metrics_operations import MetricsOperations from .events_operations import EventsOperations from .query_operations import QueryOperations __all__ = [ 'MetricsOperations', 'EventsOperations', 'QueryOperations', ]
true
true
f7125eb6c7ab4d5c5327525b5a48ced136cd866a
969
py
Python
study_revisao/battle.py
fredericohorst/old_python_studies_498263
639f8a34927d702379848ba905f734bf036ae13f
[ "Apache-2.0" ]
null
null
null
study_revisao/battle.py
fredericohorst/old_python_studies_498263
639f8a34927d702379848ba905f734bf036ae13f
[ "Apache-2.0" ]
null
null
null
study_revisao/battle.py
fredericohorst/old_python_studies_498263
639f8a34927d702379848ba905f734bf036ae13f
[ "Apache-2.0" ]
null
null
null
__author__ = 'frederico' from tabuleiro import tabuleiro # Type of ship | Size | Legenda # Aircraft carrier 5 ac # Battleship 4 b # Submarine 3 s # Destroyer (or Cruiser) 3 d # Patrol boat (or destroyer) 2 pb barcos = {'ac':...
17.944444
82
0.524252
__author__ = 'frederico' from tabuleiro import tabuleiro barcos = {'ac': 5, 'b': 4, 's': 3, 'd': 3, 'pb': 2} x = input('digite a quantidade de linhas: ') y = input('digite a quantidade de colunas: ') z = 'M' t = tabuleiro(x, y, z) print(t.M) print(t.M[0]) print('tabuleiro criado com sucesso. vc tem direito a 5 n...
true
true
f7125ef47bcafedbce4d1e3a038883762c563216
27,820
py
Python
chem/util.py
Prepaire/MolGNN_fewshot
c7c17afdeae7f2ef0c8e3ca2da033091ec7537ca
[ "MIT" ]
6
2021-09-05T12:25:07.000Z
2022-01-24T02:19:17.000Z
chem/util.py
Prepaire/MolGNN_fewshot
c7c17afdeae7f2ef0c8e3ca2da033091ec7537ca
[ "MIT" ]
null
null
null
chem/util.py
Prepaire/MolGNN_fewshot
c7c17afdeae7f2ef0c8e3ca2da033091ec7537ca
[ "MIT" ]
2
2022-01-29T12:26:26.000Z
2022-03-08T12:51:32.000Z
import torch import random import collections import networkx as nx from rdkit.Chem import AllChem import numpy as np from loader import graph_data_obj_to_nx_simple, nx_to_graph_data_obj_simple from loader import MoleculeDataset def get_filtered_fingerprint(smiles): """ Get filtered PubChem fingerprint. The di...
37.798913
88
0.602876
import torch import random import collections import networkx as nx from rdkit.Chem import AllChem import numpy as np from loader import graph_data_obj_to_nx_simple, nx_to_graph_data_obj_simple from loader import MoleculeDataset def get_filtered_fingerprint(smiles): from PyFingerprint.All_Fingerprint import ge...
true
true
f7125ef84102da6ebbb66d8e7c204f7cbb0066a0
5,871
py
Python
src/sentry/api/endpoints/organization_release_file_details.py
seukjung/sentry-custom
c5f6bb2019aef3caff7f3e2b619f7a70f2b9b963
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/endpoints/organization_release_file_details.py
seukjung/sentry-custom
c5f6bb2019aef3caff7f3e2b619f7a70f2b9b963
[ "BSD-3-Clause" ]
6
2019-12-29T00:50:11.000Z
2022-02-10T13:27:24.000Z
src/sentry/api/endpoints/organization_release_file_details.py
seukjung/sentry-custom
c5f6bb2019aef3caff7f3e2b619f7a70f2b9b963
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import posixpath from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from rest_framework.response import Response from sentry.api.base import DocSection from sentry.api.bases.organization import OrganizationReleasesBaseEndpoint from sent...
34.333333
126
0.619145
from __future__ import absolute_import import posixpath from rest_framework import serializers from rest_framework.exceptions import PermissionDenied from rest_framework.response import Response from sentry.api.base import DocSection from sentry.api.bases.organization import OrganizationReleasesBaseEndpoint from sent...
true
true
f7125f548ea5763ffd0bfc6106500cb63d025e6a
2,571
py
Python
tests/test_config.py
MiLk/stone-burner
f71071ae385cfc3c91e5bb694b0dfbb631e2483f
[ "MIT" ]
null
null
null
tests/test_config.py
MiLk/stone-burner
f71071ae385cfc3c91e5bb694b0dfbb631e2483f
[ "MIT" ]
null
null
null
tests/test_config.py
MiLk/stone-burner
f71071ae385cfc3c91e5bb694b0dfbb631e2483f
[ "MIT" ]
null
null
null
import pytest from stone_burner.config import parse_project_config from stone_burner.config import TFAttributes from stone_burner.config import get_component_paths from .utils import SAMPLE_CONFIG def test_parse_project_config_1(): e = { 'c1': {'component_type': 'c1', 'validate': {}}, 'c2': {'co...
30.607143
98
0.639829
import pytest from stone_burner.config import parse_project_config from stone_burner.config import TFAttributes from stone_burner.config import get_component_paths from .utils import SAMPLE_CONFIG def test_parse_project_config_1(): e = { 'c1': {'component_type': 'c1', 'validate': {}}, 'c2': {'co...
true
true
f712608dde48765740fc1278966b48494be2f4a1
240
py
Python
tests/test_sum.py
ilhan-mstf/tdd-sample-app
94e61089bd55bfbde96a57a320bbbaaeedf7a1ff
[ "MIT" ]
null
null
null
tests/test_sum.py
ilhan-mstf/tdd-sample-app
94e61089bd55bfbde96a57a320bbbaaeedf7a1ff
[ "MIT" ]
null
null
null
tests/test_sum.py
ilhan-mstf/tdd-sample-app
94e61089bd55bfbde96a57a320bbbaaeedf7a1ff
[ "MIT" ]
null
null
null
import os,sys,inspect current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parent_dir = os.path.dirname(current_dir) sys.path.insert(0, parent_dir) import sum def test_sum(): assert sum.sum(3, 4) == 7
26.666667
87
0.754167
import os,sys,inspect current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parent_dir = os.path.dirname(current_dir) sys.path.insert(0, parent_dir) import sum def test_sum(): assert sum.sum(3, 4) == 7
true
true
f712616c7f9dabddbf70b11e2c6cc653c11f9e33
1,931
py
Python
cas9/score.py
cangtu/cot
2ecbe83fe7bb3538f80692fc4412830f6c976558
[ "MIT" ]
1
2018-07-11T06:12:51.000Z
2018-07-11T06:12:51.000Z
cas9/score.py
cangtu/cot
2ecbe83fe7bb3538f80692fc4412830f6c976558
[ "MIT" ]
null
null
null
cas9/score.py
cangtu/cot
2ecbe83fe7bb3538f80692fc4412830f6c976558
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright @ 0x6c78. # # 16-10-20 下午1:27 0x6c78@gmail.com # # Distributed under terms of the MIT License from operator import mul from itertools import combinations class Score(object): def __init__(self): """ 张峰实验室通过实验获得的每个位置错配的特异性,具体参考网页: http://crispr.mit.edu/...
26.094595
88
0.518384
from operator import mul from itertools import combinations class Score(object): def __init__(self): self.m = (0, 0, 0.014, 0, 0, 0.395, 0.317, 0, 0.389, 0.079, 0.445, 0.508, 0.613, 0.851, 0.732, 0.828, 0.615, 0.804, 0.685, 0.583) def _t1(self, locs): return reduce(mul, [1-s...
true
true
f712617ffa094e681b2369c74d5cbea8e649fd3c
787
py
Python
python-lib/gluonts_forecasts/custom_models/utils.py
RedaAffane/dss-plugin-timeseries-forecast
34a209eefba322403f4b6143a4eef529b321af6b
[ "Apache-2.0" ]
null
null
null
python-lib/gluonts_forecasts/custom_models/utils.py
RedaAffane/dss-plugin-timeseries-forecast
34a209eefba322403f4b6143a4eef529b321af6b
[ "Apache-2.0" ]
null
null
null
python-lib/gluonts_forecasts/custom_models/utils.py
RedaAffane/dss-plugin-timeseries-forecast
34a209eefba322403f4b6143a4eef529b321af6b
[ "Apache-2.0" ]
null
null
null
def cast_kwargs(kwargs): kwargs_copy = kwargs.copy() for arg, value in kwargs_copy.items(): if isinstance(value, dict): kwargs_copy[arg] = cast_kwargs(value) else: kwargs_copy[arg] = cast_string(kwargs_copy[arg]) return kwargs_copy def cast_string(s): if s == "T...
19.675
60
0.559085
def cast_kwargs(kwargs): kwargs_copy = kwargs.copy() for arg, value in kwargs_copy.items(): if isinstance(value, dict): kwargs_copy[arg] = cast_kwargs(value) else: kwargs_copy[arg] = cast_string(kwargs_copy[arg]) return kwargs_copy def cast_string(s): if s == "T...
true
true
f7126213aaecc7b37aeea5c5983f79031b0a208b
182
py
Python
enlopy/__init__.py
energy-modelling-toolkit/enlopy
3caa9e795e12389808c4c10139a9de9729455eb1
[ "BSD-3-Clause" ]
7
2018-08-24T15:38:27.000Z
2021-09-01T06:59:40.000Z
enlopy/__init__.py
energy-modelling-toolkit/enlopy
3caa9e795e12389808c4c10139a9de9729455eb1
[ "BSD-3-Clause" ]
null
null
null
enlopy/__init__.py
energy-modelling-toolkit/enlopy
3caa9e795e12389808c4c10139a9de9729455eb1
[ "BSD-3-Clause" ]
4
2019-02-13T12:39:49.000Z
2020-02-06T22:00:40.000Z
from .analysis import * from .plot import * from .generate import * from .utils import * __author__ = 'Konstantinos Kavvadias' __license__ = 'BSD-3-Clause' __version__ = "0.1.dev11"
22.75
37
0.741758
from .analysis import * from .plot import * from .generate import * from .utils import * __author__ = 'Konstantinos Kavvadias' __license__ = 'BSD-3-Clause' __version__ = "0.1.dev11"
true
true
f712625c2d80ae2a5ab10516a630ab9167dea208
71,999
py
Python
sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_clusters_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_clusters_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_clusters_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.739253
231
0.665065
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true
f7126290081c457d1c17758f47e05e22c1a9ecff
711
py
Python
oops_fhir/r4/value_set/structure_map_group_type_mode.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
oops_fhir/r4/value_set/structure_map_group_type_mode.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
oops_fhir/r4/value_set/structure_map_group_type_mode.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
from pathlib import Path from fhir.resources.valueset import ValueSet as _ValueSet from oops_fhir.utils import ValueSet from oops_fhir.r4.code_system.structure_map_group_type_mode import ( StructureMapGroupTypeMode as StructureMapGroupTypeMode_, ) __all__ = ["StructureMapGroupTypeMode"] _resource = _ValueSet...
22.21875
73
0.762307
from pathlib import Path from fhir.resources.valueset import ValueSet as _ValueSet from oops_fhir.utils import ValueSet from oops_fhir.r4.code_system.structure_map_group_type_mode import ( StructureMapGroupTypeMode as StructureMapGroupTypeMode_, ) __all__ = ["StructureMapGroupTypeMode"] _resource = _ValueSet...
true
true
f71262a1fa4b6dff99df3d2b7d5579426f7bbd7e
159
py
Python
dashboard/rest_api/admin.py
rauterRaphael/HomeMonitoringSystem
779379e2d6144ad11b79422eadebc753b6b936af
[ "MIT" ]
null
null
null
dashboard/rest_api/admin.py
rauterRaphael/HomeMonitoringSystem
779379e2d6144ad11b79422eadebc753b6b936af
[ "MIT" ]
null
null
null
dashboard/rest_api/admin.py
rauterRaphael/HomeMonitoringSystem
779379e2d6144ad11b79422eadebc753b6b936af
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import SensorNode from .models import SensorData admin.site.register(SensorNode) admin.site.register(SensorData)
26.5
32
0.842767
from django.contrib import admin from .models import SensorNode from .models import SensorData admin.site.register(SensorNode) admin.site.register(SensorData)
true
true
f712631dd46a7912b70ba0ceaad541d35c699caf
1,698
py
Python
gluon/serializers.py
arsfeld/fog-web2py
32263a03d4183dcaf7537c87edcb4e574d4bec6e
[ "BSD-3-Clause" ]
null
null
null
gluon/serializers.py
arsfeld/fog-web2py
32263a03d4183dcaf7537c87edcb4e574d4bec6e
[ "BSD-3-Clause" ]
null
null
null
gluon/serializers.py
arsfeld/fog-web2py
32263a03d4183dcaf7537c87edcb4e574d4bec6e
[ "BSD-3-Clause" ]
1
2019-03-13T08:20:25.000Z
2019-03-13T08:20:25.000Z
""" This file is part of web2py Web Framework (Copyrighted, 2007-2009). Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>. License: GPL v2 """ import datetime from storage import Storage from html import * import contrib.simplejson as simplejson import contrib.rss2 as rss2 def xml_rec(value, key): if isins...
32.037736
87
0.515901
import datetime from storage import Storage from html import * import contrib.simplejson as simplejson import contrib.rss2 as rss2 def xml_rec(value, key): if isinstance(value, (dict, Storage)): return TAG[key](*[TAG[k](xml_rec(v, '')) for k, v in value.items()]) elif isinstance(value, list): ...
true
true
f712644582d0d626da065aaa558a9d554e67fef2
607
py
Python
tree/0235-lowest-common-ancestor-of-a-binary-search-tree.py
ZHUANGHP/LeetCode-Solution-Python
af2b14abb7f50ee061bcd601c8666b32e448cbd8
[ "Apache-2.0" ]
1
2021-01-10T17:03:21.000Z
2021-01-10T17:03:21.000Z
tree/Python/0235-lowest-common-ancestor-of-a-binary-search-tree.py
Eddiehugh/LeetCode-Solution-Well-Formed
bdc1e7153de737b84890153434bf8df5838d0be5
[ "Apache-2.0" ]
null
null
null
tree/Python/0235-lowest-common-ancestor-of-a-binary-search-tree.py
Eddiehugh/LeetCode-Solution-Well-Formed
bdc1e7153de737b84890153434bf8df5838d0be5
[ "Apache-2.0" ]
1
2021-07-25T07:53:14.000Z
2021-07-25T07:53:14.000Z
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode': # 介于二者之间 if p.val <= root.val <= q.val or q.val <= root.val <= p.val: ...
30.35
97
0.551895
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode': if p.val <= root.val <= q.val or q.val <= root.val <= p.val: ...
true
true
f7126471b40c746e28b73ed7a44e1e6dbe399432
6,078
py
Python
train_procgen/evaluate.py
eunice-chan/train-procgen
3f7cc3e54c535ed41aa9cb510f408e87d74c87aa
[ "MIT" ]
null
null
null
train_procgen/evaluate.py
eunice-chan/train-procgen
3f7cc3e54c535ed41aa9cb510f408e87d74c87aa
[ "MIT" ]
null
null
null
train_procgen/evaluate.py
eunice-chan/train-procgen
3f7cc3e54c535ed41aa9cb510f408e87d74c87aa
[ "MIT" ]
null
null
null
import tensorflow as tf from baselines.ppo2 import ppo2 from baselines.common.models import build_impala_cnn from baselines.common.mpi_util import setup_mpi_gpus from procgen import ProcgenEnv from baselines.common.vec_env import ( VecExtractDictObs, VecMonitor, VecFrameStack, VecNormalize ) from baseli...
32.677419
170
0.625535
import tensorflow as tf from baselines.ppo2 import ppo2 from baselines.common.models import build_impala_cnn from baselines.common.mpi_util import setup_mpi_gpus from procgen import ProcgenEnv from baselines.common.vec_env import ( VecExtractDictObs, VecMonitor, VecFrameStack, VecNormalize ) from baseli...
true
true
f712655dfe98551aa97352625a87ccfdb2e4f869
676
py
Python
desafios/desafio088.py
carlosdaniel-cyber/my-python-exercises
0d6b2874448e0bc1f8c4a5948b0beae56b95ba6b
[ "MIT" ]
null
null
null
desafios/desafio088.py
carlosdaniel-cyber/my-python-exercises
0d6b2874448e0bc1f8c4a5948b0beae56b95ba6b
[ "MIT" ]
null
null
null
desafios/desafio088.py
carlosdaniel-cyber/my-python-exercises
0d6b2874448e0bc1f8c4a5948b0beae56b95ba6b
[ "MIT" ]
null
null
null
from random import randint from time import sleep lista = list() jogos = list() print('-' * 30) print('{:^30}'.format('JOGA NA MEGA SENA')) print('-' * 30) quant = int(input('Quantos jogos você quer que eu sorteie? ')) tot = 1 while tot <= quant: cont = 0 while True: num = randint(1, 60) if num ...
24.142857
62
0.529586
from random import randint from time import sleep lista = list() jogos = list() print('-' * 30) print('{:^30}'.format('JOGA NA MEGA SENA')) print('-' * 30) quant = int(input('Quantos jogos você quer que eu sorteie? ')) tot = 1 while tot <= quant: cont = 0 while True: num = randint(1, 60) if num ...
true
true
f71265d8ccf2f9737c224cfb6315a7d1c3ce1f16
407
py
Python
ChamberOfSecret/ChamberOfSecret/wsgi.py
fallprojects/ChamberOfSecrets
d6a2eb39b4f8e75cc05d9bd14a191859c42411ff
[ "MIT" ]
null
null
null
ChamberOfSecret/ChamberOfSecret/wsgi.py
fallprojects/ChamberOfSecrets
d6a2eb39b4f8e75cc05d9bd14a191859c42411ff
[ "MIT" ]
null
null
null
ChamberOfSecret/ChamberOfSecret/wsgi.py
fallprojects/ChamberOfSecrets
d6a2eb39b4f8e75cc05d9bd14a191859c42411ff
[ "MIT" ]
null
null
null
""" WSGI config for ChamberOfSecret project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJAN...
23.941176
78
0.793612
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ChamberOfSecret.settings') application = get_wsgi_application()
true
true
f71265f65162064d6c1778d96bed8a943c14edc0
5,262
py
Python
tests/test_pytest_plugin.py
cisaacstern/nbmake
6e778bef7a4743c72ae141b77c64af848861c823
[ "Apache-2.0" ]
null
null
null
tests/test_pytest_plugin.py
cisaacstern/nbmake
6e778bef7a4743c72ae141b77c64af848861c823
[ "Apache-2.0" ]
null
null
null
tests/test_pytest_plugin.py
cisaacstern/nbmake
6e778bef7a4743c72ae141b77c64af848861c823
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import os from importlib import import_module, reload from pathlib import Path from _pytest.pytester import Testdir from nbformat import read from pytest import ExitCode from .helper import failing_nb, passing_nb, write_nb pytest_plugins = "pytester" NB_VERSION = 4 def test_i...
28.597826
77
0.672938
from __future__ import print_function import os from importlib import import_module, reload from pathlib import Path from _pytest.pytester import Testdir from nbformat import read from pytest import ExitCode from .helper import failing_nb, passing_nb, write_nb pytest_plugins = "pytester" NB_VERSION = 4 def test_i...
true
true
f712665ff9f9d1e439ce0c92270beff7c13ece96
5,946
py
Python
orchestra/orchestra_api.py
code-review-doctor/orchestra
1ba58d26c508e89d2050dc9b0c8439eb1eadd014
[ "Apache-2.0" ]
444
2016-07-25T05:24:30.000Z
2022-02-21T08:12:29.000Z
orchestra/orchestra_api.py
code-review-doctor/orchestra
1ba58d26c508e89d2050dc9b0c8439eb1eadd014
[ "Apache-2.0" ]
395
2016-07-26T20:49:59.000Z
2022-03-15T20:58:45.000Z
orchestra/orchestra_api.py
code-review-doctor/orchestra
1ba58d26c508e89d2050dc9b0c8439eb1eadd014
[ "Apache-2.0" ]
63
2016-07-26T04:10:21.000Z
2022-03-29T03:32:19.000Z
""" This is the Orchestra Project Python API. TODO(marcua): Move this file to its own pip/github project. """ import json import logging from datetime import datetime from time import mktime from wsgiref.handlers import format_date_time import requests from django.conf import settings from httpsig.requests_auth impo...
34.569767
132
0.642281
import json import logging from datetime import datetime from time import mktime from wsgiref.handlers import format_date_time import requests from django.conf import settings from httpsig.requests_auth import HTTPSignatureAuth from orchestra.utils.convert_key_to_int import convert_key_to_int logger = logging.getLog...
true
true
f71266d23d71118d9c2765c99307e0589386cead
2,826
py
Python
ssm-backup-restore/ssm-backup/v1/src/createBucket.py
RichMerritt/aws-service-catalog-products
477f347ff944e5148cb1cf6620440fd490d1a128
[ "MIT-0" ]
137
2019-06-25T18:52:54.000Z
2022-03-31T19:46:55.000Z
ssm-backup-restore/ssm-backup/v1/src/createBucket.py
RichMerritt/aws-service-catalog-products
477f347ff944e5148cb1cf6620440fd490d1a128
[ "MIT-0" ]
22
2019-11-28T13:33:44.000Z
2022-01-07T16:28:38.000Z
ssm-backup-restore/ssm-backup/v1/src/createBucket.py
RichMerritt/aws-service-catalog-products
477f347ff944e5148cb1cf6620440fd490d1a128
[ "MIT-0" ]
36
2019-07-11T13:52:11.000Z
2022-01-17T11:29:57.000Z
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import boto3 import os, logging, json from botocore.retries import bucket #from pkg_resources import Version from crhelper import CfnResource from botocore.exceptions import ClientError # declare helper an...
30.387097
78
0.697452
import boto3 import os, logging, json from botocore.retries import bucket from crhelper import CfnResource from botocore.exceptions import ClientError helper = CfnResource() logger = logging.getLogger() logger.setLevel(logging.INFO) DrRegion = os.environ['DrRegion'] S3BucketName = os.environ['S3BucketName'] Origina...
true
true
f7126844619b8f907619cbc94b7b7809c766b950
2,692
py
Python
cnsyn/simwords.py
shangfr/Chinese-Synonyms
d10ebc379e1cedba2658197098e33b03d47deaae
[ "Apache-2.0" ]
2
2021-06-07T08:01:43.000Z
2021-10-06T11:41:08.000Z
cnsyn/simwords.py
shangfr/Chinese-Synonyms
d10ebc379e1cedba2658197098e33b03d47deaae
[ "Apache-2.0" ]
4
2021-07-09T07:39:48.000Z
2022-03-06T13:02:12.000Z
cnsyn/simwords.py
shangfr/Chinese-Synonyms
d10ebc379e1cedba2658197098e33b03d47deaae
[ "Apache-2.0" ]
1
2021-09-29T13:09:18.000Z
2021-09-29T13:09:18.000Z
# -*- coding: utf-8 -*- """ Created on Thu Jun 3 17:03:45 2021 @author: shangfr """ import joblib import operator from functools import reduce from whoosh.index import open_dir from whoosh.qparser import QueryParser import pkg_resources INDEX_DIR = pkg_resources.resource_filename('cnsyn', 'query') ix = open_dir(INDE...
22.813559
114
0.580238
import joblib import operator from functools import reduce from whoosh.index import open_dir from whoosh.qparser import QueryParser import pkg_resources INDEX_DIR = pkg_resources.resource_filename('cnsyn', 'query') ix = open_dir(INDEX_DIR) words_tree = joblib.load(INDEX_DIR+'/words_tree_mini.m') tree_model = words_...
true
true
f712685ea77269f0bc0b5c61143b7d35555e7d54
2,033
py
Python
launch/test/launch/test_launch_description_source.py
bedieber/launch
4dfe69763379e405df7a21bde536aad7e39fdd93
[ "Apache-2.0" ]
67
2015-06-12T21:17:24.000Z
2022-03-30T07:19:52.000Z
launch/test/launch/test_launch_description_source.py
bedieber/launch
4dfe69763379e405df7a21bde536aad7e39fdd93
[ "Apache-2.0" ]
516
2015-03-20T02:22:59.000Z
2022-03-30T12:33:33.000Z
launch/test/launch/test_launch_description_source.py
bedieber/launch
4dfe69763379e405df7a21bde536aad7e39fdd93
[ "Apache-2.0" ]
101
2016-01-12T16:56:54.000Z
2022-03-09T12:35:37.000Z
# Copyright 2018 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
36.303571
82
0.755042
from launch import LaunchDescription from launch import LaunchDescriptionSource import pytest def test_launch_description_source_constructors(): LaunchDescriptionSource() LaunchDescriptionSource(LaunchDescription()) LaunchDescriptionSource(LaunchDescription(), 'location') LaunchDescriptionSource(La...
true
true
f712698545176d3bdc6137c1c8f3876b1ca93e98
18,189
py
Python
pyamg/aggregation/aggregation.py
thomasjpfan/pyamg
b0904d31c8da0c29affcd7d0fcd2bb8cb910b42a
[ "MIT" ]
null
null
null
pyamg/aggregation/aggregation.py
thomasjpfan/pyamg
b0904d31c8da0c29affcd7d0fcd2bb8cb910b42a
[ "MIT" ]
null
null
null
pyamg/aggregation/aggregation.py
thomasjpfan/pyamg
b0904d31c8da0c29affcd7d0fcd2bb8cb910b42a
[ "MIT" ]
null
null
null
"""Support for aggregation-based AMG.""" from __future__ import absolute_import from warnings import warn import numpy as np from scipy.sparse import csr_matrix, isspmatrix_csr, isspmatrix_bsr,\ SparseEfficiencyWarning from pyamg.multilevel import multilevel_solver from pyamg.relaxation.smoothing import change_s...
42.398601
114
0.622684
from __future__ import absolute_import from warnings import warn import numpy as np from scipy.sparse import csr_matrix, isspmatrix_csr, isspmatrix_bsr,\ SparseEfficiencyWarning from pyamg.multilevel import multilevel_solver from pyamg.relaxation.smoothing import change_smoothers from pyamg.util.utils import rel...
true
true
f7126ad3afe9b6474cb77c16ca475808b6e3ec82
3,759
py
Python
test/functional/rpc_blockchain.py
Supernode-SUNO/SUNO
6b34a154671597b6e072eeecf336d2d3d38ee6bb
[ "MIT" ]
null
null
null
test/functional/rpc_blockchain.py
Supernode-SUNO/SUNO
6b34a154671597b6e072eeecf336d2d3d38ee6bb
[ "MIT" ]
null
null
null
test/functional/rpc_blockchain.py
Supernode-SUNO/SUNO
6b34a154671597b6e072eeecf336d2d3d38ee6bb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPCs related to blockchainstate. Test the following RPCs: - getblockchaininfo - gettxouts...
33.265487
87
0.661612
from decimal import Decimal import http.client import subprocess from test_framework.test_framework import SupernodeCoinTestFramework from test_framework.util import ( assert_equal, assert_greater_than, assert_greater_than_or_equal, assert_raises, assert_raises_rpc_error, assert_is_hex_string,...
true
true
f7126e6712f0ab03b54bb947e5e645e549743a04
1,345
py
Python
app_PyQtArnold_RenderTest/app_PyQtArnold_RenderTest.py
fidelm02/CS_TestsDec
10ac9a72c214fd4e48fd3e2f0a85bee6227ba287
[ "Unlicense" ]
null
null
null
app_PyQtArnold_RenderTest/app_PyQtArnold_RenderTest.py
fidelm02/CS_TestsDec
10ac9a72c214fd4e48fd3e2f0a85bee6227ba287
[ "Unlicense" ]
null
null
null
app_PyQtArnold_RenderTest/app_PyQtArnold_RenderTest.py
fidelm02/CS_TestsDec
10ac9a72c214fd4e48fd3e2f0a85bee6227ba287
[ "Unlicense" ]
null
null
null
import os import sys import ctypes from os import listdir, path from os.path import isfile from PyQt4.QtGui import * from PyQt4.QtCore import * # Before using arnold! # I have to load dll manually # Problem using dlls s_path = "C:/solidangle/arnold/Arnold-5.2.2.0-windows/bin" if os.access(s_path, os.F_OK): dlls...
25.865385
81
0.689963
import os import sys import ctypes from os import listdir, path from os.path import isfile from PyQt4.QtGui import * from PyQt4.QtCore import * s_path = "C:/solidangle/arnold/Arnold-5.2.2.0-windows/bin" if os.access(s_path, os.F_OK): dlls = [dll for dll in listdir(s_path) if isfile(path.join(s_path, dll)) and ...
false
true
f7126ee475f178783dfefa522a964ee36fc9b483
32,386
py
Python
ansible/venv/lib/python2.7/site-packages/ansible_test/_internal/classification.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/venv/lib/python2.7/site-packages/ansible_test/_internal/classification.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
ansible/venv/lib/python2.7/site-packages/ansible_test/_internal/classification.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
"""Classify changes in Ansible code.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import collections import os import re import time from . import types as t from .target import ( walk_module_targets, walk_integration_targets, walk_units_targets, walk_com...
35.746137
143
0.563083
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import collections import os import re import time from . import types as t from .target import ( walk_module_targets, walk_integration_targets, walk_units_targets, walk_compile_targets, walk_sanity_targets, ...
true
true
f71270623066ce0f64ac669824c3619afe6b96f2
4,501
py
Python
lagou/Lagou.py
awesome-archive/awesome-python-login-model
98aecab631a717934efc308c873fd00cbc6ef930
[ "MIT" ]
2
2019-04-12T15:10:02.000Z
2019-04-12T15:11:18.000Z
lagou/Lagou.py
masdude/awesome-python-login-model
aa67e633c0be8634081bae9fa1ed218c1f9fb75c
[ "MIT" ]
null
null
null
lagou/Lagou.py
masdude/awesome-python-login-model
aa67e633c0be8634081bae9fa1ed218c1f9fb75c
[ "MIT" ]
1
2019-03-31T15:45:36.000Z
2019-03-31T15:45:36.000Z
# -*- coding:utf-8 -*- import re import os import time import json import sys import subprocess import requests import hashlib from bs4 import BeautifulSoup """ info: author:CriseLYJ github:https://github.com/CriseLYJ/ update_time:2019-3-6 """ class Lagou_login(object): def __init__(self): self.session ...
33.589552
111
0.574539
import re import os import time import json import sys import subprocess import requests import hashlib from bs4 import BeautifulSoup class Lagou_login(object): def __init__(self): self.session = requests.session() self.CaptchaImagePath = os.path.split(os.path.realpath(__file__))[0] + os.sep + '...
true
true
f71270dddbb1aa8d8a6c054358b673f11e5dcadc
806
py
Python
hw/hw9/hw9.py
RachelKes/Python
ab4778f35a640b5026d195c6fe823139674795b2
[ "MIT" ]
null
null
null
hw/hw9/hw9.py
RachelKes/Python
ab4778f35a640b5026d195c6fe823139674795b2
[ "MIT" ]
null
null
null
hw/hw9/hw9.py
RachelKes/Python
ab4778f35a640b5026d195c6fe823139674795b2
[ "MIT" ]
null
null
null
#! /usr/bin/python3 # Define the class DVD class DVD: def __init__(self, title, studio, director, released): self.__title = title self.__studio = studio self.__director = director self.__released = released def get_title(self): return self.__title def get_studio(se...
23.705882
100
0.643921
class DVD: def __init__(self, title, studio, director, released): self.__title = title self.__studio = studio self.__director = director self.__released = released def get_title(self): return self.__title def get_studio(self): return self.__studio def ...
true
true
f712712b71c9ede3280ea8e777766e97f23d9e16
370
py
Python
tutorial/pipelines/PricePipeline.py
richasdy/scrapy-tutorial
426c1a885874a087fd49f4b5bec62653e8821744
[ "MIT" ]
null
null
null
tutorial/pipelines/PricePipeline.py
richasdy/scrapy-tutorial
426c1a885874a087fd49f4b5bec62653e8821744
[ "MIT" ]
null
null
null
tutorial/pipelines/PricePipeline.py
richasdy/scrapy-tutorial
426c1a885874a087fd49f4b5bec62653e8821744
[ "MIT" ]
null
null
null
from scrapy.exceptions import DropItem class PricePipeline(object): vat_factor = 1.15 def process_item(self, item, spider): if item.get('price'): if item.get('price_excludes_vat'): item['price'] = item['price'] * self.vat_factor return item else: ...
28.461538
63
0.591892
from scrapy.exceptions import DropItem class PricePipeline(object): vat_factor = 1.15 def process_item(self, item, spider): if item.get('price'): if item.get('price_excludes_vat'): item['price'] = item['price'] * self.vat_factor return item else: ...
true
true
f7127196db041d8968074b85d2e16fbbbc5392c8
11,971
py
Python
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_health_monitor_option.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_health_monitor_option.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_health_monitor_option.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six class UpdateHealthMonitorOption: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and th...
29.340686
224
0.621168
import pprint import re import six class UpdateHealthMonitorOption: sensitive_list = [] openapi_types = { 'admin_state_up': 'bool', 'delay': 'int', 'domain_name': 'str', 'expected_codes': 'str', 'http_method': 'str', 'max_retries': 'int', 'max_r...
true
true
f71271ae1ce278a8d9972bde890de51c71c76bf4
908
py
Python
migrations/versions/d4c798575877_create_favorites.py
jodevsa/redash
021068688db82e3a7092b4bb202e37c652bd6f64
[ "BSD-2-Clause" ]
8
2019-05-05T10:33:43.000Z
2021-07-14T11:21:52.000Z
migrations/versions/d4c798575877_create_favorites.py
jodevsa/redash
021068688db82e3a7092b4bb202e37c652bd6f64
[ "BSD-2-Clause" ]
187
2019-08-14T02:55:59.000Z
2022-03-22T17:55:17.000Z
migrations/versions/d4c798575877_create_favorites.py
tradingfoe/redash-clone
94065b8dce0e27f6f40a7adc2b99e078b03115b3
[ "BSD-2-Clause" ]
15
2019-06-29T13:58:00.000Z
2022-02-27T14:57:03.000Z
"""empty message Revision ID: d4c798575877 Revises: 1daa601d3ae5 Create Date: 2018-05-09 10:28:22.931442 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd4c798575877' down_revision = '1daa601d3ae5' branch_labels = None depends_on = None def upgrade(): op...
26.705882
76
0.682819
from alembic import op import sqlalchemy as sa revision = 'd4c798575877' down_revision = '1daa601d3ae5' branch_labels = None depends_on = None def upgrade(): op.create_table('favorites', sa.Column('updated_at', sa.DateTime(timezone=True), nullable=False), sa.Column('created_at', sa.DateTime(time...
true
true
f71272525b73c6bec77faab04adc92dcd678c3cc
97
py
Python
apps.py
Rexypoo/shortnsweet
e773f01f2fdd6630b8d649232b48a753aa387c4f
[ "Apache-2.0" ]
null
null
null
apps.py
Rexypoo/shortnsweet
e773f01f2fdd6630b8d649232b48a753aa387c4f
[ "Apache-2.0" ]
null
null
null
apps.py
Rexypoo/shortnsweet
e773f01f2fdd6630b8d649232b48a753aa387c4f
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class ShortnsweetConfig(AppConfig): name = 'shortnsweet'
16.166667
35
0.773196
from django.apps import AppConfig class ShortnsweetConfig(AppConfig): name = 'shortnsweet'
true
true
f71272b1c59e22659a458ee2eca0aaaf0b318b13
1,819
py
Python
tests/grad_check.py
musyoku/deep-q-learning
278e7e7d6eb6e112eb2cc480cc6019c5042899d3
[ "MIT" ]
27
2016-03-30T06:26:07.000Z
2019-12-08T20:35:14.000Z
tests/grad_check.py
musyoku/deep-q-learning
278e7e7d6eb6e112eb2cc480cc6019c5042899d3
[ "MIT" ]
null
null
null
tests/grad_check.py
musyoku/deep-q-learning
278e7e7d6eb6e112eb2cc480cc6019c5042899d3
[ "MIT" ]
8
2016-05-27T07:23:59.000Z
2019-11-22T18:57:40.000Z
# -*- coding: utf-8 -*- import sys, os from chainer import cuda, optimizers, gradient_check, Variable sys.path.append(os.path.split(os.getcwd())[0]) from ddqn import * from config import config # Override config config.ale_actions = [4, 3, 1, 0] config.ale_screen_size = [210, 160] config.ale_scaled_screen_size = [84, ...
35.666667
195
0.760308
import sys, os from chainer import cuda, optimizers, gradient_check, Variable sys.path.append(os.path.split(os.getcwd())[0]) from ddqn import * from config import config config.ale_actions = [4, 3, 1, 0] config.ale_screen_size = [210, 160] config.ale_scaled_screen_size = [84, 84] config.rl_replay_memory_size = 10 ** 5...
false
true
f71272e8e92da38f391aee78dd99a6c81fa425f7
2,717
py
Python
src/gedml/core/collectors/__init__.py
wangck20/GeDML
1f76ac2094d7b88be7fd4eb6145e5586e547b9ca
[ "MIT" ]
null
null
null
src/gedml/core/collectors/__init__.py
wangck20/GeDML
1f76ac2094d7b88be7fd4eb6145e5586e547b9ca
[ "MIT" ]
null
null
null
src/gedml/core/collectors/__init__.py
wangck20/GeDML
1f76ac2094d7b88be7fd4eb6145e5586e547b9ca
[ "MIT" ]
null
null
null
""" Collectors have two main functions: synthesizing (or collecting) samples and compute metric matrix (which will be passed to selectors and losses). All methods are listed below: +-----------------------+-------------------------------------------------------------------------------+ | method | desc...
57.808511
161
0.3364
from .iteration_collectors import ( DefaultCollector, ProxyCollector, MoCoCollector, SimSiamCollector, HDMLCollector, DAMLCollector, DVMLCollector ) from .epoch_collectors import ( GlobalProxyCollector, _DefaultGlobalCollector ) from .base_collector import BaseCollector
true
true
f712745218b54af6d0e78a4a5b0a24f3dd9c0b7e
1,182
py
Python
PythonBaseDemo/fileIOdemo/12.5/read_test3.py
CypHelp/TestNewWorldDemo
ee6f73df05756f191c1c56250fa290461fdd1b9a
[ "Apache-2.0" ]
null
null
null
PythonBaseDemo/fileIOdemo/12.5/read_test3.py
CypHelp/TestNewWorldDemo
ee6f73df05756f191c1c56250fa290461fdd1b9a
[ "Apache-2.0" ]
null
null
null
PythonBaseDemo/fileIOdemo/12.5/read_test3.py
CypHelp/TestNewWorldDemo
ee6f73df05756f191c1c56250fa290461fdd1b9a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 ######################################################################### # 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> # # author yeeku.H.lee kongyeeku@163.com # # # # version 1.0 ...
56.285714
73
0.220812
f = open("read_test3.py", 'rb', True) print(f.read().decode('utf-8')) f.close()
true
true
f7127453fe4f7e6fc172191277f700ee4c05c188
9,508
py
Python
FWCore/Framework/test/test_global_modules_cfg.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
FWCore/Framework/test/test_global_modules_cfg.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
FWCore/Framework/test/test_global_modules_cfg.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms nEvtLumi = 4 nEvtRun = 2*nEvtLumi nRuns = 64 nStreams = 4 nEvt = nRuns*nEvtRun process = cms.Process("TESTGLOBALMODULES") import FWCore.Framework.test.cmsExceptionsFatalOption_cff process.options = cms.untracked.PSet( numberOfStreams = cms.untracked.uint32(nStreams), ...
38.032
104
0.703092
import FWCore.ParameterSet.Config as cms nEvtLumi = 4 nEvtRun = 2*nEvtLumi nRuns = 64 nStreams = 4 nEvt = nRuns*nEvtRun process = cms.Process("TESTGLOBALMODULES") import FWCore.Framework.test.cmsExceptionsFatalOption_cff process.options = cms.untracked.PSet( numberOfStreams = cms.untracked.uint32(nStreams), ...
true
true
f71274937b53f99b8ac692f66d659a37d1abfa55
1,380
py
Python
startrackerpy/test_algorithm.py
granasat/startrackerpy
2f1c97c255d9d55dbc467779e95e23d7e1120f21
[ "MIT" ]
1
2021-11-27T12:11:56.000Z
2021-11-27T12:11:56.000Z
startrackerpy/test_algorithm.py
granasat/startrackerpy
2f1c97c255d9d55dbc467779e95e23d7e1120f21
[ "MIT" ]
null
null
null
startrackerpy/test_algorithm.py
granasat/startrackerpy
2f1c97c255d9d55dbc467779e95e23d7e1120f21
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import cv2 import time import os from server.startracker.catalog import Catalog from server.startracker.image import ImageUtils assets_dir = "/home/igarcia/Nextcloud/University/TFG/reports/assets" catalogs_path = "./server/startracker/catalogs/out" catalog = Catalog(f"{catalogs_path}/hip_2000.cs...
33.658537
79
0.695652
import cv2 import time import os from server.startracker.catalog import Catalog from server.startracker.image import ImageUtils assets_dir = "/home/igarcia/Nextcloud/University/TFG/reports/assets" catalogs_path = "./server/startracker/catalogs/out" catalog = Catalog(f"{catalogs_path}/hip_2000.csv", ...
true
true
f71274f29a271ef190bb94d7834517ef1a8a2c2a
7,830
py
Python
gui/qt/seed_dialog.py
AndrewWelc/electrum-stak
4cf4a945f33c7af4b410861d86d9762fdff31a4b
[ "MIT" ]
null
null
null
gui/qt/seed_dialog.py
AndrewWelc/electrum-stak
4cf4a945f33c7af4b410861d86d9762fdff31a4b
[ "MIT" ]
null
null
null
gui/qt/seed_dialog.py
AndrewWelc/electrum-stak
4cf4a945f33c7af4b410861d86d9762fdff31a4b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Electrum - lightweight STRAKS client # Copyright (C) 2013 ecdsa@github # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without lim...
39.746193
128
0.620945
from electrum_stak.i18n import _ from electrum_stak.mnemonic import Mnemonic import electrum_stak.old_mnemonic from .util import * from .qrtextedit import ShowQRTextEdit, ScanQRTextEdit from .completion_text_edit import CompletionTextEdit def seed_warning_msg(seed): return ''.join([ "<p>", _("Ple...
true
true
f712757e759c29dc046b8e0d46d3c201b6b8294d
3,466
py
Python
pclima/api.py
felipeodorizi/pclima
8428db91e0aa7fa0b32893399cb1f82cb8b0fe73
[ "MIT" ]
null
null
null
pclima/api.py
felipeodorizi/pclima
8428db91e0aa7fa0b32893399cb1f82cb8b0fe73
[ "MIT" ]
null
null
null
pclima/api.py
felipeodorizi/pclima
8428db91e0aa7fa0b32893399cb1f82cb8b0fe73
[ "MIT" ]
null
null
null
""" Módulo para recuperação de dados climáticos do PCBr. A documentação do Projeto pode ser encontrada no Portal http://pclima.inpe.br/ As escolhas para o download de dados são definidas através de um JSON que pode ser gerado utilizando do Portal API. http://pclima.inpe.br/anali...
26.06015
311
0.539815
import os import json from pclima.factory import RequestFactory class Client(object): def __init__(self, token=os.environ.get("API_TOKEN"),): self.token = token self.format = None dotrc = os.environ.get("PCLIMAAPI_RC", os.path.expanduser("~/.pclimaAPIrc")) if token is None: ...
true
true
f7127631ea7b180440afc8e03d98802793f87c99
3,194
py
Python
alipay/aop/api/request/AnttechBlockchainQueryconditionQueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AnttechBlockchainQueryconditionQueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AnttechBlockchainQueryconditionQueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AnttechBlockchainQueryconditionQueryRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model self._version =...
24.953125
142
0.637445
import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AnttechBlockchainQueryconditionQueryRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model self._version = "1.0" self._terminal_type = None ...
true
true
f712775a416078f291cd395ca0f5537b75bb4922
12,155
py
Python
elifearticle/article.py
elifesciences/elife-article
2345b25e9fee17e70c28ba022dbf60c1bc473fab
[ "MIT" ]
null
null
null
elifearticle/article.py
elifesciences/elife-article
2345b25e9fee17e70c28ba022dbf60c1bc473fab
[ "MIT" ]
65
2017-06-17T00:10:57.000Z
2020-07-13T23:52:50.000Z
elifearticle/article.py
elifesciences/elife-article
2345b25e9fee17e70c28ba022dbf60c1bc473fab
[ "MIT" ]
2
2017-05-26T21:36:58.000Z
2018-04-18T14:37:32.000Z
""" Article object definitions """ from collections import OrderedDict from elifearticle import utils class BaseObject: "base object for shared functions" def __str__(self): """ Return `str` representation of the simple object properties, if there is a list or dict just return an emp...
27.011111
91
0.607322
from collections import OrderedDict from elifearticle import utils class BaseObject: def __str__(self): _dict = {} for key in self.__dict__: if isinstance(self.__dict__.get(key), list): _dict[key] = [] elif isinstance(self.__dict__.get(key), dict): ...
true
true
f71277eab94bb0297b6f712e470438d13dc9e61f
6,021
py
Python
tests/test_testing.py
RichardRohac/bdemeta
8708fa6461eed2d8cf34204c59f10f980cdb3e96
[ "Unlicense" ]
null
null
null
tests/test_testing.py
RichardRohac/bdemeta
8708fa6461eed2d8cf34204c59f10f980cdb3e96
[ "Unlicense" ]
null
null
null
tests/test_testing.py
RichardRohac/bdemeta
8708fa6461eed2d8cf34204c59f10f980cdb3e96
[ "Unlicense" ]
null
null
null
# tests.test_testing import io from unittest import TestCase from unittest import mock from bdemeta.testing import trim, run_one, RunResult, run_tests, MockRunner def gen_value(length): result = '' for i in range(length): result += chr(ord('A') + (i % 26)) return result class TestMockRunner(Test...
34.016949
76
0.550739
import io from unittest import TestCase from unittest import mock from bdemeta.testing import trim, run_one, RunResult, run_tests, MockRunner def gen_value(length): result = '' for i in range(length): result += chr(ord('A') + (i % 26)) return result class TestMockRunner(TestCase): def test_n...
true
true
f7127944eb953303159b88ea3dcfb2c0f97d1645
7,562
py
Python
apps/goods/migrations/0001_initial.py
qq8663580/-
8d14178d6eba3b7d084e974db6a0ef67a7a58d76
[ "MIT" ]
null
null
null
apps/goods/migrations/0001_initial.py
qq8663580/-
8d14178d6eba3b7d084e974db6a0ef67a7a58d76
[ "MIT" ]
null
null
null
apps/goods/migrations/0001_initial.py
qq8663580/-
8d14178d6eba3b7d084e974db6a0ef67a7a58d76
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import tinymce.models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Goods', fields=[ ('id', m...
50.751678
123
0.560963
from __future__ import unicode_literals from django.db import models, migrations import tinymce.models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Goods', fields=[ ('id', models.AutoField(primary_...
true
true
f7127a11d527800b7e92f464de6ab7a932bb0f9a
12,462
py
Python
jams/errormeasures.py
MuellerSeb/jams_python
1bca04557da79d8f8a4c447f5ccc517c40ab7dfc
[ "MIT" ]
9
2019-06-03T03:24:16.000Z
2021-12-03T07:14:00.000Z
jams/errormeasures.py
MuellerSeb/jams_python
1bca04557da79d8f8a4c447f5ccc517c40ab7dfc
[ "MIT" ]
6
2020-03-25T21:56:59.000Z
2021-11-08T14:58:27.000Z
jams/errormeasures.py
MuellerSeb/jams_python
1bca04557da79d8f8a4c447f5ccc517c40ab7dfc
[ "MIT" ]
5
2019-10-17T12:04:33.000Z
2021-09-28T07:45:07.000Z
#!/usr/bin/env python from __future__ import division, absolute_import, print_function import numpy as np from scipy.stats import t """ Defines common error measures. Definition ---------- def bias(y_obs,y_mod): bias def mae(y_obs,y_mod): mean absolute error def mse(y_obs,y_mod...
35.707736
112
0.587947
from __future__ import division, absolute_import, print_function import numpy as np from scipy.stats import t def bias(y_obs,y_mod): return y_obs.mean() - y_mod.mean() def mae(y_obs,y_mod): if (y_obs.ndim!=1) or (y_mod.ndim!=1): ...
true
true
f7127ab5e3451b047ce29451d543033f17ceeee8
46,719
py
Python
sympy/combinatorics/fp_groups.py
clyring/sympy
54d7726c182065fc25df69b5d1030e568931d82f
[ "BSD-3-Clause" ]
8
2019-05-29T09:38:30.000Z
2021-01-20T03:36:59.000Z
sympy/combinatorics/fp_groups.py
clyring/sympy
54d7726c182065fc25df69b5d1030e568931d82f
[ "BSD-3-Clause" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
sympy/combinatorics/fp_groups.py
leosartaj/sympy
28d913d3cead6c5646307ffa6540b21d65059dfd
[ "BSD-3-Clause" ]
1
2018-10-21T06:32:46.000Z
2018-10-21T06:32:46.000Z
# -*- coding: utf-8 -*- """Finitely Presented Groups and its algorithms. """ from __future__ import print_function, division from sympy.core.basic import Basic from sympy.core import Symbol, Mod from sympy.printing.defaults import DefaultPrinting from sympy.utilities import public from sympy.utilities.iterables import...
35.608994
106
0.547229
from __future__ import print_function, division from sympy.core.basic import Basic from sympy.core import Symbol, Mod from sympy.printing.defaults import DefaultPrinting from sympy.utilities import public from sympy.utilities.iterables import flatten from sympy.combinatorics.free_groups import (FreeGroup, FreeGroupEle...
true
true
f7127b0d033286b6d1e1e6a82156b74831f49095
1,057
py
Python
NoteBooks/Curso de Python/Python/Examples/Serialization/JSON/custom.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
1
2021-02-26T13:12:22.000Z
2021-02-26T13:12:22.000Z
NoteBooks/Curso de Python/Python/Examples/Serialization/JSON/custom.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
NoteBooks/Curso de Python/Python/Examples/Serialization/JSON/custom.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
"""Example serializing custom types""" from datetime import datetime from event_two import event import json # Serializar def default(obj): """Encode datetime to string in YYYY-MM-DDTHH:MM:SS format (RFC3339)""" if isinstance(obj, datetime): return obj.isoformat() return obj def pairs_hook(pairs...
27.102564
75
0.61211
from datetime import datetime from event_two import event import json def default(obj): if isinstance(obj, datetime): return obj.isoformat() return obj def pairs_hook(pairs): obj = {} for key, value in pairs: if key == 'time': value = datetime.fromisoforma...
true
true
f7127b4817676406e11f75453468471ad9b74280
3,505
py
Python
migrater.py
lbesnard/subimporter
66affbca2acdb3c25e70dac23290b5e7b956c2d7
[ "MIT" ]
null
null
null
migrater.py
lbesnard/subimporter
66affbca2acdb3c25e70dac23290b5e7b956c2d7
[ "MIT" ]
1
2021-05-05T02:06:23.000Z
2021-05-06T00:42:53.000Z
migrater.py
lbesnard/subimporter
66affbca2acdb3c25e70dac23290b5e7b956c2d7
[ "MIT" ]
1
2021-05-05T01:56:07.000Z
2021-05-05T01:56:07.000Z
from utils import stringifySong from datetime import datetime import logging logger = logging.getLogger(__name__) class Migrater(object): """Migrater""" def __init__(self, migrateFrom, migrateTo, mock=False): # Store clients self.source = migrateFrom self.target = migrateTo s...
46.118421
121
0.564337
from utils import stringifySong from datetime import datetime import logging logger = logging.getLogger(__name__) class Migrater(object): def __init__(self, migrateFrom, migrateTo, mock=False): self.source = migrateFrom self.target = migrateTo self.isMocked = mock logger....
true
true
f7127c83037b6dcf82a783e81ec943a67a20303e
58,569
py
Python
discord/webhook/async_.py
julerobb1/discord.py
26457b6d5036b743d4e56fc4fb62fa9d7d500275
[ "MIT" ]
null
null
null
discord/webhook/async_.py
julerobb1/discord.py
26457b6d5036b743d4e56fc4fb62fa9d7d500275
[ "MIT" ]
null
null
null
discord/webhook/async_.py
julerobb1/discord.py
26457b6d5036b743d4e56fc4fb62fa9d7d500275
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
33.641011
125
0.591337
from __future__ import annotations import logging import asyncio import json import re from urllib.parse import quote as urlquote from typing import Any, Dict, List, Literal, Optional, TYPE_CHECKING, Tuple, Union, TypeVar, Type, overload from contextvars import ContextVar import weakref import aiohttp from .. impo...
true
true
f7127ca9ca5e4f251daf1403334c1ec7a9e8ea62
414
py
Python
flask_ember/generator/resource_generator.py
fr3akout/flask_ember
f3b3e28011571b8b58888be4fda4f42af0d4015c
[ "BSD-3-Clause" ]
null
null
null
flask_ember/generator/resource_generator.py
fr3akout/flask_ember
f3b3e28011571b8b58888be4fda4f42af0d4015c
[ "BSD-3-Clause" ]
null
null
null
flask_ember/generator/resource_generator.py
fr3akout/flask_ember
f3b3e28011571b8b58888be4fda4f42af0d4015c
[ "BSD-3-Clause" ]
null
null
null
from flask_ember.util.string import dasherize class ResourceGenerator: def __init__(self, ember, resource_class): self.ember = ember self.resource_class = resource_class def generate(self, app): # TODO generation of api endpoints etc resource = self.resource_class nam...
27.6
67
0.683575
from flask_ember.util.string import dasherize class ResourceGenerator: def __init__(self, ember, resource_class): self.ember = ember self.resource_class = resource_class def generate(self, app): resource = self.resource_class name = resource.__qualname__ app.a...
true
true
f7127db08f0293c27ec87a499abcd4f367e3e056
476
py
Python
aws_cloudtrail_rules/aws_security_configuration_change.py
designing-penguin/panther-analysis
26034cea4504f43227f8d3789225f6ca7b35dfe0
[ "Apache-2.0" ]
null
null
null
aws_cloudtrail_rules/aws_security_configuration_change.py
designing-penguin/panther-analysis
26034cea4504f43227f8d3789225f6ca7b35dfe0
[ "Apache-2.0" ]
null
null
null
aws_cloudtrail_rules/aws_security_configuration_change.py
designing-penguin/panther-analysis
26034cea4504f43227f8d3789225f6ca7b35dfe0
[ "Apache-2.0" ]
null
null
null
SECURITY_CONFIG_ACTIONS = [ 'DeleteAccountPublicAccessBlock', 'DeleteDeliveryChannel', 'DeleteDetector', 'DeleteFlowLogs', 'DeleteRule', 'DeleteTrail', 'DisableEbsEncryptionByDefault', 'DisableRule', 'StopConfigurationRecorder', 'StopLogging', ] def rule(event): if event['e...
23.8
65
0.693277
SECURITY_CONFIG_ACTIONS = [ 'DeleteAccountPublicAccessBlock', 'DeleteDeliveryChannel', 'DeleteDetector', 'DeleteFlowLogs', 'DeleteRule', 'DeleteTrail', 'DisableEbsEncryptionByDefault', 'DisableRule', 'StopConfigurationRecorder', 'StopLogging', ] def rule(event): if event['e...
true
true
f7127e9e66b7b0ba02de0bf7a439bdfc43a3cd4e
923
py
Python
import_new_tournaments/process_hh_files/process/tournament/extract/opponents.py
michaelcukier/Poker-Hand-Tracker
9adae42fab9f640e6939ba06bd588ab1a2feb90f
[ "MIT" ]
5
2021-02-28T18:33:02.000Z
2022-03-12T01:43:40.000Z
import_new_tournaments/process_hh_files/process/tournament/extract/opponents.py
michaelcukier/Poker-Hand-Tracker
9adae42fab9f640e6939ba06bd588ab1a2feb90f
[ "MIT" ]
null
null
null
import_new_tournaments/process_hh_files/process/tournament/extract/opponents.py
michaelcukier/Poker-Hand-Tracker
9adae42fab9f640e6939ba06bd588ab1a2feb90f
[ "MIT" ]
2
2021-03-01T03:08:04.000Z
2021-12-31T17:53:46.000Z
from GLOBAL_VARIABLES import PLAYER_NAME import copy def opponents(parent_folder_ts: str, ts_filename: str) -> list: """ Extracts the names of the players in a tournament Parameters: parent_folder_ts (str): the parent folder where the tournament summary file is located ...
27.147059
106
0.64247
from GLOBAL_VARIABLES import PLAYER_NAME import copy def opponents(parent_folder_ts: str, ts_filename: str) -> list: if ts_filename is None: return [] with open(parent_folder_ts + ts_filename, 'r') as f: data = f.read() ts = eval(copy.deepcopy(data)) opponents = [] for op...
true
true
f71280469edbad2c06fdb3bb1be58b7a4229687d
4,208
py
Python
architectures/gossip-learning/nodes/fog-node/code/classes/aged_model.py
Davide-DD/distributed-machine-learning-architectures
998d86368c4122ad9937b505405191b316afb060
[ "MIT" ]
2
2019-10-11T08:21:04.000Z
2021-05-28T01:27:13.000Z
architectures/gossip-learning/nodes/fog-node/code/classes/aged_model.py
Davide-DD/distributed-machine-learning-architectures
998d86368c4122ad9937b505405191b316afb060
[ "MIT" ]
null
null
null
architectures/gossip-learning/nodes/fog-node/code/classes/aged_model.py
Davide-DD/distributed-machine-learning-architectures
998d86368c4122ad9937b505405191b316afb060
[ "MIT" ]
2
2020-07-04T14:58:27.000Z
2021-02-28T16:36:28.000Z
from keras import backend as K from keras.models import * from keras.layers import * import os from datetime import datetime import tensorflow as tf import numpy as np class AgedModel: def __init__(self, model=None, age=None): self.graph = tf.Graph() with self.graph.as_default(): self.session = tf.Sessi...
34.77686
170
0.710314
from keras import backend as K from keras.models import * from keras.layers import * import os from datetime import datetime import tensorflow as tf import numpy as np class AgedModel: def __init__(self, model=None, age=None): self.graph = tf.Graph() with self.graph.as_default(): self.session = tf.Sessi...
true
true
f71280592f4c44005fbca790b66cb1a527889398
5,740
py
Python
pybaseball/teamid_lookup.py
mwisnie5/pybaseball
0a2a84d757e478aa79619100872ef48cf7da52c5
[ "MIT" ]
1
2021-01-09T01:44:07.000Z
2021-01-09T01:44:07.000Z
pybaseball/teamid_lookup.py
mwisnie5/pybaseball
0a2a84d757e478aa79619100872ef48cf7da52c5
[ "MIT" ]
null
null
null
pybaseball/teamid_lookup.py
mwisnie5/pybaseball
0a2a84d757e478aa79619100872ef48cf7da52c5
[ "MIT" ]
null
null
null
import logging import os from datetime import date from typing import Optional import pandas as pd from . import lahman from .datasources import fangraphs _DATA_FILENAME = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data', 'fangraphs_teams.csv') def team_ids(season: Optional[int] = None, league: str...
46.290323
119
0.637282
import logging import os from datetime import date from typing import Optional import pandas as pd from . import lahman from .datasources import fangraphs _DATA_FILENAME = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data', 'fangraphs_teams.csv') def team_ids(season: Optional[int] = None, league: str...
true
true
f712809f45cfc583d49727b26c0ec048c804a778
5,533
py
Python
ch8/main.py
antallen/PythonMaterial
c582fb1610610feb72002f43a3758d5c58d6da85
[ "MIT" ]
null
null
null
ch8/main.py
antallen/PythonMaterial
c582fb1610610feb72002f43a3758d5c58d6da85
[ "MIT" ]
null
null
null
ch8/main.py
antallen/PythonMaterial
c582fb1610610feb72002f43a3758d5c58d6da85
[ "MIT" ]
1
2021-07-23T09:59:15.000Z
2021-07-23T09:59:15.000Z
############################## # Project: 大富翁遊戲主程式 # # Version: 0.1 # # Date: 2021/07/15 # # Author: Antallen # # Content: 使用 Player 物件 ############################## # 引用 random 類別中的 randrange() 函數 from random import randrange # 引用 Player 物件 import Player # 引用 Chance 物件 import Ch...
29.747312
106
0.518164
from random import randrange import Player import Chance import Destiny import Stores import playMap import Messages areas = 24 def playerPo(steps): if (steps >= areas): nums = (steps % areas) return nums else: return steps def clearOldData(): files = open('players.csv','w',e...
true
true
f71281b3a634c06e0759b0de6f18e171a0d07dc7
179
py
Python
jk.py
agolla0440/my_python_workbook
3595037467e89e0950d0c356b2ba087e574e2bd9
[ "Apache-2.0" ]
null
null
null
jk.py
agolla0440/my_python_workbook
3595037467e89e0950d0c356b2ba087e574e2bd9
[ "Apache-2.0" ]
null
null
null
jk.py
agolla0440/my_python_workbook
3595037467e89e0950d0c356b2ba087e574e2bd9
[ "Apache-2.0" ]
null
null
null
import json # a Python object (dict): x = { "name": "John", "age": 30, "city": "New York" } # convert into JSON: y = json.dumps(x) # the result is a JSON string: print(y)
12.785714
30
0.592179
import json x = { "name": "John", "age": 30, "city": "New York" } y = json.dumps(x) print(y)
true
true
f7128269c13a5af8d4e01f7b58682048e01d9a6a
7,464
bzl
Python
utils/bazel/terminfo.bzl
acidburn0zzz/llvm-project
7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9
[ "Apache-2.0" ]
171
2020-07-24T19:18:09.000Z
2022-02-03T05:28:19.000Z
utils/bazel/terminfo.bzl
acidburn0zzz/llvm-project
7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9
[ "Apache-2.0" ]
127
2019-04-09T00:55:50.000Z
2022-03-21T15:35:41.000Z
utils/bazel/terminfo.bzl
acidburn0zzz/llvm-project
7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9
[ "Apache-2.0" ]
56
2020-07-31T08:10:51.000Z
2022-02-16T18:33:18.000Z
# This file is licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception """Repository rules to configure the terminfo used by LLVM. Most users should pick one of the explicit rules to configure th...
36.768473
115
0.674571
def _llvm_terminfo_disable_impl(repository_ctx): repository_ctx.template( "BUILD", repository_ctx.attr._disable_build_template, executable = False, ) _terminfo_disable_attrs = { "_disable_build_template": attr.label( default = Label("//deps_impl:terminfo_disable.BUILD"), ...
true
true
f71282720d98ed6335b43c02bd4967bd1a8faede
382
py
Python
hTools2.roboFontExt/lib/hTools2/dialogs/folder/__init__.py
gferreira/hTools2_extension
9e5150082a0a39847c1078aac3dc38d914a44f83
[ "BSD-3-Clause" ]
1
2015-02-10T14:47:39.000Z
2015-02-10T14:47:39.000Z
hTools2.roboFontExt/lib/hTools2/dialogs/folder/__init__.py
gferreira/hTools2_extension
9e5150082a0a39847c1078aac3dc38d914a44f83
[ "BSD-3-Clause" ]
2
2017-08-08T21:02:17.000Z
2019-12-18T15:55:48.000Z
hTools2.roboFontExt/lib/hTools2/dialogs/folder/__init__.py
gferreira/hTools2_extension
9e5150082a0a39847c1078aac3dc38d914a44f83
[ "BSD-3-Clause" ]
3
2015-08-17T04:09:05.000Z
2021-08-09T20:22:04.000Z
# dialogs.folder """A collection of dialogs to do things to all fonts in a given folder.""" # import from actions import actionsFolderDialog from ufo2otf import UFOsToOTFsDialog from otf2ufo import OTFsToUFOsDialog from woff2ufo import WOFFsToUFOsDialog # export __all__ = [ 'actionsFolderDialog', 'OTFsToUF...
19.1
74
0.76178
from actions import actionsFolderDialog from ufo2otf import UFOsToOTFsDialog from otf2ufo import OTFsToUFOsDialog from woff2ufo import WOFFsToUFOsDialog __all__ = [ 'actionsFolderDialog', 'OTFsToUFOsDialog', 'UFOsToOTFsDialog', 'WOFFsToUFOsDialog', ]
true
true
f712838b3a7e8ae184cec3c570036bc5dda9a935
206
py
Python
util/create_user.py
helloworld1292/cjd2
0170d871f81534ae3521a6d01ecdc226c1c0ab17
[ "Linux-OpenIB" ]
30
2019-01-14T13:03:26.000Z
2022-03-25T15:53:38.000Z
util/create_user.py
helloworld1292/cjd2
0170d871f81534ae3521a6d01ecdc226c1c0ab17
[ "Linux-OpenIB" ]
2
2020-04-06T19:16:40.000Z
2020-12-11T07:29:26.000Z
util/create_user.py
helloworld1292/cjd2
0170d871f81534ae3521a6d01ecdc226c1c0ab17
[ "Linux-OpenIB" ]
27
2019-07-02T15:31:02.000Z
2022-02-06T02:39:29.000Z
import sys,os sys.path.append(os.path.dirname(os.getcwd())) from app.models import User from app import db u = User(username=sys.argv[1]) u.set_password(sys.argv[2]) db.session.add(u) db.session.commit()
18.727273
45
0.742718
import sys,os sys.path.append(os.path.dirname(os.getcwd())) from app.models import User from app import db u = User(username=sys.argv[1]) u.set_password(sys.argv[2]) db.session.add(u) db.session.commit()
true
true
f71283d071ee7628f2c467f43d5def2c6870cebd
8,227
py
Python
src/tagui.sikuli/tagui.py
wei3hua2/TagUI
743322f9bc85a153021d58d11bf3441331abb992
[ "Apache-2.0" ]
1
2018-06-09T03:49:06.000Z
2018-06-09T03:49:06.000Z
src/tagui.sikuli/tagui.py
wei3hua2/TagUI
743322f9bc85a153021d58d11bf3441331abb992
[ "Apache-2.0" ]
null
null
null
src/tagui.sikuli/tagui.py
wei3hua2/TagUI
743322f9bc85a153021d58d11bf3441331abb992
[ "Apache-2.0" ]
null
null
null
# SIKULI INTERFACE FOR TAGUI FRAMEWORK ~ TEBEL.ORG # # timeout in seconds for finding a web element setAutoWaitTimeout(10) # delay in seconds between scanning for inputs scan_period = 0.5 # counter to track current tagui sikuli step tagui_count = '0' # prevent premature exit on unhandled exception setThrowException...
30.928571
83
0.695272
setAutoWaitTimeout(10) scan_period = 0.5 tagui_count = '0' setThrowException(False) Settings.OcrTextRead = True Settings.OcrTextSearch = True def tap_intent ( raw_intent ): params = (raw_intent + ' ')[1+(raw_intent + ' ').find(' '):].strip() print '[tagui] ACTION - click ' + params if exists(params): return ...
false
true
f712846b5fcffc687fe718db86971350724c707e
875
py
Python
setup.py
kids-first/kf-cavatica-python-tools
5f821511685dc63df8785a54c1ac31caebc2cba2
[ "Apache-2.0" ]
null
null
null
setup.py
kids-first/kf-cavatica-python-tools
5f821511685dc63df8785a54c1ac31caebc2cba2
[ "Apache-2.0" ]
10
2021-03-30T13:16:34.000Z
2021-08-10T19:17:29.000Z
setup.py
kids-first/kf-cavatica-python-tools
5f821511685dc63df8785a54c1ac31caebc2cba2
[ "Apache-2.0" ]
1
2022-02-04T04:13:48.000Z
2022-02-04T04:13:48.000Z
from os import path from setuptools import find_packages, setup # requirements from requirements.txt root_dir = path.dirname(path.abspath(__file__)) with open(path.join(root_dir, "requirements.txt"), "r") as f: requirements = f.read().splitlines() # long description from README with open(path.join(root_dir, "REA...
31.25
67
0.710857
from os import path from setuptools import find_packages, setup root_dir = path.dirname(path.abspath(__file__)) with open(path.join(root_dir, "requirements.txt"), "r") as f: requirements = f.read().splitlines() with open(path.join(root_dir, "README.md"), encoding="utf-8") as f: long_description = f.read() s...
true
true
f71284ca5d9caa0f6aed43505c57167940d7cc8b
6,073
py
Python
object_detection/utils/variables_helper.py
micsthepick/boxed-bottles
424cc0aec3e5d6897a38fc0507d9c609c9f78a1e
[ "MIT" ]
2
2020-05-21T09:07:00.000Z
2021-05-30T22:48:33.000Z
object_detection/utils/variables_helper.py
micsthepick/boxed-bottles
424cc0aec3e5d6897a38fc0507d9c609c9f78a1e
[ "MIT" ]
null
null
null
object_detection/utils/variables_helper.py
micsthepick/boxed-bottles
424cc0aec3e5d6897a38fc0507d9c609c9f78a1e
[ "MIT" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.929487
80
0.705582
from tensorflow import logging as logging import re import tensorflow as tf from tensorflow.python.ops import variables as tf_variables slim = tf.contrib.slim def filter_variables(variables, filter_regex_list, invert=False): kept_vars = [] variables_to_ignore_patterns = list(filter(None, filter_regex_list)) ...
true
true
f71284e483d827bfeff6a5215475111a9d1fb680
533
py
Python
src/frame.py
Hsinfu/NanChangPark
4226c2d91b9e0bf39582c928da65c73a77ea6d66
[ "MIT" ]
null
null
null
src/frame.py
Hsinfu/NanChangPark
4226c2d91b9e0bf39582c928da65c73a77ea6d66
[ "MIT" ]
null
null
null
src/frame.py
Hsinfu/NanChangPark
4226c2d91b9e0bf39582c928da65c73a77ea6d66
[ "MIT" ]
null
null
null
class Frame: def __init__(self, surface, imgs): self.idx = 0 self.imgs = imgs self.num = len(imgs) self.surface = surface @property def img(self): return self.imgs[self.idx] @property def is_last_frame(self): return self.idx == self.num - 1 def ...
20.5
43
0.527205
class Frame: def __init__(self, surface, imgs): self.idx = 0 self.imgs = imgs self.num = len(imgs) self.surface = surface @property def img(self): return self.imgs[self.idx] @property def is_last_frame(self): return self.idx == self.num - 1 def ...
true
true
f71285694e6552d08b9a5efead83949fb7529554
6,059
py
Python
gui.py
rakslice/spotify_playlist_apple_music
d98ae7b91872d8816d55e1f2e48a2b98e233f5b4
[ "MIT" ]
null
null
null
gui.py
rakslice/spotify_playlist_apple_music
d98ae7b91872d8816d55e1f2e48a2b98e233f5b4
[ "MIT" ]
8
2018-01-25T17:48:56.000Z
2018-01-27T10:56:55.000Z
gui.py
rakslice/spotify_playlist_apple_music
d98ae7b91872d8816d55e1f2e48a2b98e233f5b4
[ "MIT" ]
null
null
null
""" This is a little GUI to launch the playlist importer. It launches the import script in a command prompt window. """ import os import urllib2 import subprocess import sys # This requires wxPython 3.0.2.0. # For compatibility with virtualenv you can use the wheels from # https://www.lfd.uci.edu/~gohlke/pythonlibs...
33.661111
102
0.648292
""" This is a little GUI to launch the playlist importer. It launches the import script in a command prompt window. """ import os import urllib2 import subprocess import sys import wx import spotify_playlist_apple_music from gui_autogen import MyFrame from win_util import get_short_path_name def set_enabled(obj...
false
true