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
08fc5e5e636b23a55d4ea5e92240e1aeaa0ffa05
759
py
Python
core/utils/Mark202.py
Hayashi-Yudai/scan_system
c7fe0326fc12335d312ac0d28da69565813c843a
[ "MIT" ]
null
null
null
core/utils/Mark202.py
Hayashi-Yudai/scan_system
c7fe0326fc12335d312ac0d28da69565813c843a
[ "MIT" ]
5
2021-12-23T10:33:19.000Z
2022-03-04T08:33:51.000Z
core/utils/Mark202.py
Hayashi-Yudai/scan_system
c7fe0326fc12335d312ac0d28da69565813c843a
[ "MIT" ]
null
null
null
import time import logging from core.utils.instrument import GPIBInstrument logger = logging.getLogger("root") class Mark202(GPIBInstrument): def wait_while_busy(self): while True: logger.debug("Mark102.wait_while_busy: loop") status = self.instr.query("!:") if "R" in...
23.71875
57
0.57971
import time import logging from core.utils.instrument import GPIBInstrument logger = logging.getLogger("root") class Mark202(GPIBInstrument): def wait_while_busy(self): while True: logger.debug("Mark102.wait_while_busy: loop") status = self.instr.query("!:") if "R" in...
true
true
08fc5e943a3a18c014f4db0391f3965d803f9989
18,438
py
Python
modules/utils/weeb.py
ExyExz/NekoBot
8cd2df10d2d8cf3ae3b5e0a2f933672db59e3a5a
[ "MIT" ]
41
2019-01-17T07:47:39.000Z
2022-03-29T05:22:33.000Z
modules/utils/weeb.py
ExyExz/NekoBot
8cd2df10d2d8cf3ae3b5e0a2f933672db59e3a5a
[ "MIT" ]
13
2018-06-13T22:11:12.000Z
2018-12-24T13:16:34.000Z
modules/utils/weeb.py
ExyExz/NekoBot
8cd2df10d2d8cf3ae3b5e0a2f933672db59e3a5a
[ "MIT" ]
49
2019-01-09T03:17:36.000Z
2022-03-18T11:06:28.000Z
import aiohttp import logging from io import BytesIO log = logging.getLogger() class Weeb: def __init__(self, token: str, bot, user_agent: str = "NekoBot/4.2.0"): self.user_agent = user_agent self.bot = bot self.headers = { "Authorization": "Wolke " + token, "User-...
34.271375
94
0.585042
import aiohttp import logging from io import BytesIO log = logging.getLogger() class Weeb: def __init__(self, token: str, bot, user_agent: str = "NekoBot/4.2.0"): self.user_agent = user_agent self.bot = bot self.headers = { "Authorization": "Wolke " + token, "User-...
true
true
08fc5fc6616daa69e95338e16128e5cf5887674b
3,972
py
Python
test5.py
FCChinen/lab2
b04b4e0788678e4de2365b74db505ef1a72b7103
[ "MIT" ]
1
2020-05-31T20:58:38.000Z
2020-05-31T20:58:38.000Z
test5.py
FCChinen/lab2
b04b4e0788678e4de2365b74db505ef1a72b7103
[ "MIT" ]
null
null
null
test5.py
FCChinen/lab2
b04b4e0788678e4de2365b74db505ef1a72b7103
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import random import asyncio from mytcputils import * from mytcp import Servidor class CamadaRede: def __init__(self): self.callback = None self.fila = [] def registrar_recebedor(self, callback): self.callback = callback def enviar(self, segmento, de...
33.661017
147
0.662387
import os import random import asyncio from mytcputils import * from mytcp import Servidor class CamadaRede: def __init__(self): self.callback = None self.fila = [] def registrar_recebedor(self, callback): self.callback = callback def enviar(self, segmento, dest_addr): self....
true
true
08fc6011f4018740b5eb684daa35dddbc48eb8ae
575
py
Python
tests/test_index.py
getsentry/libsourcemap
94b5a34814fafee9dc23da8ec0ccca77f30e3370
[ "BSD-3-Clause" ]
92
2016-10-14T19:54:47.000Z
2021-08-14T07:33:24.000Z
tests/test_index.py
getsentry/libsourcemap
94b5a34814fafee9dc23da8ec0ccca77f30e3370
[ "BSD-3-Clause" ]
12
2016-10-28T22:23:17.000Z
2017-11-17T19:44:08.000Z
tests/test_index.py
getsentry/libsourcemap
94b5a34814fafee9dc23da8ec0ccca77f30e3370
[ "BSD-3-Clause" ]
8
2016-10-23T12:29:05.000Z
2021-03-03T11:07:54.000Z
from libsourcemap import Index from testutils import verify_index, verify_token_search def test_load_index(): with open('tests/fixtures/indexed.sourcemap.js', 'rb') as f: index_map = f.read() with open('tests/fixtures/file1.js', 'rb') as f: f1 = f.read() with open('tests/fixtures/file2.js...
25
64
0.61913
from libsourcemap import Index from testutils import verify_index, verify_token_search def test_load_index(): with open('tests/fixtures/indexed.sourcemap.js', 'rb') as f: index_map = f.read() with open('tests/fixtures/file1.js', 'rb') as f: f1 = f.read() with open('tests/fixtures/file2.js...
false
true
08fc6032b4bfd2549afd04d9d891bda5dbbd458c
438
py
Python
dataingestion.py
jpvelsamy/hotdog
df45cdc0b9e6abfecd16a43f75f1671e51cbc47c
[ "Apache-2.0" ]
null
null
null
dataingestion.py
jpvelsamy/hotdog
df45cdc0b9e6abfecd16a43f75f1671e51cbc47c
[ "Apache-2.0" ]
null
null
null
dataingestion.py
jpvelsamy/hotdog
df45cdc0b9e6abfecd16a43f75f1671e51cbc47c
[ "Apache-2.0" ]
null
null
null
import pandas as pd import logging logger = logging.getLogger("ACE") class DataIngestion: def __init__(self, file_name): self.file_name = file_name def prepUp(self): try: data = pd.read_csv(self.file_name) logger.info(f'column listing #{data.columns}') except...
23.052632
75
0.63242
import pandas as pd import logging logger = logging.getLogger("ACE") class DataIngestion: def __init__(self, file_name): self.file_name = file_name def prepUp(self): try: data = pd.read_csv(self.file_name) logger.info(f'column listing #{data.columns}') except...
true
true
08fc608266549cbebf442b636358761cda67df04
7,401
py
Python
lte/gateway/python/magma/policydb/servicers/session_servicer.py
kyaaqba/magma
fdb7be22a2076f9a9b158c9670a9af6cad68b85f
[ "BSD-3-Clause" ]
null
null
null
lte/gateway/python/magma/policydb/servicers/session_servicer.py
kyaaqba/magma
fdb7be22a2076f9a9b158c9670a9af6cad68b85f
[ "BSD-3-Clause" ]
10
2021-03-31T20:19:00.000Z
2022-02-19T07:09:57.000Z
lte/gateway/python/magma/policydb/servicers/session_servicer.py
kyaaqba/magma
fdb7be22a2076f9a9b158c9670a9af6cad68b85f
[ "BSD-3-Clause" ]
3
2020-08-20T18:45:34.000Z
2020-08-20T20:18:42.000Z
""" Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ import grpc import logging ...
35.242857
80
0.63613
import grpc import logging from typing import List from lte.protos.mconfig import mconfigs_pb2 from lte.protos.policydb_pb2 import PolicyRule, FlowDescription, \ FlowMatch, RatingGroup from lte.protos.session_manager_pb2 import CreateSessionRequest, \ CreateSessionResponse, UpdateSessionRequest, SessionTermina...
true
true
08fc60f27dd2120323e5fe27978cc12744ce04c0
1,222
py
Python
backend/scripts/create_alerts.py
Healthcare-NOW/poppwatch
b8545f40699ef521f4df2a2f2f4edcf3c5b1cc04
[ "MIT" ]
1
2020-09-09T23:06:36.000Z
2020-09-09T23:06:36.000Z
backend/scripts/create_alerts.py
Healthcare-NOW/fec-watch
b8545f40699ef521f4df2a2f2f4edcf3c5b1cc04
[ "MIT" ]
9
2020-07-18T15:09:59.000Z
2022-02-27T00:53:47.000Z
backend/scripts/create_alerts.py
Healthcare-NOW/pop-donation-tracker
b8545f40699ef521f4df2a2f2f4edcf3c5b1cc04
[ "MIT" ]
null
null
null
from dev import app from app.queries import * app.app_context().push() def candidate_batches(batch_size): min_id = 0 while True: candidates = ( Candidate.query.filter(Candidate.id >= min_id) .order_by(Candidate.id) .limit(batch_size) .all() ) ...
27.772727
78
0.616203
from dev import app from app.queries import * app.app_context().push() def candidate_batches(batch_size): min_id = 0 while True: candidates = ( Candidate.query.filter(Candidate.id >= min_id) .order_by(Candidate.id) .limit(batch_size) .all() ) ...
true
true
08fc628fbff105e1d225fa3ebcc1826c88347880
2,878
py
Python
source/graph.py
sanmik/brain-network-viz
9c881e49c14c94e3f7ef4b7776d98c930716ee91
[ "MIT" ]
5
2017-09-01T14:05:03.000Z
2019-07-13T07:52:49.000Z
source/graph.py
sanmik/brain-network-viz
9c881e49c14c94e3f7ef4b7776d98c930716ee91
[ "MIT" ]
null
null
null
source/graph.py
sanmik/brain-network-viz
9c881e49c14c94e3f7ef4b7776d98c930716ee91
[ "MIT" ]
1
2017-09-01T14:05:03.000Z
2017-09-01T14:05:03.000Z
""" Maintain model data about all Lobes, Nodes, and Edges involved in this visualization. Handles parsing input files and constructing those entities. """ # Library Imports import csv import bisect # Local Module Imports import config from lobe import Lobe from node import Node from edge import Edge class Graph...
36.897436
78
0.658791
import csv import bisect import config from lobe import Lobe from node import Node from edge import Edge class Graph: def __init__(self, node_md, edge_md, node_filename, edge_filename): self.node_md = node_md self.edge_md = edge_md self.node_filename = node_filename self.edge_filename = edge_filena...
true
true
08fc642c88cbe05eef3f101361ddbb082136d0e6
583
py
Python
train/kitti_eval/get_gt.py
kangningLi/master_thesis
b9173cb18b082eeaf933d5a1e4872be161018b50
[ "Apache-2.0" ]
2
2019-03-27T21:39:52.000Z
2019-04-06T06:46:50.000Z
train/kitti_eval/get_gt.py
kangningLi/master_thesis
b9173cb18b082eeaf933d5a1e4872be161018b50
[ "Apache-2.0" ]
null
null
null
train/kitti_eval/get_gt.py
kangningLi/master_thesis
b9173cb18b082eeaf933d5a1e4872be161018b50
[ "Apache-2.0" ]
1
2019-03-26T07:13:04.000Z
2019-03-26T07:13:04.000Z
import os import numpy as np import sys import shutil current_dir = os.getcwd() results_dir = current_dir + "/result/" new_gt_dir = current_dir + "/gt/" ground_truth = "/home/kangning/Documents/Masterarbeit/frustum-pointnets/dataset/KITTI/object/training/label_2/" file_names = os.listdir(results_dir) ground_truth_n...
24.291667
111
0.74271
import os import numpy as np import sys import shutil current_dir = os.getcwd() results_dir = current_dir + "/result/" new_gt_dir = current_dir + "/gt/" ground_truth = "/home/kangning/Documents/Masterarbeit/frustum-pointnets/dataset/KITTI/object/training/label_2/" file_names = os.listdir(results_dir) ground_truth_n...
true
true
08fc647b35ec1622a055f35f6003dddccc387d43
1,821
py
Python
app/user/serializers.py
carlosnesme/recipe-app-api
7fc0cf50b1f923d9f6f8e508a0a19e207fc284d7
[ "MIT" ]
null
null
null
app/user/serializers.py
carlosnesme/recipe-app-api
7fc0cf50b1f923d9f6f8e508a0a19e207fc284d7
[ "MIT" ]
null
null
null
app/user/serializers.py
carlosnesme/recipe-app-api
7fc0cf50b1f923d9f6f8e508a0a19e207fc284d7
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model, authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class UserSerializer(serializers.ModelSerializer): """Serializer for the users object""" class Meta: model = get_user_model() fields = (...
33.722222
83
0.618891
from django.contrib.auth import get_user_model, authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class UserSerializer(serializers.ModelSerializer): class Meta: model = get_user_model() fields = ('email', 'password', 'name') extra...
true
true
08fc656804e3e80a2b09538edcca612fdd566d5b
3,846
py
Python
experiments/plot_hist_compare.py
ashley062190/pycpa_taskchain
4274371b90407fe9715ca2d5d5793bf4736f53e2
[ "MIT" ]
1
2021-07-25T19:37:03.000Z
2021-07-25T19:37:03.000Z
experiments/plot_hist_compare.py
ashley062190/pycpa_taskchain
4274371b90407fe9715ca2d5d5793bf4736f53e2
[ "MIT" ]
null
null
null
experiments/plot_hist_compare.py
ashley062190/pycpa_taskchain
4274371b90407fe9715ca2d5d5793bf4736f53e2
[ "MIT" ]
1
2020-12-10T17:01:20.000Z
2020-12-10T17:01:20.000Z
#!/usr/bin/env python import matplotlib.pyplot as pyplot import matplotlib import numpy as np import argparse import csv parser = argparse.ArgumentParser(description='Print statistics of path latency results.') parser.add_argument('file', metavar='csv_file', type=str, help='csv file to be processed') parser....
32.319328
89
0.639886
import matplotlib.pyplot as pyplot import matplotlib import numpy as np import argparse import csv parser = argparse.ArgumentParser(description='Print statistics of path latency results.') parser.add_argument('file', metavar='csv_file', type=str, help='csv file to be processed') parser.add_argument('--output...
true
true
08fc656e416f16e529f231fcb9366e49a7ac3ab5
3,714
py
Python
application/helper/suite_runner.py
lalithbachimanchi/acciom_portal-2
ced3c02538abb9cb8c0b388b8fe9fc8be77f221a
[ "MIT" ]
1
2020-11-15T21:19:15.000Z
2020-11-15T21:19:15.000Z
application/helper/suite_runner.py
lalithbachimanchi/acciom_portal-2
ced3c02538abb9cb8c0b388b8fe9fc8be77f221a
[ "MIT" ]
null
null
null
application/helper/suite_runner.py
lalithbachimanchi/acciom_portal-2
ced3c02538abb9cb8c0b388b8fe9fc8be77f221a
[ "MIT" ]
2
2019-07-18T15:56:45.000Z
2019-07-19T12:04:24.000Z
import datetime import time from flask import render_template from flask_mail import Message, Mail from application.models.user import (TestSuite, TestCaseLog,TestCase) from index import app from index import db import functools mail = Mail(app) # app.config('EMAIL_ON_SUITE_EXECUTION', True) # app.config('PARALLEL...
37.14
123
0.678783
import datetime import time from flask import render_template from flask_mail import Message, Mail from application.models.user import (TestSuite, TestCaseLog,TestCase) from index import app from index import db import functools mail = Mail(app) def check_status(case_log_id_list): if not start_test(case_log_...
true
true
08fc673ed292ff627ece2c42acd8ed3ae29502c0
9,885
py
Python
env/lib/python3.9/site-packages/ansible/modules/cloud/google/_gcp_dns_managed_zone_facts.py
unbounce/aws-name-asg-instances
e0379442e3ce71bf66ba9b8975b2cc57a2c7648d
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
env/lib/python3.9/site-packages/ansible/modules/cloud/google/_gcp_dns_managed_zone_facts.py
unbounce/aws-name-asg-instances
e0379442e3ce71bf66ba9b8975b2cc57a2c7648d
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
env/lib/python3.9/site-packages/ansible/modules/cloud/google/_gcp_dns_managed_zone_facts.py
unbounce/aws-name-asg-instances
e0379442e3ce71bf66ba9b8975b2cc57a2c7648d
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
33.508475
133
0.606778
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ["preview"], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: gcp_dns_managed_zone_info description: - Gather info for GCP ManagedZone short_description: Gather...
true
true
08fc675cf961620c0bbc029de7e5e0ea829c5275
3,005
py
Python
Python/src/polynomialfiltering/PythonUtilities.py
lintondf/MorrisonPolynomialFiltering
f5713f9ed9a24c1382875d8ebdec00100f39e3a5
[ "MIT" ]
null
null
null
Python/src/polynomialfiltering/PythonUtilities.py
lintondf/MorrisonPolynomialFiltering
f5713f9ed9a24c1382875d8ebdec00100f39e3a5
[ "MIT" ]
null
null
null
Python/src/polynomialfiltering/PythonUtilities.py
lintondf/MorrisonPolynomialFiltering
f5713f9ed9a24c1382875d8ebdec00100f39e3a5
[ "MIT" ]
null
null
null
''' PolynomialFiltering.PythonUtilities (C) Copyright 2019 - Blue Lightning Development, LLC. D. F. Linton. support@BlueLightningDevelopment.com SPDX-License-Identifier: MIT See separate LICENSE file for full text ''' """***************** DO NOT TRANSPILE THIS MODULE *************************""" from numpy import...
26.59292
111
0.600998
from numpy import exp, log, min, exp, array from scipy.stats import chi2, f; from typing import List; def virtual(funcobj): return funcobj; def constructor(funcobj): return funcobj; def forcestatic(funcobj): return funcobj; def ignore(funcobj): return funcobj; def inline(funcobj): return funco...
true
true
08fc67a17a1aec1fca6ee11814eda94416fef33e
10,494
py
Python
alibabacloud/__init__.py
aliyun/alibabacloud-python-sdk-v2
a73d3321eafc2679c98f3c37c625e618922838fb
[ "Apache-2.0" ]
21
2018-12-20T07:34:13.000Z
2020-03-05T14:32:08.000Z
alibabacloud/__init__.py
aliyun/alibabacloud-python-sdk-v2
a73d3321eafc2679c98f3c37c625e618922838fb
[ "Apache-2.0" ]
22
2018-12-21T13:22:33.000Z
2020-06-29T08:37:09.000Z
alibabacloud/__init__.py
aliyun/alibabacloud-python-sdk-v2
a73d3321eafc2679c98f3c37c625e618922838fb
[ "Apache-2.0" ]
12
2018-12-29T05:45:55.000Z
2022-01-05T09:59:30.000Z
# -*- coding: utf-8 -*- # Copyright 2018 Alibaba Cloud 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 r...
36.950704
102
0.683057
import logging __version__ = '1.0.6' from alibabacloud.client import ClientConfig from alibabacloud.exceptions import ClientException from alibabacloud.exceptions import NoModuleException, ServiceNameInvalidException, \ ApiVersionInvalidException from alibabacloud.utils.client_supports import _list_available_cli...
true
true
08fc689fb23df6cd391d37172af9f9749f0f258e
1,276
py
Python
pulse2percept/utils/__init__.py
tanyabhatia/pulse2percept
b322c7daf22154d60f7abd8adb039c5982824a7c
[ "BSD-3-Clause" ]
null
null
null
pulse2percept/utils/__init__.py
tanyabhatia/pulse2percept
b322c7daf22154d60f7abd8adb039c5982824a7c
[ "BSD-3-Clause" ]
null
null
null
pulse2percept/utils/__init__.py
tanyabhatia/pulse2percept
b322c7daf22154d60f7abd8adb039c5982824a7c
[ "BSD-3-Clause" ]
null
null
null
"""Various utility and helper functions. .. autosummary:: :toctree: _api base geometry array images convolution optimize stats parallel deprecation """ from .base import PrettyPrint, FreezeError, Frozen, Data, cached, gamma from .geometry import (Grid2D, RetinalCoordTransform,...
22
74
0.665361
from .base import PrettyPrint, FreezeError, Frozen, Data, cached, gamma from .geometry import (Grid2D, RetinalCoordTransform, Curcio1990Transform, Watson2014Transform, Watson2014DisplaceTransform, cart2pol, pol2cart, delta_angle) from .array import radial_mask, unique from ...
true
true
08fc69a0be28ab2f8238f3268bf424e83ac6d5f0
3,342
py
Python
customSDK/servicefabric/models/deployed_service_replica_detail_info.py
leikong/service-fabric-cli
6ec1b1c8445b7cc5a889f3b172b47a6017c8888c
[ "MIT" ]
1
2020-06-16T22:32:27.000Z
2020-06-16T22:32:27.000Z
customSDK/servicefabric/models/deployed_service_replica_detail_info.py
leikong/service-fabric-cli
6ec1b1c8445b7cc5a889f3b172b47a6017c8888c
[ "MIT" ]
null
null
null
customSDK/servicefabric/models/deployed_service_replica_detail_info.py
leikong/service-fabric-cli
6ec1b1c8445b7cc5a889f3b172b47a6017c8888c
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
47.070423
160
0.701676
from msrest.serialization import Model class DeployedServiceReplicaDetailInfo(Model): _validation = { 'service_kind': {'required': True}, } _attribute_map = { 'service_name': {'key': 'ServiceName', 'type': 'str'}, 'partition_id': {'key': 'PartitionId', 'type': 'str'}, 'c...
true
true
08fc6a054da8bb3bd43ffa7648f30030cb731c8b
22,351
py
Python
retrace/glretrace.py
ds-hwang/apitrace
b74347ebae0d033a013c4de3efb0e9165e9cea8f
[ "MIT" ]
null
null
null
retrace/glretrace.py
ds-hwang/apitrace
b74347ebae0d033a013c4de3efb0e9165e9cea8f
[ "MIT" ]
null
null
null
retrace/glretrace.py
ds-hwang/apitrace
b74347ebae0d033a013c4de3efb0e9165e9cea8f
[ "MIT" ]
1
2021-05-21T18:27:29.000Z
2021-05-21T18:27:29.000Z
########################################################################## # # Copyright 2010 VMware, Inc. # All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without res...
45.428862
138
0.56597
"""GL retracer generator.""" from retrace import Retracer import specs.stdapi as stdapi import specs.glapi as glapi import specs.glesapi as glesapi class GlRetracer(Retracer): table_name = 'glretrace::gl_callbacks' def retraceFunction(self, function): Retracer.retraceFunction(self, function) ...
false
true
08fc6a1986f092b2846ec416959cdffb037482e2
13,285
py
Python
source/_UIAHandler.py
pcguruuu/git-git.nvaccess.org-nvda
a34f480add5314d93a9d7d51e1ab912215054127
[ "bzip2-1.0.6" ]
null
null
null
source/_UIAHandler.py
pcguruuu/git-git.nvaccess.org-nvda
a34f480add5314d93a9d7d51e1ab912215054127
[ "bzip2-1.0.6" ]
null
null
null
source/_UIAHandler.py
pcguruuu/git-git.nvaccess.org-nvda
a34f480add5314d93a9d7d51e1ab912215054127
[ "bzip2-1.0.6" ]
null
null
null
from ctypes import * from ctypes.wintypes import * import comtypes.client from comtypes.automation import VT_EMPTY from comtypes import * import weakref import threading import time import api import appModuleHandler import queueHandler import controlTypes import NVDAHelper import winKernel import winUser...
42.854839
301
0.805194
from ctypes import * from ctypes.wintypes import * import comtypes.client from comtypes.automation import VT_EMPTY from comtypes import * import weakref import threading import time import api import appModuleHandler import queueHandler import controlTypes import NVDAHelper import winKernel import winUser...
true
true
08fc6b568d8bb2dd544e974937e5e15cfbc28a12
449
py
Python
mundo-1/ex026.py
pablocarracci/cev-python
dd6c2db80be84ec732fc5efd895e11d48d298258
[ "MIT" ]
null
null
null
mundo-1/ex026.py
pablocarracci/cev-python
dd6c2db80be84ec732fc5efd895e11d48d298258
[ "MIT" ]
null
null
null
mundo-1/ex026.py
pablocarracci/cev-python
dd6c2db80be84ec732fc5efd895e11d48d298258
[ "MIT" ]
null
null
null
# Exercício 026 - Primeira e Última Ocorrência de Uma String frase = input('Digite uma frase: ').strip().upper() letra = input('Digite uma letra: ').strip().upper() letras = frase.count(letra) print(f'A letra {letra} aparece {letras} vezes na frase.') primeira = frase.find(letra) + 1 print(f'A primeira letra {letra}...
32.071429
65
0.712695
frase = input('Digite uma frase: ').strip().upper() letra = input('Digite uma letra: ').strip().upper() letras = frase.count(letra) print(f'A letra {letra} aparece {letras} vezes na frase.') primeira = frase.find(letra) + 1 print(f'A primeira letra {letra} apareceu na posição {primeira}') ultima = frase.rfind(letra...
true
true
08fc6c62d0de244219998133e73f9210a9a1c8c7
1,209
py
Python
module/decorator.py
MacwinWin/simple_cli
5f243d2840b58392d3214d54b1261b1736ba70d4
[ "MIT" ]
null
null
null
module/decorator.py
MacwinWin/simple_cli
5f243d2840b58392d3214d54b1261b1736ba70d4
[ "MIT" ]
null
null
null
module/decorator.py
MacwinWin/simple_cli
5f243d2840b58392d3214d54b1261b1736ba70d4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @author : microfat # @time : 07/28/21 11:04:47 # @File : decorator.py import functools from typing import Tuple, Callable from module import my_crypto from models import public_data_model class Decrator: """装饰器类 """ @staticmethod def authenticatio...
25.723404
137
0.526882
import functools from typing import Tuple, Callable from module import my_crypto from models import public_data_model class Decrator: @staticmethod def authentication(func: Callable) -> Callable: @functools.wraps(func) def wrapper(*args, **kw) -> Tuple[str, str]: if my_crypto.MyC...
true
true
08fc6c98523380106d923c176a06e96d87e50339
4,069
py
Python
msibi/tests/test_pair.py
jennyfothergill/msibi
0e309eff836dc13016d87889fe8d8f6960a13599
[ "MIT" ]
7
2021-03-24T17:01:09.000Z
2022-01-03T21:53:26.000Z
msibi/tests/test_pair.py
jennyfothergill/msibi
0e309eff836dc13016d87889fe8d8f6960a13599
[ "MIT" ]
22
2021-03-24T18:09:57.000Z
2022-02-24T18:36:49.000Z
msibi/tests/test_pair.py
jennyfothergill/msibi
0e309eff836dc13016d87889fe8d8f6960a13599
[ "MIT" ]
2
2021-03-24T16:19:56.000Z
2021-03-24T17:04:48.000Z
import os import numpy as np import pytest from msibi import MSIBI, State, Pair, mie from .base_test import BaseTest dr = 0.1 / 6.0 r = np.arange(0, 2.5 + dr, dr) r_range = np.asarray([0.0, 2.5 + dr]) n_bins = 151 k_B = 1.9872041e-3 # kcal/mol-K T = 298.0 # K class TestPair(BaseTest): def test_pair_name(sel...
35.382609
77
0.576554
import os import numpy as np import pytest from msibi import MSIBI, State, Pair, mie from .base_test import BaseTest dr = 0.1 / 6.0 r = np.arange(0, 2.5 + dr, dr) r_range = np.asarray([0.0, 2.5 + dr]) n_bins = 151 k_B = 1.9872041e-3 T = 298.0 class TestPair(BaseTest): def test_pair_name(self, pair): ...
true
true
08fc6d9441bc81f3079b9ecc97aa5d7a5ee1aed5
100
py
Python
src/server/models/__init__.py
daniel3303/sirs-project
38a36ecf2373775c3a866f185dacb7597ad1e3cc
[ "Apache-2.0" ]
null
null
null
src/server/models/__init__.py
daniel3303/sirs-project
38a36ecf2373775c3a866f185dacb7597ad1e3cc
[ "Apache-2.0" ]
null
null
null
src/server/models/__init__.py
daniel3303/sirs-project
38a36ecf2373775c3a866f185dacb7597ad1e3cc
[ "Apache-2.0" ]
null
null
null
from server.models.User import * from server.models.File import * from server.models.Role import *
25
33
0.78
from server.models.User import * from server.models.File import * from server.models.Role import *
true
true
08fc6e1862925be71e5f7745b6c9db4ee8cfbfcd
949
py
Python
ketting/config.py
Branthalt/blockchain
f345b7ec3b5a9c930a691366ee5adfec8d2a096a
[ "MIT" ]
null
null
null
ketting/config.py
Branthalt/blockchain
f345b7ec3b5a9c930a691366ee5adfec8d2a096a
[ "MIT" ]
1
2018-03-11T20:54:42.000Z
2018-07-07T19:32:39.000Z
ketting/config.py
Branthalt/blockchain
f345b7ec3b5a9c930a691366ee5adfec8d2a096a
[ "MIT" ]
1
2018-06-09T07:59:37.000Z
2018-06-09T07:59:37.000Z
import os import json # Decide to refactor the blockchain.py to extract this Config class Config(): def __init__(self, nodeconfig = "/home/baasuser/node-config.json" ): self.nodeconfig = nodeconfig self.config = {} self.ownip = False self._load() def _load(self): if os...
28.757576
72
0.596417
import os import json class Config(): def __init__(self, nodeconfig = "/home/baasuser/node-config.json" ): self.nodeconfig = nodeconfig self.config = {} self.ownip = False self._load() def _load(self): if os.path.isfile(self.nodeconfig): with open(self.node...
true
true
08fc6e3e6881dd53d1c5521cd007910474a432f2
925
py
Python
v5-unity/add_cache_busting_query_strings.py
ipflsfiles/PyTutor
5d10715d960c6fefcc2ffaeda915ba25d48098fe
[ "MIT" ]
17
2021-12-09T11:31:44.000Z
2021-12-29T03:07:14.000Z
v5-unity/add_cache_busting_query_strings.py
heysachin/OnlinePythonTutor
0dcdacc7ff5be504dd6a47236ebc69dc0069f991
[ "MIT" ]
22
2017-09-17T03:59:16.000Z
2017-11-14T17:33:57.000Z
v5-unity/add_cache_busting_query_strings.py
heysachin/OnlinePythonTutor
0dcdacc7ff5be504dd6a47236ebc69dc0069f991
[ "MIT" ]
17
2020-07-02T01:23:57.000Z
2022-01-14T00:13:57.000Z
# add cache-busting query strings for build/*.js files referenced by all html # files in the current directory import os, re, hashlib PREFIX = 'src="' SUFFIX = '"' STUFF_RE = re.compile(PREFIX + '(build/.*[.]js).*?' + SUFFIX) print 'Added cache-busting hashes to these HTML files:' for f in os.listdir('.'): if f....
29.83871
97
0.596757
import os, re, hashlib PREFIX = 'src="' SUFFIX = '"' STUFF_RE = re.compile(PREFIX + '(build/.*[.]js).*?' + SUFFIX) print 'Added cache-busting hashes to these HTML files:' for f in os.listdir('.'): if f.endswith('.html'): new_f = f + '.NEW' with open(new_f, 'w') as out: for line in open(f): ...
false
true
08fc6f2c2e4f8bb91a3922b10712ca86b68a664b
1,424
py
Python
src/cogs/commands/Invite/Invite.py
End313234/Logs-Bot
a80b506c3fb6d4906e5a24dd32ee09162e4c4eca
[ "Apache-2.0" ]
4
2021-06-16T01:02:37.000Z
2021-08-24T12:56:30.000Z
src/cogs/commands/Invite/Invite.py
End313234/Logs-Bot
a80b506c3fb6d4906e5a24dd32ee09162e4c4eca
[ "Apache-2.0" ]
null
null
null
src/cogs/commands/Invite/Invite.py
End313234/Logs-Bot
a80b506c3fb6d4906e5a24dd32ee09162e4c4eca
[ "Apache-2.0" ]
1
2021-06-13T02:06:57.000Z
2021-06-13T02:06:57.000Z
import discord from discord.ext import commands from discord.ext.commands.cooldowns import BucketType import sqlite3 class Invite(commands.Cog): def __init__(self, client): self.client = client @commands.command( name = "invite", description = "Display my invite link. By u...
37.473684
241
0.642556
import discord from discord.ext import commands from discord.ext.commands.cooldowns import BucketType import sqlite3 class Invite(commands.Cog): def __init__(self, client): self.client = client @commands.command( name = "invite", description = "Display my invite link. By u...
true
true
08fc7131bdacd42c1ebe14e1201c92b8b26e7355
16,131
py
Python
train.py
v-cherian/GANComposer
b02dd005467f8d366aeb4ddde6276de644fce6c6
[ "Apache-2.0" ]
null
null
null
train.py
v-cherian/GANComposer
b02dd005467f8d366aeb4ddde6276de644fce6c6
[ "Apache-2.0" ]
null
null
null
train.py
v-cherian/GANComposer
b02dd005467f8d366aeb4ddde6276de644fce6c6
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Christopher John Bayron # # 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 ag...
38.498807
156
0.619614
import os from argparse import ArgumentParser import torch import torch.nn as nn from torch import optim from c_rnn_gan import Generator, Discriminator import music_data_utils import time import matplotlib.pyplot as plt CKPT_DIR = 'models' COMPOSER = 'sonata-ish' G_FN = 'c_rnn_gan_g.pth' D_FN = 'c...
true
true
08fc71e38a1d22a22e5accfb0af79b6dba2d03f2
827
py
Python
kubernetes/test/test_v1_job_status.py
jraby/kubernetes-client-python
e6e7b710d0b15fbde686bc9dccf00da5951bef84
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_job_status.py
jraby/kubernetes-client-python
e6e7b710d0b15fbde686bc9dccf00da5951bef84
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_job_status.py
jraby/kubernetes-client-python
e6e7b710d0b15fbde686bc9dccf00da5951bef84
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
19.232558
105
0.697703
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_job_status import V1JobStatus class TestV1JobStatus(unittest.TestCase): def setUp(self): pass def tearDown(self):...
true
true
08fc73db8338b705f36a963f80a50c153c30d913
12,366
py
Python
torchelastic/multiprocessing/errors/__init__.py
SamuelMarks/elastic
a10e445c73068144b49d7af5c46d18d0b0f1c517
[ "BSD-3-Clause" ]
1
2020-12-17T23:58:00.000Z
2020-12-17T23:58:00.000Z
torchelastic/multiprocessing/errors/__init__.py
SamuelMarks/elastic
a10e445c73068144b49d7af5c46d18d0b0f1c517
[ "BSD-3-Clause" ]
null
null
null
torchelastic/multiprocessing/errors/__init__.py
SamuelMarks/elastic
a10e445c73068144b49d7af5c46d18d0b0f1c517
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. """ Each host in a distributed PyTorch job runs with a single TorchElastic agent, and mul...
36.913433
98
0.605855
import json import os import signal import time import warnings from dataclasses import dataclass, field from datetime import datetime from functools import wraps from string import Template from typing import Dict, List, Optional, Tuple from torchelastic.multiprocessing.errors.error_handler import ErrorHandler fr...
true
true
08fc74099b05967bdbde8f9f9e79d9af0c5d68c3
181
py
Python
tests/conftest.py
mushonnip/colab-ssh
a7ec5877e486da1cdf07e38294e450e64b0bf81e
[ "MIT" ]
623
2020-06-22T10:47:07.000Z
2022-03-31T15:23:08.000Z
tests/conftest.py
mushonnip/colab-ssh
a7ec5877e486da1cdf07e38294e450e64b0bf81e
[ "MIT" ]
63
2020-07-16T16:15:03.000Z
2022-03-29T22:54:46.000Z
tests/conftest.py
mushonnip/colab-ssh
a7ec5877e486da1cdf07e38294e450e64b0bf81e
[ "MIT" ]
135
2020-06-29T18:13:31.000Z
2022-03-25T10:41:48.000Z
import pytest def pytest_collection_modifyitems(items): for item in items: if item.get_marker('timeout') is None: item.add_marker(pytest.mark.timeout(30))
22.625
52
0.690608
import pytest def pytest_collection_modifyitems(items): for item in items: if item.get_marker('timeout') is None: item.add_marker(pytest.mark.timeout(30))
true
true
08fc7438225e07f6c4472efaa1962958094fdde4
66
py
Python
main.py
alanbchristie/PyBdEcho
5dd80aeba804120d21c62b7b56076a2ebcb4aa6f
[ "MIT" ]
2
2018-03-12T10:49:17.000Z
2020-11-13T10:49:34.000Z
main.py
alanbchristie/PyBdEcho
5dd80aeba804120d21c62b7b56076a2ebcb4aa6f
[ "MIT" ]
1
2017-07-12T16:13:53.000Z
2017-07-12T16:13:53.000Z
main.py
alanbchristie/PyBdEcho
5dd80aeba804120d21c62b7b56076a2ebcb4aa6f
[ "MIT" ]
4
2019-10-21T04:40:17.000Z
2020-11-03T16:37:10.000Z
# Load and run the PyBdEcho demo import PyBdEcho PyBdEcho.echo()
13.2
32
0.772727
import PyBdEcho PyBdEcho.echo()
true
true
08fc74439475100b1b2842129777c91ef7038a3a
520
py
Python
app/models/worker.py
twotwo/flask-modern-dev
054037a60bb0d4f85aa8d07ea32b007b1d26637d
[ "MIT" ]
null
null
null
app/models/worker.py
twotwo/flask-modern-dev
054037a60bb0d4f85aa8d07ea32b007b1d26637d
[ "MIT" ]
null
null
null
app/models/worker.py
twotwo/flask-modern-dev
054037a60bb0d4f85aa8d07ea32b007b1d26637d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from app.extension import db, ma from app.models.mixin import CRUDMixin class Worker(db.Model, CRUDMixin): def __init__(self, **kwargs): super().__init__(**kwargs) # id = db.Column(db.Integer, primary_key=True) gpu = db.Column(db.Integer, unique=True, comment="对应的 GPU ID"...
23.636364
82
0.676923
from app.extension import db, ma from app.models.mixin import CRUDMixin class Worker(db.Model, CRUDMixin): def __init__(self, **kwargs): super().__init__(**kwargs) gpu = db.Column(db.Integer, unique=True, comment="对应的 GPU ID") default_job = db.Column(db.String(30), default="", comment="Defau...
true
true
08fc74ba423e4729d2b96157d411855684a96ce5
3,814
py
Python
processing/fangraphs_draft_list.py
Connor-R/mlb_prospects
5ebd2f58f7c07f6008ee4be9ad6506fb5c4239ca
[ "MIT" ]
2
2018-12-16T02:56:14.000Z
2019-11-07T20:23:45.000Z
processing/fangraphs_draft_list.py
Connor-R/mlb_prospects
5ebd2f58f7c07f6008ee4be9ad6506fb5c4239ca
[ "MIT" ]
null
null
null
processing/fangraphs_draft_list.py
Connor-R/mlb_prospects
5ebd2f58f7c07f6008ee4be9ad6506fb5c4239ca
[ "MIT" ]
1
2018-06-21T14:28:43.000Z
2018-06-21T14:28:43.000Z
import argparse from time import time import sys import tinyurl from py_db import db db = db("mlb_prospects") def process(): mlb_bat_url = 'https://www.fangraphs.com/leaders.aspx?pos=all&stats=bat&lg=all&qual=0&type=c,3,4,6,11,12,13,21,22,-1,34,35,40,-1,44,43,45,41,-1,23,37,38,50,61,-1,53,111,54,56,-1,315,316,...
37.392157
304
0.604615
import argparse from time import time import sys import tinyurl from py_db import db db = db("mlb_prospects") def process(): mlb_bat_url = 'https://www.fangraphs.com/leaders.aspx?pos=all&stats=bat&lg=all&qual=0&type=c,3,4,6,11,12,13,21,22,-1,34,35,40,-1,44,43,45,41,-1,23,37,38,50,61,-1,53,111,54,56,-1,315,316,...
false
true
08fc74efca0aaf3e8881a3a3e10bf450d93ba10b
5,318
py
Python
leanerp/helpdesk/views/feeds.py
seLain/Leaf
f02e15576071429a29f76a06328d024b58a2d69e
[ "Apache-2.0" ]
null
null
null
leanerp/helpdesk/views/feeds.py
seLain/Leaf
f02e15576071429a29f76a06328d024b58a2d69e
[ "Apache-2.0" ]
6
2018-02-20T13:59:07.000Z
2018-03-06T17:35:41.000Z
leanerp/helpdesk/views/feeds.py
seLain/Leaf
f02e15576071429a29f76a06328d024b58a2d69e
[ "Apache-2.0" ]
1
2018-03-06T17:28:07.000Z
2018-03-06T17:28:07.000Z
""" django-helpdesk - A Django powered ticket tracker for small enterprise. (c) Copyright 2008 Jutda. All Rights Reserved. See LICENSE for details. views/feeds.py - A handful of staff-only RSS feeds to provide ticket details to feed readers or similar software. """ from django.contrib.auth import ge...
31.099415
102
0.594772
from django.contrib.auth import get_user_model from django.contrib.syndication.views import Feed from django.core.urlresolvers import reverse from django.db.models import Q from django.utils.translation import ugettext as _ from django.shortcuts import get_object_or_404 from helpdesk.models import Ticket, FollowUp, Q...
true
true
08fc764861b0b134448b9afa49167020a5e9e45c
21,542
py
Python
official/nlp/tools/export_tfhub_lib.py
hjkim-haga/TF-OD-API
22ac477ff4dfb93fe7a32c94b5f0b1e74330902b
[ "Apache-2.0" ]
1
2021-05-22T12:50:50.000Z
2021-05-22T12:50:50.000Z
official/nlp/tools/export_tfhub_lib.py
DemonDamon/mask-detection-based-on-tf2odapi
192ae544169c1230c21141c033800aa1bd94e9b6
[ "MIT" ]
null
null
null
official/nlp/tools/export_tfhub_lib.py
DemonDamon/mask-detection-based-on-tf2odapi
192ae544169c1230c21141c033800aa1bd94e9b6
[ "MIT" ]
null
null
null
# Copyright 2021 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...
45.447257
90
0.708801
import contextlib import hashlib import os import tempfile from typing import Optional, Text, Tuple from absl import logging import tensorflow as tf from tensorflow.core.protobuf import saved_model_pb2 from tensorflow.python.ops import control_flow_ops from official.modeling import tf_utils from offic...
true
true
08fc76fbe920477bc01f172775bbc1c90eb93da4
887
py
Python
ch03/Gear05.py
ejosafat/poodrpython3
0dbfaacd00871fd1bff0366c3c116d6b68ec678d
[ "MIT" ]
null
null
null
ch03/Gear05.py
ejosafat/poodrpython3
0dbfaacd00871fd1bff0366c3c116d6b68ec678d
[ "MIT" ]
null
null
null
ch03/Gear05.py
ejosafat/poodrpython3
0dbfaacd00871fd1bff0366c3c116d6b68ec678d
[ "MIT" ]
1
2020-11-13T02:22:38.000Z
2020-11-13T02:22:38.000Z
class Gear(object): def __init__(self, wheel, chainring=40, cog=18): self.__chainring = chainring self.__cog = cog self.__wheel = wheel @property def chainring(self): return self.__chainring @property def cog(self): return self.__cog @property def w...
19.282609
52
0.600902
class Gear(object): def __init__(self, wheel, chainring=40, cog=18): self.__chainring = chainring self.__cog = cog self.__wheel = wheel @property def chainring(self): return self.__chainring @property def cog(self): return self.__cog @property def w...
true
true
08fc77d9358034f4fee5c9e135d02693a98bb4f5
1,710
py
Python
web/adminsite/views.py
ralfkret/hvz
842c25d58fb3c30060080efcfa8b3d183b78e2ab
[ "MIT" ]
1
2019-07-30T14:39:43.000Z
2019-07-30T14:39:43.000Z
web/adminsite/views.py
ralfkret/hvz
842c25d58fb3c30060080efcfa8b3d183b78e2ab
[ "MIT" ]
11
2019-07-31T13:40:30.000Z
2019-08-07T21:54:52.000Z
web/adminsite/views.py
ralfkret/hvz
842c25d58fb3c30060080efcfa8b3d183b78e2ab
[ "MIT" ]
null
null
null
from flask import render_template, redirect, url_for, request, flash from flask_wtf import FlaskForm from wtforms import StringField, IntegerField from wtforms.validators import DataRequired, Length from web import db from web.models import Product from . import admin @admin.route('product_list') def product_list(...
36.382979
86
0.718713
from flask import render_template, redirect, url_for, request, flash from flask_wtf import FlaskForm from wtforms import StringField, IntegerField from wtforms.validators import DataRequired, Length from web import db from web.models import Product from . import admin @admin.route('product_list') def product_list(...
true
true
08fc78490c2bb125e95925c36fb6924ce55c78d7
7,245
py
Python
6 - Natural Language Processing with RNNs/theatre_play_generation.py
danielgarm/FreeCodeCamp-Machine-Learning
c0f7e808dba5a87cada8af1f5623283ac77c96a3
[ "MIT" ]
null
null
null
6 - Natural Language Processing with RNNs/theatre_play_generation.py
danielgarm/FreeCodeCamp-Machine-Learning
c0f7e808dba5a87cada8af1f5623283ac77c96a3
[ "MIT" ]
null
null
null
6 - Natural Language Processing with RNNs/theatre_play_generation.py
danielgarm/FreeCodeCamp-Machine-Learning
c0f7e808dba5a87cada8af1f5623283ac77c96a3
[ "MIT" ]
null
null
null
from keras.preprocessing import sequence import keras import tensorflow as tf import os import numpy as np # If we want to load a dataset of the Shakespeare script: path_to_file = tf.keras.utils.get_file('shakespeare.txt', 'https://storage.googleapis.com/download.tensorflow.org/data/shakespeare.txt') # If we want to ...
34.5
145
0.750863
from keras.preprocessing import sequence import keras import tensorflow as tf import os import numpy as np path_to_file = tf.keras.utils.get_file('shakespeare.txt', 'https://storage.googleapis.com/download.tensorflow.org/data/shakespeare.txt') from google.colab import files path_to_file = list(files.upload().keys())[...
true
true
08fc78bdd45d9812d1fd62be452f282ce3f776b3
5,036
py
Python
wizard/create_prescription_invoice_wizard.py
IDRISSOUM/hospital_management
56a768f29269a77bc890d40479a8aacb90867189
[ "Unlicense" ]
null
null
null
wizard/create_prescription_invoice_wizard.py
IDRISSOUM/hospital_management
56a768f29269a77bc890d40479a8aacb90867189
[ "Unlicense" ]
null
null
null
wizard/create_prescription_invoice_wizard.py
IDRISSOUM/hospital_management
56a768f29269a77bc890d40479a8aacb90867189
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # Part of BrowseInfo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from datetime import date,datetime from odoo.exceptions import Warning class create_prescription_invoice(models.TransientModel): _name = 'create.prescription.invoice' ...
50.36
197
0.57784
from odoo import api, fields, models, _ from datetime import date,datetime from odoo.exceptions import Warning class create_prescription_invoice(models.TransientModel): _name = 'create.prescription.invoice' @api.multi def create_prescription_invoice(self): active_ids = self._context.get('active_i...
true
true
08fc7a2986dacbd102061c96c231d7496f32ddb6
1,031
py
Python
commands/ShodanCommand.py
WeeTomatoBall/pentest
7d576f2126f670238a9fc4dfc6fc2c7f9ed60056
[ "MIT" ]
6
2019-03-04T15:55:46.000Z
2022-01-18T15:10:35.000Z
commands/ShodanCommand.py
WeeTomatoBall/pentest
7d576f2126f670238a9fc4dfc6fc2c7f9ed60056
[ "MIT" ]
2
2021-04-06T08:44:29.000Z
2021-04-06T08:47:48.000Z
commands/ShodanCommand.py
WeeTomatoBall/pentest
7d576f2126f670238a9fc4dfc6fc2c7f9ed60056
[ "MIT" ]
4
2018-12-07T17:35:06.000Z
2021-07-11T03:37:05.000Z
import discord from commands.framework.CommandBase import CommandBase async def show_command_help(client, message, alias): embed = discord.Embed( title="Command \"{}\" Help".format(alias.capitalize()), description="Usage: !{} [ip]".format(alias), color=discord.Colour.blue() ) embed...
35.551724
106
0.688652
import discord from commands.framework.CommandBase import CommandBase async def show_command_help(client, message, alias): embed = discord.Embed( title="Command \"{}\" Help".format(alias.capitalize()), description="Usage: !{} [ip]".format(alias), color=discord.Colour.blue() ) embed...
true
true
08fc7a72f93e09564a1c31ee0ede4c21e186e26f
587
py
Python
src/presence/presences/ingame.py
KripC2160/valorant-rpc
2eb32fa5caa3ac9db8155afd0d1675d10e0e4b76
[ "MIT" ]
null
null
null
src/presence/presences/ingame.py
KripC2160/valorant-rpc
2eb32fa5caa3ac9db8155afd0d1675d10e0e4b76
[ "MIT" ]
null
null
null
src/presence/presences/ingame.py
KripC2160/valorant-rpc
2eb32fa5caa3ac9db8155afd0d1675d10e0e4b76
[ "MIT" ]
null
null
null
from .ingame_presences.session import Game_Session from .ingame_presences.range import Range_Session def presence(rpc,client=None,data=None,content_data=None,config=None): coregame = client.coregame_fetch_player() if coregame is not None: match_id = coregame["MatchID"] if data["provisioningFlo...
34.529412
81
0.701874
from .ingame_presences.session import Game_Session from .ingame_presences.range import Range_Session def presence(rpc,client=None,data=None,content_data=None,config=None): coregame = client.coregame_fetch_player() if coregame is not None: match_id = coregame["MatchID"] if data["provisioningFlo...
true
true
08fc7ab61dd18a765f1010e01526ef4287890b6b
477
py
Python
env/lib/python3.8/site-packages/plotly/validators/bar/_x0.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/bar/_x0.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/bar/_x0.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class X0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="x0", parent_name="bar", **kwargs): super(X0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, anim=kwargs.pop("ani...
34.071429
70
0.631027
import _plotly_utils.basevalidators class X0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="x0", parent_name="bar", **kwargs): super(X0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, anim=kwargs.pop("ani...
true
true
08fc7bc855a2d32acbbeb1ccb5e4445b267919c8
536
py
Python
SqlCon.py
Chihyuk/Bit_FinalProject_KoBART-summarization
41f69b7ca59851e6f239cf25c1f52e8793aa63a5
[ "MIT" ]
null
null
null
SqlCon.py
Chihyuk/Bit_FinalProject_KoBART-summarization
41f69b7ca59851e6f239cf25c1f52e8793aa63a5
[ "MIT" ]
null
null
null
SqlCon.py
Chihyuk/Bit_FinalProject_KoBART-summarization
41f69b7ca59851e6f239cf25c1f52e8793aa63a5
[ "MIT" ]
null
null
null
#SqlCon.py import mysql.connector class SqlCon: hostlink = 'finalproject-2.c4jotwudvoiz.ap-northeast-2.rds.amazonaws.com' conn = mysql.connector.connect(host = hostlink, port = '3306', user='admin', password='12341234', database='News_Summary') # 해당 인자도 다 변수로 사용할 수 있으면 좋다 @staticmethod def Cursor(): ...
24.363636
155
0.656716
import mysql.connector class SqlCon: hostlink = 'finalproject-2.c4jotwudvoiz.ap-northeast-2.rds.amazonaws.com' conn = mysql.connector.connect(host = hostlink, port = '3306', user='admin', password='12341234', database='News_Summary') @staticmethod def Cursor(): return SqlCon.conn.cursor() ...
true
true
08fc7c97512472b4924e150d930941c075990857
15,684
py
Python
main.py
lucas26xd/Easy-Badges-MD
c85bba5e91b06d7a5268f44f3c378526fe23a7f1
[ "MIT" ]
1
2020-06-26T17:17:20.000Z
2020-06-26T17:17:20.000Z
main.py
lucas26xd/Easy-Badges-MD
c85bba5e91b06d7a5268f44f3c378526fe23a7f1
[ "MIT" ]
null
null
null
main.py
lucas26xd/Easy-Badges-MD
c85bba5e91b06d7a5268f44f3c378526fe23a7f1
[ "MIT" ]
null
null
null
from PyQt5 import Qt, QtCore, QtGui, QtWidgets, QtWebEngineWidgets from re import search from markdown import markdown class MainUi(object): def __init__(self): self.centralwidget = QtWidgets.QWidget(frame) self.vertical_layout_widget = QtWidgets.QWidget(self.centralwidget) self.vertical_l...
49.632911
240
0.731
from PyQt5 import Qt, QtCore, QtGui, QtWidgets, QtWebEngineWidgets from re import search from markdown import markdown class MainUi(object): def __init__(self): self.centralwidget = QtWidgets.QWidget(frame) self.vertical_layout_widget = QtWidgets.QWidget(self.centralwidget) self.vertical_l...
true
true
08fc7d133c737fb491441fad101fbc225c4fc8d4
7,313
py
Python
setup.py
eitsupi/ibis
8beca3a6f8136a9b6dde61ca6ed44df4a5c7b7c0
[ "Apache-2.0" ]
null
null
null
setup.py
eitsupi/ibis
8beca3a6f8136a9b6dde61ca6ed44df4a5c7b7c0
[ "Apache-2.0" ]
null
null
null
setup.py
eitsupi/ibis
8beca3a6f8136a9b6dde61ca6ed44df4a5c7b7c0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup packages = [ "ibis", "ibis.backends", "ibis.backends.base", "ibis.backends.base.file", "ibis.backends.base.sql", "ibis.backends.base.sql.alchemy", "ibis.backends.base.sql.compiler", "ibis.backends.base.sql.registry", "ibis.backend...
48.753333
3,032
0.565978
from setuptools import setup packages = [ "ibis", "ibis.backends", "ibis.backends.base", "ibis.backends.base.file", "ibis.backends.base.sql", "ibis.backends.base.sql.alchemy", "ibis.backends.base.sql.compiler", "ibis.backends.base.sql.registry", "ibis.backends.clickhouse", "ibis...
true
true
08fc7d3b9869864814f20d897019ba8dc28f5269
960
py
Python
van_laar.py
Rafael-Romano/Python
ca105e6f56737b99ce773720017c531790327894
[ "MIT" ]
null
null
null
van_laar.py
Rafael-Romano/Python
ca105e6f56737b99ce773720017c531790327894
[ "MIT" ]
null
null
null
van_laar.py
Rafael-Romano/Python
ca105e6f56737b99ce773720017c531790327894
[ "MIT" ]
null
null
null
from math import exp class Van_Laar: def __init__(self): print('Calculo dos Gamas pelo modelo de Van Laar') self.A = float(input("Informe o parâmetro A ")) self.B = float(input("Informe o parâmetro B ")) self.R = float(input("Informe o parâmetro R ")) self.Xa = float(input("I...
60
128
0.554167
from math import exp class Van_Laar: def __init__(self): print('Calculo dos Gamas pelo modelo de Van Laar') self.A = float(input("Informe o parâmetro A ")) self.B = float(input("Informe o parâmetro B ")) self.R = float(input("Informe o parâmetro R ")) self.Xa = float(input("I...
true
true
08fc7d7dd1429a3dca30491bab6c0b2d15f96689
613
py
Python
Exercicios/ex058.py
LeleCastanheira/cursoemvideo-python
38f4c0613aa1f5d7385aee842db9aaaafb957a72
[ "MIT" ]
null
null
null
Exercicios/ex058.py
LeleCastanheira/cursoemvideo-python
38f4c0613aa1f5d7385aee842db9aaaafb957a72
[ "MIT" ]
null
null
null
Exercicios/ex058.py
LeleCastanheira/cursoemvideo-python
38f4c0613aa1f5d7385aee842db9aaaafb957a72
[ "MIT" ]
null
null
null
from random import randint computador = randint(0, 10) print('Sou seu computador... Acabei de pensar num número entre 0 e 10') print('Será que você consegue adivinhar?') jogador = int(input('Qual é o seu palpite? ')) acertou = False palpites = 0 while not acertou: jogador = int(input('Qual é seu palpite? ')) pa...
34.055556
71
0.647635
from random import randint computador = randint(0, 10) print('Sou seu computador... Acabei de pensar num número entre 0 e 10') print('Será que você consegue adivinhar?') jogador = int(input('Qual é o seu palpite? ')) acertou = False palpites = 0 while not acertou: jogador = int(input('Qual é seu palpite? ')) pa...
true
true
08fc7fcd3314ffccfe653076b890458597f2c719
8,067
py
Python
src/oci/logging/models/create_log_saved_search_details.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/logging/models/create_log_saved_search_details.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/logging/models/create_log_saved_search_details.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
32.792683
245
0.647824
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class CreateLogSavedSearchDetails(object): def __init__(self, **kwargs): self.swagger_types = { 'compartment_id...
true
true
08fc806f865e96fd62ac9543b9bbe86c169a4ead
294
py
Python
demo/poc_crash.py
invictus1306/functrace
24479f1adb1ce9809aadd59dde4f38c85b79708a
[ "MIT" ]
91
2018-12-30T15:53:26.000Z
2022-03-10T07:51:46.000Z
demo/poc_crash.py
invictus1306/functrace
24479f1adb1ce9809aadd59dde4f38c85b79708a
[ "MIT" ]
null
null
null
demo/poc_crash.py
invictus1306/functrace
24479f1adb1ce9809aadd59dde4f38c85b79708a
[ "MIT" ]
20
2019-01-07T11:44:30.000Z
2021-05-12T12:25:53.000Z
from socket import * host = "127.0.0.1" port = 8000 def run(): s = socket(AF_INET, SOCK_STREAM) s.connect((host, port)) payload = "x-sessioncookie: BBBB\r\n"*200 header = " HTTP/\r\n" + payload + "Accept: AAAA\r\n\r\n" s.send(header) if __name__ == '__main__': run()
19.6
60
0.598639
from socket import * host = "127.0.0.1" port = 8000 def run(): s = socket(AF_INET, SOCK_STREAM) s.connect((host, port)) payload = "x-sessioncookie: BBBB\r\n"*200 header = " HTTP/\r\n" + payload + "Accept: AAAA\r\n\r\n" s.send(header) if __name__ == '__main__': run()
true
true
08fc80f62555b95eff4264ea6281879714e933e9
5,391
py
Python
tests/unit/modules/linux_sysctl_test.py
vamshi98/salt-formulas
30edeadafd5d173efe4e1f767a8d562547ad128a
[ "Apache-2.0" ]
1
2020-09-16T21:31:02.000Z
2020-09-16T21:31:02.000Z
tests/unit/modules/linux_sysctl_test.py
vamshi98/salt-formulas
30edeadafd5d173efe4e1f767a8d562547ad128a
[ "Apache-2.0" ]
null
null
null
tests/unit/modules/linux_sysctl_test.py
vamshi98/salt-formulas
30edeadafd5d173efe4e1f767a8d562547ad128a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`jmoney <justin@saltstack.com>` ''' # Import Salt Libs from salt.modules import linux_sysctl from salt.modules import systemd from salt.exceptions import CommandExecutionError # Import Salt Testing Libs from salttesting import skipIf, TestCase from salttesting.helpe...
37.4375
77
0.578928
from salt.modules import linux_sysctl from salt.modules import systemd from salt.exceptions import CommandExecutionError from salttesting import skipIf, TestCase from salttesting.helpers import ensure_in_syspath from salttesting.mock import ( MagicMock, mock_open, patch, NO_MOCK, NO_MOCK_REASON ) ...
true
true
08fc832bde5afcb5b7c8222afb37cccb16de8439
2,689
py
Python
legacy/pgl/tests/test_metapath_randomwalk.py
zbmain/PGL
dbded6a1543248b0a33c05eb476ddc513401a774
[ "Apache-2.0" ]
1,389
2019-06-11T03:29:20.000Z
2022-03-29T18:25:43.000Z
legacy/pgl/tests/test_metapath_randomwalk.py
zbmain/PGL
dbded6a1543248b0a33c05eb476ddc513401a774
[ "Apache-2.0" ]
232
2019-06-21T06:52:10.000Z
2022-03-29T08:20:31.000Z
legacy/pgl/tests/test_metapath_randomwalk.py
zbmain/PGL
dbded6a1543248b0a33c05eb476ddc513401a774
[ "Apache-2.0" ]
229
2019-06-20T12:13:58.000Z
2022-03-25T12:04:48.000Z
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
34.922078
122
0.557828
import time import unittest import json import os import numpy as np from pgl.sample import metapath_randomwalk from pgl.graph import Graph from pgl import heter_graph np.random.seed(1) class MetapathRandomwalkTest(unittest.TestCase): def setUp(self): edges = {} edges['c2p'] = [(1, 4), ...
true
true
08fc835d1486f75f69827433daf7deb5c3f5a978
1,663
py
Python
sanic/log.py
snguyenthanh/sanic
ae91852cd586c67ddfe10669eed18b3ded332d2f
[ "MIT" ]
2
2021-02-20T12:22:10.000Z
2021-02-20T12:26:15.000Z
sanic/log.py
snguyenthanh/sanic
ae91852cd586c67ddfe10669eed18b3ded332d2f
[ "MIT" ]
11
2021-07-10T17:14:47.000Z
2022-02-24T07:32:36.000Z
sanic/log.py
snguyenthanh/sanic
ae91852cd586c67ddfe10669eed18b3ded332d2f
[ "MIT" ]
1
2020-04-03T14:20:38.000Z
2020-04-03T14:20:38.000Z
import logging import sys LOGGING_CONFIG_DEFAULTS = dict( version=1, disable_existing_loggers=False, loggers={ "sanic.root": {"level": "INFO", "handlers": ["console"]}, "sanic.error": { "level": "INFO", "handlers": ["error_console"], "propagate": True, ...
28.186441
78
0.471437
import logging import sys LOGGING_CONFIG_DEFAULTS = dict( version=1, disable_existing_loggers=False, loggers={ "sanic.root": {"level": "INFO", "handlers": ["console"]}, "sanic.error": { "level": "INFO", "handlers": ["error_console"], "propagate": True, ...
true
true
08fc8443702018643f75666c84d493c8dfca9706
5,340
py
Python
users/filters.py
r34g4n/ADT_booking
57c5bb103ac8bc1cf4d2c4f8b52744bd763560fb
[ "Apache-2.0" ]
null
null
null
users/filters.py
r34g4n/ADT_booking
57c5bb103ac8bc1cf4d2c4f8b52744bd763560fb
[ "Apache-2.0" ]
10
2020-02-12T01:46:41.000Z
2022-02-10T09:00:03.000Z
users/filters.py
r34g4n/ADT_booking
57c5bb103ac8bc1cf4d2c4f8b52744bd763560fb
[ "Apache-2.0" ]
1
2021-11-04T22:07:37.000Z
2021-11-04T22:07:37.000Z
from .models import Patient, Gender from django.db.models import Q from django.utils import timezone from bookings.models import Session from payments.models import ( Payment, UndefinedPaymentMethod, CashPayment, InsurancePayment, MobileBankingPayment, CorporatePayment ) SORT_BY_DICT = { 'r...
32.168675
130
0.634644
from .models import Patient, Gender from django.db.models import Q from django.utils import timezone from bookings.models import Session from payments.models import ( Payment, UndefinedPaymentMethod, CashPayment, InsurancePayment, MobileBankingPayment, CorporatePayment ) SORT_BY_DICT = { 'r...
true
true
08fc8483762ab45b20afac46c5008ea0e4c6a235
14,728
py
Python
doc/source/conf.py
certik/pandas
758ca05e2eb04532b5d78331ba87c291038e2c61
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
2
2017-08-24T18:37:20.000Z
2017-08-24T18:37:35.000Z
doc/source/conf.py
certik/pandas
758ca05e2eb04532b5d78331ba87c291038e2c61
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
doc/source/conf.py
certik/pandas
758ca05e2eb04532b5d78331ba87c291038e2c61
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # pandas documentation build configuration file, created by # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that ...
36.82
126
0.68217
import sys import os import re from pandas.compat import u, PY3 sys.path.insert(0, os.path.abspath('../sphinxext')) sys.path.extend([ os.path.join(os.path.dirname(__file__), '..', '../..', 'sphinxext') ]) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.aut...
true
true
08fc84d96761e8e32d6fbe6a963d83a663645e79
13,666
py
Python
kale/embed/video_se_res3d.py
Be-Secure/pykale
f8d479e9861639773de603ffaa20127a0ce66e58
[ "MIT" ]
1
2022-02-24T13:23:54.000Z
2022-02-24T13:23:54.000Z
kale/embed/video_se_res3d.py
Be-Secure/pykale
f8d479e9861639773de603ffaa20127a0ce66e58
[ "MIT" ]
1
2022-01-17T21:51:08.000Z
2022-01-19T01:46:24.000Z
kale/embed/video_se_res3d.py
Be-Secure/pykale
f8d479e9861639773de603ffaa20127a0ce66e58
[ "MIT" ]
null
null
null
# ============================================================================= # Author: Xianyuan Liu, xianyuan.liu@sheffield.ac.uk or xianyuan.liu@outlook.com # ============================================================================= """Add SELayers to MC3_18, R3D_18, R2plus1D_18""" from torchvision.models.uti...
44.660131
118
0.66252
from torchvision.models.utils import load_state_dict_from_url from kale.embed.video_res3d import ( BasicBlock, BasicFLowStem, BasicStem, Conv2Plus1D, Conv3DNoTemporal, Conv3DSimple, R2Plus1dFlowStem, R2Plus1dStem, VideoResNet, ) from kale.embed.video_selayer import get_selayer, SE...
true
true
08fc84fab383f7933b58635cc57c17c30baec7ec
1,291
py
Python
blueprints/aws_s3_bucket/management/delete_multiple_object.py
CloudBoltSoftware/cloudbolt-forge
03106c4a92ef8074a46b4843223791ac77725472
[ "Apache-2.0" ]
34
2015-08-30T09:26:41.000Z
2022-03-03T13:18:14.000Z
blueprints/aws_s3_bucket/management/delete_multiple_object.py
CloudBoltSoftware/cloudbolt-forge
03106c4a92ef8074a46b4843223791ac77725472
[ "Apache-2.0" ]
22
2015-11-23T21:24:17.000Z
2022-01-31T04:24:24.000Z
blueprints/aws_s3_bucket/management/delete_multiple_object.py
CloudBoltSoftware/cloudbolt-forge
03106c4a92ef8074a46b4843223791ac77725472
[ "Apache-2.0" ]
43
2015-11-18T16:26:22.000Z
2021-10-18T13:19:39.000Z
from common.methods import set_progress from botocore.client import ClientError from resourcehandlers.aws.models import AWSHandler def run(job, resource, **kwargs): set_progress("Connecting to AWS s3 cloud") objects = "{{ objs }}" bucket = resource.s3_bucket_name aws = AWSHandler.objects.get(id=res...
25.82
72
0.605732
from common.methods import set_progress from botocore.client import ClientError from resourcehandlers.aws.models import AWSHandler def run(job, resource, **kwargs): set_progress("Connecting to AWS s3 cloud") objects = "{{ objs }}" bucket = resource.s3_bucket_name aws = AWSHandler.objects.get(id=res...
true
true
08fc852a33529401e0fa60377979611b89f8b725
4,221
py
Python
minMaxCalc/start_again.py
navierula/Research-Fall-2017
beec5f116d5487e6a4e0d48ec57ad80aaf2ec26f
[ "MIT" ]
null
null
null
minMaxCalc/start_again.py
navierula/Research-Fall-2017
beec5f116d5487e6a4e0d48ec57ad80aaf2ec26f
[ "MIT" ]
null
null
null
minMaxCalc/start_again.py
navierula/Research-Fall-2017
beec5f116d5487e6a4e0d48ec57ad80aaf2ec26f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 23 23:06:12 2017 @author: navrajnarula """ #c = [0.5, 3, 6, 40, 90, 130.8, 129, 111, 8, 9, 0.01, 9, 40, 90, 130.1, 112, 108, 90, 77, 68, 0.9, 8, 40, 90, 92, 130.4] #c= [0, 10, 11, 48, 50.5, 0.48, 17, 18, 23, 29, 33, 34.67, 50.1, 0.09, 7, 41, 45, 50...
24.976331
166
0.589908
lst = [-0.5, 44, 90, 132.22, 129.6, 89, 67.91, 12.5, 11, 0.0006, 10.2, 67, 89.07, 100, 132.224, 129.88, 120.1, 100, 89.5, 75, 40, 9.8, -0.4, 0.1, 90, 99, 112, 132.22, ] def get_groups(lst): up = False for i, (u, v) in enumerate(zip(lst, lst[1:])): if up: if v < u: ...
true
true
08fc85cee62cda85cc4fd3539e9992787b386ef9
13,537
py
Python
simple/model_simple_cleaned_hetero_simple.py
Vikicsizmadia/ctp
d88fdfecf4b90ee42e6137a9767226c0d35b19a3
[ "MIT" ]
null
null
null
simple/model_simple_cleaned_hetero_simple.py
Vikicsizmadia/ctp
d88fdfecf4b90ee42e6137a9767226c0d35b19a3
[ "MIT" ]
null
null
null
simple/model_simple_cleaned_hetero_simple.py
Vikicsizmadia/ctp
d88fdfecf4b90ee42e6137a9767226c0d35b19a3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import torch from torch import nn, Tensor import torch.nn.functional as F from simple import BatchNeuralKB, uniform # ctp.clutrr.models.kb import BatchNeuralKB # from ctp.clutrr.models.util import uniform from ctp.reformulators import BaseReformulator from ctp.reformulators import GNTPReform...
49.586081
128
0.548571
import torch from torch import nn, Tensor import torch.nn.functional as F from simple import BatchNeuralKB, uniform from ctp.reformulators import BaseReformulator from ctp.reformulators import GNTPReformulator from typing import Tuple, Optional, List import logging logger = logging.getLogger(__name__) class Ba...
true
true
08fc8665c53b5420b6ede98707fd40095b18eeb5
4,965
py
Python
transcode/pyqtgui/qtimeselect.py
shersonb/python-transcode
db42e82f019ef4c3b7f59f34587576205e19eb96
[ "MIT" ]
1
2020-06-25T01:00:15.000Z
2020-06-25T01:00:15.000Z
transcode/pyqtgui/qtimeselect.py
shersonb/python-transcode
db42e82f019ef4c3b7f59f34587576205e19eb96
[ "MIT" ]
null
null
null
transcode/pyqtgui/qtimeselect.py
shersonb/python-transcode
db42e82f019ef4c3b7f59f34587576205e19eb96
[ "MIT" ]
null
null
null
from PyQt5.QtWidgets import QDoubleSpinBox from PyQt5.QtCore import Qt, QRegExp from PyQt5.QtGui import QRegExpValidator import regex class QTimeSelect(QDoubleSpinBox): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) regex = QRegExp(r"\d:\d{1,2}:\d{1,2}(?:\.\d{0,9})") ...
31.03125
77
0.519839
from PyQt5.QtWidgets import QDoubleSpinBox from PyQt5.QtCore import Qt, QRegExp from PyQt5.QtGui import QRegExpValidator import regex class QTimeSelect(QDoubleSpinBox): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) regex = QRegExp(r"\d:\d{1,2}:\d{1,2}(?:\.\d{0,9})") ...
true
true
08fc866b7ccbad37ec8f45efc9a63f8cd62611f8
6,747
py
Python
cvopt/search_setting/_base.py
genfifth/cvopt
1e55461fec937cd5af7a786a1b942cd846782b27
[ "BSD-2-Clause" ]
16
2017-11-05T04:51:41.000Z
2021-06-29T08:30:39.000Z
cvopt/search_setting/_base.py
genfifth/cvopt
1e55461fec937cd5af7a786a1b942cd846782b27
[ "BSD-2-Clause" ]
3
2018-08-16T17:49:39.000Z
2020-01-04T03:31:57.000Z
cvopt/search_setting/_base.py
genfifth/cvopt
1e55461fec937cd5af7a786a1b942cd846782b27
[ "BSD-2-Clause" ]
8
2017-11-28T05:28:53.000Z
2020-04-09T07:27:55.000Z
import numpy as np, scipy as sp import types from hyperopt import hp from hyperopt.pyll import scope class ParamDist(dict): """ cvopt standard param setting class. """ pass def search_category(categories): """ Set search target distribution for categorical variable. Parameters ------...
34.958549
163
0.590188
import numpy as np, scipy as sp import types from hyperopt import hp from hyperopt.pyll import scope class ParamDist(dict): pass def search_category(categories): if not isinstance(categories, list): raise ValueError("categories is must be list") paramdist = ParamDist(valtype="category", categorie...
true
true
08fc878663924ffab62377e11ea20936539d0715
18,649
py
Python
Lab_03/simpledqn/main.py
AdrianGScorp/deeprlbootcamp
eb856f1dee90cd09395c40fa9d045f2149d5ea33
[ "MIT" ]
null
null
null
Lab_03/simpledqn/main.py
AdrianGScorp/deeprlbootcamp
eb856f1dee90cd09395c40fa9d045f2149d5ea33
[ "MIT" ]
null
null
null
Lab_03/simpledqn/main.py
AdrianGScorp/deeprlbootcamp
eb856f1dee90cd09395c40fa9d045f2149d5ea33
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ This project was developed by Rein Houthooft, Rocky Duan, Peter Chen, Pieter Abbeel for the Berkeley Deep RL Bootcamp, August 2017. Bootcamp website with slides and lecture videos: https://sites.google.com/view/deep-rl-bootcamp/. Code adapted from OpenAI Baselines: https://github.com/openai/...
39.510593
460
0.614832
""" This project was developed by Rein Houthooft, Rocky Duan, Peter Chen, Pieter Abbeel for the Berkeley Deep RL Bootcamp, August 2017. Bootcamp website with slides and lecture videos: https://sites.google.com/view/deep-rl-bootcamp/. Code adapted from OpenAI Baselines: https://github.com/openai/baselines Copyright 2...
false
true
08fc87d4da1b332f7deff121d046971427fae22f
16,385
py
Python
tutorials/autotvm/tune_relay_mobile_gpu.py
MuchToMyDelight/tvm
474bc4e761e3bc87d69419c376042c19b6b7dbbe
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
tutorials/autotvm/tune_relay_mobile_gpu.py
MuchToMyDelight/tvm
474bc4e761e3bc87d69419c376042c19b6b7dbbe
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
tutorials/autotvm/tune_relay_mobile_gpu.py
MuchToMyDelight/tvm
474bc4e761e3bc87d69419c376042c19b6b7dbbe
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.462441
100
0.630394
import os import numpy as np import tvm from tvm import relay, autotvm import tvm.relay.testing from tvm.autotvm.tuner import XGBTuner, GATuner, RandomTuner, GridSearchTuner from tvm.contrib.utils import tempdir import tvm.contrib.graph_runtime as runtime def get_network(name, batch_size): input_shape = (bat...
true
true
08fc88a2f4c819055cf3c7b59abfa8a85f4545b0
151
py
Python
Chapter03/Ch03_Code/GUI_independent_msg.py
mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition
18e4632106169991e9b75680bdd7250c9d77c3be
[ "MIT" ]
2
2021-01-12T03:13:29.000Z
2021-01-12T03:13:31.000Z
Chapter03/Ch03_Code/GUI_independent_msg.py
mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition
18e4632106169991e9b75680bdd7250c9d77c3be
[ "MIT" ]
null
null
null
Chapter03/Ch03_Code/GUI_independent_msg.py
mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition
18e4632106169991e9b75680bdd7250c9d77c3be
[ "MIT" ]
1
2019-05-24T19:16:36.000Z
2019-05-24T19:16:36.000Z
''' May 2017 @author: Burkhard A. Meier ''' from tkinter import messagebox as msg msg.showinfo('Python GUI created using tkinter:\nThe year is 2017')
18.875
67
0.741722
from tkinter import messagebox as msg msg.showinfo('Python GUI created using tkinter:\nThe year is 2017')
true
true
08fc88aa9e042fcee448578d659c01a79874fe79
2,495
py
Python
test/functional/feature_help.py
republic-productions/finalcoin
7c0f335ded1e5c662034c822ca2c474b8e62778f
[ "MIT" ]
null
null
null
test/functional/feature_help.py
republic-productions/finalcoin
7c0f335ded1e5c662034c822ca2c474b8e62778f
[ "MIT" ]
null
null
null
test/functional/feature_help.py
republic-productions/finalcoin
7c0f335ded1e5c662034c822ca2c474b8e62778f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2018-2020 The Finalcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Verify that starting finalcoin with -h works as expected.""" from test_framework.test_framework impo...
39.603175
86
0.666132
from test_framework.test_framework import FinalcoinTestFramework from test_framework.util import assert_equal class HelpTest(FinalcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 def setup_network(self): self.add_nodes(self.num_nodes) ...
true
true
08fc897c9b0564049a69b62531c5f0b08b6b20d6
13,514
py
Python
modules/text/semantic_model/simnet_bow/module.py
Steffy-zxf/HubModule
40b0563f86634714033ab7712a08a58eba81bad1
[ "Apache-2.0" ]
null
null
null
modules/text/semantic_model/simnet_bow/module.py
Steffy-zxf/HubModule
40b0563f86634714033ab7712a08a58eba81bad1
[ "Apache-2.0" ]
null
null
null
modules/text/semantic_model/simnet_bow/module.py
Steffy-zxf/HubModule
40b0563f86634714033ab7712a08a58eba81bad1
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import ast import json import math import os import six import numpy as np import paddle.fluid as fluid from paddle.fluid.core import PaddleTensor, AnalysisConfig, create...
35.563158
100
0.568818
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import ast import json import math import os import six import numpy as np import paddle.fluid as fluid from paddle.fluid.core import PaddleTensor, AnalysisConfig, create_paddle_predictor impor...
true
true
08fc8a35d3c84395db504ee55171df7e2c83253c
414
py
Python
experiments/fdtd-2d/tmp_files/8653.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/fdtd-2d/tmp_files/8653.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/fdtd-2d/tmp_files/8653.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/fdtd-2d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/fdtd-2d/tmp_files/8653.c') procedure('kernel_fdtd_2d') loop(0) known(' nx > 1 ') known(' ny > 1 ') ti...
23
116
0.722222
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/fdtd-2d/tmp_files/8653.c') procedure('kernel_fdtd_2d') loop(0) known(' nx > 1 ') known(' ny > 1 ') ti...
true
true
08fc8b89d54e054ecc507c5205d2e029f7d6a36c
35,901
py
Python
google/ads/google_ads/v3/proto/common/offline_user_data_pb2.py
jphanwebstaurant/google-ads-python
600812b2afcc4d57f00b47dfe436620ce50bfe9b
[ "Apache-2.0" ]
1
2019-11-30T23:42:39.000Z
2019-11-30T23:42:39.000Z
google/ads/google_ads/v3/proto/common/offline_user_data_pb2.py
jphanwebstaurant/google-ads-python
600812b2afcc4d57f00b47dfe436620ce50bfe9b
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v3/proto/common/offline_user_data_pb2.py
jphanwebstaurant/google-ads-python
600812b2afcc4d57f00b47dfe436620ce50bfe9b
[ "Apache-2.0" ]
1
2020-09-30T17:04:06.000Z
2020-09-30T17:04:06.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v3/proto/common/offline_user_data.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf impo...
49.93185
3,572
0.771316
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
08fc8b90dacb0441c5e0341f56e9b8a6e12a3fc2
4,514
py
Python
distributed/diagnostics/tests/test_progress.py
crusaderky/distributed
d1cf1d452aece30b75adaf7f73f7cfdc69a63c4a
[ "BSD-3-Clause" ]
1,358
2016-02-09T21:25:27.000Z
2022-03-30T08:06:36.000Z
distributed/diagnostics/tests/test_progress.py
crusaderky/distributed
d1cf1d452aece30b75adaf7f73f7cfdc69a63c4a
[ "BSD-3-Clause" ]
4,789
2016-02-10T00:13:43.000Z
2022-03-31T23:56:27.000Z
distributed/diagnostics/tests/test_progress.py
crusaderky/distributed
d1cf1d452aece30b75adaf7f73f7cfdc69a63c4a
[ "BSD-3-Clause" ]
791
2016-02-19T04:34:38.000Z
2022-03-31T16:26:38.000Z
import asyncio import pytest from distributed import Nanny from distributed.client import wait from distributed.compatibility import LINUX from distributed.diagnostics.progress import ( AllProgress, MultiProgress, Progress, SchedulerPlugin, ) from distributed.scheduler import COMPILED from distributed...
23.510417
79
0.590607
import asyncio import pytest from distributed import Nanny from distributed.client import wait from distributed.compatibility import LINUX from distributed.diagnostics.progress import ( AllProgress, MultiProgress, Progress, SchedulerPlugin, ) from distributed.scheduler import COMPILED from distributed...
true
true
08fc8bba871123d7a7ca896c26d322673de93833
11,463
py
Python
rpython/translator/backendopt/test/test_malloc.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
34
2015-07-09T04:53:27.000Z
2021-07-19T05:22:27.000Z
rpython/translator/backendopt/test/test_malloc.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
6
2015-05-30T17:20:45.000Z
2017-06-12T14:29:23.000Z
rpython/translator/backendopt/test/test_malloc.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
11
2015-09-07T14:26:08.000Z
2020-04-10T07:20:41.000Z
import py from rpython.translator.backendopt.malloc import LLTypeMallocRemover from rpython.translator.backendopt.all import backend_optimizations from rpython.translator.translator import TranslationContext, graphof from rpython.translator import simplify from rpython.flowspace.model import checkgraph, Block, mkentrym...
32.381356
84
0.490186
import py from rpython.translator.backendopt.malloc import LLTypeMallocRemover from rpython.translator.backendopt.all import backend_optimizations from rpython.translator.translator import TranslationContext, graphof from rpython.translator import simplify from rpython.flowspace.model import checkgraph, Block, mkentrym...
true
true
08fc8d1fdccfa6e2e6d1bd7df99508987134a7a0
14,510
py
Python
tools/marvin/marvin/lib/ncc.py
elShiaLabeouf/cloudstack
3c5580632425ded5a468c3cd82cd141e7410ef39
[ "Apache-2.0" ]
1
2020-03-22T14:55:12.000Z
2020-03-22T14:55:12.000Z
tools/marvin/marvin/lib/ncc.py
elShiaLabeouf/cloudstack
3c5580632425ded5a468c3cd82cd141e7410ef39
[ "Apache-2.0" ]
null
null
null
tools/marvin/marvin/lib/ncc.py
elShiaLabeouf/cloudstack
3c5580632425ded5a468c3cd82cd141e7410ef39
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
45.628931
115
0.572846
from marvin.cloudstackTestCase import cloudstackTestCase from marvin.cloudstackAPI import * from marvin.lib.base import Domain, Account from marvin.lib.utils import validateList from marvin.codes import PASS,FAILED from marvin.cloudstackException import (InvalidParameterException, ...
true
true
08fc8d821a8ac78597fecc04cf1fe18509f25d18
55
py
Python
aula13.1.py
eng-lenin/Python
6038f052b8343878760ed133dd43869927e39b3d
[ "MIT" ]
1
2021-01-30T14:50:55.000Z
2021-01-30T14:50:55.000Z
aula13.1.py
eng-lenin/Python
6038f052b8343878760ed133dd43869927e39b3d
[ "MIT" ]
null
null
null
aula13.1.py
eng-lenin/Python
6038f052b8343878760ed133dd43869927e39b3d
[ "MIT" ]
null
null
null
for c in range (6,0,-1):#pula print(c) print('FIM')
18.333333
29
0.581818
for c in range (6,0,-1): print(c) print('FIM')
true
true
08fc8dd7cd27d10c4ff039aa784a6ccea2b1562f
1,643
py
Python
setup.py
osalpekar/tensorpipe
bff4c20ebd6e64b084307015660c14d005cd7da3
[ "BSD-3-Clause" ]
null
null
null
setup.py
osalpekar/tensorpipe
bff4c20ebd6e64b084307015660c14d005cd7da3
[ "BSD-3-Clause" ]
null
null
null
setup.py
osalpekar/tensorpipe
bff4c20ebd6e64b084307015660c14d005cd7da3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import os import subprocess import sys from pathlib import Path from setuptools import Ex...
29.872727
76
0.656117
import os import subprocess import sys from pathlib import Path from setuptools import Extension, setup from setuptools.command.build_ext import build_ext class CMakeBuild(build_ext): def run(self): for ext in self.extensions: self.build_extension(ext) def build_extension(self, ext): ...
true
true
08fc8f5991c4b481d5b82bede1188e07d0e84d7d
389
py
Python
Tele_Aula 3/modulo_Delete.py
andrenjunior/Linguagem-de-Programa-o-Python
ebffc440bfde7a4c8752872d9cc00e0f83a91e3b
[ "MIT" ]
null
null
null
Tele_Aula 3/modulo_Delete.py
andrenjunior/Linguagem-de-Programa-o-Python
ebffc440bfde7a4c8752872d9cc00e0f83a91e3b
[ "MIT" ]
null
null
null
Tele_Aula 3/modulo_Delete.py
andrenjunior/Linguagem-de-Programa-o-Python
ebffc440bfde7a4c8752872d9cc00e0f83a91e3b
[ "MIT" ]
null
null
null
# Só é preciso importar a biblioteca uma vez. Importamos novamente para manter todo o código em uma única célula import sqlite3 conn = sqlite3.connect('aulaDB.db') cursor = conn.cursor() cursor.execute("DELETE FROM fornecedor WHERE id_fornecedor = 2") conn.commit() cursor.execute("SELECT * FROM fornecedor") for linh...
25.933333
112
0.758355
import sqlite3 conn = sqlite3.connect('aulaDB.db') cursor = conn.cursor() cursor.execute("DELETE FROM fornecedor WHERE id_fornecedor = 2") conn.commit() cursor.execute("SELECT * FROM fornecedor") for linha in cursor.fetchall(): print(linha) cursor.close() conn.close()
true
true
08fc8fc70e5a2f77852b67cddb5e306458371d57
1,222
py
Python
legacy_site_data/extract_old_data.py
robdudley/literaterobot
96a73fba8215b6b52b8d69250cb88afca3095efd
[ "BSD-3-Clause" ]
1
2019-11-07T18:07:40.000Z
2019-11-07T18:07:40.000Z
legacy_site_data/extract_old_data.py
dwedigital/literaterobot
0d7daf96afeb6e04f4d80244d70d80cbe74a2884
[ "BSD-3-Clause" ]
null
null
null
legacy_site_data/extract_old_data.py
dwedigital/literaterobot
0d7daf96afeb6e04f4d80244d70d80cbe74a2884
[ "BSD-3-Clause" ]
null
null
null
import os import csv folder = './pages/' fn_list = [] dn_list = [] d_revisions = [] # Obtain full list of directories from the old site for (dirpath, dirnames, filenames) in os.walk(folder): for d in dirnames: dn = os.path.join(dirpath, d) dn_list.append(dn) dn_list.sort() # If 'revisions' is in...
26
76
0.648118
import os import csv folder = './pages/' fn_list = [] dn_list = [] d_revisions = [] for (dirpath, dirnames, filenames) in os.walk(folder): for d in dirnames: dn = os.path.join(dirpath, d) dn_list.append(dn) dn_list.sort() for d in dn_list: if "revisions" in d: temp_list = [] ...
true
true
08fc9071ce5410946fe50cb02b25ee7de0187640
2,355
py
Python
testCNN.py
raghavgupta0296/ASL
5012e1f2fa66b7f75b22f576003c8be50c59286e
[ "MIT" ]
null
null
null
testCNN.py
raghavgupta0296/ASL
5012e1f2fa66b7f75b22f576003c8be50c59286e
[ "MIT" ]
null
null
null
testCNN.py
raghavgupta0296/ASL
5012e1f2fa66b7f75b22f576003c8be50c59286e
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf import cv2 class testing: def ini_wt(self,shape): initial = tf.truncated_normal(shape, stddev=0.1) return tf.Variable(initial) def ini_bias(self,shape): initial = tf.constant(0.1, shape=shape) return tf.Variable(initial) ...
32.260274
91
0.547346
import numpy as np import tensorflow as tf import cv2 class testing: def ini_wt(self,shape): initial = tf.truncated_normal(shape, stddev=0.1) return tf.Variable(initial) def ini_bias(self,shape): initial = tf.constant(0.1, shape=shape) return tf.Variable(initial) ...
true
true
08fc917a3d66bd5494ce811083fbadd53d9e5d50
547
py
Python
sa/profiles/Linux/Astra/get_interface_properties.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
sa/profiles/Linux/Astra/get_interface_properties.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
sa/profiles/Linux/Astra/get_interface_properties.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# ---------------------------------------------------------------------- # Linux.Astra.get_interface_properties script # ---------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # ----------------------------------------------------------...
36.466667
81
0.471664
from noc.sa.profiles.Generic.get_interface_properties import Script as BaseScript class Script(BaseScript): name = "Linux.Astra.get_interface_properties" SNMP_NAME_TABLE = "IF-MIB::ifName"
true
true
08fc91e31440260ca139ed834a1a5e5e50d79c34
6,687
py
Python
MetReg/data/data_loader.py
leelew/MetReg
b38e28326374e30521eab70625b9c22105688d8d
[ "MIT" ]
3
2021-02-18T02:28:09.000Z
2022-02-27T14:31:38.000Z
MetReg/data/data_loader.py
leelew/MetReg
b38e28326374e30521eab70625b9c22105688d8d
[ "MIT" ]
null
null
null
MetReg/data/data_loader.py
leelew/MetReg
b38e28326374e30521eab70625b9c22105688d8d
[ "MIT" ]
1
2021-11-17T10:41:48.000Z
2021-11-17T10:41:48.000Z
import tensorflow as tf class Data_loader(): """create tensorflow data pipeline. This class provides the same action with `Data_Loader` in `pytorch` using `tf.data.Datasets.from_tensor_slices`. It create a `Dataset` whose elements are slices of the given tensors, and also provide shuffle, batch and...
42.322785
80
0.657544
import tensorflow as tf class Data_loader(): def __init__(self, features, label, epochs: int, batch_size: int, drop_remainder=False, shuffle=True, shuffle_buffer_size=100000, re...
true
true
08fc92956bd0424df9d710fde786f6238b3533b3
192
py
Python
backend/rethinkdb_tools/dbcreator.py
al-indigo/vmemperor
80eb6d47d839a4736eb6f9d2fcfad35f0a7b3bb1
[ "Apache-2.0" ]
1
2019-02-02T15:01:32.000Z
2019-02-02T15:01:32.000Z
rethinkdb_tools/dbcreator.py
pashazz/vmemperor
a0b53f67d75cccbd8e1e6a0419d85babab7041f5
[ "Apache-2.0" ]
8
2017-10-11T13:26:10.000Z
2021-12-13T20:27:52.000Z
rethinkdb_tools/dbcreator.py
pashazz/vmemperor
a0b53f67d75cccbd8e1e6a0419d85babab7041f5
[ "Apache-2.0" ]
4
2017-07-27T12:25:42.000Z
2018-01-28T02:06:26.000Z
from .db_classes import create_db_for_me class DBCreator(type): def __init__(cls, what, bases=None, dict=None): super().__init__(what, bases, dict) create_db_for_me(cls)
24
51
0.697917
from .db_classes import create_db_for_me class DBCreator(type): def __init__(cls, what, bases=None, dict=None): super().__init__(what, bases, dict) create_db_for_me(cls)
true
true
08fc941bae0d5054fc8f6f7cf386e8da17d88a51
1,477
py
Python
Z - Tool Box/LaZagne/Windows/lazagne/softwares/sysadmin/filezillaserver.py
dfirpaul/Active-Directory-Exploitation-Cheat-Sheet-1
1dcf54522e9d20711ff1114550dc2893ed3e9ed0
[ "MIT" ]
1,290
2020-05-28T21:24:43.000Z
2022-03-31T16:38:43.000Z
Z - Tool Box/LaZagne/Windows/lazagne/softwares/sysadmin/filezillaserver.py
dfirpaul/Active-Directory-Exploitation-Cheat-Sheet-1
1dcf54522e9d20711ff1114550dc2893ed3e9ed0
[ "MIT" ]
1
2020-07-03T21:14:52.000Z
2020-07-03T21:14:52.000Z
Z - Tool Box/LaZagne/Windows/lazagne/softwares/sysadmin/filezillaserver.py
dfirpaul/Active-Directory-Exploitation-Cheat-Sheet-1
1dcf54522e9d20711ff1114550dc2893ed3e9ed0
[ "MIT" ]
280
2020-05-29T17:28:38.000Z
2022-03-31T13:54:15.000Z
# -*- coding: utf-8 -*- from xml.etree.cElementTree import ElementTree from lazagne.config.module_info import ModuleInfo from lazagne.config.constant import constant import os class FilezillaServer(ModuleInfo): def __init__(self): ModuleInfo.__init__(self, 'filezillaserver', 'sysadmin') def run(sel...
34.348837
82
0.515234
from xml.etree.cElementTree import ElementTree from lazagne.config.module_info import ModuleInfo from lazagne.config.constant import constant import os class FilezillaServer(ModuleInfo): def __init__(self): ModuleInfo.__init__(self, 'filezillaserver', 'sysadmin') def run(self): path = os.pa...
true
true
08fc94371ef572608c93925e80a324c540130027
2,956
py
Python
custom-scripts/train.py
AlanNaoto/detectron2
5b028c9f3bdd9bb98cb7f98d09785871b435964a
[ "Apache-2.0" ]
null
null
null
custom-scripts/train.py
AlanNaoto/detectron2
5b028c9f3bdd9bb98cb7f98d09785871b435964a
[ "Apache-2.0" ]
null
null
null
custom-scripts/train.py
AlanNaoto/detectron2
5b028c9f3bdd9bb98cb7f98d09785871b435964a
[ "Apache-2.0" ]
null
null
null
""" Alan Naoto Created 19.12.2019 """ import os import random import numpy as np import cv2 import torch import detectron2 from detectron2.utils.logger import setup_logger setup_logger() from detectron2.engine import DefaultPredictor, DefaultTrainer, SimpleTrainer from detectron2.config import get_cfg from detectron2....
36.04878
133
0.733424
import os import random import numpy as np import cv2 import torch import detectron2 from detectron2.utils.logger import setup_logger setup_logger() from detectron2.engine import DefaultPredictor, DefaultTrainer, SimpleTrainer from detectron2.config import get_cfg from detectron2.utils.visualizer import Visualizer, Co...
true
true
08fc95cb00567a616f83a9ed44c853dc778d320a
3,931
py
Python
tests/test_cardrules.py
jule64/simudraw
43a1b74571bff9d57d3f4511acc84724c91efe6f
[ "Unlicense" ]
3
2017-02-06T19:30:30.000Z
2020-06-14T08:10:31.000Z
tests/test_cardrules.py
jule64/simudraw
43a1b74571bff9d57d3f4511acc84724c91efe6f
[ "Unlicense" ]
null
null
null
tests/test_cardrules.py
jule64/simudraw
43a1b74571bff9d57d3f4511acc84724c91efe6f
[ "Unlicense" ]
null
null
null
import unittest from cardrules import CardRules from deck import Deck class CardRulesFinalCheckTests(unittest.TestCase): def setUp(self): deck = Deck() self.card_rules = CardRules(deck) def test_reject_straight(self): self.card_rules.set_target('J') hand = ['7s','9c','10c','8...
37.084906
85
0.630374
import unittest from cardrules import CardRules from deck import Deck class CardRulesFinalCheckTests(unittest.TestCase): def setUp(self): deck = Deck() self.card_rules = CardRules(deck) def test_reject_straight(self): self.card_rules.set_target('J') hand = ['7s','9c','10c','8...
true
true
08fc95e27d009f312dc1c094cd3f79b6bb4fe3c3
2,698
py
Python
rewind/client/test/test_code.py
JensRantil/rewind-client
943b437fb469cd36f3fd37709b947d852da99151
[ "MIT" ]
2
2016-02-13T23:54:27.000Z
2016-07-03T00:43:02.000Z
rewind/client/test/test_code.py
JensRantil/rewind-client
943b437fb469cd36f3fd37709b947d852da99151
[ "MIT" ]
null
null
null
rewind/client/test/test_code.py
JensRantil/rewind-client
943b437fb469cd36f3fd37709b947d852da99151
[ "MIT" ]
null
null
null
# rewind-client talks to rewind, an event store server. # # Copyright (C) 2012 Jens Rantil # # This program is distributed under the MIT License. See the file LICENSE.txt # for details. """Test code format and coding standards.""" from __future__ import print_function import os import pep8 import pep257 import unitte...
32.902439
77
0.59785
from __future__ import print_function import os import pep8 import pep257 import unittest class TestCodeFormat(unittest.TestCase): @classmethod def setUpClass(cls): cls._pyfiles = cls._get_all_pyfiles() @staticmethod def _get_all_pyfiles(): while not os.getcwd().endswith('rewind'):...
true
true
08fc990e5f2005532cb68c8c8d6d2f9bd0701027
17,008
py
Python
HOUDINI/Synthesizer/Utils/ASTUtils.py
CTPLab/AutoCI
799db8dff8ad5e262dea448a3491ed1db07f5655
[ "MIT" ]
5
2022-02-07T10:12:09.000Z
2022-02-10T17:01:19.000Z
HOUDINI/Synthesizer/Utils/ASTUtils.py
CTPLab/AutoCI
799db8dff8ad5e262dea448a3491ed1db07f5655
[ "MIT" ]
null
null
null
HOUDINI/Synthesizer/Utils/ASTUtils.py
CTPLab/AutoCI
799db8dff8ad5e262dea448a3491ed1db07f5655
[ "MIT" ]
null
null
null
from typing import Callable, Optional, Dict, Tuple, Union, List from HOUDINI.Synthesizer import AST from HOUDINI.Synthesizer.Utils import MiscUtils, SubstUtils TreeNodeSort = Union[AST.PPTerm, AST.PPSort, AST.PPVarDecl, tuple, list] ntNameGen = MiscUtils.getUniqueFn() def identity(term: AST.PPTerm): return cons...
26.616588
82
0.580903
from typing import Callable, Optional, Dict, Tuple, Union, List from HOUDINI.Synthesizer import AST from HOUDINI.Synthesizer.Utils import MiscUtils, SubstUtils TreeNodeSort = Union[AST.PPTerm, AST.PPSort, AST.PPVarDecl, tuple, list] ntNameGen = MiscUtils.getUniqueFn() def identity(term: AST.PPTerm): return cons...
true
true
08fc9a5807c66da609050b8ba08c9a4891a9f175
4,906
py
Python
admitad/items/auxiliary.py
fonar/admitad-python-api
584b1032edb8c6c3b785d07f58a6480fcc0a698d
[ "MIT" ]
28
2016-10-18T15:02:46.000Z
2021-11-11T20:47:44.000Z
admitad/items/auxiliary.py
fonar/admitad-python-api
584b1032edb8c6c3b785d07f58a6480fcc0a698d
[ "MIT" ]
1
2017-10-26T15:34:38.000Z
2017-10-26T15:34:38.000Z
admitad/items/auxiliary.py
fonar/admitad-python-api
584b1032edb8c6c3b785d07f58a6480fcc0a698d
[ "MIT" ]
20
2016-07-01T20:08:22.000Z
2022-02-15T09:28:10.000Z
# coding: utf-8 from __future__ import unicode_literals from admitad.items.base import Item __all__ = ( 'WebsiteTypes', 'WebsiteRegions', 'SystemLanguages', 'SystemCurrencies', 'AdvertiserServices', 'CampaignCategories', ) class WebsiteTypes(Item): """ List of websites types ""...
20.700422
92
0.519364
from __future__ import unicode_literals from admitad.items.base import Item __all__ = ( 'WebsiteTypes', 'WebsiteRegions', 'SystemLanguages', 'SystemCurrencies', 'AdvertiserServices', 'CampaignCategories', ) class WebsiteTypes(Item): SCOPE = 'public_data' URL = Item.prepare_url('we...
true
true
08fc9ae071cb220d551a04e0f7d532952e0bdcec
395
py
Python
delairstack/core/resources/analytics/products.py
delair-ai/python-delairstack
4fb67ef8d1a95d4af9a4fab3168bc43c85cce420
[ "MIT" ]
9
2020-02-03T22:45:15.000Z
2020-11-25T14:06:25.000Z
delairstack/core/resources/analytics/products.py
delair-ai/python-delairstack
4fb67ef8d1a95d4af9a4fab3168bc43c85cce420
[ "MIT" ]
null
null
null
delairstack/core/resources/analytics/products.py
delair-ai/python-delairstack
4fb67ef8d1a95d4af9a4fab3168bc43c85cce420
[ "MIT" ]
null
null
null
"""Resource manager for products. """ from datetime import datetime from delairstack.apis.provider import Provider class Products: _name = 'product' def __init__(self, *, provider=Provider, **kwargs): self._provider = provider class ProductLog: def __init__(self, *, timestamp: datetime, reco...
18.809524
61
0.686076
from datetime import datetime from delairstack.apis.provider import Provider class Products: _name = 'product' def __init__(self, *, provider=Provider, **kwargs): self._provider = provider class ProductLog: def __init__(self, *, timestamp: datetime, record: dict): self.timestamp = tim...
true
true
08fc9b0e2a6a6132e915093422bd7d2a321cceeb
6,026
py
Python
python/SIMPLE/SIMPLEbacward.py
mmuu1987/MyFluid
406f8bcadc6607b3a87383e85864bf5a5556f231
[ "MIT" ]
null
null
null
python/SIMPLE/SIMPLEbacward.py
mmuu1987/MyFluid
406f8bcadc6607b3a87383e85864bf5a5556f231
[ "MIT" ]
null
null
null
python/SIMPLE/SIMPLEbacward.py
mmuu1987/MyFluid
406f8bcadc6607b3a87383e85864bf5a5556f231
[ "MIT" ]
null
null
null
import numpy as np # 使用SIMPLE算法解决后台阶流动(Backward Facing Step Flow)问题,交错网格 # 教程 https://zhuanlan.zhihu.com/p/347410166 nmax = 8 # 有多长 mmax = 10 # 有多高 tmax = 20 u = np.zeros((nmax + 1, mmax + 2)) # 每回合初始猜的,和最终值 u_star = np.zeros((nmax + 1, mmax + 2)) # 用于迭代 v = np.zeros((nmax + 2, mmax + 1)) # 每回合初始猜的,和最终值 v_star ...
35.869048
108
0.430634
import numpy as np nmax = 8 mmax = 10 tmax = 20 u = np.zeros((nmax + 1, mmax + 2)) u_star = np.zeros((nmax + 1, mmax + 2)) v = np.zeros((nmax + 2, mmax + 1)) v_star = np.zeros((nmax + 2, mmax + 1)) p = np.zeros((nmax + 2, mmax + 2)) p_star = np.zeros((nmax + 2, mmax + 2)) p_source = np.zeros((nmax + 2, mmax...
true
true
08fc9bb4673e5fe940ee823f7f3f2dec58160e14
797
py
Python
updater/reports/ReportRepoSize.py
eisenhowerj/hubble
6a7920c2adedb173162b69c19dc3f6262c7982d4
[ "MIT" ]
146
2017-09-26T15:33:19.000Z
2022-02-24T13:58:54.000Z
updater/reports/ReportRepoSize.py
eisenhowerj/hubble
6a7920c2adedb173162b69c19dc3f6262c7982d4
[ "MIT" ]
169
2017-10-05T15:32:41.000Z
2022-03-17T20:54:00.000Z
updater/reports/ReportRepoSize.py
kenferrara/hubble
9abb7987b25bc1559f7a11b948c0670e04d608af
[ "MIT" ]
65
2017-09-26T22:46:41.000Z
2022-03-08T03:32:21.000Z
from .ReportDaily import * # Query the number of repositories larger than 1GB class ReportRepoSize(ReportDaily): def name(self): return "repository-size" def updateDailyData(self): self.detailedHeader, self.detailedData = self.parseData( self.executeGHEConsole(''' puts "repository\tarchived?\trepository ...
33.208333
82
0.688833
from .ReportDaily import * class ReportRepoSize(ReportDaily): def name(self): return "repository-size" def updateDailyData(self): self.detailedHeader, self.detailedData = self.parseData( self.executeGHEConsole(''' puts "repository\tarchived?\trepository size [MB]\n" Repository .select{ |repo| ...
true
true
08fc9cae41f05cd2be2784f6de06f3111d946dc4
221
py
Python
contrib/wallettools/walletchangepass.py
bumbacoin/ozziecoin
21803c5e99662b6b84cb745b50d2ffb13ef8f726
[ "MIT" ]
null
null
null
contrib/wallettools/walletchangepass.py
bumbacoin/ozziecoin
21803c5e99662b6b84cb745b50d2ffb13ef8f726
[ "MIT" ]
null
null
null
contrib/wallettools/walletchangepass.py
bumbacoin/ozziecoin
21803c5e99662b6b84cb745b50d2ffb13ef8f726
[ "MIT" ]
null
null
null
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:39152") pwd = raw_input("Enter old wallet passphrase: ") pwd2 = raw_input("Enter new wallet passphrase: ") access.walletpassphrasechange(pwd, pwd2)
36.833333
49
0.769231
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:39152") pwd = raw_input("Enter old wallet passphrase: ") pwd2 = raw_input("Enter new wallet passphrase: ") access.walletpassphrasechange(pwd, pwd2)
true
true
08fc9d06bd3c4537330bc039d5ae5bd1b8629429
618
py
Python
setup.py
vkola-lab/multi-GPU
d50cff0d587b640fb3af94329102d3eacdd70aa5
[ "MIT" ]
null
null
null
setup.py
vkola-lab/multi-GPU
d50cff0d587b640fb3af94329102d3eacdd70aa5
[ "MIT" ]
null
null
null
setup.py
vkola-lab/multi-GPU
d50cff0d587b640fb3af94329102d3eacdd70aa5
[ "MIT" ]
null
null
null
""" Created on Fri Jul 31 16:55:14 2020 @author: cxue2 """ import setuptools setuptools.setup( name='xfdlfw', version='0.0.4', author='Chonghua Xue', author_email='cxue2@bu.edu', # url='https://github.com/vkola-lab/python_speech_features_cuda', # description='Re-implementation of Python Speec...
26.869565
84
0.635922
import setuptools setuptools.setup( name='xfdlfw', version='0.0.4', author='Chonghua Xue', author_email='cxue2@bu.edu', packages=setuptools.find_packages(), )
true
true
08fc9e7d7644e94de5013129aad7ca657fc23673
1,408
py
Python
readthedocs/restapi/views/core_views.py
edmondchuc/readthedocs.org
4fa2746040aee0aafcdb09e0e5674dcb42ea9809
[ "MIT" ]
1
2020-03-12T14:24:48.000Z
2020-03-12T14:24:48.000Z
readthedocs/restapi/views/core_views.py
Alig1493/readthedocs.org
c37b00995c1bbc5ee51d3552ef176546373bb912
[ "MIT" ]
1
2018-12-24T04:01:31.000Z
2018-12-24T04:01:31.000Z
readthedocs/restapi/views/core_views.py
Alig1493/readthedocs.org
c37b00995c1bbc5ee51d3552ef176546373bb912
[ "MIT" ]
6
2019-02-13T16:08:41.000Z
2020-03-12T14:17:14.000Z
"""Utility endpoints relating to canonical urls, embedded content, etc.""" from __future__ import absolute_import from rest_framework import decorators, permissions, status from rest_framework.renderers import JSONRenderer from rest_framework.response import Response from django.shortcuts import get_object_or_404 f...
33.52381
94
0.753551
from __future__ import absolute_import from rest_framework import decorators, permissions, status from rest_framework.renderers import JSONRenderer from rest_framework.response import Response from django.shortcuts import get_object_or_404 from readthedocs.builds.constants import LATEST from readthedocs.builds.mode...
true
true
08fca093d7d3f0272548b132a5d34844a20c9549
824
py
Python
app_uniplan/migrations/0021_remove_majorsequence_units_and_more.py
illegalbyte/uniplan
1507a79679d38814591dfbe1bfe8332b632a2290
[ "MIT" ]
null
null
null
app_uniplan/migrations/0021_remove_majorsequence_units_and_more.py
illegalbyte/uniplan
1507a79679d38814591dfbe1bfe8332b632a2290
[ "MIT" ]
null
null
null
app_uniplan/migrations/0021_remove_majorsequence_units_and_more.py
illegalbyte/uniplan
1507a79679d38814591dfbe1bfe8332b632a2290
[ "MIT" ]
null
null
null
# Generated by Django 4.0.1 on 2022-02-04 23:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app_uniplan', '0020_student_profile_major_unitdata_unitguide_url'), ] operations = [ migrations.RemoveField( model_name='majorse...
29.428571
111
0.614078
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app_uniplan', '0020_student_profile_major_unitdata_unitguide_url'), ] operations = [ migrations.RemoveField( model_name='majorsequence', name='units', ), ...
true
true
08fca0ac0ac75c1b5929a1e1327df7eb98bfa3f9
6,442
py
Python
code/EVSegNet/Misc/DataParse.py
mywisdomfly/EVDodgeNet
7d53a9c8e0e5883ac8ad2147da5981db5d9ba7a7
[ "BSD-3-Clause" ]
62
2020-05-22T03:00:11.000Z
2022-03-16T02:26:35.000Z
code/EVSegNet/Misc/DataParse.py
mywisdomfly/EVDodgeNet
7d53a9c8e0e5883ac8ad2147da5981db5d9ba7a7
[ "BSD-3-Clause" ]
8
2020-04-02T10:47:30.000Z
2021-06-18T17:35:40.000Z
code/EVSegNet/Misc/DataParse.py
mywisdomfly/EVDodgeNet
7d53a9c8e0e5883ac8ad2147da5981db5d9ba7a7
[ "BSD-3-Clause" ]
24
2020-04-14T14:49:56.000Z
2022-03-19T09:20:28.000Z
#!/usr/bin/env python # Dependencies: # opencv, do (pip install opencv-python) # termcolor, do (pip install termcolor) # tqdm, do (pip install tqdm) import glob import os from termcolor import colored, cprint import argparse import cv2 import numpy as np from tqdm import tqdm import random def MakeImgPairs(ReadPath...
41.294872
139
0.614561
import glob import os from termcolor import colored, cprint import argparse import cv2 import numpy as np from tqdm import tqdm import random def MakeImgPairs(ReadPath, WritePath): DirNames = open(WritePath + os.sep + 'DirNames.txt', 'w') Labels = open(WritePath + os.sep + 'Masks.txt', 'w') for dirs in ...
true
true
08fca0f554505fd1c1dcd2868f83da285e278e56
862
py
Python
auxiliary/sampling_and_meshing/O-CNN/process_raw_obj.py
kierannp/3dsnet
429c3d431b36358e43c61692e0d02df3ea255635
[ "MIT" ]
21
2020-12-11T02:34:42.000Z
2022-02-04T05:40:49.000Z
auxiliary/sampling_and_meshing/O-CNN/process_raw_obj.py
skim2257/AtlasNet
96c14645a0ade14d2d89db6c4a599a48acae207a
[ "MIT" ]
7
2021-06-08T08:35:00.000Z
2021-11-07T10:27:30.000Z
auxiliary/sampling_and_meshing/O-CNN/process_raw_obj.py
skim2257/AtlasNet
96c14645a0ade14d2d89db6c4a599a48acae207a
[ "MIT" ]
6
2021-05-20T20:29:38.000Z
2022-03-29T05:27:27.000Z
import randomizePointCloud import pcSamplingInfRayShapeNet import sample30kpoints from easydict import EasyDict import argparse def main(): parser = argparse.ArgumentParser() parser.add_argument('--shapenet_path', help="Input Folder", required=True) parser.add_argument('--virtualscan', type=str, help='Path to the v...
35.916667
142
0.780742
import randomizePointCloud import pcSamplingInfRayShapeNet import sample30kpoints from easydict import EasyDict import argparse def main(): parser = argparse.ArgumentParser() parser.add_argument('--shapenet_path', help="Input Folder", required=True) parser.add_argument('--virtualscan', type=str, help='Path to the v...
true
true
08fca3f83503b7f79177ebd09d0f14fad854ef83
489
py
Python
lesson-07/04/animal.py
minimum-hsu/tutorial-python
667692e7cd13a8a4d061a4da530dc2dfe25ac1de
[ "MIT" ]
null
null
null
lesson-07/04/animal.py
minimum-hsu/tutorial-python
667692e7cd13a8a4d061a4da530dc2dfe25ac1de
[ "MIT" ]
null
null
null
lesson-07/04/animal.py
minimum-hsu/tutorial-python
667692e7cd13a8a4d061a4da530dc2dfe25ac1de
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod ## see Abstract Base Classes (https://docs.python.org/3/library/abc.html) class Animal(ABC): def __init__(self, kind: str, name: str, legs: int): ''' The first step when creating a new object ''' self.__kind = kind self.name = name ...
21.26087
73
0.586912
from abc import ABC, abstractmethod class Animal(ABC): def __init__(self, kind: str, name: str, legs: int): self.__kind = kind self.name = name self.legs = legs def hello(self): print('My name is {}. I am {}.'.format(self.name, self.__kind)) @abstractmethod def run(...
true
true
08fca45c31c8afd8a790cdee443d70b36847e7f3
10,854
py
Python
sdks/python/apache_beam/utils/windowed_value.py
hengfengli/beam
83a8855e5997e0311e6274c03bcb38f94efbf8ef
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
5,279
2016-12-29T04:00:44.000Z
2022-03-31T22:56:45.000Z
sdks/python/apache_beam/utils/windowed_value.py
hengfengli/beam
83a8855e5997e0311e6274c03bcb38f94efbf8ef
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
14,149
2016-12-28T00:43:50.000Z
2022-03-31T23:50:22.000Z
sdks/python/apache_beam/utils/windowed_value.py
ajothomas/beam
4774c1caf3dac3b6a7dd161f82559a26fa380920
[ "Apache-2.0", "BSD-3-Clause" ]
3,763
2016-12-29T04:06:10.000Z
2022-03-31T22:25:49.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 us...
31.46087
87
0.68841
from typing import TYPE_CHECKING from typing import Any from typing import List from typing import Optional from typing import Tuple from apache_beam.utils.timestamp import MAX_TIMESTAMP from apache_beam.utils.timestamp import MIN_TIMESTAMP from apache_beam.utils.timestamp import Timestamp from apache_beam.utils....
true
true
08fca45fd77cb4b38aa5756ab5254087c7595255
574
py
Python
emencia_paste_djangocms_2/django_buildout/project/mods_available/recaptcha/__init__.py
emencia/emencia_paste_djangocms_2
23bc97aef2f235f1be1fc5ba8ffce53064a5b6ca
[ "MIT" ]
1
2015-01-17T21:38:50.000Z
2015-01-17T21:38:50.000Z
emencia_paste_djangocms_3/django_buildout/project/mods_available/recaptcha/__init__.py
emencia/emencia_paste_djangocms_3
29eabbcb17e21996a6e1d99592fc719dc8833b59
[ "MIT" ]
5
2015-01-28T15:51:02.000Z
2015-03-16T15:51:15.000Z
emencia_paste_djangocms_2/django_buildout/project/mods_available/recaptcha/__init__.py
emencia/emencia_paste_djangocms_2
23bc97aef2f235f1be1fc5ba8ffce53064a5b6ca
[ "MIT" ]
null
null
null
""" Enable the `Django reCaptcha`_ module to integrate a field of the *captcha* type via the `Service reCaptcha`_. This integration uses a special template and CSS to make it *responsive*. If you do in fact use this module, go to its mods setting file (or that of your environment) to fill in the public key and the pri...
82
198
0.770035
true
true
08fca49f9059cd00a7d342c2a96db252b197c191
973
py
Python
spm/bin/write_run_scripts_dr14_chabrier.py
AndresSixtos/pyeBOSS
4750908c8bc409633bef8f790133e3a1f3f0c9e4
[ "CC0-1.0" ]
1
2017-05-23T13:03:27.000Z
2017-05-23T13:03:27.000Z
spm/bin/write_run_scripts_dr14_chabrier.py
AndresSixtos/pyeBOSS
4750908c8bc409633bef8f790133e3a1f3f0c9e4
[ "CC0-1.0" ]
null
null
null
spm/bin/write_run_scripts_dr14_chabrier.py
AndresSixtos/pyeBOSS
4750908c8bc409633bef8f790133e3a1f3f0c9e4
[ "CC0-1.0" ]
2
2017-09-26T11:17:30.000Z
2021-09-14T06:09:18.000Z
import os from os.path import join import numpy as n def writeScript(rootName, plate): f=open(rootName+".sh",'w') f.write("#!/bin/bash \n") f.write("#PBS -l walltime=260:00:00 \n") f.write("#PBS -o "+plate+".o.$PBS_JOBID \n") f.write("#PBS -e "+plate+".e$PBS_JOBID \n") f.write("#PBS -M comparat@mpe.mpg.de \n") f...
40.541667
111
0.692703
import os from os.path import join import numpy as n def writeScript(rootName, plate): f=open(rootName+".sh",'w') f.write("#!/bin/bash \n") f.write("#PBS -l walltime=260:00:00 \n") f.write("#PBS -o "+plate+".o.$PBS_JOBID \n") f.write("#PBS -e "+plate+".e$PBS_JOBID \n") f.write("#PBS -M comparat@mpe.mpg.de \n") f...
true
true
08fca4ef13a2bc21360d16eeb5f8590fc3720885
429
py
Python
sct_custom/unit_testing/cli/test_cli_sct_fmri_compute_tsnr.py
nidebroux/lumbosacral_segmentation
3217960c6f0f5c3886dfdf46e1286ad2f737f4aa
[ "Unlicense", "MIT" ]
1
2021-09-07T08:52:21.000Z
2021-09-07T08:52:21.000Z
sct_custom/unit_testing/cli/test_cli_sct_fmri_compute_tsnr.py
nidebroux/lumbosacral_segmentation
3217960c6f0f5c3886dfdf46e1286ad2f737f4aa
[ "Unlicense", "MIT" ]
null
null
null
sct_custom/unit_testing/cli/test_cli_sct_fmri_compute_tsnr.py
nidebroux/lumbosacral_segmentation
3217960c6f0f5c3886dfdf46e1286ad2f737f4aa
[ "Unlicense", "MIT" ]
null
null
null
from pytest_console_scripts import script_runner import pytest import logging logger = logging.getLogger(__name__) @pytest.mark.script_launch_mode('subprocess') def test_sct_fmri_compute_tsnr_backwards_compat(script_runner): ret = script_runner.run('sct_testing', '--function', 'sct_fmri_compute_tsnr') logger...
28.6
81
0.7669
from pytest_console_scripts import script_runner import pytest import logging logger = logging.getLogger(__name__) @pytest.mark.script_launch_mode('subprocess') def test_sct_fmri_compute_tsnr_backwards_compat(script_runner): ret = script_runner.run('sct_testing', '--function', 'sct_fmri_compute_tsnr') logger...
true
true
08fca5ee0e6aaee50b0037f9e2c81c1bb611f468
1,101
py
Python
vendor-local/lib/python/silme/format/l20n/__init__.py
Acidburn0zzz/pontoon
069d4c7732ace9d4ef39c0b81d0cd33b51b64811
[ "BSD-3-Clause" ]
null
null
null
vendor-local/lib/python/silme/format/l20n/__init__.py
Acidburn0zzz/pontoon
069d4c7732ace9d4ef39c0b81d0cd33b51b64811
[ "BSD-3-Clause" ]
null
null
null
vendor-local/lib/python/silme/format/l20n/__init__.py
Acidburn0zzz/pontoon
069d4c7732ace9d4ef39c0b81d0cd33b51b64811
[ "BSD-3-Clause" ]
null
null
null
from .parser import L20nParser as Parser from .structure import LOL as Structure from .serializer import L20nSerializer as Serializer class L20nFormatParser (): name = 'l20n' desc = "L20n reader/writer" extensions = ['lol'] encoding = 'utf_8' # allowed encoding fallback = None @classmethod ...
28.973684
84
0.666667
from .parser import L20nParser as Parser from .structure import LOL as Structure from .serializer import L20nSerializer as Serializer class L20nFormatParser (): name = 'l20n' desc = "L20n reader/writer" extensions = ['lol'] encoding = 'utf_8' fallback = None @classmethod def dump_structure...
true
true
08fca76a77f81bafbb3990421dbcaa97bed7c7e1
317
py
Python
knx_stack/encode/knxnet_ip/core/hpai.py
majamassarini/knx-stack
11a9baac6b7600649b5fbca43c93b200b23676b4
[ "MIT" ]
2
2021-07-28T07:42:28.000Z
2022-01-25T18:56:05.000Z
knx_stack/encode/knxnet_ip/core/hpai.py
majamassarini/knx-stack
11a9baac6b7600649b5fbca43c93b200b23676b4
[ "MIT" ]
6
2021-07-25T21:36:01.000Z
2022-02-20T21:11:31.000Z
knx_stack/encode/knxnet_ip/core/hpai.py
majamassarini/knx-stack
11a9baac6b7600649b5fbca43c93b200b23676b4
[ "MIT" ]
null
null
null
from knx_stack import Octect, Short from knx_stack.definition.knxnet_ip import Msg as NetMsg, IPV4_UDP LENGTH = 8 def create(ip, port): hpai = NetMsg([Octect(value=LENGTH), Octect(value=IPV4_UDP)]) hpai += NetMsg([Octect(value=b) for b in ip]) hpai += NetMsg(Short(value=port).octects) return hpai
26.416667
66
0.712934
from knx_stack import Octect, Short from knx_stack.definition.knxnet_ip import Msg as NetMsg, IPV4_UDP LENGTH = 8 def create(ip, port): hpai = NetMsg([Octect(value=LENGTH), Octect(value=IPV4_UDP)]) hpai += NetMsg([Octect(value=b) for b in ip]) hpai += NetMsg(Short(value=port).octects) return hpai
true
true