hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | 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 209 | max_issues_repo_name stringlengths 5 121 | 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 209 | max_forks_repo_name stringlengths 5 121 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3e03c5113f601a0e1e50ba9d228c167204cb5735 | 12,915 | py | Python | gridworld/envs/fourrooms_water.py | lzhyu/GridWorld | 43669fb1dd01df1a94bc8671d4ee6a466f6f49d0 | [
"MIT"
] | null | null | null | gridworld/envs/fourrooms_water.py | lzhyu/GridWorld | 43669fb1dd01df1a94bc8671d4ee6a466f6f49d0 | [
"MIT"
] | null | null | null | gridworld/envs/fourrooms_water.py | lzhyu/GridWorld | 43669fb1dd01df1a94bc8671d4ee6a466f6f49d0 | [
"MIT"
] | 2 | 2021-03-21T06:05:04.000Z | 2021-09-22T06:51:55.000Z | """
Fourrooms Game with water
class:
+ FourroomsWaterState
+ FourroomsWater
+ FourroomsWaterNorender
Properties:
Random waters garantee the rest space to be connected.
Resetting resets start position, goal position, coins and waters.
Each game has fixed number of coins and waters.
Update:
Now the agent w... | 39.616564 | 115 | 0.600077 |
2290f37c2335ca265c5b926676d8be7c72deda1b | 5,386 | py | Python | py_utils/app.py | mineshpatel1/cerebral-cereal | f0e76bb912af7b63cc523e230ade78b18bf1e1fa | [
"MIT"
] | null | null | null | py_utils/app.py | mineshpatel1/cerebral-cereal | f0e76bb912af7b63cc523e230ade78b18bf1e1fa | [
"MIT"
] | null | null | null | py_utils/app.py | mineshpatel1/cerebral-cereal | f0e76bb912af7b63cc523e230ade78b18bf1e1fa | [
"MIT"
] | null | null | null | import re
import xml.etree.ElementTree as ET
from os import path
from .utils import log, load_json, save_json, prepend, ROOT_DIR
from typing import Any, Dict, Optional
INFO_PLIST_HEADER = """
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/Propert... | 32.642424 | 102 | 0.578351 |
3fdb57674491c22587a106c04b4f9fa42acb59aa | 3,457 | py | Python | plugins_examples/ctf_plugin.py | cybergruppe/cyberbot | 59059b272dd8b5ffc585863a0fa92440159b1e06 | [
"MIT"
] | 10 | 2020-09-23T13:38:35.000Z | 2021-09-15T18:53:21.000Z | plugins_examples/ctf_plugin.py | cybergruppe/cyberbot | 59059b272dd8b5ffc585863a0fa92440159b1e06 | [
"MIT"
] | 17 | 2020-10-25T14:14:11.000Z | 2021-04-04T02:01:24.000Z | plugins_examples/ctf_plugin.py | cybergruppe/cyberbot | 59059b272dd8b5ffc585863a0fa92440159b1e06 | [
"MIT"
] | null | null | null | import json
HELP_DESC = ("""!doing <TASKNAME>\t\t\t-\tTell people that you are doing a specific task
!done <TASKNAME>\t\t\t-\tRemove yourself from task
!finished <TASKNAME>\t\t-\tMark task as solved/finished and remove from task list
!cleardoing\t\t-\tClear current task mapping
""")
async def register_to(plugin):
... | 31.144144 | 112 | 0.622216 |
f8a72413797b83df779f5c4978156c3880bbd294 | 1,404 | py | Python | rx/operators/observable/toasync.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-11-16T09:07:13.000Z | 2018-11-16T09:07:13.000Z | rx/operators/observable/toasync.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | rx/operators/observable/toasync.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-05-08T08:23:08.000Z | 2020-05-08T08:23:08.000Z | from typing import Callable
from rx.core import ObservableBase
from rx.concurrency import timeout_scheduler
from rx.subjects import AsyncSubject
def to_async(func: Callable, scheduler=None) -> Callable:
"""Converts the function into an asynchronous function. Each
invocation of the resulting asynchronous func... | 30.521739 | 74 | 0.656695 |
982deb3e1f3b4f34d6438e88c30ee0b96f637c0f | 226 | py | Python | betfund_event_broker/flows/__init__.py | betfund/betfund-event-broker | 524aec73d9cf66cbeeb0fab67e6816b836c1d98e | [
"MIT"
] | 1 | 2020-09-23T02:36:35.000Z | 2020-09-23T02:36:35.000Z | betfund_event_broker/flows/__init__.py | betfund/betfund-event-broker | 524aec73d9cf66cbeeb0fab67e6816b836c1d98e | [
"MIT"
] | 5 | 2020-04-13T23:55:07.000Z | 2020-06-04T15:09:12.000Z | betfund_event_broker/flows/__init__.py | betfund/betfund-event-broker | 524aec73d9cf66cbeeb0fab67e6816b836c1d98e | [
"MIT"
] | null | null | null | """Flow namespace."""
from .base_flow import EventBrokerFlow
from .prematch_odds import PreMatchOddsFlow
from .upcoming_events import UpcomingEventsFlow
__all__ = ["EventBrokerFlow", "PreMatchOddsFlow", "UpcomingEventsFlow"]
| 32.285714 | 71 | 0.818584 |
c848858a357afa6b872a3b2d4eab2696b3dda851 | 6,885 | py | Python | cairis/test/test_LocationsAPI.py | anonymous-author21/cairis | feccb3ecc94ec864dbc87393e21de22bea704e19 | [
"Apache-2.0"
] | 62 | 2019-08-23T02:42:29.000Z | 2022-03-29T10:52:19.000Z | cairis/test/test_LocationsAPI.py | anonymous-author21/cairis | feccb3ecc94ec864dbc87393e21de22bea704e19 | [
"Apache-2.0"
] | 223 | 2019-07-29T09:49:54.000Z | 2022-03-29T09:48:21.000Z | cairis/test/test_LocationsAPI.py | anonymous-author21/cairis | feccb3ecc94ec864dbc87393e21de22bea704e19 | [
"Apache-2.0"
] | 32 | 2019-10-14T12:27:42.000Z | 2022-03-19T08:08:23.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... | 40.5 | 143 | 0.704285 |
02c91127c883d940328d7be05ab5db0a480df0e2 | 758 | py | Python | snakeai/agent/__init__.py | mxpoliakov/snake-ai-reinforcement | 770fc62eb5704a158f2bcb512b801b5c5db69075 | [
"MIT"
] | null | null | null | snakeai/agent/__init__.py | mxpoliakov/snake-ai-reinforcement | 770fc62eb5704a158f2bcb512b801b5c5db69075 | [
"MIT"
] | null | null | null | snakeai/agent/__init__.py | mxpoliakov/snake-ai-reinforcement | 770fc62eb5704a158f2bcb512b801b5c5db69075 | [
"MIT"
] | null | null | null | class AgentBase(object):
""" Represents an intelligent agent for the Snake environment. """
def begin_episode(self):
""" Reset the agent for a new episode. """
pass
def act(self, observation, reward):
"""
Choose the next action to take.
Args:
observatio... | 26.137931 | 77 | 0.629288 |
9a961acd52195abe8f398874e94b44097b1040eb | 344 | py | Python | tests/__init__.py | elventear/powerline | cddfc364c1bf269f721dfdbd765cde2649a3410d | [
"MIT"
] | 3 | 2016-08-31T23:09:58.000Z | 2016-08-31T23:10:00.000Z | tests/__init__.py | elventear/powerline | cddfc364c1bf269f721dfdbd765cde2649a3410d | [
"MIT"
] | null | null | null | tests/__init__.py | elventear/powerline | cddfc364c1bf269f721dfdbd765cde2649a3410d | [
"MIT"
] | 1 | 2015-01-09T21:02:50.000Z | 2015-01-09T21:02:50.000Z | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
import sys
if sys.version_info < (2, 7):
from unittest2 import TestCase, main # NOQA
from unittest2.case import SkipTest # NOQA
else:
from unittest import TestCase, main # NOQA
from unittest.case ... | 28.666667 | 84 | 0.773256 |
57356e4bdae07c1718e0096b3fcc7fefcbd9a184 | 6,916 | py | Python | copysig.py | rec/copysig | 31ee6aeb954cc4f1ad0db5518bfd6be0ebc9de82 | [
"MIT"
] | 1 | 2019-05-26T15:10:42.000Z | 2019-05-26T15:10:42.000Z | copysig.py | rec/copysig | 31ee6aeb954cc4f1ad0db5518bfd6be0ebc9de82 | [
"MIT"
] | null | null | null | copysig.py | rec/copysig | 31ee6aeb954cc4f1ad0db5518bfd6be0ebc9de82 | [
"MIT"
] | null | null | null | import inspect
def copysig(from_func, *args_to_remove):
def wrap(func):
#add and remove parameters
oldsig= inspect.signature(from_func)
oldsig= _remove_args(oldsig, args_to_remove)
newsig= _add_args(oldsig, func)
#write some code for a function that we can exec
#the... | 36.592593 | 150 | 0.612782 |
9b0f61def53ebad5ee0cac00df6acde1e2df5447 | 209 | py | Python | tests/test_unitest_module_invocation.py | svisser/aiounittest | 1d7c0e1deac720a3608d4941f56f73b74a206401 | [
"MIT"
] | 55 | 2017-08-18T10:24:05.000Z | 2022-03-21T08:29:19.000Z | tests/test_unitest_module_invocation.py | svisser/aiounittest | 1d7c0e1deac720a3608d4941f56f73b74a206401 | [
"MIT"
] | 15 | 2017-09-22T13:14:43.000Z | 2022-01-23T16:29:22.000Z | tests/test_unitest_module_invocation.py | svisser/aiounittest | 1d7c0e1deac720a3608d4941f56f73b74a206401 | [
"MIT"
] | 4 | 2019-11-26T18:08:43.000Z | 2021-06-01T22:12:00.000Z | import sys
from unittest.main import main
def test_specific_test():
sys.argv = ['TEST']
sys.argv.append('test_asynctestcase.TestAsyncCase.test_await_async_add')
a = main(module=None, exit=False)
| 23.222222 | 76 | 0.741627 |
6537f7cc23f247441169e14dc167f022b94573e7 | 115 | py | Python | unweaver/databases/geopackage/__init__.py | jsbeckwith/unweaver | a4ba9e4e288c75e93bf7f9d67bc11680f09c3da0 | [
"Apache-2.0"
] | 4 | 2019-04-24T16:38:57.000Z | 2021-12-28T20:38:08.000Z | unweaver/databases/geopackage/__init__.py | jsbeckwith/unweaver | a4ba9e4e288c75e93bf7f9d67bc11680f09c3da0 | [
"Apache-2.0"
] | 3 | 2021-06-02T04:06:33.000Z | 2021-11-02T01:47:20.000Z | unweaver/databases/geopackage/__init__.py | jsbeckwith/unweaver | a4ba9e4e288c75e93bf7f9d67bc11680f09c3da0 | [
"Apache-2.0"
] | 1 | 2020-08-13T04:42:05.000Z | 2020-08-13T04:42:05.000Z | from .geopackage import GeoPackage
from .feature_table import FeatureTable
from .geom_types import GeoPackageGeoms
| 28.75 | 39 | 0.869565 |
97459fbf736ae3c42651c4e7132cbbd9122fb3b9 | 12,325 | py | Python | Lib/distutils/text_file.py | deadsnakes/python3.1 | 88d77610a7873c5161bfc15cd69557fc7697b1a3 | [
"PSF-2.0"
] | 1 | 2021-12-26T22:20:34.000Z | 2021-12-26T22:20:34.000Z | Lib/distutils/text_file.py | deadsnakes/python3.1 | 88d77610a7873c5161bfc15cd69557fc7697b1a3 | [
"PSF-2.0"
] | null | null | null | Lib/distutils/text_file.py | deadsnakes/python3.1 | 88d77610a7873c5161bfc15cd69557fc7697b1a3 | [
"PSF-2.0"
] | 2 | 2018-08-06T04:37:38.000Z | 2022-02-27T18:07:12.000Z | """text_file
provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes."""
__revision__ = "$Id$"
import sys, os, io
class TextFile:
"""Provides a file-like object that takes care of all the th... | 43.245614 | 89 | 0.561623 |
66bf7d0ed520442c205e1cdfdd65aea5ffe69723 | 6,986 | py | Python | torchgeo/samplers/single.py | GIShkl/GAOFEN2021_CHANGEDETECTION | 5b7251cb1e951a04c7effacab6c1233232158472 | [
"MIT"
] | 3 | 2021-12-12T09:45:41.000Z | 2022-03-10T08:34:22.000Z | torchgeo/samplers/single.py | lyp19/GAOFEN2021_CHANGEDETECTION | 5b7251cb1e951a04c7effacab6c1233232158472 | [
"MIT"
] | null | null | null | torchgeo/samplers/single.py | lyp19/GAOFEN2021_CHANGEDETECTION | 5b7251cb1e951a04c7effacab6c1233232158472 | [
"MIT"
] | 1 | 2021-11-13T05:40:18.000Z | 2021-11-13T05:40:18.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""TorchGeo samplers."""
import abc
import random
from typing import Iterator, Optional, Tuple, Union
from rtree.index import Index
from torch.utils.data import Sampler
from torchgeo.datasets import BoundingBox
from .util... | 35.461929 | 88 | 0.618523 |
736884b369bc2ab92b90fb83eba6c641dd40e168 | 1,637 | py | Python | examples/ex3.py | whoopnip/pypi-sphinx-quickstart | 2f965a5ed0c6d45873542461f37cfd2eb1f62a7b | [
"MIT"
] | 1 | 2020-05-19T11:17:52.000Z | 2020-05-19T11:17:52.000Z | examples/ex3.py | whoopnip/pypi-sphinx-quickstart | 2f965a5ed0c6d45873542461f37cfd2eb1f62a7b | [
"MIT"
] | 15 | 2019-08-05T12:28:03.000Z | 2020-01-19T15:37:57.000Z | examples/ex3.py | whoopnip/pypi-sphinx-quickstart | 2f965a5ed0c6d45873542461f37cfd2eb1f62a7b | [
"MIT"
] | 2 | 2020-02-13T19:48:38.000Z | 2021-08-09T11:17:10.000Z | # -*- coding: utf-8 -*-
"""
Tertiary example - Plotting sin3
===================================
This is a general example demonstrating a Matplotlib plot output, embedded
rST, the use of math notation and cross-linking to other examples. It would be
useful to compare with the
output below.
.. math::
x \\rightar... | 26.403226 | 90 | 0.691509 |
c8364d1977dbece0fd087a334c7d289f428a6a7c | 1,788 | py | Python | tensorstream/common/extremum_spec.py | clems4ever/tensorstream | 61bff14f65f71bdd4ab58aefbd6eda79ec5863cb | [
"Apache-2.0"
] | 5 | 2019-04-10T03:51:13.000Z | 2020-07-12T10:50:24.000Z | tensorstream/common/extremum_spec.py | clems4ever/tensorstream | 61bff14f65f71bdd4ab58aefbd6eda79ec5863cb | [
"Apache-2.0"
] | null | null | null | tensorstream/common/extremum_spec.py | clems4ever/tensorstream | 61bff14f65f71bdd4ab58aefbd6eda79ec5863cb | [
"Apache-2.0"
] | null | null | null | import numpy as np
import tensorflow as tf
from tensorstream.common.extremum import GlobalMinimum, GlobalMaximum, LocalMinimum, LocalMaximum
from tensorstream.tests import TestCase
class ExtremumSpec(TestCase):
def setUp(self):
self.sheets = self.read_ods(
self.from_test_res('extremum.ods', __file__))
... | 31.928571 | 97 | 0.709172 |
10f64569a8f0b84d879e42c3434c9197cb0a0e6b | 735 | py | Python | Django/first_app/blog/models.py | anonhyme/Sandbox | 49906a0bc78a59916f37448a9b36a46e5410c4ba | [
"Unlicense"
] | null | null | null | Django/first_app/blog/models.py | anonhyme/Sandbox | 49906a0bc78a59916f37448a9b36a46e5410c4ba | [
"Unlicense"
] | null | null | null | Django/first_app/blog/models.py | anonhyme/Sandbox | 49906a0bc78a59916f37448a9b36a46e5410c4ba | [
"Unlicense"
] | null | null | null | from django.db import models
class Categorie(models.Model):
nom = models.CharField(max_length=30)
def __unicode__(self):
return self.nom
class Article(models.Model):
titre = models.CharField(max_length=100)
slug = models.SlugField(max_length = 100)
auteur = models.CharField(max_length=42)
contenu = models.Tex... | 33.409091 | 94 | 0.75102 |
8b767ccdafe47bc57a8bad54ad4e97d2e417b443 | 4,967 | py | Python | python3/libs/colorama/win32.py | Jgoodz/python_koans | 5669fb398f18a7e645938c51c03f03147695da83 | [
"MIT"
] | null | null | null | python3/libs/colorama/win32.py | Jgoodz/python_koans | 5669fb398f18a7e645938c51c03f03147695da83 | [
"MIT"
] | null | null | null | python3/libs/colorama/win32.py | Jgoodz/python_koans | 5669fb398f18a7e645938c51c03f03147695da83 | [
"MIT"
] | null | null | null | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
# from winbase.h
STDOUT = -11
STDERR = -12
try:
from ctypes import windll
from ctypes import wintypes
except ImportError:
windll = None
SetConsoleTextAttribute = lambda *_: None
else:
from ctypes import (
... | 36.792593 | 112 | 0.644051 |
48b26f752cc36977613a78698c199d4822f67a10 | 3,562 | py | Python | third_party/tensorflow/building/CONV/builder.py | doslindos/ml_crapwrap | f9daa2904234492921c6c344bfcd24992e2ff421 | [
"MIT"
] | null | null | null | third_party/tensorflow/building/CONV/builder.py | doslindos/ml_crapwrap | f9daa2904234492921c6c344bfcd24992e2ff421 | [
"MIT"
] | null | null | null | third_party/tensorflow/building/CONV/builder.py | doslindos/ml_crapwrap | f9daa2904234492921c6c344bfcd24992e2ff421 | [
"MIT"
] | null | null | null | from ..util import create_weights, create_bias
def conv_transpose_weights_creation_loop(weights_list, reversed_bs):
weights = []
bias = []
for i, w in enumerate(weights_list):
w_var = w
if reversed_bs[i] is not None:
b_var = reversed_bs[i]
else:
b_var = ... | 32.981481 | 92 | 0.527793 |
9ab144085893f8da182bc796e081c5104cc971c8 | 5,546 | py | Python | USPTO-15K/rank-diff-wln/oracletest.py | wengong-jin/nips17-rexgen | fb7dea369b0721b88cd0133a7d66348d244f65d3 | [
"MIT"
] | 113 | 2017-09-22T19:42:50.000Z | 2022-02-05T03:11:27.000Z | USPTO-15K/rank-diff-wln/oracletest.py | wibrow/nips17-rexgen | fb7dea369b0721b88cd0133a7d66348d244f65d3 | [
"MIT"
] | 6 | 2017-11-18T05:54:49.000Z | 2021-03-04T08:28:46.000Z | USPTO-15K/rank-diff-wln/oracletest.py | wibrow/nips17-rexgen | fb7dea369b0721b88cd0133a7d66348d244f65d3 | [
"MIT"
] | 41 | 2017-12-13T02:32:10.000Z | 2022-01-09T06:39:40.000Z | import tensorflow as tf
from utils.nn import linearND, linear
from mol_graph import atom_fdim as adim, bond_fdim as bdim, max_nb, smiles2graph, smiles2graph_test, bond_types
from models import *
import math, sys, random
from optparse import OptionParser
import threading
from multiprocessing import Queue
import rdkit
fr... | 33.409639 | 111 | 0.615218 |
3c48fbc5177c2ea80306f28505f7c009cbef1cd7 | 8,949 | py | Python | homeassistant/components/deconz/light.py | tafehe/ha-core | 2478ec887aba87842bf52969b7ab1137826f7b98 | [
"Apache-2.0"
] | 5 | 2020-10-08T12:59:44.000Z | 2021-12-28T06:46:25.000Z | homeassistant/components/deconz/light.py | tafehe/ha-core | 2478ec887aba87842bf52969b7ab1137826f7b98 | [
"Apache-2.0"
] | 75 | 2020-08-05T07:22:42.000Z | 2022-03-23T21:54:57.000Z | homeassistant/components/deconz/light.py | winning1120xx/home-assistant | 53d4c0ce2d374b5e97bbdc37742656c27adf8eea | [
"Apache-2.0"
] | 1 | 2021-08-01T06:12:13.000Z | 2021-08-01T06:12:13.000Z | """Support for deCONZ lights."""
from __future__ import annotations
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_EFFECT,
ATTR_FLASH,
ATTR_HS_COLOR,
ATTR_TRANSITION,
ATTR_XY_COLOR,
COLOR_MODE_BRIGHTNESS,
COLOR_MODE_COLOR_TEMP,
COLOR_MODE_HS... | 30.030201 | 84 | 0.627221 |
c81d0677508d66cb17944d34a5bdf7cc21ac8550 | 2,100 | py | Python | container-engine/bookshelf/model_datastore.py | stugit/cp100 | 837260c8572bba49a340f0736b06ae268d6807d8 | [
"Apache-2.0"
] | 65 | 2016-07-20T13:58:28.000Z | 2022-02-05T01:34:50.000Z | container-engine/bookshelf/model_datastore.py | stugit/cp100 | 837260c8572bba49a340f0736b06ae268d6807d8 | [
"Apache-2.0"
] | 1 | 2017-12-13T03:26:34.000Z | 2017-12-13T21:02:36.000Z | container-engine/bookshelf/model_datastore.py | stugit/cp100 | 837260c8572bba49a340f0736b06ae268d6807d8 | [
"Apache-2.0"
] | 101 | 2016-05-20T16:04:12.000Z | 2022-01-31T01:01:08.000Z | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 23.863636 | 79 | 0.667619 |
322cb767db3137fc1c757711f5b1543943d9a906 | 10,044 | py | Python | test/functional/p2p-acceptblock.py | DanielLuci/testcoin | c749274fe783e530ba9a5588c7f06e23a27cd7a7 | [
"MIT"
] | 59 | 2017-06-28T22:05:33.000Z | 2022-03-30T20:42:17.000Z | test/functional/p2p-acceptblock.py | DanielLuci/testcoin | c749274fe783e530ba9a5588c7f06e23a27cd7a7 | [
"MIT"
] | 18 | 2017-05-29T06:34:44.000Z | 2018-01-23T00:42:07.000Z | test/functional/p2p-acceptblock.py | DanielLuci/testcoin | c749274fe783e530ba9a5588c7f06e23a27cd7a7 | [
"MIT"
] | 60 | 2017-12-29T06:25:11.000Z | 2022-02-17T16:37:29.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test processing of unrequested blocks.
Since behavior differs when receiving unrequested blocks from w... | 44.64 | 107 | 0.667164 |
7556de256bbca57e64a7b2c8dbdca009598f50a9 | 2,137 | py | Python | tests/tools/test_histogram2d.py | dgorelik/differential-privacy-library | 5a7a267c591320036615a52dfad1918dc3718e62 | [
"MIT"
] | 1 | 2020-05-03T06:06:44.000Z | 2020-05-03T06:06:44.000Z | tests/tools/test_histogram2d.py | dohmatob/differential-privacy-library | 1a17bf0e3bf7d18d5c19258abbf81c27fd9a5e16 | [
"MIT"
] | null | null | null | tests/tools/test_histogram2d.py | dohmatob/differential-privacy-library | 1a17bf0e3bf7d18d5c19258abbf81c27fd9a5e16 | [
"MIT"
] | 1 | 2022-02-23T13:56:19.000Z | 2022-02-23T13:56:19.000Z | import numpy as np
from unittest import TestCase
from diffprivlib.tools.histograms import histogram2d
from diffprivlib.utils import global_seed, PrivacyLeakWarning
class TestHistogram2d(TestCase):
def test_no_params(self):
x = np.array([1, 2, 3, 4, 5])
y = np.array([5, 7, 1, 5, 9])
with s... | 35.616667 | 100 | 0.565278 |
70c6ee8f6aea0e9e4c6d656c4b0bb2a23cf14adf | 1,011 | py | Python | virtual/lib/python3.6/site-packages/django_celery_beat/migrations/0006_periodictask_priority.py | lorrainekamanda/NewsRestApi | 3be82ca066f26f7fde4e7a265c2e46dd4e86bd85 | [
"MIT"
] | null | null | null | virtual/lib/python3.6/site-packages/django_celery_beat/migrations/0006_periodictask_priority.py | lorrainekamanda/NewsRestApi | 3be82ca066f26f7fde4e7a265c2e46dd4e86bd85 | [
"MIT"
] | 2 | 2021-05-12T06:25:57.000Z | 2022-03-01T04:16:03.000Z | env/lib/python3.9/site-packages/django_celery_beat/migrations/0006_periodictask_priority.py | simotwo/AbileneParadox-ddd | c85961efb37aba43c0d99ed1c36d083507e2b2d3 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.6 on 2018-10-22 05:20
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
# depends on higher numbers due to a squashed migration
# that was later removed due to migration issues it caused
... | 34.862069 | 75 | 0.634026 |
15e63eec749b681321191232cde7ff71afe0dc70 | 1,209 | py | Python | base/site-packages/beecloud-python/sdk/setup.py | edisonlz/fastor | 342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3 | [
"Apache-2.0"
] | 285 | 2019-12-23T09:50:21.000Z | 2021-12-08T09:08:49.000Z | base/site-packages/beecloud-python/sdk/setup.py | jeckun/fastor | 342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3 | [
"Apache-2.0"
] | null | null | null | base/site-packages/beecloud-python/sdk/setup.py | jeckun/fastor | 342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3 | [
"Apache-2.0"
] | 9 | 2019-12-23T12:59:25.000Z | 2022-03-15T05:12:11.000Z | # -*- coding: utf-8 -*-
"""
setup script.
:created by xuanzhui on 2015/12/24.
:copyright (c) 2015 BeeCloud.
:license: MIT, see LICENSE for more details.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='beecloud',
version='3.6.0',
... | 30.225 | 70 | 0.603805 |
4448ca63035062e9d543b04631dc8b4799599d80 | 11,349 | py | Python | parcels/kernels/EOSseawaterproperties.py | angus-g/parcels | 237d85b399228baa331dc7958247198965372def | [
"MIT"
] | null | null | null | parcels/kernels/EOSseawaterproperties.py | angus-g/parcels | 237d85b399228baa331dc7958247198965372def | [
"MIT"
] | null | null | null | parcels/kernels/EOSseawaterproperties.py | angus-g/parcels | 237d85b399228baa331dc7958247198965372def | [
"MIT"
] | 1 | 2019-10-21T15:08:43.000Z | 2019-10-21T15:08:43.000Z | """Collection of pre-built eos sea water property kernels"""
import math
__all__ = ['PressureFromLatDepth', 'AdiabticTemperatureGradient', 'PtempFromTemp', 'TempFromPtemp', 'UNESCODensity']
def PressureFromLatDepth(particle, fieldset, time):
"""
Calculates pressure in dbars from depth in meters and latitude.... | 32.518625 | 116 | 0.512116 |
368211f89c27502be4cd8bf4594f4a0162f2a92b | 2,512 | py | Python | apps/account/tests/test_urls.py | convers39/IR-ecommerce | 57665aace80c14b52a40a9576de8b433a13f8f3f | [
"MIT"
] | 2 | 2021-10-12T11:04:57.000Z | 2022-01-04T08:17:11.000Z | apps/account/tests/test_urls.py | convers39/IR-ecommerce | 57665aace80c14b52a40a9576de8b433a13f8f3f | [
"MIT"
] | null | null | null | apps/account/tests/test_urls.py | convers39/IR-ecommerce | 57665aace80c14b52a40a9576de8b433a13f8f3f | [
"MIT"
] | 1 | 2021-04-30T16:43:29.000Z | 2021-04-30T16:43:29.000Z | from django.test import SimpleTestCase
from django.urls import reverse, resolve
from account.views import (LoginView, LogoutView, RegisterView, ActivateView, PasswordResetView,
AccountCenterView, OrderListView, AddressView, WishlistView)
class TestAccountUrls(SimpleTestCase):
def tes... | 39.873016 | 96 | 0.633758 |
416caa3e33d67759735d6ba752956d95348a72da | 5,026 | py | Python | analyser/analysis/pen_click_mean_deviations.py | michigg/web-simultaneous-recording-tool | 67db83f6e34d9cb726c69b4e448fed3604a43618 | [
"MIT"
] | 1 | 2022-03-30T09:45:25.000Z | 2022-03-30T09:45:25.000Z | analyser/analysis/pen_click_mean_deviations.py | michigg/web-simultaneous-recording-tool | 67db83f6e34d9cb726c69b4e448fed3604a43618 | [
"MIT"
] | null | null | null | analyser/analysis/pen_click_mean_deviations.py | michigg/web-simultaneous-recording-tool | 67db83f6e34d9cb726c69b4e448fed3604a43618 | [
"MIT"
] | null | null | null | """
Generates Plot of dba values per device per distance
"""
import sys
import pandas as pd
from utils import audio_calcs
from utils.data_loader import Loader
import logging
from utils.output import Output
INPUT_DEVICES = '/home/michigg/GIT/uni/2021-ma-michael-goetz-data/PensCalibration/Test2/Converted/devices-1-a... | 33.284768 | 128 | 0.709511 |
5dfe005dd95855c95c38eede6a7f7ff461086a03 | 129,479 | py | Python | dev/Tools/build/waf-1.7.13/lmbrwaflib/cryengine_modules.py | pawandayma/lumberyard | e178f173f9c21369efd8c60adda3914e502f006a | [
"AML"
] | null | null | null | dev/Tools/build/waf-1.7.13/lmbrwaflib/cryengine_modules.py | pawandayma/lumberyard | e178f173f9c21369efd8c60adda3914e502f006a | [
"AML"
] | null | null | null | dev/Tools/build/waf-1.7.13/lmbrwaflib/cryengine_modules.py | pawandayma/lumberyard | e178f173f9c21369efd8c60adda3914e502f006a | [
"AML"
] | null | null | null | #
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or th... | 41.393542 | 278 | 0.64707 |
a6875b1e2be1f79a96366c8e40b6f4e746ff5b50 | 2,299 | py | Python | ssseg/modules/models/samplers/ohempixelsampler.py | zhizhangxian/sssegmentation | 90613f6e0abf4cdd729cf382ab2a915e106d8649 | [
"MIT"
] | 411 | 2020-10-22T02:24:57.000Z | 2022-03-31T11:19:17.000Z | ssseg/modules/models/samplers/ohempixelsampler.py | zhizhangxian/sssegmentation | 90613f6e0abf4cdd729cf382ab2a915e106d8649 | [
"MIT"
] | 24 | 2020-12-21T03:53:54.000Z | 2022-03-17T06:50:00.000Z | ssseg/modules/models/samplers/ohempixelsampler.py | zhizhangxian/sssegmentation | 90613f6e0abf4cdd729cf382ab2a915e106d8649 | [
"MIT"
] | 59 | 2020-12-04T03:40:12.000Z | 2022-03-30T09:12:47.000Z | '''
Function:
OHEM pixel sampler
Author:
Zhenchao Jin
'''
import torch
import torch.nn.functional as F
from .base import BasePixelSampler
'''OHEM pixel sampler'''
class OHEMPixelSampler(BasePixelSampler):
def __init__(self, loss_func=None, thresh=None, min_kept_per_image=100000, ignore_index=255, **kwargs... | 41.8 | 107 | 0.601131 |
a3282a4c0613163e7e29d71ce4e9837597288f7d | 510 | py | Python | Algorithms/Greedy/Activity-Selection.py | javokhirbek1999/AlgorithmsDS | f5f403fed959ac8cf3064c8c852c59f2e67496ab | [
"MIT"
] | 6 | 2021-03-21T02:24:05.000Z | 2021-04-05T01:32:13.000Z | Algorithms/Greedy/Activity-Selection.py | javokhirbek1999/AlgorithmsDS | f5f403fed959ac8cf3064c8c852c59f2e67496ab | [
"MIT"
] | null | null | null | Algorithms/Greedy/Activity-Selection.py | javokhirbek1999/AlgorithmsDS | f5f403fed959ac8cf3064c8c852c59f2e67496ab | [
"MIT"
] | null | null | null | # Activities:
# Columns:
# 1. Activity name
# 2. Activity start time
# 3. Activity end time
activities = [
['A1',0,6],
['A2',3,4],
['A3',1,2],
['A4',5,8],
['A5',5,7],
['A6',8,9]
]
def maxActivities(activities):
activities.sort(key=lambda x:x[2])
most_optimals =... | 19.615385 | 46 | 0.584314 |
3b59c96ab3016c708b418a94fa13ddd9e0e08208 | 25,417 | py | Python | backend/handler.py | ioggstream/httpsig-org | 1592099b63efd5e3a1ee81067fd171a51055a793 | [
"MIT"
] | null | null | null | backend/handler.py | ioggstream/httpsig-org | 1592099b63efd5e3a1ee81067fd171a51055a793 | [
"MIT"
] | null | null | null | backend/handler.py | ioggstream/httpsig-org | 1592099b63efd5e3a1ee81067fd171a51055a793 | [
"MIT"
] | null | null | null | import json
try:
from http_parser.parser import HttpParser
except ImportError:
from http_parser.pyparser import HttpParser
import http_sfv
from urllib.parse import parse_qs
from Cryptodome.Signature import pss
from Cryptodome.Signature import pkcs1_15
from Cryptodome.Signature import DSS
from Cryptodome.Hash ... | 30.845874 | 145 | 0.46225 |
ffc83dd91b9ba2dbcfb15d1a72aab03516d59d5a | 3,541 | py | Python | gui/kivy/uix/dialogs/bump_fee_dialog.py | CommerciumBlockchain/CommerciumElectro | 5448d621b6ebf28f93064cdefcf5d86878044c17 | [
"MIT"
] | null | null | null | gui/kivy/uix/dialogs/bump_fee_dialog.py | CommerciumBlockchain/CommerciumElectro | 5448d621b6ebf28f93064cdefcf5d86878044c17 | [
"MIT"
] | null | null | null | gui/kivy/uix/dialogs/bump_fee_dialog.py | CommerciumBlockchain/CommerciumElectro | 5448d621b6ebf28f93064cdefcf5d86878044c17 | [
"MIT"
] | 5 | 2018-06-23T13:54:52.000Z | 2019-04-28T00:46:43.000Z | from kivy.app import App
from kivy.factory import Factory
from kivy.properties import ObjectProperty
from kivy.lang import Builder
from commerciumelectro.util import fee_levels
from commerciumelectro_gui.kivy.i18n import _
Builder.load_string('''
<BumpFeeDialog@Popup>
title: _('Bump fee')
size_hint: 0.8, 0.8
... | 29.508333 | 81 | 0.530076 |
4815861e42e326967feb270f812894eb605c1b30 | 6,328 | py | Python | model_analyzer/analyzer.py | ahiroto/model_analyzer | 4dbd47c0e71d66d90526d5523570e2c6f717d5bc | [
"Apache-2.0"
] | null | null | null | model_analyzer/analyzer.py | ahiroto/model_analyzer | 4dbd47c0e71d66d90526d5523570e2c6f717d5bc | [
"Apache-2.0"
] | null | null | null | model_analyzer/analyzer.py | ahiroto/model_analyzer | 4dbd47c0e71d66d90526d5523570e2c6f717d5bc | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, NVIDIA 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 required by applic... | 32.958333 | 92 | 0.638274 |
13e5682bb95ddfeb497966933c9e147164ac3110 | 391 | py | Python | Modulo_4/semana 3/practica sabado/reporte/reporte/wsgi.py | AutodidactaMx/cocid_python | 11628f465ff362807a692c79ede26bf30dd8e26a | [
"MIT"
] | null | null | null | Modulo_4/semana 3/practica sabado/reporte/reporte/wsgi.py | AutodidactaMx/cocid_python | 11628f465ff362807a692c79ede26bf30dd8e26a | [
"MIT"
] | null | null | null | Modulo_4/semana 3/practica sabado/reporte/reporte/wsgi.py | AutodidactaMx/cocid_python | 11628f465ff362807a692c79ede26bf30dd8e26a | [
"MIT"
] | 1 | 2022-03-04T00:57:18.000Z | 2022-03-04T00:57:18.000Z | """
WSGI config for reporte project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTI... | 23 | 78 | 0.785166 |
e11048f8c5d9320730f00a77e33a9c2abebdbade | 7,417 | py | Python | autoarray/structures/arrays/one_d/array_1d_util.py | caoxiaoyue/PyAutoArray | e10d3d6a5b8dd031f2ad277486bd539bd5858b2a | [
"MIT"
] | 5 | 2019-09-26T02:18:25.000Z | 2021-12-11T16:29:20.000Z | autoarray/structures/arrays/one_d/array_1d_util.py | caoxiaoyue/PyAutoArray | e10d3d6a5b8dd031f2ad277486bd539bd5858b2a | [
"MIT"
] | 3 | 2020-03-30T14:25:57.000Z | 2021-12-21T17:10:55.000Z | autoarray/structures/arrays/one_d/array_1d_util.py | caoxiaoyue/PyAutoArray | e10d3d6a5b8dd031f2ad277486bd539bd5858b2a | [
"MIT"
] | 4 | 2020-03-03T11:35:41.000Z | 2022-01-21T17:37:35.000Z | import os
import numpy as np
from astropy.io import fits
from autoarray import numba_util
from autoarray.mask import mask_1d_util
@numba_util.jit()
def array_1d_slim_from(
array_1d_native: np.ndarray, mask_1d: np.ndarray, sub_size: int
) -> np.ndarray:
"""
For a 1D array and mask, map the va... | 35.658654 | 119 | 0.66442 |
19ee91efbcf04a7147aa5834b07eea76e3bf8db0 | 5,380 | py | Python | python/ycm_simple_conf.py | chengxie/ycm_simple_conf | 38e5db4fb74b0b4bf2d73001c7ba5489893b53b1 | [
"Zlib"
] | null | null | null | python/ycm_simple_conf.py | chengxie/ycm_simple_conf | 38e5db4fb74b0b4bf2d73001c7ba5489893b53b1 | [
"Zlib"
] | null | null | null | python/ycm_simple_conf.py | chengxie/ycm_simple_conf | 38e5db4fb74b0b4bf2d73001c7ba5489893b53b1 | [
"Zlib"
] | null | null | null | # ycm_simple_conf - ycm_simple_conf.py
# Created by Thomas Da Costa <tdc.input@gmail.com>
# Copyright (C) 2014 Thomas Da Costa
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from the use of this software.
# Permi... | 34.709677 | 79 | 0.607063 |
851536694eef2e5e42337b50d409b50e1f2ae1bc | 15,390 | py | Python | external-import/crowdstrike/src/crowdstrike/core.py | opencti-platform/connectors | a1ed484f2d275f99cf10630dc2d29ce355ee8ce3 | [
"Apache-2.0"
] | null | null | null | external-import/crowdstrike/src/crowdstrike/core.py | opencti-platform/connectors | a1ed484f2d275f99cf10630dc2d29ce355ee8ce3 | [
"Apache-2.0"
] | null | null | null | external-import/crowdstrike/src/crowdstrike/core.py | opencti-platform/connectors | a1ed484f2d275f99cf10630dc2d29ce355ee8ce3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""OpenCTI CrowdStrike connector core module."""
import os
import time
from typing import Any, Dict, List, Mapping, Optional
import stix2
import yaml
from crowdstrike.actor.importer import ActorImporter
from crowdstrike.importer import BaseImporter
from crowdstrike.indicator.importer import In... | 36.995192 | 88 | 0.65666 |
2b19f475be5bed2988cfc5712787a6e3fa36c43c | 897 | py | Python | hypercollate/__init__.py | HuygensING/hyper-collate-python-proxy | bb71620cf8ac32835003ac11ec3b899464c0b223 | [
"Apache-2.0"
] | null | null | null | hypercollate/__init__.py | HuygensING/hyper-collate-python-proxy | bb71620cf8ac32835003ac11ec3b899464c0b223 | [
"Apache-2.0"
] | null | null | null | hypercollate/__init__.py | HuygensING/hyper-collate-python-proxy | bb71620cf8ac32835003ac11ec3b899464c0b223 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Copyright 2018 Huygens ING
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... | 32.035714 | 75 | 0.754738 |
da3698cf1ecfcb19aec85cf4efcdef1ecd07a0ab | 1,089 | py | Python | conkit/io/tests/test__cache.py | mesdaghi/conkit | 01468761352bd3ac5078e5e9fef6f73c8c49036e | [
"BSD-3-Clause"
] | 12 | 2017-06-12T17:20:32.000Z | 2021-12-10T09:35:26.000Z | conkit/io/tests/test__cache.py | mesdaghi/conkit | 01468761352bd3ac5078e5e9fef6f73c8c49036e | [
"BSD-3-Clause"
] | 60 | 2017-02-08T19:29:34.000Z | 2022-03-17T16:00:54.000Z | conkit/io/tests/test__cache.py | mesdaghi/conkit | 01468761352bd3ac5078e5e9fef6f73c8c49036e | [
"BSD-3-Clause"
] | 12 | 2017-09-25T07:25:35.000Z | 2022-02-27T18:59:13.000Z | """Testing facility for conkit.io._cache"""
__author__ = "Felix Simkovic"
__date__ = "19 Jun 2017"
import unittest
from conkit.io._cache import ParserCache
class TestParserCache(unittest.TestCase):
def test_1(self):
c = ParserCache()
self.assertTrue("casprr" in c)
def test_2(self):
... | 23.170213 | 61 | 0.640955 |
f7ebd419c164252410a2a02d959583784ada17d7 | 5,697 | py | Python | report_crawler/report_crawler/parser/parser_001/_S/SWU001.py | HeadCow/ARPS | fa7257f2aaee70391b8def527dd09f59aa5d26fa | [
"MIT"
] | 1 | 2021-04-09T09:49:11.000Z | 2021-04-09T09:49:11.000Z | report_crawler/report_crawler/parser/parser_001/_S/SWU001.py | HeadCow/ARPS | fa7257f2aaee70391b8def527dd09f59aa5d26fa | [
"MIT"
] | null | null | null | report_crawler/report_crawler/parser/parser_001/_S/SWU001.py | HeadCow/ARPS | fa7257f2aaee70391b8def527dd09f59aa5d26fa | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
import re
def Filter(text, ab_sign=0):
# title
if re.search(u"(((报[ ]*告|讲[ ]*座)*(主[ ]*题|题[ ]*目))([ ((](Title|Topic))*|Title|Topic)[)) ]*[::.]+", text) is not None:
text = re.sub(u"(((报[ ]*告|讲[ ]*座)*(主[ ]*题|题[ ]*目))([ ((](Title|Topic))*|Title|Topic)[)) ]*[::.]+[\s\S]*", '', text)
# time
i... | 46.696721 | 188 | 0.543971 |
65bd8e0ccfec8de1b923b7ccd5125f1dfdd55364 | 2,078 | py | Python | tf_pwa/tests/test_vis.py | ReynLieu/tf-pwa | f354b5036bc8c37ffba95849de5ec3367934eef8 | [
"MIT"
] | 4 | 2021-05-10T15:17:24.000Z | 2021-08-16T07:40:06.000Z | tf_pwa/tests/test_vis.py | ReynLieu/tf-pwa | f354b5036bc8c37ffba95849de5ec3367934eef8 | [
"MIT"
] | 45 | 2020-10-24T08:26:19.000Z | 2022-03-20T06:14:58.000Z | tf_pwa/tests/test_vis.py | ReynLieu/tf-pwa | f354b5036bc8c37ffba95849de5ec3367934eef8 | [
"MIT"
] | 8 | 2020-10-24T06:41:06.000Z | 2022-01-03T01:29:49.000Z | import matplotlib.pyplot as plt
from tf_pwa.particle import BaseDecay, BaseParticle, DecayChain
from tf_pwa.vis import *
ex_result = """
digraph {
rankdir=LR;
node [shape=point];
edge [arrowhead=none, labelfloat=true];
"A" [shape=none];
"B" [shape=none];
"C" [shape=none];
"D" [shape=none];... | 28.081081 | 77 | 0.586141 |
203126de6ae9ed45c912d78f50701dbed657eda5 | 1,813 | py | Python | src/svphase/scripts/plot_cov.py | l337x911/inphadel | 7d5ad58d90d745ed82226a8b0b983875cbe1d26e | [
"CC-BY-3.0"
] | 3 | 2015-11-20T02:27:23.000Z | 2020-04-26T07:19:18.000Z | src/svphase/scripts/plot_cov.py | l337x911/inphadel | 7d5ad58d90d745ed82226a8b0b983875cbe1d26e | [
"CC-BY-3.0"
] | null | null | null | src/svphase/scripts/plot_cov.py | l337x911/inphadel | 7d5ad58d90d745ed82226a8b0b983875cbe1d26e | [
"CC-BY-3.0"
] | null | null | null | import numpy as na
from matplotlib import pyplot as plt
hic_sv_fpath = '/home/anand/Projects/assembly/data/gm12878/del1kb.chr20o.hic.bed'
wgs_sv_fpath = '/home/anand/Projects/assembly/data/gm12878/del1kb.chr20.wgs.bed'
hic_nonsv_fpath = '/home/anand/Projects/assembly/data/gm12878/nondel1kb.rand.chr20o.hic.bed'
wgs_non... | 33.574074 | 123 | 0.731384 |
4c5d75e3b7891bde0030e4024f15306f473d3556 | 2,561 | py | Python | nodegraphtree/tests.py | ranigb/Set-Tree | fa3971f9a8ef98dbfd0f6de654efcde3006a197b | [
"MIT"
] | null | null | null | nodegraphtree/tests.py | ranigb/Set-Tree | fa3971f9a8ef98dbfd0f6de654efcde3006a197b | [
"MIT"
] | null | null | null | nodegraphtree/tests.py | ranigb/Set-Tree | fa3971f9a8ef98dbfd0f6de654efcde3006a197b | [
"MIT"
] | null | null | null | from graph_data import graph_data
import numpy as np
from scipy.linalg import block_diag
from typing import Final
from networkx.generators.random_graphs import watts_strogatz_graph, barabasi_albert_graph, fast_gnp_random_graph
from networkx.linalg.graphmatrix import adjacency_matrix
class Gnp_overfit:
def __init__... | 30.488095 | 112 | 0.575947 |
393979657d42611f974e59923f490bc4b9018002 | 2,437 | py | Python | examples/twisted/wamp/pubsub/complex/backend.py | RyanHope/AutobahnPython | 751b140cf2ea3e343cdcbab02d5cf51fb5295fa9 | [
"MIT"
] | null | null | null | examples/twisted/wamp/pubsub/complex/backend.py | RyanHope/AutobahnPython | 751b140cf2ea3e343cdcbab02d5cf51fb5295fa9 | [
"MIT"
] | null | null | null | examples/twisted/wamp/pubsub/complex/backend.py | RyanHope/AutobahnPython | 751b140cf2ea3e343cdcbab02d5cf51fb5295fa9 | [
"MIT"
] | null | null | null | ###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Tavendo GmbH
#
# 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 with... | 34.814286 | 79 | 0.655724 |
3183a88c730a7fdaff332fc2667b9c2416f2b98e | 1,098 | py | Python | redlist/del_todo.py | hy-kiera/RedList | d2fffa4c58a16ca9877fcccd0525ea4683e3f4dd | [
"MIT"
] | null | null | null | redlist/del_todo.py | hy-kiera/RedList | d2fffa4c58a16ca9877fcccd0525ea4683e3f4dd | [
"MIT"
] | null | null | null | redlist/del_todo.py | hy-kiera/RedList | d2fffa4c58a16ca9877fcccd0525ea4683e3f4dd | [
"MIT"
] | 1 | 2018-06-03T13:47:55.000Z | 2018-06-03T13:47:55.000Z | # -*- coding: utf-8 -*-
import sqlite3
try:
from . import create_table as ct
from . import ls as li
except:
import create_table as ct
import ls as li
from pathlib import Path
def del_todo():
home_dir = str(Path.home())
conn = sqlite3.connect(home_dir + "/task.db")
cur = conn.cursor()
slct_data = "select * fro... | 24.954545 | 78 | 0.704007 |
da0e47d470f6781f28dff30cd75c0c2ec9f0fad2 | 8,842 | py | Python | test/runner/lib/cloud/cs.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | test/runner/lib/cloud/cs.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | test/runner/lib/cloud/cs.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | """CloudStack plugin for integration tests."""
from __future__ import absolute_import, print_function
import json
import os
import re
import time
from lib.cloud import (
CloudProvider,
CloudEnvironment,
)
from lib.util import (
find_executable,
ApplicationError,
display,
SubprocessError,
... | 31.805755 | 141 | 0.606198 |
f61a2e9f425d236c761e74852de182d965a87370 | 5,552 | py | Python | simtools/io_handler.py | RaulRPrado/ctamclib | ed18de64724deec403ed5ee06971c377562331ef | [
"BSD-3-Clause"
] | null | null | null | simtools/io_handler.py | RaulRPrado/ctamclib | ed18de64724deec403ed5ee06971c377562331ef | [
"BSD-3-Clause"
] | null | null | null | simtools/io_handler.py | RaulRPrado/ctamclib | ed18de64724deec403ed5ee06971c377562331ef | [
"BSD-3-Clause"
] | null | null | null | """ Module to handle input and output conventions. """
import datetime
from pathlib import Path
import simtools.config as cfg
__all__ = [
"getModelOutputDirectory",
"getRayTracingOutputDirectory",
"getCorsikaOutputDirectory",
"getTestDataFile",
"getTestDataDirectory",
"getTestOutputFile",
... | 20.87218 | 94 | 0.62518 |
0902d626b7fd6cc5debcdecdf7e390a738d2b3ae | 2,036 | py | Python | venv/lib/python3.6/site-packages/channels/testing/live.py | AzamatGla/channelChokan | 0dbcc8b701d57dcd4c8fe9c0573738c573797c21 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/channels/testing/live.py | AzamatGla/channelChokan | 0dbcc8b701d57dcd4c8fe9c0573738c573797c21 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/channels/testing/live.py | AzamatGla/channelChokan | 0dbcc8b701d57dcd4c8fe9c0573738c573797c21 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.db import connections
from django.test.testcases import LiveServerTestCase, LiveServerThread
from daphne.endpoints import build_endpoint_description_strings
from daphne.server import Server
from ..routing import get_default_application
class DaphneServerThread(LiveServer... | 30.38806 | 87 | 0.641454 |
d017f4e1abbb67638d2da498a80525fc50fb0245 | 3,749 | py | Python | fosspay/objects.py | unascribed/fosspay | 7ca4ae5861332bd7311e0092c2c7e286325a0e10 | [
"MIT"
] | 1 | 2020-04-18T08:12:49.000Z | 2020-04-18T08:12:49.000Z | fosspay/objects.py | unascribed/fosspay | 7ca4ae5861332bd7311e0092c2c7e286325a0e10 | [
"MIT"
] | null | null | null | fosspay/objects.py | unascribed/fosspay | 7ca4ae5861332bd7311e0092c2c7e286325a0e10 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, Integer, String, Unicode, Boolean, DateTime
from sqlalchemy import ForeignKey, Table, UnicodeText, Text, text
from sqlalchemy.orm import relationship, backref
from sqlalchemy_utils import ChoiceType
from .database import Base
from datetime import datetime
from enum import Enum
import bc... | 32.042735 | 94 | 0.656175 |
8249af61f2f2b3d75908d3c88a2e7bd365da142b | 2,308 | py | Python | stock.py | OdooCommunityWidgets/product_image_list_view | e969fb0b05ef4bee0e5bce500a34b02f7864c123 | [
"MIT"
] | 2 | 2015-03-25T18:24:51.000Z | 2017-01-02T15:00:24.000Z | stock.py | OdooCommunityWidgets/product_image_list_view | e969fb0b05ef4bee0e5bce500a34b02f7864c123 | [
"MIT"
] | 3 | 2015-04-02T06:27:54.000Z | 2015-06-29T07:37:41.000Z | stock.py | OdooCommunityWidgets/product_image_list_view | e969fb0b05ef4bee0e5bce500a34b02f7864c123 | [
"MIT"
] | 7 | 2015-05-31T19:17:10.000Z | 2018-10-29T12:59:41.000Z | from openerp.osv import fields, osv
class stock_move(osv.Model):
_name = 'stock.move'
_inherit = 'stock.move'
def onchange_product_id(self, cr, uid, ids, prod_id=False, loc_id=False,
loc_dest_id=False, partner_id=False):
res_prod = super(stock_move, self).onchange_produ... | 40.491228 | 199 | 0.642114 |
f18aaee79f97e884ed5d6e3eaf26e530468f2f22 | 1,788 | py | Python | resolwe/permissions/tests/test_tool.py | zagm/resolwe | da371a3ec0260a45ccab848704c6a339a0de79cc | [
"Apache-2.0"
] | null | null | null | resolwe/permissions/tests/test_tool.py | zagm/resolwe | da371a3ec0260a45ccab848704c6a339a0de79cc | [
"Apache-2.0"
] | null | null | null | resolwe/permissions/tests/test_tool.py | zagm/resolwe | da371a3ec0260a45ccab848704c6a339a0de79cc | [
"Apache-2.0"
] | null | null | null | # pylint: disable=missing-docstring
from rest_framework import status
from resolwe.flow.models import Process
from resolwe.flow.views import ProcessViewSet
from resolwe.test import ResolweAPITestCase
class ProcessTestCase(ResolweAPITestCase):
fixtures = ['users.yaml', 'processes.yaml', 'data.yaml', 'collections.... | 33.111111 | 100 | 0.660515 |
6aaca373b8574b7a98be3344e1f44dbc81dc8256 | 7,705 | py | Python | tests/unit/bokeh/io/test_export.py | tcmetzger/bokeh | 5daff21bfb7e10b69ff9aa2f35eb506777a38264 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T18:44:46.000Z | 2020-08-07T18:44:46.000Z | tests/unit/bokeh/io/test_export.py | tcmetzger/bokeh | 5daff21bfb7e10b69ff9aa2f35eb506777a38264 | [
"BSD-3-Clause"
] | 12 | 2020-08-26T20:19:29.000Z | 2020-08-26T20:19:52.000Z | tests/unit/bokeh/io/test_export.py | tcmetzger/bokeh | 5daff21bfb7e10b69ff9aa2f35eb506777a38264 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 35.182648 | 130 | 0.550422 |
a03489402643b7974de1cb24b27aa61d3dde23aa | 213,398 | py | Python | modules/s3cfg.py | krypt0x/eden | 63679c36d627b5d0be5858759217408e09aa4ef0 | [
"MIT"
] | 1 | 2018-06-06T12:11:25.000Z | 2018-06-06T12:11:25.000Z | modules/s3cfg.py | krypt0x/eden | 63679c36d627b5d0be5858759217408e09aa4ef0 | [
"MIT"
] | null | null | null | modules/s3cfg.py | krypt0x/eden | 63679c36d627b5d0be5858759217408e09aa4ef0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Deployment Settings
@requires: U{B{I{gluon}} <http://web2py.com>}
@copyright: 2009-2021 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (t... | 35.03497 | 215 | 0.552156 |
426e0a73305be75190fc3c4536a37137c05ef431 | 3,690 | py | Python | Validation/CaloTowers/test/run_onRelVal_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Validation/CaloTowers/test/run_onRelVal_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Validation/CaloTowers/test/run_onRelVal_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import os
import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
process = cms.Process("hcalval")
process.load("Configuration.StandardSequences.Reconstruction_cff")
process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load("Configuration.StandardSeque... | 40.108696 | 124 | 0.725203 |
731b5992e78b7079dc5d23cc0996a2e6851552e8 | 5,678 | py | Python | lib/bridgedb/configure.py | pagea/bridgedb | a5409eef0f358e4aaaaa252f06679b3088c80f98 | [
"BSD-3-Clause-Clear"
] | null | null | null | lib/bridgedb/configure.py | pagea/bridgedb | a5409eef0f358e4aaaaa252f06679b3088c80f98 | [
"BSD-3-Clause-Clear"
] | null | null | null | lib/bridgedb/configure.py | pagea/bridgedb | a5409eef0f358e4aaaaa252f06679b3088c80f98 | [
"BSD-3-Clause-Clear"
] | null | null | null | # -*- coding: utf-8 ; test-case-name: bridgedb.test.test_configure -*-
#
# This file is part of BridgeDB, a Tor bridge distribution system.
#
# :authors: please see the AUTHORS file for attributions
# :copyright: (c) 2013-2014, Isis Lovecruft
# (c) 2013-2014, Matthew Finkel
# (c) 2007-2014, Nick... | 42.691729 | 79 | 0.656745 |
2c616b178f8e5e8660d53992a866c0d26b43e391 | 6,647 | py | Python | proj/surveys/junk.py | glasst/CS491-Research-Survey-Tool- | 4e379de8989ecd35cdad5875d9afb74906ed6009 | [
"MIT"
] | 1 | 2022-03-02T06:06:34.000Z | 2022-03-02T06:06:34.000Z | proj/surveys/junk.py | glasst/CS491-Research-Survey-Tool- | 4e379de8989ecd35cdad5875d9afb74906ed6009 | [
"MIT"
] | null | null | null | proj/surveys/junk.py | glasst/CS491-Research-Survey-Tool- | 4e379de8989ecd35cdad5875d9afb74906ed6009 | [
"MIT"
] | null | null | null | # For dead code
########################################################################################################################
# FROM views.py
'''
def surveycompletion(request):
survey_Id = request.session.get('survey_Id')
#questions = Question.objects.filter(question_survey_Id=surveyid)
#mclist... | 36.125 | 120 | 0.605837 |
06ced43adceed7837f61942fc4aa2b6ed39f16f4 | 1,646 | py | Python | backend/AXIOME3_app/report/pcoa/views.py | neufeld/AXIOME3-GUI | 80b87753b47fab116324b4f0e4151c21ab3b1725 | [
"BSD-3-Clause"
] | 2 | 2021-02-25T16:59:12.000Z | 2021-02-25T20:06:15.000Z | backend/AXIOME3_app/report/pcoa/views.py | neufeld/AXIOME3-GUI | 80b87753b47fab116324b4f0e4151c21ab3b1725 | [
"BSD-3-Clause"
] | 7 | 2020-11-18T08:05:52.000Z | 2022-02-17T20:45:10.000Z | backend/AXIOME3_app/report/pcoa/views.py | neufeld/AXIOME3-GUI | 80b87753b47fab116324b4f0e4151c21ab3b1725 | [
"BSD-3-Clause"
] | null | null | null | from flask import Blueprint, request, send_file
import sys
import os
import io
from AXIOME3_app.utils import get_pcoa_plots_dir
blueprint = Blueprint("pcoa", __name__, url_prefix="/pcoa")
@blueprint.route("/columns", methods=['POST'])
def pcoa_columns():
uid = request.form["uid"]
PCOA_DIR = get_pcoa_plots_dir(uid)... | 29.392857 | 102 | 0.72904 |
e60c435e95644ffdc73119bbb530423aeaa07102 | 458 | py | Python | opensource/opencv/workpixels.py | marciojv/hacks-cognitives-plataforms | 5b43f52d6afde4ad2768ad5b85e376578e2c9b2f | [
"Apache-2.0"
] | 1 | 2021-05-14T18:43:51.000Z | 2021-05-14T18:43:51.000Z | opensource/opencv/workpixels.py | marciojv/hacks-cognitives-plataforms | 5b43f52d6afde4ad2768ad5b85e376578e2c9b2f | [
"Apache-2.0"
] | null | null | null | opensource/opencv/workpixels.py | marciojv/hacks-cognitives-plataforms | 5b43f52d6afde4ad2768ad5b85e376578e2c9b2f | [
"Apache-2.0"
] | 9 | 2019-02-04T22:08:08.000Z | 2021-07-17T12:12:12.000Z | import cv2
#captura imagem colorida
imagem = cv2.imread("datasets/fotos/reuniao-professores.jpeg")
print imagem.shape
# Imagem em BRG ( de 0 a 2 )
# Canal Vermelho 2 , Canal Verde 1 , Canal Azul 0
print imagem.item(0,0,2),imagem.item(0,0,1),imagem.item(0,0,0)
# Alterando 1 Pixel na posicão 0,0 para cor verm... | 25.444444 | 62 | 0.71179 |
0bb68e18c8fb7814cc70c3327c0e963a47e4f3d9 | 11,486 | py | Python | generate.py | remcohaszing/calendar-generator | 6229241ab47d6d961fab7db4eceaf38e8deb872e | [
"WTFPL"
] | null | null | null | generate.py | remcohaszing/calendar-generator | 6229241ab47d6d961fab7db4eceaf38e8deb872e | [
"WTFPL"
] | null | null | null | generate.py | remcohaszing/calendar-generator | 6229241ab47d6d961fab7db4eceaf38e8deb872e | [
"WTFPL"
] | 1 | 2016-03-26T23:26:53.000Z | 2016-03-26T23:26:53.000Z | #!/usr/bin/env python3
"""
Generate a Dutch week calendar for an entire year.
The generated calendar is in odt format.
This script accepts a YAML data file which must contain the fields
``special dates``, ``birthdays`` and ``weddings``.
Example data file
.. code-block:: yaml
year: 2016
special dates:
... | 31.468493 | 79 | 0.614835 |
5668835d23c61f8c8ae4ae66b5912cb0224a0677 | 24,921 | py | Python | gevent/_sslgte279.py | huskar-org/gevent | f2e15119575eb5d75e3bfee8871db9f058c7322b | [
"MIT"
] | 1 | 2019-11-06T17:36:16.000Z | 2019-11-06T17:36:16.000Z | gevent/_sslgte279.py | huskar-org/gevent | f2e15119575eb5d75e3bfee8871db9f058c7322b | [
"MIT"
] | null | null | null | gevent/_sslgte279.py | huskar-org/gevent | f2e15119575eb5d75e3bfee8871db9f058c7322b | [
"MIT"
] | 1 | 2019-10-03T06:12:11.000Z | 2019-10-03T06:12:11.000Z | # Wrapper module for _ssl. Written by Bill Janssen.
# Ported to gevent by Denis Bilenko.
"""SSL wrapper for socket objects.
For the documentation, refer to :mod:`ssl` module manual.
This module implements cooperative SSL socket wrappers.
"""
from __future__ import absolute_import
import ssl as __ssl__
_ssl = __ssl_... | 37.816388 | 116 | 0.592833 |
48a0d96f858f5db0a218ed456cf98bf540d31ad8 | 3,737 | py | Python | src/ansiblelint/rules/OctalPermissionsRule.py | ResilienceCare/ansible-lint | 90e7449ab16305813bc4ff892ecf8ae47d5a79f0 | [
"MIT"
] | 484 | 2020-12-12T06:34:22.000Z | 2022-03-21T15:30:35.000Z | src/ansiblelint/rules/OctalPermissionsRule.py | ResilienceCare/ansible-lint | 90e7449ab16305813bc4ff892ecf8ae47d5a79f0 | [
"MIT"
] | 488 | 2020-12-11T14:57:26.000Z | 2022-03-21T11:33:01.000Z | src/ansiblelint/rules/OctalPermissionsRule.py | ResilienceCare/ansible-lint | 90e7449ab16305813bc4ff892ecf8ae47d5a79f0 | [
"MIT"
] | 132 | 2020-12-13T16:58:47.000Z | 2022-03-20T15:52:24.000Z | # Copyright (c) 2013-2014 Will Thames <will@thames.id.au>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify... | 37.37 | 94 | 0.641424 |
43c2dbdaef584ebd2ff5caa5dce1bfdc2dd23de4 | 6,970 | py | Python | py/desitarget/test/make_testdata.py | jinyiY/desitarget | 546a85a3feb9754a2406ebfb2b9890514f47b3bf | [
"BSD-3-Clause"
] | null | null | null | py/desitarget/test/make_testdata.py | jinyiY/desitarget | 546a85a3feb9754a2406ebfb2b9890514f47b3bf | [
"BSD-3-Clause"
] | null | null | null | py/desitarget/test/make_testdata.py | jinyiY/desitarget | 546a85a3feb9754a2406ebfb2b9890514f47b3bf | [
"BSD-3-Clause"
] | null | null | null | # - For the record (and future updates):
# ADM This code generates tractor, sweep, targets, pixweight, mask
# ADM file subsets for testing.
# - The hardcoded paths are for NERSC, but you can swap out any
# - legacy survey data release path as needed.
# ADM Now (10/04/19) based off DR8 sweeps and Tractor files.
import ... | 49.084507 | 92 | 0.678479 |
651417713c5247fb342b5d877e2b1430a15cc08f | 1,315 | py | Python | downloader.py | ikaruswill/sg-bus-router | ec25d7d0f20fe622967b9ec53faab880511d7d46 | [
"MIT"
] | 2 | 2018-10-24T06:51:41.000Z | 2018-10-25T10:49:26.000Z | downloader.py | ikaruswill/sg-bus-router | ec25d7d0f20fe622967b9ec53faab880511d7d46 | [
"MIT"
] | null | null | null | downloader.py | ikaruswill/sg-bus-router | ec25d7d0f20fe622967b9ec53faab880511d7d46 | [
"MIT"
] | null | null | null | import requests
from time import sleep
import pandas as pd
from sqlalchemy import create_engine
from keys import api_key
# Variables
API_PATHS = ['BusStops', 'BusRoutes']
DB_TABLES = ['bus_stops', 'bus_routes']
# Options
DB_PATH = 'sqlite:///sg-bus-router.db'
LOG_INTERVAL = 1000
# Constants
API_URL_FORMAT = 'http:... | 24.811321 | 77 | 0.580989 |
a3eb9632a34e8e117070fc9cb24900c4aa64261a | 37,704 | py | Python | tests/requests/tests.py | andreip/django | c61d1361d027a729d07d277879950ff133c19f4c | [
"PSF-2.0",
"BSD-3-Clause"
] | 4 | 2020-04-08T17:57:46.000Z | 2021-11-08T08:56:16.000Z | tests/requests/tests.py | andreip/django | c61d1361d027a729d07d277879950ff133c19f4c | [
"PSF-2.0",
"BSD-3-Clause"
] | 7 | 2018-06-18T17:56:50.000Z | 2020-06-24T16:51:04.000Z | tests/requests/tests.py | andreip/django | c61d1361d027a729d07d277879950ff133c19f4c | [
"PSF-2.0",
"BSD-3-Clause"
] | 2 | 2019-08-19T20:41:48.000Z | 2019-10-10T17:29:52.000Z | import time
from datetime import datetime, timedelta
from http import cookies
from io import BytesIO
from itertools import chain
from urllib.parse import urlencode
from django.core.exceptions import DisallowedHost
from django.core.handlers.wsgi import LimitedStream, WSGIRequest
from django.http import (
HttpReques... | 40.805195 | 117 | 0.588107 |
44dc199f909488d0318fa47d24a511210b9266a5 | 603 | py | Python | tronapi/utils/crypto.py | sonicskye/tron-api-python | eba4d5d1eb27b95ea69e2f9e0fbf05c819012b7e | [
"MIT"
] | 1 | 2018-12-20T22:09:39.000Z | 2018-12-20T22:09:39.000Z | tronapi/utils/crypto.py | sonicskye/tron-api-python | eba4d5d1eb27b95ea69e2f9e0fbf05c819012b7e | [
"MIT"
] | null | null | null | tronapi/utils/crypto.py | sonicskye/tron-api-python | eba4d5d1eb27b95ea69e2f9e0fbf05c819012b7e | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) iEXBase. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ----------------------------------------------------------------------------------... | 37.6875 | 94 | 0.512438 |
dba4c1ec411c29f7d978e2358ca0393138738dab | 3,152 | py | Python | tools/network/resolve.py | wxyyxc1992/ChaosWarden | 831ab3eaa232af7c8e9803c496a9ed1af7494552 | [
"MIT"
] | 123 | 2019-03-28T04:36:08.000Z | 2019-11-02T12:30:43.000Z | tools/network/resolve.py | wxyyxc1992/ChaosWarden | 831ab3eaa232af7c8e9803c496a9ed1af7494552 | [
"MIT"
] | 1 | 2020-10-12T07:37:12.000Z | 2020-10-12T07:37:45.000Z | tools/network/resolve.py | wxyyxc1992/ChaosWarden | 831ab3eaa232af7c8e9803c496a9ed1af7494552 | [
"MIT"
] | 15 | 2020-11-11T18:47:58.000Z | 2022-03-11T14:59:53.000Z | #!/usr/bin/python3.5
# I don't believe in license.
# You can do whatever you want with this program.
import os
import sys
import socket
import argparse
from colored import fg, bg, attr
from threading import Thread
from queue import Queue
from multiprocessing.dummy import Pool
def banner():
print("""
... | 22.35461 | 110 | 0.538388 |
56fabac8f04a875b3de43d10b742e56d8d928e55 | 339 | py | Python | scrapy_statsd/tests/test_project/test_project/spiders/test.py | vinayan3/scrapy-statsd | 12d90c6ac8c20f3c26e24b603e8b3c732ee6d4fc | [
"MIT"
] | 8 | 2016-08-14T22:17:37.000Z | 2019-01-03T08:45:17.000Z | scrapy_statsd/tests/test_project/test_project/spiders/test.py | TeamHG-Memex/scrapy-statsd | 7bbf8c6aca71ee8a8481a560c63bead880d7843d | [
"MIT"
] | 2 | 2016-09-10T19:46:01.000Z | 2018-04-12T22:53:24.000Z | scrapy_statsd/tests/test_project/test_project/spiders/test.py | TeamHG-Memex/scrapy-statsd | 7bbf8c6aca71ee8a8481a560c63bead880d7843d | [
"MIT"
] | 6 | 2016-08-22T10:21:06.000Z | 2022-03-16T00:51:53.000Z | # -*- coding: utf-8 -*-
import scrapy
from scrapy_statsd.tests.test_project.test_project.items import TestProjectItem
class TestSpider(scrapy.Spider):
name = "test"
allowed_domains = ["github.com"]
start_urls = (
'https://github.com/scrapy/scrapy',
)
def parse(self, response):
yiel... | 26.076923 | 79 | 0.675516 |
bef5cd36989bc522d176248bbd3d6395eeafe6d4 | 361 | py | Python | community/migrations/0002_rename_business_name_business_name.py | kasparov-creat/Neighborhood-Watch | 9d1ee930adaf640155fea27f686c0b231989ff1a | [
"MIT"
] | null | null | null | community/migrations/0002_rename_business_name_business_name.py | kasparov-creat/Neighborhood-Watch | 9d1ee930adaf640155fea27f686c0b231989ff1a | [
"MIT"
] | null | null | null | community/migrations/0002_rename_business_name_business_name.py | kasparov-creat/Neighborhood-Watch | 9d1ee930adaf640155fea27f686c0b231989ff1a | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-06-05 11:15
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('community', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='business',
old_name='business_name',
... | 19 | 47 | 0.581717 |
b2afa5f13770df11ffa9e11eb45019226e18f84f | 8,139 | py | Python | pymatgen/analysis/nmr.py | oxana-a/pymatgen | 69393c5fbf88c3e9f148a91c090b4e2f02ac664d | [
"MIT"
] | 2 | 2019-03-14T17:58:33.000Z | 2021-01-26T13:17:59.000Z | pymatgen/analysis/nmr.py | darnoceloc/pymatgen | 5cc42912a12a265a603df7e34c856561f76edc1f | [
"MIT"
] | null | null | null | pymatgen/analysis/nmr.py | darnoceloc/pymatgen | 5cc42912a12a265a603df7e34c856561f76edc1f | [
"MIT"
] | 1 | 2015-10-12T20:03:27.000Z | 2015-10-12T20:03:27.000Z | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from pymatgen.core.tensors import SquareTensor
from collections import namedtuple
from pymatgen.core.units import FloatWithUnit
from pymatgen.core.periodic_table import Specie
from pymatgen.core.structure imp... | 36.334821 | 136 | 0.640128 |
b624b88f0a445fd19b5c2b241266cb863e45d590 | 2,927 | py | Python | concordia/management/commands/print_frontend_test_urls.py | ptrourke/concordia | 56ff364dbf38cb8a763df489479821fe43b76d69 | [
"CC0-1.0"
] | 1 | 2020-07-17T14:41:41.000Z | 2020-07-17T14:41:41.000Z | concordia/management/commands/print_frontend_test_urls.py | ptrourke/concordia | 56ff364dbf38cb8a763df489479821fe43b76d69 | [
"CC0-1.0"
] | null | null | null | concordia/management/commands/print_frontend_test_urls.py | ptrourke/concordia | 56ff364dbf38cb8a763df489479821fe43b76d69 | [
"CC0-1.0"
] | null | null | null | """
Print a list of URLs using the local database suitable for front-end testing
"""
from urllib.parse import urljoin
from django.core.management.base import BaseCommand
from django.urls import reverse
from concordia.models import Asset
class Command(BaseCommand):
help = "Print URLs for front-end testing"
... | 33.261364 | 88 | 0.476256 |
ca775201be75e978a96e3c53e4b593751f70f062 | 4,621 | py | Python | alf/torchattacks/attacks/multiattack.py | Aminullah6264/gpvi_plus_updated_adv | 449cb2594a1a9ee158af19984c4caaf7d86f1e7f | [
"Apache-2.0"
] | 1 | 2022-02-15T07:18:32.000Z | 2022-02-15T07:18:32.000Z | alf/torchattacks/attacks/multiattack.py | Aminullah6264/gpvi_plus_updated_adv | 449cb2594a1a9ee158af19984c4caaf7d86f1e7f | [
"Apache-2.0"
] | null | null | null | alf/torchattacks/attacks/multiattack.py | Aminullah6264/gpvi_plus_updated_adv | 449cb2594a1a9ee158af19984c4caaf7d86f1e7f | [
"Apache-2.0"
] | null | null | null | import copy
import torch
from ..attack import Attack
class MultiAttack(Attack):
r"""
MultiAttack is a class to attack a model with various attacks agains same images and labels.
Arguments:
model (nn.Module): model to attack.
attacks (list): list of attacks.
Examples::
>>> at... | 35.274809 | 108 | 0.608093 |
34f7706cd23cc181bdb5708b2f9cdaa817556e5e | 3,248 | py | Python | pychemia/runner/pbs.py | quanshengwu/PyChemia | 98e9f7a1118b694dbda3ee75411ff8f8d7b9688b | [
"MIT"
] | 1 | 2021-03-26T12:34:45.000Z | 2021-03-26T12:34:45.000Z | pychemia/runner/pbs.py | quanshengwu/PyChemia | 98e9f7a1118b694dbda3ee75411ff8f8d7b9688b | [
"MIT"
] | null | null | null | pychemia/runner/pbs.py | quanshengwu/PyChemia | 98e9f7a1118b694dbda3ee75411ff8f8d7b9688b | [
"MIT"
] | null | null | null | import datetime
import os
import socket
import subprocess
import xml.etree.ElementTree as ElementTree
class PBSRunner:
def __init__(self, workdir, filename='batch.pbs'):
self.template = None
self.walltime = None
self.template = None
self.queue = None
self.mail = None
... | 29.261261 | 107 | 0.547414 |
d8bfb149911a94b3cb766951b8aa6b639adc36ae | 2,380 | py | Python | samples/cli/accelbyte_py_sdk_cli/dsmc/_get_all_pod_config.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | samples/cli/accelbyte_py_sdk_cli/dsmc/_get_all_pod_config.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | samples/cli/accelbyte_py_sdk_cli/dsmc/_get_all_pod_config.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template_file: python-cli-command.j2
# justice-dsm-controller-service (3.2.1)
# pylint: disable=duplica... | 31.315789 | 88 | 0.735294 |
f593bb68ee913653a1cd7e2f1613da7e930dafb3 | 5,600 | py | Python | ultracart/models/webhook_log_summaries_response.py | gstingy/uc_python_api | 9a0bd3f6e63f616586681518e44fe37c6bae2bba | [
"Apache-2.0"
] | null | null | null | ultracart/models/webhook_log_summaries_response.py | gstingy/uc_python_api | 9a0bd3f6e63f616586681518e44fe37c6bae2bba | [
"Apache-2.0"
] | null | null | null | ultracart/models/webhook_log_summaries_response.py | gstingy/uc_python_api | 9a0bd3f6e63f616586681518e44fe37c6bae2bba | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
UltraCart Rest API V2
UltraCart REST API Version 2
OpenAPI spec version: 2.0.0
Contact: support@ultracart.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class WebhookLogSummariesRespon... | 27.05314 | 100 | 0.593036 |
5f615ceb91178f50bd6476afe9e24dfaf6e0f26f | 14,848 | py | Python | tests/test_transforms.py | ssoheily/pytorchvideo | 25dac74dbcf90f9918a1bd5da5299fd251fdfd89 | [
"Apache-2.0"
] | 3 | 2021-05-27T16:01:23.000Z | 2021-12-08T14:54:58.000Z | tests/test_transforms.py | ssoheily/pytorchvideo | 25dac74dbcf90f9918a1bd5da5299fd251fdfd89 | [
"Apache-2.0"
] | null | null | null | tests/test_transforms.py | ssoheily/pytorchvideo | 25dac74dbcf90f9918a1bd5da5299fd251fdfd89 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import unittest
from collections import Counter
import numpy as np
import torch
from pytorchvideo.data.utils import thwc_to_cthw
from pytorchvideo.transforms import (
ApplyTransformToKey,
MixUp,
Normalize,
OpSampler,
RandomSho... | 38.268041 | 88 | 0.622575 |
c76aa4728141d63366524935fc149d6ea0442358 | 28,168 | py | Python | app/services/dialog/node_op_menu.py | tirinox/thorchainmonitorbot | 9f4604ea3c4ce91239e570b51381209096fc769f | [
"MIT"
] | 3 | 2020-10-13T16:48:35.000Z | 2021-06-02T19:11:51.000Z | app/services/dialog/node_op_menu.py | tirinox/thorchainmonitorbot | 9f4604ea3c4ce91239e570b51381209096fc769f | [
"MIT"
] | null | null | null | app/services/dialog/node_op_menu.py | tirinox/thorchainmonitorbot | 9f4604ea3c4ce91239e570b51381209096fc769f | [
"MIT"
] | 1 | 2021-02-28T19:22:18.000Z | 2021-02-28T19:22:18.000Z | from typing import List
from aiogram.dispatcher.filters.state import StatesGroup, State
from aiogram.types import Message, CallbackQuery, InlineKeyboardButton, InlineKeyboardMarkup, ReplyKeyboardRemove
from aiogram.utils.exceptions import MessageNotModified
from aiogram.utils.helper import HelperMode
from services.di... | 46.481848 | 120 | 0.630219 |
8107f8447d4614c78105d164706b3f467c519a35 | 1,000 | py | Python | setup.py | DalavanCloud/SyntaViz | e1d09da1df058c4757d39cade4a5cc9e750eb8b8 | [
"Apache-2.0"
] | 1 | 2019-02-02T05:20:38.000Z | 2019-02-02T05:20:38.000Z | setup.py | DalavanCloud/SyntaViz | e1d09da1df058c4757d39cade4a5cc9e750eb8b8 | [
"Apache-2.0"
] | null | null | null | setup.py | DalavanCloud/SyntaViz | e1d09da1df058c4757d39cade4a5cc9e750eb8b8 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
import re
def get_version():
"""
Extract the version from the module's root __init__.py file
"""
root_init_file = open("syntaviz/__init__.py").read()
match = re.search("__version__[ ]+=[ ]+[\"'](.+)[\"']", root_init_file)
return match.group(1) if mat... | 26.315789 | 75 | 0.501 |
e67d94e9717aff8d4f50d2ed56eefc6f994ec359 | 4,163 | py | Python | benchmark/startQiskit3384.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit3384.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit3384.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=37
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2
import numpy as np
import networkx as nx
def bitwise_... | 34.691667 | 140 | 0.650973 |
17c776c3cb093dbe49a207771dfe21b6c851222e | 1,325 | py | Python | src/get_data/run.py | iDataist/Building-a-Reproducible-Model-Workflow | c338443d508b6310e1e8ef03346b25d8bf292a5a | [
"MIT"
] | 1 | 2021-07-23T14:10:19.000Z | 2021-07-23T14:10:19.000Z | src/get_data/run.py | iDataist/Building-a-Reproducible-Model-Workflow | c338443d508b6310e1e8ef03346b25d8bf292a5a | [
"MIT"
] | null | null | null | src/get_data/run.py | iDataist/Building-a-Reproducible-Model-Workflow | c338443d508b6310e1e8ef03346b25d8bf292a5a | [
"MIT"
] | null | null | null | import argparse
import logging
import wandb
import sys
import os
sys.path.insert(
1,
"/Users/huiren/Downloads/Building a Reproducible Model"
" Workflow/src/wandb_utils",
)
from log_artifact import log_artifact
logging.basicConfig(level=logging.INFO, format="%(asctime)-15s %(message)s")
logger = logging.ge... | 22.083333 | 76 | 0.661132 |
bea90e2fd45f189132587856075fe1c026047e53 | 4,061 | py | Python | modules/remind_me_bot.py | ju135/HeinzBot | 17d4f46034176c9d8917fe8d8c750f9897526018 | [
"Apache-2.0"
] | 6 | 2019-05-12T13:30:48.000Z | 2020-07-30T08:58:10.000Z | modules/remind_me_bot.py | ju135/HeinzBot | 17d4f46034176c9d8917fe8d8c750f9897526018 | [
"Apache-2.0"
] | 16 | 2019-05-11T14:07:06.000Z | 2021-11-29T22:13:35.000Z | modules/remind_me_bot.py | ju135/HeinzBot | 17d4f46034176c9d8917fe8d8c750f9897526018 | [
"Apache-2.0"
] | 5 | 2019-05-11T13:29:47.000Z | 2020-01-15T12:18:40.000Z | import datetime
import dateparser
import pytz
import telegram
from telegram import Update, Message, User
from telegram.ext import CallbackContext
from modules.abstract_module import AbstractModule
from utils.decorators import register_module, register_command, log_errors
from utils.random_text import get_random_string... | 46.147727 | 116 | 0.625462 |
69ffa9cab799505462f33d39e69764267bbfcb88 | 7,127 | py | Python | lib/galaxy/auth/providers/ldap_ad.py | tsungjui/fusionline | 26d5d41e82ac83822ba41df1cd14c54afa112655 | [
"CC-BY-3.0"
] | 1 | 2019-11-03T11:45:43.000Z | 2019-11-03T11:45:43.000Z | lib/galaxy/auth/providers/ldap_ad.py | tsungjui/fusionline | 26d5d41e82ac83822ba41df1cd14c54afa112655 | [
"CC-BY-3.0"
] | 4 | 2017-05-24T19:36:34.000Z | 2019-08-23T02:49:18.000Z | lib/galaxy/auth/providers/ldap_ad.py | abretaud/galaxy | 1ad89511540e6800cd2d0da5d878c1c77d8ccfe9 | [
"CC-BY-3.0"
] | null | null | null | """
Created on 15/07/2014
@author: Andrew Robinson
"""
import logging
from galaxy.auth import _get_bool
from galaxy.exceptions import ConfigurationError
from ..providers import AuthProvider
log = logging.getLogger(__name__)
def _get_subs(d, k, params):
if k not in d:
raise ConfigurationError("Missing... | 35.108374 | 132 | 0.56293 |
52ddee63b09c33c464158e019e4455e68d436e9c | 151 | py | Python | mybuiltinfunctions/my-divmod.py | d-mwenda/my-python-notebook | 13dcb30d808a3ed88741f7ea904d387e3c0a8baa | [
"MIT"
] | null | null | null | mybuiltinfunctions/my-divmod.py | d-mwenda/my-python-notebook | 13dcb30d808a3ed88741f7ea904d387e3c0a8baa | [
"MIT"
] | null | null | null | mybuiltinfunctions/my-divmod.py | d-mwenda/my-python-notebook | 13dcb30d808a3ed88741f7ea904d387e3c0a8baa | [
"MIT"
] | null | null | null | """
Takes 2 non complex numbers as arguments and returns a pair of numbers consisting
of their quotient and remainder when using integer division.
"""
| 30.2 | 81 | 0.788079 |
cc416396ced5c45e9492b71fe010551962a29b49 | 2,459 | py | Python | tools/kernel_names.py | datalayer-contrib/jupyterwidgets-tutorial | 81a4d143e456e988302c40ff4405dd5c33ce8313 | [
"BSD-3-Clause"
] | 342 | 2017-08-23T18:36:58.000Z | 2022-03-11T18:47:31.000Z | tools/kernel_names.py | maartenbreddels/tutorial | 4f576647fc5e9e1697e241f5207d25514d50255c | [
"BSD-3-Clause"
] | 118 | 2017-08-23T01:42:45.000Z | 2022-02-14T18:11:47.000Z | 01-pandas-ipywidgets/jupyter-widget-ecosystem/tools/kernel_names.py | dushyantkhosla/viz4ds | 05a004a390d180d87be2d09873c3f7283c2a2e27 | [
"MIT"
] | 152 | 2017-08-22T22:24:28.000Z | 2022-03-31T12:45:37.000Z | from argparse import ArgumentParser
from pathlib import Path
import nbformat
NB_VERSION = 4
def change_kernel_name(notebook_name, kernel_name, display_name=None):
"""
Change the name of the notebook kernel.
"""
dname = display_name if display_name else kernel_name
notebook = nbformat.read(notebo... | 36.701493 | 92 | 0.622204 |
f467eeeb0c3f17e10601af47a893e87c654241c4 | 332 | py | Python | logic/not_gate.py | FPGA-4-all/FPGA4all_MyHDL | 20ab2b1ff86d7b13cfca947967a9b4618325fbb1 | [
"MIT"
] | null | null | null | logic/not_gate.py | FPGA-4-all/FPGA4all_MyHDL | 20ab2b1ff86d7b13cfca947967a9b4618325fbb1 | [
"MIT"
] | null | null | null | logic/not_gate.py | FPGA-4-all/FPGA4all_MyHDL | 20ab2b1ff86d7b13cfca947967a9b4618325fbb1 | [
"MIT"
] | null | null | null | #not gate class
from myhdl import *
class not_gate:
def __init__(self):
self.inputs = 1
def one_input_not(self, a, b):
"""one input not gate
a -> input
b -. output
"""
@always_comb
def not_logic():
b.next = intbv(not(a))
return not_logi... | 19.529412 | 34 | 0.506024 |
491a568ab82004596d406ef46047eed9a3affbdc | 5,470 | py | Python | stcSeg/data/builtin.py | ylqi/STC-Seg | 4c881fa285051b4e2879afb7907f7562973d0669 | [
"MIT"
] | null | null | null | stcSeg/data/builtin.py | ylqi/STC-Seg | 4c881fa285051b4e2879afb7907f7562973d0669 | [
"MIT"
] | null | null | null | stcSeg/data/builtin.py | ylqi/STC-Seg | 4c881fa285051b4e2879afb7907f7562973d0669 | [
"MIT"
] | null | null | null | import os
from detectron2.data.datasets.register_coco import register_coco_instances
from detectron2.data.datasets.builtin_meta import _get_builtin_metadata
from .datasets.text import register_text_instances
from .datasets.kitti import get_kitti_instances_meta, register_kitti_instances
from .datasets.kitti_mots impo... | 37.465753 | 113 | 0.659963 |
965e836ee8ba7ce69c5319c282699df9a4b58897 | 39,202 | py | Python | packstack/installer/run_setup.py | xbezdick/packstack | 6f7673436f24cb16d0dad46a1bf8a3dc0a21e18a | [
"Apache-2.0"
] | null | null | null | packstack/installer/run_setup.py | xbezdick/packstack | 6f7673436f24cb16d0dad46a1bf8a3dc0a21e18a | [
"Apache-2.0"
] | null | null | null | packstack/installer/run_setup.py | xbezdick/packstack | 6f7673436f24cb16d0dad46a1bf8a3dc0a21e18a | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 37.912959 | 152 | 0.609306 |
a95ffe8d3d402851d617b81912e5709b044d68c4 | 82,848 | py | Python | sdk/tables/azure-data-tables/tests/test_table_entity_async.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 1 | 2021-04-30T04:44:41.000Z | 2021-04-30T04:44:41.000Z | sdk/tables/azure-data-tables/tests/test_table_entity_async.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | null | null | null | sdk/tables/azure-data-tables/tests/test_table_entity_async.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | null | null | null | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | 40.472887 | 150 | 0.604903 |
94ddf52ddc6d4d7b5522fb33c5cdc69e1c8aaec3 | 297 | py | Python | examples/spot/sub_account/sub_account_enable_futures.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 512 | 2021-06-15T08:52:44.000Z | 2022-03-31T09:49:53.000Z | examples/spot/sub_account/sub_account_enable_futures.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 75 | 2021-06-20T13:49:50.000Z | 2022-03-30T02:45:31.000Z | examples/spot/sub_account/sub_account_enable_futures.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 156 | 2021-06-18T11:56:36.000Z | 2022-03-29T16:34:22.000Z | #!/usr/bin/env python
import logging
from binance.spot import Spot as Client
from binance.lib.utils import config_logging
config_logging(logging, logging.DEBUG)
key = ""
secret = ""
spot_client = Client(key, secret)
logging.info(spot_client.sub_account_enable_futures(email="alice@test.com"))
| 21.214286 | 76 | 0.784512 |
201e2be568312d2137397e2a9f5683364a8cd3e6 | 16,905 | py | Python | recipes/CommonVoice/ASR/transformer/train.py | fadelmuli/asr-speechbrain | d4d66d1be373cb10645e474a17dcf0e2d2243e24 | [
"Apache-2.0"
] | null | null | null | recipes/CommonVoice/ASR/transformer/train.py | fadelmuli/asr-speechbrain | d4d66d1be373cb10645e474a17dcf0e2d2243e24 | [
"Apache-2.0"
] | null | null | null | recipes/CommonVoice/ASR/transformer/train.py | fadelmuli/asr-speechbrain | d4d66d1be373cb10645e474a17dcf0e2d2243e24 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""Recipe for training a Transformer ASR system with CommonVoice
The system employs an encoder, a decoder, and an attention mechanism
between them. Decoding is performed with (CTC/Att joint) beamsearch.
To run this recipe, do the following:
> python train.py hparams/transformer.yaml
With the de... | 36.830065 | 109 | 0.644957 |
0fd8874255c3344edf60e0ef705f553ebc824dc2 | 364 | py | Python | one_fm/tasks/execute.py | ks093/One-FM | d89b6739f12a8ad527355f7ba31184bb635e1dad | [
"MIT"
] | null | null | null | one_fm/tasks/execute.py | ks093/One-FM | d89b6739f12a8ad527355f7ba31184bb635e1dad | [
"MIT"
] | null | null | null | one_fm/tasks/execute.py | ks093/One-FM | d89b6739f12a8ad527355f7ba31184bb635e1dad | [
"MIT"
] | null | null | null | import frappe
from frappe import _
from frappe import enqueue
def daily():
"""
List of all tasks to be executed daily
"""
enqueue("one_fm.tasks.erpnext.purchase_order.due_purchase_order_payment_terms")
enqueue("one_fm.tasks.erpnext.issue.daily_open")
enqueue("one_fm.tasks.erpnext.job_opening.... | 26 | 89 | 0.766484 |
0fbf536b58c577e69518a047bc459cbce79b89b0 | 5,676 | py | Python | airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/conftest.py | curanaj/airbyte-dbt-demo | f6b8ccd8f8e57b7ea84caf814b14d836338e8007 | [
"MIT"
] | null | null | null | airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/conftest.py | curanaj/airbyte-dbt-demo | f6b8ccd8f8e57b7ea84caf814b14d836338e8007 | [
"MIT"
] | null | null | null | airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/conftest.py | curanaj/airbyte-dbt-demo | f6b8ccd8f8e57b7ea84caf814b14d836338e8007 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2020 Airbyte
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | 39.971831 | 117 | 0.778894 |
ddc5c2f61fc7c4430c7f763b63db2479a0cfb4a2 | 19,856 | py | Python | tests/test_conferences.py | bdyetton/prettychart | e8b33a7dfdc8c33d15969586be7f68172795f76d | [
"Apache-2.0"
] | null | null | null | tests/test_conferences.py | bdyetton/prettychart | e8b33a7dfdc8c33d15969586be7f68172795f76d | [
"Apache-2.0"
] | null | null | null | tests/test_conferences.py | bdyetton/prettychart | e8b33a7dfdc8c33d15969586be7f68172795f76d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import mock
from nose.tools import * # noqa (PEP8 asserts)
import hmac
import hashlib
from StringIO import StringIO
import furl
from modularodm import Q
from modularodm.exceptions import ValidationError
from framework.auth.core import Auth
from website import settings
from website.models i... | 35.081272 | 102 | 0.613719 |
e9ff84d3e4c98752452231e7dcc6ae3c0580d38a | 393 | py | Python | Sources/Codable/Protocol/CodableTypes.py | Z-JaDe/AppExtension | 9a05c0dcbfe8e43aadc8d186a4d2a9d59d153447 | [
"MIT"
] | 9 | 2019-05-09T09:40:55.000Z | 2021-11-29T02:12:17.000Z | Sources/Codable/Protocol/CodableTypes.py | Z-JaDe/AppExtension | 9a05c0dcbfe8e43aadc8d186a4d2a9d59d153447 | [
"MIT"
] | null | null | null | Sources/Codable/Protocol/CodableTypes.py | Z-JaDe/AppExtension | 9a05c0dcbfe8e43aadc8d186a4d2a9d59d153447 | [
"MIT"
] | 1 | 2020-03-07T06:55:40.000Z | 2020-03-07T06:55:40.000Z |
transform_types = [
'Bool','String',
'Double', 'Float', 'CGFloat',
'Int', 'Int8', 'Int16', 'Int32', 'Int64',
'UInt', 'UInt8', 'UInt16', 'UInt32', 'UInt64'
]
literal_type = [
'Integer',
'Float... | 26.2 | 64 | 0.328244 |
588f0890d19f43ed8568be4752a6b7c78c7db786 | 16,438 | py | Python | Bio/motifs/pfm.py | uci-ics-32/biopython | ff7d3703d442192a1f6d84c52e028d566d44ff1c | [
"BSD-3-Clause"
] | 1 | 2022-01-04T21:38:03.000Z | 2022-01-04T21:38:03.000Z | Bio/motifs/pfm.py | uci-ics-32/biopython | ff7d3703d442192a1f6d84c52e028d566d44ff1c | [
"BSD-3-Clause"
] | null | null | null | Bio/motifs/pfm.py | uci-ics-32/biopython | ff7d3703d442192a1f6d84c52e028d566d44ff1c | [
"BSD-3-Clause"
] | 1 | 2021-07-06T08:02:11.000Z | 2021-07-06T08:02:11.000Z | # Copyright 2015 by Gert Hulselmans. All rights reserved.
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-Clause License".
# Please see the LICENSE file that should have been included as part of this
# package.
"""Parse various positio... | 39.705314 | 152 | 0.5685 |
fbe446e527025a589590a56276564868c5639218 | 4,458 | py | Python | options.py | Junlin-Yin/audio2video-v1 | 43a6a0ace3c27ed51e73e64c796ed38fa05e9f61 | [
"MIT"
] | 2 | 2020-05-24T21:16:19.000Z | 2020-05-24T21:16:21.000Z | options.py | Junlin-Yin/audio2video-v1 | 43a6a0ace3c27ed51e73e64c796ed38fa05e9f61 | [
"MIT"
] | null | null | null | options.py | Junlin-Yin/audio2video-v1 | 43a6a0ace3c27ed51e73e64c796ed38fa05e9f61 | [
"MIT"
] | null | null | null | from audio2video.__init__ import inp_dir, tar_dir
import argparse
import glob
import os
def init_parser():
parser = argparse.ArgumentParser()
parser.add_argument('--steps', type=int, nargs='+', help='what steps you want to run (0-4)')
parser.add_argument('--inp_id', type=str, ... | 50.089888 | 147 | 0.637506 |
02e4d33565a7c9c14f326b4d50d44ba6fabf6462 | 9,430 | py | Python | BWSI_Sensor.py | armedturret/print-oops-AUV | 6810ea0a3eb48ce437026851560b932006e1670e | [
"MIT"
] | 1 | 2021-10-02T20:15:31.000Z | 2021-10-02T20:15:31.000Z | BWSI_Sensor.py | eshikohli/Autnomous-Underwater-Vehicles | 8ddc18b5705a391173f97ba11f8a70de683564d4 | [
"MIT"
] | null | null | null | BWSI_Sensor.py | eshikohli/Autnomous-Underwater-Vehicles | 8ddc18b5705a391173f97ba11f8a70de683564d4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 3 19:49:45 2021
@author: BWSI AUV Challenge Instructional Staff
"""
import sys
import numpy as np
import cv2
import BWSI_BuoyField
import matplotlib.pyplot as plt
class BWSI_Camera(object):
def __init__(self, max_angle=90, visibility=100):
self.__MAX_RANGE... | 40.472103 | 125 | 0.53404 |
70e9c4065b3099a6acf8d68120e4330ca33e908e | 2,125 | py | Python | mstools/builder/utils.py | Xiangyan93/mstools | 7143dbfc2eb4e82e6631652a0c1b38a793dcc678 | [
"MIT"
] | null | null | null | mstools/builder/utils.py | Xiangyan93/mstools | 7143dbfc2eb4e82e6631652a0c1b38a793dcc678 | [
"MIT"
] | null | null | null | mstools/builder/utils.py | Xiangyan93/mstools | 7143dbfc2eb4e82e6631652a0c1b38a793dcc678 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import Dict, Iterator, List, Optional, Union, Literal, Tuple
import os
import shutil
from .packmol import Packmol
from ..molecule import Molecule
def build_cubic_box(packmol_exe: str, work_dir: str, file_type: Literal['pdb', 'xyz'],
smiles_... | 32.19697 | 86 | 0.628235 |
5e235040f470362ee5cc238932ab4738a6e1f7c6 | 392 | py | Python | api/views.py | miladgharibi/pollarita | b5d8154652d2b26a28f05b1745cd13e383cec40e | [
"MIT"
] | 5 | 2022-02-04T19:23:26.000Z | 2022-02-26T10:15:25.000Z | api/views.py | miladgharibi/pollarita | b5d8154652d2b26a28f05b1745cd13e383cec40e | [
"MIT"
] | null | null | null | api/views.py | miladgharibi/pollarita | b5d8154652d2b26a28f05b1745cd13e383cec40e | [
"MIT"
] | null | null | null | from polls.models import Poll
from rest_framework import viewsets
from django.contrib.auth.models import User
from api import serializers
class UserViewset(viewsets.ModelViewSet):
queryset = User.objects.all()
serializer_class = serializers.UserSerializer
class PollViewset(viewsets.ModelViewSet):
queryse... | 30.153846 | 49 | 0.806122 |
b44967c682fe3a87a7a7423096bb421a9279c1ec | 6,156 | py | Python | src/DRSlib/debug.py | DavidRodriguezSoaresCUI/DRSlib | 34058b907df2eeea2c8b0fa0a746389930d22fe6 | [
"CC0-1.0"
] | null | null | null | src/DRSlib/debug.py | DavidRodriguezSoaresCUI/DRSlib | 34058b907df2eeea2c8b0fa0a746389930d22fe6 | [
"CC0-1.0"
] | null | null | null | src/DRSlib/debug.py | DavidRodriguezSoaresCUI/DRSlib | 34058b907df2eeea2c8b0fa0a746389930d22fe6 | [
"CC0-1.0"
] | null | null | null | # module-level docstring
__doc__='''
Debugging utils
===============
Deubgging is made easier with these convenience functions.
'''
from typing import Callable, Any, Union
import functools
import re
import shutil
import traceback
FUNC_RELEVANT_ATTR={
'__annotations__',
'__class__',
'__de... | 36.426036 | 126 | 0.632716 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.