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
f74c8edfbd3cff6681cd978c994a851099e0e313
718
py
Python
japan_weather_spider/weather.py
Cynthia7979/tools-programs
0bf0b8bf33205c11d584b216d35c1ca3d23f04f2
[ "MIT" ]
2
2021-02-09T15:58:29.000Z
2021-10-08T04:34:51.000Z
japan_weather_spider/weather.py
Cynthia7979/tools-programs
0bf0b8bf33205c11d584b216d35c1ca3d23f04f2
[ "MIT" ]
null
null
null
japan_weather_spider/weather.py
Cynthia7979/tools-programs
0bf0b8bf33205c11d584b216d35c1ca3d23f04f2
[ "MIT" ]
null
null
null
import requests import pprint from bs4 import BeautifulSoup as bsoup year = 2019 month = 12 url = f"http://www.data.jma.go.jp/obd/stats/etrn/view/daily_s1.php?prec_no=44&block_no=47662&year={year}&month={month}" html = requests.get(url).content soup = bsoup(html, "html.parser", from_encoding="utf-8") table = ...
32.636364
120
0.577994
import requests import pprint from bs4 import BeautifulSoup as bsoup year = 2019 month = 12 url = f"http://www.data.jma.go.jp/obd/stats/etrn/view/daily_s1.php?prec_no=44&block_no=47662&year={year}&month={month}" html = requests.get(url).content soup = bsoup(html, "html.parser", from_encoding="utf-8") table = ...
true
true
f74c8eee51b1608c9eca69d71c74520c5284fac2
2,891
py
Python
demo/World population.pct.py
st--/jupytext
f8e8352859cc22e17b11154d0770fd946c4a430a
[ "MIT" ]
5,378
2018-09-01T22:03:43.000Z
2022-03-31T06:51:42.000Z
demo/World population.pct.py
royalosyin/jupytext
72aa6c4968da714323fbd7a7c548ee4b1274c946
[ "MIT" ]
812
2018-08-31T08:26:13.000Z
2022-03-30T18:12:11.000Z
demo/World population.pct.py
royalosyin/jupytext
72aa6c4968da714323fbd7a7c548ee4b1274c946
[ "MIT" ]
380
2018-09-02T01:40:07.000Z
2022-03-25T13:57:23.000Z
# --- # jupyter: # jupytext: # cell_markers: region,endregion # formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc # text_representation: # extension: .py # format_name: percent # format_version: '1.2' # jupytext_version: 1.1.0 # kernelspec: # ...
25.8125
90
0.666551
import pandas as pd import wbdata as wb pd.options.display.max_rows = 6 pd.options.display.max_columns = 20 wb.search_indicators('Population, total') indicators = {'SP.POP.TOTL': 'Population, total', 'AG.SRF.TOTL.K2': 'Surface area (sq. km)', 'AG.LND.TOTL.K2': 'Land area (sq. km)', ...
true
true
f74c9294553dd95f161243c64085936e9ebbd485
7,043
py
Python
semi/SVMSemI.py
Dagu9/Reinforcement-learning-SGD
eb4a2546d6c99917b33e8cc4c210709e7d4cc15e
[ "Apache-2.0" ]
2
2020-01-20T14:43:27.000Z
2021-04-29T12:21:05.000Z
semi/SVMSemI.py
vmishra04/Pydial
a689fa1177cd34f32dd4d30a5a6140fb721855bf
[ "Apache-2.0" ]
null
null
null
semi/SVMSemI.py
vmishra04/Pydial
a689fa1177cd34f32dd4d30a5a6140fb721855bf
[ "Apache-2.0" ]
null
null
null
############################################################################### # PyDial: Multi-domain Statistical Spoken Dialogue System Software ############################################################################### # # Copyright 2015 - 2019 # Cambridge University Engineering Department Dialogue Systems Grou...
32.013636
112
0.60443
''' SVMSemI - Support Vector Machine Semantic Decoder ===================================================================== To use this in pydial, need to set "semitype = SVMSemI" for a domain in the relevant interface config file (in the current state it is the CamRestaurants domain) See texthub_svm.cfg, which can be...
false
true
f74c929a62c255e9f5ec06a22a0f58d3a5860845
17,287
py
Python
opurtbot-remote.py
nathan-yan/opurtbot
01a50604366990ab0b7ca52350e597b2165fbd0a
[ "MIT" ]
null
null
null
opurtbot-remote.py
nathan-yan/opurtbot
01a50604366990ab0b7ca52350e597b2165fbd0a
[ "MIT" ]
null
null
null
opurtbot-remote.py
nathan-yan/opurtbot
01a50604366990ab0b7ca52350e597b2165fbd0a
[ "MIT" ]
null
null
null
import discord from discord.ext import tasks, commands import asyncio import socketio import threading import subprocess import time from queue import Queue, Empty from threading import Thread from requests import get import os import re import boto3 import utils client = boto3.client('ec2') chat_reg = re.comp...
35.279592
288
0.534737
import discord from discord.ext import tasks, commands import asyncio import socketio import threading import subprocess import time from queue import Queue, Empty from threading import Thread from requests import get import os import re import boto3 import utils client = boto3.client('ec2') chat_reg = re.comp...
true
true
f74c92d29eac9e1434ab1cdb1dc97c64e3fdeaf6
21,451
py
Python
woolnote/html_page_templates.py
SvobodaJakub/woolnote
463cfb2975f9012dbe118a18582c07d0b9b9fba3
[ "MIT" ]
null
null
null
woolnote/html_page_templates.py
SvobodaJakub/woolnote
463cfb2975f9012dbe118a18582c07d0b9b9fba3
[ "MIT" ]
null
null
null
woolnote/html_page_templates.py
SvobodaJakub/woolnote
463cfb2975f9012dbe118a18582c07d0b9b9fba3
[ "MIT" ]
null
null
null
# University of Illinois/NCSA Open Source License # Copyright (c) 2018, Jakub Svoboda. # TODO: docstring for the file import hashlib import os from woolnote import systemencoding from woolnote import util from woolnote import html_page_templates_pres from woolnote import config from woolnote import tests @tests.i...
42.477228
186
0.703464
import hashlib import os from woolnote import systemencoding from woolnote import util from woolnote import html_page_templates_pres from woolnote import config from woolnote import tests @tests.integration_function("html_page_templates") def folder_tag_etc_list(action_name, req_elem_name, elem_list=None, elem_di...
true
true
f74c92eba9c0819400578be5de0a409024cd2293
637
py
Python
backend/manage.py
crowdbotics-apps/test-mobile-33934
a919efe0fc152dbc3cbdf4bd42a19bb8b7770bc8
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/test-mobile-33934
a919efe0fc152dbc3cbdf4bd42a19bb8b7770bc8
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/test-mobile-33934
a919efe0fc152dbc3cbdf4bd42a19bb8b7770bc8
[ "FTL", "AML", "RSA-MD" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_mobile_33934.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: ra...
28.954545
81
0.687598
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_mobile_33934.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed an...
true
true
f74c93fc3f4203663c1f8844aa8b87716d8ecd91
6,577
py
Python
contrib/HumanSeg/nets/libs.py
windstamp/PaddleSeg
828808ea306adf2e8b94c291b77e7b7cf558bc2a
[ "ECL-2.0", "Apache-2.0" ]
56
2021-01-31T02:19:12.000Z
2022-03-12T12:39:21.000Z
contrib/HumanSeg/nets/libs.py
windstamp/PaddleSeg
828808ea306adf2e8b94c291b77e7b7cf558bc2a
[ "ECL-2.0", "Apache-2.0" ]
1
2021-07-21T02:36:01.000Z
2021-07-21T02:37:45.000Z
contrib/HumanSeg/nets/libs.py
windstamp/PaddleSeg
828808ea306adf2e8b94c291b77e7b7cf558bc2a
[ "ECL-2.0", "Apache-2.0" ]
13
2021-02-03T11:18:36.000Z
2022-03-07T08:18:53.000Z
# coding: utf8 # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
29.895455
79
0.584765
from __future__ import absolute_import from __future__ import division from __future__ import print_function import paddle import paddle.fluid as fluid import contextlib bn_regularizer = fluid.regularizer.L2DecayRegularizer(regularization_coeff=0.0) name_scope = "" @contextlib.contextmanager def scope(name): gl...
true
true
f74c943fc2088ff149d2882fd0824b169dd9c870
695
py
Python
zigmond/consts.py
vertolab/zigmond
f9ad676e1ef391e4dd9b7154a444e2cf4809caf1
[ "Apache-2.0" ]
null
null
null
zigmond/consts.py
vertolab/zigmond
f9ad676e1ef391e4dd9b7154a444e2cf4809caf1
[ "Apache-2.0" ]
null
null
null
zigmond/consts.py
vertolab/zigmond
f9ad676e1ef391e4dd9b7154a444e2cf4809caf1
[ "Apache-2.0" ]
null
null
null
# # Copyright 2019 Verto Lab 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 ...
38.611111
77
0.729496
ENDPOINT = 'https://zig.vertolab.com/trace' APP_KEY_ENV_VAR_NAME = 'ZIGMOND_APP_KEY'
true
true
f74c94502710c42af9acf6c7159396503a7d570f
71,926
py
Python
api.py
fossabot/NewApp-Flask
20c871feea0b0ae75466706c4cbb0f53bccbc7d0
[ "MIT" ]
1
2020-05-15T09:38:06.000Z
2020-05-15T09:38:06.000Z
api.py
fossabot/NewApp-Flask
20c871feea0b0ae75466706c4cbb0f53bccbc7d0
[ "MIT" ]
6
2020-04-12T18:09:16.000Z
2022-01-13T02:18:01.000Z
api.py
fossabot/NewApp-Flask
20c871feea0b0ae75466706c4cbb0f53bccbc7d0
[ "MIT" ]
1
2020-03-12T00:40:09.000Z
2020-03-12T00:40:09.000Z
import datetime import calendar import httpagentparser from flask import Blueprint, make_response, jsonify, request, url_for, render_template from models import PostModel, TagModel, LikeModel, ReplyModel, Analyze_Pages, UserModel, Ip_Coordinates, bcrypt, \ Notifications_Model, Subscriber, Analyze_Session import d...
38.217853
185
0.562189
import datetime import calendar import httpagentparser from flask import Blueprint, make_response, jsonify, request, url_for, render_template from models import PostModel, TagModel, LikeModel, ReplyModel, Analyze_Pages, UserModel, Ip_Coordinates, bcrypt, \ Notifications_Model, Subscriber, Analyze_Session import d...
true
true
f74c95455b6841f1f77bd607f4379de0aed44f62
1,027
py
Python
print_crypto_map.py
jmerrell93/pynet_work
ef0ffba354f2929daefd70353c9c377ce7a6bc56
[ "Apache-2.0" ]
null
null
null
print_crypto_map.py
jmerrell93/pynet_work
ef0ffba354f2929daefd70353c9c377ce7a6bc56
[ "Apache-2.0" ]
null
null
null
print_crypto_map.py
jmerrell93/pynet_work
ef0ffba354f2929daefd70353c9c377ce7a6bc56
[ "Apache-2.0" ]
null
null
null
from ciscoconfparse import CiscoConfParse cisco_conf = CiscoConfParse('cisco_ipsec.txt') crypto_maps = cisco_conf.find_objects(r'crypto map') print '\nThe following are the crypto maps defined in the file' print '-----------------------------------------------------' for i in crypto_maps: print i.text child...
28.527778
114
0.624148
from ciscoconfparse import CiscoConfParse cisco_conf = CiscoConfParse('cisco_ipsec.txt') crypto_maps = cisco_conf.find_objects(r'crypto map') print '\nThe following are the crypto maps defined in the file' print '-----------------------------------------------------' for i in crypto_maps: print i.text child...
false
true
f74c95e0ad91941cbb153cd1bbf61ba4c0d6ffbc
5,423
py
Python
xpresso/binders/_body/openapi/form.py
dantownsend/xpresso
a4c4dbe96972a6f0339f30d7d794932f70510eea
[ "MIT" ]
null
null
null
xpresso/binders/_body/openapi/form.py
dantownsend/xpresso
a4c4dbe96972a6f0339f30d7d794932f70510eea
[ "MIT" ]
null
null
null
xpresso/binders/_body/openapi/form.py
dantownsend/xpresso
a4c4dbe96972a6f0339f30d7d794932f70510eea
[ "MIT" ]
null
null
null
import inspect import sys import typing from dataclasses import dataclass if sys.version_info < (3, 8): from typing_extensions import Literal else: from typing import Literal from di.typing import get_markers_from_parameter from xpresso._utils.typing import model_field_from_param from xpresso.binders._body.o...
36.891156
85
0.650194
import inspect import sys import typing from dataclasses import dataclass if sys.version_info < (3, 8): from typing_extensions import Literal else: from typing import Literal from di.typing import get_markers_from_parameter from xpresso._utils.typing import model_field_from_param from xpresso.binders._body.o...
true
true
f74c95f96299cf132a9a1d8ab8b238a532e2695b
130,123
py
Python
tensorflow/contrib/rnn/python/ops/rnn_cell.py
Zwysilence/tensorflow
b55001be83da044bb21d539d433dec6231eaec55
[ "Apache-2.0" ]
5
2018-10-20T03:54:49.000Z
2021-01-02T07:19:53.000Z
tensorflow/contrib/rnn/python/ops/rnn_cell.py
Zwysilence/tensorflow
b55001be83da044bb21d539d433dec6231eaec55
[ "Apache-2.0" ]
1
2018-09-04T07:44:56.000Z
2018-09-04T07:44:56.000Z
tensorflow/contrib/rnn/python/ops/rnn_cell.py
Zwysilence/tensorflow
b55001be83da044bb21d539d433dec6231eaec55
[ "Apache-2.0" ]
2
2020-01-31T04:19:45.000Z
2020-03-06T16:33:00.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.327835
88
0.665148
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import math from tensorflow.contrib.compiler import jit from tensorflow.contrib.layers.python.layers import layers from tensorflow.contrib.rnn.python.ops import core_rnn_cell from tensorflow...
true
true
f74c96d1cc3ce74c8f09455eba7a26476de86461
12,101
py
Python
crime_db.py
aribasadme/CrimeDB
a16b35204921726ec6f3cf9a7ec5d9b51cbe7d49
[ "MIT" ]
null
null
null
crime_db.py
aribasadme/CrimeDB
a16b35204921726ec6f3cf9a7ec5d9b51cbe7d49
[ "MIT" ]
null
null
null
crime_db.py
aribasadme/CrimeDB
a16b35204921726ec6f3cf9a7ec5d9b51cbe7d49
[ "MIT" ]
null
null
null
import pandas as pd from police_api import PoliceAPI def first_job(api, dates, t_current): """ Creates the tables and populates them with the historical data from ​T​_0 ​ ​to ​T​_current """ # subset of dates dates_hist = dates[dates <= t_current] # crime_categories table s_crime_c...
44.488971
150
0.685563
import pandas as pd from police_api import PoliceAPI def first_job(api, dates, t_current): dates_hist = dates[dates <= t_current] s_crime_cat = set() for date in dates_hist: s_crime_cat.update(api.get_crime_categories(date)) crime_categories['id'] = [c.url for c in s_crime_cat] c...
true
true
f74c9840a9a64fa6083f2197663aa0e29d22fa12
786
py
Python
strawberry/file_uploads/data.py
nyejon/strawberry
664fde292fe2186c3e33e8cae79964b866fa5822
[ "MIT" ]
1
2021-05-26T18:31:11.000Z
2021-05-26T18:31:11.000Z
strawberry/file_uploads/data.py
nyejon/strawberry
664fde292fe2186c3e33e8cae79964b866fa5822
[ "MIT" ]
1
2021-01-18T18:58:45.000Z
2021-01-18T19:39:09.000Z
strawberry/file_uploads/data.py
nyejon/strawberry
664fde292fe2186c3e33e8cae79964b866fa5822
[ "MIT" ]
null
null
null
from typing import Any, Dict, List, Mapping def replace_placeholders_with_files( operations: Dict[str, Any], files_map: Dict[str, List[str]], files: Mapping[str, Any], ) -> Dict[str, Any]: path_to_key_iter = ( (value.split("."), key) for (key, values) in files_map.items() for v...
23.117647
85
0.642494
from typing import Any, Dict, List, Mapping def replace_placeholders_with_files( operations: Dict[str, Any], files_map: Dict[str, List[str]], files: Mapping[str, Any], ) -> Dict[str, Any]: path_to_key_iter = ( (value.split("."), key) for (key, values) in files_map.items() for v...
true
true
f74c985afe522c12b7250d7d45db3737eb3fcf24
3,666
py
Python
maptrainer/model/LinRNNModel.py
mothguib/maptrainer
335334fed073f8d14a4c5137eaa0424efcbcac63
[ "MIT" ]
null
null
null
maptrainer/model/LinRNNModel.py
mothguib/maptrainer
335334fed073f8d14a4c5137eaa0424efcbcac63
[ "MIT" ]
null
null
null
maptrainer/model/LinRNNModel.py
mothguib/maptrainer
335334fed073f8d14a4c5137eaa0424efcbcac63
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import torch from torch import autograd from torch.autograd import Variable import torch.nn as nn from maptrainer.model.MAPModel import MAPModel from ..data import INIT_RANGE_BOUND class LinRNNModel(MAPModel): """ `LinRNNModel`: Linear-output RNN model Contain...
33.027027
77
0.562739
import numpy as np import torch from torch import autograd from torch.autograd import Variable import torch.nn as nn from maptrainer.model.MAPModel import MAPModel from ..data import INIT_RANGE_BOUND class LinRNNModel(MAPModel): def __init__(self, n_input, _n_hid, ...
true
true
f74c992e1f453e0771df3cb5998caeb4ce836e78
1,701
py
Python
tests/unit/elastic/test_Save_To_ELK.py
atykhonov/GW-Bot
fb1d8584f229efe703f05aa0e44fa0924b90ca1d
[ "Apache-2.0" ]
null
null
null
tests/unit/elastic/test_Save_To_ELK.py
atykhonov/GW-Bot
fb1d8584f229efe703f05aa0e44fa0924b90ca1d
[ "Apache-2.0" ]
null
null
null
tests/unit/elastic/test_Save_To_ELK.py
atykhonov/GW-Bot
fb1d8584f229efe703f05aa0e44fa0924b90ca1d
[ "Apache-2.0" ]
null
null
null
import datetime import unittest from time import sleep from unittest import TestCase from pbx_gs_python_utils.utils.Dev import Dev from gw_bot.elastic.Save_To_ELK import Save_To_ELK from gw_bot.helpers.Test_Helper import Test_Helper class Test_Save_To_ELK(Test_Helper): def setUp(self): super().setUp() ...
32.711538
104
0.696061
import datetime import unittest from time import sleep from unittest import TestCase from pbx_gs_python_utils.utils.Dev import Dev from gw_bot.elastic.Save_To_ELK import Save_To_ELK from gw_bot.helpers.Test_Helper import Test_Helper class Test_Save_To_ELK(Test_Helper): def setUp(self): super().setUp() ...
true
true
f74c99daa678a9859696b4db78d85ca3338134fd
7,442
py
Python
accelbyte_py_sdk/api/iam/operations/users/create_user.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/iam/operations/users/create_user.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
1
2021-10-13T03:46:58.000Z
2021-10-13T03:46:58.000Z
accelbyte_py_sdk/api/iam/operations/users/create_user.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py # pylint: disable=duplicate-code # pylint: disable=li...
26.963768
147
0.629535
from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union from .....core import Operation from .....core import HeaderStr from .....core import HttpResponse from ...models import ModelUserCreateRequest from ...models import ModelUserCreateResponse class CreateUser(Operation):...
true
true
f74c9a5d66b76d3b4a97d6ce5a917b6658b44c98
545
py
Python
entries/migrations/0001_initial.py
sourcificer/NotesAhoy
fa6383a78c88ad53a7291eb2cea0d03631442cb1
[ "MIT" ]
null
null
null
entries/migrations/0001_initial.py
sourcificer/NotesAhoy
fa6383a78c88ad53a7291eb2cea0d03631442cb1
[ "MIT" ]
5
2021-04-08T22:03:09.000Z
2022-02-10T10:41:07.000Z
entries/migrations/0001_initial.py
sourcificer/NotesAhoy
fa6383a78c88ad53a7291eb2cea0d03631442cb1
[ "MIT" ]
null
null
null
# Generated by Django 2.2.5 on 2019-09-10 08:10 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Entry', fields=[ ('id', models.AutoField(au...
23.695652
114
0.570642
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Entry', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=Fal...
true
true
f74c9c9983e5d07467273f00e60a4689ab4f99c6
726
py
Python
djview/urls.py
rklabs/djaaks
4f7ab22333b0022226d18a1bb913377cae1346b1
[ "MIT" ]
null
null
null
djview/urls.py
rklabs/djaaks
4f7ab22333b0022226d18a1bb913377cae1346b1
[ "MIT" ]
null
null
null
djview/urls.py
rklabs/djaaks
4f7ab22333b0022226d18a1bb913377cae1346b1
[ "MIT" ]
null
null
null
from django.conf.urls import url from djview import views urlpatterns = [ url(r'^$', views.djview_index, name='djview_index'), url(r'^about/', views.djview_about, name='djview_about'), url(r'^add_category/', views.add_category, name='add_category'), url(r'^category/(?P<category_name_slug>[\w\-]+)/$', v...
40.333333
71
0.644628
from django.conf.urls import url from djview import views urlpatterns = [ url(r'^$', views.djview_index, name='djview_index'), url(r'^about/', views.djview_about, name='djview_about'), url(r'^add_category/', views.add_category, name='add_category'), url(r'^category/(?P<category_name_slug>[\w\-]+)/$', v...
true
true
f74c9d49e33ab6145fd55c2d6a632fb4c698a4ec
144
py
Python
python/fac-bench.py
robindaumann/fac-bench
57d040514bdd541308c44b831c631fc16e20f026
[ "MIT" ]
2
2019-08-19T17:33:01.000Z
2019-12-31T16:36:08.000Z
python/fac-bench.py
robindaumann/fac-bench
57d040514bdd541308c44b831c631fc16e20f026
[ "MIT" ]
4
2019-12-31T21:01:32.000Z
2020-08-24T09:43:11.000Z
python/fac-bench.py
robindaumann/fac-bench
57d040514bdd541308c44b831c631fc16e20f026
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import math def fac_bench(n): return sum(math.factorial(i) for i in range(1, n)) print(fac_bench(3001), end='')
13.090909
54
0.666667
import math def fac_bench(n): return sum(math.factorial(i) for i in range(1, n)) print(fac_bench(3001), end='')
true
true
f74c9e1be7ed6ac6a309b39d72ce0fc300304ed4
584
py
Python
Handlers/MTTAESHandler.py
waitwalker/PetAPI
709cbf9bb0ecfaef5897b3662b87ecfef3ca81b7
[ "MIT" ]
10
2019-05-15T09:14:51.000Z
2019-12-21T12:02:53.000Z
Handlers/MTTAESHandler.py
TieriaDM/PetAPI
709cbf9bb0ecfaef5897b3662b87ecfef3ca81b7
[ "MIT" ]
null
null
null
Handlers/MTTAESHandler.py
TieriaDM/PetAPI
709cbf9bb0ecfaef5897b3662b87ecfef3ca81b7
[ "MIT" ]
6
2019-05-17T11:32:38.000Z
2021-08-31T05:16:02.000Z
# -*- coding: utf-8 -*- # @Time : 2018/7/9 上午10:41 # @Author : waitWalker # @Email : waitwalker@163.com # @File : MTTAESHandler.py # @Software: PyCharm from Handlers import MTTBaseHandler from Security import MTTSecurityManager from Crypto.Cipher import AES class MTTAESHandler(MTTBaseHandler.MTTBaseHandler):...
20.857143
70
0.652397
from Handlers import MTTBaseHandler from Security import MTTSecurityManager from Crypto.Cipher import AES class MTTAESHandler(MTTBaseHandler.MTTBaseHandler): def get(self, *args, **kwargs): pass def post(self, *args, **kwargs): para = self.get_argument('encryption') de = s...
true
true
f74c9e33fd93a4e7a72ae4a9d0aab764ad6e9dee
4,189
py
Python
tests/silk/test-complex.py
sjdv1982/silk
232e759cabfc7a87550d1e50ed9c4de4e0e57bf4
[ "MIT" ]
null
null
null
tests/silk/test-complex.py
sjdv1982/silk
232e759cabfc7a87550d1e50ed9c4de4e0e57bf4
[ "MIT" ]
1
2021-04-06T09:08:39.000Z
2021-04-06T09:10:02.000Z
tests/silk/test-complex.py
sjdv1982/silk
232e759cabfc7a87550d1e50ed9c4de4e0e57bf4
[ "MIT" ]
null
null
null
import sys from pprint import pprint from silk import Silk, ValidationError def adder(self, other): return other + self.x s = Silk() s.__add__ = adder s.bla = adder s.x = 80 print(s.x.data) print(s.bla(5)) print(s+5) s2 = Silk(schema=s.schema) s2.x = 10 print(s2+5) s3 = Silk(schema=s2.schema) s3.x = 10 print(s3...
18.213043
87
0.634519
import sys from pprint import pprint from silk import Silk, ValidationError def adder(self, other): return other + self.x s = Silk() s.__add__ = adder s.bla = adder s.x = 80 print(s.x.data) print(s.bla(5)) print(s+5) s2 = Silk(schema=s.schema) s2.x = 10 print(s2+5) s3 = Silk(schema=s2.schema) s3.x = 10 print(s3...
true
true
f74c9f2e13bc9503f49feb82380d16d2a2529a16
320
py
Python
drivers installation/chromedriver.py
ProjektVek/Spotify-Automation
13c472c5e9da8b5a5a2178af6121237b69faaf2e
[ "MIT" ]
1
2021-12-08T18:52:00.000Z
2021-12-08T18:52:00.000Z
drivers installation/chromedriver.py
ProjektVek/Spotify-Automation
13c472c5e9da8b5a5a2178af6121237b69faaf2e
[ "MIT" ]
null
null
null
drivers installation/chromedriver.py
ProjektVek/Spotify-Automation
13c472c5e9da8b5a5a2178af6121237b69faaf2e
[ "MIT" ]
null
null
null
import time from selenium import webdriver from selenium.webdriver.chrome.service import Service service = Service('./drivers/chromedriver.exe') service.start() driver = webdriver.Remote(service.service_url) driver.get('http://www.google.com/'); time.sleep(5) # Let the user actually see something! driver.quit()
18.823529
53
0.76875
import time from selenium import webdriver from selenium.webdriver.chrome.service import Service service = Service('./drivers/chromedriver.exe') service.start() driver = webdriver.Remote(service.service_url) driver.get('http://www.google.com/'); time.sleep(5) driver.quit()
true
true
f74ca009acbca48147e6194743570829574a4cf1
2,233
py
Python
surirobot/core/api/stt.py
aberrier/ethera
caed5058a19db629942c847280204794da063319
[ "MIT" ]
2
2018-06-08T09:10:41.000Z
2018-06-08T09:10:47.000Z
surirobot/core/api/stt.py
aberrier/ethera
caed5058a19db629942c847280204794da063319
[ "MIT" ]
null
null
null
surirobot/core/api/stt.py
aberrier/ethera
caed5058a19db629942c847280204794da063319
[ "MIT" ]
1
2019-02-06T19:22:53.000Z
2019-02-06T19:22:53.000Z
from .base import ApiCaller from PyQt5.QtCore import pyqtSignal from surirobot.core.common import State, ehpyqtSlot import requests import logging import os class SttApiCaller(ApiCaller): """ API class for STT API https://github.com/suricats/surirobot-api-converse """ update_state = pyqtSignal(st...
35.444444
136
0.56695
from .base import ApiCaller from PyQt5.QtCore import pyqtSignal from surirobot.core.common import State, ehpyqtSlot import requests import logging import os class SttApiCaller(ApiCaller): update_state = pyqtSignal(str, int, dict) def __init__(self, url): ApiCaller.__init__(self, url) self.log...
true
true
f74ca041c0481cef35df818e8a9f5d08bc568909
2,998
py
Python
authentication/wampcra/static/backend.py
pawankaushal/crossbar-examples
b6e0cc321bad020045c4fafec091f78abd938618
[ "Apache-2.0" ]
null
null
null
authentication/wampcra/static/backend.py
pawankaushal/crossbar-examples
b6e0cc321bad020045c4fafec091f78abd938618
[ "Apache-2.0" ]
null
null
null
authentication/wampcra/static/backend.py
pawankaushal/crossbar-examples
b6e0cc321bad020045c4fafec091f78abd938618
[ "Apache-2.0" ]
null
null
null
############################################################################### ## ## Copyright (C) Tavendo GmbH and/or collaborators. All rights reserved. ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are met: ## ## 1....
40.513514
96
0.643095
from twisted.internet.defer import inlineCallbacks from autobahn.twisted.wamp import ApplicationSession class BackendSession(ApplicationSession): @inlineCallbacks def onJoin(self, details): print("Backend session joined: {}".format(details)) def onhello(msg=None): print("event receive...
true
true
f74ca09a1fce9b6aae62e91cb1dce1ede654f925
8,564
py
Python
replicator-schema-translation/docs/conf.py
Kaifee-Mohammad/examples
74f5e923e24d8e2488939dc7f274a9e6ce802180
[ "Apache-2.0" ]
null
null
null
replicator-schema-translation/docs/conf.py
Kaifee-Mohammad/examples
74f5e923e24d8e2488939dc7f274a9e6ce802180
[ "Apache-2.0" ]
null
null
null
replicator-schema-translation/docs/conf.py
Kaifee-Mohammad/examples
74f5e923e24d8e2488939dc7f274a9e6ce802180
[ "Apache-2.0" ]
1
2020-04-30T12:05:14.000Z
2020-04-30T12:05:14.000Z
# -*- coding: utf-8 -*- # # CP Demo documentation build configuration file, created by # sphinx-quickstart on Wed Dec 17 14:17:15 2014. # # 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. # # A...
32.074906
79
0.71894
import sys import os extensions = ['sphinx.ext.ifconfig', 'sphinxcontrib.httpdomain'] def setup(app): app.add_config_value('platform_docs', True, 'env') platform_docs = False templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Schema Translation Demo' copyright = u'20...
true
true
f74ca0e0ac2e25950cc3867dc88c9211e2450a06
31,910
py
Python
sklearn/feature_selection/_univariate_selection.py
jayzed82/scikit-learn
f52c0d441502117020ac0152cea8e89367f55ed6
[ "BSD-3-Clause" ]
1
2021-11-19T06:21:43.000Z
2021-11-19T06:21:43.000Z
sklearn/feature_selection/_univariate_selection.py
jayzed82/scikit-learn
f52c0d441502117020ac0152cea8e89367f55ed6
[ "BSD-3-Clause" ]
1
2021-07-09T15:13:59.000Z
2021-07-09T15:13:59.000Z
sklearn/feature_selection/_univariate_selection.py
jayzed82/scikit-learn
f52c0d441502117020ac0152cea8e89367f55ed6
[ "BSD-3-Clause" ]
1
2021-11-19T06:21:34.000Z
2021-11-19T06:21:34.000Z
"""Univariate features selection.""" # Authors: V. Michel, B. Thirion, G. Varoquaux, A. Gramfort, E. Duchesnay. # L. Buitinck, A. Joly # License: BSD 3 clause import numpy as np import warnings from scipy import special, stats from scipy.sparse import issparse from ..base import BaseEstimator from ..prepr...
34.647123
79
0.647728
import numpy as np import warnings from scipy import special, stats from scipy.sparse import issparse from ..base import BaseEstimator from ..preprocessing import LabelBinarizer from ..utils import (as_float_array, check_array, check_X_y, safe_sqr, safe_mask) from ..utils.extmath import safe_s...
true
true
f74ca0e4b20b83d509bc3a77fa6331062c311e10
3,577
py
Python
localshop/apps/packages/utils.py
rcoup/localshop
b7d0803afd9335862accfc79dee047a6b0e67ad6
[ "BSD-3-Clause" ]
null
null
null
localshop/apps/packages/utils.py
rcoup/localshop
b7d0803afd9335862accfc79dee047a6b0e67ad6
[ "BSD-3-Clause" ]
null
null
null
localshop/apps/packages/utils.py
rcoup/localshop
b7d0803afd9335862accfc79dee047a6b0e67ad6
[ "BSD-3-Clause" ]
null
null
null
import inspect import hashlib import logging import os from django.core.files.uploadedfile import TemporaryUploadedFile from django.db.models import FieldDoesNotExist from django.db.models.fields.files import FileField from django.http import QueryDict from django.utils.datastructures import MultiValueDict logger = l...
29.808333
78
0.559966
import inspect import hashlib import logging import os from django.core.files.uploadedfile import TemporaryUploadedFile from django.db.models import FieldDoesNotExist from django.db.models.fields.files import FileField from django.http import QueryDict from django.utils.datastructures import MultiValueDict logger = l...
true
true
f74ca1f81d74a38274215cf9e38c48ca54428dd8
3,908
py
Python
infer_mnist.py
fierceX/cnn-ocr-mnist
3a82b8bb7552092d690e0ac0b560863bd5b46830
[ "MIT" ]
8
2017-04-30T18:21:43.000Z
2020-05-12T03:00:38.000Z
infer_mnist.py
fierceX/cnn-ocr-mnist
3a82b8bb7552092d690e0ac0b560863bd5b46830
[ "MIT" ]
null
null
null
infer_mnist.py
fierceX/cnn-ocr-mnist
3a82b8bb7552092d690e0ac0b560863bd5b46830
[ "MIT" ]
2
2017-04-28T03:45:19.000Z
2018-12-05T04:14:12.000Z
import mxnet as mx import numpy as np import cv2 import random from io import BytesIO from collections import namedtuple from train_mnist import read_data, Get_image_lable import random def get_ocrnet(): data = mx.symbol.Variable('data') conv1 = mx.symbol.Convolution(data=data, kernel=(5, 5), num_filter=32) ...
32.840336
78
0.587769
import mxnet as mx import numpy as np import cv2 import random from io import BytesIO from collections import namedtuple from train_mnist import read_data, Get_image_lable import random def get_ocrnet(): data = mx.symbol.Variable('data') conv1 = mx.symbol.Convolution(data=data, kernel=(5, 5), num_filter=32) ...
false
true
f74ca22c8a9497b85f8a04088eb53863904a4e42
3,577
py
Python
Tests/test_SeqIO_online.py
Manoo-hao/biopython
5a55811d57880cbc9e6f198374e81ef3a4fbfa05
[ "BSD-3-Clause" ]
5
2015-06-14T17:01:57.000Z
2020-10-05T03:27:56.000Z
Tests/test_SeqIO_online.py
Manoo-hao/biopython
5a55811d57880cbc9e6f198374e81ef3a4fbfa05
[ "BSD-3-Clause" ]
1
2020-07-21T03:13:37.000Z
2020-07-23T02:46:25.000Z
Tests/test_SeqIO_online.py
Manoo-hao/biopython
5a55811d57880cbc9e6f198374e81ef3a4fbfa05
[ "BSD-3-Clause" ]
8
2016-02-20T22:53:21.000Z
2022-02-04T06:10:23.000Z
# Copyright 2007-2010 by Peter Cock. All rights reserved. # Revisions copyright 2007-2008 by Michiel de Hoon. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Testing online c...
33.745283
86
0.617557
import unittest import requires_internet from Bio import Entrez from Bio import ExPASy from Bio import SeqIO from Bio.SeqUtils.CheckSum import seguid from Bio.SwissProt import SwissProtParserError requires_internet.check() Entrez.email = "biopython@biopython.org" class ExPASyTests(unittest.TestCase): def t...
true
true
f74ca23cd541ac74f528d3ba865a222e9f867b59
5,217
py
Python
tests/test_build.py
a-nau/pytorch3d
b0a83a291ffe11be5a553b7fd00cc5534b5f3c0f
[ "BSD-3-Clause" ]
1
2022-03-30T19:52:34.000Z
2022-03-30T19:52:34.000Z
tests/test_build.py
Xiangjun-Gao/pytorch3d
a9b0d50bafa26c4f2a9e665ff7b805face3f24e6
[ "BSD-3-Clause" ]
null
null
null
tests/test_build.py
Xiangjun-Gao/pytorch3d
a9b0d50bafa26c4f2a9e665ff7b805face3f24e6
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import importlib import json import os import sys import unittest import unittest.mock from collections import Co...
38.644444
92
0.609162
import importlib import json import os import sys import unittest import unittest.mock from collections import Counter from common_testing import get_pytorch3d_dir in_conda_build = os.environ.get("CONDA_BUILD_STATE", "") == "TEST" in_re_worker = os.environ.get("INSIDE_RE_WORKER") is not None class TestBuild(unitt...
true
true
f74ca26d6211ef50263a7133212506d82ee54133
2,743
py
Python
bin/libsw/image_magick.py
Rondore/sitewrangler
a67a140262281c1f6be48c55f86544e476d7d7b4
[ "MIT" ]
null
null
null
bin/libsw/image_magick.py
Rondore/sitewrangler
a67a140262281c1f6be48c55f86544e476d7d7b4
[ "MIT" ]
null
null
null
bin/libsw/image_magick.py
Rondore/sitewrangler
a67a140262281c1f6be48c55f86544e476d7d7b4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os, subprocess from libsw import builder, version class ImageMagickBuilder(builder.AbstractGitBuilder): def __init__(self, build_dir="/usr/local/src/", source_version=False): super().__init__('image-magick', build_dir, source_version, branch="main") def get_source_url(se...
36.092105
145
0.587313
import os, subprocess from libsw import builder, version class ImageMagickBuilder(builder.AbstractGitBuilder): def __init__(self, build_dir="/usr/local/src/", source_version=False): super().__init__('image-magick', build_dir, source_version, branch="main") def get_source_url(self): return 'ht...
true
true
f74ca30c018ab695a3546d53999add3d08d50041
939
py
Python
Problem Solving/Algorithms/Permuting Two Arrays.py
Muntaha-Islam0019/HackerRank-Solutions
caa687aab67461aba69026d3bdc44b62c1dec1c9
[ "MIT" ]
null
null
null
Problem Solving/Algorithms/Permuting Two Arrays.py
Muntaha-Islam0019/HackerRank-Solutions
caa687aab67461aba69026d3bdc44b62c1dec1c9
[ "MIT" ]
null
null
null
Problem Solving/Algorithms/Permuting Two Arrays.py
Muntaha-Islam0019/HackerRank-Solutions
caa687aab67461aba69026d3bdc44b62c1dec1c9
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys # # Complete the 'twoArrays' function below. # # The function is expected to return a STRING. # The function accepts following parameters: # 1. INTEGER k # 2. INTEGER_ARRAY A # 3. INTEGER_ARRAY B # def twoArrays(k, A, B): # Write your co...
18.411765
55
0.591054
import math import os import random import re import sys def twoArrays(k, A, B): A = sorted(A) B = sorted(B, reverse=True) for x, y in zip(A, B): if x+y < k: return "NO" return "YES" if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') q = int(inp...
true
true
f74ca31d33fd0bb11704320bac75d43f3521133e
343
py
Python
tests/performance/monitor.py
bianhaoyi/necache
aaaee900c0cf57bfc477fb790858709c7f2d69fe
[ "BSD-3-Clause" ]
351
2015-01-06T09:49:19.000Z
2022-03-30T12:46:23.000Z
tests/performance/monitor.py
bianhaoyi/necache
aaaee900c0cf57bfc477fb790858709c7f2d69fe
[ "BSD-3-Clause" ]
10
2015-11-19T21:10:18.000Z
2021-08-16T14:29:01.000Z
tests/performance/monitor.py
LaudateCorpus1/twemcache
8cfc4ca5e76ed936bd3786c8cc43ed47e7778c08
[ "BSD-3-Clause" ]
73
2015-01-07T07:06:46.000Z
2022-03-21T00:59:23.000Z
__doc__=''' Sending stats to the server for a while. Duration is specified as an argument or it goes on forever. ''' import sys from lib.utilities import * from lib.common import Monitor server = startServer() print "sending stats command to server\n" mcm = Monitor() mcm.run(int(sys.argv[-1])) print "stats collecte...
18.052632
59
0.746356
__doc__=''' Sending stats to the server for a while. Duration is specified as an argument or it goes on forever. ''' import sys from lib.utilities import * from lib.common import Monitor server = startServer() print "sending stats command to server\n" mcm = Monitor() mcm.run(int(sys.argv[-1])) print "stats collecte...
false
true
f74ca54b54a2eb0395d0ae4734c4c1706aeda0c8
8,881
py
Python
docs/conf.py
1nf1n1ty08/funwithserverless
5f8d67ca0470c1ce347b41719c14daa078819284
[ "MIT" ]
2
2019-04-18T13:21:20.000Z
2019-04-18T13:38:08.000Z
docs/conf.py
1nf1n1ty08/funwithserverless
5f8d67ca0470c1ce347b41719c14daa078819284
[ "MIT" ]
null
null
null
docs/conf.py
1nf1n1ty08/funwithserverless
5f8d67ca0470c1ce347b41719c14daa078819284
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # funwithserverless 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. # ...
30.730104
87
0.714897
import sys import os import sphinx_rtd_theme cwd = os.getcwd() project_root = os.path.dirname(cwd) import sphinx.apidoc sphinx.apidoc.main(argv=['-f', '-o', os.path.join(project_root, 'docs'), project_root]) sys.path.insert(0, project_root) import src extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.vi...
true
true
f74ca5d0b9a3c3d2b5c5bef6cf7e1a8ed60865c8
5,733
py
Python
cloudify_deployment_proxy/utils.py
jrzeszutek/cloudify-utilities-plugin
d62fc98e9164fd836d8f22a757b5a58ca119f97a
[ "Apache-2.0" ]
8
2017-06-14T14:59:17.000Z
2021-09-15T05:44:05.000Z
cloudify_deployment_proxy/utils.py
jrzeszutek/cloudify-utilities-plugin
d62fc98e9164fd836d8f22a757b5a58ca119f97a
[ "Apache-2.0" ]
75
2017-04-20T20:42:26.000Z
2022-02-16T11:03:02.000Z
cloudify_deployment_proxy/utils.py
jrzeszutek/cloudify-utilities-plugin
d62fc98e9164fd836d8f22a757b5a58ca119f97a
[ "Apache-2.0" ]
21
2017-08-13T13:19:58.000Z
2021-12-09T14:41:42.000Z
# Copyright (c) 2017-2018 Cloudify Platform Ltd. 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 ...
33.331395
78
0.639107
import os import sys import shutil import zipfile import tempfile from shutil import copy import requests from cloudify import ctx from cloudify.exceptions import NonRecoverableError from cloudify.exceptions import OperationRetry from cloudify.utils import exception_to_error_cause from cloudify_common_sdk._compat i...
true
true
f74ca70488ecc51a5d71e1df4ed3bc7adf1cbd26
1,323
py
Python
HLTrigger/Configuration/python/HLT_75e33/modules/hltDiEG25CaloIdLHgcalHEUnseededFilter_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:24:46.000Z
2021-11-30T16:24:46.000Z
HLTrigger/Configuration/python/HLT_75e33/modules/hltDiEG25CaloIdLHgcalHEUnseededFilter_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
4
2021-11-29T13:57:56.000Z
2022-03-29T06:28:36.000Z
HLTrigger/Configuration/python/HLT_75e33/modules/hltDiEG25CaloIdLHgcalHEUnseededFilter_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:16:05.000Z
2021-11-30T16:16:05.000Z
import FWCore.ParameterSet.Config as cms hltDiEG25CaloIdLHgcalHEUnseededFilter = cms.EDFilter("HLTEgammaGenericQuadraticEtaFilter", absEtaLowEdges = cms.vdouble(0.0, 1.0, 1.479, 2.1), candTag = cms.InputTag("hltDiEG25CaloIdLClusterShapeSigmavvUnseededFilter"), doRhoCorrection = cms.bool(False), effecti...
40.090909
90
0.696901
import FWCore.ParameterSet.Config as cms hltDiEG25CaloIdLHgcalHEUnseededFilter = cms.EDFilter("HLTEgammaGenericQuadraticEtaFilter", absEtaLowEdges = cms.vdouble(0.0, 1.0, 1.479, 2.1), candTag = cms.InputTag("hltDiEG25CaloIdLClusterShapeSigmavvUnseededFilter"), doRhoCorrection = cms.bool(False), effecti...
true
true
f74ca76d46ca77493abb18f4a461aaf5edf2cfa7
1,881
py
Python
52-54-feedparser/my-code-RSS-feeds/pull_xml.py
Anthlis/My_100_Days_Of_Python
9bdc36075f633099bd70161ae19ffad7ab88a797
[ "MIT" ]
2
2020-11-15T12:44:01.000Z
2021-11-15T12:26:32.000Z
52-54-feedparser/my-code-RSS-feeds/pull_xml.py
Anthlis/My_100_Days_Of_Python
9bdc36075f633099bd70161ae19ffad7ab88a797
[ "MIT" ]
1
2021-06-01T23:51:28.000Z
2021-06-01T23:51:28.000Z
52-54-feedparser/my-code-RSS-feeds/pull_xml.py
Anthlis/My_100_Days_Of_Python
9bdc36075f633099bd70161ae19ffad7ab88a797
[ "MIT" ]
1
2021-01-06T14:36:27.000Z
2021-01-06T14:36:27.000Z
#!python3 #pull_xml.py uses the requests module to pull down the feed xml file for use in the xml parser script. #This will result in just one call/request to the Steam webserver hosting this XML file. import requests # TODO Create a namedtuple ('URL_chooser', 'index URL XML_file') URL = "https://www.stuff.co.nz/rss...
37.62
102
0.705476
import requests URL = "https://www.stuff.co.nz/rss/" URL1 = 'https://www.rnz.co.nz/rss/pacific.xml' URL2 = 'http://rss.nzherald.co.nz/rss/xml/nzhrsscid_000000005.xml' URL3 = 'https://www.rbnz.govt.nz/feeds/news' URL4 = 'https://realpython.com/atom.xml' URL5 = 'https://pybit.es/feeds/all.rss.xml' URL6 = 'http://feeds...
true
true
f74ca81fe2fd4358d8aad3f9f6debcc73af2d880
1,911
py
Python
test/functional/rpc_signmessage.py
CounosH/cch
880f3890127951cba9f6b235193d8c9a9536e075
[ "MIT" ]
null
null
null
test/functional/rpc_signmessage.py
CounosH/cch
880f3890127951cba9f6b235193d8c9a9536e075
[ "MIT" ]
null
null
null
test/functional/rpc_signmessage.py
CounosH/cch
880f3890127951cba9f6b235193d8c9a9536e075
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016-2019 The CounosH Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPC commands for signing and verifying messages.""" from test_framework.test_framework import Cou...
44.44186
119
0.734171
from test_framework.test_framework import CounosHTestFramework from test_framework.util import assert_equal class SignMessagesTest(CounosHTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 self.extra_args = [["-addresstype=legacy"]] def skip_te...
true
true
f74ca8595afb100a739b2d5428b926c000ca570d
8,634
py
Python
mnist-collection/dcgan.py
shikisawamura/nnabla-examples
baf4e4cc620dedbf4368683325c0fb868676850d
[ "Apache-2.0" ]
null
null
null
mnist-collection/dcgan.py
shikisawamura/nnabla-examples
baf4e4cc620dedbf4368683325c0fb868676850d
[ "Apache-2.0" ]
null
null
null
mnist-collection/dcgan.py
shikisawamura/nnabla-examples
baf4e4cc620dedbf4368683325c0fb868676850d
[ "Apache-2.0" ]
1
2020-04-25T06:11:28.000Z
2020-04-25T06:11:28.000Z
# Copyright (c) 2017 Sony Corporation. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
37.53913
96
0.619759
from __future__ import absolute_import from six.moves import range import numpy as np import nnabla as nn import nnabla.logger as logger import nnabla.functions as F import nnabla.parametric_functions as PF import nnabla.solvers as S import nnabla.utils.save as save from args import get_args from mnist_data import ...
true
true
f74ca8c8a89107434e2c817ef0db28591bdb572c
14,608
py
Python
lib/graphy/graphy/common.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
AppServer/lib/graphy/graphy/common.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
AppServer/lib/graphy/graphy/common.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
35.37046
80
0.661076
import copy import warnings from graphy import formatters from graphy import util class Marker(object): arrow = 'a' cross = 'c' diamond = 'd' circle = 'o' square = 's' x = 'x' def __init__(self, shape, color, size): self.shape = shape self.color = color self.size = s...
true
true
f74cab154d9a09a50918d0af2a9ef62841faa0c8
1,897
py
Python
scripts/dataToParquet.py
AeRabelais/bdt_pipeline
35d0cc3f7ada35e082c384d0755916605daa5feb
[ "MIT" ]
null
null
null
scripts/dataToParquet.py
AeRabelais/bdt_pipeline
35d0cc3f7ada35e082c384d0755916605daa5feb
[ "MIT" ]
null
null
null
scripts/dataToParquet.py
AeRabelais/bdt_pipeline
35d0cc3f7ada35e082c384d0755916605daa5feb
[ "MIT" ]
null
null
null
""" @Title: dataToParquet.py @author: Ashia Lewis GOAL: Create and update the parquet files for the air and soil data, separately. """ import os import glob import pandas as pd import pyarrow as pa import pyarrow.parquet as pq #CODE TO BE USED FOR THE BATCH DATA """ #file directories for the air and soi...
27.1
81
0.727992
import os import glob import pandas as pd import pyarrow as pa import pyarrow.parquet as pq air_dir = r"D:\sample_biodiversitree\data\export_data\air_data" soil_dir = r"D:\sample_biodiversitree\data\export_data\soil_data" all_air_files = glob.glob(air_dir + '/**/*.csv', recursive=True) all_soil_files = ...
true
true
f74cab3a89fe0b0ef2a65bd8ce69c0c1e55f43a8
6,985
py
Python
src/map/leetcode_map_solution.py
nutshellfool/algorithmPlayground_python
cb3a56a879ad5edc526a09c750c073596bb956d4
[ "MIT" ]
null
null
null
src/map/leetcode_map_solution.py
nutshellfool/algorithmPlayground_python
cb3a56a879ad5edc526a09c750c073596bb956d4
[ "MIT" ]
null
null
null
src/map/leetcode_map_solution.py
nutshellfool/algorithmPlayground_python
cb3a56a879ad5edc526a09c750c073596bb956d4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- class Solution(object): def isAnagram(self, s, t): if not s and not t: return True if (not s and t) or (s and not t): return False map_s = {} for i, char in enumerate(s): map_s[char] = map_s.get(char, 0) + 1 map_t ...
29.597458
87
0.423908
class Solution(object): def isAnagram(self, s, t): if not s and not t: return True if (not s and t) or (s and not t): return False map_s = {} for i, char in enumerate(s): map_s[char] = map_s.get(char, 0) + 1 map_t = {} for i, char...
true
true
f74cab9ed04da0f5adf4e6e41411afc8beceabaf
55,330
py
Python
pandas/tests/plotting/test_datetimelike.py
arushi-08/pandas
014ea2e5a8a647cfa5e3050a5c1299eb39b293d3
[ "BSD-3-Clause" ]
2
2021-12-28T09:06:32.000Z
2022-01-28T06:47:12.000Z
pandas/tests/plotting/test_datetimelike.py
arushi-08/pandas
014ea2e5a8a647cfa5e3050a5c1299eb39b293d3
[ "BSD-3-Clause" ]
354
2018-05-26T13:28:49.000Z
2022-03-31T01:11:46.000Z
pandas/tests/plotting/test_datetimelike.py
arushi-08/pandas
014ea2e5a8a647cfa5e3050a5c1299eb39b293d3
[ "BSD-3-Clause" ]
2
2021-03-16T23:52:37.000Z
2022-03-09T14:56:27.000Z
""" Test cases for time series specific (freq conversion, etc) """ from datetime import ( date, datetime, time, timedelta, ) import pickle import numpy as np import pytest from pandas._libs.tslibs import ( BaseOffset, to_offset, ) import pandas.util._test_decorators as td from pandas import (...
36.092629
88
0.556985
from datetime import ( date, datetime, time, timedelta, ) import pickle import numpy as np import pytest from pandas._libs.tslibs import ( BaseOffset, to_offset, ) import pandas.util._test_decorators as td from pandas import ( DataFrame, Index, NaT, Series, isna, to_da...
true
true
f74cac8b5ffce5f3982ce1e39a5108a4d841c8cf
1,052
py
Python
tensorflow/python/distribute/experimental/__init__.py
jackode/tensorflow
11f4ecb54708865ec757ca64e4805957b05d7570
[ "Apache-2.0" ]
1
2019-08-22T02:47:35.000Z
2019-08-22T02:47:35.000Z
tensorflow/python/distribute/experimental/__init__.py
shekharpalit/tensorflow
6aa83398ab03bfae822f36772757097bcb98b6ed
[ "Apache-2.0" ]
null
null
null
tensorflow/python/distribute/experimental/__init__.py
shekharpalit/tensorflow
6aa83398ab03bfae822f36772757097bcb98b6ed
[ "Apache-2.0" ]
1
2020-06-09T09:46:24.000Z
2020-06-09T09:46:24.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.08
80
0.739544
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.distribute import collective_all_reduce_strategy from tensorflow.python.distribute import parameter_server_strategy
true
true
f74cacc7fe45b8805860a6e6dd278d021d8b89bd
3,753
py
Python
sr/robot/arenas/two_colours_arena.py
maciekbogdalski/Assignment-for-RT-2021-22
cdddffff203640aadf5f7b6826e542349d90b460
[ "MIT" ]
null
null
null
sr/robot/arenas/two_colours_arena.py
maciekbogdalski/Assignment-for-RT-2021-22
cdddffff203640aadf5f7b6826e542349d90b460
[ "MIT" ]
null
null
null
sr/robot/arenas/two_colours_arena.py
maciekbogdalski/Assignment-for-RT-2021-22
cdddffff203640aadf5f7b6826e542349d90b460
[ "MIT" ]
1
2021-11-10T15:23:43.000Z
2021-11-10T15:23:43.000Z
from __future__ import division from math import cos, pi, sin import pygame from pygame.rect import Rect from arena import ARENA_MARKINGS_COLOR, ARENA_MARKINGS_WIDTH, Arena from ..markers import Token from ..vision import MARKER_TOKEN_GOLD, MARKER_TOKEN_SILVER HOME_ZONE_SIZE = 2.5 INNER_CIRCLE_RADIUS = 0.42 OUTER_...
37.158416
89
0.598987
from __future__ import division from math import cos, pi, sin import pygame from pygame.rect import Rect from arena import ARENA_MARKINGS_COLOR, ARENA_MARKINGS_WIDTH, Arena from ..markers import Token from ..vision import MARKER_TOKEN_GOLD, MARKER_TOKEN_SILVER HOME_ZONE_SIZE = 2.5 INNER_CIRCLE_RADIUS = 0.42 OUTER_...
true
true
f74cada65596ad0506c574a18c1f35a7ff78d979
5,582
py
Python
src/communities/migrations/0003_auto__chg_field_community_uid__add_unique_community_uid.py
ofirr/OpenCommunity
7786ac2996530af8f545f4398c071793c73634c8
[ "BSD-3-Clause" ]
1
2015-05-12T17:59:35.000Z
2015-05-12T17:59:35.000Z
src/communities/migrations/0003_auto__chg_field_community_uid__add_unique_community_uid.py
Niros/OpenCommunity
4c91136db6243a1cd65b55ecf5a44c2bce24a45a
[ "BSD-3-Clause" ]
null
null
null
src/communities/migrations/0003_auto__chg_field_community_uid__add_unique_community_uid.py
Niros/OpenCommunity
4c91136db6243a1cd65b55ecf5a44c2bce24a45a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Community.uid' db.alter_column(u'communities_community', 'uid', self.gf('django.db.models...
69.775
197
0.591903
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.alter_column(u'communities_community', 'uid', self.gf('django.db.models.fields.CharField')(unique=True, max_length=24)) ...
true
true
f74cae4715b2de9b80b63dd86bb803504fbd8065
307
py
Python
File for Lab 9/lab9ex6.py
lifeplay2019/ECOR1051-project
fbd0ed3651adc2cfc4dca06d155a03fb9fcfb3f3
[ "MIT" ]
null
null
null
File for Lab 9/lab9ex6.py
lifeplay2019/ECOR1051-project
fbd0ed3651adc2cfc4dca06d155a03fb9fcfb3f3
[ "MIT" ]
null
null
null
File for Lab 9/lab9ex6.py
lifeplay2019/ECOR1051-project
fbd0ed3651adc2cfc4dca06d155a03fb9fcfb3f3
[ "MIT" ]
null
null
null
def rotate_left3(numbers:list)->list: """Returns a new list containing the same elements, but they are "rotated left". >>>rotate_left3(1,2,3) [2,3,1] >>>rotate_left3(2,3,4) [3,4,2] """ lst[0] = b ,lst[1] = c, lst[2] = a return [b,c,a]
19.1875
46
0.491857
def rotate_left3(numbers:list)->list: lst[0] = b ,lst[1] = c, lst[2] = a return [b,c,a]
true
true
f74caf5aac2fd8835fcff458df6a7ee081f87b57
6,794
py
Python
pysnmp/CISCO-WAN-ATM-CONN-CAPABILITY.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCO-WAN-ATM-CONN-CAPABILITY.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCO-WAN-ATM-CONN-CAPABILITY.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-WAN-ATM-CONN-CAPABILITY (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-WAN-ATM-CONN-CAPABILITY # Produced by pysmi-0.3.4 at Mon Apr 29 18:03:44 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python ve...
97.057143
766
0.768031
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint = mibBuilder.impo...
true
true
f74caf8956304ba012dd3ae2dd9688cc0623f575
250
py
Python
tests/test_base/test_objectpropertyaxioms.py
clin113jhu/funowl
805963c9d2718598c85a1213106161b59f5a8dd3
[ "CC0-1.0" ]
null
null
null
tests/test_base/test_objectpropertyaxioms.py
clin113jhu/funowl
805963c9d2718598c85a1213106161b59f5a8dd3
[ "CC0-1.0" ]
null
null
null
tests/test_base/test_objectpropertyaxioms.py
clin113jhu/funowl
805963c9d2718598c85a1213106161b59f5a8dd3
[ "CC0-1.0" ]
null
null
null
import unittest from tests.utils.base import TestBase class ObjectPropertyAxiomsTestCase(TestBase): @unittest.expectedFailure def test_something(self): self.assertEqual(True, False) if __name__ == '__main__': unittest.main()
17.857143
45
0.74
import unittest from tests.utils.base import TestBase class ObjectPropertyAxiomsTestCase(TestBase): @unittest.expectedFailure def test_something(self): self.assertEqual(True, False) if __name__ == '__main__': unittest.main()
true
true
f74caf9231ca7074b73eeba74612e26294942102
8,704
py
Python
plateau/io/iter.py
data-engineering-collective/plateau
ab87282a2f66c4f847654f28f8a2b0df33cb4d62
[ "MIT" ]
2
2022-02-11T01:27:56.000Z
2022-03-18T22:44:02.000Z
plateau/io/iter.py
data-engineering-collective/plateau
ab87282a2f66c4f847654f28f8a2b0df33cb4d62
[ "MIT" ]
17
2022-02-08T16:14:19.000Z
2022-03-31T00:36:16.000Z
plateau/io/iter.py
data-engineering-collective/plateau
ab87282a2f66c4f847654f28f8a2b0df33cb4d62
[ "MIT" ]
2
2022-02-08T16:59:00.000Z
2022-02-08T17:54:39.000Z
from functools import partial from typing import cast from plateau.core.docs import default_docs from plateau.core.factory import _ensure_factory from plateau.core.naming import ( DEFAULT_METADATA_STORAGE_FORMAT, DEFAULT_METADATA_VERSION, SINGLE_TABLE, ) from plateau.core.uuid import gen_uuid from plateau....
27.2
100
0.666245
from functools import partial from typing import cast from plateau.core.docs import default_docs from plateau.core.factory import _ensure_factory from plateau.core.naming import ( DEFAULT_METADATA_STORAGE_FORMAT, DEFAULT_METADATA_VERSION, SINGLE_TABLE, ) from plateau.core.uuid import gen_uuid from plateau....
true
true
f74cafed9287fdcf1645685507072621f7cfcc55
735
py
Python
jupyter_helpers/table.py
krassowski/jupyter-helpers
9feb0af6563b56d02688c18e1a9a415d15d9b1a2
[ "MIT" ]
45
2019-03-18T11:13:01.000Z
2021-03-21T18:59:06.000Z
jupyter_helpers/table.py
krassowski/jupyter-helpers
9feb0af6563b56d02688c18e1a9a415d15d9b1a2
[ "MIT" ]
6
2019-04-04T08:12:06.000Z
2021-01-29T06:37:24.000Z
jupyter_helpers/table.py
krassowski/jupyter-helpers
9feb0af6563b56d02688c18e1a9a415d15d9b1a2
[ "MIT" ]
5
2019-03-19T07:15:14.000Z
2019-12-18T19:25:48.000Z
import pandas as pd from IPython.core.display import display def bordered_table(hide_headers=[], color='#ddd'): return [ {'selector': 'th', 'props': [('text-align', 'center'), ('border', f'1px solid {color}')]}, {'selector': 'td', 'props': [('border', f'1px solid {color}')]}, *[ ...
29.4
98
0.572789
import pandas as pd from IPython.core.display import display def bordered_table(hide_headers=[], color='#ddd'): return [ {'selector': 'th', 'props': [('text-align', 'center'), ('border', f'1px solid {color}')]}, {'selector': 'td', 'props': [('border', f'1px solid {color}')]}, *[ ...
true
true
f74cb0c6c8d6498edda283fe610b72a57db22467
1,867
py
Python
tests/base_service_config_test.py
egmkang/fastapi_serviceutils
7095349421eb5e5f0435908938f79ddc93561dab
[ "MIT" ]
34
2019-10-27T22:33:13.000Z
2022-03-20T17:06:08.000Z
tests/base_service_config_test.py
egmkang/fastapi_serviceutils
7095349421eb5e5f0435908938f79ddc93561dab
[ "MIT" ]
4
2019-11-12T21:02:40.000Z
2021-07-29T07:38:54.000Z
tests/base_service_config_test.py
egmkang/fastapi_serviceutils
7095349421eb5e5f0435908938f79ddc93561dab
[ "MIT" ]
5
2019-11-12T21:40:41.000Z
2022-01-19T10:06:41.000Z
from pathlib import Path import pytest from pydantic import ValidationError from fastapi_serviceutils.app import collect_config_definition from fastapi_serviceutils.app import Config @pytest.mark.parametrize( 'config_path', [ 'tests/configs/config.yml', 'tests/configs/config2.yml', '...
35.226415
63
0.733262
from pathlib import Path import pytest from pydantic import ValidationError from fastapi_serviceutils.app import collect_config_definition from fastapi_serviceutils.app import Config @pytest.mark.parametrize( 'config_path', [ 'tests/configs/config.yml', 'tests/configs/config2.yml', '...
true
true
f74cb1c5a431cde20462aba960e6079f900a9b3c
3,273
py
Python
tempest/api/identity/admin/v3/test_policies.py
azorge/tempest
549dfc93fb7e3d6d8566064a60a6069deae5c8eb
[ "Apache-2.0" ]
1
2021-05-21T08:24:02.000Z
2021-05-21T08:24:02.000Z
tempest/api/identity/admin/v3/test_policies.py
azorge/tempest
549dfc93fb7e3d6d8566064a60a6069deae5c8eb
[ "Apache-2.0" ]
null
null
null
tempest/api/identity/admin/v3/test_policies.py
azorge/tempest
549dfc93fb7e3d6d8566064a60a6069deae5c8eb
[ "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 requ...
43.065789
79
0.665139
from tempest.api.identity import base from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tempest import test class PoliciesTestJSON(base.BaseIdentityV3AdminTest): def _delete_policy(self, policy_id): self.policies_client.delete_policy(policy_id) @decorators.idem...
true
true
f74cb27315ec4f9e9609e8e28119aba15175b3ce
7,007
py
Python
src/tiler.py
chelffey/tilebot
3fa4cc3ea7c03786fb8ac02458ef4e6d464603ec
[ "MIT" ]
null
null
null
src/tiler.py
chelffey/tilebot
3fa4cc3ea7c03786fb8ac02458ef4e6d464603ec
[ "MIT" ]
null
null
null
src/tiler.py
chelffey/tilebot
3fa4cc3ea7c03786fb8ac02458ef4e6d464603ec
[ "MIT" ]
null
null
null
# Purpose: takes a list of filenames AND/OR publically accessible urls. # Returns a tiled image file of tiles SIZExSIZE, separated by spaces of width # DIFF, in rows if length ROWSIZE. # files that can't be retrieved are returned blank. import os import numpy as np from PIL import Image import urllib.request impor...
36.878947
221
0.636792
import os import numpy as np from PIL import Image import urllib.request import validators # global vars EMPTY = "empty" def crop_square(im): # crops to square, based on smallest length. width, height = im.size side_length = min(width, height) width_pad = (width - side_length) // 2 height_pad = (...
true
true
f74cb31e77c79ff6e1fa2ec6876b96e89421d319
468
py
Python
nlargestelement.py
maurendeviia/pythoncharmers
b5775d0f51a6f2e5dc0365345e0436dea4c72c14
[ "MIT" ]
37
2020-10-01T15:20:12.000Z
2021-10-04T14:17:06.000Z
nlargestelement.py
maurendeviia/pythoncharmers
b5775d0f51a6f2e5dc0365345e0436dea4c72c14
[ "MIT" ]
27
2020-10-01T12:32:41.000Z
2021-10-04T11:05:34.000Z
nlargestelement.py
maurendeviia/pythoncharmers
b5775d0f51a6f2e5dc0365345e0436dea4c72c14
[ "MIT" ]
57
2020-10-01T11:24:26.000Z
2022-02-16T05:09:50.000Z
# Python program to find N largest # element from given list of integers # Function returns N largest elements def Nmaxelements(list1, N): final_list = [] for i in range(0, N): max1 = 0 for j in range(len(list1)): if list1[j] > max1: max1 = list1[j]; list1.remove(max1); final_list....
18
39
0.626068
def Nmaxelements(list1, N): final_list = [] for i in range(0, N): max1 = 0 for j in range(len(list1)): if list1[j] > max1: max1 = list1[j]; list1.remove(max1); final_list.append(max1) print(final_list) list1 = [2, 6, 41, 85, 0, 3, 7, 6, 10] N = 2 Nmaxelements(list1, N)
true
true
f74cb32e15444b035179902f5070d41baa4515be
4,445
py
Python
archive/benchmarks_plane/rexi_tests_numerical/2015_12_26_search_w_M/run.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
6
2017-11-20T08:12:46.000Z
2021-03-11T15:32:36.000Z
archive/benchmarks_plane/rexi_tests_numerical/2015_12_26_search_w_M/run.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
4
2018-02-02T21:46:33.000Z
2022-01-11T11:10:27.000Z
archive/benchmarks_plane/rexi_tests_numerical/2015_12_26_search_w_M/run.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
12
2016-03-01T18:33:34.000Z
2022-02-08T22:20:31.000Z
#! /usr/bin/python2 import subprocess import sys import os import time from subprocess import PIPE import socket default_params = '' output_file_prefix = 'output' if len(sys.argv) > 1: output_file_prefix = sys.argv[1] # # http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python # class Logg...
21.166667
192
0.655343
import subprocess import sys import os import time from subprocess import PIPE import socket default_params = '' output_file_prefix = 'output' if len(sys.argv) > 1: output_file_prefix = sys.argv[1] class Logger(object): def __init__(self, filename="Default.log"): self.terminal = sys.stdout self.log = open(f...
false
true
f74cb3fd71445df9b1cedee1722247e240d618e9
1,187
py
Python
dsblocks/config/bt_defaults.py
Jaume-JCI/block-types
868eb97afa41cd4fee1ec2e0a2a97489e21783e8
[ "MIT" ]
null
null
null
dsblocks/config/bt_defaults.py
Jaume-JCI/block-types
868eb97afa41cd4fee1ec2e0a2a97489e21783e8
[ "MIT" ]
37
2021-11-17T22:38:36.000Z
2022-03-05T15:21:54.000Z
dsblocks/config/bt_defaults.py
Jaume-JCI/block-types
868eb97afa41cd4fee1ec2e0a2a97489e21783e8
[ "MIT" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/config/config.bt_defaults.ipynb (unless otherwise specified). __all__ = ['path_results', 'path_models', 'path_data', 'file_format', 'verbose', 'name_logger', 'save_splits', 'group', 'error_if_present', 'overwrite_field', 'mode_logger', 'separate_labels', 'warn...
29.675
119
0.728728
__all__ = ['path_results', 'path_models', 'path_data', 'file_format', 'verbose', 'name_logger', 'save_splits', 'group', 'error_if_present', 'overwrite_field', 'mode_logger', 'separate_labels', 'warning_if_nick_name_exists', 'propagate', 'path_session_folder', 'session_filename', 'path_logger_fold...
true
true
f74cb46399755f112422bd71ab055ccf9b61ea3f
6,423
py
Python
model_measuring/kamal/core/engine/engine.py
Gouzhong1223/Dubhe
8959a51704410dc38b595a0926646b9928451c9a
[ "Apache-2.0" ]
1
2022-01-11T07:14:37.000Z
2022-01-11T07:14:37.000Z
model_measuring/kamal/core/engine/engine.py
Gouzhong1223/Dubhe
8959a51704410dc38b595a0926646b9928451c9a
[ "Apache-2.0" ]
1
2022-03-04T07:19:43.000Z
2022-03-04T07:19:43.000Z
model_measuring/kamal/core/engine/engine.py
Gouzhong1223/Dubhe
8959a51704410dc38b595a0926646b9928451c9a
[ "Apache-2.0" ]
1
2022-03-20T13:09:14.000Z
2022-03-20T13:09:14.000Z
""" Copyright 2020 Tianshu AI Platform. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law ...
33.805263
92
0.630391
import torch import torch.nn as nn import abc, math, weakref, typing, time from typing import Any, Callable, Optional, Sequence import numpy as np from kamal.core.engine.events import DefaultEvents, Event from kamal.core import tasks from kamal.utils import set_mode, move_to_device, get_logger from collections impor...
true
true
f74cb4a31040ec189e062dc74da1673212a8916f
5,870
py
Python
astropy/visualization/wcsaxes/tests/test_display_world_coordinates.py
guntbert/astropy
f2d2add09e5b1638b2698f19a4d46fcca19e82be
[ "BSD-3-Clause" ]
null
null
null
astropy/visualization/wcsaxes/tests/test_display_world_coordinates.py
guntbert/astropy
f2d2add09e5b1638b2698f19a4d46fcca19e82be
[ "BSD-3-Clause" ]
1
2019-09-09T21:53:24.000Z
2019-09-09T21:53:24.000Z
astropy/visualization/wcsaxes/tests/test_display_world_coordinates.py
guntbert/astropy
f2d2add09e5b1638b2698f19a4d46fcca19e82be
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy.visualization.wcsaxes.core import WCSAxes import matplotlib.pyplot as plt from matplotlib.backend_bases import KeyEvent from astropy.wcs import WCS from astropy.coordinates import FK5 from astropy.time import Time from astropy.tests.image_tes...
39.662162
83
0.664395
from astropy.visualization.wcsaxes.core import WCSAxes import matplotlib.pyplot as plt from matplotlib.backend_bases import KeyEvent from astropy.wcs import WCS from astropy.coordinates import FK5 from astropy.time import Time from astropy.tests.image_tests import ignore_matplotlibrc from .test_images import BaseImag...
true
true
f74cb4ad063882beb20867df01a4a127d434ee58
3,300
py
Python
dlkit/handcar/type/objects.py
UOC/dlkit
a9d265db67e81b9e0f405457464e762e2c03f769
[ "MIT" ]
2
2018-02-23T12:16:11.000Z
2020-10-08T17:54:24.000Z
dlkit/handcar/type/objects.py
UOC/dlkit
a9d265db67e81b9e0f405457464e762e2c03f769
[ "MIT" ]
87
2017-04-21T18:57:15.000Z
2021-12-13T19:43:57.000Z
dlkit/handcar/type/objects.py
UOC/dlkit
a9d265db67e81b9e0f405457464e762e2c03f769
[ "MIT" ]
1
2018-03-01T16:44:25.000Z
2018-03-01T16:44:25.000Z
# -*- coding: utf-8 -*- # This module contains all the Object classes used by the MIT Core Concept # Catalog (MC3) Handcar based implementation of the OSID Type Service. from ...abstract_osid.type import objects as abc_type_objects from ..osid import objects as osid_objects from .. import settings from ..primitives i...
35.869565
139
0.623636
from ...abstract_osid.type import objects as abc_type_objects from ..osid import objects as osid_objects from .. import settings from ..primitives import Id, Type, DisplayText from ..osid.osid_errors import NullArgument, InvalidArgument, NotFound, NoAccess, IllegalState, OperationFailed, Unimplemented, Unsupported I...
true
true
f74cb4f167c0516e1e372c17573355d28e273f73
11,173
py
Python
tests/test_utils.py
elsadarwin/blencongbot
c0dd0b96613aeff794470eb0d9a56065e78400ee
[ "Apache-2.0" ]
null
null
null
tests/test_utils.py
elsadarwin/blencongbot
c0dd0b96613aeff794470eb0d9a56065e78400ee
[ "Apache-2.0" ]
null
null
null
tests/test_utils.py
elsadarwin/blencongbot
c0dd0b96613aeff794470eb0d9a56065e78400ee
[ "Apache-2.0" ]
null
null
null
import pytest from telebot import types from tululbot.utils import TululBot, lookup_kamusslang, lookup_urbandictionary, lookup_slang from tululbot.types import Message class TestTululBot: def test_create_bot(self): bot = TululBot('TOKEN') assert bot._telebot is not None assert bot._user...
32.861765
94
0.621498
import pytest from telebot import types from tululbot.utils import TululBot, lookup_kamusslang, lookup_urbandictionary, lookup_slang from tululbot.types import Message class TestTululBot: def test_create_bot(self): bot = TululBot('TOKEN') assert bot._telebot is not None assert bot._user...
true
true
f74cb54d57dbe6c6d765653d26b2f758001ddc30
61
py
Python
tests/test_nothing.py
jeffseif/queens
00303ad9a58845162194b3e56d149f0e6a3818a5
[ "BSD-3-Clause" ]
1
2018-03-21T20:57:31.000Z
2018-03-21T20:57:31.000Z
tests/test_nothing.py
jeffseif/queens
00303ad9a58845162194b3e56d149f0e6a3818a5
[ "BSD-3-Clause" ]
null
null
null
tests/test_nothing.py
jeffseif/queens
00303ad9a58845162194b3e56d149f0e6a3818a5
[ "BSD-3-Clause" ]
1
2020-01-12T15:39:30.000Z
2020-01-12T15:39:30.000Z
class TestNothing: def test_nothing(self): pass
12.2
27
0.639344
class TestNothing: def test_nothing(self): pass
true
true
f74cb5b936671341239e74edfd672023ff23fd68
1,874
py
Python
03_spyder/proyecto_spyder.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
null
null
null
03_spyder/proyecto_spyder.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
null
null
null
03_spyder/proyecto_spyder.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
1
2019-10-21T19:27:12.000Z
2019-10-21T19:27:12.000Z
# -*- coding: utf-8 -*- """ Created on Wed Nov 28 01:15:31 2018 @author: Andres """ import pandas as pd url = 'http://catalogo.datosabiertos.gob.ec/api/action/datastore_search?resource_id=8513f446-1c94-426e-8592-d4cbdd295f33&limit=1000' datos = pd.read_json(url, typ='frame') datos =pd.DataFrame.from_dict(datos["res...
34.703704
151
0.719851
import pandas as pd url = 'http://catalogo.datosabiertos.gob.ec/api/action/datastore_search?resource_id=8513f446-1c94-426e-8592-d4cbdd295f33&limit=1000' datos = pd.read_json(url, typ='frame') datos =pd.DataFrame.from_dict(datos["result"]["records"]).set_index("_id") datos.loc[289,'Canton'] class Homicidio: def ...
true
true
f74cb5ccd0841f9ba4a42bf533afcd5c397029fb
2,354
py
Python
aliyun-python-sdk-vod/aliyunsdkvod/request/v20170321/AddWatermarkRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-vod/aliyunsdkvod/request/v20170321/AddWatermarkRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-vod/aliyunsdkvod/request/v20170321/AddWatermarkRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.810811
71
0.757859
from aliyunsdkcore.request import RpcRequest class AddWatermarkRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'vod', '2017-03-21', 'AddWatermark','vod') self.set_method('POST') def get_ResourceOwnerId(self): return self.get_query_params().get('ResourceOwnerId') def set_ResourceOw...
true
true
f74cb6af5daaf14018ac23e5594263d6b8ccb6d3
5,537
py
Python
flare/safeeval.py
co-dev10/flare
b3b5686fe695097206c9fad17f461f5c9fef5c21
[ "MIT" ]
null
null
null
flare/safeeval.py
co-dev10/flare
b3b5686fe695097206c9fad17f461f5c9fef5c21
[ "MIT" ]
null
null
null
flare/safeeval.py
co-dev10/flare
b3b5686fe695097206c9fad17f461f5c9fef5c21
[ "MIT" ]
null
null
null
"""Here we are trying to provide an secure and safe space for evaluate simple python expressions on some 'data'. If you only need a oneshot evaluation, you call safeEval and enjoy the result. Otherwise call first compile to get the ast representation and execute that compiled expression multiple times with different da...
33.557576
122
0.686473
import ast import typing from typing import Any, Callable, Dict class SafeEval: def __init__(self, allowedCallables: typing.Union[None, typing.Dict[str, typing.Any]] = None): if allowedCallables is not None: self.allowedCallables = allowedCallables else: self.allowedCallables = dict() self.nodes: Dic...
true
true
f74cb6cbb3536439c60254ebefb1a6630d69115b
4,832
py
Python
lavalle_rrts.py
leonidk/cupdice
f3386337922337eaaae2f244607f1af73516843f
[ "MIT" ]
null
null
null
lavalle_rrts.py
leonidk/cupdice
f3386337922337eaaae2f244607f1af73516843f
[ "MIT" ]
null
null
null
lavalle_rrts.py
leonidk/cupdice
f3386337922337eaaae2f244607f1af73516843f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # rrt.py # This program generates a simple rapidly # exploring random tree (RRT) in a rectangular region. # # Written by Steve LaValle # May 2011 import sys, random, math, pygame from pygame.locals import * from math import sqrt,cos,sin,atan2 import heapq import numpy as np #constants XDIM = 50...
34.514286
117
0.515108
import sys, random, math, pygame from pygame.locals import * from math import sqrt,cos,sin,atan2 import heapq import numpy as np XDIM = 500 YDIM = 500 WINSIZE = np.array([XDIM, YDIM]) MAX_STEP_SIZE = 12 NUMNODES = 5000 NUM_OBSTACLES = 30 OBSTACLE_WIDTH = 80 OBSTACLE_HEIGHT = 80 RAND_SEARCH_PROB = 0.25 GOAL_TOL = 1e-...
true
true
f74cb6e72162a0cee54f7de025b38f3510fe8b26
3,875
py
Python
rovers/fastdownward/experiments/issue750/relativescatter.py
mehrdadzakershahrak/Online-Explanation-Generation
e41ad9b5a390abdaf271562a56105c191e33b74d
[ "MIT" ]
1
2021-09-09T13:03:02.000Z
2021-09-09T13:03:02.000Z
rovers/fastdownward/experiments/issue750/relativescatter.py
mehrdadzakershahrak/Online-Explanation-Generation
e41ad9b5a390abdaf271562a56105c191e33b74d
[ "MIT" ]
null
null
null
rovers/fastdownward/experiments/issue750/relativescatter.py
mehrdadzakershahrak/Online-Explanation-Generation
e41ad9b5a390abdaf271562a56105c191e33b74d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from collections import defaultdict from matplotlib import ticker from downward.reports.scatter import ScatterPlotReport from downward.reports.plot import PlotReport, Matplotlib, MatplotlibPlot # TODO: handle outliers # TODO: this is mostly copied from ScatterMatplotlib (scatter.py) class ...
36.556604
78
0.615484
from collections import defaultdict from matplotlib import ticker from downward.reports.scatter import ScatterPlotReport from downward.reports.plot import PlotReport, Matplotlib, MatplotlibPlot class RelativeScatterMatplotlib(Matplotlib): @classmethod def _plot(cls, report, axes, categories, styles): ...
true
true
f74cb738076efe04218c0c345593ee0824d87e17
3,724
py
Python
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_security_group_py3.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_security_group_py3.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/network_security_group_py3.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
42.804598
210
0.642589
from .resource import Resource class NetworkSecurityGroup(Resource): _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, 'network_interfaces': {'readonly': True}, 'subnets': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': ...
true
true
f74cb8a159bb035c1daa1c36b3420e16710aa61f
7,325
py
Python
pbcommand/testkit/core.py
mpkocher/pbcommand
78514aba81d131569e97ae339eab5271502cf4b7
[ "BSD-3-Clause-Clear" ]
1
2021-05-21T11:28:59.000Z
2021-05-21T11:28:59.000Z
pbcommand/testkit/core.py
mpkocher/pbcommand
78514aba81d131569e97ae339eab5271502cf4b7
[ "BSD-3-Clause-Clear" ]
null
null
null
pbcommand/testkit/core.py
mpkocher/pbcommand
78514aba81d131569e97ae339eab5271502cf4b7
[ "BSD-3-Clause-Clear" ]
null
null
null
import os import unittest import logging import tempfile import subprocess from .base_utils import (HAS_PBCORE, pbcore_skip_msg, get_temp_file, get_temp_dir) from pbcommand.resolver import (resolve_tool_contract, ...
41.151685
178
0.67413
import os import unittest import logging import tempfile import subprocess from .base_utils import (HAS_PBCORE, pbcore_skip_msg, get_temp_file, get_temp_dir) from pbcommand.resolver import (resolve_tool_contract, ...
true
true
f74cb946471c68dba8a7f1e08dd6d84908ab7e3d
253
py
Python
__init__.py
OptimalBPM/optimalbpm
4c65cd43a36e3318a49de7cd598069ea0623dc69
[ "RSA-MD" ]
2
2016-05-02T14:16:07.000Z
2020-06-25T19:24:29.000Z
__init__.py
OptimalBPM/optimalbpm
4c65cd43a36e3318a49de7cd598069ea0623dc69
[ "RSA-MD" ]
null
null
null
__init__.py
OptimalBPM/optimalbpm
4c65cd43a36e3318a49de7cd598069ea0623dc69
[ "RSA-MD" ]
1
2020-06-25T19:24:31.000Z
2020-06-25T19:24:31.000Z
""" This package holds the Optimal BPM plugin, its libraries and UI The Optimal Framework loads this that """ import runpy __author__ = 'Nicklas Borjesson' def run_agent(): runpy.run_module(mod_name="optimalbpm.agent.agent", run_name="__main__")
21.083333
76
0.758893
import runpy __author__ = 'Nicklas Borjesson' def run_agent(): runpy.run_module(mod_name="optimalbpm.agent.agent", run_name="__main__")
true
true
f74cb9b008cb38b7c53445eeb2bde7398928035d
2,653
py
Python
test/python/quantum_info/test_weyl.py
lerongil/qiskit-terra
a25af2a2378bc3d4f5ec73b948d048d1b707454c
[ "Apache-2.0" ]
3
2019-11-20T08:15:28.000Z
2020-11-01T15:32:57.000Z
test/python/quantum_info/test_weyl.py
lerongil/qiskit-terra
a25af2a2378bc3d4f5ec73b948d048d1b707454c
[ "Apache-2.0" ]
4
2019-05-13T15:28:46.000Z
2019-12-19T20:47:02.000Z
test/python/quantum_info/test_weyl.py
lerongil/qiskit-terra
a25af2a2378bc3d4f5ec73b948d048d1b707454c
[ "Apache-2.0" ]
1
2021-07-07T16:55:41.000Z
2021-07-07T16:55:41.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
33.582278
87
0.572936
import unittest import numpy as np from numpy.testing import assert_allclose from qiskit.test import QiskitTestCase from qiskit.quantum_info.random import random_unitary from qiskit.quantum_info.synthesis.weyl import weyl_coordinates from qiskit.quantum_info.synthesis.local_invariance import (two_qubit_local_invari...
true
true
f74cbb29f76b92c1498f4f7b05fb217cf3c0f680
433
py
Python
octosql_py/core/octosql.py
styczynski/octosql.py
2180f28d7e8bf11ca09244b730dbf0bac9751649
[ "MIT" ]
2
2019-10-27T17:54:21.000Z
2019-10-27T22:42:55.000Z
octosql_py/core/octosql.py
styczynski/octosql.py
2180f28d7e8bf11ca09244b730dbf0bac9751649
[ "MIT" ]
1
2021-08-16T00:40:18.000Z
2021-08-16T00:40:18.000Z
octosql_py/core/octosql.py
styczynski/octosql.py
2180f28d7e8bf11ca09244b730dbf0bac9751649
[ "MIT" ]
null
null
null
import octosql_py_native import yaml from .connection import OctoSQLConnection class OctoSQL: def __init__(self): octosql_py_native.init() def connect(self, sources): conf = { "dataSources": list(map(lambda source: source.generateConfigObject(), sources)) } config...
25.470588
91
0.674365
import octosql_py_native import yaml from .connection import OctoSQLConnection class OctoSQL: def __init__(self): octosql_py_native.init() def connect(self, sources): conf = { "dataSources": list(map(lambda source: source.generateConfigObject(), sources)) } config...
true
true
f74cbcb298de75b693ac16556dafbeaab48a008f
206
py
Python
python/olm/__init__.py
kiwiirc/olm
beaa6216ad5c6483f32f5e0b6384c6e0b682a8bc
[ "Apache-2.0" ]
1
2021-12-04T21:07:20.000Z
2021-12-04T21:07:20.000Z
python/olm/__init__.py
kiwiirc/olm
beaa6216ad5c6483f32f5e0b6384c6e0b682a8bc
[ "Apache-2.0" ]
null
null
null
python/olm/__init__.py
kiwiirc/olm
beaa6216ad5c6483f32f5e0b6384c6e0b682a8bc
[ "Apache-2.0" ]
1
2021-12-04T21:07:09.000Z
2021-12-04T21:07:09.000Z
from .account import Account from .session import Session from .outbound_group_session import OutboundGroupSession from .inbound_group_session import InboundGroupSession from .utility import ed25519_verify
34.333333
56
0.878641
from .account import Account from .session import Session from .outbound_group_session import OutboundGroupSession from .inbound_group_session import InboundGroupSession from .utility import ed25519_verify
true
true
f74cbd1f6e22f2005186520584170a9e565c6dca
13,176
py
Python
tests/test_views.py
iandroogmans/django-reports
2663abfa0546df6e12af651ea959b395eb4c764b
[ "BSD-3-Clause" ]
1
2020-06-11T12:38:21.000Z
2020-06-11T12:38:21.000Z
tests/test_views.py
iandroogmans/django-reports
2663abfa0546df6e12af651ea959b395eb4c764b
[ "BSD-3-Clause" ]
3
2020-06-05T18:31:28.000Z
2021-06-10T20:29:29.000Z
tests/test_views.py
iandroogmans/django-reports
2663abfa0546df6e12af651ea959b395eb4c764b
[ "BSD-3-Clause" ]
1
2020-01-22T09:16:41.000Z
2020-01-22T09:16:41.000Z
import json from django import forms from django.contrib.auth.models import User from django.http.response import HttpResponse from django.test import TestCase from django.test import client from django.test.client import RequestFactory from django.test.utils import override_settings import six import advanced_reports ...
46.231579
120
0.577869
import json from django import forms from django.contrib.auth.models import User from django.http.response import HttpResponse from django.test import TestCase from django.test import client from django.test.client import RequestFactory from django.test.utils import override_settings import six import advanced_reports ...
true
true
f74cbef832cc82da64d8b458393871641132b1af
12,926
py
Python
src/syntaxerrors/pytokenizer.py
cfbolz/syntaxerrors
1c7ecc8fd0d05253d5c55dee39802cfb86fb69f7
[ "Apache-2.0", "OpenSSL" ]
5
2018-04-11T15:19:53.000Z
2020-10-27T15:23:18.000Z
src/syntaxerrors/pytokenizer.py
cfbolz/syntaxerrors
1c7ecc8fd0d05253d5c55dee39802cfb86fb69f7
[ "Apache-2.0", "OpenSSL" ]
null
null
null
src/syntaxerrors/pytokenizer.py
cfbolz/syntaxerrors
1c7ecc8fd0d05253d5c55dee39802cfb86fb69f7
[ "Apache-2.0", "OpenSSL" ]
null
null
null
import six from syntaxerrors import automata from syntaxerrors.parser import Token from syntaxerrors.pytoken import python_opmap_bytes from syntaxerrors.pytoken import tokens from syntaxerrors.error import TokenError, TokenIndentationError from syntaxerrors.pytokenize import tabsize, whiteSpaceDFA, \ triple_quoted...
42.24183
104
0.51439
import six from syntaxerrors import automata from syntaxerrors.parser import Token from syntaxerrors.pytoken import python_opmap_bytes from syntaxerrors.pytoken import tokens from syntaxerrors.error import TokenError, TokenIndentationError from syntaxerrors.pytokenize import tabsize, whiteSpaceDFA, \ triple_quoted...
true
true
f74cbf5646f3fdc12a5b3867ebd0fbd9aac312c7
561
py
Python
svaudio/repo/schema.py
metrasynth/svaudio
eb9547002159305f63c7f5a885b9a9b4025d14bf
[ "MIT" ]
1
2021-06-04T07:48:37.000Z
2021-06-04T07:48:37.000Z
svaudio/repo/schema.py
metrasynth/svaudio
eb9547002159305f63c7f5a885b9a9b4025d14bf
[ "MIT" ]
35
2021-04-06T07:54:00.000Z
2022-03-31T08:11:49.000Z
svaudio/repo/schema.py
metrasynth/svaudio
eb9547002159305f63c7f5a885b9a9b4025d14bf
[ "MIT" ]
1
2021-06-30T01:28:28.000Z
2021-06-30T01:28:28.000Z
from graphene import ObjectType, relay from graphene_django import DjangoObjectType from graphene_django.filter import DjangoFilterConnectionField from . import models as m class FileNode(DjangoObjectType): class Meta: model = m.File interfaces = (relay.Node,) filter_fields = [ ...
23.375
62
0.647059
from graphene import ObjectType, relay from graphene_django import DjangoObjectType from graphene_django.filter import DjangoFilterConnectionField from . import models as m class FileNode(DjangoObjectType): class Meta: model = m.File interfaces = (relay.Node,) filter_fields = [ ...
true
true
f74cc0684c115b2374a4cb8c88040b864ba6430a
1,227
py
Python
community/forms.py
PickBas/meta-social
f6fb0a50c30e240086a75917b705dfdc71dbebf9
[ "MIT" ]
null
null
null
community/forms.py
PickBas/meta-social
f6fb0a50c30e240086a75917b705dfdc71dbebf9
[ "MIT" ]
15
2020-06-07T07:58:05.000Z
2022-01-19T16:53:47.000Z
community/forms.py
PickBas/meta-social
f6fb0a50c30e240086a75917b705dfdc71dbebf9
[ "MIT" ]
null
null
null
""" Meta social community forms """ from django import forms from .models import Community class EditCommunityForm(forms.ModelForm): """ Community editing form """ def __init__(self, *args, **kwargs): super(EditCommunityForm, self).__init__(*args, **kwargs) for key in self.fields: ...
21.910714
65
0.577832
from django import forms from .models import Community class EditCommunityForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(EditCommunityForm, self).__init__(*args, **kwargs) for key in self.fields: self.fields[key].required = True class Meta: model = Co...
true
true
f74cc0d67abe6425dba4632512a1fe1e7686a1f8
723
py
Python
migrations/versions/276ef161b610_.py
Jc2k/microauth
ff7c9a1aa493fe50f7f59f618f3317910551b99d
[ "Apache-2.0" ]
2
2018-06-07T18:39:37.000Z
2020-05-16T11:08:29.000Z
migrations/versions/276ef161b610_.py
Jc2k/microauth
ff7c9a1aa493fe50f7f59f618f3317910551b99d
[ "Apache-2.0" ]
2
2017-11-19T16:52:01.000Z
2018-08-11T10:49:08.000Z
migrations/versions/276ef161b610_.py
Jc2k/microauth
ff7c9a1aa493fe50f7f59f618f3317910551b99d
[ "Apache-2.0" ]
1
2018-05-26T06:03:04.000Z
2018-05-26T06:03:04.000Z
"""empty message Revision ID: 276ef161b610 Revises: Create Date: 2017-10-24 19:30:22.200973 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '276ef161b610' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
21.909091
65
0.673582
from alembic import op import sqlalchemy as sa revision = '276ef161b610' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table('user', sa.Column('id', sa.Integer(), nullable=False), sa.Column('username', sa.String(length=128), nullable=True), sa.PrimaryKeyCon...
true
true
f74cc32285ed57569ca4e11695799a5e6ec6a355
385
py
Python
djconnectwise/migrations/0061_auto_20180605_1208.py
kti-sam/django-connectwise
28484faad9435892a46b8ce4a3c957f64c299971
[ "MIT" ]
10
2017-04-27T19:51:38.000Z
2020-10-09T17:21:23.000Z
djconnectwise/migrations/0061_auto_20180605_1208.py
kti-sam/django-connectwise
28484faad9435892a46b8ce4a3c957f64c299971
[ "MIT" ]
45
2017-02-07T22:52:07.000Z
2021-11-25T21:45:44.000Z
djconnectwise/migrations/0061_auto_20180605_1208.py
kti-sam/django-connectwise
28484faad9435892a46b8ce4a3c957f64c299971
[ "MIT" ]
9
2017-01-27T00:07:33.000Z
2021-07-12T19:48:27.000Z
# Generated by Django 2.0 on 2018-06-05 12:08 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('djconnectwise', '0060_auto_20180605_0840'), ] operations = [ migrations.AlterModelOptions( name='team', options={'ordering': (...
21.388889
81
0.602597
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('djconnectwise', '0060_auto_20180605_0840'), ] operations = [ migrations.AlterModelOptions( name='team', options={'ordering': ('name', 'id'), 'verbose_name_plural': 'Teams'}...
true
true
f74cc3a80448c1bb51a9d66f2d6dd790533eb4cf
989
py
Python
api/app/schemas/theq/permission_schema.py
saravanpa-aot/queue-management
02264c0c02626ef0da4b1f8ad41375b296f42d06
[ "Apache-2.0" ]
1
2020-09-08T21:49:04.000Z
2020-09-08T21:49:04.000Z
api/app/schemas/theq/permission_schema.py
ChrisDMac/queue-management
3d9b83c82e07d538214c2bbeac037dbec5567588
[ "Apache-2.0" ]
3
2020-10-21T15:44:41.000Z
2020-12-03T17:49:47.000Z
api/app/schemas/theq/permission_schema.py
acoard-aot/queue-management
07023246b2adee315d9e954a82c6f0891017e2da
[ "Apache-2.0" ]
null
null
null
'''Copyright 2018 Province of British Columbia Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
30.90625
72
0.764408
import toastedmarshmallow from marshmallow import fields from app.models.theq import Permission from qsystem import ma class PermissionSchema(ma.SQLAlchemySchema): class Meta: model = Permission include_relationships = True load_instance = True jit = toastedmarshmallow.Jit p...
true
true
f74cc3dae53a873591df0a5f8f676fd93a75865f
26,385
py
Python
c7n/filters/core.py
nebed/cloud-custodian
ac3feeedb85458bb11836ed01e18289983ea00fb
[ "Apache-2.0" ]
1
2020-04-22T02:30:14.000Z
2020-04-22T02:30:14.000Z
c7n/filters/core.py
zavab/cloud-custodian
63efdc1dc7938f29440b1635668a0fa074f86b67
[ "Apache-2.0" ]
null
null
null
c7n/filters/core.py
zavab/cloud-custodian
63efdc1dc7938f29440b1635668a0fa074f86b67
[ "Apache-2.0" ]
null
null
null
# Copyright 2015-2018 Capital One Services, 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 ...
32.374233
100
0.586091
from __future__ import absolute_import, division, print_function, unicode_literals import copy import datetime from datetime import timedelta import fnmatch import ipaddress import logging import operator import re import sys import os from dateutil.tz import tzutc from dateutil.parser import parse from distutils imp...
true
true
f74cc54d1012bdc34fb68c3ec1453a8197f3385c
7,791
py
Python
docs/conf.py
bastih/banana
f9a4c784fb6eac1d7b247bb28b3a433517046511
[ "MIT" ]
3
2015-04-11T19:55:57.000Z
2021-01-09T18:14:57.000Z
docs/conf.py
bastih/banana
f9a4c784fb6eac1d7b247bb28b3a433517046511
[ "MIT" ]
null
null
null
docs/conf.py
bastih/banana
f9a4c784fb6eac1d7b247bb28b3a433517046511
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # FeinCMS documentation build configuration file, created by # sphinx-quickstart on Mon Aug 10 17:03:33 2009. # # 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. # # All...
36.069444
126
0.712874
import sys, os extensions = ['sphinx.ext.autodoc'] templates_path = ['_templates'] source_suffix = '.txt' source_encoding = 'utf-8' master_doc = 'index' project = u'Banana' copyright = u'2009, Banana contributors' # |version| and |release|, also used in various other places throughout the # built documents. #...
true
true
f74cc5f2a65a80b8c188d0b2d860a923080ef38b
1,126
py
Python
tendytrader/numeric/get_finance.py
Volhacks-III-Supreme-Team/tendytrader
9b91dc82f43bcc0a06d8ca6d66e4d465c78575e9
[ "MIT" ]
null
null
null
tendytrader/numeric/get_finance.py
Volhacks-III-Supreme-Team/tendytrader
9b91dc82f43bcc0a06d8ca6d66e4d465c78575e9
[ "MIT" ]
2
2018-09-30T04:44:34.000Z
2018-10-03T17:51:08.000Z
tendytrader/numeric/get_finance.py
Volhacks-III-Supreme-Team/tendytrader
9b91dc82f43bcc0a06d8ca6d66e4d465c78575e9
[ "MIT" ]
null
null
null
import datetime import resource from pandas_datareader import data as pdr import fix_yahoo_finance as yf from tickers import test_tickers def get_all_stock_data(start, end, threads=(int)(resource.RLIMIT_NPROC*0.25)): assert isinstance(start, datetime.datetime), "Error: start time must be datetime object" asse...
40.214286
92
0.715808
import datetime import resource from pandas_datareader import data as pdr import fix_yahoo_finance as yf from tickers import test_tickers def get_all_stock_data(start, end, threads=(int)(resource.RLIMIT_NPROC*0.25)): assert isinstance(start, datetime.datetime), "Error: start time must be datetime object" asse...
true
true
f74cc687ad0294c1cb478c36ec6caef291dee654
1,779
py
Python
setup.py
Forward83/staff_info
7ca2b4dd9abd50129252ae89d4c93fec73170c1f
[ "MIT" ]
null
null
null
setup.py
Forward83/staff_info
7ca2b4dd9abd50129252ae89d4c93fec73170c1f
[ "MIT" ]
null
null
null
setup.py
Forward83/staff_info
7ca2b4dd9abd50129252ae89d4c93fec73170c1f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = ['coverage==4.5.1', 'mock==2.0.0', 'my...
32.345455
145
0.636875
from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = ['coverage==4.5.1', 'mock==2.0.0', 'mysql-connector-python==8.0.11', 'nose==1.3.7', 'Pillow==5.1.0', ] set...
true
true
f74cc6b168c480e45c22f76f0bd1d33292d022de
3,079
py
Python
test/functional/wallet_keypool.py
CircuitProject/Circuit-Project
a186619d15f1fed2870f2fe69d1302b9ab22c5bc
[ "MIT" ]
2
2020-01-17T17:57:31.000Z
2020-10-30T00:48:23.000Z
test/functional/wallet_keypool.py
CircuitProject/Circuit-Project
a186619d15f1fed2870f2fe69d1302b9ab22c5bc
[ "MIT" ]
null
null
null
test/functional/wallet_keypool.py
CircuitProject/Circuit-Project
a186619d15f1fed2870f2fe69d1302b9ab22c5bc
[ "MIT" ]
2
2019-09-10T23:22:27.000Z
2020-12-12T02:21:38.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet keypool and interaction with wallet encryption/locking.""" from test_framework.test_fr...
38.012346
120
0.645664
from test_framework.test_framework import CircuitTestFramework from test_framework.util import * class KeyPoolTest(CircuitTestFramework): def set_test_params(self): self.num_nodes = 1 def run_test(self): nodes = self.nodes addr_before_encrypting = nodes[0].getnewaddress() addr...
true
true
f74cc7ad629bc36e54334b6fa6c15424df8cbc51
1,214
py
Python
py/pyanaconda/tf_straightline.py
YodaEmbedding/experiments
567c6a1c18fac2d951fe2af54aaa4917b7d529d2
[ "MIT" ]
null
null
null
py/pyanaconda/tf_straightline.py
YodaEmbedding/experiments
567c6a1c18fac2d951fe2af54aaa4917b7d529d2
[ "MIT" ]
null
null
null
py/pyanaconda/tf_straightline.py
YodaEmbedding/experiments
567c6a1c18fac2d951fe2af54aaa4917b7d529d2
[ "MIT" ]
null
null
null
# Fit a straight line, of the form y=m*x+b import tensorflow as tf xs = [0.00, 1.00, 2.00, 3.00, 4.00, 5.00, 6.00, 7.00] # Features ys = [-0.82, -0.94, -0.12, 0.26, 0.39, 0.64, 1.02, 1.00] # Labels """ with enough iterations, initial weights dont matter since our cost function is convex. """ m_initial = -0.5 # I...
25.829787
108
0.660626
import tensorflow as tf xs = [0.00, 1.00, 2.00, 3.00, 4.00, 5.00, 6.00, 7.00] ys = [-0.82, -0.94, -0.12, 0.26, 0.39, 0.64, 1.02, 1.00] m_initial = -0.5 b_initial = 1.0 m = tf.Variable(m_initial) b = tf.Variable(b_initial) error = 0.0 for i in range(len(xs)): y_model = m * xs[i] + b error += ( ...
true
true
f74cc803c10883f5f692aa626589bd70320d78f5
16,985
py
Python
main.py
SupinePandora43/gmod-manager
356abd7a4c6b4d284c8c34dee71d7e339bf76c81
[ "MIT" ]
1
2021-02-09T23:28:56.000Z
2021-02-09T23:28:56.000Z
main.py
SupinePandora43/gmod-manager
356abd7a4c6b4d284c8c34dee71d7e339bf76c81
[ "MIT" ]
1
2019-06-24T08:28:34.000Z
2019-06-24T08:28:34.000Z
main.py
SupinePandora43/gmod-manager
356abd7a4c6b4d284c8c34dee71d7e339bf76c81
[ "MIT" ]
3
2019-06-23T12:01:19.000Z
2021-02-22T16:44:14.000Z
import requests import os import argparse import json import lzma import subprocess import shutil import sys from configparser import ConfigParser parser = argparse.ArgumentParser( description='Tool for managing Gmod Steam content') parser.add_argument("-nogmad", help="for travis", action="store_true") parser.add_...
43
249
0.609243
import requests import os import argparse import json import lzma import subprocess import shutil import sys from configparser import ConfigParser parser = argparse.ArgumentParser( description='Tool for managing Gmod Steam content') parser.add_argument("-nogmad", help="for travis", action="store_true") parser.add_...
true
true
f74cc8c31c84f037431ee2757fcf70a43f0223e1
70,125
py
Python
Lib/enum.py
emsoftware/cpython
457ce60fc70f1c9290023f46fb82b6a490dff32e
[ "0BSD" ]
null
null
null
Lib/enum.py
emsoftware/cpython
457ce60fc70f1c9290023f46fb82b6a490dff32e
[ "0BSD" ]
5
2021-07-01T03:02:20.000Z
2022-03-01T03:03:48.000Z
Lib/enum.py
emsoftware/cpython
457ce60fc70f1c9290023f46fb82b6a490dff32e
[ "0BSD" ]
null
null
null
import sys from types import MappingProxyType, DynamicClassAttribute from builtins import property as _bltin_property, bin as _bltin_bin __all__ = [ 'EnumType', 'EnumMeta', 'Enum', 'IntEnum', 'StrEnum', 'Flag', 'IntFlag', 'auto', 'unique', 'property', 'verify', 'FlagBoundary', 'STRICT'...
38.936702
109
0.54795
import sys from types import MappingProxyType, DynamicClassAttribute from builtins import property as _bltin_property, bin as _bltin_bin __all__ = [ 'EnumType', 'EnumMeta', 'Enum', 'IntEnum', 'StrEnum', 'Flag', 'IntFlag', 'auto', 'unique', 'property', 'verify', 'FlagBoundary', 'STRICT'...
true
true
f74cc9fb12670dbb8430188dec4e7bd6ba61d303
7,492
py
Python
resources/gitfs.py
26618929/saltshaker_api
5ce1703b19f2339190ca5998cee5404716bcc177
[ "MIT" ]
null
null
null
resources/gitfs.py
26618929/saltshaker_api
5ce1703b19f2339190ca5998cee5404716bcc177
[ "MIT" ]
null
null
null
resources/gitfs.py
26618929/saltshaker_api
5ce1703b19f2339190ca5998cee5404716bcc177
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- from flask_restful import Resource, reqparse, request from fileserver.git_fs import gitlab_project from common.const import role_dict from common.log import loggers from common.sso import access_required from common.audit_log import audit_log from flask import g from resources.sls import delete_s...
38.030457
91
0.473972
from flask_restful import Resource, reqparse, request from fileserver.git_fs import gitlab_project from common.const import role_dict from common.log import loggers from common.sso import access_required from common.audit_log import audit_log from flask import g from resources.sls import delete_sls import base64 logge...
true
true
f74cca451636169176eeb02215d780a368a6fbb1
1,283
py
Python
interface/Play.py
ShellyDong/AlphaGo
fbc14d5a832acab853cff24a708b411f5d2e2555
[ "MIT" ]
8
2016-07-12T08:35:39.000Z
2022-03-15T09:28:02.000Z
interface/Play.py
lm18217762995/RocAlphaGo
04bac9c9d16c16c3baf16988ac761903a687d4de
[ "MIT" ]
3
2021-03-26T00:41:51.000Z
2022-02-10T03:31:38.000Z
interface/Play.py
lm18217762995/RocAlphaGo
04bac9c9d16c16c3baf16988ac761903a687d4de
[ "MIT" ]
6
2017-05-24T05:29:45.000Z
2022-02-27T15:00:20.000Z
"""Interface for AlphaGo self-play""" from AlphaGo.go import PASS, WHITE, GameState class play_match(object): """Interface to handle play between two players.""" def __init__(self, player1, player2, save_dir=None, size=19): # super(ClassName, self).__init__() self.player1 = player1 se...
35.638889
94
0.613406
from AlphaGo.go import PASS, WHITE, GameState class play_match(object): def __init__(self, player1, player2, save_dir=None, size=19): self.player1 = player1 self.player2 = player2 self.state = GameState(size=size) def _play(self, player): move = player...
true
true
f74ccacf380f5b6d0a1a6dbd76811db24dbbb597
9,074
py
Python
cromwell_tools/cli.py
kgalens/cromwell-tools
23c756a6c25c67ad4ccfacc6f8cf459bcacdac5f
[ "BSD-3-Clause" ]
null
null
null
cromwell_tools/cli.py
kgalens/cromwell-tools
23c756a6c25c67ad4ccfacc6f8cf459bcacdac5f
[ "BSD-3-Clause" ]
null
null
null
cromwell_tools/cli.py
kgalens/cromwell-tools
23c756a6c25c67ad4ccfacc6f8cf459bcacdac5f
[ "BSD-3-Clause" ]
null
null
null
import argparse import requests from cromwell_tools.cromwell_api import CromwellAPI from cromwell_tools.cromwell_auth import CromwellAuth from cromwell_tools.diag import task_runtime from cromwell_tools import __version__ diagnostic_index = { 'task_runtime': task_runtime.run } def parser(arguments=None): # ...
31.075342
141
0.612409
import argparse import requests from cromwell_tools.cromwell_api import CromwellAPI from cromwell_tools.cromwell_auth import CromwellAuth from cromwell_tools.diag import task_runtime from cromwell_tools import __version__ diagnostic_index = { 'task_runtime': task_runtime.run } def parser(arguments=None): ...
true
true
f74ccb72f30f7ea96cca83046165145b343d78e2
639
py
Python
server/src/models/user.py
Theo-Cheynel/centrale
65c0e2b12e3ea7f094badd4f2cfc601f7a1bf519
[ "MIT" ]
null
null
null
server/src/models/user.py
Theo-Cheynel/centrale
65c0e2b12e3ea7f094badd4f2cfc601f7a1bf519
[ "MIT" ]
null
null
null
server/src/models/user.py
Theo-Cheynel/centrale
65c0e2b12e3ea7f094badd4f2cfc601f7a1bf519
[ "MIT" ]
null
null
null
""" Define the User model """ from . import db from .abc import BaseModel, MetaBaseModel class User(db.Model, BaseModel, metaclass=MetaBaseModel): """ The User model """ __tablename__ = "user" key = db.Column(db.Integer, primary_key=True) first_name = db.Column(db.String(300), primary_key=False) ...
27.782609
61
0.658842
from . import db from .abc import BaseModel, MetaBaseModel class User(db.Model, BaseModel, metaclass=MetaBaseModel): __tablename__ = "user" key = db.Column(db.Integer, primary_key=True) first_name = db.Column(db.String(300), primary_key=False) last_name = db.Column(db.String(300), primary_key=False) ...
true
true
f74ccb87c75fccea0fbedac4f6dbd0e2f081bb1e
1,084
py
Python
tools/infra/builder-cache-clobber.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/infra/builder-cache-clobber.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/infra/builder-cache-clobber.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2021-01-05T23:43:46.000Z
2021-01-07T23:36:34.000Z
#!/usr/bin/env python # Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Clobbers all builder caches for a specific builder. Note that this currently does not support windows. """ import argparse import ...
27.794872
76
0.708487
import argparse import hashlib import sys import clobber_cache_utils def main(raw_args): parser = argparse.ArgumentParser() clobber_cache_utils.add_common_args(parser) parser.add_argument('--builder', required=True) parser.add_argument('--bucket', required=True) parser.add_argument('--project', default='...
true
true
f74ccbdb85394c4bc9f66312cdfb1114403351e8
11,462
py
Python
dataset/generator.py
CDInstitute/CompoNET.github.io
f978f31a78628c70b1033ed02a75de8a50aa905d
[ "MIT" ]
null
null
null
dataset/generator.py
CDInstitute/CompoNET.github.io
f978f31a78628c70b1033ed02a75de8a50aa905d
[ "MIT" ]
null
null
null
dataset/generator.py
CDInstitute/CompoNET.github.io
f978f31a78628c70b1033ed02a75de8a50aa905d
[ "MIT" ]
null
null
null
import bpy, bmesh from math import radians import numpy as np import os import random import sys sys.path.append("D:\ProgramFiles\Anaconda\envs\py37\Lib\site-packages") from pyntcloud import PyntCloud file_dir = os.path.dirname(__file__) sys.path.append(file_dir) from blender_utils import extrude, gancio, get_min_m...
29.314578
102
0.63776
import bpy, bmesh from math import radians import numpy as np import os import random import sys sys.path.append("D:\ProgramFiles\Anaconda\envs\py37\Lib\site-packages") from pyntcloud import PyntCloud file_dir = os.path.dirname(__file__) sys.path.append(file_dir) from blender_utils import extrude, gancio, get_min_m...
true
true
f74ccd2199549d30788c9b0bbb2b5de2f1e7514c
2,935
py
Python
bifrost/bifrost/stonne/ops/matmul.py
axelstjerngren/bifrost
78f46d51b51b2ea6e4aa62336c052217700d7d35
[ "MIT" ]
1
2021-08-30T22:28:57.000Z
2021-08-30T22:28:57.000Z
bifrost/bifrost/stonne/ops/matmul.py
axelstjerngren/bifrost
78f46d51b51b2ea6e4aa62336c052217700d7d35
[ "MIT" ]
null
null
null
bifrost/bifrost/stonne/ops/matmul.py
axelstjerngren/bifrost
78f46d51b51b2ea6e4aa62336c052217700d7d35
[ "MIT" ]
null
null
null
""" Register everything to do with matmul """ import tvm from tvm import te, relay, autotvm from tvm.topi import generic import tvm.relay.op as _op from tvm.relay.op.strategy.generic import * import os from ..simulator import architecture from ..tiles import tiles from tvm.auto_scheduler import is_auto_scheduler_enabl...
33.352273
71
0.632368
import tvm from tvm import te, relay, autotvm from tvm.topi import generic import tvm.relay.op as _op from tvm.relay.op.strategy.generic import * import os from ..simulator import architecture from ..tiles import tiles from tvm.auto_scheduler import is_auto_scheduler_enabled from tvm.te import SpecializedCondition @a...
true
true
f74ccdda396e946d307802b276033960ac5bbf1d
4,406
py
Python
cunet/ftanet/network/ftanet.py
genisplaja/cunet
58a200c84810f20099265e30200327eefddb3eff
[ "AFL-3.0" ]
null
null
null
cunet/ftanet/network/ftanet.py
genisplaja/cunet
58a200c84810f20099265e30200327eefddb3eff
[ "AFL-3.0" ]
null
null
null
cunet/ftanet/network/ftanet.py
genisplaja/cunet
58a200c84810f20099265e30200327eefddb3eff
[ "AFL-3.0" ]
null
null
null
import tensorflow as tf from tensorflow.keras import backend as K from tensorflow.keras import Input, Model from tensorflow.keras.layers import Dense, Conv2D, BatchNormalization, Dropout, Lambda, \ GlobalAveragePooling2D, Activation, MaxPooling2D, AveragePooling2D, \ Concatenate, Add, Multiply, Softmax, Re...
36.716667
90
0.568997
import tensorflow as tf from tensorflow.keras import backend as K from tensorflow.keras import Input, Model from tensorflow.keras.layers import Dense, Conv2D, BatchNormalization, Dropout, Lambda, \ GlobalAveragePooling2D, Activation, MaxPooling2D, AveragePooling2D, \ Concatenate, Add, Multiply, Softmax, Re...
true
true
f74cce4f554dac06efdac24bf1049bc852f01ca9
531
py
Python
plotly/validators/layout/scene/zaxis/_showtickprefix.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/layout/scene/zaxis/_showtickprefix.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/validators/layout/scene/zaxis/_showtickprefix.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class ShowtickprefixValidator( _plotly_utils.basevalidators.EnumeratedValidator ): def __init__( self, plotly_name='showtickprefix', parent_name='layout.scene.zaxis', **kwargs ): super(ShowtickprefixValidator, self).__init__( ...
24.136364
54
0.591337
import _plotly_utils.basevalidators class ShowtickprefixValidator( _plotly_utils.basevalidators.EnumeratedValidator ): def __init__( self, plotly_name='showtickprefix', parent_name='layout.scene.zaxis', **kwargs ): super(ShowtickprefixValidator, self).__init__( ...
true
true
f74ccfcf45c03426fb4800307e49019a3f56450c
22,845
py
Python
code/descriptor_track/train_eval/make_n_perquery_df_gpu.py
seungkee/2nd-place-solution-to-facebook-image-similarity-matching-track
716667bf416239f448e4ea2730a2cc5146536719
[ "Apache-2.0" ]
13
2021-12-07T17:15:10.000Z
2022-02-23T08:45:58.000Z
code/descriptor_track/train_eval/make_n_perquery_df_gpu.py
seungkee/2nd-place-solution-to-facebook-image-similarity-matching-track
716667bf416239f448e4ea2730a2cc5146536719
[ "Apache-2.0" ]
2
2021-12-16T14:33:10.000Z
2021-12-28T07:15:33.000Z
code/descriptor_track/train_eval/make_n_perquery_df_gpu.py
seungkee/2nd-place-solution-to-facebook-image-similarity-matching-track
716667bf416239f448e4ea2730a2cc5146536719
[ "Apache-2.0" ]
4
2021-12-08T07:52:28.000Z
2022-03-29T05:50:38.000Z
import cv2 import os import random import time import torch import torch.backends.cudnn as cudnn import models from utils.logger import Logger import myexman from utils import utils import sys import torch.multiprocessing as mp import torch.distributed as dist import socket from torchvision import transforms,datasets f...
40.505319
136
0.627052
import cv2 import os import random import time import torch import torch.backends.cudnn as cudnn import models from utils.logger import Logger import myexman from utils import utils import sys import torch.multiprocessing as mp import torch.distributed as dist import socket from torchvision import transforms,datasets f...
true
true
f74cd0578361714907ccc99e150e397680db4464
305
py
Python
data/multilingual/Latn.INA/Serif_16/pdf_to_json_test_Latn.INA_Serif_16.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
1
2021-09-19T19:47:35.000Z
2021-09-19T19:47:35.000Z
data/multilingual/Latn.INA/Serif_16/pdf_to_json_test_Latn.INA_Serif_16.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
data/multilingual/Latn.INA/Serif_16/pdf_to_json_test_Latn.INA_Serif_16.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.INA/Serif_16/udhr_Latn.INA_Serif_16.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
30.5
75
0.813115
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.INA/Serif_16/udhr_Latn.INA_Serif_16.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
true
true