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
f73da7bb4672fcd42fa69782e781e23c094a5b01
452
py
Python
idealista-scraper/auto/call.py
Kwsswart/scraper
1e04df1ef097d0ad2301ad3fa0ae299402ec1d2f
[ "MIT" ]
null
null
null
idealista-scraper/auto/call.py
Kwsswart/scraper
1e04df1ef097d0ad2301ad3fa0ae299402ec1d2f
[ "MIT" ]
null
null
null
idealista-scraper/auto/call.py
Kwsswart/scraper
1e04df1ef097d0ad2301ad3fa0ae299402ec1d2f
[ "MIT" ]
null
null
null
from random import randint from scraper import Scraper from time import sleep def main(): url = "https://www.idealista.com/alquiler-viviendas/santa-cruz-de-tenerife/centro-ifara/centro/" a = Scraper(url) for i in range(len(a.links)): a.get_page() print(len(a.links)) print(len(a.da...
21.52381
100
0.619469
from random import randint from scraper import Scraper from time import sleep def main(): url = "https://www.idealista.com/alquiler-viviendas/santa-cruz-de-tenerife/centro-ifara/centro/" a = Scraper(url) for i in range(len(a.links)): a.get_page() print(len(a.links)) print(len(a.da...
true
true
f73da99dfaed82dd63b5f9de566a5f192e4ff623
6,561
py
Python
applications/tensorflow/detection/yolov3/log.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
260
2019-11-18T01:50:00.000Z
2022-03-28T23:08:53.000Z
applications/tensorflow/detection/yolov3/log.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
27
2020-01-28T23:07:50.000Z
2022-02-14T15:37:06.000Z
applications/tensorflow/detection/yolov3/log.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
56
2019-11-18T02:13:12.000Z
2022-02-28T14:36:09.000Z
# Copyright (c) 2021 Graphcore 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 by applicable l...
34.171875
104
0.673373
import csv import datetime import json import logging import os import random import subprocess import numpy as np import tensorflow as tf from tensorflow import pywrap_tensorflow logFormatter = logging.Formatter( '%(asctime)s.%(msecs)06d: %(levelname)-1.1s %(message)s', datefmt='%Y-%m-%d %H:%M:%S...
true
true
f73da9bd3c45d828f774d8b42d5bd71f5c855faa
8,575
py
Python
docs/tools/website.py
KinderRiven/ClickHouse
2edc03b3d4a950848720064db82f11581b2e8d8a
[ "Apache-2.0" ]
8,629
2016-06-14T21:03:01.000Z
2019-09-23T07:46:38.000Z
docs/tools/website.py
KinderRiven/ClickHouse
2edc03b3d4a950848720064db82f11581b2e8d8a
[ "Apache-2.0" ]
4,335
2016-06-15T12:58:31.000Z
2019-09-23T11:18:43.000Z
docs/tools/website.py
KinderRiven/ClickHouse
2edc03b3d4a950848720064db82f11581b2e8d8a
[ "Apache-2.0" ]
1,700
2016-06-15T09:25:11.000Z
2019-09-23T11:16:38.000Z
import hashlib import json import logging import os import shutil import subprocess import bs4 import util def handle_iframe(iframe, soup): allowed_domains = ["https://www.youtube.com/"] illegal_domain = True iframe_src = iframe.attrs["src"] for domain in allowed_domains: if iframe_src.start...
32.481061
83
0.552536
import hashlib import json import logging import os import shutil import subprocess import bs4 import util def handle_iframe(iframe, soup): allowed_domains = ["https://www.youtube.com/"] illegal_domain = True iframe_src = iframe.attrs["src"] for domain in allowed_domains: if iframe_src.start...
true
true
f73daa3b803904b24609179625d3defeaf2a42cf
1,596
py
Python
test/test_geometry/test_line2d.py
alisianoi/algos-py
c99747b2ce6976f2509fd183bf71040e6f988b77
[ "MIT" ]
6
2018-12-31T19:46:58.000Z
2020-11-17T11:32:27.000Z
test/test_geometry/test_line2d.py
algos-all/algos-py
b275da8d9f6cdf63d854a2712ada08a069421a74
[ "MIT" ]
152
2018-01-05T00:08:38.000Z
2020-12-12T22:37:52.000Z
test/test_geometry/test_line2d.py
alisianoi/algos-py
c99747b2ce6976f2509fd183bf71040e6f988b77
[ "MIT" ]
null
null
null
import pytest from src.geometry.line2d import standard_line def test_standard_line_0(): # One point is not enough to form a line for i in range(-10, 11): for j in range(-10, 11): A, B, C = standard_line(i, j, i, j) assert A == 0 and B == 0 and C == 0 @pytest.mark.parametrize(...
25.741935
58
0.489348
import pytest from src.geometry.line2d import standard_line def test_standard_line_0(): for i in range(-10, 11): for j in range(-10, 11): A, B, C = standard_line(i, j, i, j) assert A == 0 and B == 0 and C == 0 @pytest.mark.parametrize("points", [ [(0, 0), (1, 1)], [(1, 1...
true
true
f73dab42c4962c6e911448f41f8488b03e796eea
1,609
py
Python
surf/script_tab.py
githmy/vnpymy
f6a172629f0961bea13e9f10c8fc47de225094ec
[ "MIT" ]
1
2021-04-09T06:46:35.000Z
2021-04-09T06:46:35.000Z
surf/script_tab.py
githmy/vnpymy
f6a172629f0961bea13e9f10c8fc47de225094ec
[ "MIT" ]
1
2021-12-31T02:38:36.000Z
2021-12-31T02:38:36.000Z
surf/script_tab.py
githmy/vnpymy
f6a172629f0961bea13e9f10c8fc47de225094ec
[ "MIT" ]
1
2021-06-27T12:13:47.000Z
2021-06-27T12:13:47.000Z
# sector = [ "stock", "fund" ] keytab = { "功能": [ "项目设置", "重启", "中止", "数据处理", "训练拆分", "序列特征", "数据运算", "数据合并", "数据复制", "数据提取", "训练拟合", "数据预测", "回测分析", "图形展示", ], "项目设置": { "位置": "",...
17.117021
75
0.252331
sector = [ "stock", "fund" ] keytab = { "功能": [ "项目设置", "重启", "中止", "数据处理", "训练拆分", "序列特征", "数据运算", "数据合并", "数据复制", "数据提取", "训练拟合", "数据预测", "回测分析", "图形展示", ], "项目设置": { "位置": "", ...
true
true
f73dac9bb61cd767e7d6b014f56eb13521640cbc
8,590
py
Python
viper/modules/pdf.py
Mario-Kart-Felix/mal-scrap
bc396a15ea5b144eb1c0f05759d1f9419d6671df
[ "BSD-3-Clause" ]
2
2015-12-17T20:25:09.000Z
2017-10-08T19:14:57.000Z
viper/modules/pdf.py
Mario-Kart-Felix/mal-scrap
bc396a15ea5b144eb1c0f05759d1f9419d6671df
[ "BSD-3-Clause" ]
1
2015-01-05T18:07:13.000Z
2015-01-07T21:43:57.000Z
viper/modules/pdf.py
Mario-Kart-Felix/mal-scrap
bc396a15ea5b144eb1c0f05759d1f9419d6671df
[ "BSD-3-Clause" ]
3
2017-10-18T00:56:53.000Z
2020-05-24T09:38:54.000Z
# -*- coding: utf-8 -*- # This file is part of Viper - https://github.com/viper-framework/viper # See the file 'LICENSE' for copying permission. import os import json import tempfile from viper.common.abstracts import Module from viper.core.session import __sessions__ from .pdftools.pdfid import PDFiD, PDFiD2JSON fr...
39.40367
111
0.526542
import os import json import tempfile from viper.common.abstracts import Module from viper.core.session import __sessions__ from .pdftools.pdfid import PDFiD, PDFiD2JSON from .pdftools import (cPDFParser, PDF_ELEMENT_COMMENT, PDF_ELEMENT_INDIRECT_OBJECT, PDF_ELEMENT_XREF, PDF_ELEMENT_TRAILE...
true
true
f73daccb645210cdbd0b3f1890cb813ecec2676b
18,855
py
Python
mmseg/models/decode_heads/knet_head.py
rehohoho/mmsegmentation
a73ae7a421e07741fda62c9d81b335cbc4b7f7d6
[ "Apache-2.0" ]
1
2022-03-07T19:46:03.000Z
2022-03-07T19:46:03.000Z
mmseg/models/decode_heads/knet_head.py
rehohoho/mmsegmentation
a73ae7a421e07741fda62c9d81b335cbc4b7f7d6
[ "Apache-2.0" ]
2
2022-02-25T03:07:23.000Z
2022-03-08T12:54:05.000Z
mmseg/models/decode_heads/knet_head.py
rehohoho/mmsegmentation
a73ae7a421e07741fda62c9d81b335cbc4b7f7d6
[ "Apache-2.0" ]
1
2022-01-04T01:16:12.000Z
2022-01-04T01:16:12.000Z
# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule, build_activation_layer, build_norm_layer from mmcv.cnn.bricks.transformer import (FFN, TRANSFORMER_LAYER, MultiheadAttention, ...
41.530837
79
0.596022
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule, build_activation_layer, build_norm_layer from mmcv.cnn.bricks.transformer import (FFN, TRANSFORMER_LAYER, MultiheadAttention, build_trans...
true
true
f73dae4b53ec2c161693f06b78677f806ac9f816
2,258
py
Python
euler/tools/generate_euler_data.py
timpcfan/euler
c2a71faae59c1495b6dabcf6aec0acb4d93a7bb1
[ "Apache-2.0" ]
2,829
2019-01-12T09:16:03.000Z
2022-03-29T14:00:58.000Z
euler/tools/generate_euler_data.py
timpcfan/euler
c2a71faae59c1495b6dabcf6aec0acb4d93a7bb1
[ "Apache-2.0" ]
331
2019-01-17T21:07:49.000Z
2022-03-30T06:38:17.000Z
euler/tools/generate_euler_data.py
timpcfan/euler
c2a71faae59c1495b6dabcf6aec0acb4d93a7bb1
[ "Apache-2.0" ]
578
2019-01-16T10:48:53.000Z
2022-03-21T13:41:34.000Z
# Copyright 2020 Alibaba Group Holding Limited. 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 ...
35.84127
80
0.634632
from __future__ import absolute_import from __future__ import division from __future__ import print_function from euler.tools.json2meta import Generator from euler.tools.json2partdat import Converter as DatConverter from euler.tools.json2partindex import Converter as IndexConverter import os import sys...
true
true
f73daed22d722fc401139e28b3873a3ec1a66e9e
2,941
py
Python
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl/writer/strings.py
kokosing/hue
2307f5379a35aae9be871e836432e6f45138b3d9
[ "Apache-2.0" ]
11
2019-03-20T07:38:35.000Z
2021-06-18T09:42:46.000Z
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl/writer/strings.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
80
2018-04-13T13:46:24.000Z
2022-02-16T16:01:46.000Z
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl/writer/strings.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
6
2018-06-06T19:55:32.000Z
2021-09-30T15:16:40.000Z
# file openpyxl/writer/strings.py # Copyright (c) 2010 openpyxl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy,...
33.804598
79
0.67494
from ....compat import BytesIO as StringIO from ..shared.xmltools import start_tag, end_tag, tag, XMLGenerator def create_string_table(workbook): strings = set() for sheet in workbook.worksheets: for cell in sheet.get_cell_collection(): if cell.data_type == cel...
true
true
f73daeee5b60e7b1777cb98999b129b6a59c4f52
302
py
Python
vaxthesat/python/vax_generator/vax_generator/__main__.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
75
2020-07-20T20:54:00.000Z
2022-03-09T09:18:37.000Z
vaxthesat/python/vax_generator/vax_generator/__main__.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
3
2020-09-13T00:46:49.000Z
2021-07-06T16:18:22.000Z
vaxthesat/python/vax_generator/vax_generator/__main__.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
14
2020-07-22T16:34:51.000Z
2021-09-13T12:19:59.000Z
import logging import sys from vax_common.vax_config import get_config from vax_generator.vax_generator import VaxGenerator logging.basicConfig(stream=sys.stderr, level=logging.INFO) def main(): generator = VaxGenerator(get_config()) generator.run() if __name__ == "__main__": main()
17.764706
58
0.764901
import logging import sys from vax_common.vax_config import get_config from vax_generator.vax_generator import VaxGenerator logging.basicConfig(stream=sys.stderr, level=logging.INFO) def main(): generator = VaxGenerator(get_config()) generator.run() if __name__ == "__main__": main()
true
true
f73dafb5471d095abbf2136a78f1f9ed0d71576d
6,789
py
Python
lib/services/vloadbalancer/ncloud_vloadbalancer/model/get_load_balancer_instance_list_response.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
12
2018-11-20T04:30:49.000Z
2021-11-09T12:34:26.000Z
lib/services/vloadbalancer/ncloud_vloadbalancer/model/get_load_balancer_instance_list_response.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
1
2019-01-24T15:56:15.000Z
2019-05-31T07:56:55.000Z
lib/services/vloadbalancer/ncloud_vloadbalancer/model/get_load_balancer_instance_list_response.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
6
2018-06-29T03:45:50.000Z
2022-03-18T01:51:45.000Z
# coding: utf-8 """ vloadbalancer Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from ncloud_vloadbalancer.model.load_balancer_instance import LoadBalancerInstance # noqa: F401,E501 class GetLoadBalancerInstanceListResponse(obj...
31.430556
144
0.644278
import pprint import re import six from ncloud_vloadbalancer.model.load_balancer_instance import LoadBalancerInstance class GetLoadBalancerInstanceListResponse(object): swagger_types = { 'request_id': 'str', 'return_code': 'str', 'return_message': 'str', 'total_rows': 'i...
true
true
f73db073fbc6af5b294207e83405f9a180fcc696
216
py
Python
crediapp/crediapp/doctype/analisis_capital/test_analisis_capital.py
edwinorlando83/crediapp
111e8472b7d13bc553a9ebf660b0f97c34e87164
[ "MIT" ]
null
null
null
crediapp/crediapp/doctype/analisis_capital/test_analisis_capital.py
edwinorlando83/crediapp
111e8472b7d13bc553a9ebf660b0f97c34e87164
[ "MIT" ]
null
null
null
crediapp/crediapp/doctype/analisis_capital/test_analisis_capital.py
edwinorlando83/crediapp
111e8472b7d13bc553a9ebf660b0f97c34e87164
[ "MIT" ]
2
2021-05-06T14:59:24.000Z
2021-08-20T21:21:20.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2021, orlando and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class Testanalisis_capital(unittest.TestCase): pass
19.636364
46
0.768519
from __future__ import unicode_literals import unittest class Testanalisis_capital(unittest.TestCase): pass
true
true
f73db2266a5aeca052487d18b4c21435dc002cb0
19,155
py
Python
.jupyter/jupyter_notebook_config.py
elsdrium/.unix_settings
1c3cf9dfc9a4a465178d22c82f3a05f380cda926
[ "MIT" ]
5
2016-11-06T07:17:08.000Z
2019-02-24T11:15:23.000Z
.jupyter/jupyter_notebook_config.py
elsdrium/.unix_settings
1c3cf9dfc9a4a465178d22c82f3a05f380cda926
[ "MIT" ]
null
null
null
.jupyter/jupyter_notebook_config.py
elsdrium/.unix_settings
1c3cf9dfc9a4a465178d22c82f3a05f380cda926
[ "MIT" ]
null
null
null
# Configuration file for jupyter-notebook. #------------------------------------------------------------------------------ # Configurable configuration #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ # Sing...
36.836538
109
0.668755
# # Should be in the form of an HTTP origin: ws[s]://hostname[:port] # c.NotebookApp.websocket_url = '' # DEPRECATED use base_url # c.NotebookApp.base_project_url = '/' # The base URL for the notebook server. # # Leading and trailing slashes can be ...
true
true
f73db2b8c9c24c124f2df232ed47a7c74213aabe
465
py
Python
instagram/migrations/0006_comment_username.py
israelwangila/insta
48653270edd60aabe7d4a42c24032709c2d86c10
[ "MIT" ]
4
2020-01-29T04:43:58.000Z
2022-03-06T02:50:37.000Z
instagram/migrations/0006_comment_username.py
israelwangila/insta
48653270edd60aabe7d4a42c24032709c2d86c10
[ "MIT" ]
4
2021-03-19T00:43:44.000Z
2021-09-08T01:00:15.000Z
instagram/migrations/0006_comment_username.py
israelwangila/insta
48653270edd60aabe7d4a42c24032709c2d86c10
[ "MIT" ]
7
2020-02-20T06:03:03.000Z
2022-03-11T02:57:41.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-05-23 13:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('instagram', '0005_auto_20190523_1540'), ] operations = [ migrations.AddField(...
22.142857
63
0.623656
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('instagram', '0005_auto_20190523_1540'), ] operations = [ migrations.AddField( model_name='comment', name='username', ...
true
true
f73db3e4eff7bf7f250f3b85d9937d14e39434d1
14,859
py
Python
codalab/worker/main.py
ana13S/codalab-worksheets
3f839dbe92e505a94ddc627ffab9cfea621cb2d1
[ "Apache-2.0" ]
null
null
null
codalab/worker/main.py
ana13S/codalab-worksheets
3f839dbe92e505a94ddc627ffab9cfea621cb2d1
[ "Apache-2.0" ]
null
null
null
codalab/worker/main.py
ana13S/codalab-worksheets
3f839dbe92e505a94ddc627ffab9cfea621cb2d1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # For information about the design of the worker, see design.pdf in the same # directory as this file. For information about running a worker, see the # tutorial on the CodaLab documentation. import argparse import getpass import os import logging import signal import socket import stat import s...
35.978208
119
0.63941
import argparse import getpass import os import logging import signal import socket import stat import sys import psutil import requests from codalab.common import SingularityError from codalab.lib.formatting import parse_size from codalab.lib.telemetry_util import initialize_sentry, load_sentry_data, using_sentr...
true
true
f73db49a5d63d3e71b4e8e7f71b35b7760e34700
15,116
py
Python
captoolkit/readgla12.py
tsutterley/captoolkit
314c4d34f49012c25286478c943b0ab13c893c62
[ "Apache-2.0" ]
37
2019-09-27T00:36:16.000Z
2022-01-31T01:51:19.000Z
captoolkit/readgla12.py
tsutterley/captoolkit
314c4d34f49012c25286478c943b0ab13c893c62
[ "Apache-2.0" ]
3
2020-02-27T21:22:50.000Z
2020-10-14T01:31:26.000Z
captoolkit/readgla12.py
tsutterley/captoolkit
314c4d34f49012c25286478c943b0ab13c893c62
[ "Apache-2.0" ]
15
2019-09-24T08:06:49.000Z
2021-11-03T14:44:19.000Z
#!/usr/bin/env python """ Reads GLA12 Release 634 HDF5. Reads several files in parallel if njobs > 1 is specified. Extracts a subset of the data based on a mask.tif file. Example: python readgla.py /mnt/devon-r0/shared_data/icesat/GLAH12.034/ /mnt/devon-r0/shared_data/i...
31.039014
180
0.546705
import os import sys import h5py import pyproj import numpy as np import matplotlib.pyplot as plt from joblib import Parallel, delayed from gdalconst import * from osgeo import gdal, osr from scipy.ndimage import map_coordinates def geotiffread(ifile,metaData): file = gdal.Open(ifile, GA_Rea...
true
true
f73db4de47a20be629ea257ee658b17d1279217d
4,289
py
Python
src/interactive_conditional_samples.py
mathyouf/GPT-Games
bf6e558bf6ec92d1fba97770587610da0f3447eb
[ "MIT" ]
null
null
null
src/interactive_conditional_samples.py
mathyouf/GPT-Games
bf6e558bf6ec92d1fba97770587610da0f3447eb
[ "MIT" ]
null
null
null
src/interactive_conditional_samples.py
mathyouf/GPT-Games
bf6e558bf6ec92d1fba97770587610da0f3447eb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import fire import json import os import re import numpy as np import tensorflow as tf import model, sample, encoder def modify_raw_text(raw_text, interviewer, interviewee): return interviewer+": \"" + raw_text + "\" "+ interviewee +":\"" def interact_model( model_name='124M', see...
39.712963
92
0.600373
import fire import json import os import re import numpy as np import tensorflow as tf import model, sample, encoder def modify_raw_text(raw_text, interviewer, interviewee): return interviewer+": \"" + raw_text + "\" "+ interviewee +":\"" def interact_model( model_name='124M', seed=None, nsamples=1...
true
true
f73db598f3ff18207f79581af2c746e66ab19135
18,256
py
Python
nova/objects/base.py
bopopescu/nova-38
93526327b4eb627e981eb7f24f8fac3dc3ed3fab
[ "Apache-2.0" ]
null
null
null
nova/objects/base.py
bopopescu/nova-38
93526327b4eb627e981eb7f24f8fac3dc3ed3fab
[ "Apache-2.0" ]
null
null
null
nova/objects/base.py
bopopescu/nova-38
93526327b4eb627e981eb7f24f8fac3dc3ed3fab
[ "Apache-2.0" ]
1
2020-07-24T09:32:37.000Z
2020-07-24T09:32:37.000Z
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
37.105691
79
0.637599
import collections from nova import context from nova import exception from nova.objects import utils as obj_utils from nova.openstack.common import log as logging from nova.openstack.common.rpc import common as rpc_common import nova.openstack.common.rpc.dispatcher import nova.openstack.common.rpc.prox...
true
true
f73db5a98392c6ebea5629c45055e023ca7833f4
14,126
py
Python
spike/TwitterMonitor/ConnectTwitterAPI.py
jian-frank-cao/spike
a02f6d26f8705c79104110b07263f69199325093
[ "MIT" ]
null
null
null
spike/TwitterMonitor/ConnectTwitterAPI.py
jian-frank-cao/spike
a02f6d26f8705c79104110b07263f69199325093
[ "MIT" ]
null
null
null
spike/TwitterMonitor/ConnectTwitterAPI.py
jian-frank-cao/spike
a02f6d26f8705c79104110b07263f69199325093
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Jan 28 09:28:54 2021 @author: Jian Cao Collect Tweets from Twitter API (Stream, REST, Lab-COVID19) """ ## Set environment ------------------------------------------------------------ # import os import time import json import requests import uuid import multiprocessing from...
40.944928
105
0.517698
rom datetime import datetime, timedelta from requests import HTTPError, ConnectionError from TwitterAPI import TwitterAPI, TwitterConnectionError, TwitterRequestError ecret, access_token_key, access_token_secret): if (not consumer_key or not consumer_secret or not access_tok...
true
true
f73db5c5f482730356afe4792b42e6a6560996bd
588
py
Python
cxroots/tests/test_deriv.py
rparini/cxroots
037247fc47b29781b9cc66857a8395283e8ecc86
[ "BSD-3-Clause" ]
10
2017-10-28T18:15:35.000Z
2022-02-10T01:44:34.000Z
cxroots/tests/test_deriv.py
rparini/cxroots
037247fc47b29781b9cc66857a8395283e8ecc86
[ "BSD-3-Clause" ]
50
2019-04-11T19:15:07.000Z
2022-02-14T20:25:08.000Z
cxroots/tests/test_deriv.py
rparini/cxroots
037247fc47b29781b9cc66857a8395283e8ecc86
[ "BSD-3-Clause" ]
1
2019-04-11T12:38:29.000Z
2019-04-11T12:38:29.000Z
import pytest import numpy as np from numpy import cos, sin from cxroots import Circle, Rectangle from cxroots import CxDerivative @pytest.mark.parametrize('C', [ pytest.param(Circle(0, 2), id='circle'), pytest.param(Rectangle([-1.5,1.5],[-2,2]), id='rect'), pytest.param(None, id='default') ]) def test_Cx...
28
75
0.615646
import pytest import numpy as np from numpy import cos, sin from cxroots import Circle, Rectangle from cxroots import CxDerivative @pytest.mark.parametrize('C', [ pytest.param(Circle(0, 2), id='circle'), pytest.param(Rectangle([-1.5,1.5],[-2,2]), id='rect'), pytest.param(None, id='default') ]) def test_Cx...
true
true
f73db6bec758f45a41ffa8dda0c1f75354e82d9c
9,043
py
Python
fhirpathpy/engine/evaluators/__init__.py
beda-software/fhirpath-py
aaac1a4209e3e3cbce6f62246c0822c6cdaf5af5
[ "MIT" ]
9
2020-08-13T18:54:39.000Z
2022-03-03T01:26:44.000Z
fhirpathpy/engine/evaluators/__init__.py
beda-software/fhirpath-py
aaac1a4209e3e3cbce6f62246c0822c6cdaf5af5
[ "MIT" ]
6
2020-05-05T06:19:30.000Z
2021-12-02T07:31:21.000Z
fhirpathpy/engine/evaluators/__init__.py
beda-software/fhirpath-py
aaac1a4209e3e3cbce6f62246c0822c6cdaf5af5
[ "MIT" ]
3
2020-07-15T08:25:46.000Z
2021-09-15T16:56:06.000Z
from functools import reduce import re import json import fhirpathpy.engine as engine import fhirpathpy.engine.util as util import fhirpathpy.engine.nodes as nodes def boolean_literal(ctx, parentData, node): if node["text"] == "true": return [True] return [False] def number_literal(ctx, parentData,...
28.347962
88
0.630543
from functools import reduce import re import json import fhirpathpy.engine as engine import fhirpathpy.engine.util as util import fhirpathpy.engine.nodes as nodes def boolean_literal(ctx, parentData, node): if node["text"] == "true": return [True] return [False] def number_literal(ctx, parentData,...
true
true
f73db6e05fc9765276202e6de527c63c0343eae1
13,178
py
Python
tests/checks/mock/test_sysstat.py
Mattlk13/dd-agent
167d0c0ed8d7b66a531dd0c21097f0fa2fba8960
[ "BSD-3-Clause" ]
1,172
2015-01-04T21:56:16.000Z
2022-03-13T00:01:44.000Z
tests/checks/mock/test_sysstat.py
Mattlk13/dd-agent
167d0c0ed8d7b66a531dd0c21097f0fa2fba8960
[ "BSD-3-Clause" ]
2,086
2015-01-02T16:33:21.000Z
2022-03-15T10:01:47.000Z
tests/checks/mock/test_sysstat.py
Mattlk13/dd-agent
167d0c0ed8d7b66a531dd0c21097f0fa2fba8960
[ "BSD-3-Clause" ]
972
2015-01-02T05:03:46.000Z
2022-03-23T04:36:19.000Z
# stdlib import logging import sys import unittest import mock # project from checks.system.unix import ( IO, Load, Memory, ) from checks.system.unix import System from config import get_system_stats from utils.platform import Platform logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__...
45.916376
189
0.532934
import logging import sys import unittest import mock from checks.system.unix import ( IO, Load, Memory, ) from checks.system.unix import System from config import get_system_stats from utils.platform import Platform logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__file__) class T...
true
true
f73db710ced49724733324912f22c9b331229261
9,716
py
Python
src/utils.py
nicholasphair/iot-inspector-client
165a02b0210d7bf55513a9c205e0a61accf03888
[ "MIT" ]
null
null
null
src/utils.py
nicholasphair/iot-inspector-client
165a02b0210d7bf55513a9c205e0a61accf03888
[ "MIT" ]
null
null
null
src/utils.py
nicholasphair/iot-inspector-client
165a02b0210d7bf55513a9c205e0a61accf03888
[ "MIT" ]
null
null
null
""" Misc functions. """ import ipaddress import datetime import hashlib import json import netaddr import netifaces import os import re import requests import scapy.all as sc import socket import subprocess import sys import threading import time import traceback import uuid import webbrowser import server_config ...
23.188544
84
0.616097
import ipaddress import datetime import hashlib import json import netaddr import netifaces import os import re import requests import scapy.all as sc import socket import subprocess import sys import threading import time import traceback import uuid import webbrowser import server_config IPv4_REGEX = re.compile(r...
true
true
f73db7538a0f6afa8557fa9495c4d50bd138351a
3,539
py
Python
scripts/models/01_prepare_and_save_models.py
kingagla/reviews_classification
9bf9636035bf14fb3ce151d075a6c04f4cdbfde6
[ "MIT" ]
3
2021-04-07T04:05:33.000Z
2021-12-09T12:57:43.000Z
scripts/models/01_prepare_and_save_models.py
kingagla/reviews_classification
9bf9636035bf14fb3ce151d075a6c04f4cdbfde6
[ "MIT" ]
1
2021-07-30T20:43:34.000Z
2021-07-30T20:43:34.000Z
scripts/models/01_prepare_and_save_models.py
kingagla/reviews_classification
9bf9636035bf14fb3ce151d075a6c04f4cdbfde6
[ "MIT" ]
null
null
null
import os import pickle import pandas as pd from sklearn.cluster import DBSCAN from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import classification_report from sklearn.preprocessing import LabelEncoder from tensorflow.keras.callbacks import ModelCheckpoint from tensorflow.keras.layers import D...
39.322222
109
0.693134
import os import pickle import pandas as pd from sklearn.cluster import DBSCAN from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import classification_report from sklearn.preprocessing import LabelEncoder from tensorflow.keras.callbacks import ModelCheckpoint from tensorflow.keras.layers import D...
true
true
f73db7da7b2faa63f87c36a9e1cfdf5d6c9f380b
17,646
py
Python
plugin.video.vstream/resources/lib/runscript.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
2
2018-11-02T19:55:30.000Z
2020-08-14T02:22:20.000Z
plugin.video.vstream/resources/lib/runscript.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
null
null
null
plugin.video.vstream/resources/lib/runscript.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
3
2019-12-17T20:47:00.000Z
2021-02-11T19:03:59.000Z
# -*- coding: utf-8 -*- # https://github.com/Kodi-vStream/venom-xbmc-addons # Venom. # vstream = xbmcaddon.Addon('plugin.video.vstream') # sLibrary = xbmc.translatePath(vstream.getAddonInfo("path")).decode("utf-8") # sys.path.append (sLibrary) from resources.lib.comaddon import addon, dialog, VSlog, xbmc, xbmcgui, wi...
40.104545
190
0.476652
from resources.lib.comaddon import addon, dialog, VSlog, xbmc, xbmcgui, window import xbmcvfs import sys import urllib import urllib2 try: from sqlite3 import dbapi2 as sqlite VSlog('SQLITE 3 as DB engine') except: from pysqlite2 import dbapi2 as sqlite VSlog('SQLITE 2 as DB engine') try: ...
true
true
f73db876a0a318f78e2772b1e62008c40b7a6f23
45
py
Python
__init__.py
dhimmel/serg-pycode
075de0ba470e4fbda5e33dfc23cb9ecd86ec53b7
[ "BSD-2-Clause-Patent" ]
null
null
null
__init__.py
dhimmel/serg-pycode
075de0ba470e4fbda5e33dfc23cb9ecd86ec53b7
[ "BSD-2-Clause-Patent" ]
null
null
null
__init__.py
dhimmel/serg-pycode
075de0ba470e4fbda5e33dfc23cb9ecd86ec53b7
[ "BSD-2-Clause-Patent" ]
null
null
null
"""Add this directory to your python path"""
22.5
44
0.711111
true
true
f73db8f68d92d442da81fc6a9ad218bece8ed0c1
7,718
py
Python
emstore/create.py
suhasaggarwal/VectorStore
07a970b26fce64cb069e63f1a656774322055fe8
[ "MIT" ]
null
null
null
emstore/create.py
suhasaggarwal/VectorStore
07a970b26fce64cb069e63f1a656774322055fe8
[ "MIT" ]
null
null
null
emstore/create.py
suhasaggarwal/VectorStore
07a970b26fce64cb069e63f1a656774322055fe8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import struct from contextlib import contextmanager from functools import partial from io import BufferedReader, UnsupportedOperation from subprocess import call from zipfile import BadZipFile, ZipFile from tqdm import tqdm import time from emstore.open import open_leveldb import thre...
35.242009
130
0.584478
import os import struct from contextlib import contextmanager from functools import partial from io import BufferedReader, UnsupportedOperation from subprocess import call from zipfile import BadZipFile, ZipFile from tqdm import tqdm import time from emstore.open import open_leveldb import threading import traceback ...
true
true
f73dba845e5a27dd797442fe6a7b56c90fe5b684
7,615
py
Python
kubernetes-the-hard-way/system/collections/ansible_collections/community/general/plugins/cache/memcached.py
jkroepke/homelab
ffdd849e39b52972870f5552e734fd74cb1254a1
[ "Apache-2.0" ]
5
2020-12-16T21:42:09.000Z
2022-03-28T16:04:32.000Z
kubernetes-the-hard-way/system/collections/ansible_collections/community/general/plugins/cache/memcached.py
jkroepke/kubernetes-the-hard-way
70fd096a04addec0777744c9731a4e3fbdc40c8f
[ "Apache-2.0" ]
null
null
null
kubernetes-the-hard-way/system/collections/ansible_collections/community/general/plugins/cache/memcached.py
jkroepke/kubernetes-the-hard-way
70fd096a04addec0777744c9731a4e3fbdc40c8f
[ "Apache-2.0" ]
null
null
null
# (c) 2014, Brian Coca, Josh Drake, et al # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' author: Unknown (!UNKNOWN) cache: memcac...
31.081633
104
0.624819
from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' author: Unknown (!UNKNOWN) cache: memcached short_description: Use memcached DB for cache description: - This cache uses JSON formatted, per host records saved in memcached. requi...
true
true
f73dbaa4f5a730e9a1cb1b2b9201a52c75fbf4cd
2,169
py
Python
kubernetes/test/test_v1alpha1_dns_endpoint_spec_endpoints.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1alpha1_dns_endpoint_spec_endpoints.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1alpha1_dns_endpoint_spec_endpoints.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unitte...
32.373134
133
0.628861
from __future__ import absolute_import import unittest import datetime import kubernetes.client from kubernetes.client.models.v1alpha1_dns_endpoint_spec_endpoints import V1alpha1DNSEndpointSpecEndpoints from kubernetes.client.rest import ApiException class TestV1alpha1DNSEndpointSpecEndpoints(unittest.TestCase...
true
true
f73dbb17fbff75070ae6a18c9c1c8883035f31de
26
py
Python
modules/wifi/uniflex_module_wifi/__init__.py
danieldUKIM/uniflex_wishrem
44ca1cfaafc33a83e856dbf9eaf9c1b83d0a477b
[ "Apache-2.0" ]
null
null
null
modules/wifi/uniflex_module_wifi/__init__.py
danieldUKIM/uniflex_wishrem
44ca1cfaafc33a83e856dbf9eaf9c1b83d0a477b
[ "Apache-2.0" ]
2
2018-02-02T07:58:14.000Z
2018-02-05T12:43:32.000Z
modules/wifi/uniflex_module_wifi/__init__.py
danieldUKIM/uniflex_wishrem
44ca1cfaafc33a83e856dbf9eaf9c1b83d0a477b
[ "Apache-2.0" ]
4
2017-04-11T13:22:22.000Z
2019-11-02T20:27:15.000Z
from .module_wifi import *
26
26
0.807692
from .module_wifi import *
true
true
f73dbbd9408e4c140a6894ada23f36656967a70a
10,098
py
Python
script/other_script/epc2saz.py
michaelpdu/flash_feature_extraction
29226a4c0e81240fd5c53fd9c80b0f6b0f5a8f95
[ "Apache-2.0" ]
1
2018-11-25T01:05:03.000Z
2018-11-25T01:05:03.000Z
script/other_script/epc2saz.py
michaelpdu/flash_feature_extraction
29226a4c0e81240fd5c53fd9c80b0f6b0f5a8f95
[ "Apache-2.0" ]
null
null
null
script/other_script/epc2saz.py
michaelpdu/flash_feature_extraction
29226a4c0e81240fd5c53fd9c80b0f6b0f5a8f95
[ "Apache-2.0" ]
1
2019-04-12T04:18:27.000Z
2019-04-12T04:18:27.000Z
import os import sys from zipfile import * import zipfile import shutil def zipDir(filename,destDir,index,resultDir): currentPath = os.getcwd() #global resultDir if len(resultDir) == 0 : resultDir = currentPath if not os.path.exists(resultDir): os.makedirs(resultDir) f = zipfil...
41.216327
346
0.481184
import os import sys from zipfile import * import zipfile import shutil def zipDir(filename,destDir,index,resultDir): currentPath = os.getcwd() if len(resultDir) == 0 : resultDir = currentPath if not os.path.exists(resultDir): os.makedirs(resultDir) f = zipfile.ZipFile(resultD...
false
true
f73dbc51ad772452908776a726c9826c6f05703e
1,764
py
Python
app.py
Junhua9981/WebProjectFinal
8db619b4196fa3bc684202ddb24a725c15e06d78
[ "MIT" ]
null
null
null
app.py
Junhua9981/WebProjectFinal
8db619b4196fa3bc684202ddb24a725c15e06d78
[ "MIT" ]
null
null
null
app.py
Junhua9981/WebProjectFinal
8db619b4196fa3bc684202ddb24a725c15e06d78
[ "MIT" ]
null
null
null
from fastapi import FastAPI, Depends from fastapi.middleware.cors import CORSMiddleware from auth.jwt_bearer import JWTBearer # from routes.student import router as StudentRouter # from routes.admin import router as AdminRouter from routes.user import router as UserRouter from routes.teacher import router as TeacherRou...
36
111
0.72449
from fastapi import FastAPI, Depends from fastapi.middleware.cors import CORSMiddleware from auth.jwt_bearer import JWTBearer from routes.user import router as UserRouter from routes.teacher import router as TeacherRouter from routes.comments import router as CommentRouter from routes.build_db import router as BuildD...
true
true
f73dbc65a6e1608b55a7281381ea2a4dde32b688
435
py
Python
kamui/entrypoints/rest/topic/__init__.py
thepabloaguilar/kamui
b740d0fd4ff722a48e1e2e71c17aa5f1453cc57a
[ "Apache-2.0" ]
5
2020-06-22T12:29:36.000Z
2020-12-25T16:08:15.000Z
kamui/entrypoints/rest/topic/__init__.py
thepabloaguilar/kamui
b740d0fd4ff722a48e1e2e71c17aa5f1453cc57a
[ "Apache-2.0" ]
280
2020-06-22T14:22:06.000Z
2022-03-31T11:03:55.000Z
kamui/entrypoints/rest/topic/__init__.py
thepabloaguilar/kamui
b740d0fd4ff722a48e1e2e71c17aa5f1453cc57a
[ "Apache-2.0" ]
null
null
null
from flask import Blueprint from flask_restful import Api from .get_topic_schema import GetTopicSchemaResource from .get_topic_names import GetTopicNamesResource rest_topic_bp = Blueprint("rest_topic", __name__) rest_topic_api = Api(rest_topic_bp, prefix="/api") rest_topic_api.add_resource(GetTopicSchemaResource, G...
33.461538
84
0.866667
from flask import Blueprint from flask_restful import Api from .get_topic_schema import GetTopicSchemaResource from .get_topic_names import GetTopicNamesResource rest_topic_bp = Blueprint("rest_topic", __name__) rest_topic_api = Api(rest_topic_bp, prefix="/api") rest_topic_api.add_resource(GetTopicSchemaResource, G...
true
true
f73dbd0f0c9773be3f22210c1746a840d0094f83
68,877
py
Python
test/integration/test_resource_controller_v2.py
JonahFarc/platform-services-python-sdk
f5cee0d629ce81048680e19c81cea8448ecab217
[ "Apache-2.0" ]
10
2020-04-02T15:48:33.000Z
2021-06-23T05:12:49.000Z
test/integration/test_resource_controller_v2.py
JonahFarc/platform-services-python-sdk
f5cee0d629ce81048680e19c81cea8448ecab217
[ "Apache-2.0" ]
151
2020-03-30T20:24:39.000Z
2022-03-30T16:51:22.000Z
test/integration/test_resource_controller_v2.py
JonahFarc/platform-services-python-sdk
f5cee0d629ce81048680e19c81cea8448ecab217
[ "Apache-2.0" ]
25
2020-04-16T21:03:19.000Z
2021-12-13T19:37:39.000Z
# coding: utf-8 # Copyright 2019, 2020 IBM 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 app...
41.517179
108
0.592825
import pytest import unittest import os import os.path import uuid import time from ibm_cloud_sdk_core import * from ibm_platform_services.resource_controller_v2 import * configFile = 'resource_controller.env' results_per_page = 20 class TestResourceControllerV2(unittest.TestCase): @classmeth...
true
true
f73dbd0f2c868a565911d4fffb23702bcc6ab121
4,537
py
Python
tengp_eval/optimizers/sa.py
Jarino/cgp-optimization
3b50813a591c3535c7846b7e8acf5f5959122d02
[ "MIT" ]
null
null
null
tengp_eval/optimizers/sa.py
Jarino/cgp-optimization
3b50813a591c3535c7846b7e8acf5f5959122d02
[ "MIT" ]
null
null
null
tengp_eval/optimizers/sa.py
Jarino/cgp-optimization
3b50813a591c3535c7846b7e8acf5f5959122d02
[ "MIT" ]
null
null
null
from configparser import ConfigParser import numpy as np from sklearn.metrics import mean_squared_error, r2_score import pygmo as pg from tengp.individual import IndividualBuilder, NPIndividual from tengp import Parameters, FunctionSet from tengp_eval.coevolution import TrainersSet, GaPredictors def fitness_functio...
31.950704
101
0.65616
from configparser import ConfigParser import numpy as np from sklearn.metrics import mean_squared_error, r2_score import pygmo as pg from tengp.individual import IndividualBuilder, NPIndividual from tengp import Parameters, FunctionSet from tengp_eval.coevolution import TrainersSet, GaPredictors def fitness_functio...
true
true
f73dbda467ecdc2427f1f0af05f8e5e6550a9ea5
1,368
py
Python
azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_shard_key_field.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2019-05-10T19:58:09.000Z
2019-05-10T19:58:09.000Z
azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_shard_key_field.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_shard_key_field.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-07-28T14:50:54.000Z
2021-07-28T14:50:54.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
33.365854
77
0.589181
from msrest.serialization import Model class MongoDbShardKeyField(Model): _validation = { 'name': {'required': True}, 'order': {'required': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'order': {'key': 'order', 'type': 'str'}, } ...
true
true
f73dbdacb50a77a4c5613973e62bea13705ee353
8,838
py
Python
admin.py
Borgli/Ohminator
7aa12e3b0cf77b4c7da73e34fe5787554db41cc0
[ "Apache-2.0" ]
2
2018-01-13T15:27:04.000Z
2018-03-25T20:41:30.000Z
admin.py
Borgli/Ohminator
7aa12e3b0cf77b4c7da73e34fe5787554db41cc0
[ "Apache-2.0" ]
10
2018-01-13T16:55:03.000Z
2019-11-12T09:09:27.000Z
admin.py
Borgli/Ohminator
7aa12e3b0cf77b4c7da73e34fe5787554db41cc0
[ "Apache-2.0" ]
null
null
null
import traceback from utils import * async def assign_default_role(client, member, role_name): roles = list(filter(lambda k: k.name == role_name, member.server.roles)) if len(roles) == 0: return await client.add_roles(member, roles[0]) async def notify_of_leaving_person(client, member): bot...
48.032609
133
0.625368
import traceback from utils import * async def assign_default_role(client, member, role_name): roles = list(filter(lambda k: k.name == role_name, member.server.roles)) if len(roles) == 0: return await client.add_roles(member, roles[0]) async def notify_of_leaving_person(client, member): bot...
true
true
f73dbdf33250140d66d52728a9bd1a16050d28f8
583
py
Python
rename/rename_dir.py
sg-/scripts
0668007bfec03be66ec92e658c7f6c64f1a52bb9
[ "Apache-2.0" ]
null
null
null
rename/rename_dir.py
sg-/scripts
0668007bfec03be66ec92e658c7f6c64f1a52bb9
[ "Apache-2.0" ]
null
null
null
rename/rename_dir.py
sg-/scripts
0668007bfec03be66ec92e658c7f6c64f1a52bb9
[ "Apache-2.0" ]
null
null
null
import os import sys if __name__ == '__main__': if len(sys.argv) < 2: print 'usage: <path> <old ext> <new ext>' sys.exit() change_count = 0 for root, dirs, files in os.walk(sys.argv[1]): for dir in dirs: if dir.endswith(sys.argv[2]): print dir ...
26.5
76
0.509434
import os import sys if __name__ == '__main__': if len(sys.argv) < 2: print 'usage: <path> <old ext> <new ext>' sys.exit() change_count = 0 for root, dirs, files in os.walk(sys.argv[1]): for dir in dirs: if dir.endswith(sys.argv[2]): print dir ...
false
true
f73dbe2219095f4449bac4eb8025de0633123dec
3,436
py
Python
models/judge.py
Andrew-Talley/mock-trial-tab
493b0b843d34c732dec724e8ab51f355835a3f46
[ "MIT" ]
1
2020-10-10T20:24:53.000Z
2020-10-10T20:24:53.000Z
models/judge.py
Andrew-Talley/mock-trial-tab
493b0b843d34c732dec724e8ab51f355835a3f46
[ "MIT" ]
1
2020-10-10T20:30:20.000Z
2020-10-10T20:30:20.000Z
models/judge.py
Andrew-Talley/mock-trial-tab
493b0b843d34c732dec724e8ab51f355835a3f46
[ "MIT" ]
null
null
null
from models.connection import get_cnx, tables judge_table = tables["judge"] conflict_table = tables["conflict"] ballots_table = tables["ballot"] ballot_matchup_table = tables["ballot_matchup_info"] class Judge: @staticmethod def add_judge(tournament_id: int, name: str): with get_cnx() as db: ...
28.633333
107
0.508731
from models.connection import get_cnx, tables judge_table = tables["judge"] conflict_table = tables["conflict"] ballots_table = tables["ballot"] ballot_matchup_table = tables["ballot_matchup_info"] class Judge: @staticmethod def add_judge(tournament_id: int, name: str): with get_cnx() as db: ...
true
true
f73dbe56ab079673bfe206237e38707840caeeed
6,808
py
Python
tfx/tools/cli/kubeflow_v2/handler/kubeflow_v2_handler.py
suryaavala/tfx
c315e7cf75822088e974e15b43c96fab86746733
[ "Apache-2.0" ]
1
2021-05-10T10:41:06.000Z
2021-05-10T10:41:06.000Z
tfx/tools/cli/kubeflow_v2/handler/kubeflow_v2_handler.py
suryaavala/tfx
c315e7cf75822088e974e15b43c96fab86746733
[ "Apache-2.0" ]
null
null
null
tfx/tools/cli/kubeflow_v2/handler/kubeflow_v2_handler.py
suryaavala/tfx
c315e7cf75822088e974e15b43c96fab86746733
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
36.406417
83
0.711663
import functools import os import re from typing import Any, Dict, Text import click from tfx.dsl.io import fileio from tfx.tools.cli import labels from tfx.tools.cli.handler import base_handler from tfx.tools.cli.handler import kubeflow_handler from tfx.tools.cli.kubeflow_v2.handler import kubeflow_v2_d...
true
true
f73dbe635eb794dbc0e532893662fce61c44181c
396
py
Python
src/ihcWrappers/networkInterface.py
F9R/ihcpmslib-wrappers
4a5e37ab2ecc8c8c1a8437992e45b9271ec18826
[ "BSD-2-Clause" ]
1
2022-02-09T06:41:20.000Z
2022-02-09T06:41:20.000Z
src/ihcWrappers/networkInterface.py
F9R/ihcpmslib-wrappers
4a5e37ab2ecc8c8c1a8437992e45b9271ec18826
[ "BSD-2-Clause" ]
null
null
null
src/ihcWrappers/networkInterface.py
F9R/ihcpmslib-wrappers
4a5e37ab2ecc8c8c1a8437992e45b9271ec18826
[ "BSD-2-Clause" ]
null
null
null
import clr clr.AddReference("System.Net") class NetworkInterfaceWrapper: def __init__(self, networkInterface) -> None: self.__ni = networkInterface @property def Id(self) -> str: return self.__ni.Id @property def Description(self) -> str: return self.__ni.Description ...
19.8
49
0.631313
import clr clr.AddReference("System.Net") class NetworkInterfaceWrapper: def __init__(self, networkInterface) -> None: self.__ni = networkInterface @property def Id(self) -> str: return self.__ni.Id @property def Description(self) -> str: return self.__ni.Description ...
true
true
f73dbf13213fc9f6c0d33da7ce99286db192dbf6
7,532
py
Python
onadata/apps/logger/management/commands/clean_duplicated_submissions.py
rsakib15/kobocat
c5e2af1d5b68dc40807eb011cd5cde0be9fe5792
[ "BSD-2-Clause" ]
null
null
null
onadata/apps/logger/management/commands/clean_duplicated_submissions.py
rsakib15/kobocat
c5e2af1d5b68dc40807eb011cd5cde0be9fe5792
[ "BSD-2-Clause" ]
null
null
null
onadata/apps/logger/management/commands/clean_duplicated_submissions.py
rsakib15/kobocat
c5e2af1d5b68dc40807eb011cd5cde0be9fe5792
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.db import transaction from django.db.models import Sum from django.db.models.aggregates import Count from django.utils import timezone from ona...
41.384615
86
0.562799
from __future__ import unicode_literals from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.db import transaction from django.db.models import Sum from django.db.models.aggregates import Count from django.utils import timezone from onadata.apps.logger.models...
true
true
f73dbf6a3b501732739a362fc9c74ba5200314da
881
py
Python
bcMathSociety/flaskr/__init__.py
kennywang01/BCMS
1d226ecda481ad324b26930d9a5cbf4df449214e
[ "MIT" ]
null
null
null
bcMathSociety/flaskr/__init__.py
kennywang01/BCMS
1d226ecda481ad324b26930d9a5cbf4df449214e
[ "MIT" ]
null
null
null
bcMathSociety/flaskr/__init__.py
kennywang01/BCMS
1d226ecda481ad324b26930d9a5cbf4df449214e
[ "MIT" ]
null
null
null
import os from xml.etree.ElementInclude import include from flask import Flask from .db import mongo def create_app(test_config=None): # create and configure the app app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( SECRET_KEY='testing', ) if test_config is No...
22.025
66
0.664018
import os from xml.etree.ElementInclude import include from flask import Flask from .db import mongo def create_app(test_config=None): app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( SECRET_KEY='testing', ) if test_config is None: app.confi...
true
true
f73dc04e73c6d5fd2b38b1c5b4f62630509cf49b
7,886
py
Python
tests/serializer/test_dumps.py
QueoLda/django-unicorn
01573cd65282c467bfb0925542b180ffa9efba05
[ "MIT" ]
null
null
null
tests/serializer/test_dumps.py
QueoLda/django-unicorn
01573cd65282c467bfb0925542b180ffa9efba05
[ "MIT" ]
null
null
null
tests/serializer/test_dumps.py
QueoLda/django-unicorn
01573cd65282c467bfb0925542b180ffa9efba05
[ "MIT" ]
null
null
null
import json from decimal import Decimal from django.db import models from django.utils.timezone import now import pytest from django_unicorn import serializer from django_unicorn.utils import dicts_equal from example.coffee.models import Flavor class SimpleTestModel(models.Model): name = models.CharField(max_l...
25.603896
114
0.546031
import json from decimal import Decimal from django.db import models from django.utils.timezone import now import pytest from django_unicorn import serializer from django_unicorn.utils import dicts_equal from example.coffee.models import Flavor class SimpleTestModel(models.Model): name = models.CharField(max_l...
true
true
f73dc226349990101cb313399b23748b50d9dbac
3,585
py
Python
SorryNotSorry/solution/solve-1.py
bahorn/covhacksoc-ctf-2020-11-17
6be1380da8860d0fc9822a8421b8ca9238197f95
[ "MIT" ]
1
2020-11-25T20:24:25.000Z
2020-11-25T20:24:25.000Z
SorryNotSorry/solution/solve-1.py
bahorn/covhacksoc-ctf-2020-11-17
6be1380da8860d0fc9822a8421b8ca9238197f95
[ "MIT" ]
null
null
null
SorryNotSorry/solution/solve-1.py
bahorn/covhacksoc-ctf-2020-11-17
6be1380da8860d0fc9822a8421b8ca9238197f95
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import base64 magic = """ eJxlkMlOwzAQhu88xdBLHKiiEprSIvVCCUvpoqhARQ9Ijj1JTLPJdhDh6XHa0rLMxcvM9/8zwzGCqMq JfXkEJtZYwxBCy5v47tj3nm+m41l/dTuaDebBJLgLXi7G/nT0dG9tqkvK1sgNYPE4OF3UfZfG63q8mA 5WdSebXt0s54/B6Vz4g9ky9h7e+h+T62BoHW1gbpwxZ7Iu.....9Rl5p7LdmO/aaEKirmQOYa1REQqv EEJUSKBtcxE5fIryQNlbyVKKXJPWHaZ...
70.294118
241
0.761785
import base64 magic = """ eJxlkMlOwzAQhu88xdBLHKiiEprSIvVCCUvpoqhARQ9Ijj1JTLPJdhDh6XHa0rLMxcvM9/8zwzGCqMq JfXkEJtZYwxBCy5v47tj3nm+m41l/dTuaDebBJLgLXi7G/nT0dG9tqkvK1sgNYPE4OF3UfZfG63q8mA 5WdSebXt0s54/B6Vz4g9ky9h7e+h+T62BoHW1gbpwxZ7Iu.....9Rl5p7LdmO/aaEKirmQOYa1REQqv EEJUSKBtcxE5fIryQNlbyVKKXJPWHaZpAY8JSjx.................
true
true
f73dc2624a3f6986d7b8b1866b66072de2e8c8b7
318
py
Python
test/test_db_matches_ui.py
ntomczyk/python_training
ca9645e9df1eb390660de7b2d321fcf523cf02f4
[ "Apache-2.0" ]
null
null
null
test/test_db_matches_ui.py
ntomczyk/python_training
ca9645e9df1eb390660de7b2d321fcf523cf02f4
[ "Apache-2.0" ]
null
null
null
test/test_db_matches_ui.py
ntomczyk/python_training
ca9645e9df1eb390660de7b2d321fcf523cf02f4
[ "Apache-2.0" ]
null
null
null
from model.group import Group def test_group_list(app, db): ui_list = app.group.get_group_list() def clean(group): return Group(id=group.id, name=group.name.strip()) db_list = map(clean, db.get_group_list()) assert sorted(ui_list, key=Group.id_or_max) == sorted (db_list, key=Group.id_or_max)
35.333333
88
0.707547
from model.group import Group def test_group_list(app, db): ui_list = app.group.get_group_list() def clean(group): return Group(id=group.id, name=group.name.strip()) db_list = map(clean, db.get_group_list()) assert sorted(ui_list, key=Group.id_or_max) == sorted (db_list, key=Group.id_or_max)
true
true
f73dc2c8c8a7dd1504883e45275c9a20a3f01346
4,760
py
Python
maf/db.py
neuromics/maf-api
60e9bc6bac620bd331348307db2f1a4fda4adb1b
[ "Apache-2.0" ]
null
null
null
maf/db.py
neuromics/maf-api
60e9bc6bac620bd331348307db2f1a4fda4adb1b
[ "Apache-2.0" ]
null
null
null
maf/db.py
neuromics/maf-api
60e9bc6bac620bd331348307db2f1a4fda4adb1b
[ "Apache-2.0" ]
null
null
null
import kbr.db_utils as db class DB(object): def connect(self, url: str) -> None: self._db = db.DB(url) def disconnect(self) -> None: if self._db is not None: self._db.close() def projects(self, **values) -> dict: return self._db.get('project', **values) def pr...
33.521127
150
0.552941
import kbr.db_utils as db class DB(object): def connect(self, url: str) -> None: self._db = db.DB(url) def disconnect(self) -> None: if self._db is not None: self._db.close() def projects(self, **values) -> dict: return self._db.get('project', **values) def pr...
true
true
f73dc3b81fa7e4c0973be6b2f9a9e256959397d5
3,762
py
Python
jobs/futures/updateBinData.py
WinQuant/arsenal-data
b0c9eb340b1f56645d304395c6bb29fa05f6ae84
[ "BSD-3-Clause" ]
null
null
null
jobs/futures/updateBinData.py
WinQuant/arsenal-data
b0c9eb340b1f56645d304395c6bb29fa05f6ae84
[ "BSD-3-Clause" ]
null
null
null
jobs/futures/updateBinData.py
WinQuant/arsenal-data
b0c9eb340b1f56645d304395c6bb29fa05f6ae84
[ "BSD-3-Clause" ]
null
null
null
'''This job updates the minute-by-minute trading data for the whole available futures universe. ''' ''' Copyright (c) 2017, WinQuant Information and Technology Co. Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following condi...
39.6
86
0.685274
import datetime as dt import logging import data.api.futures as futuresApi import data.config as config import data.driver.mongodb as mongodb import data.instrument.trading.futures as futuresTrading logging.basicConfig( format='[%(levelname)s] %(message)s', level=logging.INFO ) def main(): asOfD...
true
true
f73dc3d98bbb594629247191481fbad9d241c12a
884
py
Python
samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py
data-experts/openapi-generator
b86a51ae17e25feae0e0c9f9e6f423b8ff54057d
[ "Apache-2.0" ]
1
2020-08-07T08:38:39.000Z
2020-08-07T08:38:39.000Z
samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py
data-experts/openapi-generator
b86a51ae17e25feae0e0c9f9e6f423b8ff54057d
[ "Apache-2.0" ]
5
2021-05-11T22:59:16.000Z
2022-02-27T10:31:06.000Z
samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py
data-experts/openapi-generator
b86a51ae17e25feae0e0c9f9e6f423b8ff54057d
[ "Apache-2.0" ]
1
2020-08-28T20:37:35.000Z
2020-08-28T20:37:35.000Z
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ ...
22.666667
174
0.695701
from __future__ import absolute_import import sys import unittest import petstore_api from petstore_api.model.nullable_class import NullableClass class TestNullableClass(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testNullableClass(self): ...
true
true
f73dc57754926aa3a44eb1e25c07da66ea7a877d
33,405
py
Python
rplugin/python3/defx/view.py
sonvt1710/defx.nvim
fd5f9416d6acc908660ccca0799109a9a4f0a2d2
[ "MIT" ]
4
2017-01-03T05:18:56.000Z
2017-01-03T10:39:31.000Z
rplugin/python3/defx/view.py
Shougo/defilex.nvim
fd5f9416d6acc908660ccca0799109a9a4f0a2d2
[ "MIT" ]
null
null
null
rplugin/python3/defx/view.py
Shougo/defilex.nvim
fd5f9416d6acc908660ccca0799109a9a4f0a2d2
[ "MIT" ]
null
null
null
# ============================================================================ # FILE: view.py # AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com> # License: MIT license # ============================================================================ from pathlib import Path from pynvim import Nvim from pynvim.api i...
37.157953
79
0.553959
from pathlib import Path from pynvim import Nvim from pynvim.api import Buffer import copy import time import typing from defx.clipboard import Clipboard from defx.context import Context from defx.defx import Defx from defx.session import Session from defx.util import Candidate from defx.util import error, impor...
true
true
f73dc68fc2d1ada95b12f276219df22734d87ae5
17,339
py
Python
sdk/python/pulumi_azure_native/network/v20170601/route_filter.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20170601/route_filter.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20170601/route_filter.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
55.044444
4,489
0.683661
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['RouteFilterInitArgs', 'RouteFilter'] @pulumi.input_type class RouteFilterInitArgs: ...
true
true
f73dc78ee012fbeb96c05de21ede83d4b0678180
7,110
py
Python
app/model/zygosity.py
evgeniyabrosin/anfisa
ac4aef1a816de05ee2a45aa5b220e2baf93574de
[ "Apache-2.0" ]
8
2019-03-26T16:07:46.000Z
2021-12-30T13:38:06.000Z
app/model/zygosity.py
evgeniyabrosin/anfisa
ac4aef1a816de05ee2a45aa5b220e2baf93574de
[ "Apache-2.0" ]
13
2018-11-07T19:37:20.000Z
2022-02-21T17:11:45.000Z
app/model/zygosity.py
evgeniyabrosin/anfisa
ac4aef1a816de05ee2a45aa5b220e2baf93574de
[ "Apache-2.0" ]
15
2018-10-16T08:15:11.000Z
2022-02-21T14:07:29.000Z
# Copyright (c) 2019. Partners HealthCare and other members of # Forome Association # # Developed by Sergey Trifonov based on contributions by Joel Krier, # Michael Bouzinier, Shamil Sunyaev and other members of Division of # Genetics, Brigham and Women's Hospital # # Licensed under the Apache License, Version 2....
36.839378
78
0.605907
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dist...
true
true
f73dc793dc595d0d972e0c483dbf269d153d71ac
5,405
py
Python
tests/test_setup.py
fanmolh/mysql-connector-python
2c46b9ea8005a7902b274c893ba4a22f58fbaecd
[ "Artistic-1.0-Perl" ]
1
2019-12-23T05:21:34.000Z
2019-12-23T05:21:34.000Z
tests/test_setup.py
aliang2017/mysql-connector-python
e424cbf2ba6093caaa96bda1db5dbdfec2e60e1c
[ "Artistic-1.0-Perl" ]
1
2019-10-24T02:06:24.000Z
2019-10-24T02:06:24.000Z
tests/test_setup.py
aliang2017/mysql-connector-python
e424cbf2ba6093caaa96bda1db5dbdfec2e60e1c
[ "Artistic-1.0-Perl" ]
1
2020-07-20T23:26:58.000Z
2020-07-20T23:26:58.000Z
# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as # published by the Free Software Foundation. # # This program is also distributed with certain s...
36.52027
79
0.642183
import sys import tests import imp import setupinfo class VersionTests(tests.MySQLConnectorTests): def test_version(self): vs = setupinfo.VERSION self.assertTrue(all( [isinstance(vs[0], int), isinstance(vs[1], int), isinstance(v...
true
true
f73dc82bb993411b88f9d2bc84704c9cb8182d46
18,695
py
Python
SDLabs/SDOM/PY/iclick.py
hippiejesus/SDOM
271328e306343dbc2f76269317950993cf5d9b4e
[ "BSD-3-Clause" ]
null
null
null
SDLabs/SDOM/PY/iclick.py
hippiejesus/SDOM
271328e306343dbc2f76269317950993cf5d9b4e
[ "BSD-3-Clause" ]
null
null
null
SDLabs/SDOM/PY/iclick.py
hippiejesus/SDOM
271328e306343dbc2f76269317950993cf5d9b4e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #self.listProduct #self.label import os.path import classes as cl import datetime import qdarkstyle import re import csv import sys import subprocess from PyQt4 import QtGui, QtCore, uic cl.load() options = {'Containers':cl.inv.listAllContainers, 'Product':cl....
50.120643
187
0.484942
import os.path import classes as cl import datetime import qdarkstyle import re import csv import sys import subprocess from PyQt4 import QtGui, QtCore, uic cl.load() options = {'Containers':cl.inv.listAllContainers, 'Product':cl.inv.listAllFinishedProduct, 'Unfinished Product':cl.inv.listA...
true
true
f73dc88693200625331d9f1cd25f9e2e5a0f8e7d
2,315
py
Python
ArduinoControl/arduino_control.py
lucascarrafa/FunUtils
e065fd499a155b4daa43716a75ac722a4474c659
[ "MIT" ]
48
2017-03-17T22:23:20.000Z
2021-12-04T17:52:04.000Z
ArduinoControl/arduino_control.py
lucascarrafa/FunUtils
e065fd499a155b4daa43716a75ac722a4474c659
[ "MIT" ]
23
2017-10-13T04:06:11.000Z
2021-06-02T15:01:34.000Z
ArduinoControl/arduino_control.py
lucascarrafa/FunUtils
e065fd499a155b4daa43716a75ac722a4474c659
[ "MIT" ]
83
2017-07-18T03:17:37.000Z
2022-03-18T00:01:15.000Z
import serial # serial communication params SERIAL_PORT = "/dev/ttyUSB0" DEFAULT_BAUD_RATE = 9600 class ArduinoControlService: def __init__(self, port=SERIAL_PORT, baud_rate=DEFAULT_BAUD_RATE): self._controller = serial.Serial(port, baud_rate) self._state = 0 # public methods def get_sta...
26.011236
110
0.578834
import serial SERIAL_PORT = "/dev/ttyUSB0" DEFAULT_BAUD_RATE = 9600 class ArduinoControlService: def __init__(self, port=SERIAL_PORT, baud_rate=DEFAULT_BAUD_RATE): self._controller = serial.Serial(port, baud_rate) self._state = 0 def get_state(self): return self._state def...
true
true
f73dc89ef331e90943dadea02fc7babf9074b3a4
13,705
py
Python
testing/test_session.py
markshao/pytest
611b579d21f7e62b4c8ed54ab70fbfee7c6f5f64
[ "MIT" ]
9,225
2015-06-15T21:56:14.000Z
2022-03-31T20:47:38.000Z
testing/test_session.py
markshao/pytest
611b579d21f7e62b4c8ed54ab70fbfee7c6f5f64
[ "MIT" ]
7,794
2015-06-15T21:06:34.000Z
2022-03-31T10:56:54.000Z
testing/test_session.py
markshao/pytest
611b579d21f7e62b4c8ed54ab70fbfee7c6f5f64
[ "MIT" ]
2,598
2015-06-15T21:42:39.000Z
2022-03-29T13:48:22.000Z
import pytest from _pytest.config import ExitCode from _pytest.monkeypatch import MonkeyPatch from _pytest.pytester import Pytester class SessionTests: def test_basic_testitem_events(self, pytester: Pytester) -> None: tfile = pytester.makepyfile( """ def test_one(): ...
32.787081
90
0.568771
import pytest from _pytest.config import ExitCode from _pytest.monkeypatch import MonkeyPatch from _pytest.pytester import Pytester class SessionTests: def test_basic_testitem_events(self, pytester: Pytester) -> None: tfile = pytester.makepyfile( """ def test_one(): ...
true
true
f73dc9b8993bc2850bf810fe3a5b6a1c9216dd6f
4,594
py
Python
NLP/normalization.py
jmelm93/MLTS
5004995c6355ba066abaeb3fc45cf48474a8463c
[ "Apache-2.0" ]
117
2018-11-25T02:30:31.000Z
2022-03-24T08:05:21.000Z
NLP/normalization.py
jmelm93/MLTS
5004995c6355ba066abaeb3fc45cf48474a8463c
[ "Apache-2.0" ]
4
2019-03-01T04:12:54.000Z
2019-12-10T21:09:30.000Z
NLP/normalization.py
jmelm93/MLTS
5004995c6355ba066abaeb3fc45cf48474a8463c
[ "Apache-2.0" ]
43
2019-01-28T22:07:55.000Z
2022-03-18T21:48:00.000Z
# -*- coding: utf-8 -*- """ Created on Fri Aug 26 20:45:10 2016 @author: DIP """ from lib.contractions import CONTRACTION_MAP import re import nltk import string from nltk.stem import WordNetLemmatizer from html.parser import HTMLParser import unicodedata stopword_list = nltk.corpus.stopwords.words('english') wnl =...
30.026144
90
0.651937
from lib.contractions import CONTRACTION_MAP import re import nltk import string from nltk.stem import WordNetLemmatizer from html.parser import HTMLParser import unicodedata stopword_list = nltk.corpus.stopwords.words('english') wnl = WordNetLemmatizer() html_parser = HTMLParser() def tokenize_text(text): tok...
true
true
f73dcaab37aa6c834598f92d22bd2bc7a51c87e6
171
py
Python
setup.py
softwarefactory-project/rpmreq
b9b30cf6a184929db23ac86c8cc037592ee8b6be
[ "Apache-2.0" ]
null
null
null
setup.py
softwarefactory-project/rpmreq
b9b30cf6a184929db23ac86c8cc037592ee8b6be
[ "Apache-2.0" ]
null
null
null
setup.py
softwarefactory-project/rpmreq
b9b30cf6a184929db23ac86c8cc037592ee8b6be
[ "Apache-2.0" ]
1
2019-03-10T10:07:04.000Z
2019-03-10T10:07:04.000Z
#!/usr/bin/env python import re import setuptools import sys setuptools.setup( setup_requires=['pbr', 'pytest-runner'], tests_require=['pytest'], pbr=True)
14.25
44
0.690058
import re import setuptools import sys setuptools.setup( setup_requires=['pbr', 'pytest-runner'], tests_require=['pytest'], pbr=True)
true
true
f73dcb9e0b920f37f92eabaa99983df378c7e367
879
py
Python
src/spaceone/secret/manager/identity_manager.py
ku524/secret
c5dad49f40ab1cbbaa0b8f01222de10ae73d1fb1
[ "Apache-2.0" ]
7
2020-06-04T23:01:12.000Z
2021-01-31T08:41:29.000Z
src/spaceone/secret/manager/identity_manager.py
ku524/secret
c5dad49f40ab1cbbaa0b8f01222de10ae73d1fb1
[ "Apache-2.0" ]
2
2020-08-05T13:31:53.000Z
2021-03-07T15:15:14.000Z
src/spaceone/secret/manager/identity_manager.py
ku524/secret
c5dad49f40ab1cbbaa0b8f01222de10ae73d1fb1
[ "Apache-2.0" ]
6
2020-06-10T01:59:35.000Z
2021-11-25T06:30:35.000Z
# -*- coding: utf-8 -*- from spaceone.core.manager import BaseManager from spaceone.secret.connector.identity_connector import IdentityConnector class IdentityManager(BaseManager): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.identity_conn: IdentityConnector = self....
38.217391
95
0.759954
from spaceone.core.manager import BaseManager from spaceone.secret.connector.identity_connector import IdentityConnector class IdentityManager(BaseManager): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.identity_conn: IdentityConnector = self.locator.get_connector('...
true
true
f73dcc30d9dec0a03cff19c93fb142a9a0f3ca37
313
py
Python
hg_tweetfeeder/__init__.py
HaguDeGozaru/hagu-tweet-bot
3e46551aaf5e9b63fafa4018bae5e8ca27a19f9c
[ "MIT" ]
null
null
null
hg_tweetfeeder/__init__.py
HaguDeGozaru/hagu-tweet-bot
3e46551aaf5e9b63fafa4018bae5e8ca27a19f9c
[ "MIT" ]
null
null
null
hg_tweetfeeder/__init__.py
HaguDeGozaru/hagu-tweet-bot
3e46551aaf5e9b63fafa4018bae5e8ca27a19f9c
[ "MIT" ]
null
null
null
''' init for hg_tweetfeeder module ''' from hg_tweetfeeder.bot import TweetFeeder, BotFunctions, BotEvents from hg_tweetfeeder.config import Config from hg_tweetfeeder.file_io import LoadFromFile from hg_tweetfeeder.flags import BotFunctions __author__ = 'Ian M. <hagudegozaru@gmail.com>' __version__ = '0.0.1'
31.3
67
0.811502
from hg_tweetfeeder.bot import TweetFeeder, BotFunctions, BotEvents from hg_tweetfeeder.config import Config from hg_tweetfeeder.file_io import LoadFromFile from hg_tweetfeeder.flags import BotFunctions __author__ = 'Ian M. <hagudegozaru@gmail.com>' __version__ = '0.0.1'
true
true
f73dccc281d1bae392f9764d0472c5878d8027f0
155
py
Python
src/fixed_income/util.py
Bocha84/fixed-income
20489a43e17885045b7cfece221c49041b767ff3
[ "Apache-2.0" ]
7
2017-12-18T07:17:55.000Z
2020-02-02T07:04:33.000Z
src/fixed_income/util.py
Bocha84/fixed-income
20489a43e17885045b7cfece221c49041b767ff3
[ "Apache-2.0" ]
null
null
null
src/fixed_income/util.py
Bocha84/fixed-income
20489a43e17885045b7cfece221c49041b767ff3
[ "Apache-2.0" ]
5
2017-12-18T05:01:50.000Z
2020-03-03T16:42:10.000Z
import re def camel_to_snake(phrase): s1 = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", phrase) return re.sub("([a-z0-9])([A-Z])", r"\1_\2", s1).lower()
22.142857
60
0.516129
import re def camel_to_snake(phrase): s1 = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", phrase) return re.sub("([a-z0-9])([A-Z])", r"\1_\2", s1).lower()
true
true
f73dcd568d2ed4bd0144f958c062c778352b2d3c
1,906
py
Python
EISeg/eiseg/util/language.py
Amanda-Barbara/PaddleSeg
a7de36a5fae96011f5b188987670274101b8ede1
[ "Apache-2.0" ]
2
2021-11-26T09:02:58.000Z
2021-12-10T08:35:37.000Z
EISeg/eiseg/util/language.py
Amanda-Barbara/PaddleSeg
a7de36a5fae96011f5b188987670274101b8ede1
[ "Apache-2.0" ]
null
null
null
EISeg/eiseg/util/language.py
Amanda-Barbara/PaddleSeg
a7de36a5fae96011f5b188987670274101b8ede1
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
33.438596
89
0.603882
import os.path as osp import re from eiseg import pjpath from collections import defaultdict import json from urllib import parse import requests class TransUI(object): def __init__(self, is_trans=False): super().__init__() self.trans_dict = defaultdict(dict) wi...
true
true
f73dcd747465e130f1fdbf7c3f64eefcbbd8024d
11,580
py
Python
mocasin/simulate/application.py
tud-ccc/mocasin
6cf0a169e24d65d0fc859398f181dd500f928340
[ "0BSD" ]
1
2022-03-13T19:27:50.000Z
2022-03-13T19:27:50.000Z
mocasin/simulate/application.py
tud-ccc/mocasin
6cf0a169e24d65d0fc859398f181dd500f928340
[ "0BSD" ]
null
null
null
mocasin/simulate/application.py
tud-ccc/mocasin
6cf0a169e24d65d0fc859398f181dd500f928340
[ "0BSD" ]
null
null
null
# Copyright (C) 2017 TU Dresden # Licensed under the ISC license (see LICENSE.txt) # # Authors: Christian Menard from mocasin.util import logging from mocasin.simulate.channel import RuntimeChannel from mocasin.simulate.process import RuntimeDataflowProcess from mocasin.simulate.adapter import SimulateLoggerAdapter ...
34.567164
80
0.628066
from mocasin.util import logging from mocasin.simulate.channel import RuntimeChannel from mocasin.simulate.process import RuntimeDataflowProcess from mocasin.simulate.adapter import SimulateLoggerAdapter log = logging.getLogger(__name__) class RuntimeApplication(object): def __init__(self, name, system):...
true
true
f73dcd9fe76ae714278f4d86ca969d114b02e714
4,384
py
Python
vega/algorithms/nas/fis/autogroup_trainer_callback.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
724
2020-06-22T12:05:30.000Z
2022-03-31T07:10:54.000Z
vega/algorithms/nas/fis/autogroup_trainer_callback.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
147
2020-06-30T13:34:46.000Z
2022-03-29T11:30:17.000Z
vega/algorithms/nas/fis/autogroup_trainer_callback.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
160
2020-06-29T18:27:58.000Z
2022-03-23T08:42:21.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without ev...
36.840336
107
0.655794
import logging import torch.optim as optim from vega.common import ClassFactory, ClassType from .ctr_trainer_callback import CtrTrainerCallback logger = logging.getLogger(__name__) @ClassFactory.register(ClassType.CALLBACK) class AutoGroupTrainerCallback(CtrTrainerCallback): def __init_...
true
true
f73dce2541c72c05471cc53df05f389215dd6d92
17,524
py
Python
neutron/tests/functional/agent/test_ovs_lib.py
ISCAS-VDI/neutron-base
687f03d7131839ae8bc324d5823194d1245bb050
[ "Apache-2.0" ]
null
null
null
neutron/tests/functional/agent/test_ovs_lib.py
ISCAS-VDI/neutron-base
687f03d7131839ae8bc324d5823194d1245bb050
[ "Apache-2.0" ]
3
2015-02-27T00:48:55.000Z
2015-04-21T05:29:37.000Z
neutron/tests/functional/agent/test_ovs_lib.py
ISCAS-VDI/neutron-base
687f03d7131839ae8bc324d5823194d1245bb050
[ "Apache-2.0" ]
3
2015-02-26T00:55:17.000Z
2020-03-01T17:05:40.000Z
# Copyright (c) 2015 Red Hat, Inc. # 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 require...
44.252525
79
0.644031
import collections import uuid import mock from neutron.agent.common import ovs_lib from neutron.agent.linux import ip_lib from neutron.tests import base as tests_base from neutron.tests.common import net_helpers from neutron.tests.functional.agent.linux import base class OVSBridgeTestBase(base.BaseO...
true
true
f73dcf08333c726afb9f64ef4b38e464a7a0c16e
4,279
py
Python
ipython_memory_usage.py
jni/ipython_memory_usage
d835451b625ad7047d404674e91866219f7d9454
[ "BSD-2-Clause" ]
null
null
null
ipython_memory_usage.py
jni/ipython_memory_usage
d835451b625ad7047d404674e91866219f7d9454
[ "BSD-2-Clause" ]
null
null
null
ipython_memory_usage.py
jni/ipython_memory_usage
d835451b625ad7047d404674e91866219f7d9454
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Profile mem usage envelope of IPython commands and report interactively""" from __future__ import division # 1/2 == 0.5, as in Py3 from __future__ import absolute_import # avoid hiding global modules with locals from __future__ import print_function # force use of pri...
38.205357
126
0.691049
from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os import time import memory_profiler from IPython import get_ipython previous_call_memory_usage = memory_profiler.memory_usage()[0] t1 = time.time()...
true
true
f73dd16d9cd7a3ef584d923eb3ba51f32c287d7b
920
py
Python
tests/rules/test_git_remote_seturl_add.py
HiteshMah-Jan/thefuck
132c62262246824470934c2c6f46919ef6f00203
[ "MIT" ]
75,504
2015-04-08T18:22:19.000Z
2022-03-31T23:59:52.000Z
tests/rules/test_git_remote_seturl_add.py
HiteshMah-Jan/thefuck
132c62262246824470934c2c6f46919ef6f00203
[ "MIT" ]
1,160
2015-04-17T18:47:12.000Z
2022-03-30T20:42:26.000Z
tests/rules/test_git_remote_seturl_add.py
HiteshMah-Jan/thefuck
132c62262246824470934c2c6f46919ef6f00203
[ "MIT" ]
4,399
2015-04-17T18:36:04.000Z
2022-03-31T07:01:03.000Z
import pytest from thefuck.rules.git_remote_seturl_add import match, get_new_command from thefuck.types import Command @pytest.mark.parametrize('command', [ Command('git remote set-url origin url', "fatal: No such remote")]) def test_match(command): assert match(command) @pytest.mark.parametrize('command', ...
34.074074
78
0.718478
import pytest from thefuck.rules.git_remote_seturl_add import match, get_new_command from thefuck.types import Command @pytest.mark.parametrize('command', [ Command('git remote set-url origin url', "fatal: No such remote")]) def test_match(command): assert match(command) @pytest.mark.parametrize('command', ...
true
true
f73dd18186567c90c3c5db7807ea0ea6a87deded
940
py
Python
project2/contrib/sites/migrations/0002_set_site_domain_and_name.py
joannex/django_2-
b0e1fefc6a12d61def2bf31e01728ad9c718c225
[ "BSD-3-Clause" ]
null
null
null
project2/contrib/sites/migrations/0002_set_site_domain_and_name.py
joannex/django_2-
b0e1fefc6a12d61def2bf31e01728ad9c718c225
[ "BSD-3-Clause" ]
null
null
null
project2/contrib/sites/migrations/0002_set_site_domain_and_name.py
joannex/django_2-
b0e1fefc6a12d61def2bf31e01728ad9c718c225
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations def update_site_forward(apps, schema_editor): """Set site domain and name.""" Site = apps.get_model("sites", "Site") Site.objects.update_or_create( id=settings.SITE_ID...
22.926829
72
0.61383
from __future__ import unicode_literals from django.conf import settings from django.db import migrations def update_site_forward(apps, schema_editor): Site = apps.get_model("sites", "Site") Site.objects.update_or_create( id=settings.SITE_ID, defaults={ "domain": "example.com", ...
true
true
f73dd1c7743d1ca808f9019ffdb5cabd81e791f2
2,697
py
Python
apiritif/thread.py
undera/apiritif
56f42a24604a06cbd390949223f2a840469b34d8
[ "Apache-2.0" ]
null
null
null
apiritif/thread.py
undera/apiritif
56f42a24604a06cbd390949223f2a840469b34d8
[ "Apache-2.0" ]
null
null
null
apiritif/thread.py
undera/apiritif
56f42a24604a06cbd390949223f2a840469b34d8
[ "Apache-2.0" ]
null
null
null
""" Copyright 2019 BlazeMeter 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 or agreed to in writing, softwar...
22.475
72
0.718205
from threading import local from apiritif.action_plugins import BaseActionHandler _total = 1 _thread_local = local() def set_total(total): global _total _total = total def get_total(): global _total return _total def set_index(index): _thread_local.index = index def get_index(): index ...
true
true
f73dd3829ab3edcd30615a38fedbb215bebbe293
5,624
py
Python
pypureclient/flasharray/FA_2_7/models/protection_group_snapshot_patch.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flasharray/FA_2_7/models/protection_group_snapshot_patch.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flasharray/FA_2_7/models/protection_group_snapshot_patch.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.7 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ....
36.519481
486
0.59175
import pprint import re import six import typing from ....properties import Property if typing.TYPE_CHECKING: from pypureclient.flasharray.FA_2_7 import models class ProtectionGroupSnapshotPatch(object): swagger_types = { 'name': 'str', 'created': 'int', 'destroyed': 'bool', ...
true
true
f73dd4052f08df8c7bd21f0ed0cd561e40a66502
6,205
py
Python
mybooks/books/books_views.py
yanghao2008/imagetext
82cbdb21829ccebe0039ad48eaca858d37381a6d
[ "MIT" ]
1
2021-12-30T13:03:52.000Z
2021-12-30T13:03:52.000Z
mybooks/books/books_views.py
yanghao2008/imagetext
82cbdb21829ccebe0039ad48eaca858d37381a6d
[ "MIT" ]
null
null
null
mybooks/books/books_views.py
yanghao2008/imagetext
82cbdb21829ccebe0039ad48eaca858d37381a6d
[ "MIT" ]
null
null
null
from django.shortcuts import render from books import models # 导入models文件 from django.contrib.auth.decorators import login_required,permission_required from mybooks import settings from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger import re import os from PIL import Image import re import base6...
46.30597
202
0.613699
from django.shortcuts import render from books import models from django.contrib.auth.decorators import login_required,permission_required from mybooks import settings from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger import re import os from PIL import Image import re import base64 from io im...
true
true
f73dd541ce5629d84704a46de8edb6c6f2b9dab8
6,484
py
Python
Development_System/detection_opencv.py
grebtsew/Object-and-Facial-detection-in-python
57c4bf8d934cc8d6dbaa0cfc56b2b343795ceef1
[ "MIT" ]
15
2018-08-21T12:17:16.000Z
2022-02-13T13:09:49.000Z
Development_System/detection_opencv.py
grebtsew/Object-and-Facial-detection-in-python
57c4bf8d934cc8d6dbaa0cfc56b2b343795ceef1
[ "MIT" ]
4
2020-01-28T17:07:01.000Z
2021-05-23T14:27:32.000Z
Development_System/detection_opencv.py
grebtsew/Object-and-Facial-detection-in-python
57c4bf8d934cc8d6dbaa0cfc56b2b343795ceef1
[ "MIT" ]
5
2018-11-16T19:19:00.000Z
2022-02-13T13:09:51.000Z
# Detection thread # Models are from http://alereimondo.no-ip.org/OpenCV/34/ # Check it out, there are plenty of them! # Useful and fast ''' If you wanna train your own models check this out! https://docs.opencv.org/3.4/dc/d88/tutorial_traincascade.html ''' # Code from https://docs.opencv.org/3.4/d7/d8b/tutorial_py_...
35.823204
153
0.550123
import utils.logging_data as LOG import cv2 import imutils import os import sys import threading import numpy as np import re import time import datetime class Detection(threading.Thread): face_cascade = [] facial_features_cascade = [] flipp_test_nr = 1 flipp_test_degree = 90 do...
true
true
f73dd5de8b21cd2983c194c5e5f78f65b0b7e354
3,379
py
Python
core/dr_utils/dib_renderer_x/utils/sphericalcoord.py
THU-DA-6D-Pose-Group/Self6D-Diff-Renderer
408330a9c7d7010a5af0a5b0b469f1ef695d18de
[ "Apache-2.0" ]
90
2020-08-15T16:14:45.000Z
2022-01-22T10:24:13.000Z
core/dr_utils/dib_renderer_x/utils/sphericalcoord.py
THU-DA-6D-Pose-Group/Self6D-Diff-Renderer
408330a9c7d7010a5af0a5b0b469f1ef695d18de
[ "Apache-2.0" ]
11
2020-09-07T17:31:18.000Z
2021-11-25T12:07:30.000Z
core/dr_utils/dib_renderer_x/utils/sphericalcoord.py
THU-DA-6D-Pose-Group/Self6D-Diff-Renderer
408330a9c7d7010a5af0a5b0b469f1ef695d18de
[ "Apache-2.0" ]
13
2020-09-03T04:25:50.000Z
2021-12-23T08:23:33.000Z
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, mo...
32.805825
98
0.614087
import numpy as np
true
true
f73dd6346cd312d0a8e3b2bb3b9faabc68392075
2,538
py
Python
blaze/__init__.py
thequackdaddy/blaze
21ba90c17b6b807623bbc9996bfc838f13ee6ea1
[ "BSD-3-Clause" ]
null
null
null
blaze/__init__.py
thequackdaddy/blaze
21ba90c17b6b807623bbc9996bfc838f13ee6ea1
[ "BSD-3-Clause" ]
null
null
null
blaze/__init__.py
thequackdaddy/blaze
21ba90c17b6b807623bbc9996bfc838f13ee6ea1
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, division, print_function try: import h5py # if we import h5py after tables we segfault except ImportError: pass from pandas import DataFrame from odo import odo, convert, append, drop, resource from odo.backends.csv import CSV from odo.backends.json import JSON, JSONLi...
22.864865
80
0.72104
from __future__ import absolute_import, division, print_function try: import h5py except ImportError: pass from pandas import DataFrame from odo import odo, convert, append, drop, resource from odo.backends.csv import CSV from odo.backends.json import JSON, JSONLines from multipledispatch import halt_order...
true
true
f73dd74210b3522d012f83b6d7a261b363f4f32b
2,902
py
Python
gridworld/lfl/mdp_utils.py
gioramponi/LOGEL
e862324816c57dd5d07691ee8583259a6a62116c
[ "MIT" ]
null
null
null
gridworld/lfl/mdp_utils.py
gioramponi/LOGEL
e862324816c57dd5d07691ee8583259a6a62116c
[ "MIT" ]
null
null
null
gridworld/lfl/mdp_utils.py
gioramponi/LOGEL
e862324816c57dd5d07691ee8583259a6a62116c
[ "MIT" ]
1
2021-04-16T15:15:41.000Z
2021-04-16T15:15:41.000Z
"""utils for entropy-regularized discrete MDPs.""" from __future__ import print_function import numpy as np def softmax(x, tau=1.): e = np.exp(x * tau) z = -np.log(sum(e)) return np.exp(x * tau + z) def score_policy(pi, r, p, alpha, gamma): """Returns expected score J(pi) = v_pi(start) using soft p...
34.141176
90
0.60062
from __future__ import print_function import numpy as np def softmax(x, tau=1.): e = np.exp(x * tau) z = -np.log(sum(e)) return np.exp(x * tau + z) def score_policy(pi, r, p, alpha, gamma): n_states, n_actions, _ = p.shape q_pi = np.random.rand(n_states, n_actions) v_pi = np.zeros(n_states)...
true
true
f73dd772a8cd43b451bfee52d8fd249ccab92d53
418
py
Python
test.py
tjcy/python
2343e8aee51d94ae68bccbb2b45f89fb3dce744b
[ "Apache-2.0" ]
null
null
null
test.py
tjcy/python
2343e8aee51d94ae68bccbb2b45f89fb3dce744b
[ "Apache-2.0" ]
null
null
null
test.py
tjcy/python
2343e8aee51d94ae68bccbb2b45f89fb3dce744b
[ "Apache-2.0" ]
null
null
null
from multiprocessing import Process,Queue import os import time q = Queue() def _write(q): print('Process(%s) is writing...' % os.getpid()) while 1: time.sleep(2) url = 100 q.put(url) print('Put %s to queue...' % url) if __name__ == "__main__": p = Process(target=_write,...
16.72
52
0.569378
from multiprocessing import Process,Queue import os import time q = Queue() def _write(q): print('Process(%s) is writing...' % os.getpid()) while 1: time.sleep(2) url = 100 q.put(url) print('Put %s to queue...' % url) if __name__ == "__main__": p = Process(target=_write,...
false
true
f73dd7c37600d0457452fc4d4695e6e8e1302aa7
2,983
py
Python
cities_light/models.py
suquant/django-cities-light
786852c8372f24e6f05c9c9b2e03e12873a222b8
[ "MIT" ]
null
null
null
cities_light/models.py
suquant/django-cities-light
786852c8372f24e6f05c9c9b2e03e12873a222b8
[ "MIT" ]
null
null
null
cities_light/models.py
suquant/django-cities-light
786852c8372f24e6f05c9c9b2e03e12873a222b8
[ "MIT" ]
null
null
null
""" By default, all models are taken from this package. But it is possible to customise these models to add some fields. For such purpose cities_light models are defined as abstract (without customisation they all inherit abstract versions automatically without changes). Steps to customise cities_light models ========...
28.961165
79
0.690245
from .abstract_models import (AbstractCountry, AbstractRegion, AbstractCity, ToSearchTextField, CONTINENT_CHOICES, to_search, to_ascii) from .signals import * from .receivers import * from .settings import * __all__ = ['CONTINENT_CHOICES', 'to_search', 'to_ascii', 'filter_non_cities', 'filter_non_included_co...
true
true
f73dd820da9361186f0802d125d95d75e9cd7758
549
py
Python
tests/test_gingerit.py
memahesh/gingerit
95aeb581fe0abd6ee68f2d97a10d0e1d57d99136
[ "MIT" ]
null
null
null
tests/test_gingerit.py
memahesh/gingerit
95aeb581fe0abd6ee68f2d97a10d0e1d57d99136
[ "MIT" ]
null
null
null
tests/test_gingerit.py
memahesh/gingerit
95aeb581fe0abd6ee68f2d97a10d0e1d57d99136
[ "MIT" ]
null
null
null
import pytest from gingerit.gingerit import GingerIt @pytest.mark.parametrize("text,expected", [ ( "The smelt of fliwers bring back memories.", "The smell of flowers brings back memories." ), ( "Edwards will be sck yesterday", "Edwards was sick yesterday" ), ( ...
20.333333
52
0.581056
import pytest from gingerit.gingerit import GingerIt @pytest.mark.parametrize("text,expected", [ ( "The smelt of fliwers bring back memories.", "The smell of flowers brings back memories." ), ( "Edwards will be sck yesterday", "Edwards was sick yesterday" ), ( ...
true
true
f73ddaab54ee50022b18e0f8fac5912d58cf116d
762
py
Python
pushEmail.py
aaronli39/JaJaS
d2d20b72d407a30cdf05d4afa858afae3923a6e8
[ "MIT" ]
null
null
null
pushEmail.py
aaronli39/JaJaS
d2d20b72d407a30cdf05d4afa858afae3923a6e8
[ "MIT" ]
null
null
null
pushEmail.py
aaronli39/JaJaS
d2d20b72d407a30cdf05d4afa858afae3923a6e8
[ "MIT" ]
null
null
null
#! /usr/bin/python import cgi, cgitb cgitb.enable() def go(): fs = cgi.FieldStorage() si = [fs.getvalue('name'), fs.getvalue('email'), fs.getvalue('tel'), fs.getvalue('message')] #old emails straw = open('emails.csv', 'rU') oldEmails = straw.read() straw.close() #write new one newE...
28.222222
241
0.60105
import cgi, cgitb cgitb.enable() def go(): fs = cgi.FieldStorage() si = [fs.getvalue('name'), fs.getvalue('email'), fs.getvalue('tel'), fs.getvalue('message')] straw = open('emails.csv', 'rU') oldEmails = straw.read() straw.close() newEmail = si[0] + ',' + si[1] + ',' + si[2] + ...
false
true
f73ddb28a2909316710e5a6997f57b1319ea7eec
19,354
py
Python
pyleecan/Classes/OutStruct.py
EmileDvs/pyleecan
ad2f5f25c089a981f373557a198da51c62407928
[ "Apache-2.0" ]
95
2019-01-23T04:19:45.000Z
2022-03-17T18:22:10.000Z
pyleecan/Classes/OutStruct.py
EmileDvs/pyleecan
ad2f5f25c089a981f373557a198da51c62407928
[ "Apache-2.0" ]
366
2019-02-20T07:15:08.000Z
2022-03-31T13:37:23.000Z
pyleecan/Classes/OutStruct.py
EmileDvs/pyleecan
ad2f5f25c089a981f373557a198da51c62407928
[ "Apache-2.0" ]
74
2019-01-24T01:47:31.000Z
2022-02-25T05:44:42.000Z
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Output/OutStruct.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Output/OutStruct """ from os import linesep from sys import getsizeof ...
34.872072
108
0.551566
from os import linesep from sys import getsizeof from logging import getLogger from ._check import check_var, raise_ from ..Functions.get_logger import get_logger from ..Functions.save import save from ..Functions.copy import copy from ..Functions.load import load_init_dict from ..Functions.Load.import_cla...
true
true
f73ddb833ead2d28797d765cc7aee4ff041ee001
13,441
py
Python
_unittest/test_21_Circuit.py
pyansys/PyAEDT
312d2d2a6c091dbae4272b6ce3ff489cdd21aa21
[ "MIT" ]
12
2021-07-01T06:35:12.000Z
2021-09-22T15:53:07.000Z
_unittest/test_21_Circuit.py
pyansys/PyAEDT
312d2d2a6c091dbae4272b6ce3ff489cdd21aa21
[ "MIT" ]
111
2021-07-01T16:02:36.000Z
2021-09-29T12:36:44.000Z
_unittest/test_21_Circuit.py
pyansys/PyAEDT
312d2d2a6c091dbae4272b6ce3ff489cdd21aa21
[ "MIT" ]
5
2021-07-09T14:24:59.000Z
2021-09-07T12:42:03.000Z
import gc import os import time # Import required modules from pyaedt import Circuit from pyaedt.generic.filesystem import Scratch from pyaedt.generic.TouchstoneParser import read_touchstone # Setup paths for module imports from _unittest.conftest import local_path, scratch_path, config try: import pytest # noq...
45.255892
117
0.666543
import gc import os import time from pyaedt import Circuit from pyaedt.generic.filesystem import Scratch from pyaedt.generic.TouchstoneParser import read_touchstone from _unittest.conftest import local_path, scratch_path, config try: import pytest except ImportError: import _unittest_ironpython.conf_unit...
true
true
f73ddbe5ca259d15bf50fa56bc52d738e9c181c7
1,680
py
Python
network_model/tools/bn_tools_t.py
b3ttin4/network_simulation_and_analysis
56ec3fd497ad95eee6eec00042d332133495288e
[ "MIT" ]
null
null
null
network_model/tools/bn_tools_t.py
b3ttin4/network_simulation_and_analysis
56ec3fd497ad95eee6eec00042d332133495288e
[ "MIT" ]
null
null
null
network_model/tools/bn_tools_t.py
b3ttin4/network_simulation_and_analysis
56ec3fd497ad95eee6eec00042d332133495288e
[ "MIT" ]
null
null
null
import numpy as np # Nonlinearity functions (Numpy implementation) nl_linear = lambda x: x nl_tanh = lambda x: np.tanh(x) nl_sigmoid = lambda x: 1./(1+np.exp(-x)) nl_rect = lambda x: np.clip(x, 0, np.inf) #nl_rect = lambda x: np.clip(x, -np.inf, np.inf) nl_shallow_rect = lambda x: np.clip(0.1*x, 0, np.inf) nl_clip =...
32.307692
103
0.657143
import numpy as np nl_linear = lambda x: x nl_tanh = lambda x: np.tanh(x) nl_sigmoid = lambda x: 1./(1+np.exp(-x)) nl_rect = lambda x: np.clip(x, 0, np.inf) nl_shallow_rect = lambda x: np.clip(0.1*x, 0, np.inf) nl_clip = lambda x: np.clip(x, 0, 1) nl_softplus = lambda x: np.log(1. + np.exp(x)) # Nonlinearity fun...
true
true
f73dddf470763349a7f01540ff083d75743566dd
19,409
py
Python
qsubm.py
mark-caprio/mcscript
7a5a69667857f27b8f2d2f9387b90301bc321df2
[ "MIT" ]
1
2017-05-30T20:45:24.000Z
2017-05-30T20:45:24.000Z
qsubm.py
mark-caprio/mcscript
7a5a69667857f27b8f2d2f9387b90301bc321df2
[ "MIT" ]
3
2020-06-15T16:10:23.000Z
2020-10-15T02:47:21.000Z
qsubm.py
mark-caprio/mcscript
7a5a69667857f27b8f2d2f9387b90301bc321df2
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """qsubm -- generic queue submission for task-oriented batch scripts Environment variables: MCSCRIPT_DIR should specify the directory in which the mcscript package is installed, i.e., the directory where the file qsubm.py is found. (Note that qsubm uses this information to locate c...
40.77521
305
0.679273
import argparse import os import shutil import subprocess import sys import mcscript.config import mcscript.utils ###################################################### if (args.here): run_home = os.environ["PWD"] elif ("MCSCRIPT_RUN_HOME" in os.environ): run_home = os.environ["MCSCRIPT_RUN_HOME"] else: ...
true
true
f73dde1ef8b0eb4fb039b59bf8be2957b2e6548b
2,642
py
Python
openGaussBase/testcase/MOT/Opengauss_Function_MOT_Case0025.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/MOT/Opengauss_Function_MOT_Case0025.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/MOT/Opengauss_Function_MOT_Case0025.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
40.030303
106
0.644209
import unittest import sys sys.path.append(sys.path[0] + "/../") from testcase.utils.Constant import Constant from testcase.utils.CommonSH import CommonSH from testcase.utils.Logger import Logger logger = Logger() class Mot_datatype_test(unittest.TestCase): def setUp(self): self.sh_primysh = CommonSH('...
true
true
f73dde7a996b20aa38148c47c3929e59891baadb
11,596
py
Python
sloth/backend/generic.py
katelaan/sloth
f487911c4e6850253c592cf65280390f39e24a87
[ "MIT" ]
2
2018-07-09T10:10:52.000Z
2021-04-02T14:56:00.000Z
sloth/backend/generic.py
katelaan/sloth
f487911c4e6850253c592cf65280390f39e24a87
[ "MIT" ]
null
null
null
sloth/backend/generic.py
katelaan/sloth
f487911c4e6850253c592cf65280390f39e24a87
[ "MIT" ]
null
null
null
import z3 from ..utils import logger, utils from ..model import model_utils from . import symbols, struct def const(name, sort): assert(isinstance(name, str)) return z3.Const(name, sort) def array(name, ix_sort, cont_sort): return z3.Array(name, ix_sort, cont_sort) class SlSort: """Representation of...
36.351097
151
0.626768
import z3 from ..utils import logger, utils from ..model import model_utils from . import symbols, struct def const(name, sort): assert(isinstance(name, str)) return z3.Const(name, sort) def array(name, ix_sort, cont_sort): return z3.Array(name, ix_sort, cont_sort) class SlSort: def __init__(self, ...
true
true
f73ddeefd932879d911767bf79a1c153386e8966
1,405
py
Python
setup.py
awslabs/lorien
bcd39132e5f0738ee6f4685676ea8628cb4cea1b
[ "Apache-2.0" ]
40
2021-09-03T00:13:52.000Z
2022-03-16T10:55:15.000Z
setup.py
awslabs/lorien
bcd39132e5f0738ee6f4685676ea8628cb4cea1b
[ "Apache-2.0" ]
null
null
null
setup.py
awslabs/lorien
bcd39132e5f0738ee6f4685676ea8628cb4cea1b
[ "Apache-2.0" ]
1
2021-11-09T03:20:53.000Z
2021-11-09T03:20:53.000Z
"""Package Setup""" import os import re from distutils.core import setup from setuptools import find_packages CURRENT_DIR = os.path.dirname(__file__) def read(path): with open(path, "r") as filep: return filep.read() def get_version(package_name): with open(os.path.join(os.path.dirname(__file__), ...
30.543478
90
0.64911
import os import re from distutils.core import setup from setuptools import find_packages CURRENT_DIR = os.path.dirname(__file__) def read(path): with open(path, "r") as filep: return filep.read() def get_version(package_name): with open(os.path.join(os.path.dirname(__file__), package_name, "__ini...
true
true
f73ddf07a7874888b3dcbaefbe5efca8353ab73b
40
py
Python
libcloud/storage/__init__.py
dupontz/libcloud
419c69441ea10e7bbf37319e5e8d02e82e7e6b40
[ "Apache-2.0" ]
5
2016-02-24T14:44:03.000Z
2020-11-29T19:18:40.000Z
libcloud/storage/__init__.py
dupontz/libcloud
419c69441ea10e7bbf37319e5e8d02e82e7e6b40
[ "Apache-2.0" ]
25
2015-03-23T16:05:19.000Z
2018-02-13T17:22:22.000Z
libcloud/storage/__init__.py
dupontz/libcloud
419c69441ea10e7bbf37319e5e8d02e82e7e6b40
[ "Apache-2.0" ]
4
2016-04-04T08:01:48.000Z
2018-06-06T08:04:36.000Z
""" Module for working with Storage """
10
31
0.675
true
true
f73ddfddb8c6c9de88a31ade8a1178a156a7af1a
714
py
Python
bot/help.py
thecryptoundertaker/discord-tip-bot
533b35530fab8c8e03496183df521ee31f50f612
[ "MIT" ]
null
null
null
bot/help.py
thecryptoundertaker/discord-tip-bot
533b35530fab8c8e03496183df521ee31f50f612
[ "MIT" ]
null
null
null
bot/help.py
thecryptoundertaker/discord-tip-bot
533b35530fab8c8e03496183df521ee31f50f612
[ "MIT" ]
2
2021-09-16T09:39:18.000Z
2021-10-11T03:59:07.000Z
from loguru import logger from bot import embeds @logger.catch def help_commands(bot): @bot.group(invoke_without_command=True) async def help(ctx): await ctx.send(embed=embeds.help()) @help.command() async def balance(ctx): await ctx.send(embed=embeds.help_balance()) @help.comma...
23.032258
52
0.658263
from loguru import logger from bot import embeds @logger.catch def help_commands(bot): @bot.group(invoke_without_command=True) async def help(ctx): await ctx.send(embed=embeds.help()) @help.command() async def balance(ctx): await ctx.send(embed=embeds.help_balance()) @help.comma...
true
true
f73ddfe1027f4b1ece28a7283d76ac29e6e7258d
671
py
Python
h2o-py/tests/testdir_algos/gbm/pyunit_get_model_gbm.py
Bhanuprakash-ch/h2o-3
c75bc5d2dc644cc8c09df755185a4cc6e34e0d1a
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_algos/gbm/pyunit_get_model_gbm.py
Bhanuprakash-ch/h2o-3
c75bc5d2dc644cc8c09df755185a4cc6e34e0d1a
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_algos/gbm/pyunit_get_model_gbm.py
Bhanuprakash-ch/h2o-3
c75bc5d2dc644cc8c09df755185a4cc6e34e0d1a
[ "Apache-2.0" ]
1
2020-01-22T19:10:37.000Z
2020-01-22T19:10:37.000Z
import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils def get_model_gbm(): prostate = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.csv")) prostate.describe() prostate[1] = prostate[1].asfactor() from h2o.estimators.gbm import H2OGradientBoostingEstimator ...
26.84
87
0.767511
import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils def get_model_gbm(): prostate = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.csv")) prostate.describe() prostate[1] = prostate[1].asfactor() from h2o.estimators.gbm import H2OGradientBoostingEstimator ...
true
true
f73ddffc793680e311cadda78efd71e501d92baf
1,970
py
Python
algorithms/stack/is_consecutive.py
zhengli0817/algorithms
3c98813f0329d9a5fff1107dbcd40e7f38d2275d
[ "MIT" ]
22,426
2017-01-17T04:01:44.000Z
2022-03-31T12:06:16.000Z
algorithms/stack/is_consecutive.py
zhengli0817/algorithms
3c98813f0329d9a5fff1107dbcd40e7f38d2275d
[ "MIT" ]
523
2017-04-18T12:05:11.000Z
2022-03-20T11:10:41.000Z
algorithms/stack/is_consecutive.py
zhengli0817/algorithms
3c98813f0329d9a5fff1107dbcd40e7f38d2275d
[ "MIT" ]
4,900
2017-01-19T23:47:05.000Z
2022-03-31T10:00:47.000Z
""" Given a stack, a function is_consecutive takes a stack as a parameter and that returns whether or not the stack contains a sequence of consecutive integers starting from the bottom of the stack (returning true if it does, returning false if it does not). For example: bottom [3, 4, 5, 6, 7] top Then the call of is_...
33.389831
79
0.653299
import collections def first_is_consecutive(stack): storage_stack = [] for i in range(len(stack)): first_value = stack.pop() if len(stack) == 0: return True second_value = stack.pop() if first_value - second_value != 1: return False ...
true
true
f73de04e5801a0180d233c6a7747838636ecbbaa
3,675
py
Python
mezzanine/blog/views.py
ShAlireza/mezzanine
365b3e3251f341f7337f79838796112f84ab94ad
[ "BSD-2-Clause" ]
6
2019-11-22T10:27:57.000Z
2020-07-21T22:55:20.000Z
mezzanine/blog/views.py
ShAlireza/mezzanine
365b3e3251f341f7337f79838796112f84ab94ad
[ "BSD-2-Clause" ]
7
2020-02-11T09:08:59.000Z
2020-07-23T12:55:44.000Z
mezzanine/blog/views.py
cjh79/mezzanine
37712f1a1023ac0ee7e2114ac4262cedfd7f4556
[ "BSD-2-Clause" ]
6
2019-12-13T12:58:21.000Z
2021-01-25T03:07:50.000Z
from calendar import month_name from django.contrib.auth import get_user_model from django.http import Http404 from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from django.utils.translation import ugettext_lazy as _ from mezzanine.blog.models import BlogPost, BlogCa...
32.8125
83
0.68517
from calendar import month_name from django.contrib.auth import get_user_model from django.http import Http404 from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from django.utils.translation import ugettext_lazy as _ from mezzanine.blog.models import BlogPost, BlogCa...
true
true
f73de0cf78faa821e681ebb950cc71213af5e281
1,630
py
Python
pinax/apps/tasks/tests/test_client.py
peiwei/pinax
34f95b1df4318655fe9bd90dcda8fe824e0c4117
[ "MIT" ]
1
2019-02-12T04:45:09.000Z
2019-02-12T04:45:09.000Z
pinax/apps/tasks/tests/test_client.py
alex/pinax
37e17ee2e2eb0e387d8809c12e55c20194a7118a
[ "MIT" ]
null
null
null
pinax/apps/tasks/tests/test_client.py
alex/pinax
37e17ee2e2eb0e387d8809c12e55c20194a7118a
[ "MIT" ]
1
2019-02-12T04:45:40.000Z
2019-02-12T04:45:40.000Z
# coding: utf-8 from django.test import TestCase rst_markup = """ Sample Header =============== Blah blah blah Lower Header ------------- Blah blah blah """ class TestAddForm(TestCase): fixtures = ["test_tasks.json"] urls = "tasks.tests.tasks_urls" def setUp(self): self.client.login(us...
24.69697
86
0.556442
from django.test import TestCase rst_markup = """ Sample Header =============== Blah blah blah Lower Header ------------- Blah blah blah """ class TestAddForm(TestCase): fixtures = ["test_tasks.json"] urls = "tasks.tests.tasks_urls" def setUp(self): self.client.login(username="admin",...
true
true
f73de13e696bebb11efeeedf0313d4ec29e6ba4e
1,343
py
Python
my_classes/.history/ModulesPackages_PackageNamespaces/example1/module1_20210726140241.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/.history/ModulesPackages_PackageNamespaces/example1/module1_20210726140241.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/.history/ModulesPackages_PackageNamespaces/example1/module1_20210726140241.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
from pprint import pprint print('----------- Running {0} --------'.format(__name__)) def pprint_dict(header, d): print('\n\n-----------------') print('****** {0} *****') # from pprint import pprint # print('------- Running {0} -----------'.format(__name__)) # def pprint_dict(header, d): # print(...
28.574468
119
0.501862
from pprint import pprint print('----------- Running {0} --------'.format(__name__)) def pprint_dict(header, d): print('\n\n-----------------') print('****** {0} *****') print('---------- End of {0} -------------'.format(__name__)) ...
true
true
f73de266f47a7fbf6575121646eda284072e9940
1,569
py
Python
thefuck/rules/apt_invalid_operation.py
juzim/thefuck
a3b2e6872b9e75b8a259375b9440246fdd181565
[ "MIT" ]
1
2021-12-13T18:41:46.000Z
2021-12-13T18:41:46.000Z
thefuck/rules/apt_invalid_operation.py
juzim/thefuck
a3b2e6872b9e75b8a259375b9440246fdd181565
[ "MIT" ]
4
2020-12-23T15:44:08.000Z
2020-12-23T16:48:59.000Z
thefuck/rules/apt_invalid_operation.py
juzim/thefuck
a3b2e6872b9e75b8a259375b9440246fdd181565
[ "MIT" ]
1
2019-12-08T19:23:06.000Z
2019-12-08T19:23:06.000Z
import subprocess from thefuck.specific.apt import apt_available from thefuck.specific.sudo import sudo_support from thefuck.utils import for_app, eager, replace_command enabled_by_default = apt_available @for_app('apt', 'apt-get', 'apt-cache') @sudo_support def match(command): return 'E: Invalid operation' in c...
27.526316
66
0.67304
import subprocess from thefuck.specific.apt import apt_available from thefuck.specific.sudo import sudo_support from thefuck.utils import for_app, eager, replace_command enabled_by_default = apt_available @for_app('apt', 'apt-get', 'apt-cache') @sudo_support def match(command): return 'E: Invalid operation' in c...
true
true
f73de47597685b133447c9e04ac8ad2dce7a88e8
2,971
py
Python
setting.py
myWillison/proxy_pool
2c89db1f976c0754ac4b8502053aa52f232bdf51
[ "MIT" ]
null
null
null
setting.py
myWillison/proxy_pool
2c89db1f976c0754ac4b8502053aa52f232bdf51
[ "MIT" ]
null
null
null
setting.py
myWillison/proxy_pool
2c89db1f976c0754ac4b8502053aa52f232bdf51
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: setting.py Description : 配置文件 Author : JHao date: 2019/2/15 ------------------------------------------------- Change Activity: 2019/2/15: -------------------------------------...
34.546512
92
0.431505
BANNER = r""" **************************************************************** *** ______ ********************* ______ *********** _ ******** *** | ___ \_ ******************** | ___ \ ********* | | ******** *** | |_/ / \__ __ __ _ __ _ | |_/ /___ * ___ | | ******** *** | __/| _// _ \ \ \/ /| | | || __// _ ...
true
true
f73de4f06476ba4ca0eb4145e7dcb7a6682462b8
3,749
py
Python
vendor/packages/translate-toolkit/translate/lang/af.py
DESHRAJ/fjord
8899b6286b23347c9b024334e61c33fe133e836d
[ "BSD-3-Clause" ]
null
null
null
vendor/packages/translate-toolkit/translate/lang/af.py
DESHRAJ/fjord
8899b6286b23347c9b024334e61c33fe133e836d
[ "BSD-3-Clause" ]
1
2021-12-13T20:55:07.000Z
2021-12-13T20:55:07.000Z
vendor/packages/translate-toolkit/translate/lang/af.py
DESHRAJ/fjord
8899b6286b23347c9b024334e61c33fe133e836d
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2007 Zuza Software Foundation # # This file is part of translate. # # translate is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of t...
33.176991
106
0.561483
import re from translate.lang import common articlere = re.compile(r"'n\b") class af(common.Common): validdoublewords = [u"u"] punctuation = u"".join([common.Common.commonpunc, common.Common.quotes, common.Common.miscpunc]) sentenceend = u".!?…" sent...
true
true
f73de554f940b45e634bb15b792ac534ad02242e
4,333
py
Python
sa_numeric.py
project-k-0-1/project-k
fa5be043a3c82daee992d28db25519e2b1b53289
[ "MIT" ]
1
2018-11-30T17:09:11.000Z
2018-11-30T17:09:11.000Z
sa_numeric.py
Kahroo/kahroo
fa5be043a3c82daee992d28db25519e2b1b53289
[ "MIT" ]
null
null
null
sa_numeric.py
Kahroo/kahroo
fa5be043a3c82daee992d28db25519e2b1b53289
[ "MIT" ]
2
2020-12-03T04:30:45.000Z
2021-04-21T09:59:37.000Z
""" Numerical functions """ import math import numpy as np import pymysql.cursors from sa_db import sa_db_access ACCESS_OBJ = sa_db_access() DB_USR = ACCESS_OBJ.username() DB_PWD = ACCESS_OBJ.password() DB_NAME = ACCESS_OBJ.db_name() DB_SRV = ACCESS_OBJ.db_server() def get_pct_change(ini_val, new_val): """ xxx """...
28.886667
92
0.543273
import math import numpy as np import pymysql.cursors from sa_db import sa_db_access ACCESS_OBJ = sa_db_access() DB_USR = ACCESS_OBJ.username() DB_PWD = ACCESS_OBJ.password() DB_NAME = ACCESS_OBJ.db_name() DB_SRV = ACCESS_OBJ.db_server() def get_pct_change(ini_val, new_val): if not new_val == 0: if new_val...
true
true
f73de5bd2fe7733a4afe751e1a41c515f4a54df6
6,389
py
Python
tests/benchmarks/test_benchmark_trpo.py
parachutel/garage
e9d4301278f5dd31e3cbd20df1422befa2d0b6c4
[ "MIT" ]
null
null
null
tests/benchmarks/test_benchmark_trpo.py
parachutel/garage
e9d4301278f5dd31e3cbd20df1422befa2d0b6c4
[ "MIT" ]
null
null
null
tests/benchmarks/test_benchmark_trpo.py
parachutel/garage
e9d4301278f5dd31e3cbd20df1422befa2d0b6c4
[ "MIT" ]
null
null
null
''' This script creates a regression test over garage-TRPO and baselines-TRPO. Unlike garage, baselines doesn't set max_path_length. It keeps steps the action until it's done. So we introduced tests.wrappers.AutoStopEnv wrapper to set done=True when it reaches max_path_length. We also need to change the garage.tf.samp...
30.864734
79
0.587885
import datetime import os.path as osp import random from baselines import logger as baselines_logger from baselines.bench import benchmarks from baselines.common.tf_util import _PLACEHOLDER_CACHE from baselines.ppo1.mlp_policy import MlpPolicy from baselines.trpo_mpi import trpo_mpi import dowel from dowel import logg...
true
true
f73de5e0f898f3f6c7ef23d93cf598aafbe36b71
5,348
py
Python
sir/__main__.py
mwiencek/sir
7c4c50b27367d4c2e2e2a29626801b12a9d4d388
[ "MIT" ]
null
null
null
sir/__main__.py
mwiencek/sir
7c4c50b27367d4c2e2e2a29626801b12a9d4d388
[ "MIT" ]
null
null
null
sir/__main__.py
mwiencek/sir
7c4c50b27367d4c2e2e2a29626801b12a9d4d388
[ "MIT" ]
1
2020-03-16T18:52:58.000Z
2020-03-16T18:52:58.000Z
# Copyright (c) 2014, 2015, 2019 Wieland Hoffmann, MetaBrainz Foundation # License: MIT, see LICENSE for details import argparse import logging import multiprocessing import ConfigParser import config from . import init_raven_client from .amqp.extension_generation import generate_extension from .amqp.handler import wa...
41.78125
87
0.557405
import argparse import logging import multiprocessing import ConfigParser import config from . import init_raven_client from .amqp.extension_generation import generate_extension from .amqp.handler import watch from .amqp.setup import setup_rabbitmq from .indexing import reindex from .schema import SCHEMA from .trigg...
true
true
f73de5f6974efd33dc8770d558734d12f313bd5c
985
py
Python
Python3/754.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
854
2018-11-09T08:06:16.000Z
2022-03-31T06:05:53.000Z
Python3/754.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
29
2019-06-02T05:02:25.000Z
2021-11-15T04:09:37.000Z
Python3/754.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
347
2018-12-23T01:57:37.000Z
2022-03-12T14:51:21.000Z
__________________________________________________________________________________________________ sample 24 ms submission class Solution: def reachNumber(self, target: int) -> int: # (n+1)*n/2....t t=abs(target) n=math.floor((t*2)**0.5) while True: diff=(n+1)*n/2-t ...
35.178571
98
0.59797
__________________________________________________________________________________________________ sample 24 ms submission class Solution: def reachNumber(self, target: int) -> int: t=abs(target) n=math.floor((t*2)**0.5) while True: diff=(n+1)*n/2-t if diff>=...
false
true