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
f7375c3466a45f3592ae08fd3f66147b9baac50b
4,419
py
Python
google/cloud/bigquery/opentelemetry_tracing.py
grooveygr/python-bigquery
54852ae18ce9e33e8d21968b3e4d62987bfcf129
[ "Apache-2.0" ]
null
null
null
google/cloud/bigquery/opentelemetry_tracing.py
grooveygr/python-bigquery
54852ae18ce9e33e8d21968b3e4d62987bfcf129
[ "Apache-2.0" ]
null
null
null
google/cloud/bigquery/opentelemetry_tracing.py
grooveygr/python-bigquery
54852ae18ce9e33e8d21968b3e4d62987bfcf129
[ "Apache-2.0" ]
1
2020-10-04T11:46:17.000Z
2020-10-04T11:46:17.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
35.926829
86
0.685449
import logging from contextlib import contextmanager from google.api_core.exceptions import GoogleAPICallError logger = logging.getLogger(__name__) try: from opentelemetry import trace from opentelemetry.instrumentation.utils import http_status_to_canonical_code from opentelemetry.trace.statu...
true
true
f7375c55dd3e96ada9b553d461fcb398eac1c10f
2,770
py
Python
client.py
Horze-International/hzpydav
4f854f75a710cd1fcc52034cfb09480849e074b8
[ "MIT" ]
null
null
null
client.py
Horze-International/hzpydav
4f854f75a710cd1fcc52034cfb09480849e074b8
[ "MIT" ]
null
null
null
client.py
Horze-International/hzpydav
4f854f75a710cd1fcc52034cfb09480849e074b8
[ "MIT" ]
null
null
null
import requests from bs4 import BeautifulSoup class Client: def __init__(self, base_url, user, passw, cert=None, cafile=None): self.base_url = base_url self.session = requests.Session() self.session.auth = (user, passw) self.session.cert = cert self.session.verify = cafile def exists(self, url): respons...
23.87931
104
0.659928
import requests from bs4 import BeautifulSoup class Client: def __init__(self, base_url, user, passw, cert=None, cafile=None): self.base_url = base_url self.session = requests.Session() self.session.auth = (user, passw) self.session.cert = cert self.session.verify = cafile def exists(self, url): respons...
true
true
f7375cd9a25ac50899ed01c5de9c119ce0ea561b
9,787
py
Python
configs/example/arm/devices.py
fusiled/gem5
670436b9cd7a23f03c9d7248abb8eb19939c83a6
[ "BSD-3-Clause" ]
22
2018-07-03T16:46:51.000Z
2022-03-22T08:29:36.000Z
configs/example/arm/devices.py
fusiled/gem5
670436b9cd7a23f03c9d7248abb8eb19939c83a6
[ "BSD-3-Clause" ]
1
2022-02-21T07:56:08.000Z
2022-02-21T07:56:18.000Z
configs/example/arm/devices.py
fusiled/gem5
670436b9cd7a23f03c9d7248abb8eb19939c83a6
[ "BSD-3-Clause" ]
25
2017-12-02T00:46:04.000Z
2022-02-18T19:28:53.000Z
# Copyright (c) 2016-2017 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
34.583039
78
0.654644
import m5 from m5.objects import * m5.util.addToPath('../../') from common.Caches import * from common import CpuConfig have_kvm = "kvm" in CpuConfig.cpu_names() class L1I(L1_ICache): tag_latency = 1 data_latency = 1 response_latency = 1 mshrs = 4 tgts_per_m...
true
true
f7375cfdfb43c0cef59a9247b683f8c2a729f448
260
py
Python
www/models/__init__.py
JFK/python-tornado-site-template
206ab073d251389552cba986f9492d6c6953e911
[ "MIT" ]
2
2020-06-28T15:21:13.000Z
2020-09-06T02:32:25.000Z
www/models/__init__.py
JFK/python-tornado-site-template
206ab073d251389552cba986f9492d6c6953e911
[ "MIT" ]
null
null
null
www/models/__init__.py
JFK/python-tornado-site-template
206ab073d251389552cba986f9492d6c6953e911
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014 fumikazu.kiyota@gmail.com # from mongoengine import connect def load(db): u"""データベースにコネクトする """ connect( db['name'], host=db['host'], port=db['port'] )
14.444444
42
0.553846
from mongoengine import connect def load(db): connect( db['name'], host=db['host'], port=db['port'] )
true
true
f7375d4cc6866d4d7fea883ed6e0f246a2e8be6f
761
py
Python
metrics/measures/code_style.py
sebMathieu/code_metrics
f188041c8f2c0950c5f63a1f719cdb05aaeb42c9
[ "MIT" ]
null
null
null
metrics/measures/code_style.py
sebMathieu/code_metrics
f188041c8f2c0950c5f63a1f719cdb05aaeb42c9
[ "MIT" ]
null
null
null
metrics/measures/code_style.py
sebMathieu/code_metrics
f188041c8f2c0950c5f63a1f719cdb05aaeb42c9
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- import pycodestyle from metrics.report_keys import CODE_STYLE def code_style(code_path, results, ignore_codes=None): """ Check code style. :param code_path: Path to the source code. :param results: Dictionary with the results. :param ignore_codes: List of PEP8 code to ign...
31.708333
117
0.672799
import pycodestyle from metrics.report_keys import CODE_STYLE def code_style(code_path, results, ignore_codes=None): if ignore_codes is None: ignore_codes = ['E121', 'E123', 'E126', 'E133', 'E226', 'E241', 'E242', 'E704', 'E501', 'W'] style_guide = pycodestyle.StyleGuide(quiet=True, ignore=ign...
true
true
f7375d8903388f8c6bb3749a4b61521de31f66d6
9,993
py
Python
lib/spack/spack/test/cmd/view.py
RemoteConnectionManager/spack
f2967b6c16effd26ce007cf86cadbb645c574f50
[ "ECL-2.0", "Apache-2.0", "MIT" ]
3
2019-06-27T13:26:50.000Z
2019-07-01T16:24:54.000Z
lib/spack/spack/test/cmd/view.py
openbiox/spack
bb6ec7fb40c14b37e094a860e3625af53f633174
[ "ECL-2.0", "Apache-2.0", "MIT" ]
75
2016-07-27T11:43:00.000Z
2020-12-08T15:56:53.000Z
lib/spack/spack/test/cmd/view.py
openbiox/spack
bb6ec7fb40c14b37e094a860e3625af53f633174
[ "ECL-2.0", "Apache-2.0", "MIT" ]
8
2015-10-16T13:51:49.000Z
2021-10-18T13:58:03.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.main import SpackCommand import os.path import pytest import spack.util.spack_yaml as s_yaml activate = Spack...
37.996198
78
0.673471
from spack.main import SpackCommand import os.path import pytest import spack.util.spack_yaml as s_yaml activate = SpackCommand('activate') extensions = SpackCommand('extensions') install = SpackCommand('install') view = SpackCommand('view') def create_projection_file(tmpdir, projection): if 'projections' ...
true
true
f73760737b4dc0d587f0e89b1c5b103eb368d834
10,400
py
Python
App.py
AndreyBuyanov/ImageProcessing.Lb5.TextureSegmentation
1509817ee2719573b04eba6f49154d7b38af853d
[ "MIT" ]
null
null
null
App.py
AndreyBuyanov/ImageProcessing.Lb5.TextureSegmentation
1509817ee2719573b04eba6f49154d7b38af853d
[ "MIT" ]
null
null
null
App.py
AndreyBuyanov/ImageProcessing.Lb5.TextureSegmentation
1509817ee2719573b04eba6f49154d7b38af853d
[ "MIT" ]
null
null
null
from PyQt5 import QtWidgets, uic from PyQt5.QtGui import QImage, QPixmap, QPalette, qRgb, qGray import sys import numpy as np from typing import Callable from numbers import Number def process_image( input_image: np.array, kernel_size: int, kernel_fn: Callable[[np.array], float]) -> np.array: ...
38.095238
108
0.6275
from PyQt5 import QtWidgets, uic from PyQt5.QtGui import QImage, QPixmap, QPalette, qRgb, qGray import sys import numpy as np from typing import Callable from numbers import Number def process_image( input_image: np.array, kernel_size: int, kernel_fn: Callable[[np.array], float]) -> np.array: ...
true
true
f737607743fca96e5afb41d35f748752886a28b7
764
py
Python
test/test_add_project.py
liliasapurina/python_training_mantiss
6b986247e26d5eb020e265402760c41679fd878d
[ "Apache-2.0" ]
null
null
null
test/test_add_project.py
liliasapurina/python_training_mantiss
6b986247e26d5eb020e265402760c41679fd878d
[ "Apache-2.0" ]
null
null
null
test/test_add_project.py
liliasapurina/python_training_mantiss
6b986247e26d5eb020e265402760c41679fd878d
[ "Apache-2.0" ]
null
null
null
__author__ = '1' from model.project import Project import pytest import random import string def random_string(prefix, maxlen): symbols = string.ascii_letters + string.digits + string.punctuation + " "*10 return prefix + "".join([random.choice(symbols) for i in range(random.randrange(maxlen))]) testdata =[ ...
30.56
94
0.742147
__author__ = '1' from model.project import Project import pytest import random import string def random_string(prefix, maxlen): symbols = string.ascii_letters + string.digits + string.punctuation + " "*10 return prefix + "".join([random.choice(symbols) for i in range(random.randrange(maxlen))]) testdata =[ ...
true
true
f73760b1802ef12f7c8c9420d6a6d9de30cf5123
1,108
py
Python
ants/users/tests/test_forms.py
seydimomogueye/ants.io
b2b5b3d8bdc8e8409b467ac295a690110a87654d
[ "MIT" ]
null
null
null
ants/users/tests/test_forms.py
seydimomogueye/ants.io
b2b5b3d8bdc8e8409b467ac295a690110a87654d
[ "MIT" ]
null
null
null
ants/users/tests/test_forms.py
seydimomogueye/ants.io
b2b5b3d8bdc8e8409b467ac295a690110a87654d
[ "MIT" ]
null
null
null
import pytest from ants.users.forms import UserCreationForm from ants.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db class TestUserCreationForm: def test_clean_username(self): # A user with proto_user params does not exist yet. proto_user = UserFactory.build() ...
26.380952
59
0.590253
import pytest from ants.users.forms import UserCreationForm from ants.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db class TestUserCreationForm: def test_clean_username(self): proto_user = UserFactory.build() form = UserCreationForm( { ...
true
true
f73760d02165dba1710b7ae42b9cc64a8cd13528
10,907
py
Python
Transformer_training_V2.py
BUTSpeechFIT/ASR_Transformer
814f720aa8265e9a377869f93dc65b251338e985
[ "MIT" ]
1
2020-10-25T00:21:40.000Z
2020-10-25T00:21:40.000Z
Transformer_training_V2.py
BUTSpeechFIT/ASR_Transformer
814f720aa8265e9a377869f93dc65b251338e985
[ "MIT" ]
null
null
null
Transformer_training_V2.py
BUTSpeechFIT/ASR_Transformer
814f720aa8265e9a377869f93dc65b251338e985
[ "MIT" ]
1
2021-09-08T10:32:55.000Z
2021-09-08T10:32:55.000Z
#!/usr/bin/python import sys import os import subprocess from os.path import join, isdir import torch #************************************************************************************************************************* ####### Loading the Parser and default arguments #import pdb;pdb.set_trace() #sys.path.inser...
46.021097
169
0.473641
import sys import os import subprocess from os.path import join, isdir import torch import fileinput import json import random from itertools import chain from numpy.random import permutation orch import autograd, nn, optim os.environ['PYTHONUNBUFFERED'] = '0' import torch.nn.parallel import torch.backends.cudnn as...
true
true
f7376150b6506bd81ac975c125267a31c4f46a52
10,894
py
Python
app.py
mikkomaa/tunnusluvut
a8b07000d1d0ee071d63bee941f50c4a25318158
[ "MIT" ]
null
null
null
app.py
mikkomaa/tunnusluvut
a8b07000d1d0ee071d63bee941f50c4a25318158
[ "MIT" ]
null
null
null
app.py
mikkomaa/tunnusluvut
a8b07000d1d0ee071d63bee941f50c4a25318158
[ "MIT" ]
null
null
null
import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import numpy as np import fileutility app = dash.Dash(__name__, suppress_callback_exceptions=True) app.title = 'Tunnusluvut' # For Heroku serve...
30.093923
107
0.494951
import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import numpy as np import fileutility app = dash.Dash(__name__, suppress_callback_exceptions=True) app.title = 'Tunnusluvut' server = app.serv...
true
true
f73761a9ffacc5c604bd742de04d2b9cbe4a196a
5,938
py
Python
views/forecasts.py
limejump/agile-insights
2e4f454f83ad7d3d6e071c3dbc297946f46a671c
[ "MIT" ]
null
null
null
views/forecasts.py
limejump/agile-insights
2e4f454f83ad7d3d6e071c3dbc297946f46a671c
[ "MIT" ]
3
2021-02-24T15:01:03.000Z
2021-04-07T17:28:37.000Z
views/forecasts.py
limejump/agile-insights
2e4f454f83ad7d3d6e071c3dbc297946f46a671c
[ "MIT" ]
null
null
null
import dash_html_components as html import dash_bootstrap_components as dbc import dash_core_components as dcc import pandas as pd import plotly.express as px import plotly.graph_objects as go from models import Forecast as ForecastModel class Forecast: def __init__(self, team_name, remaining_issues=None): ...
33.548023
79
0.513641
import dash_html_components as html import dash_bootstrap_components as dbc import dash_core_components as dcc import pandas as pd import plotly.express as px import plotly.graph_objects as go from models import Forecast as ForecastModel class Forecast: def __init__(self, team_name, remaining_issues=None): ...
true
true
f737622280f77f2df3ab140ff96b9fc6ef4c5f2e
6,212
py
Python
software/Opal/spud/diamond/build/lib.linux-x86_64-2.7/diamond/useview.py
msc-acse/acse-9-independent-research-project-Wade003
cfcba990d52ccf535171cf54c0a91b184db6f276
[ "MIT" ]
2
2020-05-11T02:39:46.000Z
2020-05-11T03:08:38.000Z
software/multifluids_icferst/libspud/diamond/diamond/useview.py
msc-acse/acse-9-independent-research-project-Wade003
cfcba990d52ccf535171cf54c0a91b184db6f276
[ "MIT" ]
null
null
null
software/multifluids_icferst/libspud/diamond/diamond/useview.py
msc-acse/acse-9-independent-research-project-Wade003
cfcba990d52ccf535171cf54c0a91b184db6f276
[ "MIT" ]
2
2020-05-21T22:50:19.000Z
2020-10-28T17:16:31.000Z
#!/usr/bin/env python # This file is part of Diamond. # # Diamond is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
33.945355
125
0.652125
import gobject import gtk import os import threading import schemausage RELAXNGNS = "http://relaxng.org/ns/structure/1.0" RELAXNG = "{" + RELAXNGNS + "}" class UseView(gtk.Window): def __init__(self, schema, suffix, folder = None): gtk.Window.__init__(self) self.__add_controls() if fo...
true
true
f737622ef52affbf32fe22c242360e70175a3571
1,009
py
Python
scripts/misc/csvavg.py
petabricks/petabricks
b498b93880b0c4ac3924ddb82cff2e6541e60bd1
[ "MIT" ]
10
2015-03-12T18:09:57.000Z
2022-03-17T03:18:36.000Z
scripts/misc/csvavg.py
petabricks/petabricks
b498b93880b0c4ac3924ddb82cff2e6541e60bd1
[ "MIT" ]
2
2021-01-12T15:12:21.000Z
2022-03-22T07:47:37.000Z
scripts/misc/csvavg.py
petabricks/petabricks
b498b93880b0c4ac3924ddb82cff2e6541e60bd1
[ "MIT" ]
3
2017-06-28T06:01:03.000Z
2021-01-12T15:05:34.000Z
#!/usr/bin/python import csv, sys import numpy dialect = csv.excel_tab multi_file=len(sys.argv[1:])>1 inputs = map(lambda x: csv.DictReader(x, dialect=dialect), map(open, sys.argv[1:])) rows = map(csv.DictReader.next, inputs) headers = inputs[0].fieldnames output = csv.writer(sys.stdout, dialect=dialect) output.writ...
20.18
83
0.627354
import csv, sys import numpy dialect = csv.excel_tab multi_file=len(sys.argv[1:])>1 inputs = map(lambda x: csv.DictReader(x, dialect=dialect), map(open, sys.argv[1:])) rows = map(csv.DictReader.next, inputs) headers = inputs[0].fieldnames output = csv.writer(sys.stdout, dialect=dialect) output.writerow(headers) de...
true
true
f7376243a881572b97daafff73f69cbc70077287
112,194
py
Python
src/tools/glnames.py
maxon887/freetype
974f0ed66d2fb62ae1d26a0e871f31b03f1a3f08
[ "FTL" ]
9
2017-07-26T03:09:17.000Z
2021-04-04T02:08:48.000Z
src/tools/glnames.py
maxon887/freetype
974f0ed66d2fb62ae1d26a0e871f31b03f1a3f08
[ "FTL" ]
1
2019-10-25T07:30:28.000Z
2019-10-25T07:30:28.000Z
src/tools/glnames.py
maxon887/freetype
974f0ed66d2fb62ae1d26a0e871f31b03f1a3f08
[ "FTL" ]
3
2017-07-26T09:13:40.000Z
2021-08-20T08:02:01.000Z
#!/usr/bin/env python # # # FreeType 2 glyph name builder # # Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, # LICENSE.TXT. By co...
20.24797
93
0.751974
"""\ usage: %s <output-file> This python script generates the glyph names tables defined in the `psnames' module. Its single argument is the name of the header file to be created. """ import sys, string, struct, re, os.path # This table lists the glyphs according to the...
false
true
f737627b38f77632b7d3ec16af70019cdad3dc2c
28,961
py
Python
panel/widgets/indicators.py
MaxCodeXTC/panel
1d34e8ce4734eec10f8e64af11c5a3fecaab5bac
[ "BSD-3-Clause" ]
1
2021-07-25T17:27:51.000Z
2021-07-25T17:27:51.000Z
panel/widgets/indicators.py
MaxCodeXTC/panel
1d34e8ce4734eec10f8e64af11c5a3fecaab5bac
[ "BSD-3-Clause" ]
null
null
null
panel/widgets/indicators.py
MaxCodeXTC/panel
1d34e8ce4734eec10f8e64af11c5a3fecaab5bac
[ "BSD-3-Clause" ]
null
null
null
import os import sys from math import pi import numpy as np import param from bokeh.plotting import figure from bokeh.models import ColumnDataSource from tqdm.asyncio import tqdm as _tqdm from ..layout import Column, Row from ..models import ( HTML, Progress as _BkProgress, TrendIndicator as _BkTrendIndicator )...
34.395487
100
0.596043
import os import sys from math import pi import numpy as np import param from bokeh.plotting import figure from bokeh.models import ColumnDataSource from tqdm.asyncio import tqdm as _tqdm from ..layout import Column, Row from ..models import ( HTML, Progress as _BkProgress, TrendIndicator as _BkTrendIndicator )...
true
true
f737627cd940ed5a9bb36289cbc04521c38182b3
258
py
Python
diagrams/onprem/proxmox.py
shadowkrusha/diagrams
25b561b61ae16371437fdce830e9192a6fde38d5
[ "MIT" ]
null
null
null
diagrams/onprem/proxmox.py
shadowkrusha/diagrams
25b561b61ae16371437fdce830e9192a6fde38d5
[ "MIT" ]
null
null
null
diagrams/onprem/proxmox.py
shadowkrusha/diagrams
25b561b61ae16371437fdce830e9192a6fde38d5
[ "MIT" ]
null
null
null
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _OnPrem class _Proxmox(_OnPrem): _type = "proxmox" _icon_dir = "resources/onprem/proxmox" class Pve(_Proxmox): _icon = "pve.png" # Aliases PVE = ProxmoxVE
14.333333
68
0.697674
from . import _OnPrem class _Proxmox(_OnPrem): _type = "proxmox" _icon_dir = "resources/onprem/proxmox" class Pve(_Proxmox): _icon = "pve.png" PVE = ProxmoxVE
true
true
f7376415a15ce36dab3ad8a495e9883284da19ba
235
py
Python
Exercicios/Ex005.py
silveriogabriel/Exercicios_Python
6bed118b54ad202e3fe4b53cb538ff967a71d855
[ "MIT" ]
null
null
null
Exercicios/Ex005.py
silveriogabriel/Exercicios_Python
6bed118b54ad202e3fe4b53cb538ff967a71d855
[ "MIT" ]
null
null
null
Exercicios/Ex005.py
silveriogabriel/Exercicios_Python
6bed118b54ad202e3fe4b53cb538ff967a71d855
[ "MIT" ]
null
null
null
'''Faça um programa que leia um valor pelo teclado e mostre na tela seu sucessor e seu antesessor''' n1 = int(input('Digite um numero inteiro: ')) print(f'O valor digitado foi {n1} seu sucessor é {n1 + 1} e seu antecessor é {n1 - 1}')
58.75
100
0.706383
n1 = int(input('Digite um numero inteiro: ')) print(f'O valor digitado foi {n1} seu sucessor é {n1 + 1} e seu antecessor é {n1 - 1}')
true
true
f7376541694fdd122db8c1761e0366c73019c486
2,160
py
Python
examples/pwr_run/gpu_pwr.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/gpu_pwr.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/gpu_pwr.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
import pandas import pdb from datetime import datetime import matplotlib import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import glob import sys from matplotlib.ticker import MultipleLocator testcase = sys.argv[1] # K80_vgg19_32 print(testcase) base_dir = '/scratch/li.baol/GPU...
30.857143
93
0.630556
import pandas import pdb from datetime import datetime import matplotlib import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import glob import sys from matplotlib.ticker import MultipleLocator testcase = sys.argv[1] print(testcase) base_dir = '/scratch/li.baol/GPU_pwr_meas/tens...
true
true
f737669af564b4e98a57828a25dda2274cb0331c
4,354
py
Python
hubspot/crm/deals/models/collection_response_associated_id_forward_paging.py
Ronfer/hubspot-api-python
1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4
[ "Apache-2.0" ]
117
2020-04-06T08:22:53.000Z
2022-03-18T03:41:29.000Z
hubspot/crm/deals/models/collection_response_associated_id_forward_paging.py
Ronfer/hubspot-api-python
1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4
[ "Apache-2.0" ]
62
2020-04-06T16:21:06.000Z
2022-03-17T16:50:44.000Z
hubspot/crm/deals/models/collection_response_associated_id_forward_paging.py
Ronfer/hubspot-api-python
1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4
[ "Apache-2.0" ]
45
2020-04-06T16:13:52.000Z
2022-03-30T21:33:17.000Z
# coding: utf-8 """ Deals No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from hubspot...
32.251852
139
0.642398
import pprint import re import six from hubspot.crm.deals.configuration import Configuration class CollectionResponseAssociatedIdForwardPaging(object): openapi_types = {"results": "list[AssociatedId]", "paging": "ForwardPaging"} attribute_map = {"results": "results", "paging": "paging"} def __i...
true
true
f73766e249ccc282cd3aefc84109b97ce5a7c7eb
9,314
py
Python
src/jstools/records.py
daboross/screeps-ai-v2
8bb49f59c8c745801d1aef54e1734e28414171e7
[ "MIT" ]
2
2020-08-28T01:26:05.000Z
2021-04-04T03:03:34.000Z
src/jstools/records.py
daboross/screeps-ai-v2
8bb49f59c8c745801d1aef54e1734e28414171e7
[ "MIT" ]
null
null
null
src/jstools/records.py
daboross/screeps-ai-v2
8bb49f59c8c745801d1aef54e1734e28414171e7
[ "MIT" ]
null
null
null
from typing import Any, Optional from jstools.screeps import * __pragma__('noalias', 'name') __pragma__('noalias', 'undefined') __pragma__('noalias', 'Infinity') __pragma__('noalias', 'keys') __pragma__('noalias', 'get') __pragma__('noalias', 'set') __pragma__('noalias', 'type') __pragma__('noalias', 'update') __prag...
32.566434
102
0.596414
from typing import Any, Optional from jstools.screeps import * __pragma__('noalias', 'name') __pragma__('noalias', 'undefined') __pragma__('noalias', 'Infinity') __pragma__('noalias', 'keys') __pragma__('noalias', 'get') __pragma__('noalias', 'set') __pragma__('noalias', 'type') __pragma__('noalias', 'update') __prag...
true
true
f73767be82fe98bcf0a4b19467dff0a58c7aaa1d
3,158
py
Python
scripts/urdf_remove_pedestal.py
cmsc421/mobility_base_tools
e82436d1f241c1b01bbccfd4620564ace939e53d
[ "BSD-3-Clause" ]
null
null
null
scripts/urdf_remove_pedestal.py
cmsc421/mobility_base_tools
e82436d1f241c1b01bbccfd4620564ace939e53d
[ "BSD-3-Clause" ]
null
null
null
scripts/urdf_remove_pedestal.py
cmsc421/mobility_base_tools
e82436d1f241c1b01bbccfd4620564ace939e53d
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2014-2015, Dataspeed Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of source c...
44.478873
86
0.652945
import rospy import re match_link = "(.*)<link[^>]*name\s*=\s*\"pedestal\"[^>]*>.*?[^<]<\/link>(.*)" match_joint = "(.*)<joint[^>]*name\s*=\s*\"pedestal_fixed\"[^>]*>.*?[^<]<\/joint>(.*)" if __name__ == '__main__': try: rospy.init_node('urdf_remove_pedestal', anonymous=True) ...
true
true
f737681bd7848c1db588ead12063fa7e408e5f39
386
py
Python
strange_case/configurators/ignore.py
colinta/StrangeCase
822634d986020bc35d49f5355ec4823690372cd5
[ "BSD-2-Clause-FreeBSD" ]
10
2015-11-05T01:38:29.000Z
2021-06-09T06:35:27.000Z
strange_case/configurators/ignore.py
colinta/StrangeCase
822634d986020bc35d49f5355ec4823690372cd5
[ "BSD-2-Clause-FreeBSD" ]
9
2019-07-17T15:21:43.000Z
2021-09-08T01:08:00.000Z
strange_case/configurators/ignore.py
colinta/StrangeCase
822634d986020bc35d49f5355ec4823690372cd5
[ "BSD-2-Clause-FreeBSD" ]
2
2016-06-01T01:51:22.000Z
2017-03-16T00:11:39.000Z
import os from fnmatch import fnmatch def ignore(source_file, config): file_name = os.path.basename(source_file) if config['ignore'] is True or \ config['ignore'] and any(pattern for pattern in config['ignore'] if fnmatch(file_name, pattern)): return return config ignore.defaults = ...
19.3
109
0.61658
import os from fnmatch import fnmatch def ignore(source_file, config): file_name = os.path.basename(source_file) if config['ignore'] is True or \ config['ignore'] and any(pattern for pattern in config['ignore'] if fnmatch(file_name, pattern)): return return config ignore.defaults = ...
true
true
f7376ae52743c8d3c9b9943a496eeee3e3505f29
33,887
py
Python
cinder/brick/local_dev/lvm.py
ilay09/cinder
86f084d42f18bd5971cc7a0df3e6d815543a472d
[ "Apache-2.0" ]
null
null
null
cinder/brick/local_dev/lvm.py
ilay09/cinder
86f084d42f18bd5971cc7a0df3e6d815543a472d
[ "Apache-2.0" ]
null
null
null
cinder/brick/local_dev/lvm.py
ilay09/cinder
86f084d42f18bd5971cc7a0df3e6d815543a472d
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
39.312065
79
0.556408
import math import os import re from os_brick import executor from oslo_concurrency import processutils as putils from oslo_log import log as logging from oslo_utils import excutils from six import moves from cinder import exception from cinder import utils LOG = logging.getLogger(__name__) class ...
true
true
f7376b6ebe5cc47b677f9a0ae0155429d3c68f68
3,842
py
Python
examples/pipeline/hetero_ftl/pipeline-hetero-ftl-with-predict.py
rubenlozanoaht3m/DataDogm
cd605e8072cca31e8418830c3300657ae2fa5b16
[ "Apache-2.0" ]
715
2019-01-24T10:52:03.000Z
2019-10-31T12:19:22.000Z
examples/pipeline/hetero_ftl/pipeline-hetero-ftl-with-predict.py
rubenlozanoaht3m/DataDogm
cd605e8072cca31e8418830c3300657ae2fa5b16
[ "Apache-2.0" ]
270
2019-02-11T02:57:36.000Z
2019-08-29T11:22:33.000Z
examples/pipeline/hetero_ftl/pipeline-hetero-ftl-with-predict.py
rubenlozanoaht3m/DataDogm
cd605e8072cca31e8418830c3300657ae2fa5b16
[ "Apache-2.0" ]
200
2019-01-26T14:21:35.000Z
2019-11-01T01:14:36.000Z
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
38.808081
103
0.724623
import argparse from pipeline.backend.pipeline import PipeLine from pipeline.component import DataTransform from pipeline.component.hetero_ftl import HeteroFTL from pipeline.component.reader import Reader from pipeline.interface.data import Data from tensorflow.keras import optimizers from tensorflow.k...
true
true
f7376b9a03e8264096d83c9df6df4eacc6d0bf09
3,560
py
Python
fn_qradar_integration/tests/test_funct_qradar_reference_table_delete_item.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
65
2017-12-04T13:58:32.000Z
2022-03-24T18:33:17.000Z
fn_qradar_integration/tests/test_funct_qradar_reference_table_delete_item.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
48
2018-03-02T19:17:14.000Z
2022-03-09T22:00:38.000Z
fn_qradar_integration/tests/test_funct_qradar_reference_table_delete_item.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
95
2018-01-11T16:23:39.000Z
2022-03-21T11:34:29.000Z
# -*- coding: utf-8 -*- """Tests using pytest_resilient_circuits""" import pytest from resilient_circuits.util import get_config_data, get_function_definition from resilient_circuits import SubmitTestFunction, FunctionResult from mock import patch PACKAGE_NAME = "fn_qradar_integration" FUNCTION_NAME = "qradar_referenc...
37.473684
147
0.742978
import pytest from resilient_circuits.util import get_config_data, get_function_definition from resilient_circuits import SubmitTestFunction, FunctionResult from mock import patch PACKAGE_NAME = "fn_qradar_integration" FUNCTION_NAME = "qradar_reference_table_delete_item" config_data = get_config_data(PACKAGE_NAME) ...
true
true
f7376c7af13e6f09f4c98fed7f717e2e3887cc0f
11,884
py
Python
.venv/lib/python3.8/site-packages/poetry/core/_vendor/pyrsistent/_field_common.py
RivtLib/replit01
ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7
[ "MIT" ]
1
2020-08-07T16:09:57.000Z
2020-08-07T16:09:57.000Z
.venv/lib/python3.8/site-packages/poetry/core/_vendor/pyrsistent/_field_common.py
RivtLib/replit01
ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7
[ "MIT" ]
null
null
null
.venv/lib/python3.8/site-packages/poetry/core/_vendor/pyrsistent/_field_common.py
RivtLib/replit01
ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7
[ "MIT" ]
null
null
null
import six import sys from pyrsistent._checked_types import ( CheckedPMap, CheckedPSet, CheckedPVector, CheckedType, InvariantException, _restore_pickle, get_type, maybe_parse_user_type, maybe_parse_many_user_types, ) from pyrsistent._checked_types import optional as o...
35.903323
126
0.667789
import six import sys from pyrsistent._checked_types import ( CheckedPMap, CheckedPSet, CheckedPVector, CheckedType, InvariantException, _restore_pickle, get_type, maybe_parse_user_type, maybe_parse_many_user_types, ) from pyrsistent._checked_types import optional as o...
true
true
f7376cfb48ca7e0466ff023677b9d8f9331e296d
3,510
py
Python
graphs/prim.py
Hasenn/Python
7e359c78781167f597ff742817efabe460bf8ab0
[ "MIT" ]
3
2020-07-17T00:21:04.000Z
2020-09-01T08:46:08.000Z
graphs/prim.py
Hasenn/Python
7e359c78781167f597ff742817efabe460bf8ab0
[ "MIT" ]
2
2021-07-09T21:23:47.000Z
2021-08-06T02:47:29.000Z
graphs/prim.py
Hasenn/Python
7e359c78781167f597ff742817efabe460bf8ab0
[ "MIT" ]
3
2020-09-30T18:27:01.000Z
2021-10-06T10:04:45.000Z
"""Prim's Algorithm. Determines the minimum spanning tree(MST) of a graph using the Prim's Algorithm. Details: https://en.wikipedia.org/wiki/Prim%27s_algorithm """ import heapq as hq import math from typing import Iterator class Vertex: """Class Vertex.""" def __init__(self, id): """ ...
22.941176
84
0.512821
import heapq as hq import math from typing import Iterator class Vertex: def __init__(self, id): self.id = str(id) self.key = None self.pi = None self.neighbors = [] self.edges = {} def __lt__(self, other): return self.key < other.key def __repr__(self...
true
true
f7376ed1d9e41ba75092c4bd064cee37e28e2b8d
201
py
Python
hypernlp/dl_framework_adaptor/configs/bertbase_config.py
DataCanvasIO/HyperNLP
3ae565c88b6fc63b664c8fb264dc89c47ff92623
[ "Apache-2.0" ]
3
2021-11-22T04:09:22.000Z
2022-01-10T10:27:28.000Z
hypernlp/dl_framework_adaptor/configs/bertbase_config.py
DataCanvasIO/HyperNLP
3ae565c88b6fc63b664c8fb264dc89c47ff92623
[ "Apache-2.0" ]
null
null
null
hypernlp/dl_framework_adaptor/configs/bertbase_config.py
DataCanvasIO/HyperNLP
3ae565c88b6fc63b664c8fb264dc89c47ff92623
[ "Apache-2.0" ]
null
null
null
from utils.string_utils import home_path import yaml configs = open(home_path() + "hypernlp/dl_framework_adaptor/configs/bert_config.yaml", encoding='utf-8') bert_models_config = yaml.load(configs)
25.125
104
0.800995
from utils.string_utils import home_path import yaml configs = open(home_path() + "hypernlp/dl_framework_adaptor/configs/bert_config.yaml", encoding='utf-8') bert_models_config = yaml.load(configs)
true
true
f7376f407c68482086590915492302eb2677bc4b
234
py
Python
popolo_admin/admin.py
ciudadanointeligente/django-popolo-admin
f74aa087e436d06e73a4dbf93019d8dfc1f7a34e
[ "MIT" ]
null
null
null
popolo_admin/admin.py
ciudadanointeligente/django-popolo-admin
f74aa087e436d06e73a4dbf93019d8dfc1f7a34e
[ "MIT" ]
null
null
null
popolo_admin/admin.py
ciudadanointeligente/django-popolo-admin
f74aa087e436d06e73a4dbf93019d8dfc1f7a34e
[ "MIT" ]
null
null
null
from django.contrib import admin from popolo.models import Person, Organization @admin.register(Person) class PersonAdmin(admin.ModelAdmin): pass @admin.register(Organization) class OrganizationAdmin(admin.ModelAdmin): pass
21.272727
46
0.803419
from django.contrib import admin from popolo.models import Person, Organization @admin.register(Person) class PersonAdmin(admin.ModelAdmin): pass @admin.register(Organization) class OrganizationAdmin(admin.ModelAdmin): pass
true
true
f7376f5ac6518f055d9d50110ef2dee4b566060b
30,279
py
Python
truncation_experiments/dnnlib/tflib/network.py
a7b23/CS236G-project
8bde7d54ca3d22e13703fe72dfb998b38d9cd8b4
[ "MIT" ]
2
2021-02-23T07:07:32.000Z
2021-03-11T21:13:26.000Z
truncation_experiments/dnnlib/tflib/network.py
a7b23/CS236G-project
8bde7d54ca3d22e13703fe72dfb998b38d9cd8b4
[ "MIT" ]
null
null
null
truncation_experiments/dnnlib/tflib/network.py
a7b23/CS236G-project
8bde7d54ca3d22e13703fe72dfb998b38d9cd8b4
[ "MIT" ]
3
2021-02-23T09:02:48.000Z
2021-02-27T06:14:42.000Z
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # This work is licensed under the Creative Commons Attribution-NonCommercial # 4.0 International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to # Creative Commons, PO Box 1866, Mountain...
50.889076
165
0.646719
 """Helper for managing networks.""" import types import inspect import re import uuid import sys import numpy as np import tensorflow as tf from collections import OrderedDict from typing import Any, List, Tuple, Union from . import tfutil from .. import util from .tfutil import TfExpression, TfExpressionEx...
false
true
f7376f93c9df1bfbd6ea51643563b722453a15b3
541
py
Python
url_to_data/insert_in_db.py
eike-heimpel/url-to-data
265cc8055569774ef775a82614b094a7f3184324
[ "MIT" ]
null
null
null
url_to_data/insert_in_db.py
eike-heimpel/url-to-data
265cc8055569774ef775a82614b094a7f3184324
[ "MIT" ]
null
null
null
url_to_data/insert_in_db.py
eike-heimpel/url-to-data
265cc8055569774ef775a82614b094a7f3184324
[ "MIT" ]
null
null
null
from api import all_csvs_to_file bka_zeitreihen_daten_url = "https://www.bka.de/DE/AktuelleInformationen/StatistikenLagebilder/PolizeilicheKriminalstatistik/PKS2019/PKSTabellen/Zeitreihen/zeitreihen_node.html" bka_bund_fall_tabellen_url = "https://www.bka.de/DE/AktuelleInformationen/StatistikenLagebilder/Polizeiliche...
36.066667
195
0.861368
from api import all_csvs_to_file bka_zeitreihen_daten_url = "https://www.bka.de/DE/AktuelleInformationen/StatistikenLagebilder/PolizeilicheKriminalstatistik/PKS2019/PKSTabellen/Zeitreihen/zeitreihen_node.html" bka_bund_fall_tabellen_url = "https://www.bka.de/DE/AktuelleInformationen/StatistikenLagebilder/Polizeiliche...
true
true
f7376fe0fc5af75de5bbf73c3aae3fc8ff63f043
3,655
py
Python
hello/assistant/assistant.py
ToBegin/hello-python
71d9989e3a8695550391ac544c59e5866366a3e7
[ "Apache-2.0" ]
null
null
null
hello/assistant/assistant.py
ToBegin/hello-python
71d9989e3a8695550391ac544c59e5866366a3e7
[ "Apache-2.0" ]
null
null
null
hello/assistant/assistant.py
ToBegin/hello-python
71d9989e3a8695550391ac544c59e5866366a3e7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- r''' Usage: python3 assistant.py service ''' import sys def check_version(): v = sys.version_info # print(v) if v.major == 3 and v.minor >= 4: return True print('Your current python is %d.%d. Please use Python 3.4.' % (v.major, v.minor)) r...
33.842593
236
0.615595
import sys def check_version(): v = sys.version_info if v.major == 3 and v.minor >= 4: return True print('Your current python is %d.%d. Please use Python 3.4.' % (v.major, v.minor)) return False if not check_version(): exit(1) import os, io, json, subprocess, tempfile from urllib...
true
true
f7376ff86ba6b0f3ae7a501f37f92df71bd0d3a7
10,135
py
Python
STEPIK.py
AlPus108/Python_lessons
0e96117d9a8b76fd651e137fc126ddedaa6accd9
[ "MIT" ]
null
null
null
STEPIK.py
AlPus108/Python_lessons
0e96117d9a8b76fd651e137fc126ddedaa6accd9
[ "MIT" ]
null
null
null
STEPIK.py
AlPus108/Python_lessons
0e96117d9a8b76fd651e137fc126ddedaa6accd9
[ "MIT" ]
null
null
null
# ЭКРАНИРОВАНИЕ # a = "строка с \" кавычкой двойной и \' одинарной" # Чтобы в строке появился символ обратной косой черты # a = "Строка с обратным слешем \\" # Перенос строки # a = "Первая строка \nВторая строка ''' Сделать перенос строки в Питоне можно и другим способом — объявить строку с помощью тройных кавычек. ...
32.693548
119
0.574642
# Чтобы в строке появился символ обратной косой черты # a = "Строка с обратным слешем \\" # Перенос строки # a = "Первая строка \nВторая строка # a = '''Первая строка # Вторая строка # Третья строка''' # print(a) # ------------------------------------------ # --------------------------------------------------...
true
true
f73771decc67f67866c4a6986ba6c766191c1d51
2,972
py
Python
edk2basetools/Table/TableDataModel.py
matthewfcarlson/edk2-pytool-base
ddf78ca6e2110f03e020a5bd0ca32b2a463fecff
[ "BSD-2-Clause-Patent" ]
null
null
null
edk2basetools/Table/TableDataModel.py
matthewfcarlson/edk2-pytool-base
ddf78ca6e2110f03e020a5bd0ca32b2a463fecff
[ "BSD-2-Clause-Patent" ]
1
2020-04-14T22:23:01.000Z
2020-04-15T06:47:53.000Z
edk2basetools/Table/TableDataModel.py
matthewfcarlson/edk2-pytool-base
ddf78ca6e2110f03e020a5bd0ca32b2a463fecff
[ "BSD-2-Clause-Patent" ]
null
null
null
## @file # This file is used to create/update/query/erase table for data models # # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # from __future__ import absolute_import import edk2basetools.Common.EdkLogger as EdkLogger imp...
32.659341
123
0.595895
from __future__ import absolute_import import edk2basetools.Common.EdkLogger as EdkLogger import edk2basetools.CommonDataClass.DataClass as DataClass from Table.Table import Table from edk2basetools.Common.StringUtils import ConvertToSqlString leDataModel(Table): def __init__(self, Cursor): Table.__init_...
true
true
f7377260feb68760a99e6c8c935a545eb16c71ed
1,856
py
Python
Phase3/Feedback.py
Surya97/MWDB-project
508562913624416415cd143cef9b7689066037ef
[ "Apache-2.0" ]
null
null
null
Phase3/Feedback.py
Surya97/MWDB-project
508562913624416415cd143cef9b7689066037ef
[ "Apache-2.0" ]
2
2019-10-16T20:16:02.000Z
2019-10-20T10:16:47.000Z
Phase3/Feedback.py
Surya97/MWDB-project
508562913624416415cd143cef9b7689066037ef
[ "Apache-2.0" ]
2
2019-09-07T16:47:36.000Z
2021-11-16T11:41:31.000Z
import os import sys from pathlib import Path sys.path.insert(1, '../Phase1') sys.path.insert(2, '../Phase2') import misc import numpy as np class Feedback: def __init__(self): self.task5_result = None self.reduced_pickle_file_folder = os.path.join(Path(os.path.dirname(__file__)).parent, ...
34.37037
99
0.578664
import os import sys from pathlib import Path sys.path.insert(1, '../Phase1') sys.path.insert(2, '../Phase2') import misc import numpy as np class Feedback: def __init__(self): self.task5_result = None self.reduced_pickle_file_folder = os.path.join(Path(os.path.dirname(__file__)).parent, ...
true
true
f73774d9eff7444d644a87d43df54fb4ecacd966
6,862
py
Python
PHASE_1/API_SourceCode/report/filter.py
unsw-se3011/SENG3011_Neon
6ea05b62a470538b72ae1397ce6d29e41142945a
[ "MIT" ]
1
2021-05-01T05:11:42.000Z
2021-05-01T05:11:42.000Z
PHASE_1/API_SourceCode/report/filter.py
unsw-se3011/SENG3011_Neon
6ea05b62a470538b72ae1397ce6d29e41142945a
[ "MIT" ]
null
null
null
PHASE_1/API_SourceCode/report/filter.py
unsw-se3011/SENG3011_Neon
6ea05b62a470538b72ae1397ce6d29e41142945a
[ "MIT" ]
3
2020-04-29T08:49:29.000Z
2021-06-04T03:14:08.000Z
from rest_framework.filters import BaseFilterBackend, SearchFilter from django.db.models import Q from rest_framework.compat import coreapi, coreschema from datetime import datetime from django.utils.dateparse import parse_datetime from rest_framework.serializers import ValidationError class DatetimeFilter(BaseFilter...
32.67619
75
0.52492
from rest_framework.filters import BaseFilterBackend, SearchFilter from django.db.models import Q from rest_framework.compat import coreapi, coreschema from datetime import datetime from django.utils.dateparse import parse_datetime from rest_framework.serializers import ValidationError class DatetimeFilter(BaseFilter...
true
true
f73775ae8f96777285bd3ec5461ed1a62a0f447a
4,288
py
Python
metal-archives.py
gersonhb/Metal-Archives
87e7c04a6c1a76f550dc637884069442f606356d
[ "Unlicense" ]
null
null
null
metal-archives.py
gersonhb/Metal-Archives
87e7c04a6c1a76f550dc637884069442f606356d
[ "Unlicense" ]
null
null
null
metal-archives.py
gersonhb/Metal-Archives
87e7c04a6c1a76f550dc637884069442f606356d
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 import requests, re, os from lxml import html print('Ingrese nombre de la banda:') bus=str(input()) pag=1 start=0 url='https://www.metal-archives.com/search/ajax-band-search/?field=name&query='+bus+'&sEcho='+str(pag)+'&iColumns=3&sColumns=&iDisplayStart='+str(start)+'&iDisplayLength=200&mDataP...
43.755102
228
0.536847
import requests, re, os from lxml import html print('Ingrese nombre de la banda:') bus=str(input()) pag=1 start=0 url='https://www.metal-archives.com/search/ajax-band-search/?field=name&query='+bus+'&sEcho='+str(pag)+'&iColumns=3&sColumns=&iDisplayStart='+str(start)+'&iDisplayLength=200&mDataProp_0=0&mDataProp_1=1&...
true
true
f73777d7ca2d4d80693cb15dd56f511c05f1c49c
3,163
py
Python
alipay/aop/api/domain/AlipayUserFamilyShareAuthCheckModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayUserFamilyShareAuthCheckModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayUserFamilyShareAuthCheckModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayUserFamilyShareAuthCheckModel(object): def __init__(self): self._resource_id = None self._scene_id = None self._target_biz_user_id = None self._target_user_b...
31.316832
95
0.62251
import json from alipay.aop.api.constant.ParamConstants import * class AlipayUserFamilyShareAuthCheckModel(object): def __init__(self): self._resource_id = None self._scene_id = None self._target_biz_user_id = None self._target_user_biz_source = None self._user_id = Non...
true
true
f73777e36141dbe3753dfde57de14ece205886c0
1,136
py
Python
dsa/patterns/bitwise_xor/complement_of_base_10.py
bksahu/dsa
4b36abbb3e00ce449c435c44260316f46d6d35ec
[ "MIT" ]
null
null
null
dsa/patterns/bitwise_xor/complement_of_base_10.py
bksahu/dsa
4b36abbb3e00ce449c435c44260316f46d6d35ec
[ "MIT" ]
4
2019-10-02T14:24:54.000Z
2020-03-26T07:06:15.000Z
dsa/patterns/bitwise_xor/complement_of_base_10.py
bksahu/dsa
4b36abbb3e00ce449c435c44260316f46d6d35ec
[ "MIT" ]
2
2019-10-02T15:57:51.000Z
2020-04-10T07:22:06.000Z
""" Every non-negative integer N has a binary representation, for example, 8 can be represented as “1000” in binary and 7 as “0111” in binary. The complement of a binary representation is the number in binary that we get when we change every 1 to a 0 and every 0 to a 1. For example, the binary complement of “1010” i...
27.047619
106
0.683979
def calculate_bitwise_complement(N): if N == 0: return 1 bits = 0 n = N while n: bits += 1 n = n >> 1 bound = pow(2, bits) - 1 return bound ^ N if __name__ == "__main__": print(calculate_bitwise_complement(8)) print(calculate_bitwise_complement(10))
true
true
f737783aff46a71f34ea0722cf26b83af715ac99
2,331
py
Python
datacamp-data-scientist-master/Python-career-track/07-cleaning-data-in-python/02-tidying-data-for-analysis.py
vitthal10/datacamp
522d2b192656f7f6563bf6fc33471b048f1cf029
[ "MIT" ]
null
null
null
datacamp-data-scientist-master/Python-career-track/07-cleaning-data-in-python/02-tidying-data-for-analysis.py
vitthal10/datacamp
522d2b192656f7f6563bf6fc33471b048f1cf029
[ "MIT" ]
null
null
null
datacamp-data-scientist-master/Python-career-track/07-cleaning-data-in-python/02-tidying-data-for-analysis.py
vitthal10/datacamp
522d2b192656f7f6563bf6fc33471b048f1cf029
[ "MIT" ]
1
2021-08-08T05:09:52.000Z
2021-08-08T05:09:52.000Z
# Print the head of airquality print(airquality.head()) # Melt airquality: airquality_melt airquality_melt = pd.melt(airquality, id_vars=["Month", "Day"], value_vars=["Ozone","Solar.R", "Wind", "Temp"]) # Print the head of airquality_melt print(airquality_melt.head()) # Print the head of airquality print(airquality...
27.423529
160
0.75547
print(airquality.head()) airquality_melt = pd.melt(airquality, id_vars=["Month", "Day"], value_vars=["Ozone","Solar.R", "Wind", "Temp"]) print(airquality_melt.head()) print(airquality.head()) airquality_melt = pd.melt(airquality, id_vars = ["Month", "Day"], value_vars=["Ozone", "Solar.R", "Wind", "Temp"], var...
true
true
f73778e9b3d28fecc5870a455813aa3930059e19
63,593
py
Python
mesonbuild/mesonlib.py
SamuelLongchamps/meson
4720a10c6bc92bc9e6bc500ff9eaa492ee285f85
[ "Apache-2.0" ]
null
null
null
mesonbuild/mesonlib.py
SamuelLongchamps/meson
4720a10c6bc92bc9e6bc500ff9eaa492ee285f85
[ "Apache-2.0" ]
null
null
null
mesonbuild/mesonlib.py
SamuelLongchamps/meson
4720a10c6bc92bc9e6bc500ff9eaa492ee285f85
[ "Apache-2.0" ]
null
null
null
# Copyright 2012-2020 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agree...
35.686308
152
0.603117
from pathlib import Path import sys import stat import time import platform, subprocess, operator, os, shlex, shutil, re import collections from enum import IntEnum from functools import lru_cache, wraps from itertools import tee, filterfalse from tempfile import TemporaryDirectory import typing as T impo...
true
true
f7377966f8d6321a7778ebfefbec0cfa0b77dcd0
675
py
Python
django_crypto_trading_bot/users/tests/test_urls.py
chiragmatkar/django-crypto-trading-bot
922018ead04cf38a123f95f82776173dcd7fa0de
[ "MIT" ]
37
2019-12-21T10:04:25.000Z
2022-03-15T03:33:44.000Z
django_crypto_trading_bot/users/tests/test_urls.py
chiragmatkar/django-crypto-trading-bot
922018ead04cf38a123f95f82776173dcd7fa0de
[ "MIT" ]
347
2019-12-19T00:12:56.000Z
2022-02-04T09:29:27.000Z
django_crypto_trading_bot/users/tests/test_urls.py
chiragmatkar/django-crypto-trading-bot
922018ead04cf38a123f95f82776173dcd7fa0de
[ "MIT" ]
18
2020-06-28T18:08:44.000Z
2022-01-30T06:43:52.000Z
import pytest from django.urls import resolve, reverse from django_crypto_trading_bot.users.models import User pytestmark = pytest.mark.django_db def test_detail(user: User): assert ( reverse("users:detail", kwargs={"username": user.username}) == f"/users/{user.username}/" ) assert resol...
27
74
0.684444
import pytest from django.urls import resolve, reverse from django_crypto_trading_bot.users.models import User pytestmark = pytest.mark.django_db def test_detail(user: User): assert ( reverse("users:detail", kwargs={"username": user.username}) == f"/users/{user.username}/" ) assert resol...
true
true
f73779832c3ac3fafccff7c9af2fd8479d4e46d0
4,069
py
Python
tests/test_lens.py
XiaoshengLin/shadow3
d007ae59a2038db4f9275f7bb026bd1b11549e5f
[ "MIT" ]
15
2018-05-07T12:46:56.000Z
2021-08-17T07:39:25.000Z
tests/test_lens.py
XiaoshengLin/shadow3
d007ae59a2038db4f9275f7bb026bd1b11549e5f
[ "MIT" ]
23
2018-04-18T13:49:56.000Z
2022-03-05T18:37:59.000Z
tests/test_lens.py
XiaoshengLin/shadow3
d007ae59a2038db4f9275f7bb026bd1b11549e5f
[ "MIT" ]
11
2018-06-04T10:48:23.000Z
2021-07-06T10:09:46.000Z
import Shadow import numpy # using mac oasys, for plots # from srxraylib.plot.gol import set_qt # set_qt() # # runs an absorber of 10 um thickness for a source at 10 keV # # def run_example_lens(user_units_to_cm=1.0,npoint=5000,use_prerefl=0): # # Python script to run shadow3. Created automatically with Shad...
24.076923
156
0.609978
import Shadow import numpy def run_example_lens(user_units_to_cm=1.0,npoint=5000,use_prerefl=0): beam = Shadow.Beam() oe0 = Shadow.Source() oe1 = Shadow.OE() oe2 = Shadow.OE() oe0.FDISTR = 3 oe0.FSOURCE_DEPTH = 0 oe0.F_PHOT =...
true
true
f7377a2e0b8f23ae0f0911d46b215b4162709f01
2,037
py
Python
configs/m2det320_vgg.py
vuanh96/Thesis
c8a73e267f17e0e9d074c42b5b1c3b343ed86268
[ "MIT" ]
null
null
null
configs/m2det320_vgg.py
vuanh96/Thesis
c8a73e267f17e0e9d074c42b5b1c3b343ed86268
[ "MIT" ]
null
null
null
configs/m2det320_vgg.py
vuanh96/Thesis
c8a73e267f17e0e9d074c42b5b1c3b343ed86268
[ "MIT" ]
null
null
null
model = dict( type = 'm2det', input_size = 320, init_net = True, pretrained = 'weights/vgg16_reducedfc.pth', m2det_config = dict( backbone = 'vgg16', net_family = 'vgg', # vgg includes ['vgg16','vgg19'], res includes ['resnetxxx','resnextxxx'] base_out = [22,34], # [22,34] fo...
26.115385
101
0.523319
model = dict( type = 'm2det', input_size = 320, init_net = True, pretrained = 'weights/vgg16_reducedfc.pth', m2det_config = dict( backbone = 'vgg16', net_family = 'vgg', base_out = [22,34], planes = 256, num_levels = 8, num_scales = 6, sfam =...
true
true
f7377a6dcfebbbb98df97e96fe224eddc62728ec
4,735
py
Python
eval_CIFAR10C.py
wiseodd/lula
a52b27c118ed136a62d8d7d1a898067d5ac685fb
[ "MIT" ]
15
2021-06-07T14:25:35.000Z
2021-12-26T16:41:01.000Z
eval_CIFAR10C.py
wiseodd/lula
a52b27c118ed136a62d8d7d1a898067d5ac685fb
[ "MIT" ]
1
2022-03-11T01:03:12.000Z
2022-03-11T01:03:12.000Z
eval_CIFAR10C.py
wiseodd/lula
a52b27c118ed136a62d8d7d1a898067d5ac685fb
[ "MIT" ]
2
2021-06-19T05:41:05.000Z
2022-03-23T11:51:06.000Z
import warnings warnings.filterwarnings('ignore') import torch import numpy as np from models import wrn from laplace import kfla import laplace.util as lutil import util.evaluation as evalutil import util.dataloaders as dl import util.misc from math import * from tqdm import tqdm, trange import argparse import os, sys...
31.993243
97
0.685111
import warnings warnings.filterwarnings('ignore') import torch import numpy as np from models import wrn from laplace import kfla import laplace.util as lutil import util.evaluation as evalutil import util.dataloaders as dl import util.misc from math import * from tqdm import tqdm, trange import argparse import os, sys...
true
true
f7377aedee49b0c8c4dc7b04e77135c1a1785005
4,072
py
Python
slave/views.py
ngr/sm_00
d8480cbbe88efd9947e2cb6d5a205f824cc5450d
[ "MIT" ]
null
null
null
slave/views.py
ngr/sm_00
d8480cbbe88efd9947e2cb6d5a205f824cc5450d
[ "MIT" ]
117
2015-01-01T06:20:05.000Z
2016-01-06T08:16:20.000Z
slave/views.py
ngr/sm_00
d8480cbbe88efd9947e2cb6d5a205f824cc5450d
[ "MIT" ]
null
null
null
### Slave API Views ### from django.db.models import F, Count from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import generics from rest_framework import permissions from rest_framework import pagination from slave.mode...
42.416667
104
0.637525
ework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import generics from rest_framework import permissions from rest_framework import pagination from slave.models import Slave from slave.serializers import SlaveSerializer, SlaveDetailSer...
true
true
f7377b01d87d9348bafc91d5bfbd84b56a3c9b9d
9,447
py
Python
tests/test_average_true_range_percent.py
dibyajyotidash/https-github.com-kylejusticemagnuson-pyti
08532970f9d2b163f1223599e3ac80f6c51533e4
[ "MIT" ]
1
2019-04-16T01:27:45.000Z
2019-04-16T01:27:45.000Z
tests/test_average_true_range_percent.py
dibyajyotidash/https-github.com-kylejusticemagnuson-pyti
08532970f9d2b163f1223599e3ac80f6c51533e4
[ "MIT" ]
null
null
null
tests/test_average_true_range_percent.py
dibyajyotidash/https-github.com-kylejusticemagnuson-pyti
08532970f9d2b163f1223599e3ac80f6c51533e4
[ "MIT" ]
1
2020-06-30T22:37:44.000Z
2020-06-30T22:37:44.000Z
from __future__ import absolute_import import unittest import numpy as np from tests.sample_data import SampleData from pyti import average_true_range_percent class TestAverageTrueRangePercent(unittest.TestCase): def setUp(self): """Create data to use for testing.""" self.close_data = SampleData(...
59.791139
93
0.739812
from __future__ import absolute_import import unittest import numpy as np from tests.sample_data import SampleData from pyti import average_true_range_percent class TestAverageTrueRangePercent(unittest.TestCase): def setUp(self): self.close_data = SampleData().get_sample_close_data() self.atr_pe...
true
true
f7377bc760f77463920a28f804df1c6357cb7b35
79,949
py
Python
tests/unit/test_table.py
ryanyuan/python-bigtable
e55ca07561f9c946276f3bde599e69947769f560
[ "Apache-2.0" ]
null
null
null
tests/unit/test_table.py
ryanyuan/python-bigtable
e55ca07561f9c946276f3bde599e69947769f560
[ "Apache-2.0" ]
null
null
null
tests/unit/test_table.py
ryanyuan/python-bigtable
e55ca07561f9c946276f3bde599e69947769f560
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
38.271422
88
0.671416
import unittest import mock from ._testing import _make_credentials from google.api_core.exceptions import DeadlineExceeded class Test___mutate_rows_request(unittest.TestCase): def _call_fut(self, table_name, rows): from google.cloud.bigtable.table import _mutate_rows_request retu...
true
true
f7377c984300222892a90ae77a735e1cd718ad77
4,304
py
Python
python/taichi/ui/staging_buffer.py
gaoxinge/taichi
86d403f071b8505858763d4712b37cd71b89db91
[ "MIT" ]
11,699
2020-01-09T03:02:46.000Z
2022-03-31T20:59:08.000Z
python/taichi/ui/staging_buffer.py
gaoxinge/taichi
86d403f071b8505858763d4712b37cd71b89db91
[ "MIT" ]
3,589
2020-01-09T03:18:25.000Z
2022-03-31T19:06:42.000Z
python/taichi/ui/staging_buffer.py
gaoxinge/taichi
86d403f071b8505858763d4712b37cd71b89db91
[ "MIT" ]
1,391
2020-01-09T03:02:54.000Z
2022-03-31T08:44:29.000Z
from taichi.lang.kernel_impl import kernel from taichi.lang.matrix import Vector from taichi.types.annotations import template from taichi.types.primitive_types import f32, u8 import taichi as ti vbo_field_cache = {} def get_vbo_field(vertices): if vertices not in vbo_field_cache: N = vertices.shape[0] ...
30.742857
79
0.617565
from taichi.lang.kernel_impl import kernel from taichi.lang.matrix import Vector from taichi.types.annotations import template from taichi.types.primitive_types import f32, u8 import taichi as ti vbo_field_cache = {} def get_vbo_field(vertices): if vertices not in vbo_field_cache: N = vertices.shape[0] ...
true
true
f7377dcd51a6292c65747a3c3db690121395d368
21,515
py
Python
sdk/python/pulumi_azuread/provider.py
ragnarstolsmark/pulumi-azuread
b9398511c142f0aad349e492ded419f870edc925
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azuread/provider.py
ragnarstolsmark/pulumi-azuread
b9398511c142f0aad349e492ded419f870edc925
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azuread/provider.py
ragnarstolsmark/pulumi-azuread
b9398511c142f0aad349e492ded419f870edc925
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
50.034884
203
0.668929
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ProviderArgs', 'Provider'] @pulumi.input_type class ProviderArgs: def __init__(__self__, *, metadata_host: pulumi.Input[str], ...
true
true
f7377e8adc483df2bf5c09e61c0854ad99828c2e
291
py
Python
leads/admin.py
alexdeathway/CRM
54c7a1605c9db5af35618e0c198239c0d329fbea
[ "MIT" ]
2
2021-10-04T13:46:31.000Z
2022-02-15T11:34:39.000Z
leads/admin.py
alexdeathway/CRM
54c7a1605c9db5af35618e0c198239c0d329fbea
[ "MIT" ]
null
null
null
leads/admin.py
alexdeathway/CRM
54c7a1605c9db5af35618e0c198239c0d329fbea
[ "MIT" ]
1
2021-10-04T13:46:51.000Z
2021-10-04T13:46:51.000Z
from django.contrib import admin from .models import LeadModel,AgentModel,UserProfile,User,CategoryModel # Register your models here. admin.site.register(LeadModel) admin.site.register(AgentModel) admin.site.register(UserProfile) admin.site.register(User) admin.site.register(CategoryModel)
32.333333
71
0.841924
from django.contrib import admin from .models import LeadModel,AgentModel,UserProfile,User,CategoryModel admin.site.register(LeadModel) admin.site.register(AgentModel) admin.site.register(UserProfile) admin.site.register(User) admin.site.register(CategoryModel)
true
true
f7377f8f4bfcc5d200b1a7d4c2087be49ac96239
25,064
py
Python
selfdrive/controls/controlsd.py
stevenan93/openpilot
2162d8d6654944652ca4ae84be8c05b702fb65fb
[ "MIT" ]
12
2020-12-12T05:08:33.000Z
2022-03-08T09:05:01.000Z
selfdrive/controls/controlsd.py
Ambroos/openpilot
7488c6d2613409bd5d505b85c157906e5b9d1a1e
[ "MIT" ]
1
2021-02-02T20:57:27.000Z
2021-02-02T20:57:27.000Z
selfdrive/controls/controlsd.py
Ambroos/openpilot
7488c6d2613409bd5d505b85c157906e5b9d1a1e
[ "MIT" ]
2
2020-12-18T07:20:37.000Z
2021-01-13T02:49:44.000Z
#!/usr/bin/env python3 import os from cereal import car, log from common.numpy_fast import clip from common.realtime import sec_since_boot, config_realtime_process, Priority, Ratekeeper, DT_CTRL from common.profiler import Profiler from common.params import Params, put_nonblocking import cereal.messaging as messaging f...
42.991424
175
0.718042
import os from cereal import car, log from common.numpy_fast import clip from common.realtime import sec_since_boot, config_realtime_process, Priority, Ratekeeper, DT_CTRL from common.profiler import Profiler from common.params import Params, put_nonblocking import cereal.messaging as messaging from selfdrive.config i...
true
true
f7377f954c9f4a7a2c10fdd7e6b44fa63d78d86d
91
py
Python
web/app/ponthe/v1/private/__init__.py
adriensade/Galeries
2a1b53d5fa07621fa3e41b10e26af9dd32b0e874
[ "MIT" ]
null
null
null
web/app/ponthe/v1/private/__init__.py
adriensade/Galeries
2a1b53d5fa07621fa3e41b10e26af9dd32b0e874
[ "MIT" ]
1
2021-01-05T03:43:06.000Z
2021-01-05T03:43:06.000Z
web/app/ponthe/v1/private/__init__.py
adriensade/Galeries
2a1b53d5fa07621fa3e41b10e26af9dd32b0e874
[ "MIT" ]
3
2020-09-09T17:50:01.000Z
2021-07-29T19:48:49.000Z
from flask import Blueprint private = Blueprint('private', __name__) from . import views
15.166667
40
0.769231
from flask import Blueprint private = Blueprint('private', __name__) from . import views
true
true
f737817d8dd54ed46dc03cdbf6a19c5a65b537d3
3,942
py
Python
tests/test_statefulset.py
rberrelleza/chaostoolkit-kubernetes
cb77bc13cfae866fda9a015873ce0430e4cb0b6a
[ "Apache-2.0" ]
null
null
null
tests/test_statefulset.py
rberrelleza/chaostoolkit-kubernetes
cb77bc13cfae866fda9a015873ce0430e4cb0b6a
[ "Apache-2.0" ]
2
2019-12-22T12:01:00.000Z
2020-01-09T13:10:52.000Z
tests/test_statefulset.py
rberrelleza/chaostoolkit-kubernetes
cb77bc13cfae866fda9a015873ce0430e4cb0b6a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from unittest.mock import MagicMock, patch, ANY import pytest from chaoslib.exceptions import ActivityFailed from chaosk8s.statefulset.actions import scale_statefulset, \ remove_statefulset, create_statefulset @patch('chaosk8s.has_local_config_file', autospec=True) @patch('chaosk8s.state...
32.311475
74
0.754947
from unittest.mock import MagicMock, patch, ANY import pytest from chaoslib.exceptions import ActivityFailed from chaosk8s.statefulset.actions import scale_statefulset, \ remove_statefulset, create_statefulset @patch('chaosk8s.has_local_config_file', autospec=True) @patch('chaosk8s.statefulset.actions.client',...
true
true
f73781beaeb82b30b5f72655a6d939de278dc543
7,921
py
Python
bioblend/_tests/TestGalaxyHistories.py
pcm32/bioblend
99d05e6ad697edc82c58f8ce7302be2a005c6933
[ "MIT" ]
null
null
null
bioblend/_tests/TestGalaxyHistories.py
pcm32/bioblend
99d05e6ad697edc82c58f8ce7302be2a005c6933
[ "MIT" ]
null
null
null
bioblend/_tests/TestGalaxyHistories.py
pcm32/bioblend
99d05e6ad697edc82c58f8ce7302be2a005c6933
[ "MIT" ]
null
null
null
""" """ import os import shutil import tarfile import tempfile from . import GalaxyTestBase class TestGalaxyHistories(GalaxyTestBase.GalaxyTestBase): def setUp(self): super(TestGalaxyHistories, self).setUp() self.default_history_name = "buildbot - automated test" self.history = self.gi.h...
46.869822
137
0.68047
import os import shutil import tarfile import tempfile from . import GalaxyTestBase class TestGalaxyHistories(GalaxyTestBase.GalaxyTestBase): def setUp(self): super(TestGalaxyHistories, self).setUp() self.default_history_name = "buildbot - automated test" self.history = self.gi.histories...
true
true
f737827e9693df106d9fcd506ada362960f71264
17,806
py
Python
python/build.py
matthewdeanmartin/json_kata
24d561c3a0a52251c449d8a5d2bcf7dd540f4245
[ "MIT" ]
null
null
null
python/build.py
matthewdeanmartin/json_kata
24d561c3a0a52251c449d8a5d2bcf7dd540f4245
[ "MIT" ]
null
null
null
python/build.py
matthewdeanmartin/json_kata
24d561c3a0a52251c449d8a5d2bcf7dd540f4245
[ "MIT" ]
null
null
null
# coding=utf-8 """ Build tasks """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import glob import json import os import subprocess import sys from pynt import task from pyntcontrib import execute, safe_cd from semantic_version import Version PROJECT_N...
31.238596
127
0.568123
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import glob import json import os import subprocess import sys from pynt import task from pyntcontrib import execute, safe_cd from semantic_version import Version PROJECT_NAME = "simple_calls" SRC = '.' PY...
true
true
f7378301a74dc9cd9e025b71204a6e6ed1b8e4b4
4,520
py
Python
pypayd/interfaces/blockr.py
ser/pypayd-ng
63d0e09ca5e966177874e6e2e82f6036898a56b0
[ "MIT" ]
null
null
null
pypayd/interfaces/blockr.py
ser/pypayd-ng
63d0e09ca5e966177874e6e2e82f6036898a56b0
[ "MIT" ]
null
null
null
pypayd/interfaces/blockr.py
ser/pypayd-ng
63d0e09ca5e966177874e6e2e82f6036898a56b0
[ "MIT" ]
null
null
null
""" blockr.io """ import logging import hashlib from hashlib import sha256 import requests from .. import config from binascii import hexlify, unhexlify def getUrl(request_string): return requests.get(request_string).json() def setHost(): config.BLOCKCHAIN_CONNECT = ('http://tbtc.blockr.io' if config.TESTNET ...
34.503817
103
0.562389
import logging import hashlib from hashlib import sha256 import requests from .. import config from binascii import hexlify, unhexlify def getUrl(request_string): return requests.get(request_string).json() def setHost(): config.BLOCKCHAIN_CONNECT = ('http://tbtc.blockr.io' if config.TESTNET else 'http://btc.b...
true
true
f737836eb51c31c1cd9b54b93f663abea9613c18
333
py
Python
test/login_test.py
sparkyvxcx/telespier
8a66629bdab5cd010e4a1b7e2e54ff8938aab288
[ "MIT" ]
3
2020-10-03T06:06:37.000Z
2021-01-12T11:14:29.000Z
test/login_test.py
sparkyvxcx/telespier
8a66629bdab5cd010e4a1b7e2e54ff8938aab288
[ "MIT" ]
null
null
null
test/login_test.py
sparkyvxcx/telespier
8a66629bdab5cd010e4a1b7e2e54ff8938aab288
[ "MIT" ]
null
null
null
from telethon import TelegramClient # Use your own values from my.telegram.org api_id = <your-id> api_hash = <your-hash> # The first parameter is the .session file name (absolute paths allowed) with TelegramClient('anon', api_id, api_hash) as client: client.loop.run_until_complete(client.send_message('me', 'Hello...
33.3
79
0.75976
from telethon import TelegramClient api_id = <your-id> api_hash = <your-hash> with TelegramClient('anon', api_id, api_hash) as client: client.loop.run_until_complete(client.send_message('me', 'Hello, myself!'))
false
true
f73783f43a83454c6e8f9343bc28de26e3306193
9,158
py
Python
test/widgets/test_mpris2widget.py
karthink/qtile
83bd706dbf2d3abeda990d728c74310ea1fbea92
[ "MIT" ]
null
null
null
test/widgets/test_mpris2widget.py
karthink/qtile
83bd706dbf2d3abeda990d728c74310ea1fbea92
[ "MIT" ]
null
null
null
test/widgets/test_mpris2widget.py
karthink/qtile
83bd706dbf2d3abeda990d728c74310ea1fbea92
[ "MIT" ]
null
null
null
# Copyright (c) 2021 elParaguayo # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distrib...
34.171642
116
0.698624
import sys from importlib import reload from types import ModuleType import pytest from libqtile.bar import Bar def no_op(*args, **kwargs): pass async def mock_signal_receiver(*args, **kwargs): return True def fake_timer(interval, func, *args, **kwargs): class TimerObj: ...
true
true
f737854a198f1054eb409018d023611d116717a7
19,025
py
Python
django/contrib/gis/tests/distapp/tests.py
hellysmile/django
f915d39afe3565ac2355de57c11843530b96f3bc
[ "BSD-3-Clause" ]
null
null
null
django/contrib/gis/tests/distapp/tests.py
hellysmile/django
f915d39afe3565ac2355de57c11843530b96f3bc
[ "BSD-3-Clause" ]
null
null
null
django/contrib/gis/tests/distapp/tests.py
hellysmile/django
f915d39afe3565ac2355de57c11843530b96f3bc
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals from unittest import skipUnless from django.db import connection from django.db.models import Q from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.measure import D # alias for Distance from django.contrib.gis.tests.utils import ( HAS_SPATIAL_DB, mysql, or...
49.544271
196
0.634901
from __future__ import unicode_literals from unittest import skipUnless from django.db import connection from django.db.models import Q from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.measure import D from django.contrib.gis.tests.utils import ( HAS_SPATIAL_DB, mysql, oracle, postgis, spati...
true
true
f73785767837a20dce3d7cd775c23b406a9a4698
2,171
py
Python
salt/states/ifttt.py
markgras/salt
d66cd3c935533c63870b83228b978ce43e0ef70d
[ "Apache-2.0" ]
9,425
2015-01-01T05:59:24.000Z
2022-03-31T20:44:05.000Z
salt/states/ifttt.py
markgras/salt
d66cd3c935533c63870b83228b978ce43e0ef70d
[ "Apache-2.0" ]
33,507
2015-01-01T00:19:56.000Z
2022-03-31T23:48:20.000Z
salt/states/ifttt.py
markgras/salt
d66cd3c935533c63870b83228b978ce43e0ef70d
[ "Apache-2.0" ]
5,810
2015-01-01T19:11:45.000Z
2022-03-31T02:37:20.000Z
""" Trigger an event in IFTTT ========================= This state is useful for trigging events in IFTTT. .. versionadded:: 2015.8.0 .. code-block:: yaml ifttt-event: ifttt.trigger_event: - event: TestEvent - value1: 'This state was executed successfully.' - value2: 'Another value...
24.670455
83
0.599263
def __virtual__(): if "ifttt.trigger_event" in __salt__: return "ifttt" return (False, "ifttt module could not be loaded") def trigger_event(name, event, value1=None, value2=None, value3=None): ret = {"name": name, "changes": {}, "result": False, "comment": ""} if __opts__["test"]: ...
true
true
f7378620c3d9001e8c20431b0cbc80ad157bf7d5
2,433
py
Python
tensorflow/python/data/experimental/kernel_tests/optimization/latency_all_edges_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/python/data/experimental/kernel_tests/optimization/latency_all_edges_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/python/data/experimental/kernel_tests/optimization/latency_all_edges_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
43.446429
85
0.72462
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.data.experimental.kernel_tests import stats_dataset_test_base from tensorflow.python.data.experimental.ops import optimization from tensorflow.python.data.experimental...
true
true
f73787f0a33a0e0fdf8e3030e315016ac855edea
3,256
py
Python
iceScripts/isdacProfileModifications_dry_above.py
JaakkoAhola/LES-scripting
1ebe99ce4292e58581bf50615cb8e0aa3d0c0af2
[ "MIT" ]
null
null
null
iceScripts/isdacProfileModifications_dry_above.py
JaakkoAhola/LES-scripting
1ebe99ce4292e58581bf50615cb8e0aa3d0c0af2
[ "MIT" ]
null
null
null
iceScripts/isdacProfileModifications_dry_above.py
JaakkoAhola/LES-scripting
1ebe99ce4292e58581bf50615cb8e0aa3d0c0af2
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Aug 28 13:38:05 2018 @author: aholaj """ import numpy as np import sound_in_profiles as sp import PythonMethods as pm import ModDataPros as mdp from copy import deepcopy from FindCloudBase import calc_rh_profile from ECLAIR_calcs import calc_rw i...
23.092199
215
0.57801
import numpy as np import sound_in_profiles as sp import PythonMethods as pm import ModDataPros as mdp from copy import deepcopy from FindCloudBase import calc_rh_profile from ECLAIR_calcs import calc_rw import time start = time.time() isdac = sp.Profiles("sound_in3.5","bin/case_isdac") rh = isdac.getRH() ...
true
true
f7378804f0e2d59729dbb42ff05a341b038f13ff
6,907
py
Python
sysujwxt.py
hzxa21/coursemate
02996e7a9ee03aa1ab018f6b248133324b2c3c73
[ "MIT" ]
null
null
null
sysujwxt.py
hzxa21/coursemate
02996e7a9ee03aa1ab018f6b248133324b2c3c73
[ "MIT" ]
null
null
null
sysujwxt.py
hzxa21/coursemate
02996e7a9ee03aa1ab018f6b248133324b2c3c73
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib import urllib2 import cookielib import re import json import sys LOGIN_TIMEOUT = 15 REQUEST_TIMEOUT = 25 # ---------------- # Basic functions # ---------------- def format_to_json(unformated_json): # pat = r'(\w+(?=:))' pat = r'((?:(?<=[,{\[])\s*)(\w...
27.850806
96
0.485884
import urllib import urllib2 import cookielib import re import json import sys LOGIN_TIMEOUT = 15 REQUEST_TIMEOUT = 25 def format_to_json(unformated_json): pat = r'((?:(?<=[,{\[])\s*)(\w+)(?=:))' sub = r'"\1"' return re.sub(pat, sub, unformated_json) def retrive_data(url,cookie, request_json): ...
false
true
f737882edefd04e1461379f3dc323c5656e7fcdd
7,654
py
Python
2021/Day18/Day18-Prob2-Biggest-Magnitude.py
guilhermebaos/Advent-of-Code-Solutions
232facf72a21284478134b2c56357352b4aaaf74
[ "MIT" ]
null
null
null
2021/Day18/Day18-Prob2-Biggest-Magnitude.py
guilhermebaos/Advent-of-Code-Solutions
232facf72a21284478134b2c56357352b4aaaf74
[ "MIT" ]
null
null
null
2021/Day18/Day18-Prob2-Biggest-Magnitude.py
guilhermebaos/Advent-of-Code-Solutions
232facf72a21284478134b2c56357352b4aaaf74
[ "MIT" ]
null
null
null
from copy import deepcopy # Puzzle Input ---------- with open('Day18-Input.txt', 'r') as file: puzzle = file.read().split('\n') with open('Day18-Test01.txt', 'r') as file: test01 = file.read().split('\n') with open('Day18-Test02.txt', 'r') as file: test02 = file.read().split('\n') # Main Code ---------...
33.867257
115
0.594591
from copy import deepcopy with open('Day18-Input.txt', 'r') as file: puzzle = file.read().split('\n') with open('Day18-Test01.txt', 'r') as file: test01 = file.read().split('\n') with open('Day18-Test02.txt', 'r') as file: test02 = file.read().split('\n') class SnailNumber: def __init__(self, s...
true
true
f737886df794ae13500f275031a3c22906034d18
31,165
py
Python
test/python/transpiler/test_pass_scheduler.py
dominik-steenken/qiskit-terra
1e04bad5067610abda5e7cbba36939745075f3b9
[ "Apache-2.0" ]
2
2021-09-06T19:25:36.000Z
2021-11-17T10:46:12.000Z
test/python/transpiler/test_pass_scheduler.py
gaurav-iiser/qiskit-terra
3554a7e9ab5c77432ed5ccaa106fb8dc15553756
[ "Apache-2.0" ]
null
null
null
test/python/transpiler/test_pass_scheduler.py
gaurav-iiser/qiskit-terra
3554a7e9ab5c77432ed5ccaa106fb8dc15553756
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. # pylint: disable=invalid-name """Transpiler testing""" import unittest.mock from qiskit import QuantumRegister, QuantumCi...
60.397287
100
0.56018
import unittest.mock from qiskit import QuantumRegister, QuantumCircuit from qiskit.dagcircuit import DAGCircuit from qiskit.transpiler import PassManager from qiskit.transpiler import transpile_dag from qiskit.transpiler import TranspilerAccessError, TranspilerError from qiskit.transpiler.passmanager import...
true
true
f7378884bdfd4e721e18c4902180b71f13438de9
371
py
Python
src/ortec/scientific/benchmarks/loadbuilding/common/objectives/ItemCountObjective.py
ORTECScientificBenchmarks/ortec-scientific-benchmarks-loadbuilding
8b1f5c58d930448a29195355d28fda856f4705b2
[ "MIT" ]
4
2018-05-23T22:48:42.000Z
2020-04-21T10:21:30.000Z
src/ortec/scientific/benchmarks/loadbuilding/common/objectives/ItemCountObjective.py
ORTECScientificBenchmarks/ortec-scientific-benchmarks-loadbuilding
8b1f5c58d930448a29195355d28fda856f4705b2
[ "MIT" ]
null
null
null
src/ortec/scientific/benchmarks/loadbuilding/common/objectives/ItemCountObjective.py
ORTECScientificBenchmarks/ortec-scientific-benchmarks-loadbuilding
8b1f5c58d930448a29195355d28fda856f4705b2
[ "MIT" ]
null
null
null
from ..Requirements import BaseObjective # MAXIMIZE class ItemCountObjective(BaseObjective): name = "item_count" def Evaluate(threeDsolution): return -sum([1 for placement in threeDsolution.GetAllPlacements() if placement.position != placement.UNPLACED and placement.itemid is not None]) if __n...
37.1
153
0.733154
from ..Requirements import BaseObjective class ItemCountObjective(BaseObjective): name = "item_count" def Evaluate(threeDsolution): return -sum([1 for placement in threeDsolution.GetAllPlacements() if placement.position != placement.UNPLACED and placement.itemid is not None]) if __name__=="__m...
true
true
f737889d9eddff618f66eb6757a8f32ee1eb73a5
517
py
Python
msgraph-cli-extensions/beta/search_beta/azext_search_beta/vendored_sdks/search/aio/__init__.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
msgraph-cli-extensions/beta/search_beta/azext_search_beta/vendored_sdks/search/aio/__init__.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
msgraph-cli-extensions/beta/search_beta/azext_search_beta/vendored_sdks/search/aio/__init__.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
47
94
0.545455
from ._search import Search __all__ = ['Search']
true
true
f73788dfeceda67549aad48d49a50ffa4c97a2cc
9,168
py
Python
aiger_coins/pcirc.py
mvcisback/py-aiger-coins
3e7f5a84e56debe7001d63f2f271e29163781e68
[ "MIT" ]
null
null
null
aiger_coins/pcirc.py
mvcisback/py-aiger-coins
3e7f5a84e56debe7001d63f2f271e29163781e68
[ "MIT" ]
7
2019-04-01T17:19:13.000Z
2019-11-01T17:33:15.000Z
aiger_coins/pcirc.py
mvcisback/py-aiger-coins
3e7f5a84e56debe7001d63f2f271e29163781e68
[ "MIT" ]
2
2019-03-28T03:05:53.000Z
2021-01-05T23:03:53.000Z
from __future__ import annotations import heapq import random import uuid from fractions import Fraction from functools import reduce from typing import Any, Mapping, Optional, Sequence, Union import aiger import aiger_bv as BV import aiger_discrete import attr import funcy as fn from aiger_discrete import FiniteFunc...
33.582418
96
0.634708
from __future__ import annotations import heapq import random import uuid from fractions import Fraction from functools import reduce from typing import Any, Mapping, Optional, Sequence, Union import aiger import aiger_bv as BV import aiger_discrete import attr import funcy as fn from aiger_discrete import FiniteFunc...
true
true
f73788ed4caf943d9fa5b917f5ab8ead5a549021
5,333
py
Python
sdk/python/pulumi_kubernetes/rbac/v1beta1/ClusterRoleBinding.py
MatheusMiranda/pulumi-kubernetes
eecebd55fe96f63365194182a69d99eda625bb96
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/rbac/v1beta1/ClusterRoleBinding.py
MatheusMiranda/pulumi-kubernetes
eecebd55fe96f63365194182a69d99eda625bb96
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/rbac/v1beta1/ClusterRoleBinding.py
MatheusMiranda/pulumi-kubernetes
eecebd55fe96f63365194182a69d99eda625bb96
[ "Apache-2.0" ]
null
null
null
# *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings from typing import Optional import pulumi import pulumi.runtime from pulumi import Input, ResourceOptions from ... import tables, version ...
41.664063
124
0.68498
import warnings from typing import Optional import pulumi import pulumi.runtime from pulumi import Input, ResourceOptions from ... import tables, version class ClusterRoleBinding(pulumi.CustomResource): apiVersion: pulumi.Output[str] kind: pulumi.Output[str] metadata: pulumi.Output[dict] role...
true
true
f7378950d246488d9590ce8266a72dc5659ccc9a
4,465
py
Python
third_party/maya/lib/usdMaya/testenv/testUsdImportFrameRange.py
YuqiaoZhang/USD
bf3a21e6e049486441440ebf8c0387db2538d096
[ "BSD-2-Clause" ]
88
2018-07-13T01:22:00.000Z
2022-01-16T22:15:27.000Z
third_party/maya/lib/usdMaya/testenv/testUsdImportFrameRange.py
YuqiaoZhang/USD
bf3a21e6e049486441440ebf8c0387db2538d096
[ "BSD-2-Clause" ]
1
2020-07-07T22:39:42.000Z
2020-07-07T22:39:42.000Z
third_party/maya/lib/usdMaya/testenv/testUsdImportFrameRange.py
YuqiaoZhang/USD
bf3a21e6e049486441440ebf8c0387db2538d096
[ "BSD-2-Clause" ]
26
2018-06-06T03:39:22.000Z
2021-08-28T23:02:42.000Z
#!/pxrpythonsubst # # Copyright 2016 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # ...
34.083969
81
0.670101
import os import unittest from pxr import Usd from maya import cmds from maya import standalone class testUsdImportFrameRange(unittest.TestCase): def _LoadUsdWithRange(self, start=None, end=None): usdFilePath = os.path.abspath('MovingCube.usda') cmds.loadPlugin...
true
true
f737899751ad1f4262188710f83c78d542af1fc8
1,016
py
Python
src/fact/cli.py
nagagopi19/19thAug2020-caswstudy
fe3d5fa75b9d3d3b9ef1a2013866e9f9fff60ec8
[ "MIT" ]
null
null
null
src/fact/cli.py
nagagopi19/19thAug2020-caswstudy
fe3d5fa75b9d3d3b9ef1a2013866e9f9fff60ec8
[ "MIT" ]
null
null
null
src/fact/cli.py
nagagopi19/19thAug2020-caswstudy
fe3d5fa75b9d3d3b9ef1a2013866e9f9fff60ec8
[ "MIT" ]
1
2021-09-10T14:49:59.000Z
2021-09-10T14:49:59.000Z
#!/usr/bin/env python3 import argparse import sys import colorama from exitstatus import ExitStatus from fact.lib import factorial def parse_args() -> argparse.Namespace: """Parse user command line arguments.""" parser = argparse.ArgumentParser( description="Compute factorial of a given input.", ...
27.459459
89
0.699803
import argparse import sys import colorama from exitstatus import ExitStatus from fact.lib import factorial def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser( description="Compute factorial of a given input.", formatter_class=argparse.ArgumentDefaultsHelpFormatter, )...
true
true
f7378d80bbdae3bef7c248482c5c931876ca66a6
1,062
py
Python
aula1705_revisao/arquivos_hard.py
fillipesouza/aulasdelogicaprogramacao
409a9b82433eea9bcef2203c7c48ac0ab698f5db
[ "MIT" ]
1
2021-06-30T11:53:21.000Z
2021-06-30T11:53:21.000Z
aula1705_revisao/arquivos_hard.py
fillipesouza/aulasdelogicaprogramacao
409a9b82433eea9bcef2203c7c48ac0ab698f5db
[ "MIT" ]
null
null
null
aula1705_revisao/arquivos_hard.py
fillipesouza/aulasdelogicaprogramacao
409a9b82433eea9bcef2203c7c48ac0ab698f5db
[ "MIT" ]
25
2021-04-17T00:36:10.000Z
2021-06-01T17:28:16.000Z
# Objetivo: # Criar um arquivo que mostre: # Aluno -- media # =============================== # Aprovados --- total_aprovado ( media >= 6 ) alunos = [] medias = [] with open('./alunos.txt', 'r') as arquivo_alunos: try: linhas = arquivo_alunos.readlines() for linha in linhas: linha_co...
32.181818
76
0.584746
alunos = [] medias = [] with open('./alunos.txt', 'r') as arquivo_alunos: try: linhas = arquivo_alunos.readlines() for linha in linhas: linha_com_split = linha.split(',') alunos.append(linha_com_split[0]) notas = list(map(lambda nota: float(nota), linha_com_...
true
true
f7378d85ebe9b6cfc3c79ed398382806d5a100e5
2,513
py
Python
test/runtime/frontend_test/chainer_test/functions_test/connection_test/convolution_2d_function_test.py
steerapi/webdnn
1df51cc094e5a528cfd3452c264905708eadb491
[ "MIT" ]
1
2021-04-09T15:55:35.000Z
2021-04-09T15:55:35.000Z
test/runtime/frontend_test/chainer_test/functions_test/connection_test/convolution_2d_function_test.py
steerapi/webdnn
1df51cc094e5a528cfd3452c264905708eadb491
[ "MIT" ]
null
null
null
test/runtime/frontend_test/chainer_test/functions_test/connection_test/convolution_2d_function_test.py
steerapi/webdnn
1df51cc094e5a528cfd3452c264905708eadb491
[ "MIT" ]
null
null
null
import chainer import numpy as np from test.util import generate_kernel_test_case, wrap_template from webdnn.graph.placeholder import Placeholder from webdnn.frontend.chainer.converter import ChainerConverter from webdnn.frontend.chainer.placeholder_variable import PlaceholderVariable @wrap_template def template(n=2...
24.398058
107
0.657382
import chainer import numpy as np from test.util import generate_kernel_test_case, wrap_template from webdnn.graph.placeholder import Placeholder from webdnn.frontend.chainer.converter import ChainerConverter from webdnn.frontend.chainer.placeholder_variable import PlaceholderVariable @wrap_template def template(n=2...
true
true
f7378d86a9f0d3e6a2d28726474b637ff6da08e3
5,794
py
Python
minfraud/komand_minfraud/actions/card_lookup/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
minfraud/komand_minfraud/actions/card_lookup/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
minfraud/komand_minfraud/actions/card_lookup/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Input: ADDRESS = "address" AVS_RESULT = "avs_result" BANK_PHONE_COUNTRY_CODE = "bank_phone_country_code" BANK_PHONE_NUMBER = "bank_phone_number" CARD_BANK_NAME = "card_bank_name" CARD_ISSUER_ID_NUMBER = "card_issuer_id_num...
25.866071
75
0.497411
import komand import json class Input: ADDRESS = "address" AVS_RESULT = "avs_result" BANK_PHONE_COUNTRY_CODE = "bank_phone_country_code" BANK_PHONE_NUMBER = "bank_phone_number" CARD_BANK_NAME = "card_bank_name" CARD_ISSUER_ID_NUMBER = "card_issuer_id_number" CARD_LAST_4_DIGITS = "card_las...
true
true
f7378dbd126246fe227c0d1477147fbb6adf240c
665
py
Python
Algorithms/4_Sorting/10.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
1
2021-11-25T13:39:30.000Z
2021-11-25T13:39:30.000Z
Algorithms/4_Sorting/10.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
Algorithms/4_Sorting/10.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/countingsort2/problem #!/bin/python3 import math import os import random import re import sys # # Complete the 'countingSort' function below. # # The function is expected to return an INTEGER_ARRAY. # The function accepts INTEGER_ARRAY arr as parameter. # def countingSort(arr...
20.151515
70
0.67218
import math import os import random import re import sys def countingSort(arr): return [(str(z)+' ')*arr.count(z) for z in range(100) if z in arr] if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') n = int(input().strip()) arr = list(map(int, input().rstrip().split()))...
true
true
f7378e25272db7d8b1378cf7ffe0bdfc7ea625d5
1,416
py
Python
noxfile.py
iterative/pytest-test-utils
2077af9971c2774c444ba5cd894658f726f14791
[ "Apache-2.0" ]
7
2021-11-30T10:28:41.000Z
2022-01-14T09:13:21.000Z
noxfile.py
iterative/pytest-test-utils
2077af9971c2774c444ba5cd894658f726f14791
[ "Apache-2.0" ]
null
null
null
noxfile.py
iterative/pytest-test-utils
2077af9971c2774c444ba5cd894658f726f14791
[ "Apache-2.0" ]
1
2021-11-30T06:54:47.000Z
2021-11-30T06:54:47.000Z
"""Automation using nox. """ import glob import nox nox.options.reuse_existing_virtualenvs = True nox.options.sessions = "lint", "tests", "tests-pytest5" locations = "pytest_test_utils", "tests.py" @nox.session(python=["3.7", "3.8", "3.9", "3.10"]) def tests(session: nox.Session) -> None: session.install(".[tes...
28.897959
73
0.622881
import glob import nox nox.options.reuse_existing_virtualenvs = True nox.options.sessions = "lint", "tests", "tests-pytest5" locations = "pytest_test_utils", "tests.py" @nox.session(python=["3.7", "3.8", "3.9", "3.10"]) def tests(session: nox.Session) -> None: session.install(".[tests]") session.r...
true
true
f7378e54963fc94f39d6eecdddf8bf6494ebcae4
122,150
py
Python
python/ccxt/base/exchange.py
MitchellTesla/ccxt
613d5e8a0c9156c24ef2e57f8b0e5c84527558fd
[ "MIT" ]
1
2022-02-18T03:54:29.000Z
2022-02-18T03:54:29.000Z
python/ccxt/base/exchange.py
MitchellTesla/ccxt
613d5e8a0c9156c24ef2e57f8b0e5c84527558fd
[ "MIT" ]
null
null
null
python/ccxt/base/exchange.py
MitchellTesla/ccxt
613d5e8a0c9156c24ef2e57f8b0e5c84527558fd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Base exchange class""" # ----------------------------------------------------------------------------- __version__ = '1.81.74' # ----------------------------------------------------------------------------- from ccxt.base.errors import ExchangeError from ccxt.base.errors import NetworkEr...
41.505267
219
0.583045
__version__ = '1.81.74' from ccxt.base.errors import ExchangeError from ccxt.base.errors import NetworkError from ccxt.base.errors import NotSupported from ccxt.base.errors import AuthenticationError from ccxt.base.errors import DDoSProtection from ccxt.base.errors import RequestTimeout from ccxt.base.errors im...
true
true
f7378eed54e6814a8713abc80bfd6d91829808fb
8,117
py
Python
docs/conf.py
hyzhak/zalando-research-fashionmnist-analyze
5dfff74f80982769c7ffae746abc58fc7113113b
[ "MIT" ]
1
2020-05-29T22:04:52.000Z
2020-05-29T22:04:52.000Z
docs/conf.py
hyzhak/zalando-research-fashionmnist-analyze
5dfff74f80982769c7ffae746abc58fc7113113b
[ "MIT" ]
null
null
null
docs/conf.py
hyzhak/zalando-research-fashionmnist-analyze
5dfff74f80982769c7ffae746abc58fc7113113b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # zalando-research-fashionmnist-experiments documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. #...
33.130612
118
0.715412
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'zalando-research-fashionmnist-experiments' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y ...
true
true
f7379164fc6db9d093eeaf98153dca4a6cfd22ae
1,499
py
Python
components/jobRunner/QuestionJobRunnerComponent.py
AmeyKamat/ProjectJarvis
25bef53bda7ffe09b3aa5c47a910c5b35b8cf551
[ "MIT" ]
2
2020-07-18T18:54:28.000Z
2020-07-19T18:37:14.000Z
components/jobRunner/QuestionJobRunnerComponent.py
arpit006/ProjectJarvis
25bef53bda7ffe09b3aa5c47a910c5b35b8cf551
[ "MIT" ]
null
null
null
components/jobRunner/QuestionJobRunnerComponent.py
arpit006/ProjectJarvis
25bef53bda7ffe09b3aa5c47a910c5b35b8cf551
[ "MIT" ]
1
2020-07-18T18:54:31.000Z
2020-07-18T18:54:31.000Z
import requests import datetime import configparser import json import copy from circuits import Component, handler from events.JobCompleteEvent import JobCompleteEvent from events.EntityPreprocessedEvent import EntityPreprocessedEvent class QuestionJobRunnerComponent(Component): config = configparser.ConfigParser...
31.229167
85
0.749166
import requests import datetime import configparser import json import copy from circuits import Component, handler from events.JobCompleteEvent import JobCompleteEvent from events.EntityPreprocessedEvent import EntityPreprocessedEvent class QuestionJobRunnerComponent(Component): config = configparser.ConfigParser...
true
true
f737918efd2a2d94f0a2683c179a02a529cb42ed
250
py
Python
02-swiss-army-knife/03-sympy/02_limit.py
jameszhan/notes-ml
c633d04e5443eab71bc3b27fff89d57b89d1786c
[ "Apache-2.0" ]
null
null
null
02-swiss-army-knife/03-sympy/02_limit.py
jameszhan/notes-ml
c633d04e5443eab71bc3b27fff89d57b89d1786c
[ "Apache-2.0" ]
null
null
null
02-swiss-army-knife/03-sympy/02_limit.py
jameszhan/notes-ml
c633d04e5443eab71bc3b27fff89d57b89d1786c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import sympy as sp x = sp.symbols('x') assert 1 == sp.limit(sp.exp(x), x, 0) assert 1 == sp.limit(sp.sin(x) / x, x, 0) assert sp.oo == sp.limit(1.0 / x, x, 0) assert sp.E.evalf() == sp.limit((1 + 1.0 / x) ** x, x, sp.oo)
19.230769
61
0.536
import sympy as sp x = sp.symbols('x') assert 1 == sp.limit(sp.exp(x), x, 0) assert 1 == sp.limit(sp.sin(x) / x, x, 0) assert sp.oo == sp.limit(1.0 / x, x, 0) assert sp.E.evalf() == sp.limit((1 + 1.0 / x) ** x, x, sp.oo)
true
true
f73792cd475518e27d7d608ce2f44b249c7c457d
1,383
py
Python
test/PR_test/unit_test/dataset/test_dir_dataset.py
DwijayDS/fastestimator
9b288cb2bd870f971ec4cee09d0b3205e1316a94
[ "Apache-2.0" ]
57
2019-05-21T21:29:26.000Z
2022-02-23T05:55:21.000Z
test/PR_test/unit_test/dataset/test_dir_dataset.py
vbvg2008/fastestimator
6061a4fbbeb62a2194ef82ba8017f651710d0c65
[ "Apache-2.0" ]
93
2019-05-23T18:36:07.000Z
2022-03-23T17:15:55.000Z
test/PR_test/unit_test/dataset/test_dir_dataset.py
vbvg2008/fastestimator
6061a4fbbeb62a2194ef82ba8017f651710d0c65
[ "Apache-2.0" ]
47
2019-05-09T15:41:37.000Z
2022-03-26T17:00:08.000Z
# Copyright 2020 The FastEstimator 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 appl...
36.394737
80
0.676067
import os import tempfile import unittest import fastestimator as fe class TestDirDataset(unittest.TestCase): def test_dataset(self): tmpdirname = tempfile.mkdtemp() a_tmpdirname = tempfile.TemporaryDirectory(dir=tmpdirname) b_tmpdirname = tempfile.TemporaryDirectory(dir=tm...
true
true
f737936a6a56fbaeef9388d0c2890f297b18d367
925
py
Python
kubernetes/test/test_v1_projected_volume_source.py
jraby/kubernetes-client-python
e6e7b710d0b15fbde686bc9dccf00da5951bef84
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_projected_volume_source.py
jraby/kubernetes-client-python
e6e7b710d0b15fbde686bc9dccf00da5951bef84
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_projected_volume_source.py
jraby/kubernetes-client-python
e6e7b710d0b15fbde686bc9dccf00da5951bef84
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
21.511628
105
0.72973
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_projected_volume_source import V1ProjectedVolumeSource class TestV1ProjectedVolumeSource(unittest.TestCase): def setUp(self):...
true
true
f73794471a1d5903494c9844b55e13a364aceb5f
3,491
py
Python
deepchem/molnet/__init__.py
hsjang001205/deepchem
02fce35729826b1ef12a1cfa6519b491510217be
[ "MIT" ]
1
2021-03-24T09:28:05.000Z
2021-03-24T09:28:05.000Z
deepchem/molnet/__init__.py
hsjang001205/deepchem
02fce35729826b1ef12a1cfa6519b491510217be
[ "MIT" ]
null
null
null
deepchem/molnet/__init__.py
hsjang001205/deepchem
02fce35729826b1ef12a1cfa6519b491510217be
[ "MIT" ]
null
null
null
from deepchem.molnet.load_function.bace_datasets import load_bace_classification, load_bace_regression from deepchem.molnet.load_function.bbbc_datasets import load_bbbc001, load_bbbc002 from deepchem.molnet.load_function.bbbp_datasets import load_bbbp from deepchem.molnet.load_function.cell_counting_datasets import loa...
68.45098
129
0.899742
from deepchem.molnet.load_function.bace_datasets import load_bace_classification, load_bace_regression from deepchem.molnet.load_function.bbbc_datasets import load_bbbc001, load_bbbc002 from deepchem.molnet.load_function.bbbp_datasets import load_bbbp from deepchem.molnet.load_function.cell_counting_datasets import loa...
true
true
f73794a235f314ddb7e307e688f102290a6a5311
654
py
Python
ws/handler/event/enum/enable.py
fabaff/automate-ws
a9442f287692787e3f253e1ff23758bec8f3902e
[ "MIT" ]
null
null
null
ws/handler/event/enum/enable.py
fabaff/automate-ws
a9442f287692787e3f253e1ff23758bec8f3902e
[ "MIT" ]
1
2021-12-21T11:34:47.000Z
2021-12-21T11:34:47.000Z
ws/handler/event/enum/enable.py
fabaff/automate-ws
a9442f287692787e3f253e1ff23758bec8f3902e
[ "MIT" ]
1
2021-12-21T10:10:13.000Z
2021-12-21T10:10:13.000Z
import home from ws.handler.event.enum import Handler as Parent class Handler(Parent): KLASS = home.event.enable.Event TEMPLATE = "event/enum.html" LABEL = "Detach logic is" ENABLED = "enabled" DISABLED = "disabled" def _get_str(self, e): if e == home.event.enable.Event.On: ...
24.222222
51
0.597859
import home from ws.handler.event.enum import Handler as Parent class Handler(Parent): KLASS = home.event.enable.Event TEMPLATE = "event/enum.html" LABEL = "Detach logic is" ENABLED = "enabled" DISABLED = "disabled" def _get_str(self, e): if e == home.event.enable.Event.On: ...
true
true
f737954b6b6e59fd4ada184d6b50c10829ed9110
403
py
Python
Exercicios em python/ex52.py
GabrielSantos25/Python
208eec0144587aa4e0aa7fa00da29ffa0478eac8
[ "MIT" ]
null
null
null
Exercicios em python/ex52.py
GabrielSantos25/Python
208eec0144587aa4e0aa7fa00da29ffa0478eac8
[ "MIT" ]
null
null
null
Exercicios em python/ex52.py
GabrielSantos25/Python
208eec0144587aa4e0aa7fa00da29ffa0478eac8
[ "MIT" ]
null
null
null
#Identificar números primos! n = int(input('Digite um número: ')) tot = 0 for c in range(1, n + 1): if n % c == 0: print('\033[33m', end='') tot += 1 else: print('\033[31m', end='') print('{} '.format(c), end='') print('\n\033[mO número {} foi divisível {} vezes'.format(n, tot)) if t...
25.1875
66
0.523573
n = int(input('Digite um número: ')) tot = 0 for c in range(1, n + 1): if n % c == 0: print('\033[33m', end='') tot += 1 else: print('\033[31m', end='') print('{} '.format(c), end='') print('\n\033[mO número {} foi divisível {} vezes'.format(n, tot)) if tot == 2: print('Número p...
true
true
f73795a45cbd4951c7250875958b8d9bd03156db
913
py
Python
noloco/constants.py
noloco-io/python-sdk
0ae6c8ff026abb60fdd2fc6eaf67f08f786f15a2
[ "MIT" ]
null
null
null
noloco/constants.py
noloco-io/python-sdk
0ae6c8ff026abb60fdd2fc6eaf67f08f786f15a2
[ "MIT" ]
null
null
null
noloco/constants.py
noloco-io/python-sdk
0ae6c8ff026abb60fdd2fc6eaf67f08f786f15a2
[ "MIT" ]
null
null
null
############################################################################### # Field Types ############################################################################### TEXT = 'TEXT' DATE = 'DATE' INTEGER = 'INTEGER' DECIMAL = 'DECIMAL' DURATION = 'DURATION' BOOLEAN = 'BOOLEAN' SINGLE_OPTION = 'SINGL...
17.226415
79
0.341731
true
true
f73795a96479817ec6ec09a28f1d10ecd495825d
7,291
py
Python
outrun/tests/test_filesystem/test_caching/test_service.py
Jacke/outrun
c67779b4c8c3f1095e84158b10a5307a443936a2
[ "Apache-2.0" ]
3,070
2020-07-14T21:43:05.000Z
2022-03-30T05:10:35.000Z
outrun/tests/test_filesystem/test_caching/test_service.py
Jacke/outrun
c67779b4c8c3f1095e84158b10a5307a443936a2
[ "Apache-2.0" ]
17
2020-07-19T21:46:13.000Z
2021-12-27T16:18:38.000Z
outrun/tests/test_filesystem/test_caching/test_service.py
Jacke/outrun
c67779b4c8c3f1095e84158b10a5307a443936a2
[ "Apache-2.0" ]
61
2020-07-23T23:34:00.000Z
2022-02-13T01:28:25.000Z
import os from pathlib import Path import shutil import stat from unittest import mock import pytest from outrun.filesystem.common import Attributes from outrun.filesystem.caching.common import Metadata from outrun.filesystem.caching.prefetching import PrefetchSuggestion from outrun.filesystem.caching.service import ...
29.881148
88
0.712934
import os from pathlib import Path import shutil import stat from unittest import mock import pytest from outrun.filesystem.common import Attributes from outrun.filesystem.caching.common import Metadata from outrun.filesystem.caching.prefetching import PrefetchSuggestion from outrun.filesystem.caching.service import ...
true
true
f73796022a8a1b4123640ee7560369d57637ddb7
352
py
Python
PARTE_1/EX012/index.py
0Fernando0/CursoPython
1dcfdb6556e41c6dedcba2857aa4382b2f81aa59
[ "MIT" ]
null
null
null
PARTE_1/EX012/index.py
0Fernando0/CursoPython
1dcfdb6556e41c6dedcba2857aa4382b2f81aa59
[ "MIT" ]
null
null
null
PARTE_1/EX012/index.py
0Fernando0/CursoPython
1dcfdb6556e41c6dedcba2857aa4382b2f81aa59
[ "MIT" ]
null
null
null
''' script reduz o valor do um produto com base no desconto(%) ''' produto = float(input('preço do produto: ')) desconto = float(input('porcentagem de desconto: ')) novo_preço = produto - ((produto / 100) * desconto) print(f'o produto custa {produto:.2f}') print(f'o valor do desconto é {desconto:.2f}') print(f'o pr...
27.076923
58
0.693182
produto = float(input('preço do produto: ')) desconto = float(input('porcentagem de desconto: ')) novo_preço = produto - ((produto / 100) * desconto) print(f'o produto custa {produto:.2f}') print(f'o valor do desconto é {desconto:.2f}') print(f'o produto custará {novo_preço:.2f}')
true
true
f73796113f70b1acc1ee507553e29b09111da657
1,866
py
Python
wiki/views.py
javiermms/makewiki
53cd7d22a36608f1edabb5199262cbb36c75ffc1
[ "MIT" ]
null
null
null
wiki/views.py
javiermms/makewiki
53cd7d22a36608f1edabb5199262cbb36c75ffc1
[ "MIT" ]
5
2021-03-19T03:12:58.000Z
2022-02-10T11:07:11.000Z
wiki/views.py
javiermms/makewiki
53cd7d22a36608f1edabb5199262cbb36c75ffc1
[ "MIT" ]
null
null
null
from django.shortcuts import render from wiki.models import Page from django.views.generic.list import ListView from django.views.generic.detail import DetailView # Create your views here. class PageList(ListView): """ CHALLENGES: 1. On GET, display a homepage that shows all Pages in your wiki. 2....
38.081633
103
0.682744
from django.shortcuts import render from wiki.models import Page from django.views.generic.list import ListView from django.views.generic.detail import DetailView class PageList(ListView): model = Page def get(self, request): latest_question_list = Page.objects.order_by('-pub_date')[:5] cont...
true
true
f73797de561c0f93602ad3a48a3e1e59cae031c5
4,535
py
Python
downstream/OpenPCDet/pcdet/utils/calibration_kitti.py
YurongYou/MODEST
cfc0465ed737f6c3166e6b5d08231880073b4552
[ "MIT" ]
5
2022-03-31T02:30:06.000Z
2022-03-31T12:34:08.000Z
downstream/OpenPCDet/pcdet/utils/calibration_kitti.py
YurongYou/MODEST
cfc0465ed737f6c3166e6b5d08231880073b4552
[ "MIT" ]
null
null
null
downstream/OpenPCDet/pcdet/utils/calibration_kitti.py
YurongYou/MODEST
cfc0465ed737f6c3166e6b5d08231880073b4552
[ "MIT" ]
null
null
null
import numpy as np def get_calib_from_file(calib_file): with open(calib_file) as f: lines = f.readlines() obj = lines[2].strip().split(' ')[1:] P2 = np.array(obj, dtype=np.float32) obj = lines[3].strip().split(' ')[1:] P3 = np.array(obj, dtype=np.float32) obj = lines[4].strip().split(...
35.708661
116
0.543991
import numpy as np def get_calib_from_file(calib_file): with open(calib_file) as f: lines = f.readlines() obj = lines[2].strip().split(' ')[1:] P2 = np.array(obj, dtype=np.float32) obj = lines[3].strip().split(' ')[1:] P3 = np.array(obj, dtype=np.float32) obj = lines[4].strip().split(...
true
true
f7379885b7e68ab94c856752a65a99f0cb05dfaf
326
py
Python
Python Spider/requests/07 requests timeout.py
CodingGorit/Coding-with-Python
b0f1d5d704b816a85b0ae57b46d00314de2a67b9
[ "Apache-2.0" ]
1
2020-01-31T15:57:29.000Z
2020-01-31T15:57:29.000Z
Python Spider/requests/07 requests timeout.py
CodingGorit/Coding-with-Python
b0f1d5d704b816a85b0ae57b46d00314de2a67b9
[ "Apache-2.0" ]
null
null
null
Python Spider/requests/07 requests timeout.py
CodingGorit/Coding-with-Python
b0f1d5d704b816a85b0ae57b46d00314de2a67b9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -- #@File: 07 requests timeout.py #@author: Gorit #@contact: gorit@qq.com #@time: 2020/5/25 20:52 ''' 超时处理: timeout 参数 (防止服务器不能正常响应而抛出异常) ''' import requests # 设置超时时间为 1s (连接 + 读取), 永久等待设置 timeout = None r = requests.get("https://httpbin.org/get", timeout = 1) print(r.status...
20.375
56
0.662577
import requests r = requests.get("https://httpbin.org/get", timeout = 1) print(r.status_code)
true
true
f737990a9b720caa889d499551a9a922db2b4c1a
884
bzl
Python
src/main/kotlin/org/wfanet/measurement/gcloud/spanner/testing/macros.bzl
VideoAmp/cross-media-measurement
66fd8f1a81b7d93f23d769f7be76d529b6a8d222
[ "Apache-2.0" ]
4
2021-05-17T17:48:16.000Z
2021-05-17T18:03:59.000Z
src/main/kotlin/org/wfanet/measurement/gcloud/spanner/testing/macros.bzl
VideoAmp/cross-media-measurement
66fd8f1a81b7d93f23d769f7be76d529b6a8d222
[ "Apache-2.0" ]
null
null
null
src/main/kotlin/org/wfanet/measurement/gcloud/spanner/testing/macros.bzl
VideoAmp/cross-media-measurement
66fd8f1a81b7d93f23d769f7be76d529b6a8d222
[ "Apache-2.0" ]
1
2022-02-21T09:39:05.000Z
2022-02-21T09:39:05.000Z
# Copyright 2020 The Cross-Media Measurement Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
35.36
74
0.722851
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_test") def spanner_emulator_test(name, data = [], **kwargs): kt_jvm_test( name = name, data = data + ["@cloud_spanner_emulator//:emulator"], **kwargs )
true
true
f737992c266c7cceb4ca208322c4341e502d2914
503
py
Python
data_analysis_byPro/Day07-01.py
yunjung-lee/class_python_data
67ceab73e67ec63d408894a6ab016a8d25a4e30b
[ "MIT" ]
null
null
null
data_analysis_byPro/Day07-01.py
yunjung-lee/class_python_data
67ceab73e67ec63d408894a6ab016a8d25a4e30b
[ "MIT" ]
null
null
null
data_analysis_byPro/Day07-01.py
yunjung-lee/class_python_data
67ceab73e67ec63d408894a6ab016a8d25a4e30b
[ "MIT" ]
null
null
null
# JSON 데이터도 처리하기. import json jsonDic = {} jsonList = [] csvList = [] filereader = open('TEST01.json', 'r', encoding='utf-8') jsonDic = json.load(filereader) csvName = list(jsonDic.keys()) jsonList = jsonDic[ csvName[0]] # 헤더 추출 header_list = list(jsonList[0].keys()) csvList.append(header_list) # 행들 추출 for tmpDic in ...
21.869565
55
0.673956
import json jsonDic = {} jsonList = [] csvList = [] filereader = open('TEST01.json', 'r', encoding='utf-8') jsonDic = json.load(filereader) csvName = list(jsonDic.keys()) jsonList = jsonDic[ csvName[0]] header_list = list(jsonList[0].keys()) csvList.append(header_list) for tmpDic in jsonList : tmpList = [] ...
true
true
f7379b0878bc82b5b66fe61e3324022d7479dcbf
65
py
Python
ephypype/pipelines/__init__.py
jasmainak/ephypype
257603cbb099cef7847a96c8eb141332fb85ebfa
[ "BSD-3-Clause" ]
null
null
null
ephypype/pipelines/__init__.py
jasmainak/ephypype
257603cbb099cef7847a96c8eb141332fb85ebfa
[ "BSD-3-Clause" ]
null
null
null
ephypype/pipelines/__init__.py
jasmainak/ephypype
257603cbb099cef7847a96c8eb141332fb85ebfa
[ "BSD-3-Clause" ]
null
null
null
from . import brain_vision_to_conmat from . import ts_to_conmat
16.25
36
0.830769
from . import brain_vision_to_conmat from . import ts_to_conmat
true
true
f7379b356a89fe71720ab4c69c58e4366aa15b6b
2,157
py
Python
modules/python/package/setup.py
BananaHemic/opencv
13d88239b7744a2097d0e1f343457da5ce276e90
[ "Apache-2.0" ]
3
2021-08-20T08:35:42.000Z
2021-08-20T08:43:07.000Z
modules/python/package/setup.py
BananaHemic/opencv
13d88239b7744a2097d0e1f343457da5ce276e90
[ "Apache-2.0" ]
1
2021-02-13T09:35:19.000Z
2021-02-13T11:23:50.000Z
modules/python/package/setup.py
BananaHemic/opencv
13d88239b7744a2097d0e1f343457da5ce276e90
[ "Apache-2.0" ]
4
2021-02-01T11:07:17.000Z
2021-11-26T08:11:23.000Z
import os import sys import platform import setuptools SCRIPT_DIR=os.path.dirname(os.path.abspath(__file__)) def main(): os.chdir(SCRIPT_DIR) package_name = 'opencv' package_version = os.environ.get('OPENCV_VERSION', '4.5.1') # TODO long_description = 'Open Source Computer Vision Library Python bin...
35.95
84
0.59898
import os import sys import platform import setuptools SCRIPT_DIR=os.path.dirname(os.path.abspath(__file__)) def main(): os.chdir(SCRIPT_DIR) package_name = 'opencv' package_version = os.environ.get('OPENCV_VERSION', '4.5.1') long_description = 'Open Source Computer Vision Library Python bindings'...
true
true
f7379b5956ff2d8fe9dc03c33e6667605516f54b
1,214
py
Python
Section_7/Exercise_19.py
Szymon-Budziak/WDI_exercises_solutions
51ffc9ec8b3cd6809bd55e98ecb8aed759c2d460
[ "MIT" ]
null
null
null
Section_7/Exercise_19.py
Szymon-Budziak/WDI_exercises_solutions
51ffc9ec8b3cd6809bd55e98ecb8aed759c2d460
[ "MIT" ]
null
null
null
Section_7/Exercise_19.py
Szymon-Budziak/WDI_exercises_solutions
51ffc9ec8b3cd6809bd55e98ecb8aed759c2d460
[ "MIT" ]
1
2021-11-21T09:38:33.000Z
2021-11-21T09:38:33.000Z
""" Elementy w liście są uporządkowane według wartości klucza. Proszę napisać funkcję usuwającą z listy elementy o nieunikalnym kluczu. Do funkcji przekazujemy wskazanie na pierwszy element listy, funkcja powinna zwrócić liczbę usuniętych elementów. """ class Node: def __init__(self, value): self.value = ...
24.28
99
0.621087
class Node: def __init__(self, value): self.value = value self.next = None def remove_non_unique_elements(head): if head is None: return None current = head while current is not None and current.next is not None: if current.value == current.next.value: act...
true
true
f7379b5a4d92f740d0e941f62a5474e9d907dfdb
1,650
py
Python
model/src/DataModel.py
roman-baldaev/course-project
b65ba018c16697224f15916b08ce7f09634d1f8c
[ "MIT" ]
null
null
null
model/src/DataModel.py
roman-baldaev/course-project
b65ba018c16697224f15916b08ce7f09634d1f8c
[ "MIT" ]
null
null
null
model/src/DataModel.py
roman-baldaev/course-project
b65ba018c16697224f15916b08ce7f09634d1f8c
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd class DataModel: """ This class implements a data model - values at time points and provides methods for working with these data. """ def __init__(self, n=0, values=None, times=None): """ A constructor that takes values and a time point. ...
27.966102
112
0.562424
import numpy as np import pandas as pd class DataModel: def __init__(self, n=0, values=None, times=None): if (values is None) or (times is None): self._times = np.zeros((n, )) self._values = np.zeros((n, )) else: if len(values) != len(times): pri...
true
true
f7379b8f4f3ad2bc4fa7c81f28d494a2a5dc2644
1,252
py
Python
django/apps/stories/management/commands/frontpage_stories.py
Haakenlid/tassen
911a2541c77eca522ba5a723f175786f4f9eb481
[ "Apache-2.0" ]
16
2017-03-21T03:53:37.000Z
2021-08-14T06:28:02.000Z
django/apps/stories/management/commands/frontpage_stories.py
universitas/universitas.no
911a2541c77eca522ba5a723f175786f4f9eb481
[ "Apache-2.0" ]
104
2017-03-25T00:12:46.000Z
2021-03-09T22:40:58.000Z
django/apps/stories/management/commands/frontpage_stories.py
Haakenlid/tassen
911a2541c77eca522ba5a723f175786f4f9eb481
[ "Apache-2.0" ]
6
2017-03-21T03:53:40.000Z
2020-06-07T14:15:38.000Z
import logging from django.core.management.base import BaseCommand from apps.frontpage.models import FrontpageStory from apps.stories.models import Story logger = logging.getLogger(__name__) class Command(BaseCommand): help = 'Populates frontpage' def add_arguments(self, parser): parser.add_argume...
25.55102
72
0.551118
import logging from django.core.management.base import BaseCommand from apps.frontpage.models import FrontpageStory from apps.stories.models import Story logger = logging.getLogger(__name__) class Command(BaseCommand): help = 'Populates frontpage' def add_arguments(self, parser): parser.add_argume...
true
true