hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
031f2517ad5b48737d5e94763b33c3372f9535b7 | 8,161 | py | Python | cinder/volume/drivers/coprhd/fc.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/coprhd/fc.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/coprhd/fc.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 EMC Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 35.951542 | 79 | 0.626761 |
031f3334a3b37b0eba41799df3053cc268b2746a | 2,500 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/channels/invite_to_channel.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/channels/invite_to_channel.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/channels/invite_to_channel.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 32.051282 | 103 | 0.6256 |
031f4065ec6d3d8fd5abf73aa7ffcae32ea4fbda | 791 | py | Python | examples/drawing_to_existing_ax.py | yumemi5k/multiflexxlib | d30c149eebbe40dcf5950e21efed2c4f286859fd | [
"MIT"
] | 1 | 2019-04-22T02:12:12.000Z | 2019-04-22T02:12:12.000Z | examples/drawing_to_existing_ax.py | yumemi5k/multiflexxlib | d30c149eebbe40dcf5950e21efed2c4f286859fd | [
"MIT"
] | null | null | null | examples/drawing_to_existing_ax.py | yumemi5k/multiflexxlib | d30c149eebbe40dcf5950e21efed2c4f286859fd | [
"MIT"
] | 1 | 2018-10-17T10:44:51.000Z | 2018-10-17T10:44:51.000Z | # Draws into existing matplotlib axes object, for when you absolutely need to control everything.
import multiflexxlib as mfl
import matplotlib.pyplot as plt
df = mfl.read_and_bin()
f, axes = plt.subplots(nrows=2, ncols=2, sharex=True, sharey=True)
ax = axes[0, 0]
mfl.draw_voronoi_patch(ax, df.data.loc[2]) # Referenc... | 34.391304 | 106 | 0.766119 |
031f7c31633161d9d0e4a947c3be2d700d5684a3 | 366 | py | Python | cracking the code interview/check_root.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | cracking the code interview/check_root.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | cracking the code interview/check_root.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | def is_perfect( value, exponent ):
root = value ** ( 1.0 / exponent )
root = long( round( root ) )
if root ** exponent == value:
return root
else:
return -1
p=int(raw_input())
while p:
m,n=map(int, raw_input().split())
p=p-1
r=is_perfect(n,m)
print r
# if :
# ... | 19.263158 | 38 | 0.508197 |
031f81a1ed064d1f315956d91bdf518a8e517a50 | 18,801 | py | Python | raiden/tests/unit/transfer/test_source_routing.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | raiden/tests/unit/transfer/test_source_routing.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | 12 | 2019-08-09T19:12:17.000Z | 2019-12-05T15:49:29.000Z | raiden/tests/unit/transfer/test_source_routing.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | import random
from raiden.messages.metadata import Metadata, RouteMetadata
from raiden.messages.transfers import LockedTransfer, RefundTransfer
from raiden.routing import resolve_routes
from raiden.storage.serialization import DictSerializer
from raiden.tests.utils import factories
from raiden.tests.utils.events impor... | 39.581053 | 98 | 0.744854 |
031f90e59e65cc4353203b969d6318a5bafbe2ac | 13,334 | py | Python | influxdb_client/domain/check_base.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/domain/check_base.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/check_base.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from influxd... | 26.883065 | 253 | 0.574096 |
031fbd1637edc2cfa0fa6e56b7a5b6262fbbbb55 | 839 | py | Python | terrascript/brightbox/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/brightbox/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/brightbox/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/brightbox/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class brightbox_api_client(terrascript.Resource):
pass
class brightbox_cloudip(terrascript.Resource... | 16.78 | 79 | 0.789035 |
031fcb4d068af729b515c2ba08d6c9b3baa7d0d7 | 5,916 | py | Python | demos/demo2.py | combra-lab/combra_loihi | 230bc970f4d4f15a83f583fe15a8a59904a69f18 | [
"MIT"
] | 4 | 2019-02-14T17:42:52.000Z | 2021-12-25T21:09:54.000Z | demos/demo2.py | michaelgzt/combra_loihi | 372193969ec67872374c742b03e6601271fc95db | [
"MIT"
] | null | null | null | demos/demo2.py | michaelgzt/combra_loihi | 372193969ec67872374c742b03e6601271fc95db | [
"MIT"
] | 6 | 2018-12-06T14:13:12.000Z | 2022-03-01T00:05:40.000Z | """
MIT License
Copyright (c) 2018 Guangzhi Tang
Copyright (c) 2018 Arpit Shah
Copyright (c) 2018 Computational Brain Lab, Computer Science Department, Rutgers University
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), ... | 36.294479 | 113 | 0.712813 |
031fdbf7ed7baf10797d5a97eb9575236dcb0b8b | 2,195 | py | Python | tests/nn/data/test_training.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/nn/data/test_training.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/nn/data/test_training.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | import numpy as np
import tensorflow as tf
from sleap.nn.system import use_cpu_only; use_cpu_only() # hide GPUs for test
import sleap
from sleap.nn.data.providers import LabelsReader
from sleap.nn.data import training
def test_split_labels_reader(min_labels):
labels = sleap.Labels([min_labels[0], min_labels[0],... | 43.039216 | 92 | 0.688383 |
03200bcf61b9a8c612613a94d773218eb9698aa3 | 1,964 | py | Python | scripts/find_plugin_test_nexus_file.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | scripts/find_plugin_test_nexus_file.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | scripts/find_plugin_test_nexus_file.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 25 09:20:34 2021
@author: qmm55171
"""
# find which test plugin lists contain a plugin class
# find the test module that call these plugin lists
import argparse
import h5py
import os
from pathlib import Path
def __option_parser(doc=True):
"""... | 30.6875 | 93 | 0.595723 |
032013e80b0c5a6116d31c70643d52564684a4f0 | 3,864 | py | Python | instascrape/core/_json_flattener.py | fo0nikens/instascrape | 699dd2169a96438d1d71bce5b1401fd5c5f0e531 | [
"MIT"
] | 1 | 2021-03-10T03:36:43.000Z | 2021-03-10T03:36:43.000Z | instascrape/core/_json_flattener.py | fo0nikens/instascrape | 699dd2169a96438d1d71bce5b1401fd5c5f0e531 | [
"MIT"
] | null | null | null | instascrape/core/_json_flattener.py | fo0nikens/instascrape | 699dd2169a96438d1d71bce5b1401fd5c5f0e531 | [
"MIT"
] | null | null | null | from collections import deque
from collections.abc import MutableMapping
from typing import Any, Dict, List, Union
JSONDict = Dict[str, Any]
class FlatJSONDict(MutableMapping):
def __init__(self, json_dict):
"""Takes a dictionary with JSON-like data and creates an instance that
behaves ... | 30.912 | 117 | 0.598602 |
0320149ab7ee85378d1f09b0d2664a5227b23c50 | 1,278 | py | Python | demo/scripts/processing/rels/variant_to_gene.py | elswob/neo4j-build-pipeline | 55161993b89b8137437dfa5d93fa1895eba90f62 | [
"MIT"
] | 5 | 2020-10-23T17:08:36.000Z | 2022-01-05T14:06:16.000Z | demo/scripts/processing/rels/variant_to_gene.py | elswob/neo4j-build-pipeline | 55161993b89b8137437dfa5d93fa1895eba90f62 | [
"MIT"
] | 5 | 2020-10-29T16:15:43.000Z | 2021-09-06T11:17:48.000Z | demo/scripts/processing/rels/variant_to_gene.py | elswob/neo4j-build-pipeline | 55161993b89b8137437dfa5d93fa1895eba90f62 | [
"MIT"
] | 1 | 2021-04-20T10:31:13.000Z | 2021-04-20T10:31:13.000Z | import os
import re
import gzip
import sys
import csv
import pandas as pd
from loguru import logger
#################### leave me heare please :) ########################
from workflow.scripts.utils.general import setup, get_source
from workflow.scripts.utils.writers import (
create_constraints,
create_impor... | 21.661017 | 76 | 0.580595 |
03201acb899806cd767ef85c3dadb6b36da16568 | 1,902 | py | Python | tests/mdts/lib/failure/netif_failure.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | 1 | 2015-05-19T08:36:55.000Z | 2015-05-19T08:36:55.000Z | tests/mdts/lib/failure/netif_failure.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | null | null | null | tests/mdts/lib/failure/netif_failure.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | 1 | 2018-10-25T05:52:05.000Z | 2018-10-25T05:52:05.000Z | # Copyright 2014 Midokura SARL
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 35.886792 | 74 | 0.657729 |
03206fec2fa830ffd06b08d1ff606e8976e2be5f | 4,471 | py | Python | sasmodels/models/guinier_porod.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | sasmodels/models/guinier_porod.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | sasmodels/models/guinier_porod.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | r"""
Calculates the scattering for a generalized Guinier/power law object.
This is an empirical model that can be used to determine the size
and dimensionality of scattering objects, including asymmetric objects
such as rods or platelets, and shapes intermediate between spheres
and rods or between rods and platelets, a... | 32.398551 | 91 | 0.600313 |
03206ff9cd56ff552e32fa735b09c426803235cc | 1,378 | py | Python | scripts/batch/remote_client.py | gitdaniel228/realtor | 4366d57b064be87b31c8a036b3ed7a99b2036461 | [
"BSD-3-Clause"
] | null | null | null | scripts/batch/remote_client.py | gitdaniel228/realtor | 4366d57b064be87b31c8a036b3ed7a99b2036461 | [
"BSD-3-Clause"
] | null | null | null | scripts/batch/remote_client.py | gitdaniel228/realtor | 4366d57b064be87b31c8a036b3ed7a99b2036461 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python2.5
#
# Copyright 2009 Roman Nurik
#
# 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... | 30.622222 | 80 | 0.743832 |
0320720a2265e1eaaf48765d53c6b3170467eb75 | 2,558 | py | Python | FinChart/SeriesAbstract.py | ppaanngggg/FinChart | 0f0daf8befe013d14b2035e6c8a63c61b9e3cea9 | [
"MIT"
] | 2 | 2019-05-15T11:36:19.000Z | 2020-08-15T07:48:28.000Z | FinChart/SeriesAbstract.py | ppaanngggg/FinChart | 0f0daf8befe013d14b2035e6c8a63c61b9e3cea9 | [
"MIT"
] | null | null | null | FinChart/SeriesAbstract.py | ppaanngggg/FinChart | 0f0daf8befe013d14b2035e6c8a63c61b9e3cea9 | [
"MIT"
] | null | null | null | import typing
from bisect import bisect_right, bisect_left
from collections import namedtuple
from PyQt5.Qt import QColor
from PyQt5.QtChart import QChart, QValueAxis
from PyQt5.QtWidgets import QGroupBox, QLineEdit, QFormLayout
DataTuple = namedtuple("DataTuple", ["x", "y"])
class SeriesAbstract:
BAR = "bar"
... | 26.645833 | 88 | 0.595387 |
03207eab846362914f16d771604bc705515a3207 | 1,724 | py | Python | platon/_utils/request.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platon/_utils/request.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platon/_utils/request.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | import os
from typing import (
Any,
)
from aiohttp import (
ClientSession,
ClientTimeout,
)
from platon_typing import (
URI,
)
import lru
import requests
from platon._utils.caching import (
generate_cache_key,
)
def get_default_http_endpoint() -> URI:
return URI(os.environ.get('WEB3_HTTP_PRO... | 26.9375 | 90 | 0.682715 |
03207f4985ef4ceb4a85d95a763dfd7ca3695e43 | 2,936 | py | Python | tests/common/test_op/ascend/dropout.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_op/ascend/dropout.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_op/ascend/dropout.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 31.913043 | 126 | 0.655995 |
03208bbcc954792150cb50ca928ecf32fab79e5e | 113,580 | py | Python | ThirdParty/Twisted/twisted/test/test_ftp.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 1 | 2021-10-13T01:57:14.000Z | 2021-10-13T01:57:14.000Z | ThirdParty/Twisted/twisted/test/test_ftp.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | ThirdParty/Twisted/twisted/test/test_ftp.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 5 | 2015-10-09T04:12:29.000Z | 2021-12-15T16:57:11.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
FTP tests.
"""
import os
import errno
from StringIO import StringIO
import getpass
from zope.interface import implements
from zope.interface.verify import verifyClass
from twisted.trial import unittest, util
from twisted.python.randbytes im... | 35.460506 | 94 | 0.602289 |
03209141ea27b64d7180bf92956b1eabfbcfa276 | 7,190 | py | Python | LinkedInBot.py | MatanFreedman/LinkedInBot | 5592e339465640750a6141c74586b6f787191da5 | [
"MIT"
] | 5 | 2021-11-10T22:23:48.000Z | 2022-02-20T20:04:40.000Z | LinkedInBot.py | MatanFreedman/LinkedInBot | 5592e339465640750a6141c74586b6f787191da5 | [
"MIT"
] | null | null | null | LinkedInBot.py | MatanFreedman/LinkedInBot | 5592e339465640750a6141c74586b6f787191da5 | [
"MIT"
] | 6 | 2021-09-19T12:27:07.000Z | 2022-02-04T09:27:55.000Z | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import TimeoutException, NoSuchElementException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import... | 33.133641 | 105 | 0.593324 |
0320f45ef8ab3897f7acc3b2fc82bae36e6b3884 | 2,131 | py | Python | setup.py | echo-ray/hyperlearn | 497315cbcf0c0ff25e9f7a93c142d9d66b753465 | [
"Apache-2.0"
] | null | null | null | setup.py | echo-ray/hyperlearn | 497315cbcf0c0ff25e9f7a93c142d9d66b753465 | [
"Apache-2.0"
] | null | null | null | setup.py | echo-ray/hyperlearn | 497315cbcf0c0ff25e9f7a93c142d9d66b753465 | [
"Apache-2.0"
] | null | null | null |
from setuptools import setup
install_requires = [
'numpy >= 1.13.0',
'torchvision >= 0.2.0',
'scikit-learn >= 0.18.0',
'scipy >= 1.0.0',
'pandas >= 0.21.0',
'torch >= 0.4.0',
'numba >= 0.37.0',
'psutil >= 4.0.0'
]
dependency_links = [
]
de... | 32.287879 | 77 | 0.618958 |
0320f924d75751de563f96dd624530038a365623 | 3,799 | py | Python | ckan/cli/datastore.py | larrycameron80/ckan | fbab8f51b36a293206fdd998d71ece27d2565951 | [
"Apache-2.0"
] | 1 | 2019-11-16T05:13:21.000Z | 2019-11-16T05:13:21.000Z | ckan/cli/datastore.py | larrycameron80/ckan | fbab8f51b36a293206fdd998d71ece27d2565951 | [
"Apache-2.0"
] | 4 | 2020-03-24T17:53:23.000Z | 2021-03-31T19:19:03.000Z | ckan/cli/datastore.py | larrycameron80/ckan | fbab8f51b36a293206fdd998d71ece27d2565951 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
import logging
import os
import re
import click
from ckan.cli import error_shout
from ckan.common import config
import ckanext.datastore as datastore_module
from ckanext.datastore.backend.postgres import identifier
from ckanext.datastore.blueprint import DUMP_FORMATS, dump_to
log = logging.getLog... | 29.913386 | 77 | 0.643064 |
0321176338bc37bc468441d2fbb0bd2b1dd9d6b4 | 11,091 | py | Python | yggdrasil/drivers/CPPModelDriver.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/drivers/CPPModelDriver.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/drivers/CPPModelDriver.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | import os
import copy
from yggdrasil import platform
from yggdrasil.drivers.CModelDriver import (
CCompilerBase, CModelDriver, GCCCompiler, ClangCompiler, MSVCCompiler,
ClangLinker)
class CPPCompilerBase(CCompilerBase):
r"""Base class for C++ compilers."""
languages = ['c++']
default_executable_en... | 38.510417 | 88 | 0.582905 |
03213c76c65f51b660d4ee3a7c1d5e20ed7a933d | 6,750 | py | Python | scripts/pipeline/automl_pipeline.py | ts-azure-services/aml-automl-pipeline | 1626724b00f4ed29909d15ab193f5412d197451e | [
"MIT"
] | null | null | null | scripts/pipeline/automl_pipeline.py | ts-azure-services/aml-automl-pipeline | 1626724b00f4ed29909d15ab193f5412d197451e | [
"MIT"
] | null | null | null | scripts/pipeline/automl_pipeline.py | ts-azure-services/aml-automl-pipeline | 1626724b00f4ed29909d15ab193f5412d197451e | [
"MIT"
] | 1 | 2021-09-28T23:09:29.000Z | 2021-09-28T23:09:29.000Z | # Import in data, do some processing and break up the file
#import logging
from authentication import ws
from azureml.core import Dataset, ScriptRunConfig, Environment
from azureml.core.experiment import Experiment
from azureml.core.compute import ComputeTarget
from azureml.core.runconfig import RunConfiguration, DEFAU... | 37.709497 | 125 | 0.759704 |
0321b76c396dd8ec22e1c854369f00ca89c39290 | 34,874 | py | Python | 02_end_to_end_machine_learning_project.py | mbalassi/handson-ml | 4817bf78681b02df489d7823cf4f0cd333497df6 | [
"Apache-2.0"
] | null | null | null | 02_end_to_end_machine_learning_project.py | mbalassi/handson-ml | 4817bf78681b02df489d7823cf4f0cd333497df6 | [
"Apache-2.0"
] | null | null | null | 02_end_to_end_machine_learning_project.py | mbalassi/handson-ml | 4817bf78681b02df489d7823cf4f0cd333497df6 | [
"Apache-2.0"
] | null | null | null |
# coding: utf-8
# **Chapter 2 – End-to-end Machine Learning project**
#
# *Welcome to Machine Learning Housing Corp.! Your task is to predict median house values in Californian districts, given a number of features from these districts.*
#
# *This notebook contains all the sample code and solutions to the exercices... | 24.6983 | 628 | 0.735906 |
0321b91ed62572261cba000e780e5e27c0bf63da | 1,117 | py | Python | markdown_frames/pandas_dataframe.py | exacaster/markdown_frames | 7a7107f1c00f0392f600fd5d503364b5ab1a71a6 | [
"MIT"
] | 4 | 2022-02-04T13:23:37.000Z | 2022-02-21T00:23:12.000Z | markdown_frames/pandas_dataframe.py | exacaster/markdown_frames | 7a7107f1c00f0392f600fd5d503364b5ab1a71a6 | [
"MIT"
] | 2 | 2022-02-04T14:31:15.000Z | 2022-02-07T06:52:46.000Z | markdown_frames/pandas_dataframe.py | exacaster/markdown_frames | 7a7107f1c00f0392f600fd5d503364b5ab1a71a6 | [
"MIT"
] | null | null | null | """Functions that parse markdown table or CSV file to Pandas DataFrame."""
import pandas as pd
from markdown_frames.table import Table
from markdown_frames.utils import parse_file, parse_markdown
def pandas_df(markdown_table: str) -> pd.DataFrame:
"""Returns a Pandas DataFrame with specified types.
Args:
... | 27.243902 | 95 | 0.692032 |
0321c83a492fedbbcf9a4ee3a1f78e831985510c | 187 | py | Python | flyingpigeon/__init__.py | tlvu/flyingpigeon | 2fb3eb4f32c3d2c18ec266834d113dc710e24ffc | [
"Apache-2.0"
] | null | null | null | flyingpigeon/__init__.py | tlvu/flyingpigeon | 2fb3eb4f32c3d2c18ec266834d113dc710e24ffc | [
"Apache-2.0"
] | null | null | null | flyingpigeon/__init__.py | tlvu/flyingpigeon | 2fb3eb4f32c3d2c18ec266834d113dc710e24ffc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for Flyingpigeon."""
from .__version__ import __author__, __email__, __version__ # noqa: F401
from .wsgi import application # noqa: F401
| 23.375 | 73 | 0.705882 |
0321ddbbeb77416668ffee3056c3592b1ea12f85 | 1,017 | py | Python | setup.py | AlchemicalChest/gaussian-process-svi | 56111e9a125cdd322473685b1b7ef875d584653e | [
"MIT"
] | null | null | null | setup.py | AlchemicalChest/gaussian-process-svi | 56111e9a125cdd322473685b1b7ef875d584653e | [
"MIT"
] | null | null | null | setup.py | AlchemicalChest/gaussian-process-svi | 56111e9a125cdd322473685b1b7ef875d584653e | [
"MIT"
] | 1 | 2017-02-08T03:45:25.000Z | 2017-02-08T03:45:25.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
# Version number
version = '0.0.1'
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name = 'GPSVI',
version = version,
author = 'Ziang Zhu',
author_email = 'zhu.ziang.1... | 33.9 | 104 | 0.632252 |
0321eb7f2c832814913a750cf4ea99dd151f0135 | 247 | py | Python | ref_ts/migrations/0002_auto_20150813_1336.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | ref_ts/migrations/0002_auto_20150813_1336.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | ref_ts/migrations/0002_auto_20150813_1336.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | # -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('ref_ts', '0001_initial'),
]
operations = [
migrations.DeleteModel('RefTimeSeries'),
]
| 15.4375 | 48 | 0.611336 |
0321fa71403b7c5e423c6da916338426d6e00754 | 424 | py | Python | prefect/testing_reregistration.py | kvnkho/demos | c8c33993e00baf6a25d0ffdc44db924b327cbffa | [
"MIT"
] | 13 | 2021-05-13T23:07:17.000Z | 2022-03-19T00:00:41.000Z | prefect/testing_reregistration.py | kvnkho/demos | c8c33993e00baf6a25d0ffdc44db924b327cbffa | [
"MIT"
] | null | null | null | prefect/testing_reregistration.py | kvnkho/demos | c8c33993e00baf6a25d0ffdc44db924b327cbffa | [
"MIT"
] | 7 | 2021-06-16T18:16:55.000Z | 2022-03-21T03:34:43.000Z | from prefect import task, Flow
import time
from prefect.run_configs import KubernetesRun
from prefect.storage.github import GitHub
@task
def abc(x):
time.sleep(x)
return x
with Flow("timer flow") as flow:
secs= Parameter("secs", 1)
abc.map([secs]*5)
flow.storage = GitHub(
repo="kvnkho/demos",
path="... | 21.2 | 45 | 0.728774 |
0321fb55d8a6d33cd2e99d675c1e45629a7777d6 | 221 | py | Python | pyIsoDep/__init__.py | MattKrecicki/PYTHON-ISOTOPIC-DEPLETION-PACKAGE | ccad214de8721aa9b499ef70cd39966f18bceb76 | [
"MIT"
] | 1 | 2022-01-04T22:21:18.000Z | 2022-01-04T22:21:18.000Z | pyIsoDep/__init__.py | DanKotlyar/PYTHON-ISOTOPIC-DEPLETION-PACKAGE | d9da8be6eff4ba301f9689ce5c38a5e50856d033 | [
"MIT"
] | null | null | null | pyIsoDep/__init__.py | DanKotlyar/PYTHON-ISOTOPIC-DEPLETION-PACKAGE | d9da8be6eff4ba301f9689ce5c38a5e50856d033 | [
"MIT"
] | null | null | null | from pyIsoDep.functions import *
from pyIsoDep.data import *
from pyIsoDep.tests import *
import os
_ROOT = os.path.abspath(os.path.dirname(__file__))
def setDataPath(path):
return os.path.join(_ROOT, 'data', path)
| 22.1 | 50 | 0.751131 |
032218d5c8de69802d23c1e6f7e68ef444ed987d | 1,433 | py | Python | ilurl/utils/tf2_savers.py | CubeSkyy/ILU-RL | 676d88587e1d8638487de1b5a3f8785a7375ad1a | [
"MIT"
] | null | null | null | ilurl/utils/tf2_savers.py | CubeSkyy/ILU-RL | 676d88587e1d8638487de1b5a3f8785a7375ad1a | [
"MIT"
] | null | null | null | ilurl/utils/tf2_savers.py | CubeSkyy/ILU-RL | 676d88587e1d8638487de1b5a3f8785a7375ad1a | [
"MIT"
] | 2 | 2021-03-13T15:38:05.000Z | 2021-05-08T22:25:36.000Z | """
tf2_savers.py
"""
import pickle
from typing import Mapping, Union
import tensorflow as tf
from acme import core
PythonState = tf.train.experimental.PythonState
Checkpointable = Union[tf.Module, tf.Variable, PythonState]
class Saver:
"""
Convenience class to save tf.train.Checkpoints.
"""
... | 27.037736 | 83 | 0.685973 |
03222708a06ac4cdc95a0051628e2f3e80153ed0 | 831 | py | Python | ems/types/__init__.py | ceramyq/python-ems | dcaf41a55ed326d139ead26fee64a49d08214654 | [
"Apache-2.0"
] | null | null | null | ems/types/__init__.py | ceramyq/python-ems | dcaf41a55ed326d139ead26fee64a49d08214654 | [
"Apache-2.0"
] | null | null | null | ems/types/__init__.py | ceramyq/python-ems | dcaf41a55ed326d139ead26fee64a49d08214654 | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
#
# Copyright 2016 Opsview Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 27.7 | 74 | 0.709988 |
03224927b7cc0beb51d02e29df44fe73200fd00c | 2,670 | py | Python | gala-ragdoll/ragdoll/models/domain_manage_conf.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | gala-ragdoll/ragdoll/models/domain_manage_conf.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | gala-ragdoll/ragdoll/models/domain_manage_conf.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from ragdoll.models.base_model_ import Model
from ragdoll import util
from ragdoll.models.manage_conf import ManageConf
class DomainManageConf(Model):
"""NOTE: Th... | 28.404255 | 97 | 0.64794 |
0322a64174d11a93e9ab3e4c534a1d6ab51a01b2 | 254 | py | Python | Opencv_pil/source/numpy/version.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 60 | 2017-08-05T21:47:56.000Z | 2022-03-08T21:46:29.000Z | Opencv_pil/source/numpy/version.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2017-08-22T07:17:47.000Z | 2017-09-24T22:04:19.000Z | Opencv_pil/source/numpy/version.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 11 | 2017-09-10T16:22:21.000Z | 2021-08-09T09:24:50.000Z |
# THIS FILE IS GENERATED FROM NUMPY SETUP.PY
#
# To compare versions robustly, use `numpy.lib.NumpyVersion`
short_version = '1.11.2'
version = '1.11.2'
full_version = '1.11.2'
git_revision = ''
release = True
if not release:
version = full_version
| 19.538462 | 60 | 0.712598 |
0322ae2da305c548f5798e40aca02be27ee7458b | 1,479 | py | Python | iotronic_lightningrod/plugins/PluginSerializer.py | Zakaria-Ben/iotronic-lightning-rod | 4a3eff68bd1db2d57beee0e8c51fbb14fcc0877a | [
"Apache-2.0"
] | null | null | null | iotronic_lightningrod/plugins/PluginSerializer.py | Zakaria-Ben/iotronic-lightning-rod | 4a3eff68bd1db2d57beee0e8c51fbb14fcc0877a | [
"Apache-2.0"
] | null | null | null | iotronic_lightningrod/plugins/PluginSerializer.py | Zakaria-Ben/iotronic-lightning-rod | 4a3eff68bd1db2d57beee0e8c51fbb14fcc0877a | [
"Apache-2.0"
] | 1 | 2018-05-18T13:01:03.000Z | 2018-05-18T13:01:03.000Z | # Copyright 2017 MDSLAB - University of Messina
# 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... | 30.183673 | 78 | 0.7167 |
0322c1845a5cf646d458d60a1dfd551b3403364d | 5,971 | py | Python | tools/install_venv_common.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | null | null | null | tools/install_venv_common.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | null | null | null | tools/install_venv_common.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | null | null | null | # Copyright 2013 OpenStack Foundation
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 34.316092 | 79 | 0.601574 |
0322ebf4a9344b48ec3c7c4eef72444dc7b95c45 | 1,481 | py | Python | setup.py | leoil/nequip | 83b888797025c94b9963a508bc213a7c98da5bcb | [
"MIT"
] | 1 | 2022-03-13T10:17:53.000Z | 2022-03-13T10:17:53.000Z | setup.py | leoil/nequip | 83b888797025c94b9963a508bc213a7c98da5bcb | [
"MIT"
] | null | null | null | setup.py | leoil/nequip | 83b888797025c94b9963a508bc213a7c98da5bcb | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from pathlib import Path
# see https://packaging.python.org/guides/single-sourcing-package-version/
version_dict = {}
with open(Path(__file__).parents[0] / "nequip/_version.py") as fp:
exec(fp.read(), version_dict)
version = version_dict["__version__"]
del version_dict
... | 34.44186 | 102 | 0.642134 |
03233f37f1757d66e71d1feb79370420aaeeb001 | 12,468 | py | Python | metalibm_core/targets/common/fixed_point_backend.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | 2 | 2019-02-18T13:42:04.000Z | 2021-03-12T18:54:53.000Z | metalibm_core/targets/common/fixed_point_backend.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | null | null | null | metalibm_core/targets/common/fixed_point_backend.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
###############################################################################
# This file is part of metalibm (https://github.com/kalray/metalibm)
###############################################################################
# MIT License
#
# Copyright (c) 2018 Kalray
#
# Permission is here... | 42.993103 | 217 | 0.734681 |
03234c9428c535bdd9c1b1c98d25aee37120988b | 29,971 | py | Python | Tools/Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 54.197107 | 155 | 0.684628 |
03238910ffc838a6867c6291265c9a8b0bdec2e4 | 33,144 | py | Python | coverage/control.py | federicobond/coveragepy | e3fee935a7c7c3cdd52b28d5da41010bc6a41af1 | [
"Apache-2.0"
] | null | null | null | coverage/control.py | federicobond/coveragepy | e3fee935a7c7c3cdd52b28d5da41010bc6a41af1 | [
"Apache-2.0"
] | null | null | null | coverage/control.py | federicobond/coveragepy | e3fee935a7c7c3cdd52b28d5da41010bc6a41af1 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""Core control stuff for coverage.py."""
import atexit
import os
import platform
import sys
import time
from coverage import env
from coverage.annotate import A... | 36.704319 | 96 | 0.625513 |
0323d0d801472bad7d8ac03244a42a9169716ff5 | 4,928 | py | Python | regolith/helpers/a_proprevhelper.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | 7 | 2018-07-20T19:19:23.000Z | 2022-02-02T20:48:15.000Z | regolith/helpers/a_proprevhelper.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | 822 | 2017-11-06T21:54:58.000Z | 2022-03-31T12:25:41.000Z | regolith/helpers/a_proprevhelper.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | 43 | 2018-01-05T20:35:21.000Z | 2022-03-24T00:13:03.000Z | """Builder for Current and Pending Reports."""
import datetime as dt
import sys
import nameparser
from regolith.helpers.basehelper import DbHelperBase
from regolith.dates import month_to_str_int
from regolith.fsclient import _id_key
from regolith.tools import (
all_docs_from_collection,
)
from gooey import GooeyP... | 34.950355 | 79 | 0.52983 |
0323fd4dc574e67aba016f7d50b1977779d063cc | 202 | py | Python | practice/28.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | 1 | 2020-01-15T11:04:16.000Z | 2020-01-15T11:04:16.000Z | practice/28.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | 2 | 2021-03-31T19:36:19.000Z | 2021-06-10T22:29:26.000Z | practice/28.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | null | null | null | #Why is the error and how to fix it?
#A: A TypeError menas you are using the wrong type to make an operation. Change print(a+b) to return a+b
def foo(a, b):
print(a + b)
x = foo(2, 3) * 10
| 25.25 | 105 | 0.633663 |
0324075af34b1aeb73a87c336074776b8be362e9 | 3,171 | py | Python | tests/test_gevent.py | aarondwi/tobira | 1d8bc1a9f7ab2acd497d31b0d144d61851c9c72e | [
"MIT"
] | 8 | 2020-10-23T12:31:14.000Z | 2021-09-27T11:27:48.000Z | tests/test_gevent.py | aarondwi/tobira | 1d8bc1a9f7ab2acd497d31b0d144d61851c9c72e | [
"MIT"
] | null | null | null | tests/test_gevent.py | aarondwi/tobira | 1d8bc1a9f7ab2acd497d31b0d144d61851c9c72e | [
"MIT"
] | 2 | 2020-11-25T16:51:00.000Z | 2021-09-27T11:27:49.000Z | import unittest
from functools import partial
from gevent import spawn, joinall, sleep
from singleflight.gevent import SingleFlightGevent as SingleFlight
class TestSingleFlightGevent(unittest.TestCase):
def test_call_directly(self):
sf = SingleFlight()
# success case
counter = 0
resul... | 24.022727 | 67 | 0.587196 |
0324422f0693bc8add673e6a8bdf1f7206c5061f | 57,515 | py | Python | check/tests/test_1_0_myokit.py | MichaelClerx/cellml-validation | 72383c76bd0a69a9bb162b10ae2c7cd3d0e08b0c | [
"Apache-2.0"
] | 1 | 2019-05-06T22:55:12.000Z | 2019-05-06T22:55:12.000Z | check/tests/test_1_0_myokit.py | MichaelClerx/cellml-validation | 72383c76bd0a69a9bb162b10ae2c7cd3d0e08b0c | [
"Apache-2.0"
] | 65 | 2019-01-18T09:19:12.000Z | 2022-01-27T16:17:06.000Z | check/tests/test_1_0_myokit.py | MichaelClerx/cellml-validation | 72383c76bd0a69a9bb162b10ae2c7cd3d0e08b0c | [
"Apache-2.0"
] | null | null | null | #
# Tests CellML 1.0 validation with Myokit (CellML revamp)
#
from __future__ import absolute_import, division
from __future__ import print_function, unicode_literals
import logging
import os
import pytest
import check
from . import shared
from .. import myokit_validation as myokit
from .report import Report_1_0 as R... | 43.114693 | 79 | 0.67452 |
03246a4f88f2406ff12df08b4c6dee2cb3debd2f | 20,030 | py | Python | Bio/Phylo/PAML/_parse_codeml.py | OpenSourceCancer/biopython | 5245222e4de976bbfeb17e72ea0cde66c8da604d | [
"PostgreSQL"
] | 1 | 2015-10-07T20:34:29.000Z | 2015-10-07T20:34:29.000Z | Bio/Phylo/PAML/_parse_codeml.py | OpenSourceCancer/biopython | 5245222e4de976bbfeb17e72ea0cde66c8da604d | [
"PostgreSQL"
] | null | null | null | Bio/Phylo/PAML/_parse_codeml.py | OpenSourceCancer/biopython | 5245222e4de976bbfeb17e72ea0cde66c8da604d | [
"PostgreSQL"
] | null | null | null | # Copyright (C) 2011 by Brandon Invergo (b.invergo@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
import re
line_floats_re = re.compile("-*\d+\.\d+")
try:
float("nan")
_nan_float... | 45.112613 | 112 | 0.581478 |
032497311dc8e538402428f9e65e41b6bfb4e333 | 2,266 | py | Python | tests/nn/data/test_pipelines.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/nn/data/test_pipelines.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/nn/data/test_pipelines.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | import pytest
import numpy as np
import tensorflow as tf
from sleap.nn.system import use_cpu_only; use_cpu_only() # hide GPUs for test
import sleap
from sleap.nn.data import pipelines
def test_pipeline_concatenation():
A = pipelines.Pipeline.from_blocks(pipelines.InstanceCentroidFinder(center_on_anchor_part=Fal... | 48.212766 | 101 | 0.784643 |
03249c9d159fee637c5d892bcb97590689672ce2 | 4,692 | py | Python | scrapper.py | SophyaPerepelkina/2021-2-level-ctlr | 97ef258a74fe48c5e2151a1cecdefccc61601f07 | [
"MIT"
] | null | null | null | scrapper.py | SophyaPerepelkina/2021-2-level-ctlr | 97ef258a74fe48c5e2151a1cecdefccc61601f07 | [
"MIT"
] | null | null | null | scrapper.py | SophyaPerepelkina/2021-2-level-ctlr | 97ef258a74fe48c5e2151a1cecdefccc61601f07 | [
"MIT"
] | null | null | null | """
Scrapper implementation
"""
from datetime import datetime
import json
import shutil
from bs4 import BeautifulSoup
import requests
from constants import ASSETS_PATH, CRAWLER_CONFIG_PATH
from core_utils.article import Article
class IncorrectURLError(Exception):
"""
Seed URL does not match standard pattern
... | 29.696203 | 119 | 0.635337 |
0324bcc04a29d4f503f48557e694dae7f87cc1a5 | 2,818 | py | Python | tests/configs/simple-atomic-mp.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | tests/configs/simple-atomic-mp.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | tests/configs/simple-atomic-mp.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | 2 | 2018-11-06T18:41:38.000Z | 2019-01-30T00:51:40.000Z | # Copyright (c) 2006-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this ... | 39.138889 | 72 | 0.735628 |
0324fa46448cd179a4837d826365c20a29abd809 | 249 | py | Python | user_notifications/signals.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-09-02T12:45:31.000Z | 2018-02-10T10:18:11.000Z | user_notifications/signals.py | Socialsquare/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 17 | 2020-03-24T15:58:05.000Z | 2022-02-10T08:08:57.000Z | user_notifications/signals.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2018-01-05T08:02:18.000Z | 2018-01-05T08:02:18.000Z | ''' Django notifications signal file '''
# -*- coding: utf-8 -*-
from django.dispatch import Signal
notify = Signal(providing_args=[
'recipient',
'actor',
'verb',
'target',
'description',
'timestamp',
'level'
])
| 17.785714 | 40 | 0.578313 |
032504d822b9e9a029da3a5269934c28ebba8d0b | 2,066 | py | Python | tests/unit/test_robots_txt.py | Etiqa/bromine | cabf0931f5a06796c26fdc7fb9f7ecf147554fd5 | [
"BSD-2-Clause"
] | 2 | 2018-09-20T12:37:01.000Z | 2021-08-30T14:44:25.000Z | tests/unit/test_robots_txt.py | Etiqa/bromine | cabf0931f5a06796c26fdc7fb9f7ecf147554fd5 | [
"BSD-2-Clause"
] | null | null | null | tests/unit/test_robots_txt.py | Etiqa/bromine | cabf0931f5a06796c26fdc7fb9f7ecf147554fd5 | [
"BSD-2-Clause"
] | null | null | null | from textwrap import dedent
import pytest
from bromine.utils.robots_txt import RobotsTxt
@pytest.mark.parametrize('line,field,value', (
('Field: value', 'Field', 'value'),
('Field:value', 'Field', 'value'),
('Field : value', 'Field', 'value'),
('\t Field with spaces : \t value with spaces \t', 'Fiel... | 27.184211 | 116 | 0.629235 |
03250cdeb92dd2a25704d2c37a9970b0e56845d4 | 723 | py | Python | tree/0108-convert-sorted-array-to-binary-search-tree.py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | 1 | 2021-01-10T17:03:21.000Z | 2021-01-10T17:03:21.000Z | tree/Python/0108-convert-sorted-array-to-binary-search-tree.py | Eddiehugh/LeetCode-Solution-Well-Formed | bdc1e7153de737b84890153434bf8df5838d0be5 | [
"Apache-2.0"
] | null | null | null | tree/Python/0108-convert-sorted-array-to-binary-search-tree.py | Eddiehugh/LeetCode-Solution-Well-Formed | bdc1e7153de737b84890153434bf8df5838d0be5 | [
"Apache-2.0"
] | 1 | 2021-07-25T07:53:14.000Z | 2021-07-25T07:53:14.000Z | from typing import List
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def sortedArrayToBST(self, nums: List[int]) -> TreeNode:
if len(nums) == 0:
return None
return self.__helper(nums, 0, len(nums) -... | 25.821429 | 60 | 0.558783 |
03252a1aa0a43cc1cdb1d314f7e4d8cf0339c277 | 3,877 | py | Python | samples/contrib/pytorch-samples/cifar10/cifar10_pre_process.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | samples/contrib/pytorch-samples/cifar10/cifar10_pre_process.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | samples/contrib/pytorch-samples/cifar10/cifar10_pre_process.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # !/usr/bin/env/python3
# Copyright (c) Facebook, Inc. and its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 31.266129 | 105 | 0.628321 |
03253fb485e1aeff3ff324e953ffb647b7fb748e | 3,654 | py | Python | imdb/semantic/cityscape_semantic_db.py | YeLyuUT/VOSDetectron | add644f8f8ad3dd17098f0afa161335d457f05d6 | [
"MIT"
] | 2 | 2019-10-08T11:33:20.000Z | 2021-05-21T10:10:27.000Z | imdb/semantic/cityscape_semantic_db.py | YeLyuUT/VOSDetectron | add644f8f8ad3dd17098f0afa161335d457f05d6 | [
"MIT"
] | null | null | null | imdb/semantic/cityscape_semantic_db.py | YeLyuUT/VOSDetectron | add644f8f8ad3dd17098f0afa161335d457f05d6 | [
"MIT"
] | 2 | 2019-10-08T11:33:22.000Z | 2022-02-20T16:07:37.000Z | import os.path as osp
import sys
import os
import numpy as np
import json
import glob
sys.path.append(osp.abspath('../..'))
from imdb.imdb import imdb as imdb
DEBUG = False
class cityscape_semantic_db(imdb):
def __init__(self,cityscape_root):
super(cityscape_semantic_db,self).__init__('cityscape_semantic')
... | 31.5 | 119 | 0.679256 |
03254e2d95efa99caebe3fd60f8496ed75ea2c8f | 8,483 | py | Python | python/vineyard/deploy/local.py | v6d-io/v6d | 8f692c9bd95dad06c304a0020d4f946a5756c1e0 | [
"Apache-2.0",
"CC0-1.0"
] | 117 | 2021-05-30T05:21:03.000Z | 2022-03-26T03:35:50.000Z | python/vineyard/deploy/local.py | v6d-io/v6d | 8f692c9bd95dad06c304a0020d4f946a5756c1e0 | [
"Apache-2.0",
"CC0-1.0"
] | 294 | 2021-05-28T03:04:26.000Z | 2022-03-31T07:09:45.000Z | python/vineyard/deploy/local.py | v6d-io/v6d | 8f692c9bd95dad06c304a0020d4f946a5756c1e0 | [
"Apache-2.0",
"CC0-1.0"
] | 30 | 2021-05-31T13:34:57.000Z | 2022-03-25T06:39:47.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2020-2021 Alibaba Group Holding Limited.
#
# 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/LI... | 29.764912 | 87 | 0.632677 |
0325993a3f4c2f65e020f8bdd8611bdc73bb6911 | 3,472 | py | Python | maskrcnn_benchmark/modeling/backbone/fpn.py | Oneflow-Inc/of-maskrcnn-benchmark | 2d198c98771b3e68c5474b6a8afa1c4543dd2399 | [
"MIT"
] | null | null | null | maskrcnn_benchmark/modeling/backbone/fpn.py | Oneflow-Inc/of-maskrcnn-benchmark | 2d198c98771b3e68c5474b6a8afa1c4543dd2399 | [
"MIT"
] | 1 | 2020-01-02T09:15:24.000Z | 2020-01-02T09:15:24.000Z | maskrcnn_benchmark/modeling/backbone/fpn.py | Oneflow-Inc/of-maskrcnn-benchmark | 2d198c98771b3e68c5474b6a8afa1c4543dd2399 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import torch
import torch.nn.functional as F
from torch import nn
import os
import numpy as np
from maskrcnn_benchmark.utils.tensor_saver import get_tensor_saver
class FPN(nn.Module):
"""
Module that adds FPN on top of a list of feature ... | 42.341463 | 90 | 0.633929 |
0325c67876bc78b2618fcd839c373000ab1de381 | 15,128 | py | Python | app/locallib/db_create/ERA5.py | sebastienlanglois/flask-hydro | 2bd399ca91fdaeea297ec5e6ee076ce1a53d0f37 | [
"MIT"
] | null | null | null | app/locallib/db_create/ERA5.py | sebastienlanglois/flask-hydro | 2bd399ca91fdaeea297ec5e6ee076ce1a53d0f37 | [
"MIT"
] | 8 | 2020-03-24T17:16:40.000Z | 2022-03-11T23:52:59.000Z | app/locallib/db_create/ERA5.py | sebastienlanglois/flask-hydro | 2bd399ca91fdaeea297ec5e6ee076ce1a53d0f37 | [
"MIT"
] | null | null | null | from rasterio import features
from affine import Affine
import geopandas as gpd
from shapely import affinity
import sqlite3
import pytz
import numpy as np
import xarray as xr
import glob
import os
import json
import pandas as pd
old_timezone = pytz.timezone("UTC")
new_timezone = pytz.timezone("America/Montreal")
de... | 38.493639 | 118 | 0.551296 |
0325cd8601c8406cea0f1231d85d306a7ae0e59e | 9,259 | py | Python | scripts/indicators.py | jaeminsung/ml_stock_trading | 32f5305f5111ba86eb428e982ac6f0f18842558d | [
"Apache-2.0"
] | null | null | null | scripts/indicators.py | jaeminsung/ml_stock_trading | 32f5305f5111ba86eb428e982ac6f0f18842558d | [
"Apache-2.0"
] | null | null | null | scripts/indicators.py | jaeminsung/ml_stock_trading | 32f5305f5111ba86eb428e982ac6f0f18842558d | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pandas as pd
import utils
class Indicators:
def __init__(self, stock, start_date, end_date):
self.stock = stock
self.start_date = start_date
self.end_date = end_date
self.data = utils.read_stock_data(stock)
def calculate_all_indicators(self):
i... | 40.432314 | 101 | 0.58084 |
032605bab9a7f3ec69dd3ec59451a1c7765cabb3 | 1,437 | py | Python | src/rsystem/rmotor.py | zhichul/pi-bob | b9ed7cb3614f50c51c6273665d8cd2b62dcab886 | [
"MIT"
] | null | null | null | src/rsystem/rmotor.py | zhichul/pi-bob | b9ed7cb3614f50c51c6273665d8cd2b62dcab886 | [
"MIT"
] | null | null | null | src/rsystem/rmotor.py | zhichul/pi-bob | b9ed7cb3614f50c51c6273665d8cd2b62dcab886 | [
"MIT"
] | null | null | null | # Mid-level interface for manipulating motors
# Thread count: 2
from gopigo import *
import atexit
atexit.register(stop)
from . import rsys
from xmlrpc.server import SimpleXMLRPCServer
class motor_interface():
"""
Motor interface, simple rpc server that takes calls to set the motor speed,
and get the m... | 26.127273 | 81 | 0.63048 |
03261f6fccd176363fcf0865b659afe80e77507c | 14,991 | py | Python | marble_match/cogs/history.py | ConstObject/marble-match-manager | abb7354656685482cc7289e8f6c68483af615e33 | [
"MIT"
] | 1 | 2021-04-02T21:09:46.000Z | 2021-04-02T21:09:46.000Z | marble_match/cogs/history.py | ConstObject/marble-match-manager | abb7354656685482cc7289e8f6c68483af615e33 | [
"MIT"
] | 7 | 2021-04-02T07:34:03.000Z | 2021-06-11T07:11:55.000Z | marble_match/cogs/history.py | ConstObject/marble-match-manager | abb7354656685482cc7289e8f6c68483af615e33 | [
"MIT"
] | null | null | null | import asyncio
import math
import datetime
import logging
from typing import Union
import pytz
import discord
from discord.ext import commands
from database.database_setup import DbHandler
import utils.discord_utils as du
import utils.account as acc
import utils.matches as ma
import utils.bets as bets
import utils.ex... | 42.467422 | 110 | 0.592422 |
03267489459d2230da676814e4bc4597d110b5ef | 10,351 | py | Python | src/preprocess/prepare_data_for_nlp.py | aalto-ml4h/pummel-regression | 73175390b73a9118199638d580ff4847925e7598 | [
"MIT"
] | 4 | 2019-11-08T09:50:24.000Z | 2021-03-20T23:21:04.000Z | src/preprocess/prepare_data_for_nlp.py | aalto-ml4h/pummel-regression | 73175390b73a9118199638d580ff4847925e7598 | [
"MIT"
] | null | null | null | src/preprocess/prepare_data_for_nlp.py | aalto-ml4h/pummel-regression | 73175390b73a9118199638d580ff4847925e7598 | [
"MIT"
] | 2 | 2020-11-05T03:03:00.000Z | 2021-05-08T14:15:35.000Z | """
- Script takes input years and output years and loads the corresponding year's
(processed) visits tables.
- It then sorts the visits based on krypht.
- merges the visits table with the combined diagnosis table
- sets the target
"""
import os
import sys
import time
import gc
import pandas as pd
import numpy as n... | 31.654434 | 88 | 0.654913 |
032679081df5fb8ef315679e48b54d44a8d3c554 | 1,593 | py | Python | gs/group/member/log/viewlet.py | groupserver/gs.group.member.log | b1cb9a7edf903843e77ccd050046790708e68b63 | [
"ZPL-2.1"
] | null | null | null | gs/group/member/log/viewlet.py | groupserver/gs.group.member.log | b1cb9a7edf903843e77ccd050046790708e68b63 | [
"ZPL-2.1"
] | null | null | null | gs/group/member/log/viewlet.py | groupserver/gs.group.member.log | b1cb9a7edf903843e77ccd050046790708e68b63 | [
"ZPL-2.1"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright © 2013, 2016 OnlineGroups.net and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany ... | 35.4 | 78 | 0.659134 |
0326b714ee567031bdac99f8da96318d6832880a | 722 | py | Python | hdltools/vcd/trigger/state.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 2 | 2020-02-28T13:02:39.000Z | 2021-06-30T09:15:35.000Z | hdltools/vcd/trigger/state.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 1 | 2020-03-22T17:32:45.000Z | 2020-03-23T15:43:39.000Z | hdltools/vcd/trigger/state.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | null | null | null | """Trigger state."""
from typing import Optional
from uuid import uuid1
from hdltools.vcd import VCDScope
class TriggerState:
"""Abstract class for trigger states."""
def __init__(self, name: Optional[str] = None):
"""Initialize."""
self._name = uuid1() if name is None else name
@proper... | 26.740741 | 77 | 0.634349 |
0326d6013fc237da0c31b87030631ed72e8ff9a7 | 232 | py | Python | src/pycookiecheat/__init__.py | fakegit/pycookiecheat | 26fe8449318e6ed8400cc4d0cbe62b2ddacada6b | [
"MIT"
] | 577 | 2015-02-27T14:40:07.000Z | 2022-03-29T11:53:10.000Z | src/pycookiecheat/__init__.py | fakegit/pycookiecheat | 26fe8449318e6ed8400cc4d0cbe62b2ddacada6b | [
"MIT"
] | 33 | 2015-06-18T20:15:25.000Z | 2022-03-04T16:10:22.000Z | src/pycookiecheat/__init__.py | fakegit/pycookiecheat | 26fe8449318e6ed8400cc4d0cbe62b2ddacada6b | [
"MIT"
] | 116 | 2015-06-13T10:14:42.000Z | 2022-03-25T15:48:16.000Z | """__init__.py :: Exposes chrome_cookies function."""
from pycookiecheat.pycookiecheat import chrome_cookies
__author__ = "Nathan Henrie"
__email__ = "nate@n8henrie.com"
__version__ = "v0.4.7"
__all__ = [
"chrome_cookies",
]
| 19.333333 | 54 | 0.737069 |
0327398eda21118e26ca25e59b50c6c7c1668b41 | 2,364 | py | Python | flask_swagger_generator/utils/input_type.py | coding-kitties/flask-swagger-generator | e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3 | [
"MIT"
] | 2 | 2021-09-02T09:54:58.000Z | 2022-02-10T01:23:20.000Z | flask_swagger_generator/utils/input_type.py | coding-kitties/flask-swagger-generator | e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3 | [
"MIT"
] | 3 | 2020-12-28T18:57:37.000Z | 2021-07-25T11:14:32.000Z | flask_swagger_generator/utils/input_type.py | coding-kitties/flask-swagger-generator | e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3 | [
"MIT"
] | 2 | 2021-09-02T09:55:04.000Z | 2021-09-29T12:19:17.000Z | from enum import Enum
from flask_swagger_generator.exceptions import SwaggerGeneratorException
class InputType(Enum):
"""
Class SwaggerVersion: Enum for types of swagger version
"""
INTEGER = 'integer'
NUMBER = 'number'
BOOLEAN = 'boolean'
STRING = 'string'
ARRAY = 'array'
OBJECT ... | 30.307692 | 72 | 0.527073 |
032741bf0a05568a4f9cee95180f108c82b885b7 | 27,691 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/commands/release.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/release.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/release.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import time
from collections import OrderedDict, namedtuple
from datetime import datetime
import click
from semver import parse_version_info
from six import StringIO, iteritems
from .dep import freeze ... | 36.483531 | 118 | 0.611643 |
032744b1ecb4135ffb5d4f01b30c36591645c19e | 24,962 | py | Python | LineAPI/akad/MessageService.py | drwirot2532/10kickMoopor1 | 6d973ca6053b6c318ac31be09ab8eaecd83266a9 | [
"MIT"
] | 2 | 2019-08-13T13:10:43.000Z | 2019-09-29T04:48:33.000Z | LineAPI/akad/MessageService.py | drwirot2532/10kickMoopor1 | 6d973ca6053b6c318ac31be09ab8eaecd83266a9 | [
"MIT"
] | null | null | null | LineAPI/akad/MessageService.py | drwirot2532/10kickMoopor1 | 6d973ca6053b6c318ac31be09ab8eaecd83266a9 | [
"MIT"
] | 4 | 2019-08-13T13:10:44.000Z | 2019-08-21T10:52:30.000Z | #
# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive impo... | 35.157746 | 134 | 0.601474 |
032751ebe6232e46b5ef4e0b67ec35dff5e62b32 | 1,263 | py | Python | test_data/t1.py | kamahen/pykythe | d54fd05096af5eb47efb863f613f12d5d80c6c41 | [
"Apache-2.0"
] | 14 | 2018-01-07T01:53:15.000Z | 2021-09-22T00:57:29.000Z | test_data/t1.py | kamahen/pykythe | d54fd05096af5eb47efb863f613f12d5d80c6c41 | [
"Apache-2.0"
] | 39 | 2018-01-07T20:54:25.000Z | 2021-03-21T23:48:17.000Z | test_data/t1.py | kamahen/pykythe | d54fd05096af5eb47efb863f613f12d5d80c6c41 | [
"Apache-2.0"
] | 3 | 2018-12-31T14:37:14.000Z | 2020-07-04T10:53:02.000Z | # TODO: delete this (it's a simplified part of simple.py)
#- { @C2 defines/binding C2? }
class C2:
"""A class comment for testing."""
#- { @__init__ defines/binding _C2_init? }
#- { @self defines/binding C2_init_self? }
#- { @None ref None? } // TODO: should be builtins.None
def __init__(self) -> ... | 25.26 | 60 | 0.540776 |
0327631a0963a50cbc43c772fadc2b3a889984b0 | 3,220 | py | Python | sdks/python/appcenter_sdk/models/NotificationConfig.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/NotificationConfig.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/NotificationConfig.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class NotificationCo... | 27.288136 | 90 | 0.563043 |
0327649ce49f6bef8bc20470e773fde2bdeec755 | 2,496 | py | Python | src/dnaSeq/VAPr/variantannotation/tests/test_genotype_call.py | AspirinCode/jupyter-genomics | d45526fab3de8fcc3d9fef005d4e39368ff3dfdc | [
"MIT"
] | 2 | 2019-01-04T08:17:27.000Z | 2021-04-10T02:59:35.000Z | src/dnaSeq/VAPr/variantannotation/tests/test_genotype_call.py | AspirinCode/jupyter-genomics | d45526fab3de8fcc3d9fef005d4e39368ff3dfdc | [
"MIT"
] | null | null | null | src/dnaSeq/VAPr/variantannotation/tests/test_genotype_call.py | AspirinCode/jupyter-genomics | d45526fab3de8fcc3d9fef005d4e39368ff3dfdc | [
"MIT"
] | 2 | 2021-09-10T02:57:51.000Z | 2021-09-21T00:16:56.000Z | import unittest
from variantannotation import genotype_calling
class TestGenCall(unittest.TestCase):
def setUp(self):
self.gen_call = [
['GT:GQ:PL', '412434', '1/1:6:69,6,0'],
['GT:AD:DP:GQ:PL', 'e21r3dc/', '0/1:10,3:13:87:87,0,379'],
... | 38.4 | 106 | 0.298878 |
032775a3226dbc2170fa71feff77dc452570eea0 | 33,999 | py | Python | CacheMgr.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | CacheMgr.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | CacheMgr.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | from Cache import SharedItem, SharedAPI
from Assert import Assert
from urllib.parse import urlparse
import urllib
import string
import os
import time
import ht_time
import grailutil
import mimetypes
import re
META, DATA, DONE = 'META', 'DATA', 'DONE' # Three stages
class CacheMiss(Exception):
pass
class CacheEmp... | 33.430678 | 79 | 0.553693 |
0327a81f3d0b72570524bba20d66c83834575303 | 2,321 | py | Python | .leetcode/368.largest-divisible-subset.2.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/368.largest-divisible-subset.2.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/368.largest-divisible-subset.2.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=368 lang=python3
#
# [368] Largest Divisible Subset
#
# https://leetcode.com/problems/largest-divisible-subset/description/
#
# algorithms
# Medium (38.71%)
# Likes: 2090
# Dislikes: 95
# Total Accepted: 117.6K
# Total Submissions: 303.5K
# Testcase Example: '[1,2,3]'
#
# Given a set of dis... | 18.869919 | 79 | 0.542439 |
0327c023469dd7b15484e066413cc27ad5bb0764 | 222 | py | Python | osgrep/tests/mockssh.py | osgrep/osgrep | e3758c34c809fafafc3d452b630173782af9dd14 | [
"Apache-2.0"
] | null | null | null | osgrep/tests/mockssh.py | osgrep/osgrep | e3758c34c809fafafc3d452b630173782af9dd14 | [
"Apache-2.0"
] | null | null | null | osgrep/tests/mockssh.py | osgrep/osgrep | e3758c34c809fafafc3d452b630173782af9dd14 | [
"Apache-2.0"
] | null | null | null | from sshim.Server import Handler, Actor
class ExecHandler(Handler):
def check_channel_exec_request(self, channel, command):
channel.setblocking(True)
Actor(self, channel).start()
return True
| 22.2 | 59 | 0.702703 |
0327c6191cca1c61331243972815788b09dce55c | 2,214 | py | Python | attic/tests/post-deployment/tests/smoke/test_devices.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | null | null | null | attic/tests/post-deployment/tests/smoke/test_devices.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | 3 | 2019-10-25T13:38:56.000Z | 2022-03-30T09:13:33.000Z | attic/tests/post-deployment/tests/smoke/test_devices.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | 2 | 2019-11-04T09:59:06.000Z | 2020-05-07T11:05:42.000Z | # -*- coding: utf-8 -*-
"""
Some simple unit tests of the PowerSupply device, exercising the device from
the same host as the tests by using a DeviceTestContext.
"""
from tango import Database, DeviceProxy,EventType # type: ignore
from time import sleep
import pytest
from assertpy import assert_that
@pytest.mark.fast
... | 30.328767 | 100 | 0.68654 |
032825452b533845ae95540a7ff7c932042828e8 | 667 | py | Python | app/core/management/commands/wait_for_db.py | yittoo/python-api-sandbox | 9e1538fd9728cd125f450ad8c3fda22f8dc9a202 | [
"MIT"
] | null | null | null | app/core/management/commands/wait_for_db.py | yittoo/python-api-sandbox | 9e1538fd9728cd125f450ad8c3fda22f8dc9a202 | [
"MIT"
] | null | null | null | app/core/management/commands/wait_for_db.py | yittoo/python-api-sandbox | 9e1538fd9728cd125f450ad8c3fda22f8dc9a202 | [
"MIT"
] | null | null | null | import time
from django.db import connections
from django.db.utils import OperationalError
from django.core.management.base import BaseCommand
class Command(BaseCommand):
"""Django command to pause execution until database is available"""
def handle(self, *args, **options):
self.stdout.write('Waiting ... | 33.35 | 75 | 0.656672 |
0328311456ddac0328d91c80d87301561431b48f | 3,612 | py | Python | test/test_violations_per_file.py | rschuitema/misra | e451f7b08f41bc2e0234897bfcce84a71d2c2af9 | [
"MIT"
] | null | null | null | test/test_violations_per_file.py | rschuitema/misra | e451f7b08f41bc2e0234897bfcce84a71d2c2af9 | [
"MIT"
] | 1 | 2018-04-02T07:46:26.000Z | 2018-04-02T07:46:26.000Z | test/test_violations_per_file.py | rschuitema/misra | e451f7b08f41bc2e0234897bfcce84a71d2c2af9 | [
"MIT"
] | null | null | null | from src.misra.misra_guideline import MisraGuideline
from src.queries.violations_per_file import get_violations_per_file
def test_violations_per_file_success():
guidelines = {"1.1": MisraGuideline(("1.1", "rule", "Mandatory", "Functions", "Functions rule 1")),
"1.5": MisraGuideline(("1.5", "rul... | 57.333333 | 120 | 0.599114 |
03283d3f999e502017461be72467c600d5a2210c | 5,253 | py | Python | txros/src/txros/subscriber.py | uf-mil/txros | 616ca3101ee4d2f89d5b3df1c3981a9371b85399 | [
"BSD-3-Clause"
] | 5 | 2015-11-10T18:24:58.000Z | 2021-01-10T19:13:24.000Z | txros/src/txros/subscriber.py | uf-mil/txros | 616ca3101ee4d2f89d5b3df1c3981a9371b85399 | [
"BSD-3-Clause"
] | 23 | 2016-03-09T04:01:44.000Z | 2018-09-09T00:01:47.000Z | txros/src/txros/subscriber.py | uf-mil/txros | 616ca3101ee4d2f89d5b3df1c3981a9371b85399 | [
"BSD-3-Clause"
] | 8 | 2016-04-25T00:19:03.000Z | 2022-03-01T18:27:47.000Z | from __future__ import division
import traceback
from twisted.web import xmlrpc
from twisted.internet import defer, reactor, endpoints, error
from txros import rosxmlrpc, tcpros, util
class Subscriber(object):
def __init__(self, node_handle, name, message_type, callback=lambda message: None):
self._no... | 40.099237 | 117 | 0.573196 |
0328669d545e0d0ed0c62ef1011077a7a97b42d7 | 13,340 | py | Python | oalm.py | gradychen17/oalm | 19d4438ada9905f0204588b76aeace69a4ee90e8 | [
"MIT"
] | null | null | null | oalm.py | gradychen17/oalm | 19d4438ada9905f0204588b76aeace69a4ee90e8 | [
"MIT"
] | null | null | null | oalm.py | gradychen17/oalm | 19d4438ada9905f0204588b76aeace69a4ee90e8 | [
"MIT"
] | null | null | null | import requests
import json
import sys
import urllib
from pprint import pprint
from Helper import listOfDict_format_as_table, printDict
class IDManager(object):
def __init__(self):
self.projects={
'france': {
'tracker_id': 42469,
'field_ids': { 'title': 1261432,
'hours': 1261449,
... | 33.433584 | 179 | 0.631709 |
03289ca1b60d4441c65f00a9488327bddaf0c389 | 1,617 | py | Python | tests/fixture/database/test_statements.py | JonM0/pytest-mock-resources | 96936b750bf26d53205b02008e02546e59b95082 | [
"MIT"
] | 49 | 2020-01-24T21:08:43.000Z | 2022-03-31T23:55:21.000Z | tests/fixture/database/test_statements.py | michaelbukachi/pytest-mock-resources | f0c5d56af7aeca3cd1a64cd84237d8d4b5b993a4 | [
"MIT"
] | 29 | 2020-03-11T19:07:50.000Z | 2022-03-30T16:49:06.000Z | tests/fixture/database/test_statements.py | michaelbukachi/pytest-mock-resources | f0c5d56af7aeca3cd1a64cd84237d8d4b5b993a4 | [
"MIT"
] | 10 | 2020-01-23T19:04:09.000Z | 2022-02-22T19:57:54.000Z | from pytest_mock_resources import (
create_mysql_fixture,
create_postgres_fixture,
create_redshift_fixture,
create_sqlite_fixture,
Statements,
)
statements = Statements("CREATE VIEW cool_view as select 3", "CREATE VIEW cool_view_2 as select 1")
postgres = create_postgres_fixture(statements)
sqlite ... | 26.080645 | 99 | 0.677798 |
0328befdffc74671a9a827ba4e5302aa7e35776e | 5,637 | py | Python | bonneville/states/alternatives.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 1 | 2016-03-13T09:05:15.000Z | 2016-03-13T09:05:15.000Z | salt/states/alternatives.py | moniker-dns/salt | 0e1cd880dc7831b9f937a213dd90cc32e2a09884 | [
"Apache-2.0"
] | null | null | null | salt/states/alternatives.py | moniker-dns/salt | 0e1cd880dc7831b9f937a213dd90cc32e2a09884 | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
Configuration of the alternatives system
========================================
Control the alternatives system
.. code-block:: yaml
{% set my_hadoop_conf = '/opt/hadoop/conf' %}
{{ my_hadoop_conf }}:
file.directory
hadoop-0.20-conf:
alternatives.install:
- name: h... | 26.218605 | 84 | 0.547454 |
0328cb1db560e868a5e896a499afb8381ca99227 | 662 | py | Python | tests/test_clients/test_methods/test_v3/test_chats/test_create.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | tests/test_clients/test_methods/test_v3/test_chats/test_create.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | tests/test_clients/test_methods/test_v3/test_chats/test_create.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | import uuid
import pytest
from botx import ChatTypes
from botx.clients.methods.v3.chats.create import Create
from botx.concurrency import callable_to_coroutine
pytestmark = pytest.mark.asyncio
async def test_chat_creation(client, requests_client):
method = Create(
host="example.com",
name="test... | 25.461538 | 65 | 0.732628 |
0328ded907cf0c6d9328f22d1f4275a4a1253115 | 3,277 | py | Python | src/ackward/logging/LogRecord.py | abingham/ackward | f1a45293de570f4b4429d9eaeb3f6c4da7d245bf | [
"MIT"
] | null | null | null | src/ackward/logging/LogRecord.py | abingham/ackward | f1a45293de570f4b4429d9eaeb3f6c4da7d245bf | [
"MIT"
] | null | null | null | src/ackward/logging/LogRecord.py | abingham/ackward | f1a45293de570f4b4429d9eaeb3f6c4da7d245bf | [
"MIT"
] | null | null | null | from ackward import (Class,
Constructor,
method,
Namespace,
Property,
TranslationUnit)
log_record_doc='''\\rst
A wrapper around Python `logging.LogRecord <http://docs.python.org/py3k/library/logging.html#logging.Lo... | 31.815534 | 122 | 0.525175 |
0328e3ec5ae8efa7ff9f89847898085b69ec0036 | 17,863 | py | Python | test/core/test_workspace.py | TomBlock/cate | 3924300a9d85f09fd40bc67b9f8a220230788d1c | [
"MIT"
] | null | null | null | test/core/test_workspace.py | TomBlock/cate | 3924300a9d85f09fd40bc67b9f8a220230788d1c | [
"MIT"
] | null | null | null | test/core/test_workspace.py | TomBlock/cate | 3924300a9d85f09fd40bc67b9f8a220230788d1c | [
"MIT"
] | 1 | 2019-02-14T13:49:37.000Z | 2019-02-14T13:49:37.000Z | import json
import os
import unittest
from collections import OrderedDict
import numpy as np
import pandas as pd
import xarray as xr
from cate.core.workflow import Workflow, OpStep
from cate.core.workspace import Workspace, WorkspaceError, mk_op_arg, mk_op_args, mk_op_kwargs
from cate.util.undefined import UNDEFINED
... | 44.88191 | 120 | 0.594805 |
0328e42697343a2f5ad4de57c642e4f8ad02db91 | 2,472 | py | Python | tests/dataverk/context/test_SettingsStore.py | navikt/dataverk | 7dd803236433048686dd7a58358bc1c09565b14b | [
"MIT"
] | 3 | 2019-09-29T20:48:46.000Z | 2021-03-31T10:16:07.000Z | tests/dataverk/context/test_SettingsStore.py | navikt/dataverk | 7dd803236433048686dd7a58358bc1c09565b14b | [
"MIT"
] | 148 | 2019-02-08T12:30:58.000Z | 2021-03-11T15:31:55.000Z | tests/dataverk/context/test_SettingsStore.py | navikt/dataverk | 7dd803236433048686dd7a58358bc1c09565b14b | [
"MIT"
] | 1 | 2020-11-18T14:10:05.000Z | 2020-11-18T14:10:05.000Z |
# -*- coding: utf-8 -*-
# Import statements
# =================
from unittest import TestCase
from dataverk.context.settings_classes import SettingsStore
# Common input parameters
# =======================
bad_url_inputs = ("", "testfile_settings.json", 1, object(), [], None)
bad_get_field_inputs = (None, 1, object... | 24.475248 | 115 | 0.607605 |
03290c053504a9cf919eab2eea866034538bfde6 | 1,128 | py | Python | build_singlefile_slaver.py | cls1997/shootback | da87e38b3c5ed5d03eca0b0e6758b68eb8ee6273 | [
"MIT"
] | 909 | 2016-07-16T06:18:04.000Z | 2022-02-22T07:30:06.000Z | build_singlefile_slaver.py | cls1997/shootback | da87e38b3c5ed5d03eca0b0e6758b68eb8ee6273 | [
"MIT"
] | 16 | 2016-10-08T03:53:25.000Z | 2021-07-23T12:04:59.000Z | build_singlefile_slaver.py | cls1997/shootback | da87e38b3c5ed5d03eca0b0e6758b68eb8ee6273 | [
"MIT"
] | 258 | 2016-07-30T04:20:28.000Z | 2022-03-13T19:02:36.000Z | #!/usr/bin/env python3
# coding=utf-8
def build_singlefile_slaver(outfile_name="slaver_singlefile.py"):
import os
import shutil
base_path = os.path.dirname(os.path.abspath(__file__))
output_fullpath = os.path.join(base_path, outfile_name)
if os.path.exists(output_fullpath):
ch = input("tar... | 31.333333 | 94 | 0.640071 |
0329140109caccbeac34d7f7a37fdcce60093981 | 876 | py | Python | megdc/hosts/util.py | indykish/megdc.py | e9de7ce844889efef2ff30444bdf0e361956d7fa | [
"Apache-2.0"
] | 1 | 2015-11-06T09:12:59.000Z | 2015-11-06T09:12:59.000Z | megdc/hosts/util.py | indykish/megdc.py | e9de7ce844889efef2ff30444bdf0e361956d7fa | [
"Apache-2.0"
] | null | null | null | megdc/hosts/util.py | indykish/megdc.py | e9de7ce844889efef2ff30444bdf0e361956d7fa | [
"Apache-2.0"
] | null | null | null | """
A utility module that can host utilities that will be used by more than
one type of distro and not common to all of them
"""
from megdc.util import pkg_managers
def install_yum_priorities(distro, _yum=None):
"""
The name of the package changed back and forth (!) since CentOS 4:
From the CentOS w... | 30.206897 | 77 | 0.678082 |
032924e39d6e9ad16532571b303c2ebdf19e0a59 | 908 | py | Python | tests/test_examples_ex_utils_static.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | tests/test_examples_ex_utils_static.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | tests/test_examples_ex_utils_static.py | KyleKing/Dash-HelloWorld | b74c399197f0207dfe5dd9e3a1b453b97d4c66b0 | [
"Unlicense"
] | null | null | null | """Test the file examples/ex_utils_static.py."""
import tempfile
from pathlib import Path
from .examples import ex_utils_static
def test_smoke_test_write_plotly_html():
"""Smoke test WritePlotlyHTML."""
try:
with tempfile.TemporaryDirectory() as dir_name: # act
filename = Path(dir_name)... | 30.266667 | 74 | 0.6663 |
032931dcfae93a62d12dd26041ae43ebacfc05a1 | 154 | py | Python | by-session/ta-922/j1/turtle2.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | 2 | 2015-04-29T20:59:35.000Z | 2018-09-26T13:33:43.000Z | by-session/ta-922/j1/turtle2.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | by-session/ta-922/j1/turtle2.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | import turtle
while turtle.xcor() < 100:
turtle.forward(1)
turtle.left(180)
while turtle.xcor() > 0:
turtle.forward(1)
turtle.done() | 14 | 27 | 0.62987 |
03294b76c3b1286a1dc6b60dce27571d643509c8 | 5,225 | py | Python | pyOCD/flash/flash_k64f.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | 2 | 2019-07-18T06:51:27.000Z | 2021-06-30T00:36:12.000Z | pyOCD/flash/flash_k64f.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | null | null | null | pyOCD/flash/flash_k64f.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | 1 | 2017-07-20T20:47:18.000Z | 2017-07-20T20:47:18.000Z | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2013 ARM Limited
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 ... | 66.987179 | 113 | 0.75177 |
03295008da9f4f2497a61debdbb044820515b089 | 1,396 | py | Python | grokking-algorithms/selection_sort.py | AmrMKayid/KayAlgo | df6e2b5b0f74174d5c0950520f0c47b04212dfaa | [
"MIT"
] | 1 | 2019-02-11T13:29:32.000Z | 2019-02-11T13:29:32.000Z | grokking-algorithms/selection_sort.py | AmrMKayid/KayAlgo | df6e2b5b0f74174d5c0950520f0c47b04212dfaa | [
"MIT"
] | 1 | 2019-02-11T15:26:36.000Z | 2019-02-11T15:26:36.000Z | grokking-algorithms/selection_sort.py | AmrMKayid/KayAlgo | df6e2b5b0f74174d5c0950520f0c47b04212dfaa | [
"MIT"
] | null | null | null | import random
import time
from typing import Any
from typing import List
def timeit(f):
def timed(*args, **kw):
ts = time.time()
result = f(*args, **kw)
te = time.time()
print(f'func:{f.__name__} args:[{args, kw}] took: {te - ts} sec')
return result
return timed
@timeit
def selection_sor... | 17.897436 | 69 | 0.625358 |
032980071b5d0016282c2f71ef4c24b41fd3db9d | 3,589 | py | Python | reliabilly/components/services/sumologic.py | corpseware/reliabilly | e8d310d43478407e2cf8b45cc746362124140385 | [
"MIT"
] | 1 | 2018-11-24T02:07:37.000Z | 2018-11-24T02:07:37.000Z | reliabilly/components/services/sumologic.py | corpseware/reliabilly | e8d310d43478407e2cf8b45cc746362124140385 | [
"MIT"
] | 1 | 2019-01-23T07:12:30.000Z | 2019-01-23T07:12:30.000Z | reliabilly/components/services/sumologic.py | corpseware/reliabilly | e8d310d43478407e2cf8b45cc746362124140385 | [
"MIT"
] | 1 | 2019-01-16T05:30:49.000Z | 2019-01-16T05:30:49.000Z | import json
from time import sleep
from reliabilly.components.logger import log_exception, Logger
from reliabilly.components.services import QueryResult, ResultTypes
from reliabilly.components.tools.secret_manager import SecretManager
from reliabilly.components.web.http_requestor import HttpRequestor
from reliabilly.s... | 53.567164 | 115 | 0.694065 |
03298997fb499c31628d56f96b42bf76fcf0d4b0 | 18,021 | py | Python | research/DailyPriceInfo/daily_download.py | davidcui79/price_models | 5307eebeca3d09b8d78b63586947b31ff835f5f3 | [
"Apache-2.0"
] | null | null | null | research/DailyPriceInfo/daily_download.py | davidcui79/price_models | 5307eebeca3d09b8d78b63586947b31ff835f5f3 | [
"Apache-2.0"
] | null | null | null | research/DailyPriceInfo/daily_download.py | davidcui79/price_models | 5307eebeca3d09b8d78b63586947b31ff835f5f3 | [
"Apache-2.0"
] | null | null | null | import tushare
import xlwt
import xlrd
from xlutils.copy import copy
import os
import time
from utils import insert_log
#from utils import first_date_of_last_month
import utils
import sys
import shutil
import PIL.Image
import requests
import traceback
from generate_tf_record import generate_tf_record
#UP = 0
#DOWN = 1... | 36.852761 | 163 | 0.592586 |
0329a032e699e911d0c6967796d11e077772bfe5 | 2,691 | py | Python | tweebot.py | icyflame/excerpts_bot | 75fe9839a97789ac85da4eb7ac24f6e3e28b8cda | [
"BSD-Source-Code"
] | null | null | null | tweebot.py | icyflame/excerpts_bot | 75fe9839a97789ac85da4eb7ac24f6e3e28b8cda | [
"BSD-Source-Code"
] | null | null | null | tweebot.py | icyflame/excerpts_bot | 75fe9839a97789ac85da4eb7ac24f6e3e28b8cda | [
"BSD-Source-Code"
] | null | null | null | import random
import os
import csv
from datetime import datetime
import sendgrid
from sendgrid.helpers.mail import *
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv(), verbose=True)
FOLDER_PATH = os.getenv("DIR_WITH_CSV")
TYPE_INDEX = 0
QUOTE_INDEX = 3
def choose_excerpt(file_path, file_type):
... | 28.62766 | 82 | 0.559272 |
0329afe3e1bb10f18c000f95315892164d9f4252 | 5,095 | py | Python | analytics/migrations/0001_initial.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | analytics/migrations/0001_initial.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 1 | 2019-11-02T09:06:05.000Z | 2019-11-02T09:06:05.000Z | analytics/migrations/0001_initial.py | erinis-eligro/zulip-outcasts | 51153a6ce219370aee79bfe462f6e4fb956993d9 | [
"Apache-2.0"
] | 1 | 2021-06-10T15:12:52.000Z | 2021-06-10T15:12:52.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import zerver.lib.str_utils
class Migration(migrations.Migration):
dependencies = [
('zerver', '0030_realm_org_type'),
migrations.swappable_dependency(setting... | 44.692982 | 114 | 0.564082 |
0329be6ed4b4af96a52329ea34c1851ae52502c1 | 2,698 | py | Python | MDN_tutorial/locallibrary/catalog/views.py | udhayprakash/Django_Projects | 5c5257944d36a552428f8b8a926110d64055fc12 | [
"Apache-2.0"
] | null | null | null | MDN_tutorial/locallibrary/catalog/views.py | udhayprakash/Django_Projects | 5c5257944d36a552428f8b8a926110d64055fc12 | [
"Apache-2.0"
] | 27 | 2020-06-05T23:26:44.000Z | 2022-02-10T11:21:31.000Z | MDN_tutorial/locallibrary/catalog/views.py | udhayprakash/Django_Projects | 5c5257944d36a552428f8b8a926110d64055fc12 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from catalog.models import Book, Author, BookInstance, Genre
from django.views import generic
from django.contrib.auth.decorators import login_required
@login_required
def index(request):
"""View function for home page of site."""
# Gene... | 32.902439 | 105 | 0.68977 |
0329ccdcfbdd47a20c0ae6e22e04de6eec3e81e3 | 510 | py | Python | (2)Data Structures/array_file.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (2)Data Structures/array_file.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (2)Data Structures/array_file.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | import array
import binascii
import tempfile
a = array.array('i',range(5))
print('A1: ',a)
#Write array of number to temporary file.
output = tempfile.NamedTemporaryFile()
a.tofile(output.file) # Must pass an actual file
output.flush()
# Read the raw data.
with open(output.name,'rb') as input:
raw_data = input... | 19.615385 | 54 | 0.676471 |
0329de0078cb02173e15da5f789df3140dc5dcfc | 7,993 | py | Python | setopmicons.py | waldeir/Set-Openbox-Menu-Icons | a94e8e1c0a44bb31188c31d9d1919035db6d4e90 | [
"MIT"
] | null | null | null | setopmicons.py | waldeir/Set-Openbox-Menu-Icons | a94e8e1c0a44bb31188c31d9d1919035db6d4e90 | [
"MIT"
] | null | null | null | setopmicons.py | waldeir/Set-Openbox-Menu-Icons | a94e8e1c0a44bb31188c31d9d1919035db6d4e90 | [
"MIT"
] | null | null | null | #!/bin/python3
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
import xml.etree.ElementTree as ET
import os
import sys
import pdb
import argparse
from xdg.DesktopEntry import DesktopEntry
parser = argparse.ArgumentParser(description='Program to set icons to your custom openbox menu')
parser.... | 30.742308 | 115 | 0.618041 |
0329de43722b3644b392ef8921ec1fa8bc0dc7c1 | 9,706 | py | Python | ldapcherry/exceptions.py | EQAR/ldapcherry | e8f8deb343b9024a424edc6a7f1aa590c8ea665b | [
"MIT"
] | 1 | 2021-05-18T15:42:34.000Z | 2021-05-18T15:42:34.000Z | ldapcherry/exceptions.py | EQAR/ldapcherry | e8f8deb343b9024a424edc6a7f1aa590c8ea665b | [
"MIT"
] | null | null | null | ldapcherry/exceptions.py | EQAR/ldapcherry | e8f8deb343b9024a424edc6a7f1aa590c8ea665b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# vim:set expandtab tabstop=4 shiftwidth=4:
#
# The MIT License (MIT)
# LdapCherry
# Copyright (c) 2014 Carpentier Pierre-Francois
import string
import cherrypy
class MissingParameter(Exception):
def __init__(self, section, key):
self.section = section
self.key = key
... | 31.108974 | 139 | 0.530084 |
0329f9e0df445607d95adc075696c475eb649dd4 | 40,463 | py | Python | tensorflow_probability/python/distributions/variational_gaussian_process.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/variational_gaussian_process.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/variational_gaussian_process.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability 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... | 41.974066 | 86 | 0.685787 |
032a09105b491de35c5ed8ff5177a45e594fe428 | 11,018 | py | Python | functions/snyk_test_node/snyk_test.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | null | null | null | functions/snyk_test_node/snyk_test.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | 4 | 2021-02-12T09:50:38.000Z | 2021-06-17T10:33:09.000Z | functions/snyk_test_node/snyk_test.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | 2 | 2021-02-22T09:29:28.000Z | 2021-06-12T13:54:18.000Z | # this python program was written using python 3.8.6
import json
import uuid
import os
import glob
import zipfile
from typing import Callable
import snyk
import requests
# This lambda function takes a cloudstash.io function artifact and
# returns a list of vulnerabilities in the codes/dependencies as reported by snyk
... | 39.491039 | 190 | 0.691414 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.