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
1c2edb8e78463062d4857c48a4c77384850b37df
660
py
Python
myblog/migrations/0001_initial.py
dahn510/MySite
5c2c0ccaf84e5f1e121742cd18a953cfb86f282d
[ "Apache-2.0" ]
null
null
null
myblog/migrations/0001_initial.py
dahn510/MySite
5c2c0ccaf84e5f1e121742cd18a953cfb86f282d
[ "Apache-2.0" ]
null
null
null
myblog/migrations/0001_initial.py
dahn510/MySite
5c2c0ccaf84e5f1e121742cd18a953cfb86f282d
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-30 07:08 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='BlogPost', fields=[ ...
26.4
117
0.592424
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='BlogPost', fields=[ ('id', models.BigAutoField(auto_created=T...
true
true
1c2edf1fee0d85ae37227aad5c672476c5e53e16
1,807
py
Python
_project/pullup/migrations/0005_auto_20181017_0710.py
SucheG/cayman-pullup.cz
a03bb58d5ff3ef3dba431bd4e900e6b3649c48f8
[ "CC0-1.0" ]
null
null
null
_project/pullup/migrations/0005_auto_20181017_0710.py
SucheG/cayman-pullup.cz
a03bb58d5ff3ef3dba431bd4e900e6b3649c48f8
[ "CC0-1.0" ]
null
null
null
_project/pullup/migrations/0005_auto_20181017_0710.py
SucheG/cayman-pullup.cz
a03bb58d5ff3ef3dba431bd4e900e6b3649c48f8
[ "CC0-1.0" ]
1
2018-10-08T16:56:40.000Z
2018-10-08T16:56:40.000Z
# Generated by Django 2.1 on 2018-10-17 05:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pullup', '0004_auto_20181013_2129'), ] operations = [ migrations.AlterField( model_name='cvik', name='popis', ...
30.627119
103
0.55451
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pullup', '0004_auto_20181013_2129'), ] operations = [ migrations.AlterField( model_name='cvik', name='popis', field=models.CharField(blank=True, max_le...
true
true
1c2edf4d52e16f95da9865d8966cfbe46406c474
1,469
py
Python
openstack_dashboard/test/integration_tests/tests/test_keypair.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/test/integration_tests/tests/test_keypair.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/test/integration_tests/tests/test_keypair.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Hewlett-Packard Development Company, L.P # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
40.805556
78
0.750851
import random from openstack_dashboard.test.integration_tests import helpers class TestKeypair(helpers.TestCase): KEYPAIR_NAME = 'horizonkeypair' + str(random.randint(0, 1000)) def test_keypair(self): accesssecurity_page = self.home_pg.go_to_accesssecurity_page() keypair_page ...
true
true
1c2ee0a267c36a7162841471d07e86b2c2ec3724
890
py
Python
alumno/migrations/0027_auto_20180822_2035.py
saulmestanza/Solicitudes
080f396025f75f21065251bd2af3f696d293ba3a
[ "Apache-2.0" ]
2
2018-08-17T20:32:20.000Z
2019-05-24T15:38:43.000Z
alumno/migrations/0027_auto_20180822_2035.py
saulmestanza/Solicitudes
080f396025f75f21065251bd2af3f696d293ba3a
[ "Apache-2.0" ]
null
null
null
alumno/migrations/0027_auto_20180822_2035.py
saulmestanza/Solicitudes
080f396025f75f21065251bd2af3f696d293ba3a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-08-22 20:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('alumno', '0026_auto_20180822_2028'), ] operations = [ migrations.AddField(...
34.230769
272
0.619101
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('alumno', '0026_auto_20180822_2028'), ] operations = [ migrations.AddField( model_name='procesoalumno', name='is_ok', ...
true
true
1c2ee25f38f6e94291b0701ca56f2e66b052b814
760
py
Python
pari/article/rich_text_filter.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
pari/article/rich_text_filter.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
pari/article/rich_text_filter.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
import os from lxml import html from mezzanine.conf import settings from pari.article.templatetags import article_tags def article_content_filter(content): html_content = html.fromstring(content) images = html_content.cssselect('img') for image in images: image_source = image.attrib['src'] ...
36.190476
138
0.701316
import os from lxml import html from mezzanine.conf import settings from pari.article.templatetags import article_tags def article_content_filter(content): html_content = html.fromstring(content) images = html_content.cssselect('img') for image in images: image_source = image.attrib['src'] ...
true
true
1c2ee300834393447e84078d49feb8c57b8a59bd
830
py
Python
app/analysis/validation_cluster.py
ayushmaskey/log_analysis
c777f48117ec8e14845aa8d2deccc7f974ca232a
[ "MIT" ]
null
null
null
app/analysis/validation_cluster.py
ayushmaskey/log_analysis
c777f48117ec8e14845aa8d2deccc7f974ca232a
[ "MIT" ]
null
null
null
app/analysis/validation_cluster.py
ayushmaskey/log_analysis
c777f48117ec8e14845aa8d2deccc7f974ca232a
[ "MIT" ]
null
null
null
import pandas as pd import matplotlib.pyplot as plt from matplotlib import style style.use("ggplot") from csv_to_pandas import csv_into_dict_of_data from wavelet_transformation import csv_into_wavelet_transformed_dict_of_dataframe from training_cluster import reorganize_data def get_validation_dataset(df): column_l...
21.842105
81
0.773494
import pandas as pd import matplotlib.pyplot as plt from matplotlib import style style.use("ggplot") from csv_to_pandas import csv_into_dict_of_data from wavelet_transformation import csv_into_wavelet_transformed_dict_of_dataframe from training_cluster import reorganize_data def get_validation_dataset(df): column_l...
true
true
1c2ee3d2606b49529f7b9264442bbf83e899ef4b
649
py
Python
detection/configs/lit/retinanet_lit_ti_fpn_1x_coco.py
MonashAI/LIT
ec0f1f5aad2cb95b1cdaff33fa13927650214e3d
[ "Apache-2.0" ]
22
2021-06-07T06:50:52.000Z
2021-08-17T06:43:08.000Z
detection/configs/lit/retinanet_lit_ti_fpn_1x_coco.py
zip-group/LIT
f076db8ab1aa15026ec2b2c018836c9b7aca8f63
[ "Apache-2.0" ]
3
2022-01-05T03:38:45.000Z
2022-03-10T08:30:04.000Z
detection/configs/lit/retinanet_lit_ti_fpn_1x_coco.py
zip-group/LIT
f076db8ab1aa15026ec2b2c018836c9b7aca8f63
[ "Apache-2.0" ]
5
2021-06-10T01:05:32.000Z
2021-08-07T10:07:40.000Z
_base_ = [ '../_base_/models/retinanet_fpn_lit_ti.py', '../_base_/datasets/coco_detection.py', '../_base_/default_runtime.py' ] model = dict( pretrained='pretrained/lit_ti.pth', neck=dict( type='FPN', in_channels=[64, 128, 320, 512], out_channels=256, start_level=1, ...
24.961538
62
0.640986
_base_ = [ '../_base_/models/retinanet_fpn_lit_ti.py', '../_base_/datasets/coco_detection.py', '../_base_/default_runtime.py' ] model = dict( pretrained='pretrained/lit_ti.pth', neck=dict( type='FPN', in_channels=[64, 128, 320, 512], out_channels=256, start_level=1, ...
true
true
1c2ee3d7b80f2d1f8891c87acc7d7425cc975d13
2,902
py
Python
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryDeviceEventDataRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryDeviceEventDataRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryDeviceEventDataRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.543478
79
0.754652
from aliyunsdkcore.request import RpcRequest from aliyunsdkiot.endpoint import endpoint_data class QueryDeviceEventDataRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Iot', '2018-01-20', 'QueryDeviceEventData','iot') self.set_method('POST') if hasattr(self, "endpoint_map...
true
true
1c2ee45118f224be9f3980dfcd157435795988ae
11,863
py
Python
pcdet/datasets/augmentor/data_augmentor.py
xiangruhuang/OpenPCDet
d82d9594a0629ffed0c457aedc304e0805e93221
[ "Apache-2.0" ]
null
null
null
pcdet/datasets/augmentor/data_augmentor.py
xiangruhuang/OpenPCDet
d82d9594a0629ffed0c457aedc304e0805e93221
[ "Apache-2.0" ]
null
null
null
pcdet/datasets/augmentor/data_augmentor.py
xiangruhuang/OpenPCDet
d82d9594a0629ffed0c457aedc304e0805e93221
[ "Apache-2.0" ]
null
null
null
from functools import partial import numpy as np from ...utils import common_utils from . import augmentor_utils, database_sampler, semantic_sampler, semantic_seg_sampler class DataAugmentor(object): def __init__(self, root_path, augmentor_configs, class_names, logger=None): self.root_path = root_path ...
41.479021
113
0.601956
from functools import partial import numpy as np from ...utils import common_utils from . import augmentor_utils, database_sampler, semantic_sampler, semantic_seg_sampler class DataAugmentor(object): def __init__(self, root_path, augmentor_configs, class_names, logger=None): self.root_path = root_path ...
true
true
1c2ee4726c1c1699a6bb0c73e2dd9b9878fac668
7,562
py
Python
lib/python3.8/site-packages/ansible_collections/cisco/nxos/plugins/modules/nxos_udld.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/cisco/nxos/plugins/modules/nxos_udld.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/cisco/nxos/plugins/modules/nxos_udld.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
28.216418
88
0.648109
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = """ module: nxos_udld extends_documentation_fragment: - cisco.nxos.nxos short_description: Manages UDLD global configuration params. description: - Manages UDLD global configuration params. version_...
true
true
1c2ee5d85db0b66a1aff18c7ef35bafdbba2899c
5,309
py
Python
transformer.py
maremun/mix-attend-break-sticks
db8221447fb993194641ba781e85005180f55421
[ "MIT" ]
null
null
null
transformer.py
maremun/mix-attend-break-sticks
db8221447fb993194641ba781e85005180f55421
[ "MIT" ]
null
null
null
transformer.py
maremun/mix-attend-break-sticks
db8221447fb993194641ba781e85005180f55421
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from modules import Linear, PosEncoding from layers import DecoderLayer import const device = torch.device("cuda" if torch.cuda.is_available() else "cpu") def proj_prob_simplex(inputs): # project updated weights onto a probability simplex # see https://arxiv.org/pdf/1101....
40.838462
98
0.650782
import torch import torch.nn as nn from modules import Linear, PosEncoding from layers import DecoderLayer import const device = torch.device("cuda" if torch.cuda.is_available() else "cpu") def proj_prob_simplex(inputs): sorted_inputs, sorted_idx = torch.sort(inputs.view(-1), descending=True) dim...
true
true
1c2ee622066742ed9f7959ccb5ed00e79d0a6029
1,504
py
Python
examples/example_queue.py
tamuctf/Akeso
05e6c284b45e1d1ec2d744a8508c9b03e3b5718e
[ "MIT" ]
19
2018-02-26T00:19:17.000Z
2019-12-18T04:26:45.000Z
examples/example_queue.py
tamuctf/Akeso
05e6c284b45e1d1ec2d744a8508c9b03e3b5718e
[ "MIT" ]
11
2018-05-07T15:11:30.000Z
2018-11-13T16:40:41.000Z
examples/example_queue.py
tamuctf/Akeso
05e6c284b45e1d1ec2d744a8508c9b03e3b5718e
[ "MIT" ]
2
2019-12-11T07:28:48.000Z
2021-05-30T07:41:57.000Z
import pika import json import sys import os import socket import binascii def callback(ch, method, properties, body): print json.loads(body)['msg'] ch.basic_ack(delivery_tag = method.delivery_tag) sys.exit() return credentials = pika.PlainCredentials('guest', 'guest') parameters = pika.ConnectionPar...
25.066667
77
0.710106
import pika import json import sys import os import socket import binascii def callback(ch, method, properties, body): print json.loads(body)['msg'] ch.basic_ack(delivery_tag = method.delivery_tag) sys.exit() return credentials = pika.PlainCredentials('guest', 'guest') parameters = pika.ConnectionPar...
false
true
1c2ee79c50e5332807a24a1c5c70089c0090c76c
91
py
Python
loadCSVdata.py
christostsekouronas/academyposttestanalysis
913a0c13ad0482927a323b2fb3a97a8e2ca26517
[ "MIT" ]
null
null
null
loadCSVdata.py
christostsekouronas/academyposttestanalysis
913a0c13ad0482927a323b2fb3a97a8e2ca26517
[ "MIT" ]
null
null
null
loadCSVdata.py
christostsekouronas/academyposttestanalysis
913a0c13ad0482927a323b2fb3a97a8e2ca26517
[ "MIT" ]
null
null
null
import pandas as pd def loadTest(filepath): df = pd.read_csv(filepath) return df
13
30
0.692308
import pandas as pd def loadTest(filepath): df = pd.read_csv(filepath) return df
true
true
1c2ee820ca300e6484368fbe2c84cdbd5011a1de
16,352
py
Python
socrata/sources.py
sbuss/socrata-py
cc909cf988cb027c75c948261ef622c1e7d93f89
[ "Apache-2.0" ]
null
null
null
socrata/sources.py
sbuss/socrata-py
cc909cf988cb027c75c948261ef622c1e7d93f89
[ "Apache-2.0" ]
null
null
null
socrata/sources.py
sbuss/socrata-py
cc909cf988cb027c75c948261ef622c1e7d93f89
[ "Apache-2.0" ]
null
null
null
import json import io import webbrowser import types from time import sleep from socrata.http import post, put, patch, get, noop, UnexpectedResponseException from socrata.resource import Resource, Collection, ChildResourceSpec from socrata.input_schema import InputSchema from socrata.builders.parse_options import Parse...
30.621723
126
0.561705
import json import io import webbrowser import types from time import sleep from socrata.http import post, put, patch, get, noop, UnexpectedResponseException from socrata.resource import Resource, Collection, ChildResourceSpec from socrata.input_schema import InputSchema from socrata.builders.parse_options import Parse...
true
true
1c2ee82a4987c9c1f21543e89621500bb82375ac
1,686
py
Python
pycom_wpa2enterprise/pycom_eduroam/main.py
AidanTek/Fab-Cre8_IoT
3d358a484aea2e2a50d6dbef443e9a2757ef9ab8
[ "MIT" ]
null
null
null
pycom_wpa2enterprise/pycom_eduroam/main.py
AidanTek/Fab-Cre8_IoT
3d358a484aea2e2a50d6dbef443e9a2757ef9ab8
[ "MIT" ]
null
null
null
pycom_wpa2enterprise/pycom_eduroam/main.py
AidanTek/Fab-Cre8_IoT
3d358a484aea2e2a50d6dbef443e9a2757ef9ab8
[ "MIT" ]
null
null
null
import machine import ubinascii from network import WLAN from time import sleep import socket # import urllib.urequest # Network SSID = 'eduroam' # Network Name User = 'fablab@cardiffmet.ac.uk' Password = 'Fa6La6!' # Network password deviceID = 'LoPy4Test' certPath = '/flash/cert/pfencehaca.cer' # WiFi init: station ...
24.085714
106
0.619217
import machine import ubinascii from network import WLAN from time import sleep import socket SSID = 'eduroam' User = 'fablab@cardiffmet.ac.uk' Password = 'Fa6La6!' deviceID = 'LoPy4Test' certPath = '/flash/cert/pfencehaca.cer' station = WLAN(mode=WLAN.STA) def WiFiConnect(): station.connect(ssid=SSID,...
true
true
1c2ee9c5427419198923611955b780899e8542f4
657
py
Python
appengine_config.py
dhermes/google-auth-on-gae
c1679def9f045761364c878259b6f269f361db21
[ "Apache-2.0" ]
null
null
null
appengine_config.py
dhermes/google-auth-on-gae
c1679def9f045761364c878259b6f269f361db21
[ "Apache-2.0" ]
null
null
null
appengine_config.py
dhermes/google-auth-on-gae
c1679def9f045761364c878259b6f269f361db21
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google 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 required by applicable law or a...
34.578947
74
0.762557
from google.appengine.ext import vendor vendor.add('lib')
true
true
1c2eeb7cba3beb1dfcbc46aa03ae33a079d25fe3
26,780
py
Python
atomate/vasp/workflows/tests/test_vasp_workflows.py
rwoodsrobinson/atomate
231566fd16e0b89637efc60ad2bf35417f03164a
[ "BSD-3-Clause-LBNL" ]
3
2021-08-02T09:19:20.000Z
2022-03-28T17:37:47.000Z
atomate/vasp/workflows/tests/test_vasp_workflows.py
rwoodsrobinson/atomate
231566fd16e0b89637efc60ad2bf35417f03164a
[ "BSD-3-Clause-LBNL" ]
null
null
null
atomate/vasp/workflows/tests/test_vasp_workflows.py
rwoodsrobinson/atomate
231566fd16e0b89637efc60ad2bf35417f03164a
[ "BSD-3-Clause-LBNL" ]
1
2021-07-27T06:12:56.000Z
2021-07-27T06:12:56.000Z
# coding: utf-8 import json import os import unittest import zlib import gridfs from pymongo import DESCENDING from fireworks import FWorker from fireworks.core.rocket_launcher import rapidfire from atomate.vasp.powerups import use_custodian, add_namefile, use_fake_vasp, add_trackers, add_bandgap_check, use_potcar...
43.973727
153
0.606983
import json import os import unittest import zlib import gridfs from pymongo import DESCENDING from fireworks import FWorker from fireworks.core.rocket_launcher import rapidfire from atomate.vasp.powerups import use_custodian, add_namefile, use_fake_vasp, add_trackers, add_bandgap_check, use_potcar_spec from atom...
true
true
1c2eebecf3748d6fc1074e03462bcc4d87ea5db7
6,599
py
Python
crawling/crawling_py/jungangilbo.py
ossteam8/oss8_proj
341ba45ed47d633665f9a8337cd8df7227cb16c2
[ "MIT" ]
3
2021-06-08T08:38:13.000Z
2021-06-08T08:38:58.000Z
crawling/crawling_py/jungangilbo.py
ossteam8/K-news_keyword
341ba45ed47d633665f9a8337cd8df7227cb16c2
[ "MIT" ]
15
2021-06-04T16:33:34.000Z
2021-06-06T10:05:17.000Z
crawling/crawling_py/jungangilbo.py
ossteam8/oss8_proj
341ba45ed47d633665f9a8337cd8df7227cb16c2
[ "MIT" ]
null
null
null
import re from goose3 import Goose from goose3.text import StopWordsKorean from bs4 import BeautifulSoup from datetime import datetime from dateutil.relativedelta import relativedelta from urllib.request import Request, urlopen class Jungang_crawling: def __init__(self): self.categories = ['정치','경제','사회'] ...
36.458564
99
0.499167
import re from goose3 import Goose from goose3.text import StopWordsKorean from bs4 import BeautifulSoup from datetime import datetime from dateutil.relativedelta import relativedelta from urllib.request import Request, urlopen class Jungang_crawling: def __init__(self): self.categories = ['정치','경제','사회'] ...
true
true
1c2eec932eef4602e4643852719061196d05fb90
3,993
py
Python
meshgraphnets/cloth_model.py
juliandwain/deepmind-research
eca5fe66ad770027f4dd758d3a659cd8261bace5
[ "Apache-2.0" ]
null
null
null
meshgraphnets/cloth_model.py
juliandwain/deepmind-research
eca5fe66ad770027f4dd758d3a659cd8261bace5
[ "Apache-2.0" ]
null
null
null
meshgraphnets/cloth_model.py
juliandwain/deepmind-research
eca5fe66ad770027f4dd758d3a659cd8261bace5
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # pylint: disable=g-bad-file-header # Copyright 2020 DeepMind Technologies 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.a...
39.93
79
0.699725
import sonnet as snt import tensorflow.compat.v1 as tf import common import core_model import normalization class Model(snt.AbstractModule): def __init__(self, learned_model, name='Model'): super(Model, self).__init__(name=name) with self._enter_variable_scope(): self._learned_model ...
true
true
1c2eecb12f118abb6490f29e8567d6fc8180197e
1,622
py
Python
36. tkinter basics 1 - Intro.py
JatinR05/Python-3-basics-series
e4b3d8056e2074602c9ed0cd201676484dd0d179
[ "MIT" ]
41
2015-05-12T12:49:35.000Z
2021-07-13T11:07:09.000Z
36. tkinter basics 1 - Intro.py
JatinR05/Python-3-basics-series
e4b3d8056e2074602c9ed0cd201676484dd0d179
[ "MIT" ]
null
null
null
36. tkinter basics 1 - Intro.py
JatinR05/Python-3-basics-series
e4b3d8056e2074602c9ed0cd201676484dd0d179
[ "MIT" ]
37
2016-10-13T04:02:09.000Z
2021-12-16T18:28:27.000Z
''' Hello and welcome to a basic intro to TKinter, which is the Python binding to TK, which is a toolkit that works around the Tcl language. The tkinter module purpose to to generate GUIs, like windows. Python is not very popularly used for this purpose, but it is more than capable of being used ''' # Simple enough...
27.033333
80
0.673243
from tkinter import * class Window(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.master = master #self.init_window() #Creation of init_window #def init_window(self...
true
true
1c2eecf1ee9a695c0785654a2597cefd3865d1b2
36,206
py
Python
maraboupy/MarabouNetworkONNX.py
noyahoch/Marabou
03eb551498287e5372d462e3c2ad4fcc3210a5fa
[ "BSD-3-Clause" ]
null
null
null
maraboupy/MarabouNetworkONNX.py
noyahoch/Marabou
03eb551498287e5372d462e3c2ad4fcc3210a5fa
[ "BSD-3-Clause" ]
null
null
null
maraboupy/MarabouNetworkONNX.py
noyahoch/Marabou
03eb551498287e5372d462e3c2ad4fcc3210a5fa
[ "BSD-3-Clause" ]
null
null
null
''' /* ******************* */ /*! \file MarabouNetworkONNX.py ** \verbatim ** Top contributors (to current version): ** Kyle Julian ** This file is part of the Marabou project. ** Copyright (c) 2017-2019 by the authors listed in the file AUTHORS ** in the t...
44.42454
131
0.587996
import numpy as np import onnx import onnxruntime from onnx import numpy_helper from onnx.helper import get_attribute_value from maraboupy import MarabouUtils from maraboupy import MarabouNetwork from onnx import TensorProto class MarabouNetworkONNX(MarabouNetwork.MarabouNetwork): def __init__(self, filename, inp...
true
true
1c2eed504e370d1e47ed2225ee6c0c10dfed73e2
7,601
py
Python
app/pre_demultiplexing_data_api.py
imperial-genomics-facility/IGFPortal
0a61ecbfc1ac71775ad12d7cf13d09512ad71380
[ "Apache-2.0" ]
null
null
null
app/pre_demultiplexing_data_api.py
imperial-genomics-facility/IGFPortal
0a61ecbfc1ac71775ad12d7cf13d09512ad71380
[ "Apache-2.0" ]
null
null
null
app/pre_demultiplexing_data_api.py
imperial-genomics-facility/IGFPortal
0a61ecbfc1ac71775ad12d7cf13d09512ad71380
[ "Apache-2.0" ]
null
null
null
import json, logging from flask_appbuilder import ModelRestApi from flask import request from flask_appbuilder.api import expose from flask_appbuilder.models.sqla.interface import SQLAInterface from flask_appbuilder.security.decorators import protect from . import db from .models import PreDeMultiplexingData """ P...
41.535519
92
0.63689
import json, logging from flask_appbuilder import ModelRestApi from flask import request from flask_appbuilder.api import expose from flask_appbuilder.models.sqla.interface import SQLAInterface from flask_appbuilder.security.decorators import protect from . import db from .models import PreDeMultiplexingData def searc...
true
true
1c2eef133d6fc75b858afe9960a2cac36a14f3f5
101
py
Python
networking_mrv/__init__.py
iljatab/ml2-mech
336873605f41769213d2895441cc7a1bd78fe6c0
[ "Apache-1.1" ]
null
null
null
networking_mrv/__init__.py
iljatab/ml2-mech
336873605f41769213d2895441cc7a1bd78fe6c0
[ "Apache-1.1" ]
null
null
null
networking_mrv/__init__.py
iljatab/ml2-mech
336873605f41769213d2895441cc7a1bd78fe6c0
[ "Apache-1.1" ]
null
null
null
import pbr.version __version__ = pbr.version.VersionInfo( 'networking_mrv').version_string()
12.625
38
0.752475
import pbr.version __version__ = pbr.version.VersionInfo( 'networking_mrv').version_string()
true
true
1c2ef06b5cec4cd98c295ed3006362984d2b223c
12,565
py
Python
caproto/_status.py
mrakitin/caproto
ad49ffbe1a69ddc63cac9ec7f1a3468a4965e465
[ "BSD-3-Clause" ]
12
2019-05-25T14:26:25.000Z
2022-01-24T09:10:18.000Z
caproto/_status.py
mrakitin/caproto
ad49ffbe1a69ddc63cac9ec7f1a3468a4965e465
[ "BSD-3-Clause" ]
333
2017-06-22T03:10:15.000Z
2019-05-07T16:37:20.000Z
caproto/_status.py
mrakitin/caproto
ad49ffbe1a69ddc63cac9ec7f1a3468a4965e465
[ "BSD-3-Clause" ]
17
2019-07-03T18:17:22.000Z
2022-03-22T00:24:20.000Z
# Represent each CA Status Code as a namedtuple encapulating associated numeric # codes and human-readable attributes. # The CAStatus Enum maps each name (like 'ECA_NORMAL') to a CAStatusCode # instance. from enum import IntEnum, Enum from collections import namedtuple __all__ = ('CAStatus', 'CASeverity') CAStatus...
41.196721
79
0.669001
from enum import IntEnum, Enum from collections import namedtuple __all__ = ('CAStatus', 'CASeverity') CAStatusCode = namedtuple('CAStatusCode', 'name code code_with_severity severity success ' 'defunct description') class CASeverity(IntEnum): INFO = 3 ...
true
true
1c2ef098e30d95886546c9711570c82a2094e371
3,318
py
Python
todo_drf/settings.py
stifferdoroskevich/DRF_TODO_APP
7c2747970f30765edc730d96aad43ef6e2a9abbb
[ "MIT" ]
null
null
null
todo_drf/settings.py
stifferdoroskevich/DRF_TODO_APP
7c2747970f30765edc730d96aad43ef6e2a9abbb
[ "MIT" ]
null
null
null
todo_drf/settings.py
stifferdoroskevich/DRF_TODO_APP
7c2747970f30765edc730d96aad43ef6e2a9abbb
[ "MIT" ]
null
null
null
""" Django settings for todo_drf project. Generated by 'django-admin startproject' using Django 3.2.3. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pathli...
25.72093
91
0.699216
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent with open('/home/stiffer/projects/KEYS/django_secret_key.txt') as f: SECRET_KEY = f.read().strip() DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.aut...
true
true
1c2ef1d5f17d3fdb3154cd74cc4dcbb56149efa8
316
py
Python
python/JournalTimeStamp.Description.py
BIMpraxis/Journalysis
af0c042b28d01ba5e44dafc2bbe9556434e897b8
[ "MIT" ]
26
2017-11-23T19:30:03.000Z
2022-02-09T10:35:10.000Z
python/JournalTimeStamp.Description.py
BIMpraxis/Journalysis
af0c042b28d01ba5e44dafc2bbe9556434e897b8
[ "MIT" ]
51
2017-11-16T15:02:32.000Z
2022-03-01T13:51:58.000Z
python/JournalTimeStamp.Description.py
BIMpraxis/Journalysis
af0c042b28d01ba5e44dafc2bbe9556434e897b8
[ "MIT" ]
9
2017-11-20T09:20:01.000Z
2021-09-15T13:08:30.000Z
import clr def process_input(func, input): if isinstance(input, list): return [func(x) for x in input] else: return func(input) def journalTimeStampDescription(input): if input.__repr__() == 'JournalTimeStamp': return input.Description else: return None OUT = process_input(journalTimeStampDescription,IN[0])
28.727273
68
0.772152
import clr def process_input(func, input): if isinstance(input, list): return [func(x) for x in input] else: return func(input) def journalTimeStampDescription(input): if input.__repr__() == 'JournalTimeStamp': return input.Description else: return None OUT = process_input(journalTimeStampDescription,IN[0])
true
true
1c2ef1f58935801850349dc48593c76787ad4780
5,370
py
Python
pgAdmin/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_get_dictionaries.py
WeilerWebServices/PostgreSQL
ae594ed077bebbad1be3c1d95c38b7c2c2683e8c
[ "PostgreSQL" ]
null
null
null
pgAdmin/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_get_dictionaries.py
WeilerWebServices/PostgreSQL
ae594ed077bebbad1be3c1d95c38b7c2c2683e8c
[ "PostgreSQL" ]
null
null
null
pgAdmin/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_get_dictionaries.py
WeilerWebServices/PostgreSQL
ae594ed077bebbad1be3c1d95c38b7c2c2683e8c
[ "PostgreSQL" ]
null
null
null
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2020, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## import uuid from...
44.016393
79
0.613035
true
true
1c2ef31514c7d509ea3f4e1e79f2a7291f35bc8b
4,174
py
Python
nuitka/utils/Download.py
pkulev/Nuitka
e7b246ad0dcdef16398cecf1013cb7a03a6fe721
[ "Apache-2.0" ]
1
2021-05-25T12:48:28.000Z
2021-05-25T12:48:28.000Z
nuitka/utils/Download.py
pkulev/Nuitka
e7b246ad0dcdef16398cecf1013cb7a03a6fe721
[ "Apache-2.0" ]
null
null
null
nuitka/utils/Download.py
pkulev/Nuitka
e7b246ad0dcdef16398cecf1013cb7a03a6fe721
[ "Apache-2.0" ]
null
null
null
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
30.246377
93
0.629612
import os from nuitka import Tracing from nuitka.__past__ import ( raw_input, urlretrieve, ) from nuitka.utils import Utils from .AppDirs import getAppDir from .FileOperations import addFileExecutablePermission, deleteFile, makePath def getCachedDownload( url, binary, flatten...
true
true
1c2ef394b50092493cbc4ba243d5fe0be602a15b
790
py
Python
applications/StructuralMechanicsApplication/python_scripts/auxiliar_methods_solvers.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
778
2017-01-27T16:29:17.000Z
2022-03-30T03:01:51.000Z
applications/StructuralMechanicsApplication/python_scripts/auxiliar_methods_solvers.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
6,634
2017-01-15T22:56:13.000Z
2022-03-31T15:03:36.000Z
applications/StructuralMechanicsApplication/python_scripts/auxiliar_methods_solvers.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
224
2017-02-07T14:12:49.000Z
2022-03-06T23:09:34.000Z
# Importing the Kratos Library import KratosMultiphysics as KM def GetBDFIntegrationOrder(scheme_type): if scheme_type == "backward_euler": order = 1 else: if scheme_type == "bdf": raise Exception('Wrong input for scheme type: "bdf"! Please append the order to the bdf-scheme, e.g. ...
41.578947
252
0.682278
import KratosMultiphysics as KM def GetBDFIntegrationOrder(scheme_type): if scheme_type == "backward_euler": order = 1 else: if scheme_type == "bdf": raise Exception('Wrong input for scheme type: "bdf"! Please append the order to the bdf-scheme, e.g. "bdf2"') orde...
true
true
1c2ef4f00c256d8050804727ce8a2fb3e0de9f5d
16,989
py
Python
src/utsc/core/_vendor/bluecat_libraries/address_manager/api/models.py
utsc-networking/utsc-tools
d5bc10cf825f1be46999d5a42da62cc0df456f0c
[ "MIT" ]
null
null
null
src/utsc/core/_vendor/bluecat_libraries/address_manager/api/models.py
utsc-networking/utsc-tools
d5bc10cf825f1be46999d5a42da62cc0df456f0c
[ "MIT" ]
null
null
null
src/utsc/core/_vendor/bluecat_libraries/address_manager/api/models.py
utsc-networking/utsc-tools
d5bc10cf825f1be46999d5a42da62cc0df456f0c
[ "MIT" ]
null
null
null
# Copyright 2021 BlueCat Networks (USA) Inc. and its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. """Models representing all Address Manager object types supported in the API.""" import copy import json from .serializat...
40.643541
147
0.647949
import copy import json from .serialization import ( deserialize_joined_key_value_pairs, serialize_joined_key_value_pairs, serialize_joined_values, serialize_possible_list, deserialize_possible_list, ) class APIEntity(dict): @staticmethod def to_raw_model(data: dict) -> dict: ...
true
true
1c2ef4f5f308b647a88f60219f1a73c6c1f9e275
8,111
py
Python
tests/app/main/helpers/validation/test_g7_declaration.py
uk-gov-mirror/alphagov.digitalmarketplace-supplier-frontend
cf9d06cffe95c436f056cc9c967e9ef8a25381a4
[ "MIT" ]
7
2015-11-21T20:43:37.000Z
2020-07-22T13:20:18.000Z
tests/app/main/helpers/validation/test_g7_declaration.py
uk-gov-mirror/alphagov.digitalmarketplace-supplier-frontend
cf9d06cffe95c436f056cc9c967e9ef8a25381a4
[ "MIT" ]
783
2015-04-07T16:34:57.000Z
2021-07-27T12:13:02.000Z
tests/app/main/helpers/validation/test_g7_declaration.py
uk-gov-mirror/alphagov.digitalmarketplace-supplier-frontend
cf9d06cffe95c436f056cc9c967e9ef8a25381a4
[ "MIT" ]
20
2015-06-13T15:37:23.000Z
2021-04-10T18:02:09.000Z
# -*- coding: utf-8 -*- from app.main.helpers.validation import G7Validator, get_validator from app.main import content_loader FULL_G7_SUBMISSION = { "PR1": True, "PR2": True, "PR3": True, "PR4": True, "PR5": True, "SQ1-1i-i": True, "SQ2-1abcd": True, "SQ2-1e": True, "SQ2-1f": True...
30.264925
101
0.635063
from app.main.helpers.validation import G7Validator, get_validator from app.main import content_loader FULL_G7_SUBMISSION = { "PR1": True, "PR2": True, "PR3": True, "PR4": True, "PR5": True, "SQ1-1i-i": True, "SQ2-1abcd": True, "SQ2-1e": True, "SQ2-1f": True, "SQ2-1ghijklmn": ...
true
true
1c2ef6dccb38beef35f29ad77ea7c53c573111c8
9,323
py
Python
armi/reactor/assemblyLists.py
MattGreav/test
f6bc7dcefd8b498b71fb92808ee70496f2206231
[ "Apache-2.0" ]
null
null
null
armi/reactor/assemblyLists.py
MattGreav/test
f6bc7dcefd8b498b71fb92808ee70496f2206231
[ "Apache-2.0" ]
null
null
null
armi/reactor/assemblyLists.py
MattGreav/test
f6bc7dcefd8b498b71fb92808ee70496f2206231
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
35.448669
118
0.602059
import abc import itertools from armi import runLog from armi.utils import units from armi.reactor import grids from armi.reactor import composites from armi.reactor.flags import Flags class AutoFiller(abc.ABC): def getNextLocation(self, a) -> grids.LocationBase: def assemblyAdded(self, a): ...
true
true
1c2ef76024d7b737707cdc6ecf0cee5754fa74c3
2,400
py
Python
14/recipe.py
Keilan/advent-of-code-2018
3f3b4952c3633df4008e734da15e219fa67ec635
[ "MIT" ]
null
null
null
14/recipe.py
Keilan/advent-of-code-2018
3f3b4952c3633df4008e734da15e219fa67ec635
[ "MIT" ]
null
null
null
14/recipe.py
Keilan/advent-of-code-2018
3f3b4952c3633df4008e734da15e219fa67ec635
[ "MIT" ]
null
null
null
def perform_attempt(scoreboard, index1, index2): # Get new scores combined = scoreboard[index1] + scoreboard[index2] score1 = combined // 10 score2 = combined % 10 # Update scoreboard scores_added = [] if score1 != 0: scores_added.append(score1) scores_added.append(score2) s...
28.235294
91
0.619583
def perform_attempt(scoreboard, index1, index2): combined = scoreboard[index1] + scoreboard[index2] score1 = combined // 10 score2 = combined % 10 scores_added = [] if score1 != 0: scores_added.append(score1) scores_added.append(score2) scoreboard.extend(scores_added) ...
true
true
1c2ef7a70c702537518d5a8441086e69cd29de52
1,875
py
Python
parser/team27/G-27/execution/function/trigonometric/asin.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
parser/team27/G-27/execution/function/trigonometric/asin.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
parser/team27/G-27/execution/function/trigonometric/asin.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from execution.abstract.function import * from execution.symbol.typ import * from libraries.trigonometric_functions import asin class Asin(Function): def __init__(self, input, row, column): Function.__init__(self,row,column) self.input = input def execute(self, environment): #input...
52.083333
193
0.5632
from execution.abstract.function import * from execution.symbol.typ import * from libraries.trigonometric_functions import asin class Asin(Function): def __init__(self, input, row, column): Function.__init__(self,row,column) self.input = input def execute(self, environment): ...
true
true
1c2ef813d7f16c4fe3c34d616adbed3c7bba2819
18,954
py
Python
google/ads/googleads/v8/services/services/product_bidding_category_constant_service/client.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
285
2018-10-05T16:47:58.000Z
2022-03-31T00:58:39.000Z
google/ads/googleads/v8/services/services/product_bidding_category_constant_service/client.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
425
2018-09-10T13:32:41.000Z
2022-03-31T14:50:05.000Z
google/ads/googleads/v8/services/services/product_bidding_category_constant_service/client.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
369
2018-11-28T07:01:00.000Z
2022-03-28T09:53:22.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
41.565789
196
0.647937
from collections import OrderedDict from distutils import util import os import re from typing import Dict, Optional, Sequence, Tuple, Type, Union from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions from google.api_core import ga...
true
true
1c2ef81485b97a49069d91271d4f6e8e453305b3
1,961
py
Python
capstone/capdb/tests/test_versioning.py
jcushman/capstone
ef3ced77f69aabe14c89ab67003a6e88736bf777
[ "MIT" ]
null
null
null
capstone/capdb/tests/test_versioning.py
jcushman/capstone
ef3ced77f69aabe14c89ab67003a6e88736bf777
[ "MIT" ]
4
2021-09-02T20:54:31.000Z
2022-02-27T14:04:06.000Z
capstone/capdb/tests/test_versioning.py
jcushman/capstone
ef3ced77f69aabe14c89ab67003a6e88736bf777
[ "MIT" ]
null
null
null
from copy import deepcopy import pytest from django.db import transaction from scripts.helpers import parse_xml, serialize_xml @pytest.mark.parametrize('versioned_fixture_name', [ 'volume_xml', 'case_xml', 'page_xml' ]) @pytest.mark.django_db(transaction=True) def test_versioning(versioned_fixture_name,...
37
91
0.760836
from copy import deepcopy import pytest from django.db import transaction from scripts.helpers import parse_xml, serialize_xml @pytest.mark.parametrize('versioned_fixture_name', [ 'volume_xml', 'case_xml', 'page_xml' ]) @pytest.mark.django_db(transaction=True) def test_versioning(versioned_fixture_name,...
true
true
1c2ef995372fc9c30e32044a35e8087c8c35d3f7
3,507
py
Python
tests-deprecating/milvus_benchmark/milvus_benchmark/metrics/models/metric.py
CyberFlameGO/milvus
c6ebae89598c4198fa44ea02f8a60219b21fbffd
[ "Apache-2.0" ]
10,504
2019-09-16T12:20:11.000Z
2022-03-31T15:07:56.000Z
tests-deprecating/milvus_benchmark/milvus_benchmark/metrics/models/metric.py
CyberFlameGO/milvus
c6ebae89598c4198fa44ea02f8a60219b21fbffd
[ "Apache-2.0" ]
13,389
2019-09-16T06:49:53.000Z
2022-03-31T18:01:24.000Z
tests-deprecating/milvus_benchmark/milvus_benchmark/metrics/models/metric.py
CyberFlameGO/milvus
c6ebae89598c4198fa44ea02f8a60219b21fbffd
[ "Apache-2.0" ]
1,792
2019-09-18T04:27:42.000Z
2022-03-31T14:37:20.000Z
import time import datetime import json import hashlib from .env import Env from .server import Server from .hardware import Hardware class Metric(object): """ A template for reporting data: { "_id" : ObjectId("6126865855aba6fb8e742f05"), "_version" : "0.1", "_type" : "case", ...
26.770992
64
0.437411
import time import datetime import json import hashlib from .env import Env from .server import Server from .hardware import Hardware class Metric(object): def __init__(self): self._version = '0.1' self._type = 'metric' self.run_id = None self.mode = None self.server = Serv...
true
true
1c2ef9b593c702ed9b0441bcdae7e77d0db8f9b9
16,106
py
Python
jax_md/space.py
pmistani/jax-md
125c6922c1bc09df33d6a9934f50ea1321e02e73
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax_md/space.py
pmistani/jax-md
125c6922c1bc09df33d6a9934f50ea1321e02e73
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax_md/space.py
pmistani/jax-md
125c6922c1bc09df33d6a9934f50ea1321e02e73
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.870824
103
0.688191
from typing import Callable, Union, Tuple, Any, Optional from jax.abstract_arrays import ShapedArray from jax import eval_shape from jax import vmap from jax import custom_jvp import jax import jax.numpy as jnp from jax_md.util import Array from jax_md.util import f32 from jax_md.util import f64 fro...
true
true
1c2efae827fb9292634f95c87c7625ff9d6887a5
9,423
py
Python
src/datadog_api_client/v1/model/notebook_update_cell.py
rchenzheng/datadog-api-client-python
2e86ac098c6f0c7fdd90ed218224587c0f8eafef
[ "Apache-2.0" ]
null
null
null
src/datadog_api_client/v1/model/notebook_update_cell.py
rchenzheng/datadog-api-client-python
2e86ac098c6f0c7fdd90ed218224587c0f8eafef
[ "Apache-2.0" ]
null
null
null
src/datadog_api_client/v1/model/notebook_update_cell.py
rchenzheng/datadog-api-client-python
2e86ac098c6f0c7fdd90ed218224587c0f8eafef
[ "Apache-2.0" ]
null
null
null
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. import re # noqa: F401 import sys # noqa: F401 from datadog_api_client.v1.model_uti...
40.969565
119
0.609148
import re import sys from datadog_api_client.v1.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_i...
true
true
1c2efb5426c722d309f0b0ac145a4d76849b91f0
3,310
py
Python
infra/bots/recipes/sync_and_compile.py
mohad12211/skia
042a53aa094715e031ebad4da072524ace316744
[ "BSD-3-Clause" ]
3
2019-03-07T17:01:23.000Z
2021-07-03T22:01:36.000Z
infra/bots/recipes/sync_and_compile.py
mohad12211/skia
042a53aa094715e031ebad4da072524ace316744
[ "BSD-3-Clause" ]
2
2021-09-10T03:50:52.000Z
2021-09-10T07:10:19.000Z
infra/bots/recipes/sync_and_compile.py
mohad12211/skia
042a53aa094715e031ebad4da072524ace316744
[ "BSD-3-Clause" ]
14
2015-07-17T17:23:53.000Z
2020-07-06T21:06:57.000Z
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Recipe module for Skia Swarming compile. DEPS = [ 'build', 'checkout', 'recipe_engine/context', 'recipe_engine/file', 'recipe_engine/json', ...
27.131148
73
0.667976
DEPS = [ 'build', 'checkout', 'recipe_engine/context', 'recipe_engine/file', 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine/python', 'recipe_engine/step', 'run', 'vars', ] def RunSteps(api): api.vars.setup() bot_...
true
true
1c2efb9c64196093b7fed95dedf803456c33d37b
522
py
Python
src/flash/demo_lcd.py
gr4viton/esp_fun
28f74ce50c16555705ecee97336ae28c7fd86704
[ "MIT" ]
1
2020-02-23T22:28:32.000Z
2020-02-23T22:28:32.000Z
src/flash/demo_lcd.py
gr4viton/esp_fun
28f74ce50c16555705ecee97336ae28c7fd86704
[ "MIT" ]
null
null
null
src/flash/demo_lcd.py
gr4viton/esp_fun
28f74ce50c16555705ecee97336ae28c7fd86704
[ "MIT" ]
null
null
null
import time import machine from .esp8266_i2c_lcd import I2cLcd i2c = machine.I2C(-1, machine.Pin(5), machine.Pin(4), freq=400000) lcd = I2cLcd(i2c, 63, 2, 16) lcd.clear() ls = ['Eat', 'Sleep', 'Rave', 'Repeat'] i = 1 while True: if i % 2: index = int(i / 2) % 4 txt = ls[index] lcd.putstr(...
18.642857
66
0.538314
import time import machine from .esp8266_i2c_lcd import I2cLcd i2c = machine.I2C(-1, machine.Pin(5), machine.Pin(4), freq=400000) lcd = I2cLcd(i2c, 63, 2, 16) lcd.clear() ls = ['Eat', 'Sleep', 'Rave', 'Repeat'] i = 1 while True: if i % 2: index = int(i / 2) % 4 txt = ls[index] lcd.putstr(...
true
true
1c2efcf844b577545dbab2aa4f2ce84e15c4ed03
1,754
py
Python
leetcode/easy/logger-rate-limiter.py
vtemian/interviews-prep
ddef96b5ecc699a590376a892a804c143fe18034
[ "Apache-2.0" ]
8
2019-05-14T12:50:29.000Z
2022-03-01T09:08:27.000Z
leetcode/easy/logger-rate-limiter.py
vtemian/interviews-prep
ddef96b5ecc699a590376a892a804c143fe18034
[ "Apache-2.0" ]
46
2019-03-24T20:59:29.000Z
2019-04-09T16:28:43.000Z
leetcode/easy/logger-rate-limiter.py
vtemian/interviews-prep
ddef96b5ecc699a590376a892a804c143fe18034
[ "Apache-2.0" ]
1
2022-01-28T12:46:29.000Z
2022-01-28T12:46:29.000Z
""" Design a logger system that receive stream of messages along with its timestamps, each message should be printed if and only if it is not printed in the last 10 seconds. Given a message and a timestamp (in seconds granularity), return true if the message should be printed in the given timestamp, otherwise returns ...
29.728814
102
0.704105
class Logger: def __init__(self): self.store = {} def shouldPrintMessage(self, timestamp, message): last_log = self.store.get(message) if last_log is None or timestamp - last_log >= 10: self.store[message] = timestamp return True return False
true
true
1c2efd68e4e2211b4edeea61fbb1535efeada2c3
1,726
py
Python
configs/cityscapes256.py
TimK1998/SemanticSynthesisForScoreBasedModels
b575ab646dd5a599d173b44a3585429082d0620d
[ "Apache-2.0" ]
null
null
null
configs/cityscapes256.py
TimK1998/SemanticSynthesisForScoreBasedModels
b575ab646dd5a599d173b44a3585429082d0620d
[ "Apache-2.0" ]
null
null
null
configs/cityscapes256.py
TimK1998/SemanticSynthesisForScoreBasedModels
b575ab646dd5a599d173b44a3585429082d0620d
[ "Apache-2.0" ]
null
null
null
import ml_collections import torch def get_default_configs(): config = ml_collections.ConfigDict() # training config.training = training = ml_collections.ConfigDict() config.training.batch_size = 8 training.epochs = 2000 # Time in epochs training.checkpoint_save_freq = 50 training.s...
26.151515
96
0.680185
import ml_collections import torch def get_default_configs(): config = ml_collections.ConfigDict() config.training = training = ml_collections.ConfigDict() config.training.batch_size = 8 training.epochs = 2000 training.checkpoint_save_freq = 50 training.sampling_freq = 25 ...
true
true
1c2efdac056e4002d95567fded27a1c73c74ebec
653
py
Python
src/settlers/urls.py
dakrauth/django-settlers
3754296ee979a95fbd5885964cc0c1bfe301a3a0
[ "MIT" ]
null
null
null
src/settlers/urls.py
dakrauth/django-settlers
3754296ee979a95fbd5885964cc0c1bfe301a3a0
[ "MIT" ]
null
null
null
src/settlers/urls.py
dakrauth/django-settlers
3754296ee979a95fbd5885964cc0c1bfe301a3a0
[ "MIT" ]
null
null
null
from django.urls import path from . import views app_name = 'settlers' urlpatterns = [ path('', views.ListingView.as_view(), name='listing'), path('api/<int:pk>/', views.api, name='api'), path('demo/', views.GameDemoView.as_view(), name='demo'), path('random/', views.RandomView.as_view(), name='rand...
34.368421
69
0.646248
from django.urls import path from . import views app_name = 'settlers' urlpatterns = [ path('', views.ListingView.as_view(), name='listing'), path('api/<int:pk>/', views.api, name='api'), path('demo/', views.GameDemoView.as_view(), name='demo'), path('random/', views.RandomView.as_view(), name='rand...
true
true
1c2efdf299dfd0aeabb652193373d0ccc20decac
773
py
Python
django_comments_xtd/urls.py
lyoniionly/django-comments-xtd
bc62a7359b9b460185e0fe4a7a1958bc9ef5599c
[ "BSD-2-Clause" ]
null
null
null
django_comments_xtd/urls.py
lyoniionly/django-comments-xtd
bc62a7359b9b460185e0fe4a7a1958bc9ef5599c
[ "BSD-2-Clause" ]
null
null
null
django_comments_xtd/urls.py
lyoniionly/django-comments-xtd
bc62a7359b9b460185e0fe4a7a1958bc9ef5599c
[ "BSD-2-Clause" ]
null
null
null
#-*- coding: utf-8 -*- from django import VERSION as DJANGO_VERSION if DJANGO_VERSION[0:2] < (1, 4): from django.conf.urls.defaults import include, patterns, url else: from django.conf.urls import include, patterns, url from django.views import generic from django_comments_xtd import views, models from djang...
30.92
83
0.668823
from django import VERSION as DJANGO_VERSION if DJANGO_VERSION[0:2] < (1, 4): from django.conf.urls.defaults import include, patterns, url else: from django.conf.urls import include, patterns, url from django.views import generic from django_comments_xtd import views, models from django_comments_xtd.conf im...
true
true
1c2efee9b1418b6bb88e9e69777335068e1783f5
1,012
py
Python
model.py
qfuggett/people-manager-flask
97511e14c26a90df5b3dc2117c504c7572532761
[ "Unlicense" ]
null
null
null
model.py
qfuggett/people-manager-flask
97511e14c26a90df5b3dc2117c504c7572532761
[ "Unlicense" ]
null
null
null
model.py
qfuggett/people-manager-flask
97511e14c26a90df5b3dc2117c504c7572532761
[ "Unlicense" ]
null
null
null
from flask_sqlalchemy import SQLAlchemy import datetime db = SQLAlchemy() class User(db.Model): __tablename__ = "users" user_id = db.Column(db.Integer, primary_key=True, autoincrement=True) name = db.Column(db.String, nullable=False) email = db.Column(db.String, nullable=False) birthday = db.Co...
28.914286
132
0.699605
from flask_sqlalchemy import SQLAlchemy import datetime db = SQLAlchemy() class User(db.Model): __tablename__ = "users" user_id = db.Column(db.Integer, primary_key=True, autoincrement=True) name = db.Column(db.String, nullable=False) email = db.Column(db.String, nullable=False) birthday = db.Co...
true
true
1c2eff32b3ed455e7d06f354d6a40def7e71a731
2,722
py
Python
redash/handlers/favorites.py
frextrite/redash
74beed80d20d858b51b5560e7984b20d5d2c874e
[ "BSD-2-Clause" ]
8
2019-05-05T10:33:43.000Z
2021-07-14T11:21:52.000Z
redash/handlers/favorites.py
frextrite/redash
74beed80d20d858b51b5560e7984b20d5d2c874e
[ "BSD-2-Clause" ]
10
2017-10-17T09:17:53.000Z
2019-12-05T07:13:41.000Z
redash/handlers/favorites.py
tradingfoe/redash-clone
94065b8dce0e27f6f40a7adc2b99e078b03115b3
[ "BSD-2-Clause" ]
15
2019-06-29T13:58:00.000Z
2022-02-27T14:57:03.000Z
from flask import request from sqlalchemy.exc import IntegrityError from redash import models from redash.handlers.base import (BaseResource, get_object_or_404, paginate) from redash.permissions import require_access, view_only class QueryFavoriteResource(BaseResource): def post...
34.455696
125
0.621234
from flask import request from sqlalchemy.exc import IntegrityError from redash import models from redash.handlers.base import (BaseResource, get_object_or_404, paginate) from redash.permissions import require_access, view_only class QueryFavoriteResource(BaseResource): def post...
true
true
1c2eff74b8846d1e08285bd192df1f547ecba4fe
5,323
py
Python
userbot/modules/misc.py
ronaldyganteng/NightCore
81c2172996248bb8b4c016222a418e405865e989
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/misc.py
ronaldyganteng/NightCore
81c2172996248bb8b4c016222a418e405865e989
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/misc.py
ronaldyganteng/NightCore
81c2172996248bb8b4c016222a418e405865e989
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # # You can find misc modules, which dont fit in anything xD """ Userbot module for other small commands. """ import io ...
36.458904
167
0.642871
import io import sys from os import execl from random import randint from time import sleep from userbot import BOTLOG, BOTLOG_CHATID, CMD_HELP, bot from userbot.events import register from userbot.utils import time_formatter @register(outgoing=True, pattern=r"^\.random") async def randomise(items): itemo...
true
true
1c2effdc4ff98d786d5290890c85cc3aad50030c
5,913
py
Python
Visualizaion/hands_association.py
DanLuoNEU/CLASP2
262fb1f151c14bfe3b1c452cdf65187d8caa10bd
[ "MIT" ]
1
2019-11-17T21:38:54.000Z
2019-11-17T21:38:54.000Z
Visualizaion/hands_association.py
DanLuoNEU/CLASP2
262fb1f151c14bfe3b1c452cdf65187d8caa10bd
[ "MIT" ]
null
null
null
Visualizaion/hands_association.py
DanLuoNEU/CLASP2
262fb1f151c14bfe3b1c452cdf65187d8caa10bd
[ "MIT" ]
null
null
null
# Build up association between hands and persons ID, # depending on IOU between skeleton and person bounding boxes # Intersection part reference: https://github.com/amdegroot/ssd.pytorch/blob/master/layers/box_utils.py#L48 # Points to improve: # 1. same hands for two persons using IOU, they should be unique # Dan, ...
39.684564
116
0.562659
nd_dims(b_b[:,:2], 0),num_a,axis=0) max_xy_a = np.repeat(np.expand_dims(b_a[:,2:], 1),num_b,axis=1) max_xy_b = np.repeat(np.expand_dims(b_b[:,2:], 0),num_a,axis=0) min_xy = np.maximum(min_xy_a, min_xy_b) max_xy = np.minimum(max_xy_a, max_xy_b) inter_xy = np.clip((max_xy - min_xy), 0, np.inf)...
true
true
1c2f00d423ac28a4cc888bde6820527261a6f12c
541
py
Python
app/core/migrations/0005_auto_20210404_0300.py
matelanbo/recipe-app-api
c050b0a0dc430484c6ca91588048eae0ab5c647b
[ "MIT" ]
null
null
null
app/core/migrations/0005_auto_20210404_0300.py
matelanbo/recipe-app-api
c050b0a0dc430484c6ca91588048eae0ab5c647b
[ "MIT" ]
null
null
null
app/core/migrations/0005_auto_20210404_0300.py
matelanbo/recipe-app-api
c050b0a0dc430484c6ca91588048eae0ab5c647b
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2021-04-04 03:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0004_recipe'), ] operations = [ migrations.RenameField( model_name='recipe', old_name='time_miniutes', ...
22.541667
63
0.573013
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0004_recipe'), ] operations = [ migrations.RenameField( model_name='recipe', old_name='time_miniutes', new_name='time_minutes', ), ...
true
true
1c2f01fcf53219c692092a28ca321bd5e3ab2dd1
5,227
py
Python
webStorm-APICloud/python_tools/Lib/sched.py
zzr925028429/androidyianyan
8967fdba92473e8e65ee222515dfc54cdae5bb0b
[ "MIT" ]
null
null
null
webStorm-APICloud/python_tools/Lib/sched.py
zzr925028429/androidyianyan
8967fdba92473e8e65ee222515dfc54cdae5bb0b
[ "MIT" ]
null
null
null
webStorm-APICloud/python_tools/Lib/sched.py
zzr925028429/androidyianyan
8967fdba92473e8e65ee222515dfc54cdae5bb0b
[ "MIT" ]
null
null
null
"""A generally useful event scheduler class. Each instance of this class manages its own queue. No multi-threading is implied; you are supposed to hack that yourself, or use a single instance per application. Each instance is parametrized with two functions, one that is supposed to return the current time, one...
38.718519
79
0.647599
import heapq from collections import namedtuple __all__ = ["scheduler"] Event = namedtuple('Event', 'time, priority, action, argument') class scheduler: def __init__(self, timefunc, delayfunc): self._queue = [] self.timefunc = timefunc self.delayfunc = delayfunc ...
true
true
1c2f02aed167f8a57906e18c482a7a0d68e37add
24,267
py
Python
torch/ao/quantization/_dbr/auto_trace.py
xiaohanhuang/pytorch
a31aea8eaa99a5ff72b5d002c206cd68d5467a5e
[ "Intel" ]
null
null
null
torch/ao/quantization/_dbr/auto_trace.py
xiaohanhuang/pytorch
a31aea8eaa99a5ff72b5d002c206cd68d5467a5e
[ "Intel" ]
null
null
null
torch/ao/quantization/_dbr/auto_trace.py
xiaohanhuang/pytorch
a31aea8eaa99a5ff72b5d002c206cd68d5467a5e
[ "Intel" ]
1
2021-12-07T12:36:25.000Z
2021-12-07T12:36:25.000Z
import logging from typing import Tuple, Any, List, Dict import torch from torch.fx.node import map_aggregate from .quantization_state import ( AutoQuantizationState, ) from .utils import ( trace_with_inputs, is_leaf, HookType, get_torch_function_hook_type, get_module_hook_type, ) from .model_...
43.411449
117
0.576915
import logging from typing import Tuple, Any, List, Dict import torch from torch.fx.node import map_aggregate from .quantization_state import ( AutoQuantizationState, ) from .utils import ( trace_with_inputs, is_leaf, HookType, get_torch_function_hook_type, get_module_hook_type, ) from .model_...
true
true
1c2f02b3852faad8ec8d5d7b16940faac3b83676
6,172
py
Python
backend/corpora/lambdas/api/v1/dataset.py
chanzuckerberg/single-cell-data-portal
d8901ef978ad96de75510d5eb0e459a4790197ea
[ "MIT" ]
7
2021-09-17T23:44:31.000Z
2022-03-25T22:36:07.000Z
backend/corpora/lambdas/api/v1/dataset.py
chanzuckerberg/single-cell-data-portal
d8901ef978ad96de75510d5eb0e459a4790197ea
[ "MIT" ]
784
2021-08-18T23:38:09.000Z
2022-03-31T21:18:54.000Z
backend/corpora/lambdas/api/v1/dataset.py
chanzuckerberg/single-cell-data-portal
d8901ef978ad96de75510d5eb0e459a4790197ea
[ "MIT" ]
2
2021-09-07T19:04:17.000Z
2021-12-23T21:51:36.000Z
from flask import make_response, jsonify, g from ....common.corpora_orm import CollectionVisibility, DatasetArtifactFileType from ....common.entities import Dataset, Collection from ....common.entities.geneset import GenesetDatasetLink from ....api_server.db import dbconnect from ....common.utils.exceptions import ( ...
33.912088
119
0.700907
from flask import make_response, jsonify, g from ....common.corpora_orm import CollectionVisibility, DatasetArtifactFileType from ....common.entities import Dataset, Collection from ....common.entities.geneset import GenesetDatasetLink from ....api_server.db import dbconnect from ....common.utils.exceptions import ( ...
true
true
1c2f034d6dfba5b487fa562eb6a82da3b9d57793
78,620
py
Python
mesonbuild/modules/gnome.py
megatux/meson
047db1c64cd5b7ef070f73e1d580e36236ac9613
[ "Apache-2.0" ]
null
null
null
mesonbuild/modules/gnome.py
megatux/meson
047db1c64cd5b7ef070f73e1d580e36236ac9613
[ "Apache-2.0" ]
null
null
null
mesonbuild/modules/gnome.py
megatux/meson
047db1c64cd5b7ef070f73e1d580e36236ac9613
[ "Apache-2.0" ]
null
null
null
# Copyright 2015-2016 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agree...
47.049671
133
0.578008
import os import copy import subprocess from .. import build from .. import mlog from .. import mesonlib from .. import compilers from .. import interpreter from . import GResourceTarget, GResourceHeaderTarget, GirTarget, TypelibTarget, VapiTarget from . import get_include_args from . import ExtensionMo...
true
true
1c2f0461dae88461ed47418747b251fbcdf88be2
9,502
py
Python
src/python/turicreate/toolkits/drawing_classifier/_tf_drawing_classifier.py
Bpowers4/turicreate
73dad213cc1c4f74337b905baea2b3a1e5a0266c
[ "BSD-3-Clause" ]
1
2021-04-23T10:51:03.000Z
2021-04-23T10:51:03.000Z
src/python/turicreate/toolkits/drawing_classifier/_tf_drawing_classifier.py
Bpowers4/turicreate
73dad213cc1c4f74337b905baea2b3a1e5a0266c
[ "BSD-3-Clause" ]
null
null
null
src/python/turicreate/toolkits/drawing_classifier/_tf_drawing_classifier.py
Bpowers4/turicreate
73dad213cc1c4f74337b905baea2b3a1e5a0266c
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright © 2019 Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from __future__ import print_function as _ from __future__ import division as _ from...
36.40613
93
0.561461
from __future__ import print_function as _ from __future__ import division as _ from __future__ import absolute_import as _ import numpy as _np from .._tf_model import TensorFlowModel import turicreate.toolkits._tf_utils as _utils import tensorflow.compat.v1 as _tf _tf.disable_v2_behavior() class DrawingClas...
true
true
1c2f0489ad7d51f38cba2c7890b7280416dbc116
1,226
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractArsbltranslationsWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractArsbltranslationsWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractArsbltranslationsWordpressCom.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractArsbltranslationsWordpressCom(item): ''' Parser for 'arsbltranslations.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('Picked up a Strange Knight', '...
49.04
130
0.533442
def extractArsbltranslationsWordpressCom(item): vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('Picked up a Strange Knight', 'Picked up a Strange Knight', ...
true
true
1c2f04d4a3524b401bdca8931931a853e81bf11f
201
py
Python
app/common/config.py
hust-sh/hookhub
b6a26f167d4294200e1cce0886a8c89976b687ec
[ "MIT" ]
1
2017-11-30T13:16:43.000Z
2017-11-30T13:16:43.000Z
app/common/config.py
hust-sh/hookhub
b6a26f167d4294200e1cce0886a8c89976b687ec
[ "MIT" ]
1
2017-12-02T10:10:24.000Z
2017-12-02T10:59:13.000Z
app/common/config.py
hust-sh/hookhub
b6a26f167d4294200e1cce0886a8c89976b687ec
[ "MIT" ]
null
null
null
# coding: utf-8 REDIS_URL = 'redis://redis:6379/0' REDIS_CONF = { 'url': REDIS_URL, 'socket_timeout': 0.5, } WEBHOOK_TYPES = ['jira', 'jenkins'] LOG_DIR = '/var/log' HOST = '120.78.197.57'
14.357143
35
0.61194
REDIS_URL = 'redis://redis:6379/0' REDIS_CONF = { 'url': REDIS_URL, 'socket_timeout': 0.5, } WEBHOOK_TYPES = ['jira', 'jenkins'] LOG_DIR = '/var/log' HOST = '120.78.197.57'
true
true
1c2f050463c4c33d9a85f97da89b550b5898c0e3
8,755
py
Python
vta/config/vta_config.py
robo-corg/incubator-tvm
4ddfdb4b15d05a5bf85a984837967d004efee5dd
[ "Apache-2.0" ]
286
2020-06-23T06:40:44.000Z
2022-03-30T01:27:49.000Z
vta/config/vta_config.py
robo-corg/incubator-tvm
4ddfdb4b15d05a5bf85a984837967d004efee5dd
[ "Apache-2.0" ]
10
2020-07-31T03:26:59.000Z
2021-12-27T15:00:54.000Z
vta/config/vta_config.py
robo-corg/incubator-tvm
4ddfdb4b15d05a5bf85a984837967d004efee5dd
[ "Apache-2.0" ]
30
2020-07-17T01:04:14.000Z
2021-12-27T14:05:19.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.738938
90
0.632895
import os import sys import json import argparse def get_pkg_config(cfg): curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) proj_root = os.path.abspath(os.path.join(curr_path, "../../")) pkg_config_py = os.path.join(proj_root, "vta/python/vta/pkg_config.py") lib...
true
true
1c2f060875d9f915b00645a30fc2c7215e92ccff
2,659
py
Python
src/services/models_service.py
daesnorey/PPRJ
f826eb194f895d13522f61a51a5100a5cdbead99
[ "Apache-2.0" ]
null
null
null
src/services/models_service.py
daesnorey/PPRJ
f826eb194f895d13522f61a51a5100a5cdbead99
[ "Apache-2.0" ]
null
null
null
src/services/models_service.py
daesnorey/PPRJ
f826eb194f895d13522f61a51a5100a5cdbead99
[ "Apache-2.0" ]
null
null
null
""" models_service.py file contain the ModelsService class, this will have methods for controling the crud operation for models """ from src.services.db.oracle import Oracle from src.objects.model import Model from src.objects.component import Component class ModelsService(object): """ ModelsService class ...
30.563218
77
0.576156
""" models_service.py file contain the ModelsService class, this will have methods for controling the crud operation for models """ from src.services.db.oracle import Oracle from src.objects.model import Model from src.objects.component import Component class ModelsService(object): """ ModelsService class ...
false
true
1c2f07d075b36f8c68d7d495bde8a0466b55974d
1,730
py
Python
import_broadbands.py
alphagov/land-availability-import
58fd2c698eda18702ae680da3d3b9f3fea2865d1
[ "MIT" ]
null
null
null
import_broadbands.py
alphagov/land-availability-import
58fd2c698eda18702ae680da3d3b9f3fea2865d1
[ "MIT" ]
9
2017-02-20T15:14:42.000Z
2017-07-10T10:35:45.000Z
import_broadbands.py
alphagov/land-availability-import
58fd2c698eda18702ae680da3d3b9f3fea2865d1
[ "MIT" ]
2
2019-08-29T11:51:53.000Z
2021-04-10T19:55:55.000Z
from importers import CSVImportCommand import requests import click class BroadbandImportCommand(CSVImportCommand): def clean_column(self, column): clean = column.replace('<', '').replace('N/A', '') if clean == '': return '0' else: return clean def process_ro...
31.454545
71
0.602312
from importers import CSVImportCommand import requests import click class BroadbandImportCommand(CSVImportCommand): def clean_column(self, column): clean = column.replace('<', '').replace('N/A', '') if clean == '': return '0' else: return clean def process_ro...
true
true
1c2f07fc053ad9c2110a8a00d9b348350b3331c4
1,168
py
Python
packages/athena/setup.py
sebastianvillarroel/soda-sql
d672d94945ad5200cb47e05fe1b04706c2e84cc5
[ "Apache-2.0" ]
null
null
null
packages/athena/setup.py
sebastianvillarroel/soda-sql
d672d94945ad5200cb47e05fe1b04706c2e84cc5
[ "Apache-2.0" ]
null
null
null
packages/athena/setup.py
sebastianvillarroel/soda-sql
d672d94945ad5200cb47e05fe1b04706c2e84cc5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import sys from setuptools import setup, find_namespace_packages if sys.version_info < (3, 7): print('Error: Soda SQL requires at least Python 3.7') print('Error: Please upgrade your Python version to 3.7 or later') sys.exit(1) package_name = "soda-sql-athena" package_version = '2.1....
31.567568
82
0.666096
import sys from setuptools import setup, find_namespace_packages if sys.version_info < (3, 7): print('Error: Soda SQL requires at least Python 3.7') print('Error: Please upgrade your Python version to 3.7 or later') sys.exit(1) package_name = "soda-sql-athena" package_version = '2.1.1' description = "So...
true
true
1c2f0938a84af2f6d37e5903711c69fdc485b9d9
2,492
py
Python
scripts/env/set-eth.py
DryptoBZX/contractsV2
3ee0b7669902ff6b9422440289ddc52f679e636b
[ "Apache-2.0" ]
null
null
null
scripts/env/set-eth.py
DryptoBZX/contractsV2
3ee0b7669902ff6b9422440289ddc52f679e636b
[ "Apache-2.0" ]
null
null
null
scripts/env/set-eth.py
DryptoBZX/contractsV2
3ee0b7669902ff6b9422440289ddc52f679e636b
[ "Apache-2.0" ]
null
null
null
from brownie import * BZX = Contract.from_abi("BZX", "0xD8Ee69652E4e4838f2531732a46d1f7F584F0b7f", interface.IBZx.abi) TOKEN_REGISTRY = Contract.from_abi("TOKEN_REGISTRY", "0xf0E474592B455579Fe580D610b846BdBb529C6F7", TokenRegistry.abi) list = TOKEN_REGISTRY.getTokens(0, 50) for l in list: iTokenTemp = Contract.f...
55.377778
134
0.808989
from brownie import * BZX = Contract.from_abi("BZX", "0xD8Ee69652E4e4838f2531732a46d1f7F584F0b7f", interface.IBZx.abi) TOKEN_REGISTRY = Contract.from_abi("TOKEN_REGISTRY", "0xf0E474592B455579Fe580D610b846BdBb529C6F7", TokenRegistry.abi) list = TOKEN_REGISTRY.getTokens(0, 50) for l in list: iTokenTemp = Contract.f...
true
true
1c2f09974650f574525787d83f9085cdfdfec390
22,929
py
Python
src/ensae_teaching_cs/helpers/colorsdef.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
73
2015-05-12T13:12:11.000Z
2021-12-21T11:44:29.000Z
src/ensae_teaching_cs/helpers/colorsdef.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
90
2015-06-23T11:11:35.000Z
2021-03-31T22:09:15.000Z
src/ensae_teaching_cs/helpers/colorsdef.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
65
2015-01-13T08:23:55.000Z
2022-02-11T22:42:07.000Z
""" @file @brief Definition of colors """ colors_definition = [ ('Alice blue', '#f0f8ff'), ('Alizarin crimson', '#e32636'), ('Almond', '#efdecd'), ('Amaranth', '#e52b50'), ('Amber', '#ffbf00'), ('American rose', '#ff033e'), ('Amethyst', '#9966cc'), ('Green', '#a4c639'), ('Antique br...
30.694779
43
0.493829
colors_definition = [ ('Alice blue', '#f0f8ff'), ('Alizarin crimson', '#e32636'), ('Almond', '#efdecd'), ('Amaranth', '#e52b50'), ('Amber', '#ffbf00'), ('American rose', '#ff033e'), ('Amethyst', '#9966cc'), ('Green', '#a4c639'), ('Antique brass', '#cd9575'), ('Antique fuchsia', ...
true
true
1c2f0a29fb656dcac8d987417053888e961ea568
801
py
Python
evora/server/ftp_server.py
ejgl/ScienceCamera
c81542bb0605423961110fa6d79d64fa69356a98
[ "0BSD" ]
4
2017-08-29T22:41:00.000Z
2021-01-21T00:22:35.000Z
evora/server/ftp_server.py
ejgl/ScienceCamera
c81542bb0605423961110fa6d79d64fa69356a98
[ "0BSD" ]
40
2016-04-11T23:47:24.000Z
2021-09-26T15:34:17.000Z
evora/server/ftp_server.py
ejgl/ScienceCamera
c81542bb0605423961110fa6d79d64fa69356a98
[ "0BSD" ]
6
2016-05-27T22:49:17.000Z
2021-08-19T22:46:11.000Z
#!/usr/bin/env python2 from __future__ import absolute_import, division, print_function from os.path import isdir from twisted.cred.checkers import AllowAnonymousAccess from twisted.cred.portal import Portal from twisted.internet import reactor # ftp server imports from twisted.protocols.ftp import FTPFactory, FTPReal...
29.666667
88
0.761548
from __future__ import absolute_import, division, print_function from os.path import isdir from twisted.cred.checkers import AllowAnonymousAccess from twisted.cred.portal import Portal from twisted.internet import reactor from twisted.protocols.ftp import FTPFactory, FTPRealm from evora.common import netconsts d...
true
true
1c2f0b44319be3c44e399c947d7a1c55056cb317
529
py
Python
django_dropbox_csv_export/satisfaction_ratings/tests/test_models.py
zkan/django-dropbox-csv-export
5e77c539d84acf59d6f1dc1ffe3515b13fc34565
[ "MIT" ]
null
null
null
django_dropbox_csv_export/satisfaction_ratings/tests/test_models.py
zkan/django-dropbox-csv-export
5e77c539d84acf59d6f1dc1ffe3515b13fc34565
[ "MIT" ]
null
null
null
django_dropbox_csv_export/satisfaction_ratings/tests/test_models.py
zkan/django-dropbox-csv-export
5e77c539d84acf59d6f1dc1ffe3515b13fc34565
[ "MIT" ]
null
null
null
from django.test import TestCase from ..models import SatisfactionRating class SatisfactionRatingTest(TestCase): def test_save_satisfaction_rating(self): satisfaction_rating = SatisfactionRating() satisfaction_rating.customer_name = 'Pronto' satisfaction_rating.score = 9 satisfact...
31.117647
69
0.750473
from django.test import TestCase from ..models import SatisfactionRating class SatisfactionRatingTest(TestCase): def test_save_satisfaction_rating(self): satisfaction_rating = SatisfactionRating() satisfaction_rating.customer_name = 'Pronto' satisfaction_rating.score = 9 satisfact...
true
true
1c2f0b4fcfb1e4565793074e7760ec4d5fe26d08
3,678
py
Python
model/graph_models/object_descriptor.py
Nik-V9/AirObject
5937e64531f08449e81d2c90e3c6643727efbaf0
[ "BSD-3-Clause" ]
9
2022-03-15T17:28:48.000Z
2022-03-29T12:32:28.000Z
model/graph_models/object_descriptor.py
Nik-V9/AirObject
5937e64531f08449e81d2c90e3c6643727efbaf0
[ "BSD-3-Clause" ]
1
2022-03-29T06:03:14.000Z
2022-03-29T13:38:29.000Z
model/graph_models/object_descriptor.py
Nik-V9/AirObject
5937e64531f08449e81d2c90e3c6643727efbaf0
[ "BSD-3-Clause" ]
1
2022-03-15T19:34:06.000Z
2022-03-15T19:34:06.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import torch import torch.nn as nn from model.graph_models.attention import GraphAtten class ObjectDescriptor(nn.Module): def __init__(self, config): super(ObjectDescriptor, self).__init__() points_encoder_dims = config['points_encoder_dims'] descriptor_dim...
32.263158
108
0.694671
import torch import torch.nn as nn from model.graph_models.attention import GraphAtten class ObjectDescriptor(nn.Module): def __init__(self, config): super(ObjectDescriptor, self).__init__() points_encoder_dims = config['points_encoder_dims'] descriptor_dim = config['descriptor_dim'] nhid = confi...
true
true
1c2f0d28c1df042f6c7b367df5e9614a27ecf277
702
py
Python
game/tichu/team.py
lukaspestalozzi/Master_Semester_Project
4e71d4034ae3f5e7efa0864b48c6fd4d876fef4e
[ "MIT" ]
null
null
null
game/tichu/team.py
lukaspestalozzi/Master_Semester_Project
4e71d4034ae3f5e7efa0864b48c6fd4d876fef4e
[ "MIT" ]
null
null
null
game/tichu/team.py
lukaspestalozzi/Master_Semester_Project
4e71d4034ae3f5e7efa0864b48c6fd4d876fef4e
[ "MIT" ]
null
null
null
from collections import namedtuple from game.tichu.tichuplayers import TichuPlayer from game.utils import check_isinstance class Team(namedtuple("T", ["player1", "player2"])): def __init__(self, player1, player2): check_isinstance(player1, TichuPlayer) check_isinstance(player2, TichuPlayer) ...
26
80
0.68661
from collections import namedtuple from game.tichu.tichuplayers import TichuPlayer from game.utils import check_isinstance class Team(namedtuple("T", ["player1", "player2"])): def __init__(self, player1, player2): check_isinstance(player1, TichuPlayer) check_isinstance(player2, TichuPlayer) ...
true
true
1c2f0d7ec6b403d64e71162ea6a400ae30342e6d
23,524
py
Python
tests/test_app_routers_share_tokens_GET.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
2
2021-08-19T12:35:25.000Z
2022-02-16T04:13:38.000Z
tests/test_app_routers_share_tokens_GET.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
46
2021-09-02T03:22:05.000Z
2022-03-31T09:20:00.000Z
tests/test_app_routers_share_tokens_GET.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
1
2021-11-17T23:18:27.000Z
2021-11-17T23:18:27.000Z
""" Copyright BOOSTRY Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
41.054101
107
0.622641
from unittest import mock from unittest.mock import call from pytz import timezone from config import TZ from app.model.blockchain import IbetShareContract from app.model.db import ( Token, TokenType, AdditionalTokenInfo ) from tests.account_config import config_eth_account class TestAppRoutersShareToken...
true
true
1c2f0dbf99f70aa7e0c4f0b9b609c5c57eaed13a
97
py
Python
bloggingapp/apps.py
mr-shubhamsinghal/blog
1dc24e0d52ce7432f10faad5a2823190d3f924d8
[ "MIT" ]
null
null
null
bloggingapp/apps.py
mr-shubhamsinghal/blog
1dc24e0d52ce7432f10faad5a2823190d3f924d8
[ "MIT" ]
null
null
null
bloggingapp/apps.py
mr-shubhamsinghal/blog
1dc24e0d52ce7432f10faad5a2823190d3f924d8
[ "MIT" ]
null
null
null
from django.apps import AppConfig class BloggingappConfig(AppConfig): name = 'bloggingapp'
16.166667
35
0.773196
from django.apps import AppConfig class BloggingappConfig(AppConfig): name = 'bloggingapp'
true
true
1c2f0dbffd87af73f94a2a3f241c3730a7a594e1
78,244
py
Python
ISAFlaserResults/code/csvClean.py
dgbirm/elo_sailor
0978eac23e9334eee8cab3225840f82fbc153194
[ "MIT" ]
2
2020-08-12T17:34:53.000Z
2021-02-19T15:13:06.000Z
ISAFlaserResults/code/csvClean.py
dgbirm/elo_sailor
0978eac23e9334eee8cab3225840f82fbc153194
[ "MIT" ]
null
null
null
ISAFlaserResults/code/csvClean.py
dgbirm/elo_sailor
0978eac23e9334eee8cab3225840f82fbc153194
[ "MIT" ]
null
null
null
#Scrap code for cleaning the CSV files so that we can read them easier import csv import sys import pandas as pd import numpy as np import os import re from selenium import webdriver from time import sleep from text_unidecode import unidecode from tabulate import tabulate sys.path.append('/home/daniel/Desktop/elo_sa...
213.19891
67,521
0.453121
import csv import sys import pandas as pd import numpy as np import os import re from selenium import webdriver from time import sleep from text_unidecode import unidecode from tabulate import tabulate sys.path.append('/home/daniel/Desktop/elo_sailor/Glicko2approach') from SailingGlicko2 import * from Scrape import...
true
true
1c2f0de6e086382425de3ac8164941b1a7edefa0
266
py
Python
hackerrank/Algorithms/Tower Breakers, Revisited!/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
4
2020-07-24T01:59:50.000Z
2021-07-24T15:14:08.000Z
hackerrank/Algorithms/Tower Breakers, Revisited!/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
hackerrank/Algorithms/Tower Breakers, Revisited!/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
import unittest import solution class TestQ(unittest.TestCase): def test_case_0(self): self.assertEqual(solution.towerBreakers([1, 2]), 1) self.assertEqual(solution.towerBreakers([1, 2, 3]), 2) if __name__ == '__main__': unittest.main()
19
62
0.680451
import unittest import solution class TestQ(unittest.TestCase): def test_case_0(self): self.assertEqual(solution.towerBreakers([1, 2]), 1) self.assertEqual(solution.towerBreakers([1, 2, 3]), 2) if __name__ == '__main__': unittest.main()
true
true
1c2f0ff2032887fc139b15fb0d61839cb7f204ba
13,023
py
Python
game2.py
calthecoder/zealous-fibula
b1c3fb3426ec6711a474948f7d820289e1039fca
[ "MIT" ]
null
null
null
game2.py
calthecoder/zealous-fibula
b1c3fb3426ec6711a474948f7d820289e1039fca
[ "MIT" ]
null
null
null
game2.py
calthecoder/zealous-fibula
b1c3fb3426ec6711a474948f7d820289e1039fca
[ "MIT" ]
null
null
null
""" Beta 0.0.9 - attack() class function does not work; returns None Beta 0.1.0 - Fixed Issue 0.0.9. Working but missing a few things Beta 0.1.1 - Renamed self.sees() to self.act(); added a passive function self.act() to Item Beta 0.1.2 - Renamed namelist to enemylist and added itemlist Beta 0.2.1 - Added items to pick...
34.452381
134
0.646088
import player, sys, random from enemies import * from world import * from items import * from interactives import * k8 = mixer.Sound('resources/Shadows of Angmar.ogg') strack9 = mixer.Sound('resources/The Creeping Gloom.ogg') strack10 = mixer.Sound('resources/The Ice Bay.ogg') strack11 = mixer.Sound('resources/Th...
true
true
1c2f10bfd88983bb0563efeb649c2e699009e717
7,933
py
Python
sagemaker-debugger/pytorch_iterative_model_pruning/model_resnet.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
2,610
2020-10-01T14:14:53.000Z
2022-03-31T18:02:31.000Z
sagemaker-debugger/pytorch_iterative_model_pruning/model_resnet.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
1,959
2020-09-30T20:22:42.000Z
2022-03-31T23:58:37.000Z
sagemaker-debugger/pytorch_iterative_model_pruning/model_resnet.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
2,052
2020-09-30T22:11:46.000Z
2022-03-31T23:02:51.000Z
import numpy as np import smdebug import torch import torch.nn as nn import torchvision from smdebug import modes from torchvision import models # list of ordered tensor names activation_outputs = [ #'relu_ReLU_output_0', "layer1.0.relu_0_output_0", "layer1.1.relu_0_output_0", "layer2.0.relu_0_output_0...
40.065657
105
0.571411
import numpy as np import smdebug import torch import torch.nn as nn import torchvision from smdebug import modes from torchvision import models activation_outputs = [ "layer1.0.relu_0_output_0", "layer1.1.relu_0_output_0", "layer2.0.relu_0_output_0", "layer2.1.relu_0_output_0", "layer3.0.rel...
true
true
1c2f11dff72f8364a0ea8758e647d0af627bafc8
38,569
py
Python
tensorflow/python/debug/lib/debug_events_writer_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
190,993
2015-11-09T13:17:30.000Z
2022-03-31T23:05:27.000Z
tensorflow/python/debug/lib/debug_events_writer_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
48,461
2015-11-09T14:21:11.000Z
2022-03-31T23:17:33.000Z
tensorflow/python/debug/lib/debug_events_writer_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
104,981
2015-11-09T13:40:17.000Z
2022-03-31T19:51:54.000Z
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
41.831887
80
0.675309
import glob import json as json_lib import os import re import threading import time from absl.testing import parameterized from tensorflow.core.protobuf import debug_event_pb2 from tensorflow.python.debug.lib import debug_events_reader from tensorflow.python.debug.lib import debug_events_writer from t...
true
true
1c2f122b468c80626a01b121b18aa5167206ae08
3,685
py
Python
livesync/indico_livesync/controllers.py
tomasr8/indico-plugins
b85e4ad826fa362aa32eb236e73c9ab2f7c7f465
[ "MIT" ]
null
null
null
livesync/indico_livesync/controllers.py
tomasr8/indico-plugins
b85e4ad826fa362aa32eb236e73c9ab2f7c7f465
[ "MIT" ]
null
null
null
livesync/indico_livesync/controllers.py
tomasr8/indico-plugins
b85e4ad826fa362aa32eb236e73c9ab2f7c7f465
[ "MIT" ]
null
null
null
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2022 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from flask import flash, redirect, request from flask_pluginengine import cur...
39.623656
119
0.688195
from flask import flash, redirect, request from flask_pluginengine import current_plugin, render_plugin_template from sqlalchemy.orm.attributes import flag_modified from werkzeug.exceptions import NotFound from indico.core.db import db from indico.core.errors import UserValueError from indico.modules.admin impo...
true
true
1c2f125d2dc314b0fc43aaa3ca2b3b0b148148cb
1,503
py
Python
src/clustar_project/graph.py
jz5jx/Test_Repo
8796f45021943984ed02232fd34ff02e17123d71
[ "MIT" ]
1
2021-04-24T21:52:53.000Z
2021-04-24T21:52:53.000Z
src/clustar_project/graph.py
jz5jx/Test_Repo
8796f45021943984ed02232fd34ff02e17123d71
[ "MIT" ]
null
null
null
src/clustar_project/graph.py
jz5jx/Test_Repo
8796f45021943984ed02232fd34ff02e17123d71
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Rectangle def identify_peaks(image, smoothing=5, clip=0.75): n_rows = image.shape[0] n_cols = image.shape[1] mid = n_rows // 2 y = np.array([image[mid, c] for c in range(n_cols)]) x = np.arange(0, len(y), 1) y_...
28.903846
72
0.465735
import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Rectangle def identify_peaks(image, smoothing=5, clip=0.75): n_rows = image.shape[0] n_cols = image.shape[1] mid = n_rows // 2 y = np.array([image[mid, c] for c in range(n_cols)]) x = np.arange(0, len(y), 1) y_...
true
true
1c2f127cdfa2366e188a595e18fd3dfb435b4486
2,218
py
Python
app/auth/forms.py
sgaoshang/seeker
bb96ab9835abddf076dfe61f4ffc4fd8d5933b6f
[ "MIT" ]
null
null
null
app/auth/forms.py
sgaoshang/seeker
bb96ab9835abddf076dfe61f4ffc4fd8d5933b6f
[ "MIT" ]
2
2021-03-31T19:01:13.000Z
2021-12-13T19:50:54.000Z
app/auth/forms.py
sgaoshang/seeker
bb96ab9835abddf076dfe61f4ffc4fd8d5933b6f
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, SelectField from wtforms.validators import ValidationError, DataRequired, Email, EqualTo from flask_babel import _, lazy_gettext as _l from app.models import User class LoginForm(FlaskForm): username = Strin...
42.653846
114
0.672227
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, SelectField from wtforms.validators import ValidationError, DataRequired, Email, EqualTo from flask_babel import _, lazy_gettext as _l from app.models import User class LoginForm(FlaskForm): username = Strin...
true
true
1c2f13420cec6ec91fd855a91f15b93e5ee912ca
454
py
Python
passwlib.py
Lightmoll/SimpleStatus
e2eef3b1c7488899f5da74e18976dac5b18aefe0
[ "MIT" ]
null
null
null
passwlib.py
Lightmoll/SimpleStatus
e2eef3b1c7488899f5da74e18976dac5b18aefe0
[ "MIT" ]
null
null
null
passwlib.py
Lightmoll/SimpleStatus
e2eef3b1c7488899f5da74e18976dac5b18aefe0
[ "MIT" ]
null
null
null
from passlib.hash import pbkdf2_sha256 #external lib DEFAULT_PASSWD_URI = "data/passw.db" def verify_password(in_passw): base_passw_hash = "" with open(DEFAULT_PASSWD_URI, "r") as file: base_passw_hash = file.read().rstrip() return pbkdf2_sha256.verify(in_passw, base_passw_hash) def set_passwor...
25.222222
58
0.729075
from passlib.hash import pbkdf2_sha256 DEFAULT_PASSWD_URI = "data/passw.db" def verify_password(in_passw): base_passw_hash = "" with open(DEFAULT_PASSWD_URI, "r") as file: base_passw_hash = file.read().rstrip() return pbkdf2_sha256.verify(in_passw, base_passw_hash) def set_password(passw): ...
true
true
1c2f13912749223ca2c3fe76bb38420e21ae12a8
2,433
py
Python
log_casp_act/run_model_259.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_casp_act/run_model_259.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_casp_act/run_model_259.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
import numpy as np from math import * import pymultinest import sys sys.path.insert(0, '/home/kochenma/pysb') from pysb.integrate import Solver import csv import datetime import time as tm from model_259 import model from pysb.pathfinder import set_path set_path('bng', '/home/kochenma/BioNetGen') data_object = [] wi...
25.610526
237
0.671599
import numpy as np from math import * import pymultinest import sys sys.path.insert(0, '/home/kochenma/pysb') from pysb.integrate import Solver import csv import datetime import time as tm from model_259 import model from pysb.pathfinder import set_path set_path('bng', '/home/kochenma/BioNetGen') data_object = [] wi...
false
true
1c2f149739b4d45fd677b49e34c515d4fcbe65c5
3,751
py
Python
www/server.py
cjds/rpicar
01e9db2149691cb29bfe223644236b7634c3998b
[ "WTFPL" ]
null
null
null
www/server.py
cjds/rpicar
01e9db2149691cb29bfe223644236b7634c3998b
[ "WTFPL" ]
null
null
null
www/server.py
cjds/rpicar
01e9db2149691cb29bfe223644236b7634c3998b
[ "WTFPL" ]
1
2020-04-07T18:03:01.000Z
2020-04-07T18:03:01.000Z
#!/usr/bin/env python3 # @author Carl Saldanha <cjds92@gmail.com> # @brief Web server to help move the robot from http.server import BaseHTTPRequestHandler, HTTPServer from os import curdir, sep import contextlib import os import socket import urllib.parse as urlparse from urllib.parse import parse_qs from functools...
35.72381
90
0.559051
from http.server import BaseHTTPRequestHandler, HTTPServer from os import curdir, sep import contextlib import os import socket import urllib.parse as urlparse from urllib.parse import parse_qs from functools import partialmethod PORT_NUMBER = 8080 HOST = '127.0.0.1' SOCKET_PORT = 65432 def partialc...
true
true
1c2f15a19961e75280cc697ad0564e6c34542fa7
1,204
py
Python
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iam/apis/CreateSubUserRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iam/apis/CreateSubUserRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iam/apis/CreateSubUserRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
28.666667
75
0.719269
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest class CreateSubUserRequest(JDCloudRequest): def __init__(self, parameters, header=None, version="v1"): super(CreateSubUserRequest, self).__init__( '/subUser', 'POST', header, version) self.parameters = parame...
true
true
1c2f15c725d49d08657992ccce0173a331d53cb5
3,770
py
Python
Chapter11_AI/cartpoleAgent4.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter11_AI/cartpoleAgent4.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter11_AI/cartpoleAgent4.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
# noqa import gym import numpy as np from tensorflow.keras.layers import Activation from tensorflow.keras.layers import Dense from tensorflow.keras.models import Sequential from tensorflow.keras.utils import to_categorical class Agent: def __init__(self, env: gym.Env): self.env = env self.num_ober...
35.904762
96
0.58992
import gym import numpy as np from tensorflow.keras.layers import Activation from tensorflow.keras.layers import Dense from tensorflow.keras.models import Sequential from tensorflow.keras.utils import to_categorical class Agent: def __init__(self, env: gym.Env): self.env = env self.num_obersvatio...
true
true
1c2f162efea13b0be77e2364ee076b27e19c6389
1,532
py
Python
jupyter_sparkmonitor/test_jupyter_sparkmonitor.py
hellysmile/initialization-actions
d390a8981716d4cc2d69291ed844de3b229a689e
[ "Apache-2.0" ]
null
null
null
jupyter_sparkmonitor/test_jupyter_sparkmonitor.py
hellysmile/initialization-actions
d390a8981716d4cc2d69291ed844de3b229a689e
[ "Apache-2.0" ]
null
null
null
jupyter_sparkmonitor/test_jupyter_sparkmonitor.py
hellysmile/initialization-actions
d390a8981716d4cc2d69291ed844de3b229a689e
[ "Apache-2.0" ]
null
null
null
import pkg_resources from absl.testing import absltest from absl.testing import parameterized from integration_tests.dataproc_test_case import DataprocTestCase class JupyterTestCase(DataprocTestCase): OPTIONAL_COMPONENTS = ["ANACONDA", "JUPYTER"] COMPONENT = "sparkmonitor" INIT_ACTIONS = ["jupyter_sparkmonitor...
32.595745
80
0.711488
import pkg_resources from absl.testing import absltest from absl.testing import parameterized from integration_tests.dataproc_test_case import DataprocTestCase class JupyterTestCase(DataprocTestCase): OPTIONAL_COMPONENTS = ["ANACONDA", "JUPYTER"] COMPONENT = "sparkmonitor" INIT_ACTIONS = ["jupyter_sparkmonitor...
true
true
1c2f168df79115e9222c2d243fc9f168fa29b3fc
6,502
py
Python
PaddleClas/ppcls/arch/backbone/__init__.py
unseenme/mnasnet-paddle-iv
3bfc38477f1f80e79d35045a3dadef857fc2f4e5
[ "Apache-2.0" ]
null
null
null
PaddleClas/ppcls/arch/backbone/__init__.py
unseenme/mnasnet-paddle-iv
3bfc38477f1f80e79d35045a3dadef857fc2f4e5
[ "Apache-2.0" ]
null
null
null
PaddleClas/ppcls/arch/backbone/__init__.py
unseenme/mnasnet-paddle-iv
3bfc38477f1f80e79d35045a3dadef857fc2f4e5
[ "Apache-2.0" ]
null
null
null
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
84.441558
308
0.851277
import sys import inspect from ppcls.arch.backbone.legendary_models.mobilenet_v1 import MobileNetV1_x0_25, MobileNetV1_x0_5, MobileNetV1_x0_75, MobileNetV1 from ppcls.arch.backbone.legendary_models.mobilenet_v3 import MobileNetV3_small_x0_35, MobileNetV3_small_x0_5, MobileNetV3_small_x0_75, MobileNetV3_s...
true
true
1c2f17169652f1a2e25d41d17d8f7c398981ef1f
3,546
py
Python
salt/beacons/log_beacon.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
1
2021-09-06T00:14:04.000Z
2021-09-06T00:14:04.000Z
salt/beacons/log_beacon.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
2
2021-04-30T21:17:57.000Z
2021-12-13T20:40:23.000Z
salt/beacons/log_beacon.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Beacon to fire events at specific log messages. .. versionadded:: 2017.7.0 """ # Import Python libs from __future__ import absolute_import, unicode_literals import logging # Import salt libs import salt.utils.files import salt.utils.platform from salt.ext.six.moves import map try: ...
24.455172
81
0.529893
from __future__ import absolute_import, unicode_literals import logging import salt.utils.files import salt.utils.platform from salt.ext.six.moves import map try: import re HAS_REGEX = True except ImportError: HAS_REGEX = False __virtualname__ = "log" LOC_KEY = "log.loc" SKEL = {} SKEL["tag"] = ""...
true
true
1c2f181ffbe17bdbddf3d9d3184668f45a5503f0
1,435
py
Python
otwstest/conflict/__init__.py
OpenTreeOfLife/test-ot-ws
eee0eeb4150e942bea32e9131d20c01ad9666757
[ "BSD-2-Clause" ]
null
null
null
otwstest/conflict/__init__.py
OpenTreeOfLife/test-ot-ws
eee0eeb4150e942bea32e9131d20c01ad9666757
[ "BSD-2-Clause" ]
4
2019-04-10T19:44:00.000Z
2020-04-21T19:50:29.000Z
otwstest/conflict/__init__.py
OpenTreeOfLife/test-ot-ws
eee0eeb4150e942bea32e9131d20c01ad9666757
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # !/usr/bin/env python # -*- coding: utf-8 -*- import re from otwstest import is_str_type, all_api_versions import otwstest.schema.tnrs as tnrs from otwstest.schema.taxonomy.taxon import get_ott_id_property @all_api_versions def test_conflict_status_synth(outcome): # De...
41
88
0.701045
import re from otwstest import is_str_type, all_api_versions import otwstest.schema.tnrs as tnrs from otwstest.schema.taxonomy.taxon import get_ott_id_property @all_api_versions def test_conflict_status_synth(outcome): url = outcome.make_url('conflict/conflict-status') result = outcome.do_http_json(url...
true
true
1c2f18bdcc169f658acad2c313a665e9715bf886
319
py
Python
src/f2py/importTest.py
friedenhe/idwarp
76dce98b244810cb32f6abadcd2454fc22074b59
[ "Apache-2.0" ]
null
null
null
src/f2py/importTest.py
friedenhe/idwarp
76dce98b244810cb32f6abadcd2454fc22074b59
[ "Apache-2.0" ]
null
null
null
src/f2py/importTest.py
friedenhe/idwarp
76dce98b244810cb32f6abadcd2454fc22074b59
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python import sys name = "idwarp" print("Testing if module %s can be imported..." % name) import_cmd = "import %s" % name try: exec(import_cmd) except ImportError: print("Error: idwarp was not imported correctly") sys.exit(1) # end try print("Module %s was successfully imported." % name)
21.266667
55
0.68652
import sys name = "idwarp" print("Testing if module %s can be imported..." % name) import_cmd = "import %s" % name try: exec(import_cmd) except ImportError: print("Error: idwarp was not imported correctly") sys.exit(1) print("Module %s was successfully imported." % name)
true
true
1c2f18f0f69e93b068f718d5da8b83873e8e44f0
336
py
Python
experiments/jacobi-1d/tmp_files/1959.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/jacobi-1d/tmp_files/1959.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/jacobi-1d/tmp_files/1959.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/jacobi-1d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/jacobi-1d/tmp_files/1959.c') procedure('kernel_jacobi_1d') loop(0) known(' n > 2 ') tile(0,2,16,2)...
30.545455
118
0.764881
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/jacobi-1d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/jacobi-1d/tmp_files/1959.c') procedure('kernel_jacobi_1d') loop(0) known(' n > 2 ') tile(0,2,16,2)...
true
true
1c2f1becf02f9bebf5f0826ef7992a68ad8b6b49
90
py
Python
yt/frontends/gizmo/api.py
aemerick/yt
984484616d75c6d7603e71b9d45c5d617705a0e5
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/gizmo/api.py
aemerick/yt
984484616d75c6d7603e71b9d45c5d617705a0e5
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/gizmo/api.py
aemerick/yt
984484616d75c6d7603e71b9d45c5d617705a0e5
[ "BSD-3-Clause-Clear" ]
null
null
null
from .data_structures import \ GizmoDataset from .fields import \ GizmoFieldInfo
15
30
0.744444
from .data_structures import \ GizmoDataset from .fields import \ GizmoFieldInfo
true
true
1c2f1c04218c3c5fef5f3291c23141f001befb38
28,125
py
Python
saleor/lib/python3.7/site-packages/promise/promise.py
cxsper/saleor
5566ddcdaf8f72ba872eca869798e66eb9cdae44
[ "BSD-3-Clause" ]
2
2019-12-06T15:40:14.000Z
2020-07-29T21:30:35.000Z
saleor/lib/python3.7/site-packages/promise/promise.py
cxsper/saleor
5566ddcdaf8f72ba872eca869798e66eb9cdae44
[ "BSD-3-Clause" ]
13
2020-03-24T17:53:51.000Z
2022-02-10T20:01:14.000Z
saleor/lib/python3.7/site-packages/promise/promise.py
cxsper/saleor
5566ddcdaf8f72ba872eca869798e66eb9cdae44
[ "BSD-3-Clause" ]
null
null
null
from collections import namedtuple from functools import partial, wraps from sys import version_info, exc_info from threading import RLock from types import TracebackType from six import reraise # type: ignore from .async_ import Async from .compat import ( Future, ensure_future, iscoroutine, # type: ign...
33.166274
124
0.599147
from collections import namedtuple from functools import partial, wraps from sys import version_info, exc_info from threading import RLock from types import TracebackType from six import reraise from .async_ import Async from .compat import ( Future, ensure_future, iscoroutine, iterate_promise, ) ...
true
true
1c2f1d50fcd7c7c1fa85dee0f7e295ced1eeb880
881
py
Python
src/setup.py
skfzyy/twitter-past-crawler
56c16fe8fd2ac2dc869912f28a55f05ffc63bce5
[ "MIT" ]
null
null
null
src/setup.py
skfzyy/twitter-past-crawler
56c16fe8fd2ac2dc869912f28a55f05ffc63bce5
[ "MIT" ]
null
null
null
src/setup.py
skfzyy/twitter-past-crawler
56c16fe8fd2ac2dc869912f28a55f05ffc63bce5
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='proxytwitter', version='0.0.9', description='A crawler that can crawl and accumulate past tweets without using the official API.', url='https://github.com/skfzyy/twitter-past-crawler', author='skfzyy', license='MIT', keywords='proxy twitter r...
21.487805
102
0.609535
from setuptools import setup setup( name='proxytwitter', version='0.0.9', description='A crawler that can crawl and accumulate past tweets without using the official API.', url='https://github.com/skfzyy/twitter-past-crawler', author='skfzyy', license='MIT', keywords='proxy twitter r...
true
true
1c2f1d960b752d232d8019234dbb96c9ecfffe4e
5,738
py
Python
inspectors/gsa.py
crdunwel/inspectors-general
e2ea3eb978a2819c56ad61df49b541027f377fcd
[ "CC0-1.0" ]
1
2019-06-10T00:33:02.000Z
2019-06-10T00:33:02.000Z
inspectors/gsa.py
crdunwel/inspectors-general
e2ea3eb978a2819c56ad61df49b541027f377fcd
[ "CC0-1.0" ]
null
null
null
inspectors/gsa.py
crdunwel/inspectors-general
e2ea3eb978a2819c56ad61df49b541027f377fcd
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python from utils import utils, inspector from bs4 import BeautifulSoup from datetime import datetime import re import logging # oldest year: 1979 def run(options): crawl_index(SEMIANNUAL_REPORTS_URL, options) crawl_index(AUDIT_REPORTS_URL, options, True) crawl_index(PEER_REVIEW_REPORTS_URL, opt...
34.987805
142
0.679157
from utils import utils, inspector from bs4 import BeautifulSoup from datetime import datetime import re import logging def run(options): crawl_index(SEMIANNUAL_REPORTS_URL, options) crawl_index(AUDIT_REPORTS_URL, options, True) crawl_index(PEER_REVIEW_REPORTS_URL, options) crawl_index(MISCELLANEOUS_REPORT...
true
true
1c2f1df2a725c60c51c41657841a45853c5cd7b4
1,651
py
Python
test/test_requests.py
disocord/neis.py
d0dd32bf7238882db65381e39bc6fcd6fae43754
[ "MIT" ]
61
2020-04-26T03:06:45.000Z
2022-03-17T02:30:59.000Z
test/test_requests.py
disocord/neis.py
d0dd32bf7238882db65381e39bc6fcd6fae43754
[ "MIT" ]
28
2020-04-27T05:07:30.000Z
2021-10-01T12:17:55.000Z
test/test_requests.py
disocord/neis.py
d0dd32bf7238882db65381e39bc6fcd6fae43754
[ "MIT" ]
17
2020-04-27T03:48:52.000Z
2022-03-10T04:45:54.000Z
from neispy.sync import SyncNeispy def test_all(client: SyncNeispy): scinfo = client.schoolInfo(SCHUL_NM="인천석천초등학교") AE = scinfo[0].ATPT_OFCDC_SC_CODE # 교육청코드 SE = scinfo[0].SD_SCHUL_CODE # 학교코드 # 학교코드와 교육청 코드로 2019년 1월 22일의 급식 정보 요청 scmeal = client.mealServiceDietInfo(AE, SE, MLSV_YMD="2019012...
34.395833
81
0.6808
from neispy.sync import SyncNeispy def test_all(client: SyncNeispy): scinfo = client.schoolInfo(SCHUL_NM="인천석천초등학교") AE = scinfo[0].ATPT_OFCDC_SC_CODE SE = scinfo[0].SD_SCHUL_CODE scmeal = client.mealServiceDietInfo(AE, SE, MLSV_YMD="20190122") meal = scmeal[0].DDISH_NM.replace("<br/>", ...
true
true
1c2f1e821c040c09f681ea450138ed0ffaac8cff
1,537
py
Python
setup.py
rtmigo/lnkdpn
d63ef55deff5ba408381af04250e97dada0995a0
[ "BSD-3-Clause" ]
1
2021-03-08T04:18:13.000Z
2021-03-08T04:18:13.000Z
setup.py
rtmigo/lnkdpn
d63ef55deff5ba408381af04250e97dada0995a0
[ "BSD-3-Clause" ]
null
null
null
setup.py
rtmigo/lnkdpn
d63ef55deff5ba408381af04250e97dada0995a0
[ "BSD-3-Clause" ]
null
null
null
from importlib.machinery import SourceFileLoader from pathlib import Path from setuptools import setup, find_packages ver = SourceFileLoader('ver', 'depz/x00_version.py').load_module() # transform GitHub spoilers into markdown setup( name="depz", version=ver.__version__, author="Art Galkin", author_email="...
27.446429
97
0.688354
from importlib.machinery import SourceFileLoader from pathlib import Path from setuptools import setup, find_packages ver = SourceFileLoader('ver', 'depz/x00_version.py').load_module() setup( name="depz", version=ver.__version__, author="Art Galkin", author_email="ortemeo@gmail.com", url='https://github...
true
true
1c2f1f0ab3c906ecf4a0f01346cdecbec21f72d9
11,698
py
Python
fury/shaders/tests/test_base.py
sreekarchigurupati/fury
07ed10123954d3ce3197c45f8ee54a7d4909656d
[ "BSD-3-Clause" ]
null
null
null
fury/shaders/tests/test_base.py
sreekarchigurupati/fury
07ed10123954d3ce3197c45f8ee54a7d4909656d
[ "BSD-3-Clause" ]
null
null
null
fury/shaders/tests/test_base.py
sreekarchigurupati/fury
07ed10123954d3ce3197c45f8ee54a7d4909656d
[ "BSD-3-Clause" ]
null
null
null
import os import pytest import numpy as np import numpy.testing as npt from fury import actor, window from fury.shaders import (add_shader_callback, attribute_to_actor, compose_shader, import_fury_shader, load_shader, load, shader_to_actor, replace_shader_in_actor) ...
28.812808
79
0.614977
import os import pytest import numpy as np import numpy.testing as npt from fury import actor, window from fury.shaders import (add_shader_callback, attribute_to_actor, compose_shader, import_fury_shader, load_shader, load, shader_to_actor, replace_shader_in_actor) ...
true
true
1c2f1f30c8c00b5cee84afb83df909994e3ce8fa
362
py
Python
array/last_stone_weight.py
elenaborisova/LeetCode-Solutions
98376aab7fd150a724e316357ae5ea46988d9eac
[ "MIT" ]
null
null
null
array/last_stone_weight.py
elenaborisova/LeetCode-Solutions
98376aab7fd150a724e316357ae5ea46988d9eac
[ "MIT" ]
null
null
null
array/last_stone_weight.py
elenaborisova/LeetCode-Solutions
98376aab7fd150a724e316357ae5ea46988d9eac
[ "MIT" ]
null
null
null
def last_stone_weight(stones): while len(stones) > 1: stones.sort() if stones[-1] == stones[-2]: stones.pop() stones.pop() else: last = stones.pop(-2) stones[-1] -= last return stones[0] if stones else 0 print(last_stone_weight([2, 7, 4,...
22.625
44
0.527624
def last_stone_weight(stones): while len(stones) > 1: stones.sort() if stones[-1] == stones[-2]: stones.pop() stones.pop() else: last = stones.pop(-2) stones[-1] -= last return stones[0] if stones else 0 print(last_stone_weight([2, 7, 4,...
true
true
1c2f1fc326d0bfd52e2588be7c8aa9e6e7d62a31
6,659
py
Python
built-in/TensorFlow/Official/cv/image_classification/ResNext50_for_TensorFlow/code/resnext50_train/configs/res50_32bs_1p_host.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
12
2020-12-13T08:34:24.000Z
2022-03-20T15:17:17.000Z
built-in/TensorFlow/Official/cv/image_classification/ResNext50_for_TensorFlow/code/resnext50_train/configs/res50_32bs_1p_host.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
1
2022-01-20T03:11:05.000Z
2022-01-20T06:53:39.000Z
built-in/TensorFlow/Official/cv/image_classification/ResNext50_for_TensorFlow/code/resnext50_train/configs/res50_32bs_1p_host.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
2
2021-07-10T12:40:46.000Z
2021-12-17T07:55:15.000Z
# coding=utf-8 # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
45.609589
169
0.517946
import tensorflow as tf import os log_dir = './resnet50_train/results/'+os.path.basename(__file__).split('.')[0] config = { 'accelerator': '1980', 'shuffle_enable': 'yes', 'shuffle_buffer_size': 10000, 'rank_size': 1, 'shard': False, 'mode':'train',...
true
true
1c2f209df3bd6f54e25cf86519b7e33cd9059853
14,351
py
Python
django/db/migrations/operations/models.py
dnozay/django
5dcdbe95c749d36072f527e120a8cb463199ae0d
[ "BSD-3-Clause" ]
1
2019-03-26T02:49:39.000Z
2019-03-26T02:49:39.000Z
django/db/migrations/operations/models.py
dnozay/django
5dcdbe95c749d36072f527e120a8cb463199ae0d
[ "BSD-3-Clause" ]
null
null
null
django/db/migrations/operations/models.py
dnozay/django
5dcdbe95c749d36072f527e120a8cb463199ae0d
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals from django.db import models from django.db.models.options import normalize_together from django.db.migrations.state import ModelState from django.db.migrations.operations.base import Operation from django.utils import six class CreateModel(Operation): """ Create a mod...
39.863889
119
0.656122
from __future__ import unicode_literals from django.db import models from django.db.models.options import normalize_together from django.db.migrations.state import ModelState from django.db.migrations.operations.base import Operation from django.utils import six class CreateModel(Operation): serialization_expan...
true
true
1c2f229959a938a1f8c49e23047256c2a1862a08
729
py
Python
priceserver/modules/exchange/__init__.py
Stakedllc/oracle-feeder
d12e465168cecd38eb9a33a736d50d70c2659aa2
[ "Apache-2.0" ]
null
null
null
priceserver/modules/exchange/__init__.py
Stakedllc/oracle-feeder
d12e465168cecd38eb9a33a736d50d70c2659aa2
[ "Apache-2.0" ]
null
null
null
priceserver/modules/exchange/__init__.py
Stakedllc/oracle-feeder
d12e465168cecd38eb9a33a736d50d70c2659aa2
[ "Apache-2.0" ]
null
null
null
import json class Price: currency: str price: str raw_price: float dispersion: float def __init__(self, currency: str, price: float, dispersion: float = 0.0): self.currency = currency self.dispersion = dispersion self.raw_price = price self.price = format(price, "...
23.516129
79
0.599451
import json class Price: currency: str price: str raw_price: float dispersion: float def __init__(self, currency: str, price: float, dispersion: float = 0.0): self.currency = currency self.dispersion = dispersion self.raw_price = price self.price = format(price, "...
true
true
1c2f22d9a76cb912e4e682553caee78afcffd15e
469
py
Python
env/Lib/site-packages/plotly/validators/cone/_opacity.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
venv/Lib/site-packages/plotly/validators/cone/_opacity.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
venv/Lib/site-packages/plotly/validators/cone/_opacity.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="cone", **kwargs): super(OpacityValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, e...
33.5
76
0.63113
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="cone", **kwargs): super(OpacityValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, e...
true
true