hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5ddcfb28fac7d3ac57a40dcf78450296b4aac5e8 | 13,643 | py | Python | evolveface/head/metrics.py | BillKerman/FaceNetCustomized | 30bb99b62f960034c4aa4206d7dc22de672a997f | [
"MIT"
] | 4 | 2020-08-30T13:31:34.000Z | 2020-12-31T08:18:27.000Z | evolveface/head/metrics.py | BillKerman/FaceNetCustomized | 30bb99b62f960034c4aa4206d7dc22de672a997f | [
"MIT"
] | null | null | null | evolveface/head/metrics.py | BillKerman/FaceNetCustomized | 30bb99b62f960034c4aa4206d7dc22de672a997f | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import division
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Parameter
import math
# Support: ['Softmax', 'ArcFace', 'CosFace', 'SphereFace', 'Am_softmax']
class Softmax(nn.Module):
r"""Implement of Softmax (normal c... | 42.768025 | 120 | 0.563659 |
cfd3e2f5c997f180306859e28c45f385b4f972cb | 42 | py | Python | tests/test_croncierge/debug_cmd.py | mburdeev/croncierge | b9eb086bdf4f286640e0bdc263f03851f43a13fc | [
"Apache-2.0"
] | null | null | null | tests/test_croncierge/debug_cmd.py | mburdeev/croncierge | b9eb086bdf4f286640e0bdc263f03851f43a13fc | [
"Apache-2.0"
] | null | null | null | tests/test_croncierge/debug_cmd.py | mburdeev/croncierge | b9eb086bdf4f286640e0bdc263f03851f43a13fc | [
"Apache-2.0"
] | null | null | null | for i in range(10):
print(f"Line {i}") | 21 | 22 | 0.571429 |
2738c19c616e3418dddee186646195cffab4bcbe | 5,515 | py | Python | backend/tracker/api/types/project.py | dmitriyvek/Tracker | b2903d0e980c8480e9c9cbecbfa3987997c7f04e | [
"MIT"
] | null | null | null | backend/tracker/api/types/project.py | dmitriyvek/Tracker | b2903d0e980c8480e9c9cbecbfa3987997c7f04e | [
"MIT"
] | null | null | null | backend/tracker/api/types/project.py | dmitriyvek/Tracker | b2903d0e980c8480e9c9cbecbfa3987997c7f04e | [
"MIT"
] | null | null | null | import graphene
from graphene.types import ResolveInfo
from tracker.api.connections import (
CustomPageInfo, create_connection_from_record_list,
validate_connection_params
)
from tracker.api.dataloaders import get_generic_loader
from tracker.api.scalars.projects import Description, Title
from tracker.api.sche... | 31.514286 | 76 | 0.642792 |
4482dcf0e29821d0a0138aef4bd0667f0d4a35d7 | 4,691 | py | Python | ros/src/twist_controller/dbw_node.py | MasanaoMatsuda/CarND-CapstoneProject | d6e578514ecdd4c8a64b44ce012dc7674594a9ed | [
"MIT"
] | null | null | null | ros/src/twist_controller/dbw_node.py | MasanaoMatsuda/CarND-CapstoneProject | d6e578514ecdd4c8a64b44ce012dc7674594a9ed | [
"MIT"
] | 10 | 2019-12-16T22:21:41.000Z | 2022-03-12T00:07:35.000Z | ros/src/twist_controller/dbw_node.py | MasanaoMatsuda/CarND-Capstone | d6e578514ecdd4c8a64b44ce012dc7674594a9ed | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from std_msgs.msg import Bool
from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport
from geometry_msgs.msg import TwistStamped
import math
from twist_controller import Controller
'''
You can build this node only after you have built (or partially built) th... | 39.420168 | 153 | 0.679386 |
03b7b0b7f146715aa2917f8e3606fb5884c72da0 | 3,415 | py | Python | evalai/utils/requests.py | cryptobali/evalai-cli | a658e23a6c4c65ec10b017087de93d09bab08ab4 | [
"BSD-3-Clause"
] | 1 | 2021-06-14T12:07:20.000Z | 2021-06-14T12:07:20.000Z | evalai/utils/requests.py | cryptobali/evalai-cli | a658e23a6c4c65ec10b017087de93d09bab08ab4 | [
"BSD-3-Clause"
] | 729 | 2020-01-21T20:33:00.000Z | 2021-08-02T23:22:14.000Z | evalai/utils/requests.py | cryptobali/evalai-cli | a658e23a6c4c65ec10b017087de93d09bab08ab4 | [
"BSD-3-Clause"
] | null | null | null | import json
import requests
import sys
from click import echo, style
from evalai.utils.config import EVALAI_ERROR_CODES
from evalai.utils.common import validate_token
from .auth import get_request_header, get_host_url
def make_request(path, method, files=None, data=None):
url = "{}{}".format(get_host_url(), pa... | 31.62037 | 96 | 0.464714 |
b1f66448d6648c974b8b65ea4de92298db9baf20 | 444 | py | Python | examples/load_from_files_2.py | ikonst/jschon | 4aa5c2ffce1dca831342aab232bceff9c542c137 | [
"MIT"
] | 53 | 2021-03-31T15:32:14.000Z | 2022-03-19T03:32:00.000Z | examples/load_from_files_2.py | ikonst/jschon | 4aa5c2ffce1dca831342aab232bceff9c542c137 | [
"MIT"
] | 27 | 2021-03-31T15:43:38.000Z | 2022-03-25T08:24:49.000Z | examples/load_from_files_2.py | ikonst/jschon | 4aa5c2ffce1dca831342aab232bceff9c542c137 | [
"MIT"
] | 5 | 2021-03-31T18:42:10.000Z | 2022-02-02T13:52:11.000Z | import pathlib
from jschon import create_catalog, JSON, JSONSchema, URI, LocalSource
data_dir = pathlib.Path(__file__).parent / 'data'
catalog = create_catalog('2020-12')
catalog.add_uri_source(URI('https://example.com/'), LocalSource(data_dir, suffix='.json'))
org_schema = JSONSchema.loadf(data_dir / 'org-schema.js... | 31.714286 | 90 | 0.761261 |
c4675f79c58f5e105a6ec8006f47a25e5ee48228 | 46,888 | py | Python | hphp/hack/test/integration/common_tests.py | jmurret/hhvm | f005fa3ca2793291cf59e217db3e9ce074d22f71 | [
"PHP-3.01",
"Zend-2.0"
] | 1 | 2020-01-17T02:24:38.000Z | 2020-01-17T02:24:38.000Z | hphp/hack/test/integration/common_tests.py | jmurret/hhvm | f005fa3ca2793291cf59e217db3e9ce074d22f71 | [
"PHP-3.01",
"Zend-2.0"
] | null | null | null | hphp/hack/test/integration/common_tests.py | jmurret/hhvm | f005fa3ca2793291cf59e217db3e9ce074d22f71 | [
"PHP-3.01",
"Zend-2.0"
] | null | null | null | # pyre-strict
from __future__ import absolute_import, division, print_function, unicode_literals
import json
import os
import re
import shutil
import signal
import subprocess
import sys
import tempfile
import time
import unittest
from typing import ClassVar, List, Mapping, Optional, Tuple
from hh_paths import hackfm... | 35.174794 | 153 | 0.516401 |
08eaf5956f7e6e84ae3e71a81bc90b6a3aab5ce3 | 25,289 | py | Python | sqlmodel/main.py | spawn08/sqlmodel | 02697459b8ea25cee72e81239828139698a66ac2 | [
"MIT"
] | null | null | null | sqlmodel/main.py | spawn08/sqlmodel | 02697459b8ea25cee72e81239828139698a66ac2 | [
"MIT"
] | null | null | null | sqlmodel/main.py | spawn08/sqlmodel | 02697459b8ea25cee72e81239828139698a66ac2 | [
"MIT"
] | null | null | null | import ipaddress
import uuid
import weakref
from datetime import date, datetime, time, timedelta
from decimal import Decimal
from enum import Enum
from pathlib import Path
from typing import (
TYPE_CHECKING,
AbstractSet,
Any,
Callable,
ClassVar,
Dict,
List,
Mapping,
Optional,
Seq... | 38.84639 | 89 | 0.629444 |
a0af4bb3452207c8a415525c6a5d4b71c8bb2a95 | 2,086 | py | Python | pimdm/tree/originator.py | leoplo/pim_dm | e097fb8e247b14f142b6aa97d8ee34440aeba806 | [
"MIT"
] | 6 | 2020-02-04T20:59:59.000Z | 2021-11-24T09:56:07.000Z | pimdm/tree/originator.py | leoplo/pim_dm | e097fb8e247b14f142b6aa97d8ee34440aeba806 | [
"MIT"
] | 4 | 2020-04-10T14:51:39.000Z | 2022-02-14T00:59:21.000Z | pimdm/tree/originator.py | leoplo/pim_dm | e097fb8e247b14f142b6aa97d8ee34440aeba806 | [
"MIT"
] | 3 | 2020-08-13T17:56:35.000Z | 2021-11-24T11:03:12.000Z | from abc import ABCMeta, abstractmethod
class OriginatorStateABC(metaclass=ABCMeta):
@staticmethod
@abstractmethod
def recvDataMsgFromSource(tree):
pass
@staticmethod
@abstractmethod
def SRTexpires(tree):
pass
@staticmethod
@abstractmethod
def SATexpires(tree):
... | 23.977011 | 84 | 0.668744 |
cc74887466b092d6f472dbf4f02918a07c1f10ed | 359 | py | Python | plottwist/toolsets/__init__.py | Plot-Twist-Short-Film/plottwist-core | 44cc770c83602004f3bdf5cd0027a9d189ae718d | [
"MIT"
] | null | null | null | plottwist/toolsets/__init__.py | Plot-Twist-Short-Film/plottwist-core | 44cc770c83602004f3bdf5cd0027a9d189ae718d | [
"MIT"
] | 1 | 2020-03-08T20:24:43.000Z | 2020-03-08T20:24:43.000Z | plottwist/toolsets/__init__.py | Plot-Twist-Short-Film/plottwist-core | 44cc770c83602004f3bdf5cd0027a9d189ae718d | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Initialization module for plottwist-toolsets
"""
from __future__ import print_function, division, absolute_import
__author__ = "Tomas Poveda"
__license__ = "MIT"
__maintainer__ = "Tomas Poveda"
__email__ = "tpovedatd@gmail.com"
from pkgutil import extend_path
__pa... | 19.944444 | 64 | 0.754875 |
6841c240e7cd31af16ae409516f83cef40efa953 | 922 | py | Python | example/project/chat/sockserver.py | NextGear/django-sockjs-tornado | dd52eec942f7fa457ed331fffaeee294f888bd1f | [
"MIT"
] | 25 | 2015-01-11T04:35:08.000Z | 2020-07-12T08:51:47.000Z | example/project/chat/sockserver.py | NextGear/django-sockjs-tornado | dd52eec942f7fa457ed331fffaeee294f888bd1f | [
"MIT"
] | null | null | null | example/project/chat/sockserver.py | NextGear/django-sockjs-tornado | dd52eec942f7fa457ed331fffaeee294f888bd1f | [
"MIT"
] | 4 | 2015-06-19T11:52:14.000Z | 2017-09-30T08:52:56.000Z | import json
from sockjs.tornado import SockJSConnection
from .models import Message
class ChatConnection(SockJSConnection):
_connected = set()
def on_open(self, request):
#print "OPEN"
#print request.get_cookie('name')
self._connected.add(self)
for each in Message.objects.all(... | 27.939394 | 67 | 0.596529 |
06b478cf3e6bee5c25855be86545c6caf1f45886 | 515 | py | Python | api/views.py | RRakib/django-boilerplate | 55c07384202643613e29342eb387e4a9a661c806 | [
"Apache-2.0"
] | 1 | 2021-08-16T10:53:03.000Z | 2021-08-16T10:53:03.000Z | api/views.py | Ahnaf/myproject | 86b1c4b56f7df30a1c38e5ba6c71255d4bc65b4b | [
"Apache-2.0"
] | 9 | 2020-03-24T17:46:49.000Z | 2021-08-23T20:27:47.000Z | api/views.py | Ahnaf/myproject | 86b1c4b56f7df30a1c38e5ba6c71255d4bc65b4b | [
"Apache-2.0"
] | 1 | 2021-08-16T10:53:04.000Z | 2021-08-16T10:53:04.000Z | from rest_framework import viewsets
from .models import DemoPurpose
from .serializers import DemoSerializer
class DemoViewSet(viewsets.ModelViewSet):
queryset = DemoPurpose.objects.all()
serializer_class = DemoSerializer
def get_serializer(self, *args, **kwargs):
if "data" in kwargs:
data =... | 27.105263 | 68 | 0.685437 |
370066678d5dff42c8934c3485fa972c403b1375 | 51 | py | Python | autox/autox_recommend/recall_and_rank/ranker/__init__.py | OneToolsCollection/4paradigm-AutoX | f8e838021354de17f5bb9bc44e9d68d12dda6427 | [
"Apache-2.0"
] | null | null | null | autox/autox_recommend/recall_and_rank/ranker/__init__.py | OneToolsCollection/4paradigm-AutoX | f8e838021354de17f5bb9bc44e9d68d12dda6427 | [
"Apache-2.0"
] | null | null | null | autox/autox_recommend/recall_and_rank/ranker/__init__.py | OneToolsCollection/4paradigm-AutoX | f8e838021354de17f5bb9bc44e9d68d12dda6427 | [
"Apache-2.0"
] | null | null | null | from .ranker import ranker, ranker_test, inference
| 25.5 | 50 | 0.823529 |
b296ffd2e4d63c5de4d06ef5fc0dbe27f16ac3d1 | 1,082 | py | Python | tests/test_build/test_combine.py | mgedmin/terminaltables | ad8f46e50afdbaea377fc1f713bc0e7a31c4fccc | [
"MIT"
] | 742 | 2015-01-03T21:46:14.000Z | 2022-03-27T05:49:32.000Z | tests/test_build/test_combine.py | mgedmin/terminaltables | ad8f46e50afdbaea377fc1f713bc0e7a31c4fccc | [
"MIT"
] | 64 | 2015-01-06T01:34:12.000Z | 2020-05-07T21:52:11.000Z | tests/test_build/test_combine.py | mgedmin/terminaltables | ad8f46e50afdbaea377fc1f713bc0e7a31c4fccc | [
"MIT"
] | 96 | 2015-02-26T16:42:42.000Z | 2022-02-06T14:00:24.000Z | """Test function in module."""
import pytest
from terminaltables.build import combine
@pytest.mark.parametrize('generator', [False, True])
def test_borders(generator):
"""Test with borders.
:param bool generator: Test with generator instead of list.
"""
line = ['One', 'Two', 'Three']
actual = l... | 28.473684 | 76 | 0.615527 |
f563cc8e30bd9a21a47284297ee1bc28b4da0fa4 | 8,922 | py | Python | isi_sdk_8_2_2/isi_sdk_8_2_2/models/auth_access_access_item_share_share_permissions.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_2/isi_sdk_8_2_2/models/auth_access_access_item_share_share_permissions.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_2/isi_sdk_8_2_2/models/auth_access_access_item_share_share_permissions.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 9
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_2_2.models.auth_ac... | 38.291845 | 176 | 0.676754 |
82621e66f64a2685b75911a75f18dd3ecb408f38 | 805 | py | Python | {{cookiecutter.repo_name}}/project/apps/geo_locator/tests.py | mindcube/mindcube-django-cookiecutter | 8ac8a713c1b091c69488c0e545d066da19154cc5 | [
"MIT"
] | null | null | null | {{cookiecutter.repo_name}}/project/apps/geo_locator/tests.py | mindcube/mindcube-django-cookiecutter | 8ac8a713c1b091c69488c0e545d066da19154cc5 | [
"MIT"
] | null | null | null | {{cookiecutter.repo_name}}/project/apps/geo_locator/tests.py | mindcube/mindcube-django-cookiecutter | 8ac8a713c1b091c69488c0e545d066da19154cc5 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.test import Client
class SimpleTest(TestCase):
def setUp(self):
# Every test needs a client.
self.client = Client()
def test_details(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
def test_g... | 29.814815 | 78 | 0.659627 |
5adbc7721de1bd6037e782a77cc228ea82bc80e5 | 8,755 | py | Python | tests/test_params_set.py | FaustinCarter/lmfit-py | 7fbb75b2fd3f383e78692fd85c9a646793d4b071 | [
"BSD-3-Clause"
] | null | null | null | tests/test_params_set.py | FaustinCarter/lmfit-py | 7fbb75b2fd3f383e78692fd85c9a646793d4b071 | [
"BSD-3-Clause"
] | null | null | null | tests/test_params_set.py | FaustinCarter/lmfit-py | 7fbb75b2fd3f383e78692fd85c9a646793d4b071 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from numpy.testing import assert_allclose
from lmfit import Parameters, minimize, report_fit
from lmfit.lineshapes import gaussian
from lmfit.models import VoigtModel
def test_param_set():
np.random.seed(2015)
x = np.arange(0, 20, 0.05)
y = gaussian(x, amplitude=15.43, center=4.5, sigma=... | 46.569149 | 79 | 0.671845 |
8a03db01273afac0956c892af20b3c57b47a3085 | 9,806 | py | Python | src/visual_data_handlers.py | nickgkan/beauty_detr | 502ee85e35c0a8a488fc71bb301e8c5bb1827250 | [
"MIT"
] | 18 | 2021-12-16T04:41:55.000Z | 2022-02-24T12:53:22.000Z | src/visual_data_handlers.py | nickgkan/beauty_detr | 502ee85e35c0a8a488fc71bb301e8c5bb1827250 | [
"MIT"
] | null | null | null | src/visual_data_handlers.py | nickgkan/beauty_detr | 502ee85e35c0a8a488fc71bb301e8c5bb1827250 | [
"MIT"
] | 1 | 2021-12-19T12:53:28.000Z | 2021-12-19T12:53:28.000Z | # ------------------------------------------------------------------------
# BEAUTY DETR
# Copyright (c) 2022 Ayush Jain & Nikolaos Gkanatsios
# Licensed under CC-BY-NC [see LICENSE for details]
# All Rights Reserved
# ------------------------------------------------------------------------
"""Classes for ScanNet datas... | 36.184502 | 78 | 0.58403 |
73942797f417b64400a8ac78ad91e23a19aacf1b | 2,085 | py | Python | dbt_artifacts_loader/dbt/v1/catalog.py | yu-iskw/dbt-artifacts-loader | cbb3580ff5ae7c2a6f13b414d7ed90f1161d255b | [
"Apache-2.0"
] | 10 | 2021-07-07T01:10:02.000Z | 2022-01-13T10:53:11.000Z | dbt_artifacts_loader/dbt/v1/catalog.py | yu-iskw/dbt-artifacts-loader | cbb3580ff5ae7c2a6f13b414d7ed90f1161d255b | [
"Apache-2.0"
] | null | null | null | dbt_artifacts_loader/dbt/v1/catalog.py | yu-iskw/dbt-artifacts-loader | cbb3580ff5ae7c2a6f13b414d7ed90f1161d255b | [
"Apache-2.0"
] | null | null | null | # generated by datamodel-codegen:
# filename: catalog.json
# timestamp: 2021-10-09T01:08:42+00:00
from __future__ import annotations
from datetime import datetime
from typing import Dict, List, Optional, Union
from dbt_artifacts_loader.dbt.base_bigquery_model import BaseBigQueryModel
from pydantic import Extra,... | 26.392405 | 88 | 0.690168 |
04d3f55502ec4eab7d5d5e17223e044313b1da03 | 10,544 | py | Python | homework-3/hw3p1/autograder/hw3_autograder/test_ctc_toy.py | neelpawarcmu/deep-learning-library | 401483fce40e3a025054596cbec368ff4f647661 | [
"MIT"
] | null | null | null | homework-3/hw3p1/autograder/hw3_autograder/test_ctc_toy.py | neelpawarcmu/deep-learning-library | 401483fce40e3a025054596cbec368ff4f647661 | [
"MIT"
] | null | null | null | homework-3/hw3p1/autograder/hw3_autograder/test_ctc_toy.py | neelpawarcmu/deep-learning-library | 401483fce40e3a025054596cbec368ff4f647661 | [
"MIT"
] | null | null | null | import numpy as np
import sys, os, pdb
import pickle
from test import Test
sys.path.append("mytorch")
from ctc_loss import *
from ctc import *
data_path = os.path.join("autograder", "hw3_autograder", "data")
ref_data_path = os.path.join("autograder", "hw3_autograder", "data", "ctc_ref_data")
######################... | 36.233677 | 97 | 0.611817 |
9c4b18056d60c4dcd3417110db04daea07d2ea69 | 3,483 | py | Python | .history/DEBER_20210831114112.py | Alopezm5/PROYECTO-PARTE-1 | bd7a8594edf08d41c6ca544cf6bac01ea4fcb684 | [
"MIT"
] | null | null | null | .history/DEBER_20210831114112.py | Alopezm5/PROYECTO-PARTE-1 | bd7a8594edf08d41c6ca544cf6bac01ea4fcb684 | [
"MIT"
] | null | null | null | .history/DEBER_20210831114112.py | Alopezm5/PROYECTO-PARTE-1 | bd7a8594edf08d41c6ca544cf6bac01ea4fcb684 | [
"MIT"
] | null | null | null | class Nomina:
def __init__(self,nom="",ruc=0,dire="",tele=0,ciud="",tipEmpr="",email="",estado="",profe="",dep=""):#3
self.nombre=nom
self.ruc=ruc
self.direccion=dire
self.telefono=tele
self.ciudad=ciud
self.tipoEmpresa=tipEmpr
self.correo=email
self.... | 35.907216 | 247 | 0.656044 |
875bfac76a5f87ef9cd19200d764c9ee6ae69308 | 2,999 | py | Python | tests/safety/common.py | loveks520/panda | 0c2c1494908916ce776f1eb047947329e9887049 | [
"MIT"
] | 10 | 2020-02-21T21:21:36.000Z | 2022-01-30T12:48:15.000Z | tests/safety/common.py | loveks520/panda | 0c2c1494908916ce776f1eb047947329e9887049 | [
"MIT"
] | 1 | 2021-03-20T20:37:40.000Z | 2021-03-20T20:37:40.000Z | tests/safety/common.py | loveks520/panda | 0c2c1494908916ce776f1eb047947329e9887049 | [
"MIT"
] | 10 | 2020-02-15T07:34:36.000Z | 2022-03-21T05:49:47.000Z | from panda.tests.safety import libpandasafety_py
MAX_WRONG_COUNTERS = 5
class UNSAFE_MODE:
DEFAULT = 0
DISABLE_DISENGAGE_ON_GAS = 1
DISABLE_STOCK_AEB = 2
ENABLE_WEAK_STEERING_WHILE_NOT_ENGAGED = 4
RAISE_LONGITUDINAL_LIMITS_TO_ISO_MAX = 8
def make_msg(bus, addr, length=8):
to_send = libpandasafety_py.ffi.... | 38.448718 | 84 | 0.741247 |
c0e607109e5f850d00b6b257c5e585b15bac3e49 | 1,590 | py | Python | pyrcm/terminal/rediscmd_noop.py | booleys1012/redisclustermon | af51685271c9d8f0aa48e5995be6c2c52cf7fc1b | [
"MIT"
] | null | null | null | pyrcm/terminal/rediscmd_noop.py | booleys1012/redisclustermon | af51685271c9d8f0aa48e5995be6c2c52cf7fc1b | [
"MIT"
] | null | null | null | pyrcm/terminal/rediscmd_noop.py | booleys1012/redisclustermon | af51685271c9d8f0aa48e5995be6c2c52cf7fc1b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2018 Justin Bewley Lo (justinbewley.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limi... | 36.976744 | 80 | 0.737736 |
83ee36a8ca54eb596bd30adec8a7adb61705d638 | 883 | py | Python | wintria/wintriauser/views.py | codelucas/wintria.com | 99c3f20d64e6ecf3d02cf0117233de349274a607 | [
"MIT"
] | 2 | 2017-10-04T20:53:09.000Z | 2021-11-12T10:02:32.000Z | wintria/wintriauser/views.py | codelucas/wintria.com | 99c3f20d64e6ecf3d02cf0117233de349274a607 | [
"MIT"
] | null | null | null | wintria/wintriauser/views.py | codelucas/wintria.com | 99c3f20d64e6ecf3d02cf0117233de349274a607 | [
"MIT"
] | null | null | null | """
"""
from django.http import HttpResponseRedirect
from wintria.wintriauser.forms import FeedbackForm
from wintria.wintria.views import render_with_context
from wintria.wintria.settings import get_root_url
def send_feedback(request):
form_args = {}
if request.POST:
form_args['data'] = request.POST
... | 35.32 | 73 | 0.672707 |
026e70d20e3df1e676c0c929a3646b6122c3ba06 | 1,467 | py | Python | setup.py | patowc/django-encrypted-field | ffe02eab39a85dc988d1330e673ff7b22c4056b1 | [
"MIT"
] | null | null | null | setup.py | patowc/django-encrypted-field | ffe02eab39a85dc988d1330e673ff7b22c4056b1 | [
"MIT"
] | null | null | null | setup.py | patowc/django-encrypted-field | ffe02eab39a85dc988d1330e673ff7b22c4056b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_description = (
open('README.md').read()
)
version = '1.0.4'
setup(
name='django-encrypted-field',
description=(
'This is a Django Model Field class that can be '
'encrypted using ChaCha20 po... | 29.34 | 70 | 0.615542 |
a965ae51949ee01d477a3cfd9cab0f24f5b4edf6 | 25,777 | py | Python | tensorflow_probability/python/sts/structural_time_series_test.py | jvishnuvardhan/probability | a408f8fbde831a40df3fb10023deaf997d104b24 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/sts/structural_time_series_test.py | jvishnuvardhan/probability | a408f8fbde831a40df3fb10023deaf997d104b24 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/sts/structural_time_series_test.py | jvishnuvardhan/probability | a408f8fbde831a40df3fb10023deaf997d104b24 | [
"Apache-2.0"
] | 1 | 2021-06-09T00:10:32.000Z | 2021-06-09T00:10:32.000Z | # 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... | 42.119281 | 108 | 0.718974 |
fc35a32b0bebe233e0c81b1c63a91cc6b2139e0e | 3,138 | py | Python | analysis_sms.py | muyu66t/sunhanaixl | 62d567fdf946736e7f015945658e503bdd0d0f1d | [
"Apache-2.0"
] | 26 | 2021-03-05T09:44:57.000Z | 2022-01-10T11:44:04.000Z | analysis_sms.py | dangerwolf/SyncXiaomiCloud | f8f4f21d289811a738952d096204aca8c4b99e99 | [
"Apache-2.0"
] | 1 | 2021-07-08T15:39:05.000Z | 2021-07-08T15:39:05.000Z | analysis_sms.py | dangerwolf/SyncXiaomiCloud | f8f4f21d289811a738952d096204aca8c4b99e99 | [
"Apache-2.0"
] | 4 | 2021-03-05T08:19:17.000Z | 2021-11-17T05:44:08.000Z | import os,sys,re,json,time
import openpyxl
from openpyxl.styles import Alignment,Border,Side
import difflib
'''
给定一个从小米云上同步,并格式化好的sms.json文件
以及格式化好的通讯录电话为key的文件
输出短信记录,到一个excel表里面
'''
fname='sms.json'
contact_json_file='phone_dict.json'
def simRatio(s1, s2): # 比较两个字符串的相似度,结果为0-1之间的数
s = difflib.SequenceMatcher(N... | 29.055556 | 95 | 0.581262 |
6ba972067669406f2e216fa6b00f8816bc75ed4f | 4,554 | py | Python | cluster.py | cyjack/TextCluster | 53204b012b7fc11a42a754720d510fd72b9fa695 | [
"BSD-3-Clause"
] | 1 | 2020-09-16T06:52:10.000Z | 2020-09-16T06:52:10.000Z | cluster.py | cyjack/TextCluster | 53204b012b7fc11a42a754720d510fd72b9fa695 | [
"BSD-3-Clause"
] | null | null | null | cluster.py | cyjack/TextCluster | 53204b012b7fc11a42a754720d510fd72b9fa695 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import argparse
from collections import defaultdict
from tqdm import tqdm
from utils.similar import jaccard
from utils.segmentor import Segmentor
from utils.utils import check_file, ensure_dir, clean_dir, sample_file, get_stop_words, line_counter, Range
def _get_parser():
parse... | 40.300885 | 122 | 0.614185 |
602a161aaef84e579c79ba21d0e7f1c845b2cdf1 | 4,391 | py | Python | becke/GaussianBasis.py | humeniuka/becke_multicenter_integration | 7e06e4b931232b9ccc0fd6dedef7f7ad5a5e4cda | [
"MIT"
] | 1 | 2021-11-10T18:25:21.000Z | 2021-11-10T18:25:21.000Z | becke/GaussianBasis.py | humeniuka/becke_multicenter_integration | 7e06e4b931232b9ccc0fd6dedef7f7ad5a5e4cda | [
"MIT"
] | null | null | null | becke/GaussianBasis.py | humeniuka/becke_multicenter_integration | 7e06e4b931232b9ccc0fd6dedef7f7ad5a5e4cda | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
uncontracted cartesian Gaussian-type orbitals
"""
import numpy as np
import numpy.linalg as la
from becke.GaussianIntegrals import norm
def cartesian_shell_ordering(LType):
"""
ordering of cartesian basis function in one shell
according to the Gaussian 09 source code in file
... | 35.699187 | 103 | 0.535413 |
39e97e5fb5aa203a246f0e6f20206713946c4eac | 2,677 | py | Python | eas_controller/queue_management/schedule_all_waiting_tasks.py | dcf21/plato-wp36-v2 | 9e7a215fbc0c3a1ce38369cbb54ffb7f84a9d8d7 | [
"MIT"
] | null | null | null | eas_controller/queue_management/schedule_all_waiting_tasks.py | dcf21/plato-wp36-v2 | 9e7a215fbc0c3a1ce38369cbb54ffb7f84a9d8d7 | [
"MIT"
] | null | null | null | eas_controller/queue_management/schedule_all_waiting_tasks.py | dcf21/plato-wp36-v2 | 9e7a215fbc0c3a1ce38369cbb54ffb7f84a9d8d7 | [
"MIT"
] | null | null | null | #!../../data/datadir_local/virtualenv/bin/python3
# -*- coding: utf-8 -*-
# schedule_all_waiting_tasks.py
"""
Schedule all tasks in the database which have not yet been queued
"""
import argparse
import logging
import os
import time
from plato_wp36 import settings, task_database, task_queues
def schedule_jobs():
... | 30.420455 | 112 | 0.658947 |
249fb771b33317eccf1e71f7a906da1c1633b9ab | 36 | py | Python | easydata/exceptions.py | easydatapy/easydata | 5e76bf7fc9f368065a82ccc99fca54b17f7e91bd | [
"BSD-3-Clause"
] | 6 | 2020-09-06T19:06:01.000Z | 2020-09-09T23:19:21.000Z | easydata/exceptions.py | sitegroove/easydata | 0e347990027b9f6cc06a1072511197f1adb50e5c | [
"BSD-3-Clause"
] | null | null | null | easydata/exceptions.py | sitegroove/easydata | 0e347990027b9f6cc06a1072511197f1adb50e5c | [
"BSD-3-Clause"
] | 1 | 2021-07-22T17:59:20.000Z | 2021-07-22T17:59:20.000Z | class DropItem(Exception):
pass
| 12 | 26 | 0.722222 |
49fb5268d8f0effb519253997c5a0c6f38688258 | 4,788 | py | Python | quickstart_templates/Good usage of blacklist.py | fierysolid/InstaPy | a944520b107e6501e1fc41255049ff330f7a1a42 | [
"MIT"
] | null | null | null | quickstart_templates/Good usage of blacklist.py | fierysolid/InstaPy | a944520b107e6501e1fc41255049ff330f7a1a42 | [
"MIT"
] | null | null | null | quickstart_templates/Good usage of blacklist.py | fierysolid/InstaPy | a944520b107e6501e1fc41255049ff330f7a1a42 | [
"MIT"
] | null | null | null | """
This template is written by @jeremycjang
What does this quickstart script aim to do?
- Here's the configuration I use the most.
NOTES:
- Read the incredibly amazing advices & ideas from my experience at the end of this file :>
"""
import time
import os
from tempfile import gettempdir
from instapy import InstaP... | 44.333333 | 299 | 0.70447 |
3f2b8eda8c8a56a68ceeddb8f151c1a565e3be57 | 1,355 | py | Python | delira/training/callbacks/abstract_callback.py | NKPmedia/delira | a10227e30c14c6507a1790813e53572e0d841c21 | [
"BSD-2-Clause"
] | null | null | null | delira/training/callbacks/abstract_callback.py | NKPmedia/delira | a10227e30c14c6507a1790813e53572e0d841c21 | [
"BSD-2-Clause"
] | null | null | null | delira/training/callbacks/abstract_callback.py | NKPmedia/delira | a10227e30c14c6507a1790813e53572e0d841c21 | [
"BSD-2-Clause"
] | null | null | null | class AbstractCallback(object):
"""
Implements abstract callback interface.
All callbacks should be derived from this class
See Also
--------
:class:`AbstractNetworkTrainer`
"""
def __init__(self, *args, **kwargs):
"""
Parameters
----------
*args :
... | 21.854839 | 78 | 0.526937 |
9bbcd840421e5363aa5a98a3e56541d3776c2f96 | 729 | py | Python | tests/src/CRC/navigate_to_crc_and_click_on_logout.py | JalajaTR/cQube | 6bf58ab25f0c36709630987ab730bbd5d9192c03 | [
"MIT"
] | null | null | null | tests/src/CRC/navigate_to_crc_and_click_on_logout.py | JalajaTR/cQube | 6bf58ab25f0c36709630987ab730bbd5d9192c03 | [
"MIT"
] | 2 | 2022-02-01T00:55:12.000Z | 2022-03-29T22:29:09.000Z | tests/src/CRC/navigate_to_crc_and_click_on_logout.py | JalajaTR/cQube | 6bf58ab25f0c36709630987ab730bbd5d9192c03 | [
"MIT"
] | null | null | null | from Data.parameters import Data
from reuse_func import GetData
class Logout_function():
def __init__(self,driver):
self.driver = driver
def test_logout(self):
self.p = GetData()
self.driver.implicitly_wait(20)
self.driver.find_element_by_xpath(Data.hyper).click()
self.p.page_l... | 30.375 | 60 | 0.662551 |
a6820298871d6494d6e543fd1138a7af9f754b42 | 198 | py | Python | organisatie/views.py | markvangeffen/public_dashboard | 81521f93ab6337e4f90f58722811e0c8358174a8 | [
"MIT"
] | null | null | null | organisatie/views.py | markvangeffen/public_dashboard | 81521f93ab6337e4f90f58722811e0c8358174a8 | [
"MIT"
] | null | null | null | organisatie/views.py | markvangeffen/public_dashboard | 81521f93ab6337e4f90f58722811e0c8358174a8 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views.generic import TemplateView
# Create your views here.
class OrganisatieView(TemplateView):
template_name = 'organisatie/organisatie.html' | 28.285714 | 50 | 0.813131 |
e6adc6d768e40d5d4c5f11c9fc142ce3bbeeb307 | 1,148 | py | Python | app/tests/core/storage/test_redis.py | jmgilman/fapi | 9a63ed18bd119efa4d1e93f1c9d6ded22e6d39d2 | [
"MIT"
] | 1 | 2022-01-24T22:28:22.000Z | 2022-01-24T22:28:22.000Z | app/tests/core/storage/test_redis.py | jmgilman/bapi | 9a63ed18bd119efa4d1e93f1c9d6ded22e6d39d2 | [
"MIT"
] | null | null | null | app/tests/core/storage/test_redis.py | jmgilman/bapi | 9a63ed18bd119efa4d1e93f1c9d6ded22e6d39d2 | [
"MIT"
] | null | null | null | from unittest import mock
from app.core import settings
from app.core.storage.redis import RedisConfig, RedisStorage
import redis
@mock.patch("bdantic.models.BeancountFile.parse")
@mock.patch("bdantic.models.BeancountFile.decompress")
@mock.patch("beancount.loader.load_string")
@mock.patch("redis.StrictRedis.pubsub... | 28 | 60 | 0.72561 |
3df4bea014f3e1b4b0fe4fc8a6bc5e92fa411701 | 957 | py | Python | csv_sampler.py | tyhunt99/random | d50b47b7bba065a15cb36675ce2a8d0954f04281 | [
"MIT"
] | null | null | null | csv_sampler.py | tyhunt99/random | d50b47b7bba065a15cb36675ce2a8d0954f04281 | [
"MIT"
] | null | null | null | csv_sampler.py | tyhunt99/random | d50b47b7bba065a15cb36675ce2a8d0954f04281 | [
"MIT"
] | null | null | null | '''
This will read CSV_IN and loop over it until SAMPLE_SIZE is reached and
output it to CSV_OUT. Be sure to specify the delimiter and quote char.
It will maintain these values in the sample output csv.
Notes:
* This will truncate the output file or create it if needed
'''
import csv
CSV_IN = 'OUTPUT_1528387783_... | 24.538462 | 71 | 0.654127 |
c0810d807d15f9124bbf0cbe44b504a70fb436d4 | 1,401 | py | Python | scripts/discourse_1739.py | gmatteo/awesome-panel | 7eb6965f4b3a7eca08c07561e631e5beb189ffd3 | [
"Apache-2.0"
] | 179 | 2019-12-04T14:54:53.000Z | 2022-03-30T09:08:38.000Z | scripts/discourse_1739.py | hbueno/awesome-panel | fb27bcaf265cef1278cfa0c78799fbbf6c9a6834 | [
"Apache-2.0"
] | 62 | 2019-12-14T16:51:28.000Z | 2022-03-19T18:47:12.000Z | scripts/discourse_1739.py | hbueno/awesome-panel | fb27bcaf265cef1278cfa0c78799fbbf6c9a6834 | [
"Apache-2.0"
] | 35 | 2019-12-08T13:19:53.000Z | 2022-03-25T10:33:02.000Z | import numpy as np
import pandas as pd
import panel as pn
import panel.widgets as pnw
from matplotlib.backends.backend_agg import FigureCanvas
from matplotlib.figure import Figure
DATA_URL = (
"https://raw.githubusercontent.com/LuisM78/Occupancy-detection-data/master/datatraining.txt"
)
data = pd.read_... | 30.456522 | 98 | 0.700214 |
f0212de2ceeb06d53133c239dedd8509261292cc | 70 | py | Python | thetangle/__init__.py | kaalam/thetangle | 4c4877ebc3c6f8cce86f1a43681359c16a51e2c9 | [
"MIT"
] | 1 | 2021-11-20T12:30:02.000Z | 2021-11-20T12:30:02.000Z | thetangle/__init__.py | kaalam/thetangle | 4c4877ebc3c6f8cce86f1a43681359c16a51e2c9 | [
"MIT"
] | null | null | null | thetangle/__init__.py | kaalam/thetangle | 4c4877ebc3c6f8cce86f1a43681359c16a51e2c9 | [
"MIT"
] | null | null | null | __version__ = '0.5.3'
from thetangle.TheTangle import TangleExplorer
| 17.5 | 46 | 0.8 |
ffa637531b28f5bc547f58662450a3f37531f1e7 | 2,747 | py | Python | examples/crontabReader.py | Davoodeh/cron-descriptor | b15f435d10e6497a0647fdaca51539931f2eddc5 | [
"MIT"
] | 98 | 2016-01-20T00:52:11.000Z | 2022-03-10T16:27:31.000Z | examples/crontabReader.py | Davoodeh/cron-descriptor | b15f435d10e6497a0647fdaca51539931f2eddc5 | [
"MIT"
] | 37 | 2016-02-03T17:26:39.000Z | 2022-03-23T22:44:32.000Z | examples/crontabReader.py | Davoodeh/cron-descriptor | b15f435d10e6497a0647fdaca51539931f2eddc5 | [
"MIT"
] | 26 | 2016-01-19T16:24:02.000Z | 2022-02-15T20:22:43.000Z | # The MIT License (MIT)
#
# Copyright (c) 2016 Adam Schubert
#
# 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, mod... | 35.675325 | 101 | 0.620677 |
2e4edb9f72bdcba9a02b41fc273d54b577e4c153 | 717 | py | Python | tests/test_server.py | dymaxionlabs/nb_workflows | 336e4d83dd5f8a7edfbaacfa426b23a42c0a68a9 | [
"Apache-2.0"
] | 4 | 2022-02-17T19:47:52.000Z | 2022-02-17T20:11:06.000Z | tests/test_server.py | dymaxionlabs/nb_workflows | 336e4d83dd5f8a7edfbaacfa426b23a42c0a68a9 | [
"Apache-2.0"
] | 2 | 2022-03-26T00:07:05.000Z | 2022-03-30T21:20:00.000Z | tests/test_server.py | dymaxionlabs/nb_workflows | 336e4d83dd5f8a7edfbaacfa426b23a42c0a68a9 | [
"Apache-2.0"
] | 1 | 2022-02-18T13:33:00.000Z | 2022-02-18T13:33:00.000Z | import pytest
from sanic import Sanic, response
from labfunctions import server
from labfunctions.conf.server_settings import settings
from labfunctions.db.nosync import AsyncSQL
def test_server_app():
app = server.create_app(settings, ["events"])
assert isinstance(app, Sanic)
# assert isinstance(server... | 25.607143 | 79 | 0.729428 |
4538b12df0c5e900fc6534d26c13abcb5a726739 | 1,248 | py | Python | codes/Lib/site-packages/openpyxl/drawing/__init__.py | charlescayno/automation | a4a34d87f372d49fd69740ad3ca46ae19bf2612d | [
"MIT"
] | 8 | 2016-05-27T12:13:16.000Z | 2019-08-05T13:49:11.000Z | codes/Lib/site-packages/openpyxl/drawing/__init__.py | charlescayno/automation | a4a34d87f372d49fd69740ad3ca46ae19bf2612d | [
"MIT"
] | 3 | 2019-07-29T09:47:34.000Z | 2019-07-29T09:47:35.000Z | flask/lib/python3.6/site-packages/openpyxl/drawing/__init__.py | JOFLIX/grapevines | 34576e01184570d79cc140b42ffb71d322132da6 | [
"MIT",
"Unlicense"
] | 1 | 2021-07-21T00:07:30.000Z | 2021-07-21T00:07:30.000Z | from __future__ import absolute_import
# Copyright (c) 2010-2014 openpyxl
#
# 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 u... | 48 | 79 | 0.778846 |
8e5306ded8fee28b336607448f5a172cc5b8e97e | 397 | py | Python | cartpole_trainer.py | djdnx/DQN | 4be919d51d0a3e008bf41c3afcc76170056b9b0c | [
"MIT"
] | null | null | null | cartpole_trainer.py | djdnx/DQN | 4be919d51d0a3e008bf41c3afcc76170056b9b0c | [
"MIT"
] | null | null | null | cartpole_trainer.py | djdnx/DQN | 4be919d51d0a3e008bf41c3afcc76170056b9b0c | [
"MIT"
] | null | null | null | """File demonstrating how to train an agent to solve the 'CartPole-v0' gym environment."""
import gym
from DQN import dqn_trainer
env = gym.make("CartPole-v0")
agent = dqn_trainer.DQNAgent(env, hidden_architecture=(["relu", 64],))
agent.learn("cartpole_tf_model/q_model", "cartpole_tensorboard_dir", 400,
... | 28.357143 | 90 | 0.753149 |
0e0a5fe1236daac7710ff7d2cc4c8e74109167fd | 8,865 | py | Python | stable_projects/fMRI_dynamics/Kong2021_pMFM/part2_pMFM_control_analysis/Schaefer100_parcellation/scripts/CBIG_pMFM_step1_training_Schaefer100.py | marielacour81/CBIG | 511af756c6ddabbd3a9681ce3514b79ef5aaaf3f | [
"MIT"
] | 1 | 2021-12-18T09:35:59.000Z | 2021-12-18T09:35:59.000Z | stable_projects/fMRI_dynamics/Kong2021_pMFM/part2_pMFM_control_analysis/Schaefer100_parcellation/scripts/CBIG_pMFM_step1_training_Schaefer100.py | marielacour81/CBIG | 511af756c6ddabbd3a9681ce3514b79ef5aaaf3f | [
"MIT"
] | null | null | null | stable_projects/fMRI_dynamics/Kong2021_pMFM/part2_pMFM_control_analysis/Schaefer100_parcellation/scripts/CBIG_pMFM_step1_training_Schaefer100.py | marielacour81/CBIG | 511af756c6ddabbd3a9681ce3514b79ef5aaaf3f | [
"MIT"
] | null | null | null | # /usr/bin/env python
'''
Written by Kong Xiaolu and CBIG under MIT license:
https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md
'''
import os
import numpy as np
import time
import torch
import CBIG_pMFM_basic_functions as fc
import warnings
def get_init(myelin_data, gradient_data, highest_order, init_para):... | 37.723404 | 79 | 0.548111 |
def0b1bbc6f2b3455f09cdd9a1cf484d0bfe1b99 | 9,270 | py | Python | tests/systems/maddpg_system_test.py | 1998x-stack/Mava | 2c8f7f59f235340886e92045b6730cf5a542a496 | [
"Apache-2.0"
] | 1 | 2022-03-19T12:51:16.000Z | 2022-03-19T12:51:16.000Z | tests/systems/maddpg_system_test.py | 1998x-stack/Mava | 2c8f7f59f235340886e92045b6730cf5a542a496 | [
"Apache-2.0"
] | null | null | null | tests/systems/maddpg_system_test.py | 1998x-stack/Mava | 2c8f7f59f235340886e92045b6730cf5a542a496 | [
"Apache-2.0"
] | null | null | null | # python3
# Copyright 2021 InstaDeep Ltd. 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... | 31.85567 | 79 | 0.620928 |
01d45abc54fef817c8d1bd05fa6b9630fe8ca75b | 18,485 | py | Python | plugins/modules/oci_database_autonomous_exadata_infrastructure_facts.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_database_autonomous_exadata_infrastructure_facts.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_database_autonomous_exadata_infrastructure_facts.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 41.632883 | 160 | 0.600595 |
9831af9982bfdd3960142367ee3bd58baa5b1838 | 3,698 | py | Python | app/services/pull_request_service.py | paullegranddc/gello | 9f8ce0e67e5da66cb8d26d01edc9a132bdfe8738 | [
"Apache-2.0"
] | null | null | null | app/services/pull_request_service.py | paullegranddc/gello | 9f8ce0e67e5da66cb8d26d01edc9a132bdfe8738 | [
"Apache-2.0"
] | 1 | 2021-02-24T01:38:37.000Z | 2021-02-24T01:38:37.000Z | app/services/pull_request_service.py | isabella232/gello | 3c7c6c72187095e3675b3ca15dcab8a2adaf44c0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Unless explicitly stated otherwise all files in this repository are licensed
# under the Apache 2 License.
#
# This product includes software developed at Datadog
# (https://www.datadoghq.com/).
#
# Copyright 2018 Datadog, Inc.
#
"""pull_request_service.py
Service-helpers for creating and... | 33.618182 | 79 | 0.631422 |
92264f5d58f278f6a156231ecfb8df8b6ae3b856 | 837 | py | Python | pictures/migrations/0001_initial.py | amiinegal/Gallery-app | 3619f1717e8f813e151f7a178f0789f06bd52c02 | [
"Unlicense",
"MIT"
] | null | null | null | pictures/migrations/0001_initial.py | amiinegal/Gallery-app | 3619f1717e8f813e151f7a178f0789f06bd52c02 | [
"Unlicense",
"MIT"
] | null | null | null | pictures/migrations/0001_initial.py | amiinegal/Gallery-app | 3619f1717e8f813e151f7a178f0789f06bd52c02 | [
"Unlicense",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-05-12 03:46
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Location... | 27 | 114 | 0.569892 |
a06fe27bbe92847c3f7d1e3c65717b6234100e66 | 89,073 | py | Python | ac_dc/stopwords.py | tttorrent/data_tooling | 6540bcb3cd2dbaa3b20c8a1bd84e4cbde7ebe50b | [
"Apache-2.0"
] | null | null | null | ac_dc/stopwords.py | tttorrent/data_tooling | 6540bcb3cd2dbaa3b20c8a1bd84e4cbde7ebe50b | [
"Apache-2.0"
] | null | null | null | ac_dc/stopwords.py | tttorrent/data_tooling | 6540bcb3cd2dbaa3b20c8a1bd84e4cbde7ebe50b | [
"Apache-2.0"
] | null | null | null | # From https://github.com/6/stopwords-json
# From https://github.com/stopwords-iso/stopwords-iso for Urdu and Vietnamese
stopwords = {
"af": [
"'n",
"aan",
"af",
"al",
"as",
"baie",
"by",
"daar",
"dag",
"dat",
"die",
"... | 16.605705 | 77 | 0.265198 |
2ba8c38efe0d3bdcad125b1c09123c9b5c7325e5 | 4,237 | py | Python | org/tradesafe/bt/strategy_cci.py | shenbai/tradesafe | b6bb843288f535d7d146426fd40750f7484a16e6 | [
"MIT"
] | null | null | null | org/tradesafe/bt/strategy_cci.py | shenbai/tradesafe | b6bb843288f535d7d146426fd40750f7484a16e6 | [
"MIT"
] | null | null | null | org/tradesafe/bt/strategy_cci.py | shenbai/tradesafe | b6bb843288f535d7d146426fd40750f7484a16e6 | [
"MIT"
] | 2 | 2021-08-21T17:26:29.000Z | 2022-02-18T21:40:24.000Z | # coding:utf-8
from org.tradesafe.data.history_data import HistoryData
from org.tradesafe.bt.account import Account
from org.tradesafe.bt.strategy import AbstrictStrategy
from org.tradesafe.bt import strategy
from org.tradesafe.bt.order import Order
from org.tradesafe.bt.btdata import BtData
from org.tradesafe.bt.log ... | 35.90678 | 153 | 0.565494 |
50fc7d19a1b9488c02758f179f86a0843eb1c2c4 | 10,705 | py | Python | tests/unit/pillar/test_azureblob.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 9,425 | 2015-01-01T05:59:24.000Z | 2022-03-31T20:44:05.000Z | tests/unit/pillar/test_azureblob.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 33,507 | 2015-01-01T00:19:56.000Z | 2022-03-31T23:48:20.000Z | tests/unit/pillar/test_azureblob.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 5,810 | 2015-01-01T19:11:45.000Z | 2022-03-31T02:37:20.000Z | """
Tests for the Azure Blob External Pillar.
"""
import os
import pickle
import tempfile
import time
import salt.config
import salt.loader
import salt.pillar.azureblob as azureblob
import salt.utils.files
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.mock import MagicMock, patch
from test... | 33.040123 | 119 | 0.55021 |
c11938b33bc7554057797d9b0e050750909ac597 | 2,110 | py | Python | src/oci/oda/models/translator_collection.py | pabs3/oci-python-sdk | 437ba18ce39af2d1090e277c4bb8750c89f83021 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/oda/models/translator_collection.py | pabs3/oci-python-sdk | 437ba18ce39af2d1090e277c4bb8750c89f83021 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/oda/models/translator_collection.py | pabs3/oci-python-sdk | 437ba18ce39af2d1090e277c4bb8750c89f83021 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 29.71831 | 245 | 0.655924 |
8c5305c38c7fb51e8705ce48522338ee8080b949 | 3,863 | py | Python | gpAux/extensions/gphdfs/regression/legacy/lib/rpm_util.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 9 | 2018-04-20T03:31:01.000Z | 2020-05-13T14:10:53.000Z | gpAux/extensions/gphdfs/regression/legacy/lib/rpm_util.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 36 | 2017-09-21T09:12:27.000Z | 2020-06-17T16:40:48.000Z | gpAux/extensions/gphdfs/regression/legacy/lib/rpm_util.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 32 | 2017-08-31T12:50:52.000Z | 2022-03-01T07:34:53.000Z | """
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the 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
... | 38.247525 | 110 | 0.637329 |
12673e498880a63406c38f97aebd98a8bd6b68b8 | 4,588 | py | Python | datasets/cifar10.py | baiyang1220/tensorflow1.x-basic | f35801a92a2a1b0e610b4eba0b292df215fe8e7e | [
"MIT"
] | null | null | null | datasets/cifar10.py | baiyang1220/tensorflow1.x-basic | f35801a92a2a1b0e610b4eba0b292df215fe8e7e | [
"MIT"
] | null | null | null | datasets/cifar10.py | baiyang1220/tensorflow1.x-basic | f35801a92a2a1b0e610b4eba0b292df215fe8e7e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import pickle
import numpy as np
from datasets.data_utils import get_filenames_from_urls
from datasets.data_utils import download
from datasets.data_utils import extract_tar
URLS = {
'data': r'http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz'
}
DECOMPRESSED_FOLDER = r'cifa... | 29.792208 | 79 | 0.646905 |
2dab4443adcb473402e2a8081b3a8ad2f4a28520 | 2,696 | py | Python | awx/main/tests/unit/commands/test_replay_job_events.py | sumit-21/awx | 966a62c6bf2ec0c672e076684341bc6bd75827af | [
"Apache-2.0"
] | 17 | 2021-04-03T01:40:17.000Z | 2022-03-03T11:45:20.000Z | awx/main/tests/unit/commands/test_replay_job_events.py | Saurabh-Thakre/awx | 8eb377a3ea8303c394ad4c958cc828c7239c1e11 | [
"Apache-2.0"
] | 24 | 2021-05-18T21:13:35.000Z | 2022-03-29T10:23:52.000Z | awx/main/tests/unit/commands/test_replay_job_events.py | Saurabh-Thakre/awx | 8eb377a3ea8303c394ad4c958cc828c7239c1e11 | [
"Apache-2.0"
] | 24 | 2020-11-27T08:37:35.000Z | 2021-03-08T13:27:15.000Z | # Copyright (c) 2017 Ansible by Red Hat
# All Rights Reserved
# Python
import pytest
from unittest import mock
from datetime import timedelta
# Django
from django.utils import timezone
# AWX
from awx.main.models import (
Job,
JobEvent,
)
from awx.main.management.commands.replay_job_events import (
Replay... | 28.989247 | 106 | 0.614243 |
2705758d04d067af871a7e87635708258f71b3f9 | 1,900 | py | Python | agents.py | liuzhangyi/2048-api | 475bd331c5e4ac1f9f26dcf532c4fa1decdf7345 | [
"Apache-2.0"
] | 1 | 2018-12-11T06:38:43.000Z | 2018-12-11T06:38:43.000Z | agents.py | liuzhangyi/2048-api | 475bd331c5e4ac1f9f26dcf532c4fa1decdf7345 | [
"Apache-2.0"
] | null | null | null | agents.py | liuzhangyi/2048-api | 475bd331c5e4ac1f9f26dcf532c4fa1decdf7345 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import keras
from keras.models import Model
OUT_SHAPE=(4,4)
map_table={2**i:i for i in range(1,16)}
map_table[0]=0
def grid_ohe(arr):
ret=np.zeros(shape=OUT_SHAPE+(16,),dtype=bool)
for r in range(OUT_SHAPE[0]):
for c in range(OUT_SHAPE[1]):
ret[r,c,map_table[arr[r,c]]]=1... | 27.941176 | 86 | 0.585263 |
19d74f542e2ddaf9527f7a4851760c79245f02cc | 6,376 | py | Python | sktime/transformers/series_to_series.py | TonyBagnall/sktime | 837a77026be3e53511c3d6139ddad14a39351bf5 | [
"BSD-3-Clause"
] | 2 | 2019-08-19T13:59:21.000Z | 2020-03-02T20:32:31.000Z | sktime/transformers/series_to_series.py | TonyBagnall/boss_fork | 837a77026be3e53511c3d6139ddad14a39351bf5 | [
"BSD-3-Clause"
] | null | null | null | sktime/transformers/series_to_series.py | TonyBagnall/boss_fork | 837a77026be3e53511c3d6139ddad14a39351bf5 | [
"BSD-3-Clause"
] | 2 | 2019-08-24T12:06:15.000Z | 2020-01-09T07:32:40.000Z | from sklearn.utils.validation import check_is_fitted
import numpy as np
import pandas as pd
from ..utils.validation import check_equal_index
from ..utils.transformations import tabularize, concat_nested_arrays
from ..utils.time_series import rand_intervals_rand_n, rand_intervals_fixed_n
from .base import BaseTransforme... | 40.871795 | 114 | 0.592221 |
4687f3f3ede65252208b5d368d3d46bc0032366e | 28 | py | Python | cgen/hsm/__init__.py | jszeman/chsm | 0283d722553aea09477e039a718b9500d814f0ae | [
"MIT"
] | 4 | 2021-04-16T18:28:00.000Z | 2022-03-01T07:29:21.000Z | cgen/hsm/__init__.py | xsession/chsm | 1c502897c8fce56bb48ad49de6d642f2bb66ff95 | [
"MIT"
] | 6 | 2020-10-25T19:56:59.000Z | 2022-03-24T05:00:10.000Z | cgen/hsm/__init__.py | xsession/chsm | 1c502897c8fce56bb48ad49de6d642f2bb66ff95 | [
"MIT"
] | 1 | 2021-05-27T07:01:28.000Z | 2021-05-27T07:01:28.000Z | from .sm import StateMachine | 28 | 28 | 0.857143 |
304a88acdc435541fe9055a0d50f8fa00ba1c3a3 | 651 | py | Python | Regular_Expressions_for_NW_Auto/re_Basics/re_Basics_3.py | yasser296/Python-Projects | eae3598e2d4faf08d9def92c8b417c2e7946c5f4 | [
"MIT"
] | null | null | null | Regular_Expressions_for_NW_Auto/re_Basics/re_Basics_3.py | yasser296/Python-Projects | eae3598e2d4faf08d9def92c8b417c2e7946c5f4 | [
"MIT"
] | null | null | null | Regular_Expressions_for_NW_Auto/re_Basics/re_Basics_3.py | yasser296/Python-Projects | eae3598e2d4faf08d9def92c8b417c2e7946c5f4 | [
"MIT"
] | null | null | null | import re
print( re.match('[a-z]+' , "configuration register is 0x2102").group() )
print( re.match('[a-z]+' , "configuration register is 0x2102").start() )
print( re.match('[a-z]+' , "configuration register is 0x2102").end() )
print( re.match('[a-z]+' , "configuration register is 0x2102").span() )
p... | 29.590909 | 108 | 0.631336 |
9e5eb933138b79d3fff9fb48e06815260a9c1d04 | 446 | py | Python | tests/test_run.py | prophile/bong | 568205c5977415003f740218aaf6a4ccff28c33e | [
"MIT"
] | null | null | null | tests/test_run.py | prophile/bong | 568205c5977415003f740218aaf6a4ccff28c33e | [
"MIT"
] | null | null | null | tests/test_run.py | prophile/bong | 568205c5977415003f740218aaf6a4ccff28c33e | [
"MIT"
] | 1 | 2018-03-05T17:16:50.000Z | 2018-03-05T17:16:50.000Z | from bong.settings import BongSettings
from bong.run import run
from unittest.mock import Mock
def test_run_length():
notify = Mock()
sleep = Mock()
run(BongSettings(time=40, message='bees'), sleep=sleep, notify=notify)
sleep.assert_called_with(40)
def test_notification():
notify = Mock()
sle... | 24.777778 | 74 | 0.710762 |
5631ec06cf1ab48489380ffc2bb415017053166f | 33,274 | py | Python | homeassistant/components/media_player/bluesound.py | sara0871/laughing--barnacle- | 70412fc0ba42ccfe446c0c62e327eceeda56a2ab | [
"Apache-2.0"
] | 2 | 2020-12-06T23:15:21.000Z | 2021-03-20T20:21:03.000Z | homeassistant/components/media_player/bluesound.py | sara0871/https-wakatime.com-android-studio | 5a15b2c036b332c17d5f6a06664378e9273d684f | [
"Apache-2.0"
] | 3 | 2021-09-08T03:06:43.000Z | 2022-03-12T00:56:04.000Z | homeassistant/components/media_player/bluesound.py | sara0871/https-wakatime.com-android-studio | 5a15b2c036b332c17d5f6a06664378e9273d684f | [
"Apache-2.0"
] | 1 | 2019-04-26T12:59:54.000Z | 2019-04-26T12:59:54.000Z | """
Support for Bluesound devices.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.bluesound/
"""
import asyncio
from asyncio.futures import CancelledError
from datetime import timedelta
import logging
import aiohttp
from aiohttp.client_exce... | 34.127179 | 78 | 0.58998 |
3e5d038aeed910d682689d04d010bef60fc3c383 | 11,188 | py | Python | tests/api/v1/test_users.py | AIica/Crypto-2020 | 8980fdd3c20651eb6fd4a66fa72c1f9099dc23d7 | [
"Apache-2.0"
] | 2 | 2019-06-19T07:11:28.000Z | 2019-06-21T05:30:07.000Z | tests/api/v1/test_users.py | AIica/Crypto-2020 | 8980fdd3c20651eb6fd4a66fa72c1f9099dc23d7 | [
"Apache-2.0"
] | null | null | null | tests/api/v1/test_users.py | AIica/Crypto-2020 | 8980fdd3c20651eb6fd4a66fa72c1f9099dc23d7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from CTFd.utils import set_config
from tests.helpers import *
def test_api_users_get_public():
"""Can a user get /api/v1/users if users are public"""
app = create_ctfd()
with app.app_context():
with app.test_client() as client:
set_config(... | 33.90303 | 83 | 0.58384 |
706442f2acd8f0f0293f8aebbb359c5fcbc010a2 | 4,422 | py | Python | scripts/reddit-retriever.py | nicolamelluso/graphbrain | c0740ab89df60d709ee2914beb5379619e4e1470 | [
"MIT"
] | 1 | 2021-04-24T04:52:31.000Z | 2021-04-24T04:52:31.000Z | scripts/reddit-retriever.py | nicolamelluso/graphbrain | c0740ab89df60d709ee2914beb5379619e4e1470 | [
"MIT"
] | null | null | null | scripts/reddit-retriever.py | nicolamelluso/graphbrain | c0740ab89df60d709ee2914beb5379619e4e1470 | [
"MIT"
] | 1 | 2020-12-23T11:20:43.000Z | 2020-12-23T11:20:43.000Z | # TODO: this is no longer woring due to recent Reddit API changes
import time
import datetime
import json
import argparse
import praw
class RedditRetriever(object):
def __init__(self, _subreddit, _outfile, _start_date, _end_date, step=3600):
self.r = praw.Reddit(site_name='graphbrain', user_agent='Graph... | 37.794872 | 105 | 0.553143 |
24a52e2de6eea876eddbf9c958866df7b41c00cd | 2,618 | py | Python | model-optimizer/mo/front/tf/common.py | jayabs2020/openvino | 67a82a040faaf66f109035acf7de6e4b7568bc08 | [
"Apache-2.0"
] | null | null | null | model-optimizer/mo/front/tf/common.py | jayabs2020/openvino | 67a82a040faaf66f109035acf7de6e4b7568bc08 | [
"Apache-2.0"
] | 19 | 2021-03-26T08:11:00.000Z | 2022-02-21T13:06:26.000Z | model-optimizer/mo/front/tf/common.py | jayabs2020/openvino | 67a82a040faaf66f109035acf7de6e4b7568bc08 | [
"Apache-2.0"
] | null | null | null | """
Copyright (C) 2018-2021 Intel Corporation
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 i... | 53.428571 | 119 | 0.652788 |
752e9db5ba5d909aad96d679a468b228942bd9b3 | 17,087 | py | Python | Lib/distutils/tests/test_sdist.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 33 | 2021-07-25T14:23:35.000Z | 2022-03-31T00:17:30.000Z | Lib/distutils/tests/test_sdist.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 50 | 2020-01-07T19:11:11.000Z | 2022-03-01T14:40:03.000Z | Lib/distutils/tests/test_sdist.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 8 | 2020-10-06T14:38:08.000Z | 2022-01-12T14:29:46.000Z | """Tests for distutils.command.sdist."""
import os
import tarfile
import unittest
import warnings
import zipfile
from os.path import join
from textwrap import dedent
from test.support import captured_stdout, run_unittest
from test.support.warnings_helper import check_warnings
try:
import zlib
ZLIB_SUPPORT = Tr... | 34.589069 | 78 | 0.590098 |
139111a984737ce607d3c5b79b759829893d2de0 | 205 | py | Python | examples/movies-data-web/app/viewmodels/movies.py | sunyunxian/flask-examples | 7ad53ce1d34354c22b7f1728218ab6a64058ccb4 | [
"Apache-2.0"
] | null | null | null | examples/movies-data-web/app/viewmodels/movies.py | sunyunxian/flask-examples | 7ad53ce1d34354c22b7f1728218ab6a64058ccb4 | [
"Apache-2.0"
] | null | null | null | examples/movies-data-web/app/viewmodels/movies.py | sunyunxian/flask-examples | 7ad53ce1d34354c22b7f1728218ab6a64058ccb4 | [
"Apache-2.0"
] | null | null | null |
class MoviesViewModels:
def __init__(self) -> None:
pass
def package_single(self, data, keyword):
returned = {
}
def package_collection(self, keyword):
pass | 15.769231 | 44 | 0.585366 |
01ae065a088cab248272528b50b763b9d419b96a | 20,121 | py | Python | cigarco/mapping.py | aganezov/B2_CIGARCO | d01a77008dfe16d039308fe266036980daa31570 | [
"MIT"
] | null | null | null | cigarco/mapping.py | aganezov/B2_CIGARCO | d01a77008dfe16d039308fe266036980daa31570 | [
"MIT"
] | null | null | null | cigarco/mapping.py | aganezov/B2_CIGARCO | d01a77008dfe16d039308fe266036980daa31570 | [
"MIT"
] | null | null | null | import bisect
from dataclasses import dataclass, field
from functools import lru_cache
from itertools import accumulate
from typing import List, Tuple, Set, Optional, Dict
from cigarco.cigar_utils import is_valid_cigar, parse_cigar, TARGET_CONSUMING_OPERATIONS, QUERY_CONSUMING_OPERATIONS
@dataclass(frozen=True, eq=T... | 54.528455 | 187 | 0.701009 |
9e041e90580f0bc6179dc9e3834c50735ff3a40d | 20,029 | py | Python | open_spiel/python/egt/visualization.py | awesome-archive/open_spiel | 4cff68f4f305ab8d158c3721648f8286b89d1546 | [
"Apache-2.0"
] | 1 | 2019-08-30T01:56:30.000Z | 2019-08-30T01:56:30.000Z | open_spiel/python/egt/visualization.py | awesome-archive/open_spiel | 4cff68f4f305ab8d158c3721648f8286b89d1546 | [
"Apache-2.0"
] | null | null | null | open_spiel/python/egt/visualization.py | awesome-archive/open_spiel | 4cff68f4f305ab8d158c3721648f8286b89d1546 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 DeepMind Technologies Ltd. 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 appl... | 33.160596 | 80 | 0.61396 |
492ed9b98a31ccd2e738a01f499b9f4747676a35 | 11,725 | py | Python | experiments/bst_dataset.py | shengwenbo/CopyNet | 013508d10ad5ed09514b233a75e7f41ce7f8fa94 | [
"MIT"
] | 193 | 2016-09-19T02:55:00.000Z | 2022-03-10T13:43:50.000Z | experiments/bst_dataset.py | shengwenbo/CopyNet | 013508d10ad5ed09514b233a75e7f41ce7f8fa94 | [
"MIT"
] | 6 | 2016-11-25T03:38:23.000Z | 2019-03-30T06:11:31.000Z | experiments/bst_dataset.py | shengwenbo/CopyNet | 013508d10ad5ed09514b233a75e7f41ce7f8fa94 | [
"MIT"
] | 77 | 2016-10-14T10:08:44.000Z | 2021-03-11T05:01:27.000Z | # coding=utf-8
__author__ = 'jiataogu'
from emolga.dataset.build_dataset import deserialize_from_file, serialize_to_file
import numpy.random as n_rng
class BSTnode(object):
"""
Representation of a node in a binary search tree.
Has a left child, right child, and key value, and stores its subtree size.
"""
def ... | 32.751397 | 130 | 0.526994 |
de6841f12ec10aa5558a9656001452c965449fef | 2,065 | bzl | Python | test/starlark_tests/macos_ui_test_tests.bzl | LaudateCorpus1/rules_apple | f8b1da53a4b53af9c655a17a4e0cb86959c932d8 | [
"Apache-2.0"
] | 2 | 2020-07-01T20:21:48.000Z | 2021-04-28T21:28:49.000Z | test/starlark_tests/macos_ui_test_tests.bzl | LaudateCorpus1/rules_apple | f8b1da53a4b53af9c655a17a4e0cb86959c932d8 | [
"Apache-2.0"
] | null | null | null | test/starlark_tests/macos_ui_test_tests.bzl | LaudateCorpus1/rules_apple | f8b1da53a4b53af9c655a17a4e0cb86959c932d8 | [
"Apache-2.0"
] | 2 | 2021-06-03T10:06:19.000Z | 2022-02-02T14:23:53.000Z | # Copyright 2019 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 32.777778 | 85 | 0.638257 |
034cfc5bb888e2dbbe7b9bb9421ae5a45836ec31 | 8,942 | py | Python | shims/qpid-proton-python/src/amqp_types_test/Sender.py | gemmellr/qpid-interop-test | d6434c645637e3ecf2adab10baef7d1c51486746 | [
"Apache-2.0"
] | null | null | null | shims/qpid-proton-python/src/amqp_types_test/Sender.py | gemmellr/qpid-interop-test | d6434c645637e3ecf2adab10baef7d1c51486746 | [
"Apache-2.0"
] | null | null | null | shims/qpid-proton-python/src/amqp_types_test/Sender.py | gemmellr/qpid-interop-test | d6434c645637e3ecf2adab10baef7d1c51486746 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
AMQP type test sender shim for qpid-interop-test
"""
#
# 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 f... | 38.709957 | 119 | 0.634981 |
945b04381e91a803c439ea317fd8a91a92485950 | 360 | py | Python | host1/webapp1/serializers.py | muzudho/django-practice | 1899b165ef4b04478ced87b784cda27e2a16ecf3 | [
"MIT"
] | null | null | null | host1/webapp1/serializers.py | muzudho/django-practice | 1899b165ef4b04478ced87b784cda27e2a16ecf3 | [
"MIT"
] | null | null | null | host1/webapp1/serializers.py | muzudho/django-practice | 1899b165ef4b04478ced87b784cda27e2a16ecf3 | [
"MIT"
] | null | null | null | # from django.contrib.auth.admin import User
from django.contrib.auth.models import User
from django_grpc_framework import proto_serializers
import account_pb2
class UserProtoSerializer(proto_serializers.ModelProtoSerializer):
class Meta:
model = User
proto_class = account_pb2.User
fields ... | 30 | 66 | 0.75 |
1a29d148d9e311fc7efcebf8eea7ddc781d5ed53 | 36,168 | py | Python | test/run_tests.py | smitlimbani/vpp | d5403ac610c985acc780e625b4328d001efd0e63 | [
"Apache-2.0"
] | 1 | 2019-10-10T17:42:08.000Z | 2019-10-10T17:42:08.000Z | test/run_tests.py | smitlimbani/vpp | d5403ac610c985acc780e625b4328d001efd0e63 | [
"Apache-2.0"
] | null | null | null | test/run_tests.py | smitlimbani/vpp | d5403ac610c985acc780e625b4328d001efd0e63 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
import shutil
import os
import fnmatch
import unittest
import argparse
import time
import threading
import signal
import psutil
import re
import multiprocessing
from multiprocessing import Process, Pipe, cpu_count
from multiprocessing.queues import Queue
from multiprocessing.managers ... | 39.832599 | 79 | 0.584025 |
aca4b77137128f0ceef93bbff2a3f68b4ee40681 | 2,434 | py | Python | dlfairness/original_code/DomainBiasMitigation/compute_bias_nway.py | lin-tan/fairness-variance | 7f6aee23160707ffe78f429e5d960022ea1c9fe4 | [
"BSD-3-Clause"
] | null | null | null | dlfairness/original_code/DomainBiasMitigation/compute_bias_nway.py | lin-tan/fairness-variance | 7f6aee23160707ffe78f429e5d960022ea1c9fe4 | [
"BSD-3-Clause"
] | null | null | null | dlfairness/original_code/DomainBiasMitigation/compute_bias_nway.py | lin-tan/fairness-variance | 7f6aee23160707ffe78f429e5d960022ea1c9fe4 | [
"BSD-3-Clause"
] | null | null | null | import json
import pickle
import numpy as np
import argparse
from pathlib import Path
GRAYSCALE = 0
COLOR = 1
parser = argparse.ArgumentParser()
parser.add_argument('--parent_folder', type=str)
parser.add_argument('--record_name', type=str)
parser.add_argument('--output_key', type=str, default='outputs')
args = parse... | 34.771429 | 117 | 0.724322 |
b98118fa6b1b7dae4406221ab9330bf37cefab57 | 57,250 | py | Python | infoblox_netmri/api/broker/v2_9_0/discovery_hint_broker.py | infobloxopen/infoblox_netmri | aa1c744df7e439dbe163bb9edd165e4e85a9771b | [
"Apache-2.0"
] | 12 | 2016-02-19T12:37:54.000Z | 2022-03-04T20:11:08.000Z | infoblox_netmri/api/broker/v2_9_0/discovery_hint_broker.py | infobloxopen/infoblox_netmri | aa1c744df7e439dbe163bb9edd165e4e85a9771b | [
"Apache-2.0"
] | 18 | 2015-11-12T18:37:00.000Z | 2021-05-19T07:59:55.000Z | infoblox_netmri/api/broker/v2_9_0/discovery_hint_broker.py | infobloxopen/infoblox_netmri | aa1c744df7e439dbe163bb9edd165e4e85a9771b | [
"Apache-2.0"
] | 18 | 2016-01-07T12:04:34.000Z | 2022-03-31T11:05:41.000Z | from ..broker import Broker
class DiscoveryHintBroker(Broker):
controller = "discovery_hints"
def index(self, **kwargs):
"""Lists the available discovery hints. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this met... | 58.959835 | 791 | 0.638777 |
d21e42616236376190f697d9debf9074d5c773d7 | 877 | py | Python | profiles_project/urls.py | JBG0000/profiles-rest-api | f3d4c6a4b2df0da5401ec48d8c068dac08f057cb | [
"MIT"
] | null | null | null | profiles_project/urls.py | JBG0000/profiles-rest-api | f3d4c6a4b2df0da5401ec48d8c068dac08f057cb | [
"MIT"
] | null | null | null | profiles_project/urls.py | JBG0000/profiles-rest-api | f3d4c6a4b2df0da5401ec48d8c068dac08f057cb | [
"MIT"
] | null | null | null | """profiles_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Cl... | 38.130435 | 77 | 0.708096 |
b2ea6d0779757f9f2a94fbcf4fb048d321404281 | 442 | py | Python | assignments/python3/hello/hello.py | jeremybergen/csci000-astudent | ab14521a476103ce60f5d8ef61095a5c712a64d4 | [
"MIT"
] | 2 | 2020-08-19T15:35:20.000Z | 2021-08-31T19:35:43.000Z | assignments/python3/hello/hello.py | jeremybergen/csci000-astudent | ab14521a476103ce60f5d8ef61095a5c712a64d4 | [
"MIT"
] | null | null | null | assignments/python3/hello/hello.py | jeremybergen/csci000-astudent | ab14521a476103ce60f5d8ef61095a5c712a64d4 | [
"MIT"
] | 18 | 2020-08-17T03:54:40.000Z | 2021-10-12T08:06:23.000Z | #!/usr/bin/env python3
# Kattis - hello problem
import sys
def answer():
return "Hello World!"
# not used!
def greet(name):
ans = f'Hello {name}!'
return ans
def solve():
print(answer())
def test():
assert answer() == "Hello World!"
print('all test cases passed...')
if __name__ == "__main... | 17 | 51 | 0.567873 |
218ed1ea2e511e45b1aa8df8ccb8fa7b553ec6df | 6,272 | py | Python | xarray/tests/test_plugins.py | jhamman/xarray-test-docs | c54123772817875678ec7ad769e6d4d6612aeb92 | [
"Apache-2.0"
] | 1 | 2022-02-18T10:14:38.000Z | 2022-02-18T10:14:38.000Z | xarray/tests/test_plugins.py | jhamman/xarray-test-docs | c54123772817875678ec7ad769e6d4d6612aeb92 | [
"Apache-2.0"
] | 3 | 2022-03-22T20:52:33.000Z | 2022-03-22T20:52:36.000Z | xarray/tests/test_plugins.py | jhamman/xarray-test-docs | c54123772817875678ec7ad769e6d4d6612aeb92 | [
"Apache-2.0"
] | null | null | null | from importlib.metadata import EntryPoint
from unittest import mock
import pytest
from xarray.backends import common, plugins
importlib_metadata_mock = "importlib.metadata"
class DummyBackendEntrypointArgs(common.BackendEntrypoint):
def open_dataset(filename_or_obj, *args):
pass
class DummyBackendEnt... | 33.72043 | 88 | 0.722417 |
a2d9a9c90c3346a98f14ce1bb809553940ade3ed | 10,976 | py | Python | plotly/graph_objs/box/hoverlabel/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | 6 | 2019-05-03T02:12:04.000Z | 2020-03-01T06:33:21.000Z | plotly/graph_objs/box/hoverlabel/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | null | null | null | plotly/graph_objs/box/hoverlabel/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | 5 | 2019-05-18T16:50:11.000Z | 2021-07-06T21:14:36.000Z |
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff000... | 34.086957 | 82 | 0.562773 |
92bbb45eafbb483591507719cfc0cddc6c802e3a | 317 | py | Python | examples/tutorials/django/blog/urls.py | psy-repos-rust/vagga | 07d8b32c0656f17427d8b4399f3f36dfbf21ab88 | [
"MIT"
] | 1,974 | 2015-01-05T01:45:10.000Z | 2022-03-28T14:35:52.000Z | examples/tutorials/django/blog/urls.py | psy-repos-rust/vagga | 07d8b32c0656f17427d8b4399f3f36dfbf21ab88 | [
"MIT"
] | 536 | 2015-01-06T20:33:40.000Z | 2022-03-03T16:22:21.000Z | examples/tutorials/django/blog/urls.py | psy-repos-rust/vagga | 07d8b32c0656f17427d8b4399f3f36dfbf21ab88 | [
"MIT"
] | 132 | 2015-02-10T11:03:30.000Z | 2022-01-28T12:59:44.000Z | from django.conf.urls import url
from django.views.decorators.cache import cache_page
from . import views
cache_15m = cache_page(60 * 15)
urlpatterns = [
url(r'^$', views.ArticleList.as_view(), name='article_list'),
url(r'^(?P<pk>\d+?)$', cache_15m(views.ArticleDetail.as_view()), name='article_detail'),
]
| 28.818182 | 92 | 0.709779 |
be2b32d00fc48de3c8f3e57f5c1086d089a53b9c | 6,096 | py | Python | bv2cid.py | fossabot/Bilibili_BV_Converter | 48aabddeb6dd66838db2d2a765cea8de497e9fd1 | [
"MIT"
] | 4 | 2020-10-15T01:16:59.000Z | 2021-02-26T02:47:16.000Z | bv2cid.py | fossabot/Bilibili_BV_Converter | 48aabddeb6dd66838db2d2a765cea8de497e9fd1 | [
"MIT"
] | 3 | 2021-02-23T03:49:31.000Z | 2022-01-06T10:08:10.000Z | bv2cid.py | fossabot/Bilibili_BV_Converter | 48aabddeb6dd66838db2d2a765cea8de497e9fd1 | [
"MIT"
] | 6 | 2020-11-02T23:20:01.000Z | 2022-01-18T15:16:25.000Z | import requests
import sys
import locale
headers = {
'Connection': 'keep-alive',
'Cache-Control': 'max-age=0',
'DNT': '1',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4083.0 Safari/537.36 Edg/82.... | 33.866667 | 155 | 0.56332 |
75254bec863a910507f0e5f9e1d0b3fd7fbbdb7c | 2,963 | py | Python | src/hypothesis_faker/utilities.py | dycw/hypothesis-faker | dc63870c0834531cc8029d383e0d44dca0257090 | [
"MIT"
] | 1 | 2021-04-30T18:09:41.000Z | 2021-04-30T18:09:41.000Z | src/hypothesis_faker/utilities.py | dycw/hypothesis-faker | dc63870c0834531cc8029d383e0d44dca0257090 | [
"MIT"
] | null | null | null | src/hypothesis_faker/utilities.py | dycw/hypothesis-faker | dc63870c0834531cc8029d383e0d44dca0257090 | [
"MIT"
] | null | null | null | from __future__ import annotations
import re
from bisect import bisect
from functools import reduce
from re import sub
from string import ascii_lowercase
from typing import Callable
from typing import Iterable
from typing import cast
from hypothesis.strategies import SearchStrategy
from hypothesis.strategies import c... | 31.860215 | 74 | 0.652717 |
f026a34bb023915faa40ec6216dec07ae6a831e2 | 701 | py | Python | 001383WiseplatMarathPyBegin/day5_my1_IfElse.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | 001383WiseplatMarathPyBegin/day5_my1_IfElse.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | 001383WiseplatMarathPyBegin/day5_my1_IfElse.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | f = '10'
if f == str(10):
print("f==10")
h = 10
if h == int('10'):
print("h=='10'")
j = "2.53"
print(float(j) + 7.5)
age = int(input("Введите Ваш возраст: "))
if age == 5:
print("5!")
elif age == 6:
print("6!")
elif age == 7:
print("7!")
if age < 100:
print("age<100")
else:
print("Вам бол... | 17.097561 | 52 | 0.529244 |
5ccfe57a7b36f5c92c3a6ab774521b4c16fe408f | 865 | py | Python | 3_sentence_corpus_cleaning.py | yerlandinata/building-semantic-corpus-crowdsourcing-and-machine-learning | e50519b80c30318e259e544fa1813fd003dd94c3 | [
"MIT"
] | 1 | 2020-04-16T02:35:11.000Z | 2020-04-16T02:35:11.000Z | 3_sentence_corpus_cleaning.py | yerlandinata/building-semantic-corpus-crowdsourcing-and-machine-learning | e50519b80c30318e259e544fa1813fd003dd94c3 | [
"MIT"
] | null | null | null | 3_sentence_corpus_cleaning.py | yerlandinata/building-semantic-corpus-crowdsourcing-and-machine-learning | e50519b80c30318e259e544fa1813fd003dd94c3 | [
"MIT"
] | null | null | null | import datetime
from nltk.tokenize import word_tokenize
from codes.cleaner import is_valid_word
from codes.utils import pipe
src = open(input('input file: '), 'r')
dest = open(input('output file: '), 'w')
start_time = datetime.datetime.now()
i = 0
while True:
line = src.readline()
if line == '':
brea... | 27.903226 | 70 | 0.60578 |
6b953eefe3b4e0bfa4f98f8fad0da03fa47d0688 | 78,167 | py | Python | libs/z3/scripts/update_api.py | vananhnt/corana | 882414dcb5b5a0460bf7a6c498a976195ba0e44e | [
"MIT"
] | 55 | 2015-08-15T22:37:02.000Z | 2022-03-27T03:08:02.000Z | scripts/update_api.py | PhucVH888/z3 | f7402f8b6134e366a2060571c5176c0e6ea34ddc | [
"MIT"
] | 10 | 2015-08-27T05:01:14.000Z | 2020-06-29T03:53:54.000Z | scripts/update_api.py | PhucVH888/z3 | f7402f8b6134e366a2060571c5176c0e6ea34ddc | [
"MIT"
] | 18 | 2015-08-11T08:37:41.000Z | 2021-09-16T14:24:04.000Z | #!/usr/bin/env python
############################################
# Copyright (c) 2012 Microsoft Corporation
#
# Scripts for generating Makefiles and Visual
# Studio project files.
#
# Author: Leonardo de Moura (leonardo)
############################################
"""
This script generates the ``api_log_macros.h``,
... | 39.39869 | 310 | 0.535546 |
bf4ba273bad55c09bcd1cee04a5a32d8d558f4c3 | 661 | py | Python | src/quicknlp/data/__init__.py | jalajthanaki/quick-nlp | 861a54c9e30de076a2316cb6712d934de4058cc5 | [
"MIT"
] | 287 | 2018-04-10T10:58:09.000Z | 2022-03-22T02:05:40.000Z | src/quicknlp/data/__init__.py | scutcyr/quick-nlp | 861a54c9e30de076a2316cb6712d934de4058cc5 | [
"MIT"
] | 1 | 2018-07-03T17:10:03.000Z | 2018-07-03T17:10:03.000Z | src/quicknlp/data/__init__.py | scutcyr/quick-nlp | 861a54c9e30de076a2316cb6712d934de4058cc5 | [
"MIT"
] | 51 | 2018-04-10T11:38:02.000Z | 2021-10-17T06:23:43.000Z | from .data_loaders import DialogueDataLoader
from .datasets import DialogueDataset, HierarchicalDatasetFromDataFrame, HierarchicalDatasetFromFiles, \
TabularDatasetFromDataFrame, TabularDatasetFromFiles, DialDataset, HREDDataset, HREDConstraintsDataset
from .dialogue_analysis import DialogueAnalysis
from .dialogue_... | 66.1 | 106 | 0.8941 |
efa4d54f271b33da954bc3325e62fd109630591f | 9,745 | py | Python | stdplugins/glink.py | aashiq075/PepeBot | 5f40f4316c84ec3875bcbcd476e10448f9214f31 | [
"Apache-2.0"
] | null | null | null | stdplugins/glink.py | aashiq075/PepeBot | 5f40f4316c84ec3875bcbcd476e10448f9214f31 | [
"Apache-2.0"
] | null | null | null | stdplugins/glink.py | aashiq075/PepeBot | 5f40f4316c84ec3875bcbcd476e10448f9214f31 | [
"Apache-2.0"
] | null | null | null | """Upload link to gDrive
Syntax:
.glink"""
import asyncio
import math
import os
import time
from pySmartDL import SmartDL
from telethon import events
from datetime import datetime
from googleapiclient.discovery import build
from apiclient.http import MediaFileUpload
from oauth2client.client import OAuth2WebServerFlow
f... | 42.00431 | 189 | 0.621139 |
e0eeecc70172c3fea1d42098172b2cd28c96765f | 162,091 | py | Python | jira/client.py | shotgunsoftware/jira | 8837db4c37a17614a903bbca3c9c477ad2c85ad6 | [
"BSD-2-Clause"
] | 1 | 2022-02-02T16:39:26.000Z | 2022-02-02T16:39:26.000Z | jira/client.py | shotgunsoftware/jira | 8837db4c37a17614a903bbca3c9c477ad2c85ad6 | [
"BSD-2-Clause"
] | 1 | 2019-10-21T13:05:50.000Z | 2019-10-21T13:05:50.000Z | jira/client.py | shotgunsoftware/jira | 8837db4c37a17614a903bbca3c9c477ad2c85ad6 | [
"BSD-2-Clause"
] | 1 | 2021-10-03T14:47:44.000Z | 2021-10-03T14:47:44.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function
from requests.auth import AuthBase
"""
This module implements a friendly (well, friendlier) interface between the raw JSON
responses from JIRA and the Resource/dict abstractions provided by this lib... | 40.341215 | 154 | 0.606776 |
4a4fad0646345b84c6233227e7a2b39a98952ac3 | 9,024 | py | Python | mosaic/infra/modeling.py | Reflorescit/InferTextGen | 277626fb9e34088a76917b899651ea68a5952e35 | [
"Apache-2.0"
] | null | null | null | mosaic/infra/modeling.py | Reflorescit/InferTextGen | 277626fb9e34088a76917b899651ea68a5952e35 | [
"Apache-2.0"
] | null | null | null | mosaic/infra/modeling.py | Reflorescit/InferTextGen | 277626fb9e34088a76917b899651ea68a5952e35 | [
"Apache-2.0"
] | null | null | null | # Importing stock libraries
import numpy as np
import pandas as pd
import torch
from torch.nn import parallel
import torch.nn.functional as F
from torch import nn
from torch.utils.data import Dataset, DataLoader, RandomSampler, SequentialSampler
import os
import pdb
# Importing the T5 modules from huggingface/transfo... | 38.729614 | 114 | 0.580563 |
f9795d912f19f4f72e27ba7d4b59cdd860cde90b | 3,451 | py | Python | mys/pygments/pygments/lexers/solidity.py | eerimoq/sython | 90937bf44b798b9c1ae0d18e31e11e95967b46c6 | [
"MIT"
] | 83 | 2020-08-18T18:48:46.000Z | 2021-01-01T17:00:45.000Z | mys/pygments/pygments/lexers/solidity.py | eerimoq/sython | 90937bf44b798b9c1ae0d18e31e11e95967b46c6 | [
"MIT"
] | 31 | 2021-01-05T00:32:36.000Z | 2022-02-23T13:34:33.000Z | mys/pygments/pygments/lexers/solidity.py | eerimoq/sython | 90937bf44b798b9c1ae0d18e31e11e95967b46c6 | [
"MIT"
] | 7 | 2021-01-03T11:53:03.000Z | 2022-02-22T17:49:42.000Z | """
pygments.lexers.solidity
~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for Solidity.
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer
from pygments.lexer import bygroups
from pygments.lexer import... | 33.833333 | 85 | 0.50681 |
7aef678d16facd97dd1c5674d2ae98c700f51d80 | 3,985 | py | Python | airbyte-integrations/bases/base-normalization/normalization/transform_catalog/transform.py | gingeard/airbyte | cf45cc6be27257abc832432d9aa0d32742a96d19 | [
"MIT"
] | null | null | null | airbyte-integrations/bases/base-normalization/normalization/transform_catalog/transform.py | gingeard/airbyte | cf45cc6be27257abc832432d9aa0d32742a96d19 | [
"MIT"
] | 1 | 2021-04-19T17:27:34.000Z | 2021-04-19T17:30:34.000Z | airbyte-integrations/bases/base-normalization/normalization/transform_catalog/transform.py | gingeard/airbyte | cf45cc6be27257abc832432d9aa0d32742a96d19 | [
"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, publish, distr... | 39.068627 | 130 | 0.716186 |
86eb811fbe429b3e76bff4a31eb44ca1b9b08e78 | 1,508 | py | Python | scipy/io/matlab/mio5_params.py | AndLogiu/scipy | 3f05efb9498e29f4e735aa7e0220139a8d8c8773 | [
"BSD-3-Clause"
] | 1 | 2021-12-12T09:35:08.000Z | 2021-12-12T09:35:08.000Z | scipy/io/matlab/mio5_params.py | caos21/scipy | 3f05efb9498e29f4e735aa7e0220139a8d8c8773 | [
"BSD-3-Clause"
] | null | null | null | scipy/io/matlab/mio5_params.py | caos21/scipy | 3f05efb9498e29f4e735aa7e0220139a8d8c8773 | [
"BSD-3-Clause"
] | null | null | null | # This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.io.matlab` namespace for importing the functions
# included below.
import warnings
from . import _mio5_params
__all__ = [ # noqa: F822
'MDTYPES', 'MatlabFunction', 'MatlabObject', 'MatlabOpaque',
'NP_TO_MTYPES', 'N... | 39.684211 | 79 | 0.688329 |
8d0ed513d52acefa441eba6a7c0c9fe45aae0061 | 1,475 | py | Python | .history/Test_20190122142843.py | zhenglitao1/piCar | b8f77f28ea61159c55746b0a3474ebfc3c66b6ba | [
"Apache-2.0"
] | null | null | null | .history/Test_20190122142843.py | zhenglitao1/piCar | b8f77f28ea61159c55746b0a3474ebfc3c66b6ba | [
"Apache-2.0"
] | null | null | null | .history/Test_20190122142843.py | zhenglitao1/piCar | b8f77f28ea61159c55746b0a3474ebfc3c66b6ba | [
"Apache-2.0"
] | null | null | null | import socket
def getLocalIp():
'''Get the local ip'''
try:
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
s.connect(('8.8.8.8',80))
ip=s.getsockname()[0]
finally:
s.close()
return ip
def main():
'''The main thread, control the motor'''
host=getLocalIp()
... | 28.365385 | 62 | 0.510508 |
ae845abf050dc4cd7d203965dddb4b2032adc9e2 | 7,304 | py | Python | yt/frontends/sdf/io.py | lconaboy/yt | d97c3cf6d7911cd12b8337784d3232068ebc59f6 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/frontends/sdf/io.py | lconaboy/yt | d97c3cf6d7911cd12b8337784d3232068ebc59f6 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/frontends/sdf/io.py | lconaboy/yt | d97c3cf6d7911cd12b8337784d3232068ebc59f6 | [
"BSD-3-Clause-Clear"
] | null | null | null | import numpy as np
from yt.funcs import mylog
from yt.utilities.io_handler import BaseParticleIOHandler
class IOHandlerSDF(BaseParticleIOHandler):
_dataset_type = "sdf_particles"
@property
def _handle(self):
return self.ds.sdf_container
def _read_fluid_selection(self, chunks, selector, fiel... | 37.84456 | 88 | 0.525876 |
87f8ee093002789dd1c76a60ab1bb919d52e1489 | 798 | py | Python | brams_jams/song_manager/tests/testSongViewset.py | delainewendling/brams-jams | b57da0424bbaeb780f753b7648cafd34b7fc6573 | [
"MIT"
] | null | null | null | brams_jams/song_manager/tests/testSongViewset.py | delainewendling/brams-jams | b57da0424bbaeb780f753b7648cafd34b7fc6573 | [
"MIT"
] | null | null | null | brams_jams/song_manager/tests/testSongViewset.py | delainewendling/brams-jams | b57da0424bbaeb780f753b7648cafd34b7fc6573 | [
"MIT"
] | null | null | null | from django.test import TestCase
from model_mommy import mommy
from song_manager.models import Song
from rest_framework.test import APIClient
class TestGradeDataExport(TestCase):
@classmethod
def setUpTestData(cls):
cls.user = mommy.make('song_manager.User', date_deleted=None)
def setUp(self):
... | 27.517241 | 69 | 0.662907 |
a5399f46f6ba1eedc770ec86750e253867717fd4 | 9,396 | py | Python | mrcnn/config.py | Andrew-M-Cox/Mask_RCNN | 9e0249de1c5087ab267fe48e1f9ce698b4d7b4c4 | [
"MIT"
] | null | null | null | mrcnn/config.py | Andrew-M-Cox/Mask_RCNN | 9e0249de1c5087ab267fe48e1f9ce698b4d7b4c4 | [
"MIT"
] | null | null | null | mrcnn/config.py | Andrew-M-Cox/Mask_RCNN | 9e0249de1c5087ab267fe48e1f9ce698b4d7b4c4 | [
"MIT"
] | null | null | null | """
Mask R-CNN
Base Configurations class.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import numpy as np
# Base Configuration Class
# Don't use this class directly. Instead, sub-class it and override
# the configurations you need to chan... | 39.64557 | 80 | 0.689229 |
38d6dea1328e6f1569171aaac959c7ca9bff439d | 38,315 | py | Python | python/ray/tune/ray_trial_executor.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 1 | 2022-03-07T06:40:06.000Z | 2022-03-07T06:40:06.000Z | python/ray/tune/ray_trial_executor.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 29 | 2021-11-24T00:50:07.000Z | 2022-03-19T07:11:36.000Z | python/ray/tune/ray_trial_executor.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import copy
import inspect
import random
from collections import deque
from enum import Enum
from functools import partial
import logging
import os
import time
import traceback
from contextlib import contextmanager
from typing import (
Callable,
Dict,
Iterable,
List,
Optional,
Se... | 39.745851 | 88 | 0.589482 |
7b5d495ff2e638157c4e7e1c0ce79a8bc81eb4bf | 2,196 | py | Python | src/helper/csv_from_xmls.py | ymlsam/deepgaau-detector | 3f6d8195b4b1857bc1317035d999e9bca226ce7c | [
"MIT"
] | null | null | null | src/helper/csv_from_xmls.py | ymlsam/deepgaau-detector | 3f6d8195b4b1857bc1317035d999e9bca226ce7c | [
"MIT"
] | null | null | null | src/helper/csv_from_xmls.py | ymlsam/deepgaau-detector | 3f6d8195b4b1857bc1317035d999e9bca226ce7c | [
"MIT"
] | null | null | null | import argparse
import glob
import os
import pandas as pd
from typing import Optional
from xml.etree import ElementTree
def csv_from_df(in_dir: str, sub_dir: str, df: pd.DataFrame) -> None:
df.to_csv(os.path.join(in_dir, sub_dir, '_' + sub_dir + '.csv'), index=None)
def csv_from_xmls(in_dir: str) -> None:
... | 29.28 | 111 | 0.589709 |
5688402972a155eccdda8b8757367cacd6996928 | 584 | py | Python | lecture/migrations/0004_evaluation.py | ysnayal17/Virtual-Classroom | 9467c4045c4cf0523d5a34ada2d588543698734d | [
"MIT"
] | 14 | 2019-03-23T23:15:21.000Z | 2021-09-20T04:46:57.000Z | lecture/migrations/0004_evaluation.py | ysnayal17/Virtual-Classroom | 9467c4045c4cf0523d5a34ada2d588543698734d | [
"MIT"
] | 2 | 2019-05-02T06:38:28.000Z | 2019-05-02T06:40:38.000Z | lecture/migrations/0004_evaluation.py | ysnayal17/Virtual-Classroom | 9467c4045c4cf0523d5a34ada2d588543698734d | [
"MIT"
] | 12 | 2019-10-25T19:57:39.000Z | 2022-01-31T12:38:51.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2018-09-18 14:52
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lecture', '0003_auto_20180915_0124'),
]
operations = [
migrations.CreateMode... | 25.391304 | 114 | 0.599315 |
c55508867d07f49ce05dfe47b8eb2696397b8732 | 22,373 | py | Python | synapse/storage/databases/main/deviceinbox.py | warricksothr/synapse | 1de26b346796ec8d6b51b4395017f8107f640c47 | [
"Apache-2.0"
] | 7 | 2020-07-03T13:51:31.000Z | 2022-03-10T01:26:18.000Z | synapse/storage/databases/main/deviceinbox.py | warricksothr/synapse | 1de26b346796ec8d6b51b4395017f8107f640c47 | [
"Apache-2.0"
] | 69 | 2019-09-09T13:54:30.000Z | 2022-03-23T10:45:15.000Z | synapse/storage/databases/main/deviceinbox.py | warricksothr/synapse | 1de26b346796ec8d6b51b4395017f8107f640c47 | [
"Apache-2.0"
] | 7 | 2020-04-24T17:04:40.000Z | 2021-07-29T23:06:25.000Z | # Copyright 2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 38.244444 | 90 | 0.596344 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.