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
f736cb81e16217a84536bf98af9ceaf87c65324b
4,902
py
Python
src/dcm/agent/tests/unit/test_pubsub.py
JPWKU/unix-agent
8f1278fc8c2768a8d4d54af642a881bace43652f
[ "Apache-2.0" ]
null
null
null
src/dcm/agent/tests/unit/test_pubsub.py
JPWKU/unix-agent
8f1278fc8c2768a8d4d54af642a881bace43652f
[ "Apache-2.0" ]
22
2015-09-15T20:52:34.000Z
2016-03-11T22:44:24.000Z
src/dcm/agent/tests/unit/test_pubsub.py
JPWKU/unix-agent
8f1278fc8c2768a8d4d54af642a881bace43652f
[ "Apache-2.0" ]
3
2015-09-11T20:21:33.000Z
2016-09-30T08:30:19.000Z
# # Copyright (C) 2014 Dell, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
31.025316
74
0.612607
import unittest import uuid import dcm.agent.events.callback as events import dcm.agent.events.pubsub as pubsub import dcm.agent.tests.utils.general as test_utils class TestPubSub(unittest.TestCase): @classmethod def setUpClass(cls): test_utils.connect_to_debugger() def setUp(sel...
true
true
f736cc8d15031f273b4f5f5ae9a12e5c83c1cc27
10,189
py
Python
articles/migrations/0060_auto_20150925_2012.py
losolio/website
5b983e9dfaf604212aab87c51d8904ffc29527a3
[ "MIT" ]
null
null
null
articles/migrations/0060_auto_20150925_2012.py
losolio/website
5b983e9dfaf604212aab87c51d8904ffc29527a3
[ "MIT" ]
null
null
null
articles/migrations/0060_auto_20150925_2012.py
losolio/website
5b983e9dfaf604212aab87c51d8904ffc29527a3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import modelcluster.fields import wagtail.wagtailcore.blocks import wagtail.wagtailcore.fields import wagtail.wagtailembeds.blocks import wagtail.wagtailimages.blocks from django.db import migrations, models import articles.fields import interactives.mod...
118.476744
7,174
0.702228
from __future__ import unicode_literals import modelcluster.fields import wagtail.wagtailcore.blocks import wagtail.wagtailcore.fields import wagtail.wagtailembeds.blocks import wagtail.wagtailimages.blocks from django.db import migrations, models import articles.fields import interactives.models class Migration(m...
true
true
f736ccf2709cf9a412754bf299213e98f6cdd5cd
60
py
Python
src/python/project/model.py
metee1996/ds-example-project
8d43b8786711a69779adb7fd6a830fe63fe30909
[ "Apache-2.0" ]
4
2018-02-22T14:15:50.000Z
2019-04-04T20:12:51.000Z
src/python/project/model.py
metee1996/ds-example-project
8d43b8786711a69779adb7fd6a830fe63fe30909
[ "Apache-2.0" ]
null
null
null
src/python/project/model.py
metee1996/ds-example-project
8d43b8786711a69779adb7fd6a830fe63fe30909
[ "Apache-2.0" ]
11
2018-02-23T00:26:44.000Z
2020-04-08T11:32:31.000Z
import numpy as np def power(x): return np.power(x, 2)
12
25
0.65
import numpy as np def power(x): return np.power(x, 2)
true
true
f736cd1bb79f65fb5483c56a4c4fc07056e754eb
2,246
py
Python
tools/convert_video2frames.py
RexBarker/VideoObjectRemoval
26b8648645044389e9b7311f609c04b41f92f0b7
[ "MIT" ]
10
2020-11-09T03:05:11.000Z
2022-03-15T08:17:18.000Z
tools/convert_video2frames.py
RexBarker/VideoObjectRemoval
26b8648645044389e9b7311f609c04b41f92f0b7
[ "MIT" ]
1
2020-12-14T11:33:10.000Z
2020-12-15T02:27:24.000Z
tools/convert_video2frames.py
RexBarker/VideoObjectRemoval
26b8648645044389e9b7311f609c04b41f92f0b7
[ "MIT" ]
3
2021-02-17T09:14:31.000Z
2021-11-10T01:55:51.000Z
import argparse import cv2 import os import numpy as np from math import log10, ceil def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--input_file', type=str, required=True, default=None, help="input video file (.avi, .mp4, .mkv, mov)") parser.add_argument('...
31.194444
106
0.64114
import argparse import cv2 import os import numpy as np from math import log10, ceil def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--input_file', type=str, required=True, default=None, help="input video file (.avi, .mp4, .mkv, mov)") parser.add_argument('...
true
true
f736cd719f269335aea5d9fd217a88184c2f3c71
10,680
py
Python
cloudpathlib/s3/s3client.py
ElucidataInc/cloudpathlib
9c11c6af2b0ac713ddcd950123d1db3b17515efa
[ "MIT" ]
null
null
null
cloudpathlib/s3/s3client.py
ElucidataInc/cloudpathlib
9c11c6af2b0ac713ddcd950123d1db3b17515efa
[ "MIT" ]
null
null
null
cloudpathlib/s3/s3client.py
ElucidataInc/cloudpathlib
9c11c6af2b0ac713ddcd950123d1db3b17515efa
[ "MIT" ]
null
null
null
import os from pathlib import Path, PurePosixPath from typing import Any, Dict, Iterable, Optional, Union from ..client import Client, register_client_class from ..cloudpath import implementation_registry from .s3path import S3Path try: from boto3.session import Session from boto3.s3.transfer import Transfer...
42.047244
139
0.61264
import os from pathlib import Path, PurePosixPath from typing import Any, Dict, Iterable, Optional, Union from ..client import Client, register_client_class from ..cloudpath import implementation_registry from .s3path import S3Path try: from boto3.session import Session from boto3.s3.transfer import Transfer...
true
true
f736ce1759f8b8e50d2262ffb1bb2caacf4afcc4
276
py
Python
emailhub/backends/smtp.py
h3/django-emailhub
a618256096b3faa55479c46b6313861cfd898a9f
[ "MIT" ]
null
null
null
emailhub/backends/smtp.py
h3/django-emailhub
a618256096b3faa55479c46b6313861cfd898a9f
[ "MIT" ]
null
null
null
emailhub/backends/smtp.py
h3/django-emailhub
a618256096b3faa55479c46b6313861cfd898a9f
[ "MIT" ]
null
null
null
from django.core.mail.backends.smtp import SMTPEmailBackend from emailhub.utils.email import process_outgoing_email class EmailBackend(SMTPEmailBackend): def _send(self, message): process_outgoing_email(message) super(EmailBackend, self)._send(message)
27.6
59
0.782609
from django.core.mail.backends.smtp import SMTPEmailBackend from emailhub.utils.email import process_outgoing_email class EmailBackend(SMTPEmailBackend): def _send(self, message): process_outgoing_email(message) super(EmailBackend, self)._send(message)
true
true
f736ce4d698e7428c6ecb081ca7d309648cc2aa3
5,434
py
Python
dev_test_cex_full_non_stop.py
Bosma/unicorn-binance-websocket-api
e8bfe08125ff0afb8f780c3970a6ba6ec6ba6c54
[ "MIT" ]
null
null
null
dev_test_cex_full_non_stop.py
Bosma/unicorn-binance-websocket-api
e8bfe08125ff0afb8f780c3970a6ba6ec6ba6c54
[ "MIT" ]
null
null
null
dev_test_cex_full_non_stop.py
Bosma/unicorn-binance-websocket-api
e8bfe08125ff0afb8f780c3970a6ba6ec6ba6c54
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # File: dev_test_cex_full_non_stop.py # # Part of ‘UNICORN Binance WebSocket API’ # Project website: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api # Documentation: https://oliver-zehentleitner.github.io/unicorn-binance-websocket-api # PyPI: https:...
42.124031
118
0.698197
from unicorn_binance_websocket_api.unicorn_binance_websocket_api_manager import BinanceWebSocketApiManager import logging import math import os import requests import sys import time import threading try: from binance.client import Client except ImportError: print("Please ins...
true
true
f736ce7112493f04302c25a6d3cf1105623bba16
5,028
py
Python
Python/empire/structs/_struct_util.py
Tombmyst/Empire
f28782787c5fa9127e353549b73ec90d3c82c003
[ "Apache-2.0" ]
null
null
null
Python/empire/structs/_struct_util.py
Tombmyst/Empire
f28782787c5fa9127e353549b73ec90d3c82c003
[ "Apache-2.0" ]
null
null
null
Python/empire/structs/_struct_util.py
Tombmyst/Empire
f28782787c5fa9127e353549b73ec90d3c82c003
[ "Apache-2.0" ]
null
null
null
from empire import * from empire.strings.casing import * from empire.structs.abstract_struct import AbstractStruct from empire.structs.struct_serializable import StructSerializable from empire.util.log import * from collections import OrderedDict from fuzzywuzzy import fuzz class Assignment: @staticmethod de...
44.892857
181
0.655529
from empire import * from empire.strings.casing import * from empire.structs.abstract_struct import AbstractStruct from empire.structs.struct_serializable import StructSerializable from empire.util.log import * from collections import OrderedDict from fuzzywuzzy import fuzz class Assignment: @staticmethod de...
true
true
f736ceb3ead779a6e9d124918d709c125750bfce
7,107
py
Python
examples/run_time_series_prediction_example.py
ohtu-projekti-dataproblemsemulator/dataproblemsemulator
58170716b44c4e4dee639451977f352b3c68053c
[ "MIT" ]
2
2019-12-13T09:58:49.000Z
2020-02-10T10:37:17.000Z
examples/run_time_series_prediction_example.py
ohtu-projekti-dataproblemsemulator/dataproblemsemulator
58170716b44c4e4dee639451977f352b3c68053c
[ "MIT" ]
199
2019-05-19T17:48:39.000Z
2022-03-11T23:56:15.000Z
examples/run_time_series_prediction_example.py
thalvari/dpEmu-AutoML
b24eac686fae4147264c1ccc8169fd96b1875577
[ "MIT" ]
5
2019-10-02T23:14:05.000Z
2020-05-28T16:23:22.000Z
# MIT License # # Copyright (c) 2019 Tuomas Halvari, Juha Harviainen, Juha Mylläri, Antti Röyskö, Juuso Silvennoinen # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inc...
36.823834
118
0.693964
import random as rn import sys from math import sqrt import matplotlib.pyplot as plt import numpy as np import pandas as pd import tensorflow as tf from keras import backend from keras.layers import Dense from keras.layers import LSTM from keras.models import Sequential from sklearn.metrics impor...
true
true
f736ced9fe989d1f7a96d0a6e6b7572447a7fcad
1,004
py
Python
setup.py
aws-samples/monorepo-multi-pipeline-trigger
a1997ebdcb1151930017115f6fe5049e7912b747
[ "MIT-0" ]
4
2022-02-02T23:27:41.000Z
2022-02-25T10:18:32.000Z
setup.py
aws-samples/monorepo-multi-pipeline-trigger
a1997ebdcb1151930017115f6fe5049e7912b747
[ "MIT-0" ]
null
null
null
setup.py
aws-samples/monorepo-multi-pipeline-trigger
a1997ebdcb1151930017115f6fe5049e7912b747
[ "MIT-0" ]
null
null
null
import setuptools with open("README.md") as fp: long_description = fp.read() setuptools.setup( name="monorepo_codepipeline_trigger", version="0.0.1", description="An empty CDK Python app", long_description=long_description, long_description_content_type="text/markdown", author="author"...
22.818182
77
0.614542
import setuptools with open("README.md") as fp: long_description = fp.read() setuptools.setup( name="monorepo_codepipeline_trigger", version="0.0.1", description="An empty CDK Python app", long_description=long_description, long_description_content_type="text/markdown", author="author"...
true
true
f736cf726afef35131e4d0be105fa63ba0439d19
735
py
Python
gurobi/examples_from_gurobi/tune.py
cdeil/python-discrete-optimization-examples
34e97ee221a6e431e9885609817e10b6f07284b3
[ "MIT" ]
6
2020-04-09T21:56:09.000Z
2021-02-25T02:57:33.000Z
gurobi/examples_from_gurobi/tune.py
cdeil/python-discrete-optimization-examples
34e97ee221a6e431e9885609817e10b6f07284b3
[ "MIT" ]
1
2020-04-10T13:02:02.000Z
2020-04-10T15:27:17.000Z
gurobi/examples_from_gurobi/tune.py
cdeil/python-discrete-optimization-examples
34e97ee221a6e431e9885609817e10b6f07284b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3.7 # Copyright 2020, Gurobi Optimization, LLC # This example reads a model from a file and tunes it. # It then writes the best parameter settings to a file # and solves the model using these parameters. import sys import gurobipy as gp if len(sys.argv) < 2: print('Usage: tune.py filenam...
21
55
0.708844
import sys import gurobipy as gp if len(sys.argv) < 2: print('Usage: tune.py filename') sys.exit(0) model = gp.read(sys.argv[1]) model.Params.tuneResults = 1 model.tune() if model.tuneResultCount > 0: model.getTuneResult(0) model.write('tune.prm') model.optimize()
true
true
f736d124d90b215faa2ede1c2ae8f98d471eec64
3,345
py
Python
aliyun-python-sdk-mts/aliyunsdkmts/request/v20140618/UpdateTemplateRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-mts/aliyunsdkmts/request/v20140618/UpdateTemplateRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-mts/aliyunsdkmts/request/v20140618/UpdateTemplateRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37.58427
74
0.750374
from aliyunsdkcore.request import RpcRequest from aliyunsdkmts.endpoint import endpoint_data class UpdateTemplateRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Mts', '2014-06-18', 'UpdateTemplate','mts') self.set_method('POST') if hasattr(self, "endpoint_map"): set...
true
true
f736d1a0133b765be2d913c5a9cd2625d47b2fb3
8,771
py
Python
cs15211/KClosestPointstoOrigin.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
1
2021-07-05T01:53:30.000Z
2021-07-05T01:53:30.000Z
cs15211/KClosestPointstoOrigin.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
null
null
null
cs15211/KClosestPointstoOrigin.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
1
2018-01-08T07:14:08.000Z
2018-01-08T07:14:08.000Z
__source__ = 'https://leetcode.com/problems/k-closest-points-to-origin/' # Time: O(NLogN ~ N) # Space: O(N) # # Quick Select: K-problem # Description: Leetcode # 973. K Closest Points to Origin # # We have a list of points on the plane. Find the K closest points to the origin (0, 0). # # (Here, the distance between t...
34.944223
126
0.588416
__source__ = 'https://leetcode.com/problems/k-closest-points-to-origin/' port unittest import random class Solution(object): def kClosest(self, points, K): dist = lambda i: points[i][0]**2 + points[i][1]**2 def work(i, j, K): if i >= j: return oi, oj = i, j ...
true
true
f736d1d8cec2bc49af25e8390134efa91fea5bf9
3,697
py
Python
source/lambda/firehose_topic_proxy/util/topic.py
knihit/discovering-hot-topics-using-machine-learning
a7d2d87bedee54d18d6885d472f758b0bacf9db8
[ "Apache-2.0" ]
null
null
null
source/lambda/firehose_topic_proxy/util/topic.py
knihit/discovering-hot-topics-using-machine-learning
a7d2d87bedee54d18d6885d472f758b0bacf9db8
[ "Apache-2.0" ]
21
2021-07-22T19:02:25.000Z
2022-02-14T16:28:18.000Z
source/lambda/firehose_topic_proxy/util/topic.py
aassadza-org/discovering-hot-topics-using-machine-learning
ef5f9d00a14b6b2024c9e0f9dfb915a6e632074d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ###################################################################################################################### # Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
46.797468
118
0.405193
true
true
f736d2cbdf4c94f525c81c718dfe17e93e92f782
2,297
py
Python
examples/python/gp2y0a.py
whpenner/upm
3168c61d8613da62ecc7598517a1decf533d5fe7
[ "MIT" ]
1
2017-09-22T01:41:30.000Z
2017-09-22T01:41:30.000Z
bsp/intel/peripheral/libupm/examples/python/gp2y0a.py
Keneral/ahardware
9a8a025f7c9471444c9e271bbe7f48182741d710
[ "Unlicense" ]
null
null
null
bsp/intel/peripheral/libupm/examples/python/gp2y0a.py
Keneral/ahardware
9a8a025f7c9471444c9e271bbe7f48182741d710
[ "Unlicense" ]
1
2018-02-24T19:09:04.000Z
2018-02-24T19:09:04.000Z
#!/usr/bin/python # Author: Zion Orent <zorent@ics.com> # Copyright (c) 2015 Intel Corporation. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limi...
36.460317
78
0.765346
import time, sys, signal, atexit import pyupm_gp2y0a as upmGp2y0a myIRProximity = upmGp2y0a.GP2Y0A(1) ignum, frame): raise SystemExit def exitHandler(): print "Exiting" sys.exit(0) atexit.register(exitHandler) signal.signal(signal.SIGINT, SIGINTHandler) GP2Y0A_AREF = 5.0; SAMPLE...
false
true
f736d37413434b6c7e43bb19558ae19a7db09c56
5,914
py
Python
pyslet/qtiv1/assessment.py
cidermole/pyslet
b30e9a439f6c0f0e2d01f1ac80986944bed7427b
[ "BSD-3-Clause" ]
62
2015-02-05T19:51:16.000Z
2022-03-17T22:36:39.000Z
pyslet/qtiv1/assessment.py
cidermole/pyslet
b30e9a439f6c0f0e2d01f1ac80986944bed7427b
[ "BSD-3-Clause" ]
64
2015-01-04T15:43:28.000Z
2022-02-22T08:54:20.000Z
pyslet/qtiv1/assessment.py
cidermole/pyslet
b30e9a439f6c0f0e2d01f1ac80986944bed7427b
[ "BSD-3-Clause" ]
39
2015-10-24T08:31:38.000Z
2021-11-01T19:50:13.000Z
#! /usr/bin/env python import itertools from . import common from . import core from ..xml import structures as xml class Assessment(common.QTICommentContainer): """The Assessment data structure is used to contain the exchange of test data structures. It will always contain at least one Section and may ...
36.732919
78
0.596212
import itertools from . import common from . import core from ..xml import structures as xml class Assessment(common.QTICommentContainer): XMLNAME = "assessment" XMLATTR_ident = 'ident' XMLATTR_title = 'title' XMLCONTENT = xml.ElementContent def __init__(self, parent): common.QTIComme...
true
true
f736d450e7abb7fcaf2575338ff93dd8b19da9aa
2,209
py
Python
tests/components/input_number/test_recorder.py
mib1185/core
b17d4ac65cde9a27ff6032d70b148792e5eba8df
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/input_number/test_recorder.py
mib1185/core
b17d4ac65cde9a27ff6032d70b148792e5eba8df
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/input_number/test_recorder.py
mib1185/core
b17d4ac65cde9a27ff6032d70b148792e5eba8df
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""The tests for recorder platform.""" from __future__ import annotations from datetime import timedelta from homeassistant.components.input_number import ( ATTR_MAX, ATTR_MIN, ATTR_MODE, ATTR_STEP, DOMAIN, ) from homeassistant.components.recorder.db_schema import StateAttributes, States from home...
36.213115
88
0.738796
from __future__ import annotations from datetime import timedelta from homeassistant.components.input_number import ( ATTR_MAX, ATTR_MIN, ATTR_MODE, ATTR_STEP, DOMAIN, ) from homeassistant.components.recorder.db_schema import StateAttributes, States from homeassistant.components.recorder.util impo...
true
true
f736d6621e8e5e359af4649892dc9ba5ec8c8b04
15,463
py
Python
gestion/models.py
nanoy42/coope
3f970fe199f4ad8672cbb3a3200b0c4d110c9847
[ "MIT" ]
3
2019-06-27T21:08:41.000Z
2019-09-07T17:20:39.000Z
gestion/models.py
nanoy42/coope
3f970fe199f4ad8672cbb3a3200b0c4d110c9847
[ "MIT" ]
21
2019-06-09T10:56:53.000Z
2021-06-10T21:35:12.000Z
gestion/models.py
nanoy42/coope
3f970fe199f4ad8672cbb3a3200b0c4d110c9847
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User from simple_history.models import HistoricalRecords from django.core.validators import MinValueValidator from preferences.models import PaymentMethod from django.core.exceptions import ValidationError class Category(models.Model): """ A p...
33.688453
144
0.65466
from django.db import models from django.contrib.auth.models import User from simple_history.models import HistoricalRecords from django.core.validators import MinValueValidator from preferences.models import PaymentMethod from django.core.exceptions import ValidationError class Category(models.Model): class Meta:...
true
true
f736d6f5ee422b782da9d1678bdfa6988a5e901a
7,639
py
Python
Dome9-SG-LookUp/SGAnalyzerAppDir/SGAnalyzerApp/SGAnalyzerApp.py
ntnshrm87/Dome9SGAnalyzerApp
29b6ac41bd073f727bc81cd4ea3aeeaf0d5f9c14
[ "MIT" ]
null
null
null
Dome9-SG-LookUp/SGAnalyzerAppDir/SGAnalyzerApp/SGAnalyzerApp.py
ntnshrm87/Dome9SGAnalyzerApp
29b6ac41bd073f727bc81cd4ea3aeeaf0d5f9c14
[ "MIT" ]
null
null
null
Dome9-SG-LookUp/SGAnalyzerAppDir/SGAnalyzerApp/SGAnalyzerApp.py
ntnshrm87/Dome9SGAnalyzerApp
29b6ac41bd073f727bc81cd4ea3aeeaf0d5f9c14
[ "MIT" ]
null
null
null
# SGAnalyzerApp - gui # importing modules required to run from tkinter import * import json import time from SGAnalyzerAppDir.SGAnalyzerApp import Dome9SG def app(): # creating root object root = Tk() root.geometry("840x270") root.title("Dome9-SG-LookUp") root.resizable(0, 0) Tops = Frame...
39.174359
118
0.57429
from tkinter import * import json import time from SGAnalyzerAppDir.SGAnalyzerApp import Dome9SG def app(): root = Tk() root.geometry("840x270") root.title("Dome9-SG-LookUp") root.resizable(0, 0) Tops = Frame(root, width=180, relief=RIDGE) Tops.pack(side=TOP) f1 = Frame(root, ...
true
true
f736d90d0be426c4a74dfddcc419aa32132a7458
1,288
py
Python
train.py
DipeshAggarwal/wgan-gp-keras
7a70192cdd26726ee981107299a7fa6e21cbe84b
[ "Unlicense" ]
null
null
null
train.py
DipeshAggarwal/wgan-gp-keras
7a70192cdd26726ee981107299a7fa6e21cbe84b
[ "Unlicense" ]
null
null
null
train.py
DipeshAggarwal/wgan-gp-keras
7a70192cdd26726ee981107299a7fa6e21cbe84b
[ "Unlicense" ]
null
null
null
from core.loss import d_wasserstein_loss from core.loss import g_wasserstein_loss from core.nn.conv.wgan import generator from core.nn.conv.wgan import critic from core.callbacks import GANMonitor from core.model import WGAN_GP import tensorflow as tf import numpy as np import config train_images = tf.keras.utils.ima...
37.882353
125
0.801242
from core.loss import d_wasserstein_loss from core.loss import g_wasserstein_loss from core.nn.conv.wgan import generator from core.nn.conv.wgan import critic from core.callbacks import GANMonitor from core.model import WGAN_GP import tensorflow as tf import numpy as np import config train_images = tf.keras.utils.ima...
true
true
f736da03f6e8b422ea606c28b9e083ff524e8b8d
10,961
py
Python
python_dashboard/caf_opendata_dictionnary_mapping.py
sduprey/open_data_platform
a20b5ab6a1ca99ae8aef11ac74a314114144d291
[ "MIT" ]
2
2019-12-03T13:35:31.000Z
2019-12-03T13:35:37.000Z
python_dashboard/caf_opendata_dictionnary_mapping.py
sduprey/open_data_platform
a20b5ab6a1ca99ae8aef11ac74a314114144d291
[ "MIT" ]
null
null
null
python_dashboard/caf_opendata_dictionnary_mapping.py
sduprey/open_data_platform
a20b5ab6a1ca99ae8aef11ac74a314114144d291
[ "MIT" ]
null
null
null
#CAF,INDICATEUR SUR LA PART DES PRESTATIONS DANS LES RESSOURCES DES FOYERS ALLOCATAIRES PAR COMMUNE, #DependancePrestaCom,http://data.caf.fr/dataset/indicateur-sur-la-part-des-prestations-dans-les-ressources-des-foyers-allocataires-par-commune #CAF,BENEFICIAIRES BAS REVENUS, #BasrevnuCom,http://data.caf.fr/dataset/ben...
74.564626
142
0.801204
#TrancheAge,http://data.caf.fr/dataset/denombrement-et-repartition-des-foyers-allocataires-selon-l-age-du-responsable #CAF,POPULATION DES FOYERS ALLOCATAIRES PERCEVANT UNE AIDE PERSONNELLE AU LOGEMENT, #LOGCom,http://data.caf.fr/dataset/population-des-foyers-allocataires-percevant-une-aide-personnelle-au...
true
true
f736da1803f1d6c5b5da0b027eb1a91f5e27d665
2,509
py
Python
cathie/cats_api.py
TCKACHIKSIS/lms
fd06eb7a2baa9b9f82caa5223c86ba500f88333c
[ "MIT" ]
null
null
null
cathie/cats_api.py
TCKACHIKSIS/lms
fd06eb7a2baa9b9f82caa5223c86ba500f88333c
[ "MIT" ]
null
null
null
cathie/cats_api.py
TCKACHIKSIS/lms
fd06eb7a2baa9b9f82caa5223c86ba500f88333c
[ "MIT" ]
null
null
null
import json import re import requests from django.conf import settings from cathie.exceptions import CatsAnswerCodeException from cathie import authorization def cats_check_status(): pass @authorization.check_authorization_for_cats def cats_submit_solution(source_text: str, problem_id: int, de_id: int, source...
31.3625
89
0.684735
import json import re import requests from django.conf import settings from cathie.exceptions import CatsAnswerCodeException from cathie import authorization def cats_check_status(): pass @authorization.check_authorization_for_cats def cats_submit_solution(source_text: str, problem_id: int, de_id: int, source...
true
true
f736dae54d5aaeaefd56b48142b4b2779bd4a08e
4,984
py
Python
flipbook/go_game.py
fritzo/art
a4d63185bd5f30e81e05e21ffff83d657170b5e2
[ "MIT" ]
null
null
null
flipbook/go_game.py
fritzo/art
a4d63185bd5f30e81e05e21ffff83d657170b5e2
[ "MIT" ]
null
null
null
flipbook/go_game.py
fritzo/art
a4d63185bd5f30e81e05e21ffff83d657170b5e2
[ "MIT" ]
null
null
null
from exceptions import * from pyx import * import random from sets import Set Set.__add__ = Set.__or__ Set.__iadd__ = Set.__ior__ #==========[ go board ]========== def areSequential(i1, i2): return abs(i1-i2) <= 1 def areConnected(pos1, pos2): return areSequential(pos1[0], pos2[0]) or areSequential(pos1[1], pos...
30.024096
75
0.567616
from exceptions import * from pyx import * import random from sets import Set Set.__add__ = Set.__or__ Set.__iadd__ = Set.__ior__ def areSequential(i1, i2): return abs(i1-i2) <= 1 def areConnected(pos1, pos2): return areSequential(pos1[0], pos2[0]) or areSequential(pos1[1], pos2[1]) dotPositions = { 19:sum(...
false
true
f736daf5a4ce1a12769452079bb4c85885389586
4,176
py
Python
python/object_generator.py
matteovol/Cool-features
ca9969e23ba9bcc9a68cae64770cff90532d2368
[ "MIT" ]
2
2020-02-05T09:36:43.000Z
2020-02-05T09:52:20.000Z
python/object_generator.py
matteovol/Cool-features
ca9969e23ba9bcc9a68cae64770cff90532d2368
[ "MIT" ]
null
null
null
python/object_generator.py
matteovol/Cool-features
ca9969e23ba9bcc9a68cae64770cff90532d2368
[ "MIT" ]
null
null
null
#!/usr/bin/env python from argparse import ArgumentParser from os import path, listdir, stat from os.path import isfile, join from time import sleep import subprocess import threading class Shell(): def __init__(self, objFolder, name, link): self.__objFolder = objFolder self.__name = name ...
29.828571
141
0.54909
from argparse import ArgumentParser from os import path, listdir, stat from os.path import isfile, join from time import sleep import subprocess import threading class Shell(): def __init__(self, objFolder, name, link): self.__objFolder = objFolder self.__name = name self.__link = link ...
true
true
f736db9961a6cd142b3495a9b8d293727ac74e18
2,955
py
Python
tests/test_write_metrics_reports.py
dylanbuchi/MONAI
1651f1b003b0ffae8b615d191952ad65ad091277
[ "Apache-2.0" ]
2,971
2019-10-16T23:53:16.000Z
2022-03-31T20:58:24.000Z
tests/test_write_metrics_reports.py
dylanbuchi/MONAI
1651f1b003b0ffae8b615d191952ad65ad091277
[ "Apache-2.0" ]
2,851
2020-01-10T16:23:44.000Z
2022-03-31T22:14:53.000Z
tests/test_write_metrics_reports.py
dylanbuchi/MONAI
1651f1b003b0ffae8b615d191952ad65ad091277
[ "Apache-2.0" ]
614
2020-01-14T19:18:01.000Z
2022-03-31T14:06:14.000Z
# Copyright 2020 - 2021 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in wri...
45.461538
118
0.589848
import csv import os import tempfile import unittest import torch from monai.handlers.utils import write_metrics_reports class TestWriteMetricsReports(unittest.TestCase): def test_content(self): with tempfile.TemporaryDirectory() as tempdir: write_metrics_reports( ...
true
true
f736dbd7d95de4c652c34910da36f5ef978e97aa
1,608
py
Python
qlib/tests/__init__.py
guoqianyou/qlib
184ce34a347123bf2cdd0bb48e2e110df9fe2722
[ "MIT" ]
null
null
null
qlib/tests/__init__.py
guoqianyou/qlib
184ce34a347123bf2cdd0bb48e2e110df9fe2722
[ "MIT" ]
null
null
null
qlib/tests/__init__.py
guoqianyou/qlib
184ce34a347123bf2cdd0bb48e2e110df9fe2722
[ "MIT" ]
null
null
null
import unittest from .data import GetData from .. import init from ..constant import REG_CN class TestAutoData(unittest.TestCase): _setup_kwargs = {} provider_uri = "~/.qlib/qlib_data/cn_data_simple" # target_dir provider_uri_1day = "~/.qlib/qlib_data/cn_data" # target_dir provider_uri_1min = "~/.q...
29.777778
83
0.58209
import unittest from .data import GetData from .. import init from ..constant import REG_CN class TestAutoData(unittest.TestCase): _setup_kwargs = {} provider_uri = "~/.qlib/qlib_data/cn_data_simple" provider_uri_1day = "~/.qlib/qlib_data/cn_data" provider_uri_1min = "~/.qlib/qlib_data/cn_data_1m...
true
true
f736dc5818b4fe79384dd209aeee90e8c93232f9
7,764
py
Python
indico/modules/events/surveys/forms.py
aiforrural/Digital-Events-Example
628aaa8727b259b9367ac0ae1c5ba8e9e95eca82
[ "MIT" ]
1
2021-02-08T09:34:27.000Z
2021-02-08T09:34:27.000Z
indico/modules/events/surveys/forms.py
pamirk/indico
c3b4e06b11cc21ad497f74d0b2ca901bc1b2a768
[ "MIT" ]
null
null
null
indico/modules/events/surveys/forms.py
pamirk/indico
c3b4e06b11cc21ad497f74d0b2ca901bc1b2a768
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import time from flask import request from markupsafe import escape from wtforms.fields imp...
57.511111
120
0.646316
from datetime import time from flask import request from markupsafe import escape from wtforms.fields import BooleanField, HiddenField, SelectField, StringField, TextAreaField from wtforms.fields.html5 import IntegerField from wtforms.validators import DataRequired, NumberRange, Optional from indico.core.db im...
true
true
f736dc6eda5cdf2f372f771c251bcac5aeaeded3
199
py
Python
tensorflow/compiler/xla/libceed/example_program.py
DiffeoInvariant/tensorflow
9ba7472c978176cba92dde8bf4d96434536c645c
[ "Apache-2.0" ]
null
null
null
tensorflow/compiler/xla/libceed/example_program.py
DiffeoInvariant/tensorflow
9ba7472c978176cba92dde8bf4d96434536c645c
[ "Apache-2.0" ]
null
null
null
tensorflow/compiler/xla/libceed/example_program.py
DiffeoInvariant/tensorflow
9ba7472c978176cba92dde8bf4d96434536c645c
[ "Apache-2.0" ]
null
null
null
from jax import numpy as jnp import jax def cr_fn(x, y): return x @ x + y * y cr_jac = jax.jacfwd(cr_fn, argnums=(0, 1)) cr_jac(jnp.eye(3), jnp.eye(3)) def cr_j(x, y): return cr_jac(x, y)
16.583333
42
0.623116
from jax import numpy as jnp import jax def cr_fn(x, y): return x @ x + y * y cr_jac = jax.jacfwd(cr_fn, argnums=(0, 1)) cr_jac(jnp.eye(3), jnp.eye(3)) def cr_j(x, y): return cr_jac(x, y)
true
true
f736dc96e0e4f7315128230d31d8082642034b93
909
py
Python
tests/__init__.py
Klaws--/pronounceable
c59fd0f6b392f40df68089628740f2edc418bad2
[ "MIT" ]
6
2019-02-20T04:46:04.000Z
2021-07-26T09:23:08.000Z
tests/__init__.py
Klaws--/pronounceable
c59fd0f6b392f40df68089628740f2edc418bad2
[ "MIT" ]
1
2020-06-01T09:57:05.000Z
2020-06-01T09:57:05.000Z
tests/__init__.py
Klaws--/pronounceable
c59fd0f6b392f40df68089628740f2edc418bad2
[ "MIT" ]
3
2020-06-19T09:32:22.000Z
2021-09-09T21:18:18.000Z
from time import time from functools import partial def timeit(func, validator=lambda x: True, rep=50): time_record = [] i = 0 try: for i in range(rep): print('Running test {} of {}'.format(i+1, rep)) start = time() x = func() if validator(x): ...
28.40625
69
0.555556
from time import time from functools import partial def timeit(func, validator=lambda x: True, rep=50): time_record = [] i = 0 try: for i in range(rep): print('Running test {} of {}'.format(i+1, rep)) start = time() x = func() if validator(x): ...
true
true
f736dcfd7ba967cf20f05b86d3bb8a89c6d03cee
1,303
py
Python
atest/genrunner.py
Senseg/robotframework
55ccb7db129a8929777df5b29c915b5e4d9899cf
[ "ECL-2.0", "Apache-2.0" ]
4
2016-02-29T17:00:24.000Z
2019-06-27T08:49:13.000Z
atest/genrunner.py
Senseg/robotframework
55ccb7db129a8929777df5b29c915b5e4d9899cf
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
atest/genrunner.py
Senseg/robotframework
55ccb7db129a8929777df5b29c915b5e4d9899cf
[ "ECL-2.0", "Apache-2.0" ]
2
2017-10-30T06:34:47.000Z
2019-03-12T07:23:08.000Z
#!/usr/bin/env python """Script to generate atest runners based on data files. Usage: %s path/to/data.file """ from __future__ import with_statement from os.path import abspath, basename, dirname, exists, join import os import sys if len(sys.argv) != 2: print __doc__ % basename(sys.argv[0]) sys.exit(1) IN...
26.591837
78
0.607828
"""Script to generate atest runners based on data files. Usage: %s path/to/data.file """ from __future__ import with_statement from os.path import abspath, basename, dirname, exists, join import os import sys if len(sys.argv) != 2: print __doc__ % basename(sys.argv[0]) sys.exit(1) INPATH = abspath(sys.ar...
false
true
f736dd047f681606305f1e14dd89e2e3cc8192ff
2,141
py
Python
users/migrations/0001_initial.py
Surveyor-Jr/zimaps
d4def072b50c7018e9f7800a36c2050f28791cc2
[ "CC-BY-4.0" ]
null
null
null
users/migrations/0001_initial.py
Surveyor-Jr/zimaps
d4def072b50c7018e9f7800a36c2050f28791cc2
[ "CC-BY-4.0" ]
null
null
null
users/migrations/0001_initial.py
Surveyor-Jr/zimaps
d4def072b50c7018e9f7800a36c2050f28791cc2
[ "CC-BY-4.0" ]
null
null
null
# Generated by Django 3.1.6 on 2021-02-23 17:50 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
61.171429
215
0.663241
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
f736dd7b4f444de8ee37a4d4038f6af0457bba19
1,629
py
Python
Linguaggio Python/03 - Strutture Dati/b_list_comprehension.py
anhelus/informatica-dm-uniba-ex
5d67cdd3c7c8b8955723f1787e26637d59358daa
[ "MIT" ]
null
null
null
Linguaggio Python/03 - Strutture Dati/b_list_comprehension.py
anhelus/informatica-dm-uniba-ex
5d67cdd3c7c8b8955723f1787e26637d59358daa
[ "MIT" ]
null
null
null
Linguaggio Python/03 - Strutture Dati/b_list_comprehension.py
anhelus/informatica-dm-uniba-ex
5d67cdd3c7c8b8955723f1787e26637d59358daa
[ "MIT" ]
null
null
null
def estrai_classico(lista, lettera): output = [] for l in lista: if l[0] == lettera: output.append(l) return output def quadrati(val_massimo): output = [] for v in range(val_massimo): output.append(v ** 2) return output def quadrato(numero): return numero ** 2 def costruisci_pari(i): return "{} è p...
33.244898
114
0.683855
def estrai_classico(lista, lettera): output = [] for l in lista: if l[0] == lettera: output.append(l) return output def quadrati(val_massimo): output = [] for v in range(val_massimo): output.append(v ** 2) return output def quadrato(numero): return numero ** 2 def costruisci_pari(i): return "{} è p...
true
true
f736dd7bf6aba110680f6c323784ae0f64055193
28,248
py
Python
ansible/library/kolla_docker.py
aliate/kolla-ansible
c93ec09dc7d31ecec74eedac493592a22ee395d2
[ "Apache-2.0" ]
2
2020-12-20T01:17:48.000Z
2021-01-02T15:06:19.000Z
ansible/library/kolla_docker.py
aliate/kolla-ansible
c93ec09dc7d31ecec74eedac493592a22ee395d2
[ "Apache-2.0" ]
null
null
null
ansible/library/kolla_docker.py
aliate/kolla-ansible
c93ec09dc7d31ecec74eedac493592a22ee395d2
[ "Apache-2.0" ]
2
2020-08-28T19:08:16.000Z
2021-01-02T15:06:21.000Z
#!/usr/bin/env python # Copyright 2015 Sam Yaple # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
33.708831
79
0.574448
DOCUMENTATION = ''' --- module: kolla_docker short_description: Module for controlling Docker description: - A module targeting at controlling Docker as used by Kolla. options: common_options: description: - A dict containing common params such as login info required: False type...
true
true
f736ddb5af589c7e9907ddc383214ea30188f1df
1,492
py
Python
refinery/units/formats/xml.py
bronxc/refinery
9448facf48a0008f27861dd1a5ee8f5218e6bb86
[ "BSD-3-Clause" ]
null
null
null
refinery/units/formats/xml.py
bronxc/refinery
9448facf48a0008f27861dd1a5ee8f5218e6bb86
[ "BSD-3-Clause" ]
null
null
null
refinery/units/formats/xml.py
bronxc/refinery
9448facf48a0008f27861dd1a5ee8f5218e6bb86
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from collections import defaultdict from refinery.lib.structures import MemoryFile from refinery.lib import xml from refinery.units.sinks.ppxml import ppxml from refinery.units.formats import PathExtractorUnit, UnpackResult class xtxml(PathExtractorUnit): ...
38.25641
77
0.569035
from collections import defaultdict from refinery.lib.structures import MemoryFile from refinery.lib import xml from refinery.units.sinks.ppxml import ppxml from refinery.units.formats import PathExtractorUnit, UnpackResult class xtxml(PathExtractorUnit): _strict_path_matching = True def unpack...
true
true
f736ded3c5229af4007f2fc775635fd77c17beaa
662
py
Python
tmc/queries/q_get_adversaries_x_industry.py
fierytermite/tmc
fde0d09e5a9566042fdfa56585f04c073104ad1b
[ "Unlicense" ]
17
2020-12-11T18:18:57.000Z
2022-03-22T23:04:26.000Z
tmc/queries/q_get_adversaries_x_industry.py
fierytermite/tmc
fde0d09e5a9566042fdfa56585f04c073104ad1b
[ "Unlicense" ]
16
2020-07-23T05:13:45.000Z
2021-08-10T00:13:39.000Z
tmc/queries/q_get_adversaries_x_industry.py
fierytermite/tmc
fde0d09e5a9566042fdfa56585f04c073104ad1b
[ "Unlicense" ]
2
2020-12-11T18:09:14.000Z
2022-03-22T23:04:30.000Z
from flask import ( g, redirect, url_for ) from tmc.db import get_db, make_dicts # Get list of all adversaries per industry available in the database. def get_adversaries_x_industry(): db = get_db() try: db.row_factory = make_dicts #db.row_factory = lambda cursor, row: {row: row[0]} qu...
41.375
182
0.700906
from flask import ( g, redirect, url_for ) from tmc.db import get_db, make_dicts def get_adversaries_x_industry(): db = get_db() try: db.row_factory = make_dicts query = db.execute( 'SELECT adversary_id as ID, adversary_name as Name, adversary_identifiers as Identifiers, ...
true
true
f736defdb74f74e4c79404d083e37c6c2a3e9141
9,945
py
Python
lineFollowerArucoROS-checkpoint3.py
SR42-dev/line-following-robot-with-aruco-markers-obstacle-detection-and-turtlesim-publisher
d7dae86a4f1fdc56ab80193c218e25243e44e487
[ "CC0-1.0" ]
null
null
null
lineFollowerArucoROS-checkpoint3.py
SR42-dev/line-following-robot-with-aruco-markers-obstacle-detection-and-turtlesim-publisher
d7dae86a4f1fdc56ab80193c218e25243e44e487
[ "CC0-1.0" ]
null
null
null
lineFollowerArucoROS-checkpoint3.py
SR42-dev/line-following-robot-with-aruco-markers-obstacle-detection-and-turtlesim-publisher
d7dae86a4f1fdc56ab80193c218e25243e44e487
[ "CC0-1.0" ]
null
null
null
import sys import cv2 import math import time import rospy import serial import argparse import numpy as np from std_srvs.srv import Empty from turtlesim.msg import Pose from geometry_msgs.msg import Twist # ROS movement global variables and function definitions x = 0 y = 0 z = 0 yaw = 0 def poseCal...
34.53125
109
0.583409
import sys import cv2 import math import time import rospy import serial import argparse import numpy as np from std_srvs.srv import Empty from turtlesim.msg import Pose from geometry_msgs.msg import Twist x = 0 y = 0 z = 0 yaw = 0 def poseCallback(pose_message): global x, y, z, yaw x = po...
true
true
f736df3039c7a5c7ccaaae53caf0915bb68e6580
5,910
py
Python
research/object_detection/core/anchor_generator.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
1
2021-05-17T01:42:29.000Z
2021-05-17T01:42:29.000Z
research/object_detection/core/anchor_generator.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
null
null
null
research/object_detection/core/anchor_generator.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.4
87
0.676481
from abc import ABCMeta from abc import abstractmethod import tensorflow as tf class AnchorGenerator(object): __metaclass__ = ABCMeta @abstractmethod def name_scope(self): pass @property def check_num_anchors(self): return True @abstractmethod def num_anc...
true
true
f736dfb2e85552b321403c961da517f3b3efb100
911
py
Python
python/paddle/v2/fluid/tests/test_uniform_random_op.py
QingshuChen/Paddle
25a92be3e123ed21fd98c7be6bd7e3a6320756a3
[ "Apache-2.0" ]
3
2018-04-16T23:35:32.000Z
2019-08-12T01:01:07.000Z
python/paddle/v2/fluid/tests/test_uniform_random_op.py
hero9968/PaddlePaddle-book
1ff47b284c565d030b198705d5f18b4bd4ce53e5
[ "Apache-2.0" ]
9
2017-09-13T07:39:31.000Z
2017-10-18T05:58:23.000Z
python/paddle/v2/fluid/tests/test_uniform_random_op.py
QingshuChen/Paddle
25a92be3e123ed21fd98c7be6bd7e3a6320756a3
[ "Apache-2.0" ]
2
2020-11-04T08:07:46.000Z
2020-11-06T08:33:24.000Z
import unittest from paddle.v2.fluid.op import Operator import paddle.v2.fluid.core as core import numpy class TestUniformRandomOp(unittest.TestCase): def test_uniform_random_cpu(self): self.uniform_random_test(place=core.CPUPlace()) def test_uniform_random_gpu(self): if core.is_compile_gpu()...
26.028571
62
0.618002
import unittest from paddle.v2.fluid.op import Operator import paddle.v2.fluid.core as core import numpy class TestUniformRandomOp(unittest.TestCase): def test_uniform_random_cpu(self): self.uniform_random_test(place=core.CPUPlace()) def test_uniform_random_gpu(self): if core.is_compile_gpu()...
true
true
f736e050724bace38a54890657f90152d38f8342
4,097
py
Python
open-hackathon-server/src/hackathon/views/api_schema.py
Fendoe/open-hackathon-o
39689ab7a9a4d41b6a2d35a61e28a022705c60b8
[ "MIT" ]
null
null
null
open-hackathon-server/src/hackathon/views/api_schema.py
Fendoe/open-hackathon-o
39689ab7a9a4d41b6a2d35a61e28a022705c60b8
[ "MIT" ]
null
null
null
open-hackathon-server/src/hackathon/views/api_schema.py
Fendoe/open-hackathon-o
39689ab7a9a4d41b6a2d35a61e28a022705c60b8
[ "MIT" ]
1
2019-04-03T19:47:22.000Z
2019-04-03T19:47:22.000Z
# -*- coding: utf-8 -*- """ Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd.  All rights reserved. The MIT License (MIT) 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...
40.166667
118
0.681474
""" Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd.  All rights reserved. The MIT License (MIT) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including wit...
false
true
f736e0ceb6108928fd6db088c5e192170fd909de
6,026
py
Python
build/lib/axehelper/axehelper_bkg.py
bkornpob/axehelper
d89407f73f92e140a5cc9a76c643b9a8656e8b0f
[ "MIT" ]
null
null
null
build/lib/axehelper/axehelper_bkg.py
bkornpob/axehelper
d89407f73f92e140a5cc9a76c643b9a8656e8b0f
[ "MIT" ]
null
null
null
build/lib/axehelper/axehelper_bkg.py
bkornpob/axehelper
d89407f73f92e140a5cc9a76c643b9a8656e8b0f
[ "MIT" ]
null
null
null
# Kornpob Bhirombhakdi import numpy as np import matplotlib.pyplot as plt import copy,glob,os from astropy.io import fits from math import pi class AXEhelper_BKG: def __init__(self,axeflist=None,fltflist=None, padxleft=5,padxright=5, padylow=10,halfdy=3,padyup=10, ...
35.656805
103
0.491371
import numpy as np import matplotlib.pyplot as plt import copy,glob,os from astropy.io import fits from math import pi class AXEhelper_BKG: def __init__(self,axeflist=None,fltflist=None, padxleft=5,padxright=5, padylow=10,halfdy=3,padyup=10, adjusty=1.2 ...
true
true
f736e0f8b35d46a91144a34fafd0d2244270bc45
4,330
py
Python
train.py
markytools/eeedeeplearning-finalProj
6a06d73091262fb996c990302692cff7d9eed3b1
[ "BSD-2-Clause" ]
null
null
null
train.py
markytools/eeedeeplearning-finalProj
6a06d73091262fb996c990302692cff7d9eed3b1
[ "BSD-2-Clause" ]
5
2021-03-19T00:52:48.000Z
2022-01-13T01:15:21.000Z
train.py
markytools/eeedeeplearning-finalProj
6a06d73091262fb996c990302692cff7d9eed3b1
[ "BSD-2-Clause" ]
null
null
null
import sys from optparse import OptionParser import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.nn.functional as F from torch import optim from torch.autograd import Variable from eval import eval_net from models.unet import UNet from utils import * def train_net(net, epochs=100, ba...
32.313433
136
0.555427
import sys from optparse import OptionParser import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.nn.functional as F from torch import optim from torch.autograd import Variable from eval import eval_net from models.unet import UNet from utils import * def train_net(net, epochs=100, ba...
true
true
f736e1baacc7a543fbd9d94caba50163109b9ccc
4,701
py
Python
api/programs/model.py
kacunningham413/PlasmoCount
0213c63add92c8df1a53526af394bc9692ca4a62
[ "BSD-3-Clause" ]
2
2021-02-26T01:32:31.000Z
2021-03-01T19:48:07.000Z
api/programs/model.py
kacunningham413/PlasmoCount
0213c63add92c8df1a53526af394bc9692ca4a62
[ "BSD-3-Clause" ]
5
2021-03-08T21:13:30.000Z
2021-04-27T20:16:07.000Z
api/programs/model.py
kacunningham413/PlasmoCount
0213c63add92c8df1a53526af394bc9692ca4a62
[ "BSD-3-Clause" ]
5
2021-03-08T21:31:54.000Z
2021-11-16T10:27:43.000Z
from pathlib import Path import pandas as pd from PIL import Image as PILImage import torch from torchvision import transforms, ops from fastai.basic_train import load_learner from fastai.vision import Image from fastai.core import FloatItem import matplotlib.pyplot as plt from scipy import stats class Model: def...
38.219512
77
0.55201
from pathlib import Path import pandas as pd from PIL import Image as PILImage import torch from torchvision import transforms, ops from fastai.basic_train import load_learner from fastai.vision import Image from fastai.core import FloatItem import matplotlib.pyplot as plt from scipy import stats class Model: def...
true
true
f736e1eac82af52cacebbc9e9fe706f8dec0f9b4
1,254
py
Python
Admin-Scripts/Video4.py
vijayshankarrealdeal/Java
2dff1a79c91782bf2aeb1bee057b19c41cafd2a1
[ "MIT" ]
3
2021-03-07T16:29:35.000Z
2021-03-22T07:41:04.000Z
Admin-Scripts/Video4.py
vijayshankarrealdeal/Java
2dff1a79c91782bf2aeb1bee057b19c41cafd2a1
[ "MIT" ]
null
null
null
Admin-Scripts/Video4.py
vijayshankarrealdeal/Java
2dff1a79c91782bf2aeb1bee057b19c41cafd2a1
[ "MIT" ]
2
2021-03-08T06:12:52.000Z
2021-03-14T05:01:19.000Z
import firebase_admin from firebase_admin import credentials,firestore from firebase_admin import storage cred = credentials.Certificate("./adminKey.json") firebase_admin.initialize_app(cred, { 'storageBucket': 'women-e598c.appspot.com' }) #Database Methods db = firestore.client() #discrip = "" title = "Plight o...
33
208
0.716906
import firebase_admin from firebase_admin import credentials,firestore from firebase_admin import storage cred = credentials.Certificate("./adminKey.json") firebase_admin.initialize_app(cred, { 'storageBucket': 'women-e598c.appspot.com' }) db = firestore.client() title = "Plight of Women" cloudStorageLink = "h...
true
true
f736e207f6d1b0adfa6d87bad60d9ddd424e2578
34,600
py
Python
apps/bluebutton/cms_parser.py
ekivemark/BlueButtonDev
c751a5c52a83df6b97ef2c653a4492d959610c42
[ "Apache-2.0" ]
1
2020-10-29T07:29:49.000Z
2020-10-29T07:29:49.000Z
apps/bluebutton/cms_parser.py
ekivemark/BlueButtonUser
096cf439cd0c4ccb3d16b0efebf1c34fd3fb8939
[ "Apache-2.0" ]
7
2020-02-11T23:03:55.000Z
2021-12-13T19:42:01.000Z
apps/bluebutton/cms_parser.py
ekivemark/BlueButtonUser
096cf439cd0c4ccb3d16b0efebf1c34fd3fb8939
[ "Apache-2.0" ]
2
2018-10-06T21:45:51.000Z
2020-10-10T16:10:36.000Z
#!/usr/bin/env python """ python-bluebutton FILE: cms_parser Created: 3/3/15 12:16 PM convert CMS BlueButton text to json """ __author__ = 'Mark Scrimshire:@ekivemark' import json import re import os, sys from collections import OrderedDict from apps.bluebutton.cms_parser_utilities import * from apps.bluebutton.c...
35.45082
122
0.431908
__author__ = 'Mark Scrimshire:@ekivemark' import json import re import os, sys from collections import OrderedDict from apps.bluebutton.cms_parser_utilities import * from apps.bluebutton.cms_custom import * divider = "----------" def cms_file_read(inPath): DBUG = False ln_cn...
true
true
f736e2f47ca31eb39e92dd13c5650b78cfe8a360
2,732
py
Python
4_test_google_privacy.py
imls-measuring-up/library-privacy
45a82d1cffc0b176f811c2bccaeb5a7a8d8770ad
[ "MIT" ]
1
2022-01-30T04:36:37.000Z
2022-01-30T04:36:37.000Z
4_test_google_privacy.py
imls-measuring-up/library-privacy
45a82d1cffc0b176f811c2bccaeb5a7a8d8770ad
[ "MIT" ]
null
null
null
4_test_google_privacy.py
imls-measuring-up/library-privacy
45a82d1cffc0b176f811c2bccaeb5a7a8d8770ad
[ "MIT" ]
1
2018-11-07T00:07:28.000Z
2018-11-07T00:07:28.000Z
""" project = "Protecting Patron Privacy on the Web: A Study of HTTPS and Google Analytics Implementation in Academic Library Websites" name = "4_test_google_privacy.py", version = "1.0", author = "Patrick OBrien", date = "07/25/2018" author_email = "patrick@revxcorp.com", description = ("Audit tests for unique researc...
37.424658
131
0.533309
import codecs import csv dir_name = '_data/analysis/' data_file = dir_name + 'unique-request-uuid.txt' file = 0 with open(data_file, 'r') as f: reader = csv.DictReader(f, delimiter='\t', quoting=csv.QUOTE_NONE) count_us, count_uk, count_ca, count_int, count_except = 0, 0, 0, 0, 0 testing = ['goog...
true
true
f736e3ebaa26d30804abcb8ec44299e7e1d2b296
341
py
Python
src/sima/riflex/combinedloadingapproach.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/riflex/combinedloadingapproach.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/riflex/combinedloadingapproach.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# Generated with CombinedLoadingApproach # from enum import Enum from enum import auto class CombinedLoadingApproach(Enum): """""" LRFD = auto() WSD = auto() def label(self): if self == CombinedLoadingApproach.LRFD: return "LRFD" if self == CombinedLoadingApproach.WSD: ...
22.733333
48
0.630499
from enum import Enum from enum import auto class CombinedLoadingApproach(Enum): LRFD = auto() WSD = auto() def label(self): if self == CombinedLoadingApproach.LRFD: return "LRFD" if self == CombinedLoadingApproach.WSD: return "WSD"
true
true
f736e45b678665adc297ce013d0439aa1dc29cf3
6,104
py
Python
utils/generate_dataset.py
milinddeore/pytorch-vsumm-reinforce
c3ca731c9a7f00282c8460deb47f34658cfc0522
[ "MIT" ]
null
null
null
utils/generate_dataset.py
milinddeore/pytorch-vsumm-reinforce
c3ca731c9a7f00282c8460deb47f34658cfc0522
[ "MIT" ]
null
null
null
utils/generate_dataset.py
milinddeore/pytorch-vsumm-reinforce
c3ca731c9a7f00282c8460deb47f34658cfc0522
[ "MIT" ]
null
null
null
""" Generate Dataset 1. Converting video to frames 2. Extracting features 3. Getting change points 4. User Summary ( for evaluation ) """ import os, sys sys.path.append('../') from networks.CNN import ResNet from utils.KTS.cpd_auto import cpd_auto from tqdm import tqdm import math import cv2 impor...
38.878981
115
0.6096
import os, sys sys.path.append('../') from networks.CNN import ResNet from utils.KTS.cpd_auto import cpd_auto from tqdm import tqdm import math import cv2 import numpy as np import h5py import argparse parser = argparse.ArgumentParser() parser.add_argument('-p', '--path', type=str, required=True, help="path of video f...
true
true
f736e4c1655e40b2f95896208acb95a003bdc7e2
12,147
py
Python
tensorflow/python/kernel_tests/slice_op_test.py
jhabikal21/tensorflow
98d20962172301385aae694141801a375debd2bc
[ "Apache-2.0" ]
null
null
null
tensorflow/python/kernel_tests/slice_op_test.py
jhabikal21/tensorflow
98d20962172301385aae694141801a375debd2bc
[ "Apache-2.0" ]
null
null
null
tensorflow/python/kernel_tests/slice_op_test.py
jhabikal21/tensorflow
98d20962172301385aae694141801a375debd2bc
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.318612
85
0.635959
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from six.moves import xrange from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import error...
true
true
f736e4c7956805611287953150f73298a8b1389b
314
py
Python
web/run_script.py
alexander-jaferey/dominos
9802d97208058a01791259f851d51a3fd88981a0
[ "MIT" ]
1
2018-04-19T02:36:37.000Z
2018-04-19T02:36:37.000Z
web/run_script.py
alexander-jaferey/dominos
9802d97208058a01791259f851d51a3fd88981a0
[ "MIT" ]
null
null
null
web/run_script.py
alexander-jaferey/dominos
9802d97208058a01791259f851d51a3fd88981a0
[ "MIT" ]
1
2018-08-10T02:45:02.000Z
2018-08-10T02:45:02.000Z
import json import subprocess def run_script(): data = json.load(open('store.json', 'r')) script = data['script_to_run'] if script == "": # Nothing will be run return 1 subprocess.call(['/usr/bin/python', script]) return 0 if __name__ == "__main__": run_script()
15.7
48
0.592357
import json import subprocess def run_script(): data = json.load(open('store.json', 'r')) script = data['script_to_run'] if script == "": return 1 subprocess.call(['/usr/bin/python', script]) return 0 if __name__ == "__main__": run_script()
true
true
f736e66675c4c1243bcc374bfc4a221aeb75ecb6
7,943
py
Python
scripts/EA_A_03_2LFact_Data.py
EloyRD/ThesisExp
dfb890708e95d23cc68ff79b0858630c12aa940d
[ "Unlicense" ]
null
null
null
scripts/EA_A_03_2LFact_Data.py
EloyRD/ThesisExp
dfb890708e95d23cc68ff79b0858630c12aa940d
[ "Unlicense" ]
null
null
null
scripts/EA_A_03_2LFact_Data.py
EloyRD/ThesisExp
dfb890708e95d23cc68ff79b0858630c12aa940d
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,scripts//py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.2' # jupytext_version: 1.1.6 # kernelspec: # display_name: Python [conda env:thesis] * # language: pyt...
21.881543
93
0.631122
mpy as np import pandas as pd import itertools as it import scipy.stats as stats import seaborn as sns import matplotlib as mpl import matplotlib.pyplot as plt import thesis_EAfunc as EAf import thesis_visfunc as EAv plt.style.use("bmh") pd.set_option("display.latex.repr", True) pd.set_...
true
true
f736e67d0d50de0c5ff2caaf470ee5c389e17f43
17,828
py
Python
fairseq_cli/train.py
monofo/fairseq
335a4cbd403543ece43e24b41abbe53fc54b5f36
[ "MIT" ]
115
2021-08-25T14:58:12.000Z
2022-03-21T11:25:36.000Z
fairseq_cli/train.py
monofo/fairseq
335a4cbd403543ece43e24b41abbe53fc54b5f36
[ "MIT" ]
5
2021-09-13T10:48:28.000Z
2021-12-21T13:52:25.000Z
fairseq_cli/train.py
monofo/fairseq
335a4cbd403543ece43e24b41abbe53fc54b5f36
[ "MIT" ]
11
2021-08-25T16:22:07.000Z
2021-11-24T16:26:20.000Z
#!/usr/bin/env python3 -u # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Train a new model on one or across multiple GPUs. """ import argparse import logging import math import os impor...
35.727455
109
0.658234
import argparse import logging import math import os import sys from typing import Dict, Optional, Any, List, Tuple, Callable import numpy as np import torch from fairseq import ( checkpoint_utils, options, quantization_utils, tasks, utils, ) from fairseq.data import iterators from fairseq.da...
true
true
f736e6c3b6d7f063a22d5c7b5693cdc7a2d0b599
7,723
py
Python
skyhook/skyhook/plugins/common_spider_step_executor.py
wfgydbu/skyhook
8577d903bef90110646860fa6c59543c6a60d053
[ "BSD-2-Clause" ]
2
2020-04-20T15:36:08.000Z
2020-07-15T00:50:04.000Z
skyhook/skyhook/plugins/common_spider_step_executor.py
wfgydbu/skyhook
8577d903bef90110646860fa6c59543c6a60d053
[ "BSD-2-Clause" ]
1
2021-03-31T19:44:32.000Z
2021-03-31T19:44:32.000Z
skyhook/skyhook/plugins/common_spider_step_executor.py
wfgydbu/skyhook
8577d903bef90110646860fa6c59543c6a60d053
[ "BSD-2-Clause" ]
2
2020-04-28T01:37:20.000Z
2020-07-02T04:47:37.000Z
import logging import re from skyhook.plugins.extractor import Extractor from skyhook.items import CommonItem from skyhook.plugins.processor.general import General class CommonSpiderStepExecutor(object): def __init__(self, response, parsed_list, policy_depth, rule, spider, item=None): self.response = resp...
41.079787
126
0.523372
import logging import re from skyhook.plugins.extractor import Extractor from skyhook.items import CommonItem from skyhook.plugins.processor.general import General class CommonSpiderStepExecutor(object): def __init__(self, response, parsed_list, policy_depth, rule, spider, item=None): self.response = resp...
true
true
f736e74094878a57a5020e2019cd8e0dafb16f79
8,529
py
Python
neural_deprojection/models/TwoD_to_2d_dVAE_GCD/graph_networks.py
Joshuaalbert/neural_deprojection
5f7859bfd514efe1707a61e2a5e7fc6d949f85ce
[ "Apache-2.0" ]
null
null
null
neural_deprojection/models/TwoD_to_2d_dVAE_GCD/graph_networks.py
Joshuaalbert/neural_deprojection
5f7859bfd514efe1707a61e2a5e7fc6d949f85ce
[ "Apache-2.0" ]
35
2020-09-08T14:13:22.000Z
2021-10-18T20:52:38.000Z
neural_deprojection/models/TwoD_to_2d_dVAE_GCD/graph_networks.py
Joshuaalbert/neural_deprojection
5f7859bfd514efe1707a61e2a5e7fc6d949f85ce
[ "Apache-2.0" ]
null
null
null
import sys sys.path.insert(1, '/data/s2675544/git/neural_deprojection/') sys.path.insert(1, '/home/matthijs/git/neural_deprojection/') from graph_nets import blocks from graph_nets.utils_tf import concat import tensorflow as tf import sonnet as snt from graph_nets.graphs import GraphsTuple from graph_nets.utils_tf i...
50.467456
144
0.62692
import sys sys.path.insert(1, '/data/s2675544/git/neural_deprojection/') sys.path.insert(1, '/home/matthijs/git/neural_deprojection/') from graph_nets import blocks from graph_nets.utils_tf import concat import tensorflow as tf import sonnet as snt from graph_nets.graphs import GraphsTuple from graph_nets.utils_tf i...
true
true
f736e7677c1f294581b6a8c7926ae057f9c75a6c
6,779
py
Python
elvis/set_up_infrastructure.py
dailab/elvis
9b808d0777b014ee0c2d79e4b9a2390bea4841e6
[ "MIT" ]
5
2021-08-23T13:37:35.000Z
2022-02-28T02:29:49.000Z
elvis/set_up_infrastructure.py
dailab/elvis
9b808d0777b014ee0c2d79e4b9a2390bea4841e6
[ "MIT" ]
2
2021-05-18T15:57:48.000Z
2022-02-24T03:37:13.000Z
elvis/set_up_infrastructure.py
dailab/elvis
9b808d0777b014ee0c2d79e4b9a2390bea4841e6
[ "MIT" ]
1
2022-02-28T02:29:20.000Z
2022-02-28T02:29:20.000Z
"""Create infrastructure: connect charging points to transformer and charging points to charging stations.""" from copy import deepcopy from elvis.charging_station import ChargingStation from elvis.charging_point import ChargingPoint from elvis.infrastructure_node import Transformer, Storage from elvis.battery im...
48.078014
100
0.646408
from copy import deepcopy from elvis.charging_station import ChargingStation from elvis.charging_point import ChargingPoint from elvis.infrastructure_node import Transformer, Storage from elvis.battery import StationaryBattery def set_up_infrastructure(infrastructure): charging_points = [] transformer = Non...
true
true
f736e77e09591ce7566c4aed05b4eaffb4713c13
260
py
Python
problems/find-pivot-index/solution-1.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
2
2021-03-25T01:58:55.000Z
2021-08-06T12:47:13.000Z
problems/find-pivot-index/solution-1.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
3
2019-08-27T13:25:42.000Z
2021-08-28T17:49:34.000Z
problems/find-pivot-index/solution-1.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
1
2021-08-14T08:49:39.000Z
2021-08-14T08:49:39.000Z
class Solution: def pivotIndex(self, nums: [int]) -> int: sum_nums = sum(nums) left = 0 for i in range(len(nums)): if left * 2 == sum_nums - nums[i]: return i left += nums[i] return -1
28.888889
46
0.465385
class Solution: def pivotIndex(self, nums: [int]) -> int: sum_nums = sum(nums) left = 0 for i in range(len(nums)): if left * 2 == sum_nums - nums[i]: return i left += nums[i] return -1
true
true
f736e7ee09b45a5b152d00338c9d3462e7087e79
1,634
py
Python
src/wechaty_plugin_contrib/matchers/contact_matcher.py
xinyu3ru/python-wechaty-plugin-contrib
2fc6ee19438ac29266acb133613f83d3aee3c7c3
[ "Apache-2.0" ]
11
2020-06-11T15:11:27.000Z
2022-03-06T01:19:22.000Z
src/wechaty_plugin_contrib/matchers/contact_matcher.py
xinyu3ru/python-wechaty-plugin-contrib
2fc6ee19438ac29266acb133613f83d3aee3c7c3
[ "Apache-2.0" ]
6
2020-12-01T14:26:36.000Z
2021-09-29T03:05:29.000Z
src/wechaty_plugin_contrib/matchers/contact_matcher.py
xinyu3ru/python-wechaty-plugin-contrib
2fc6ee19438ac29266acb133613f83d3aee3c7c3
[ "Apache-2.0" ]
5
2020-06-25T11:31:39.000Z
2021-08-05T05:34:02.000Z
"""Contact Matcher to match the specific contact""" import re from re import Pattern import inspect from wechaty_plugin_contrib.config import ( get_logger, Contact, ) from .matcher import Matcher logger = get_logger("ContactMatcher") class ContactMatcher(Matcher): async def match(self, target: Contact...
30.259259
79
0.5612
import re from re import Pattern import inspect from wechaty_plugin_contrib.config import ( get_logger, Contact, ) from .matcher import Matcher logger = get_logger("ContactMatcher") class ContactMatcher(Matcher): async def match(self, target: Contact) -> bool: logger.info(f'ContactMatcher matc...
true
true
f736e92f05076b49c835c2eee4dc92b17ab35a81
19,943
py
Python
gamestonk_terminal/prediction_techniques/neural_networks.py
bfxavier/GamestonkTerminal
b0a685cacaca1f06fc41d8041bcae5492216dc52
[ "MIT" ]
null
null
null
gamestonk_terminal/prediction_techniques/neural_networks.py
bfxavier/GamestonkTerminal
b0a685cacaca1f06fc41d8041bcae5492216dc52
[ "MIT" ]
null
null
null
gamestonk_terminal/prediction_techniques/neural_networks.py
bfxavier/GamestonkTerminal
b0a685cacaca1f06fc41d8041bcae5492216dc52
[ "MIT" ]
null
null
null
import argparse import os from warnings import simplefilter import numpy as np import matplotlib.pyplot as plt import pandas as pd from pandas.plotting import register_matplotlib_converters from TimeSeriesCrossValidation import splitTrain from sklearn.preprocessing import MinMaxScaler, StandardScaler from tensorflow.ke...
30.871517
102
0.545304
import argparse import os from warnings import simplefilter import numpy as np import matplotlib.pyplot as plt import pandas as pd from pandas.plotting import register_matplotlib_converters from TimeSeriesCrossValidation import splitTrain from sklearn.preprocessing import MinMaxScaler, StandardScaler from tensorflow.ke...
true
true
f736ece3ad2fa1b2e684a633a5dcf8758c1fc91d
6,113
py
Python
salt/salt/returners/influxdb_return.py
smallyear/linuxLearn
342e5020bf24b5fac732c4275a512087b47e578d
[ "Apache-2.0" ]
1
2017-11-21T16:57:27.000Z
2017-11-21T16:57:27.000Z
salt/salt/returners/influxdb_return.py
smallyear/linuxLearn
342e5020bf24b5fac732c4275a512087b47e578d
[ "Apache-2.0" ]
null
null
null
salt/salt/returners/influxdb_return.py
smallyear/linuxLearn
342e5020bf24b5fac732c4275a512087b47e578d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Return data to an influxdb server. .. versionadded:: 2015.8.0 To enable this returner the minion will need the python client for influxdb installed and the following values configured in the minion or master config, these are the defaults: .. code-block:: yaml influxdb.db: 'salt' ...
24.257937
99
0.565516
from __future__ import absolute_import import json import logging import salt.utils.jid import salt.returners try: import influxdb.influxdb08 HAS_INFLUXDB = True except ImportError: HAS_INFLUXDB = False log = logging.getLogger(__name__) __virtualname__ = 'influxdb' def __virtual__(): if not ...
true
true
f736ecf14908a77f2315408c7fa6a9fb34cfc340
3,425
py
Python
Portfolio/views.py
Shreya549/AchieveVIT
4623f80a4e38914f2d759fc0c3591bd642486a5b
[ "MIT" ]
3
2020-08-29T20:23:27.000Z
2021-05-20T05:44:01.000Z
Portfolio/views.py
Shreya549/AchieveVIT
4623f80a4e38914f2d759fc0c3591bd642486a5b
[ "MIT" ]
1
2020-09-29T16:28:24.000Z
2020-09-29T16:28:24.000Z
Portfolio/views.py
Shreya549/AchieveVIT
4623f80a4e38914f2d759fc0c3591bd642486a5b
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework import viewsets, permissions, generics from .serializers import EducationSerializer, WorkExperienceSerializer, AchievementsSerializer from .models import Education, WorkExperience, Achievements from Feed.models import Feed from Profile.models import FacultyProfile...
32.311321
94
0.689635
from django.shortcuts import render from rest_framework import viewsets, permissions, generics from .serializers import EducationSerializer, WorkExperienceSerializer, AchievementsSerializer from .models import Education, WorkExperience, Achievements from Feed.models import Feed from Profile.models import FacultyProfile...
true
true
f736ecfba5a360a245116b0ceb05df6302148c46
546
py
Python
gdb/gdbroot.py
marcostolosa/CVE-2021-3156
bcf829627eea364a3abc41a6537fbf543e974ff8
[ "BSD-3-Clause" ]
473
2021-03-15T19:33:48.000Z
2022-03-30T03:13:15.000Z
gdb/gdbroot.py
loneicewolf/CVE-2021-3156
ee2506c68ebecc22228c4e5f8a5eaa7544496961
[ "BSD-3-Clause" ]
16
2021-03-23T06:59:40.000Z
2022-01-24T07:11:03.000Z
gdb/gdbroot.py
loneicewolf/CVE-2021-3156
ee2506c68ebecc22228c4e5f8a5eaa7544496961
[ "BSD-3-Clause" ]
128
2021-03-16T10:23:46.000Z
2022-03-29T14:14:40.000Z
#!/usr/bin/python3 ''' Server for tracing patched sudo. run it with sudo or as root. Requires 'cmds' file as gdb comamnds in current directory. Running command: python gdbroot.py ''' import os import time FIFO_PATH = "/tmp/gdbsudo" try: os.unlink(FIFO_PATH) except: pass os.umask(0) os.mkfifo(FIFO_PATH, 0o666) wh...
17.0625
61
0.668498
import os import time FIFO_PATH = "/tmp/gdbsudo" try: os.unlink(FIFO_PATH) except: pass os.umask(0) os.mkfifo(FIFO_PATH, 0o666) while True: fifo = open(FIFO_PATH, "r") pid = int(fifo.read()) fifo.close() cmd = 'gdb -q -p %d < cmds > log 2>&1' % pid print('\n=== got: %d. sleep 0.5s' % pid) print(cmd) os....
true
true
f736ecfdcc047a0ef504e6d1932c8782c4c382d1
4,461
py
Python
hackeriet/web/brusweb/__init__.py
jsdelivrbot/pyhackeriet
f96fec0a10680d491f846466af8d2d2bbd4cbb6b
[ "Apache-2.0" ]
null
null
null
hackeriet/web/brusweb/__init__.py
jsdelivrbot/pyhackeriet
f96fec0a10680d491f846466af8d2d2bbd4cbb6b
[ "Apache-2.0" ]
null
null
null
hackeriet/web/brusweb/__init__.py
jsdelivrbot/pyhackeriet
f96fec0a10680d491f846466af8d2d2bbd4cbb6b
[ "Apache-2.0" ]
null
null
null
from flask import Flask, request, Response, render_template, g, redirect, url_for, send_file, jsonify from functools import wraps import stripe import os, uuid, json from hackeriet.web.brusweb import brusdb, members from hackeriet.mqtt import MQTT # teste stripe # lage bruker for gratis brus # brus/error virker ikke #...
28.414013
106
0.650303
from flask import Flask, request, Response, render_template, g, redirect, url_for, send_file, jsonify from functools import wraps import stripe import os, uuid, json from hackeriet.web.brusweb import brusdb, members from hackeriet.mqtt import MQTT stripe_keys = { 'secret_key': os.environ.get('SECRET_KEY', ...
true
true
f736ed591c705009f410e5f41e8edef29949cfa3
138
py
Python
test/api_test.py
adi4387/titanic
d45a124781ba1cb2b194c179725f856faea8c082
[ "MIT" ]
null
null
null
test/api_test.py
adi4387/titanic
d45a124781ba1cb2b194c179725f856faea8c082
[ "MIT" ]
null
null
null
test/api_test.py
adi4387/titanic
d45a124781ba1cb2b194c179725f856faea8c082
[ "MIT" ]
null
null
null
import json import requests data = json.dumps({'name':'Aditya'}) res = requests.post('http://127.0.0.1:10001/api', data) print(res.text)
19.714286
55
0.695652
import json import requests data = json.dumps({'name':'Aditya'}) res = requests.post('http://127.0.0.1:10001/api', data) print(res.text)
true
true
f736ee8816ef15543c88cd7f9323f3af4f9ff2b6
1,872
py
Python
C15/main.py
ybalenko/Data-Analysis
cda706d66346d5a7a81fbc7f2146b7da43ea5cdc
[ "MIT" ]
null
null
null
C15/main.py
ybalenko/Data-Analysis
cda706d66346d5a7a81fbc7f2146b7da43ea5cdc
[ "MIT" ]
null
null
null
C15/main.py
ybalenko/Data-Analysis
cda706d66346d5a7a81fbc7f2146b7da43ea5cdc
[ "MIT" ]
null
null
null
import pandas from pandas import DataFrame import building_energy_data as bed def main(): reporter = bed.BuidingEnergyReporter('file.csv') # Q1: What was the name of the building that had the largest NumberofFloors? building_name = reporter.max_number_of_floors() print('Question 1: Name of the building t...
52
177
0.777244
import pandas from pandas import DataFrame import building_energy_data as bed def main(): reporter = bed.BuidingEnergyReporter('file.csv') building_name = reporter.max_number_of_floors() print('Question 1: Name of the building that had the largest NumberOfFloors', building_name) buildings_with_ene...
true
true
f736eeac450d1ff8d9e88665aa56c3f3474104df
2,597
py
Python
dgp/core/context.py
dataspot/dgp
553a255a4884b935cf2efecdc761050232f0f066
[ "MIT" ]
1
2019-07-17T11:34:27.000Z
2019-07-17T11:34:27.000Z
dgp/core/context.py
datahq/dgp
f39592ce20ba67b73b08188f14585b6eb3d43f96
[ "MIT" ]
2
2019-04-30T12:32:32.000Z
2019-04-30T12:35:26.000Z
dgp/core/context.py
dataspot/dgp
553a255a4884b935cf2efecdc761050232f0f066
[ "MIT" ]
null
null
null
import copy import tabulator import requests from .config import Config from ..config.log import logger from ..config.consts import CONFIG_SKIP_ROWS, CONFIG_TAXONOMY_ID, CONFIG_FORMAT, CONFIG_ALLOW_INSECURE_TLS from ..taxonomies import TaxonomyRegistry, Taxonomy _workbook_cache = {} def trimmer(extended_rows): ...
34.171053
117
0.613015
import copy import tabulator import requests from .config import Config from ..config.log import logger from ..config.consts import CONFIG_SKIP_ROWS, CONFIG_TAXONOMY_ID, CONFIG_FORMAT, CONFIG_ALLOW_INSECURE_TLS from ..taxonomies import TaxonomyRegistry, Taxonomy _workbook_cache = {} def trimmer(extended_rows): ...
true
true
f736ef2c2ed6fc9b43f055f0d0b027e9ae9f7e07
8,040
py
Python
maskrcnn_benchmark/modeling/rrpn/inference.py
markson14/RRPN_pytorch
90acc619fbabb64e772e5abc5e2d0bc368425450
[ "MIT" ]
294
2019-05-03T08:40:20.000Z
2022-03-25T06:12:11.000Z
maskrcnn_benchmark/modeling/rrpn/inference.py
chenjun2hao/RRPN_pytorch
f30c6180c44c2d6cc65ce4521a3cf839b5215089
[ "MIT" ]
62
2019-05-07T03:48:45.000Z
2022-03-02T03:23:34.000Z
maskrcnn_benchmark/modeling/rrpn/inference.py
chenjun2hao/RRPN_pytorch
f30c6180c44c2d6cc65ce4521a3cf839b5215089
[ "MIT" ]
67
2019-05-06T02:30:17.000Z
2021-08-30T12:45:22.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from maskrcnn_benchmark.modeling.box_coder import BoxCoder from maskrcnn_benchmark.modeling.rbox_coder import RBoxCoder from maskrcnn_benchmark.structures.bounding_box import BoxList, RBoxList from maskrcnn_benchmark.structures.rboxli...
37.395349
100
0.631592
import torch from maskrcnn_benchmark.modeling.box_coder import BoxCoder from maskrcnn_benchmark.modeling.rbox_coder import RBoxCoder from maskrcnn_benchmark.structures.bounding_box import BoxList, RBoxList from maskrcnn_benchmark.structures.rboxlist_ops import cat_boxlist from maskrcnn_benchmark.structures.rboxlist_o...
true
true
f736ef7c4d019cb0d74a1b07bd56a8165aa017c5
760
py
Python
setup.py
Zingeon/payrun-python
1fbac0ee2556641840bf0b34d6da44437d91dc80
[ "MIT" ]
null
null
null
setup.py
Zingeon/payrun-python
1fbac0ee2556641840bf0b34d6da44437d91dc80
[ "MIT" ]
null
null
null
setup.py
Zingeon/payrun-python
1fbac0ee2556641840bf0b34d6da44437d91dc80
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="payrun", # Replace with your own username version="0.0.1", author="Andrii Pushkar", author_email="zingeon1@gmail.com", description="A Python SDK for PayRun API", long_description=long_...
33.043478
84
0.672368
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="payrun", version="0.0.1", author="Andrii Pushkar", author_email="zingeon1@gmail.com", description="A Python SDK for PayRun API", long_description=long_description, long_descriptio...
true
true
f736f009216a5b613c1c38e28616fc29d1e3caf3
3,938
py
Python
treebudy/nodes.py
drafter250/treebudy
f01bdfc24cf5e44e16a58e6a9af6574920fa8083
[ "BSD-3-Clause" ]
1
2017-07-14T01:51:52.000Z
2017-07-14T01:51:52.000Z
treebudy/nodes.py
treebudy/treebudy
f01bdfc24cf5e44e16a58e6a9af6574920fa8083
[ "BSD-3-Clause" ]
1
2016-12-12T03:17:50.000Z
2016-12-12T03:17:50.000Z
treebudy/nodes.py
drafter250/treebudy
f01bdfc24cf5e44e16a58e6a9af6574920fa8083
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from collections.abc import MutableSequence, MutableMapping from collections import OrderedDict from itertools import chain class Snode(MutableSequence): """A sequence object that knows it's parent""" # this will allow easy subclassing to extend the container types that can # be p...
28.330935
78
0.589893
from collections.abc import MutableSequence, MutableMapping from collections import OrderedDict from itertools import chain class Snode(MutableSequence): STYPES = (list, tuple) MTYPES = (dict, OrderedDict) def __init__(self, nodes=None, parent=None): self.__children = list() s...
true
true
f736f00c1e29e9f2737db21639a7594f06c772c4
311
py
Python
src/engine/backend/graphics.py
BradAnderson1995/PyZelda
8fffcf01fb66bb583b40f4e23b4fc850bcbca2da
[ "MIT" ]
6
2017-04-25T00:22:02.000Z
2022-02-18T05:27:17.000Z
src/engine/backend/graphics.py
BradAnderson1995/PyZelda
8fffcf01fb66bb583b40f4e23b4fc850bcbca2da
[ "MIT" ]
null
null
null
src/engine/backend/graphics.py
BradAnderson1995/PyZelda
8fffcf01fb66bb583b40f4e23b4fc850bcbca2da
[ "MIT" ]
3
2018-11-17T18:07:58.000Z
2021-11-04T02:46:41.000Z
__author__ = 'brad' import pygame class Surface(pygame.Surface): def __init__(self, (width, height), flags=0): surface_flags = {0: 0, 1: pygame.SRCALPHA, 2: pygame.HWSURFACE, 3: pygame.SRCALPHA | pygame.HWSURFACE} pygame.Surface.__init__(self, (width, height), flags=surface_flags[flags])
34.555556
110
0.700965
__author__ = 'brad' import pygame class Surface(pygame.Surface): def __init__(self, (width, height), flags=0): surface_flags = {0: 0, 1: pygame.SRCALPHA, 2: pygame.HWSURFACE, 3: pygame.SRCALPHA | pygame.HWSURFACE} pygame.Surface.__init__(self, (width, height), flags=surface_flags[flags])
false
true
f736f0bb7425af4457ff805eabb818748149d97e
1,232
py
Python
src/python/tests/unittests/test_web/test_serialize/test_serialize_auto_queue.py
AlekLT/seedsync
d370a94253384e1e6e5caa5fcd44692f1d1f1ce3
[ "Apache-2.0" ]
255
2017-12-25T00:53:40.000Z
2022-03-27T10:29:21.000Z
src/python/tests/unittests/test_web/test_serialize/test_serialize_auto_queue.py
AlekLT/seedsync
d370a94253384e1e6e5caa5fcd44692f1d1f1ce3
[ "Apache-2.0" ]
111
2018-01-04T10:35:49.000Z
2022-03-29T15:12:52.000Z
src/python/tests/unittests/test_web/test_serialize/test_serialize_auto_queue.py
AlekLT/seedsync
d370a94253384e1e6e5caa5fcd44692f1d1f1ce3
[ "Apache-2.0" ]
53
2017-12-25T09:34:19.000Z
2022-03-15T17:53:27.000Z
# Copyright 2017, Inderpreet Singh, All rights reserved. import unittest import json from controller import AutoQueuePattern from web.serialize import SerializeAutoQueue class TestSerializeConfig(unittest.TestCase): def test_is_list(self): patterns = [ AutoQueuePattern(pattern="one"), ...
30.8
56
0.593344
import unittest import json from controller import AutoQueuePattern from web.serialize import SerializeAutoQueue class TestSerializeConfig(unittest.TestCase): def test_is_list(self): patterns = [ AutoQueuePattern(pattern="one"), AutoQueuePattern(pattern="two"), AutoQ...
true
true
f736f17981501e31f64226a407c61c5295a0d3e7
3,831
py
Python
scripts/migrate-users.py
tacerus/matrix-appservice-irc
db89870478e414ce4db3fa7796e5a83399389dc6
[ "Apache-2.0" ]
425
2015-07-29T19:30:26.000Z
2022-03-27T18:08:23.000Z
scripts/migrate-users.py
tacerus/matrix-appservice-irc
db89870478e414ce4db3fa7796e5a83399389dc6
[ "Apache-2.0" ]
1,225
2015-04-13T14:01:16.000Z
2022-03-29T17:36:55.000Z
scripts/migrate-users.py
tacerus/matrix-appservice-irc
db89870478e414ce4db3fa7796e5a83399389dc6
[ "Apache-2.0" ]
145
2015-05-13T09:15:43.000Z
2022-03-20T12:17:56.000Z
#!/usr/bin/env python from __future__ import print_function import argparse from datetime import datetime import sys import json import yaml import urllib import requests import time import re # import logging # import httplib as http_client # http_client.HTTPConnection.debuglevel = 1 # logging.basicConfig() # logging...
46.719512
194
0.701906
from __future__ import print_function import argparse from datetime import datetime import sys import json import yaml import urllib import requests import time import re def get_appservice_token(reg): with open(reg, "r") as f: reg_yaml = yaml.load(f) return reg_yaml["as_token"] def g...
true
true
f736f1a2c55e61043977fbbd9c2c42cb6bc75c56
41,183
py
Python
pydm/tests/widgets/test_drawing.py
cristinasewell/pydm
30a830ba5614400ca31dbbf5d5268ea35add178d
[ "BSD-3-Clause-LBNL" ]
2
2018-02-08T10:30:43.000Z
2020-01-05T14:14:26.000Z
pydm/tests/widgets/test_drawing.py
cristinasewell/pydm
30a830ba5614400ca31dbbf5d5268ea35add178d
[ "BSD-3-Clause-LBNL" ]
1
2018-09-20T17:39:14.000Z
2018-09-20T17:39:14.000Z
pydm/tests/widgets/test_drawing.py
cristinasewell/pydm
30a830ba5614400ca31dbbf5d5268ea35add178d
[ "BSD-3-Clause-LBNL" ]
null
null
null
# Unit Tests for the PyDM drawing widgets import os from logging import ERROR import pytest from qtpy.QtGui import QColor, QBrush, QPixmap from qtpy.QtWidgets import QApplication from qtpy.QtCore import Property, Qt, QPoint, QSize from qtpy.QtDesigner import QDesignerFormWindowInterface from ...widgets.base import P...
31.999223
142
0.626885
import os from logging import ERROR import pytest from qtpy.QtGui import QColor, QBrush, QPixmap from qtpy.QtWidgets import QApplication from qtpy.QtCore import Property, Qt, QPoint, QSize from qtpy.QtDesigner import QDesignerFormWindowInterface from ...widgets.base import PyDMWidget from ...widgets.drawing import ...
true
true
f736f1fd69008ba9d3e5c7488b46ef0b76ea3267
8,447
py
Python
mlmi/participant.py
iwan933/mlmi-federated-learning
e148664304dd7fbbc2cc2a6a34567533748c1720
[ "MIT" ]
2
2021-09-07T12:52:44.000Z
2021-09-30T09:35:53.000Z
mlmi/participant.py
iwan933/mlmi-federated-learning
e148664304dd7fbbc2cc2a6a34567533748c1720
[ "MIT" ]
null
null
null
mlmi/participant.py
iwan933/mlmi-federated-learning
e148664304dd7fbbc2cc2a6a34567533748c1720
[ "MIT" ]
1
2021-03-02T12:35:28.000Z
2021-03-02T12:35:28.000Z
import copy from pathlib import Path from typing import Dict, List, Optional, Union import torch from pytorch_lightning.metrics import Accuracy from torch import Tensor, optim from torch.utils import data import pytorch_lightning as pl from pytorch_lightning.loggers import LightningLoggerBase from pytorch_lightning.c...
34.904959
118
0.66059
import copy from pathlib import Path from typing import Dict, List, Optional, Union import torch from pytorch_lightning.metrics import Accuracy from torch import Tensor, optim from torch.utils import data import pytorch_lightning as pl from pytorch_lightning.loggers import LightningLoggerBase from pytorch_lightning.c...
true
true
f736f2f0ce52820334da65475998c88bb20ab73a
423
py
Python
util/log.py
icyda17/MNT
f88a0a199e79d6d4201ec724478c710380e71ea3
[ "MIT" ]
null
null
null
util/log.py
icyda17/MNT
f88a0a199e79d6d4201ec724478c710380e71ea3
[ "MIT" ]
null
null
null
util/log.py
icyda17/MNT
f88a0a199e79d6d4201ec724478c710380e71ea3
[ "MIT" ]
1
2021-02-24T11:32:09.000Z
2021-02-24T11:32:09.000Z
import time def timeit(method): def timed(*args, **kw): ts = time.time() result = method(*args, **kw) te = time.time() if 'log_time' in kw: name = kw.get('log_name', method.__name__.upper()) kw['log_time'][name] = int((te - ts) * 1000) else: ...
26.4375
71
0.501182
import time def timeit(method): def timed(*args, **kw): ts = time.time() result = method(*args, **kw) te = time.time() if 'log_time' in kw: name = kw.get('log_name', method.__name__.upper()) kw['log_time'][name] = int((te - ts) * 1000) else: ...
true
true
f736f4001a8075f4f0fe86f72ce2a6273e994743
95
py
Python
exercicios_curso_em_video/Exercicio 12.py
Sposigor/Caminho_do_Python
e84d74e9dc89c0966f931a94cb9ebe3ee4671b6d
[ "MIT" ]
1
2021-01-13T18:07:46.000Z
2021-01-13T18:07:46.000Z
exercicios_curso_em_video/Exercicio 12.py
Sposigor/Caminho_do_Python
e84d74e9dc89c0966f931a94cb9ebe3ee4671b6d
[ "MIT" ]
null
null
null
exercicios_curso_em_video/Exercicio 12.py
Sposigor/Caminho_do_Python
e84d74e9dc89c0966f931a94cb9ebe3ee4671b6d
[ "MIT" ]
null
null
null
preco = float(input('Preço: ')) print(f'Depois do desconto de 5% aplicado: {preco * 0.95:.2f}')
47.5
63
0.663158
preco = float(input('Preço: ')) print(f'Depois do desconto de 5% aplicado: {preco * 0.95:.2f}')
true
true
f736f4ba4224fe905a2780f231825d898cf9133f
2,291
py
Python
code/distance/mmd_pytorch.py
Flsahkong/transferlearning
fdc76a7e03d7771517ea938cb5b90aa5dfb8dfbd
[ "MIT" ]
9
2019-12-26T08:51:30.000Z
2021-04-16T06:44:52.000Z
code/distance/mmd_pytorch.py
clxiao/transferlearning
0fe84de59dcb2871e2dca24130dc24e1ccce8506
[ "MIT" ]
null
null
null
code/distance/mmd_pytorch.py
clxiao/transferlearning
0fe84de59dcb2871e2dca24130dc24e1ccce8506
[ "MIT" ]
5
2021-09-19T08:02:58.000Z
2022-03-30T07:20:18.000Z
# Compute MMD distance using pytorch import torch import torch.nn as nn class MMD_loss(nn.Module): def __init__(self, kernel_type='rbf', kernel_mul=2.0, kernel_num=5): super(MMD_loss, self).__init__() self.kernel_num = kernel_num self.kernel_mul = kernel_mul self.fix_sigma = None ...
41.654545
113
0.594937
import torch import torch.nn as nn class MMD_loss(nn.Module): def __init__(self, kernel_type='rbf', kernel_mul=2.0, kernel_num=5): super(MMD_loss, self).__init__() self.kernel_num = kernel_num self.kernel_mul = kernel_mul self.fix_sigma = None self.kernel_type = kernel_ty...
true
true
f736f71da9307986982ce5b8734e9109c8e23e6c
34,055
py
Python
salt/modules/boto_rds.py
fictivekin/salt
f4b6f815d47ab8c790028e8ddad64ee0f8bb3f00
[ "Apache-2.0" ]
null
null
null
salt/modules/boto_rds.py
fictivekin/salt
f4b6f815d47ab8c790028e8ddad64ee0f8bb3f00
[ "Apache-2.0" ]
null
null
null
salt/modules/boto_rds.py
fictivekin/salt
f4b6f815d47ab8c790028e8ddad64ee0f8bb3f00
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Connection module for Amazon RDS .. versionadded:: 2015.8.0 :configuration: This module accepts explicit rds credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no fu...
37.754989
112
0.585582
from __future__ import absolute_import import logging from salt.exceptions import SaltInvocationError from distutils.version import LooseVersion as _LooseVersion from time import time, sleep import salt.utils.boto3 import salt.utils.compat import salt.utils.odict as odict import salt.utils import salt.ext.six...
true
true
f736f8aeb2c6114d285750703b0d296db06fb264
9,225
py
Python
pysiaf/iando/write.py
goudfroo/pysiaf
ca8350ce814950344789a9674079b8d0168ac05e
[ "BSD-3-Clause" ]
null
null
null
pysiaf/iando/write.py
goudfroo/pysiaf
ca8350ce814950344789a9674079b8d0168ac05e
[ "BSD-3-Clause" ]
null
null
null
pysiaf/iando/write.py
goudfroo/pysiaf
ca8350ce814950344789a9674079b8d0168ac05e
[ "BSD-3-Clause" ]
1
2020-11-04T16:48:44.000Z
2020-11-04T16:48:44.000Z
"""Functions to write Science Instrument Aperture Files (SIAF). SIAF content in an aperture_collection object can be written to an xml file that can be ingested in the PRD. Format and order of the xml fields are defined in SIAF reference files. Writing to Microsoft Excel .xlsx format is supported. Writing to .csv and ...
41
99
0.583631
import os import numpy as np import lxml.etree as ET from astropy.time import Time from astropy.table import Table, Column from openpyxl import Workbook from openpyxl.styles import Font, Color from openpyxl.styles import Alignment from ..version import __version__ from ..constants import _JWST_TEMPORARY_ROOT from .....
true
true
f736fb7dc6e2885672e4606d70e8c596b33b7932
10,770
py
Python
featuretools/primitives/standard/aggregation_primitives.py
vnarayan13/featuretools
a86b6d8df246a13558d19915b15230c418ad27ab
[ "BSD-3-Clause" ]
null
null
null
featuretools/primitives/standard/aggregation_primitives.py
vnarayan13/featuretools
a86b6d8df246a13558d19915b15230c418ad27ab
[ "BSD-3-Clause" ]
null
null
null
featuretools/primitives/standard/aggregation_primitives.py
vnarayan13/featuretools
a86b6d8df246a13558d19915b15230c418ad27ab
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division from datetime import datetime, timedelta import numpy as np import pandas as pd from ..base.aggregation_primitive_base import ( AggregationPrimitive, make_agg_primitive ) from featuretools.variable_types import ( Boolean, DatetimeTimeIndex, Discrete, Index, ...
27.128463
78
0.608821
from __future__ import division from datetime import datetime, timedelta import numpy as np import pandas as pd from ..base.aggregation_primitive_base import ( AggregationPrimitive, make_agg_primitive ) from featuretools.variable_types import ( Boolean, DatetimeTimeIndex, Discrete, Index, ...
true
true
f736fbdfc59a36543527bf23822bde24b59993dc
1,447
py
Python
functions.py
akhil-eppa/Multi-Source-Plagiarism
bf679bdb8ec7c4b719a54002a97c1032bbc37709
[ "MIT" ]
null
null
null
functions.py
akhil-eppa/Multi-Source-Plagiarism
bf679bdb8ec7c4b719a54002a97c1032bbc37709
[ "MIT" ]
null
null
null
functions.py
akhil-eppa/Multi-Source-Plagiarism
bf679bdb8ec7c4b719a54002a97c1032bbc37709
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Sep 7 14:11:59 2020 @author: Akhil """ from __future__ import print_function import re from pathlib import Path from pycparser import c_ast, c_generator, parse_file from pycparser.c_ast import FuncDef z = [] class FuncDefVisitor(c_ast.NodeVisitor): ...
25.385965
89
0.639254
from __future__ import print_function import re from pathlib import Path from pycparser import c_ast, c_generator, parse_file from pycparser.c_ast import FuncDef z = [] class FuncDefVisitor(c_ast.NodeVisitor): def visit_FuncDef(self, node): z.append(str(node.decl.coord)) def show_f...
true
true
f736fd0c35fbfc489d89e10dbfbc28e74ea9fbf5
2,643
py
Python
python/databank_download.py
aranryan/Mandoline.Api.Examples
bac0141664bb12df363e37846789404e7157225f
[ "MIT" ]
null
null
null
python/databank_download.py
aranryan/Mandoline.Api.Examples
bac0141664bb12df363e37846789404e7157225f
[ "MIT" ]
null
null
null
python/databank_download.py
aranryan/Mandoline.Api.Examples
bac0141664bb12df363e37846789404e7157225f
[ "MIT" ]
null
null
null
# <copyright file="databank_download.py" company="Oxford Economics"> # Copyright (c) 2017 Oxford Economics Ltd. All rights reserved. # Licensed under the MIT License. See LICENSE file in the # project root for full license information. # </copyright> import json import requests import sys API_KEY = # insert api key...
30.37931
85
0.653802
import json import requests import sys API_KEY = BASE_URL = 'https://services.oxfordeconomics.com' sample_selection = { 'DatabankCode': 'WDMacro', 'Frequency': 'Annual', 'GroupingMode': 'false', 'IndicatorSortOrder': 'AlphabeticalOrder', 'IsTemporarySelection': 'true', 'ListingType': 'P...
false
true
f736fd3b37aa750829fbe390a72071cbcaf69ba9
17,966
py
Python
airflow/models/dagrun.py
wileeam/airflow
f46be8152a4d89c57db4ca46f5b3339e4876b723
[ "Apache-2.0" ]
1
2020-11-16T15:43:52.000Z
2020-11-16T15:43:52.000Z
airflow/models/dagrun.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
null
null
null
airflow/models/dagrun.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "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...
38.063559
110
0.608928
from typing import Optional, cast from sqlalchemy import ( Boolean, Column, DateTime, Index, Integer, PickleType, String, UniqueConstraint, and_, func, or_, ) from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.orm import synonym from sqlalchemy.orm.session import Session from ai...
true
true
f736fd4520e17f470184be3dc033774e1f7dbd0f
2,004
py
Python
test/test_entity_data_api.py
docktermj/senzing-python-rest-client
396c4842c72c93a4a9d7cf0cefc027f73892a518
[ "Apache-2.0" ]
null
null
null
test/test_entity_data_api.py
docktermj/senzing-python-rest-client
396c4842c72c93a4a9d7cf0cefc027f73892a518
[ "Apache-2.0" ]
null
null
null
test/test_entity_data_api.py
docktermj/senzing-python-rest-client
396c4842c72c93a4a9d7cf0cefc027f73892a518
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Senzing REST API This is the Senzing REST API. It describes the REST interface to Senzing API functions available via REST. It leverages the Senzing native API which is documented at [https://docs.senzing.com](https://docs.senzing.com) # noqa: E501 OpenAPI spec version: 1.6.0 ...
26.368421
238
0.667166
from __future__ import absolute_import import unittest import swagger_client from api.entity_data_api import EntityDataApi from swagger_client.rest import ApiException class TestEntityDataApi(unittest.TestCase): def setUp(self): self.api = api.entity_data_api.EntityDataApi() def tearDown(se...
true
true
f736fde412857f25a4128b330b934401390ae46f
12,877
py
Python
aiokubernetes/models/v1beta1_stateful_set_status.py
tantioch/aiokubernetes
2f332498598ece14d22f8e59ecb02665db6db68d
[ "Apache-2.0" ]
24
2018-07-07T15:12:19.000Z
2021-09-01T07:33:11.000Z
aiokubernetes/models/v1beta1_stateful_set_status.py
revoteon/aiokubernetes
730eae03e4779563740f07ad3ecef180b511ac18
[ "Apache-2.0" ]
5
2018-07-11T00:09:17.000Z
2018-10-22T16:41:54.000Z
aiokubernetes/models/v1beta1_stateful_set_status.py
revoteon/aiokubernetes
730eae03e4779563740f07ad3ecef180b511ac18
[ "Apache-2.0" ]
3
2018-07-10T10:16:57.000Z
2018-10-20T19:32:05.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.10.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 from aio...
37.762463
235
0.671041
import pprint import re from aiokubernetes.models.v1beta1_stateful_set_condition import V1beta1StatefulSetCondition class V1beta1StatefulSetStatus(object): swagger_types = { 'collision_count': 'int', 'conditions': 'list[V1beta1StatefulSetCondition]', 'current_replicas': 'int', ...
true
true
f736ff4d8a8dbdd9eb0a5b2c271becc5760e9358
2,761
py
Python
app/mod_utils/intelix.py
0xbennyv/intelix-livediscover-lookup
e028b7659ef3c291aa169d174d73cc2ea47b86a2
[ "MIT" ]
null
null
null
app/mod_utils/intelix.py
0xbennyv/intelix-livediscover-lookup
e028b7659ef3c291aa169d174d73cc2ea47b86a2
[ "MIT" ]
null
null
null
app/mod_utils/intelix.py
0xbennyv/intelix-livediscover-lookup
e028b7659ef3c291aa169d174d73cc2ea47b86a2
[ "MIT" ]
null
null
null
import validators import requests import base64 from app import app def intelixlookup(ioc): #Get a token token = get_token() # use Validators to redirect the IOC to the correct Intelix endpoint if validators.ipv4(ioc): u = f"https://de.api.labs.sophos.com/lookup/ips/v1/{ioc}" elif validator...
36.813333
86
0.603042
import validators import requests import base64 from app import app def intelixlookup(ioc): token = get_token() if validators.ipv4(ioc): u = f"https://de.api.labs.sophos.com/lookup/ips/v1/{ioc}" elif validators.md5(ioc): u = f"https://de.api.labs.sophos.com/lookup/urls/v1/{ioc}" ...
true
true
f7370113674360f191e051a8e006f13f62d0e2ae
3,727
py
Python
test/libtiff.py
sdarwin/build
2c4217ebb6bdeb5001b33a5d0d6718420aef988c
[ "BSL-1.0" ]
106
2015-08-07T04:23:50.000Z
2020-12-27T18:25:15.000Z
test/libtiff.py
sdarwin/build
2c4217ebb6bdeb5001b33a5d0d6718420aef988c
[ "BSL-1.0" ]
130
2016-06-22T22:11:25.000Z
2020-11-29T20:24:09.000Z
test/libtiff.py
sdarwin/build
2c4217ebb6bdeb5001b33a5d0d6718420aef988c
[ "BSL-1.0" ]
41
2015-07-08T19:18:35.000Z
2021-01-14T16:39:56.000Z
#!/usr/bin/python # Copyright (C) 2013 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE.txt or copy at # https://www.bfgroup.xyz/b2/LICENSE.txt) import BoostBuild import MockToolset t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '...
31.058333
107
0.686611
import BoostBuild import MockToolset t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config', '--user-config='], pass_toolset=0) MockToolset.create(t) t.write("libtiff/tiff.h", 'libtiff') t.write("libtiff/tiff.c", 'tiff') t.write("Jamroot.jam", """ path-constant here : . ; using libtiff : : ...
true
true
f737014869797441ba6c3879b0440539727513d5
1,956
py
Python
examples/ad_manager/v201902/report_service/run_reach_report.py
nlynch504/googleads-python-lib
8f7bd7f987498c4651c969a7dc73e1d5fc965be2
[ "Apache-2.0" ]
null
null
null
examples/ad_manager/v201902/report_service/run_reach_report.py
nlynch504/googleads-python-lib
8f7bd7f987498c4651c969a7dc73e1d5fc965be2
[ "Apache-2.0" ]
null
null
null
examples/ad_manager/v201902/report_service/run_reach_report.py
nlynch504/googleads-python-lib
8f7bd7f987498c4651c969a7dc73e1d5fc965be2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
30.092308
75
0.729039
"""This code example runs a reach report.""" import tempfile from googleads import ad_manager from googleads import errors def main(client): report_downloader = client.GetDataDownloader(version='v201902') report_job = { 'reportQuery': { 'dimensions': ['LINE_ITEM_ID', 'LIN...
false
true
f737018c98ae5f579916c5cbea87bfb14e79c2f3
1,055
py
Python
src/libs/utils/config.py
rjarman/Bus-Mama-Python-Server
35da2cd42c5affaa0e8d2f371bbe4735bab90082
[ "MIT" ]
6
2020-11-15T22:32:27.000Z
2021-10-14T18:26:40.000Z
src/libs/utils/config.py
rjarman/Bus-Mama-Python-Server
35da2cd42c5affaa0e8d2f371bbe4735bab90082
[ "MIT" ]
null
null
null
src/libs/utils/config.py
rjarman/Bus-Mama-Python-Server
35da2cd42c5affaa0e8d2f371bbe4735bab90082
[ "MIT" ]
null
null
null
import os class Config: __dir = os.path.dirname(__file__) SERVER = { 'host': 'localhost', 'port': 8080 } PATH = { 'question_ans': __dir + '/../../data/bangla_questions_ans.pkl', 'question_domain': __dir + '/../../data/bangla_questions_domain.pkl', 'original_qu...
26.375
95
0.559242
import os class Config: __dir = os.path.dirname(__file__) SERVER = { 'host': 'localhost', 'port': 8080 } PATH = { 'question_ans': __dir + '/../../data/bangla_questions_ans.pkl', 'question_domain': __dir + '/../../data/bangla_questions_domain.pkl', 'original_qu...
true
true
f73702cc6c0a3f85d13ce025224e1744ed193865
2,721
py
Python
projects/sachinl0har/chatbots/helper.py
Dalekvim/Python
dacc73c319d835f7cda3177c2fdd7c4328828cb9
[ "MIT" ]
null
null
null
projects/sachinl0har/chatbots/helper.py
Dalekvim/Python
dacc73c319d835f7cda3177c2fdd7c4328828cb9
[ "MIT" ]
null
null
null
projects/sachinl0har/chatbots/helper.py
Dalekvim/Python
dacc73c319d835f7cda3177c2fdd7c4328828cb9
[ "MIT" ]
null
null
null
from datetime import datetime import pyttsx3 import speech_recognition as sr engine = pyttsx3.init() def say(sentence: str): print(sentence) engine.say(sentence) engine.runAndWait() def recognize_speech_from_mic(recognizer, microphone): """Transcribe speech from recorded from `microphone`. ...
29.576087
109
0.652334
from datetime import datetime import pyttsx3 import speech_recognition as sr engine = pyttsx3.init() def say(sentence: str): print(sentence) engine.say(sentence) engine.runAndWait() def recognize_speech_from_mic(recognizer, microphone): if not isinstance(recognizer, sr.Recognizer): ...
true
true
f73702db17fa780e5ecc587ea13c83b999a843d2
7,239
py
Python
opsgenie_swagger/models/action_categorized.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
null
null
null
opsgenie_swagger/models/action_categorized.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
null
null
null
opsgenie_swagger/models/action_categorized.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
1
2020-11-07T11:27:13.000Z
2020-11-07T11:27:13.000Z
# coding: utf-8 """ OpsGenie REST API OpsGenie OpenAPI Specification # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from opsgenie_swagger.models.ack_integration_action import AckI...
28.956
121
0.611687
import pprint import re import six from opsgenie_swagger.models.ack_integration_action import AckIntegrationAction from opsgenie_swagger.models.add_note_integration_action import AddNoteIntegrationAction from opsgenie_swagger.models.close_integration_action import CloseIntegrationAction from opsgenie_swag...
true
true
f73702ffad0e52858fde93f47f5e9dda3b76f954
6,651
py
Python
aat/engine/dispatch/utils.py
mthomascarcamo/aat
fd86f513ccf79625516d2236be655498b24ec742
[ "Apache-2.0" ]
305
2020-02-24T02:25:43.000Z
2022-03-26T22:53:43.000Z
aat/engine/dispatch/utils.py
mthomascarcamo/aat
fd86f513ccf79625516d2236be655498b24ec742
[ "Apache-2.0" ]
79
2020-02-20T21:00:58.000Z
2022-03-27T14:06:26.000Z
aat/engine/dispatch/utils.py
mthomascarcamo/aat
fd86f513ccf79625516d2236be655498b24ec742
[ "Apache-2.0" ]
71
2020-05-10T11:52:25.000Z
2022-03-29T07:51:48.000Z
import asyncio from datetime import datetime from typing import Any, Callable, List, Optional, Union, TYPE_CHECKING from aat import AATException from aat.config import ExitRoutine, InstrumentType, TradingType from aat.core import Instrument, ExchangeType, Event, Order, Trade, OrderBook from aat.exchange import Exchang...
36.745856
93
0.615547
import asyncio from datetime import datetime from typing import Any, Callable, List, Optional, Union, TYPE_CHECKING from aat import AATException from aat.config import ExitRoutine, InstrumentType, TradingType from aat.core import Instrument, ExchangeType, Event, Order, Trade, OrderBook from aat.exchange import Exchang...
true
true
f73703158d8c71193bd5ca312a83857462b4fddb
296
py
Python
casier_closing/casier_closing/doctype/cashier_closing_payments/cashier_closing_payments.py
Lewinta/Cashier-Closing
9ad639c9d743465f028335d2d4a59cdea7dfbc85
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
casier_closing/casier_closing/doctype/cashier_closing_payments/cashier_closing_payments.py
Lewinta/Cashier-Closing
9ad639c9d743465f028335d2d4a59cdea7dfbc85
[ "MIT" ]
null
null
null
casier_closing/casier_closing/doctype/cashier_closing_payments/cashier_closing_payments.py
Lewinta/Cashier-Closing
9ad639c9d743465f028335d2d4a59cdea7dfbc85
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class CashierClosingPayments(Document): pass
26.909091
68
0.783784
from __future__ import unicode_literals import frappe from frappe.model.document import Document class CashierClosingPayments(Document): pass
true
true
f7370323b15752e3f6b19164f6d5184566958a80
318
py
Python
listtocommaseparated.py
serhii73/PyTricks
cae22a0960a7bf9a39c7fb3227e283c3b86bd05b
[ "MIT" ]
3,271
2015-03-19T11:27:39.000Z
2022-03-19T03:00:37.000Z
listtocommaseparated.py
serhii73/PyTricks
cae22a0960a7bf9a39c7fb3227e283c3b86bd05b
[ "MIT" ]
78
2015-03-19T09:45:09.000Z
2020-12-24T08:47:15.000Z
listtocommaseparated.py
serhii73/PyTricks
cae22a0960a7bf9a39c7fb3227e283c3b86bd05b
[ "MIT" ]
531
2015-03-19T11:12:52.000Z
2022-03-23T15:07:07.000Z
#! /usr/bin/env python3 """converts list to comma separated string""" items = ['foo', 'bar', 'xyz'] print (','.join(items)) """list of numbers to comma separated""" numbers = [2, 3, 5, 10] print (','.join(map(str, numbers))) """list of mix data""" data = [2, 'hello', 3, 3.4] print (','.join(map(str, data)))
16.736842
45
0.584906
items = ['foo', 'bar', 'xyz'] print (','.join(items)) numbers = [2, 3, 5, 10] print (','.join(map(str, numbers))) data = [2, 'hello', 3, 3.4] print (','.join(map(str, data)))
true
true
f7370371c94b70b03a4200ec6d26067a36ac96a6
587
py
Python
setup.py
napyk/foamfile
d5b575c35f3461b776b91b5640d20f7eae8a30de
[ "MIT" ]
1
2020-10-02T09:27:23.000Z
2020-10-02T09:27:23.000Z
setup.py
napyk/foamfile
d5b575c35f3461b776b91b5640d20f7eae8a30de
[ "MIT" ]
1
2020-08-19T12:54:53.000Z
2020-08-19T15:42:32.000Z
setup.py
napyk/foamfile
d5b575c35f3461b776b91b5640d20f7eae8a30de
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open("README.md", 'r') as f: long_description = f.read() with open('requirements.txt') as f: required = f.read().splitlines() setup(name="foamfile", version="0.11", description='OpenFOAM config file parser', long_description=long_description,...
29.35
52
0.684838
from setuptools import setup, find_packages with open("README.md", 'r') as f: long_description = f.read() with open('requirements.txt') as f: required = f.read().splitlines() setup(name="foamfile", version="0.11", description='OpenFOAM config file parser', long_description=long_description,...
true
true
f73703bc54cf082a12df11580aba39b827d10c7e
3,594
py
Python
app/api/resources/user.py
quanpower/sitp
082f244dd35c5e881b332a624d4808f3e9e81a96
[ "Apache-2.0" ]
null
null
null
app/api/resources/user.py
quanpower/sitp
082f244dd35c5e881b332a624d4808f3e9e81a96
[ "Apache-2.0" ]
4
2020-03-24T15:46:19.000Z
2022-03-08T21:09:16.000Z
app/api/resources/user.py
quanpower/sitp
082f244dd35c5e881b332a624d4808f3e9e81a96
[ "Apache-2.0" ]
null
null
null
from flask import request, jsonify, make_response from flask_restful import Resource, reqparse, abort import time import datetime import json from app.models import User from app import db class Register(Resource): def get(self): pass def post(self): # parser = reqparse.RequestParser() ...
22.89172
102
0.484975
from flask import request, jsonify, make_response from flask_restful import Resource, reqparse, abort import time import datetime import json from app.models import User from app import db class Register(Resource): def get(self): pass def post(self): ...
true
true
f73703c2202b96b3c3d11b95265204f9ab4eb572
5,248
py
Python
neutron/debug/commands.py
gampel/neutron
51a6260266dc59c066072ca890ad9c40b1aad6cf
[ "Apache-2.0" ]
10
2015-09-22T10:22:53.000Z
2016-02-25T06:12:05.000Z
neutron/debug/commands.py
gampel/neutron
51a6260266dc59c066072ca890ad9c40b1aad6cf
[ "Apache-2.0" ]
8
2015-05-06T07:51:19.000Z
2015-07-09T08:15:09.000Z
neutron/debug/commands.py
gampel/neutron
51a6260266dc59c066072ca890ad9c40b1aad6cf
[ "Apache-2.0" ]
3
2015-10-23T15:22:18.000Z
2022-03-16T16:32:54.000Z
# Copyright 2012, Nachi Ueno, NTT MCL, 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 # # U...
33.426752
79
0.638338
from cliff import lister from neutronclient.common import utils from neutronclient.neutron import v2_0 as client from neutronclient.neutron.v2_0 import port from neutron.i18n import _LI from neutron.openstack.common import log as logging class ProbeCommand(client.NeutronCommand): log = logging.get...
true
true
f73704698efd7b42a3f6e3afa5f4bb3127779a69
2,847
py
Python
opensanctions/crawlers/pl_mswia_sanctions.py
opensanctions/opennames
39675797b0e70e71f54edff2b8e623e23aef9c15
[ "MIT" ]
3
2017-04-14T21:27:07.000Z
2017-04-25T14:57:22.000Z
opensanctions/crawlers/pl_mswia_sanctions.py
opensanctions/opennames
39675797b0e70e71f54edff2b8e623e23aef9c15
[ "MIT" ]
null
null
null
opensanctions/crawlers/pl_mswia_sanctions.py
opensanctions/opennames
39675797b0e70e71f54edff2b8e623e23aef9c15
[ "MIT" ]
null
null
null
from lxml import html from normality import collapse_spaces, slugify from pantomime.types import HTML from opensanctions.core import Context from opensanctions import helpers as h TYPES = {"OSOBY": "Person", "PODMIOTY": "Company"} CHOPSKA = [ ("Nr NIP", "taxNumber"), ("NIP", "taxNumber"), ("Nr KRS", "regi...
38.472973
84
0.551458
from lxml import html from normality import collapse_spaces, slugify from pantomime.types import HTML from opensanctions.core import Context from opensanctions import helpers as h TYPES = {"OSOBY": "Person", "PODMIOTY": "Company"} CHOPSKA = [ ("Nr NIP", "taxNumber"), ("NIP", "taxNumber"), ("Nr KRS", "regi...
true
true
f73704a096295e412e1e98c15724f6c1ea370176
639
py
Python
test/tests/python-imports/container.py
Vogtinator/official-images
632a6171cc8a5d59bfb45ca58f12905dcf351efd
[ "Apache-2.0" ]
45
2016-06-03T01:02:19.000Z
2022-03-25T16:24:46.000Z
test/tests/python-imports/container.py
skar10/official-images
3f7c529df214db013379b7ec78e00b736f527c3a
[ "Apache-2.0" ]
6
2015-08-16T20:16:40.000Z
2019-03-11T22:17:02.000Z
test/tests/python-imports/container.py
skar10/official-images
3f7c529df214db013379b7ec78e00b736f527c3a
[ "Apache-2.0" ]
7
2015-03-20T20:26:18.000Z
2021-04-22T02:57:30.000Z
import curses import readline import bz2 assert(bz2.decompress(bz2.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS') import platform isNotPypy = platform.python_implementation() != 'PyPy' isCaveman = platform.python_version_tuple()[0] == '2' if isCaveman: import gdbm else: import db...
26.625
110
0.70892
import curses import readline import bz2 assert(bz2.decompress(bz2.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS') import platform isNotPypy = platform.python_implementation() != 'PyPy' isCaveman = platform.python_version_tuple()[0] == '2' if isCaveman: import gdbm else: import db...
true
true
f73704a61b3e5af1dc00be48aae8a0f7a2220c52
2,046
py
Python
tensorflow_federated/tools/runtime/remote_executor_service.py
iahsanujunda/federated
109a5653a305dc9d4bcbafc259257add4dc70365
[ "Apache-2.0" ]
5
2020-06-04T20:10:25.000Z
2020-07-22T02:15:38.000Z
tensorflow_federated/tools/runtime/remote_executor_service.py
iahsanujunda/federated
109a5653a305dc9d4bcbafc259257add4dc70365
[ "Apache-2.0" ]
5
2020-07-20T13:39:12.000Z
2020-08-27T18:00:56.000Z
tensorflow_federated/tools/runtime/remote_executor_service.py
iahsanujunda/federated
109a5653a305dc9d4bcbafc259257add4dc70365
[ "Apache-2.0" ]
1
2022-02-27T18:31:12.000Z
2022-02-27T18:31:12.000Z
# Copyright 2019, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
35.275862
80
0.713099
from absl import app from absl import flags import grpc import tensorflow_federated as tff FLAGS = flags.FLAGS flags.DEFINE_integer('port', '8000', 'port to listen on') flags.DEFINE_integer('threads', '10', 'number of worker threads in thread pool') flags.DEFINE_string('private_key', '', 'the private ke...
true
true
f73704e43035b72c9407e81489cebe9f36aaa5ee
4,901
py
Python
omniglot_dataset.py
yardenas/meta-learning-tutorial
c5154eae85f6255f58fe6028ab630e3499238b3a
[ "MIT" ]
null
null
null
omniglot_dataset.py
yardenas/meta-learning-tutorial
c5154eae85f6255f58fe6028ab630e3499238b3a
[ "MIT" ]
null
null
null
omniglot_dataset.py
yardenas/meta-learning-tutorial
c5154eae85f6255f58fe6028ab630e3499238b3a
[ "MIT" ]
null
null
null
from typing import Iterator, List, Tuple import os import random import numpy as np from tensorflow import data as tfd from tensorflow import image as tfi from tensorflow import io as tfio from tensorflow import dtypes import tensorflow as tf from google_drive_downloader import GoogleDriveDownloader class Omniglo...
36.574627
79
0.63232
from typing import Iterator, List, Tuple import os import random import numpy as np from tensorflow import data as tfd from tensorflow import image as tfi from tensorflow import io as tfio from tensorflow import dtypes import tensorflow as tf from google_drive_downloader import GoogleDriveDownloader class Omniglo...
true
true
f737051d6a59d19696cc9c1e64c8fb827a9600d5
13,274
py
Python
modeling/backbones/senet.py
zyxwvu321/Classifer_SSL_Longtail
e6c09414c49e695b0f4221a3c6245ae3929a1788
[ "MIT" ]
null
null
null
modeling/backbones/senet.py
zyxwvu321/Classifer_SSL_Longtail
e6c09414c49e695b0f4221a3c6245ae3929a1788
[ "MIT" ]
null
null
null
modeling/backbones/senet.py
zyxwvu321/Classifer_SSL_Longtail
e6c09414c49e695b0f4221a3c6245ae3929a1788
[ "MIT" ]
null
null
null
""" ResNet code gently borrowed from https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py """ from __future__ import print_function, division, absolute_import from collections import OrderedDict import math import torch import torch.nn as nn from torch.utils import model_zoo __all__ = ['SENet', '...
36.97493
98
0.547989
from __future__ import print_function, division, absolute_import from collections import OrderedDict import math import torch import torch.nn as nn from torch.utils import model_zoo __all__ = ['SENet', 'senet154', 'se_resnet50', 'se_resnet101', 'se_resnet152', 'se_resnext50_32x4d', 'se_resnext101_32x4d'] p...
true
true