hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ff877ef00a7d3fd2293367f067208ba630685134 | 635 | py | Python | utils/views.py | runnily/Style-transfer-django | 75dbc049ea7c357b94ec2be599a06bda9f491fac | [
"MIT"
] | 1 | 2021-02-08T21:38:13.000Z | 2021-02-08T21:38:13.000Z | utils/views.py | runnily/Style-transfer-django | 75dbc049ea7c357b94ec2be599a06bda9f491fac | [
"MIT"
] | 2 | 2020-10-11T13:13:41.000Z | 2021-01-21T23:46:34.000Z | utils/views.py | runnily/Style-Transfer-Django | 75dbc049ea7c357b94ec2be599a06bda9f491fac | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views import View
from .style_transfer import Neural
# Create your views here.
class resultView(View):
template_name = "utils/result.html"
def get(self, request , *args, **kwargs):
n = Neural(alpha=request.session.get('alpha_choice'), beta=request.session... | 52.916667 | 120 | 0.708661 |
ff879ed9c4fd1439285337063ccf98efaf7664ff | 1,478 | py | Python | python_legacy/examples/multiple_inheritance.py | garred/only_fighters | 55c3cc06884f3226d75a800e1ee79afd2c23aa8b | [
"CC-BY-3.0",
"CC0-1.0"
] | null | null | null | python_legacy/examples/multiple_inheritance.py | garred/only_fighters | 55c3cc06884f3226d75a800e1ee79afd2c23aa8b | [
"CC-BY-3.0",
"CC0-1.0"
] | null | null | null | python_legacy/examples/multiple_inheritance.py | garred/only_fighters | 55c3cc06884f3226d75a800e1ee79afd2c23aa8b | [
"CC-BY-3.0",
"CC0-1.0"
] | null | null | null | '''Exercices with multiple inheritance.'''
class First(object):
def __init__(self):
super(First, self).__init__()
print("first")
class Second(object):
def __init__(self):
super(Second, self).__init__()
print("second")
class Third(First, Second):
def __init__(self):
super(Third, self).__init... | 17.388235 | 42 | 0.551421 |
ff8830953837740a131841a15ed5ff3d0423c199 | 126 | py | Python | tartangan/utils/kubeflow.py | awentzonline/tartangan | 2d36a81fa0ae91fe6b9b4e1f26763285630837fb | [
"MIT"
] | null | null | null | tartangan/utils/kubeflow.py | awentzonline/tartangan | 2d36a81fa0ae91fe6b9b4e1f26763285630837fb | [
"MIT"
] | null | null | null | tartangan/utils/kubeflow.py | awentzonline/tartangan | 2d36a81fa0ae91fe6b9b4e1f26763285630837fb | [
"MIT"
] | null | null | null | def key_to_kf_name(k):
"""Convert a name to something Kubeflow likes."""
k = k.replace('_', '-').lower()
return k
| 25.2 | 53 | 0.603175 |
ff8894c82d39f0908c47f64172cc196a9f974971 | 2,147 | py | Python | src/perspective.py | DougTrajano/olid-br | d78cfe189703b3af4c6ecc7444e8713b76c8e52f | [
"Apache-2.0"
] | 2 | 2022-01-24T02:22:21.000Z | 2022-01-24T02:22:23.000Z | src/perspective.py | DougTrajano/olid-br | d78cfe189703b3af4c6ecc7444e8713b76c8e52f | [
"Apache-2.0"
] | 1 | 2022-03-14T03:08:41.000Z | 2022-03-14T03:08:41.000Z | src/perspective.py | DougTrajano/olid-br | d78cfe189703b3af4c6ecc7444e8713b76c8e52f | [
"Apache-2.0"
] | null | null | null | import time
import logging
from retrying import retry
from typing import Dict
from googleapiclient import discovery
_logger = logging.getLogger()
class PerspectiveAPI(object):
def __init__(self, apikey: str, wait_time: float = 0.1):
"""
Initialize the Perspective API client.
Parameters:
... | 34.079365 | 105 | 0.582673 |
ff88c2f1ec3f11934aefce8ca9501ad561e17852 | 1,846 | py | Python | neuralmonkey/evaluators/bleu_ref.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | 5 | 2017-04-24T21:10:03.000Z | 2019-05-22T13:19:35.000Z | neuralmonkey/evaluators/bleu_ref.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | null | null | null | neuralmonkey/evaluators/bleu_ref.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | 5 | 2017-04-25T01:36:44.000Z | 2019-12-13T15:04:03.000Z | import tempfile
from typing import List
import subprocess
from neuralmonkey.logging import log
# pylint: disable=too-few-public-methods
# to be further refactored
class BLEUReferenceImplWrapper(object):
"""Wrapper for TectoMT's wrapper for reference NIST and BLEU scorer."""
def __init__(self, wrapper, name=... | 34.185185 | 76 | 0.58559 |
ff88e0f5ccecc3c701f512768bb897a2dfbe68cb | 1,035 | py | Python | sis-api/test/bdd/steps/membership.serialization.py | maxbilbow/7054CEM-sis | 1c5067c9afc38e340fcce046048f8ae21d267365 | [
"MIT"
] | null | null | null | sis-api/test/bdd/steps/membership.serialization.py | maxbilbow/7054CEM-sis | 1c5067c9afc38e340fcce046048f8ae21d267365 | [
"MIT"
] | null | null | null | sis-api/test/bdd/steps/membership.serialization.py | maxbilbow/7054CEM-sis | 1c5067c9afc38e340fcce046048f8ae21d267365 | [
"MIT"
] | null | null | null | from datetime import date
from behave import *
from core.model import to_dict
from core.model.membership import Membership
from core.model.membership_type import MembershipType
from core.utils.serialization import serialize
use_step_matcher("re")
@when("a serialized membership is requested")
def step_impl(context)... | 27.236842 | 118 | 0.72657 |
ff88ec54c77c1632b602165d015fce3a8334c3c4 | 37,206 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/_virtual_network_gateway_connections_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/_virtual_network_gateway_connections_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/_virtual_network_gateway_connections_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 49.608 | 203 | 0.697119 |
ff88f4c7f1972e21c6f47c619503a4d4053943cf | 9,542 | py | Python | Assignment1/main.py | parthjindal/CS60050 | 7ac2270ec8076f8334f7a29c7ec547c6cb6721ca | [
"MIT"
] | null | null | null | Assignment1/main.py | parthjindal/CS60050 | 7ac2270ec8076f8334f7a29c7ec547c6cb6721ca | [
"MIT"
] | null | null | null | Assignment1/main.py | parthjindal/CS60050 | 7ac2270ec8076f8334f7a29c7ec547c6cb6721ca | [
"MIT"
] | null | null | null | from typing import List, Dict, Tuple
from util import CarDataset, split_dataset, shuffle_dataset, \
get_metrics, find_ci_interval, seed_everything
from decision_tree import DecisionTree
import numpy as np
import matplotlib.pyplot as plt
import argparse
from tabulate import tabulate
def train(
dataset: CarData... | 33.480702 | 104 | 0.596101 |
ff89163f593bf4b9ef12e5a67f1c398afc965dc8 | 7,922 | py | Python | client/mlf.py | jupadhya1/Odometry_Signal_Anomaly | 37a1e549b640fcec7b21ba06e55f8744dbe4614b | [
"MIT"
] | null | null | null | client/mlf.py | jupadhya1/Odometry_Signal_Anomaly | 37a1e549b640fcec7b21ba06e55f8744dbe4614b | [
"MIT"
] | null | null | null | client/mlf.py | jupadhya1/Odometry_Signal_Anomaly | 37a1e549b640fcec7b21ba06e55f8744dbe4614b | [
"MIT"
] | null | null | null | import json
import logging
import math
from collections import defaultdict
from typing import Dict, List, Union
import mlflow
import pandas as pd
from sklearn.metrics import confusion_matrix
class MlflowClient():
"""A mlflow client to read artifacts from minio bucket
"""
def __init__(se... | 43.767956 | 148 | 0.614113 |
ff891b49db9376c3fb99dd13e8ce2692d020c58f | 43,186 | py | Python | rigify/rigs/spines/super_spine.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | 1 | 2018-06-18T09:46:10.000Z | 2018-06-18T09:46:10.000Z | rigify/rigs/spines/super_spine.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | null | null | null | rigify/rigs/spines/super_spine.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | null | null | null | import bpy
from mathutils import Vector
from ...utils import copy_bone, flip_bone, put_bone, org, align_bone_y_axis, align_bone_x_axis
from ...utils import strip_org, make_deformer_name, connected_children_names
from ...utils import create_circle_widget, create_sphere_widget, create_neck_bend_widget, create_neck_tweak_... | 33.897959 | 270 | 0.527324 |
ff8927e0080427196d872f1db9388fcff8605fe7 | 917 | py | Python | tests/repos/test_outagesRepo.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | tests/repos/test_outagesRepo.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | 21 | 2021-01-08T18:03:32.000Z | 2021-02-02T16:17:34.000Z | tests/repos/test_outagesRepo.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | import unittest
from src.appConfig import initAppConfig
from src.repos.outages.outagesRepo import OutagesRepo
import datetime as dt
class TestOutagesRepo(unittest.TestCase):
def setUp(self):
self.appConf = initAppConfig()
def test_getLatestUnrevOutages(self) -> None:
"""tests the function tha... | 35.269231 | 81 | 0.693566 |
ff893ad0e4b54a03e881b8dc0d4d1ae604917685 | 2,296 | py | Python | tests/storage/rawstudies/factory.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2021-11-15T09:26:33.000Z | 2022-02-24T09:53:54.000Z | tests/storage/rawstudies/factory.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | tests/storage/rawstudies/factory.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | from pathlib import Path
from unittest.mock import Mock
from antarest.core.interfaces.cache import CacheConstants
from antarest.study.storage.rawstudy.model.filesystem.config.files import (
ConfigPathBuilder,
)
from antarest.study.storage.rawstudy.model.filesystem.context import (
ContextServer,
)
from antares... | 32.8 | 81 | 0.65331 |
ff893d160b91f77735d714eeb42b44da4096e17a | 4,683 | py | Python | twinotter/plots/flight_track_frames.py | leifdenby/twin-otter | 05d66304d03b27cbd0ac8d4add83d3b67518daa3 | [
"MIT"
] | 1 | 2021-09-16T16:50:47.000Z | 2021-09-16T16:50:47.000Z | twinotter/plots/flight_track_frames.py | leifdenby/twin-otter | 05d66304d03b27cbd0ac8d4add83d3b67518daa3 | [
"MIT"
] | 6 | 2020-03-02T12:41:27.000Z | 2020-09-02T09:15:44.000Z | twinotter/plots/flight_track_frames.py | leifdenby/twin-otter | 05d66304d03b27cbd0ac8d4add83d3b67518daa3 | [
"MIT"
] | 2 | 2020-06-11T15:20:07.000Z | 2021-03-19T10:38:44.000Z | """
::
Usage:
flight_track_frames.py <flight_data_path>
[<lon_min> <lon_max> <lat_min> <lat_max> <resolution>]
[--goes_path=<path>]
[--output_path=<path>]
flight_track_frames.py (-h | --help)
Arguments:
<flight_data_path> Input flight data
Op... | 28.381818 | 85 | 0.605808 |
ff8940e973d9986a0540c45589197781127be469 | 15,334 | py | Python | twilio/rest/ip_messaging/v1/credential.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | 1 | 2021-02-24T04:59:03.000Z | 2021-02-24T04:59:03.000Z | twilio/rest/ip_messaging/v1/credential.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | null | null | null | twilio/rest/ip_messaging/v1/credential.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | 1 | 2018-12-09T00:53:21.000Z | 2018-12-09T00:53:21.000Z | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.... | 30.125737 | 92 | 0.593583 |
ff8951292000e6ec0c51e201e83f3b7bb6561b03 | 2,016 | py | Python | setup.py | Global19/python-functions | 94917c52dd83d18b8a3fd61e7f5d5c870c5a874c | [
"Apache-2.0"
] | null | null | null | setup.py | Global19/python-functions | 94917c52dd83d18b8a3fd61e7f5d5c870c5a874c | [
"Apache-2.0"
] | null | null | null | setup.py | Global19/python-functions | 94917c52dd83d18b8a3fd61e7f5d5c870c5a874c | [
"Apache-2.0"
] | 1 | 2020-10-04T10:18:13.000Z | 2020-10-04T10:18:13.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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 | 74 | 0.672619 |
ff8959a48b98ae2b22326cfdc8ebf0e6e620e635 | 4,765 | py | Python | test/test_mqtt_connectivity_service.py | Wolkabout/WolkGatewayModule-SDK-Python | 73cb537822d07cb68b0609022f53171ecf663fa4 | [
"Apache-2.0"
] | null | null | null | test/test_mqtt_connectivity_service.py | Wolkabout/WolkGatewayModule-SDK-Python | 73cb537822d07cb68b0609022f53171ecf663fa4 | [
"Apache-2.0"
] | 2 | 2020-11-16T15:10:36.000Z | 2020-11-20T13:10:13.000Z | test/test_mqtt_connectivity_service.py | Wolkabout/WolkGatewayModule-SDK-Python | 73cb537822d07cb68b0609022f53171ecf663fa4 | [
"Apache-2.0"
] | null | null | null | """Tests for MQTTConnectivityService."""
# Copyright 2019 WolkAbout Technology s.r.o.
#
# 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-... | 31.979866 | 76 | 0.673662 |
ff8973ab63e150687836c6b66d631411478e57b6 | 7,557 | py | Python | test.py | tjd2002/pynwb | 426109b85c2e683d96f2126286fb3369013abb8b | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-04-13T20:47:36.000Z | 2021-04-13T20:47:36.000Z | test.py | t-b/pynwb | b58e7b003247485120380360bb112bc6b22c7e60 | [
"BSD-3-Clause-LBNL"
] | null | null | null | test.py | t-b/pynwb | b58e7b003247485120380360bb112bc6b22c7e60 | [
"BSD-3-Clause-LBNL"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import warnings
import re
import argparse
import inspect
import logging
import os.path
import os
import sys
import traceback
import unittest2 as unittest
flags = {'form': 1, 'pynwb': 2, 'integration': 3, 'example': 4}
TOTAL = 0
FAILURES = 0
ERRORS = 0
cl... | 35.148837 | 119 | 0.632129 |
ff898a5df28f3010dc7a465081376d42101a0504 | 7,120 | py | Python | tools_diffraction.py | vespos/tools | 0a634186ae9c103fd0c6840351cac96469d18cfa | [
"MIT"
] | null | null | null | tools_diffraction.py | vespos/tools | 0a634186ae9c103fd0c6840351cac96469d18cfa | [
"MIT"
] | null | null | null | tools_diffraction.py | vespos/tools | 0a634186ae9c103fd0c6840351cac96469d18cfa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tools for diffraction and FEMTO analysis
Created on Tue Apr 12 14:28:22 2016
@author: esposito_v
"""
import numpy as np
import diffractionAngles_modes as diff_mode
def hklFromAngles(E, delta, gamma, omega, alpha, U, B):
"""
Calculate the hkl vector for a given set of angles.... | 25.703971 | 124 | 0.544101 |
ff8992c6e95e989f376f370a1744eea514e4dbef | 52 | py | Python | dn3/configuratron/__init__.py | MohammadJavadD/dn3 | cf29e4fe753e5e0a1e4ad3bf5d36c12776c3e4f9 | [
"BSD-3-Clause"
] | 28 | 2021-02-01T08:05:13.000Z | 2022-03-25T04:52:00.000Z | dn3/configuratron/__init__.py | MohammadJavadD/dn3 | cf29e4fe753e5e0a1e4ad3bf5d36c12776c3e4f9 | [
"BSD-3-Clause"
] | 10 | 2020-11-16T15:35:44.000Z | 2021-12-02T16:20:25.000Z | dn3/configuratron/__init__.py | MohammadJavadD/dn3 | cf29e4fe753e5e0a1e4ad3bf5d36c12776c3e4f9 | [
"BSD-3-Clause"
] | 7 | 2021-03-01T08:25:39.000Z | 2021-12-20T06:35:10.000Z | from .config import ExperimentConfig, DatasetConfig
| 26 | 51 | 0.865385 |
ff8995c11c9a0a4c497fc481ab979cd3779df3e8 | 1,034 | py | Python | chemiwrap/utilities/_utilities.py | SimonBoothroyd/chemiwrap | 7394cd44e386a9f280fd61bce5cf4d0d1567c689 | [
"MIT"
] | 2 | 2021-06-28T15:20:02.000Z | 2021-07-01T03:09:35.000Z | chemiwrap/utilities/_utilities.py | SimonBoothroyd/chemiwrap | 7394cd44e386a9f280fd61bce5cf4d0d1567c689 | [
"MIT"
] | 7 | 2021-06-29T08:21:40.000Z | 2022-02-28T21:13:50.000Z | chemiwrap/utilities/_utilities.py | SimonBoothroyd/chemiwrap | 7394cd44e386a9f280fd61bce5cf4d0d1567c689 | [
"MIT"
] | null | null | null | from typing import List, Optional
from openff.toolkit.topology import Molecule
def deduplicate_molecules(
molecules: List[Molecule], exclude: Optional[List[Molecule]] = None
) -> List[Molecule]:
"""De-duplicates a list of molecules based on their canonical, isomeric, explicit-H,
non-mapped smiles pattern... | 25.85 | 88 | 0.682785 |
ff89c9877082f09c1ae0424bf0404ee37a7b9fa5 | 8,500 | py | Python | chapter10/exercises/EG10-14 Time Tracker with string method.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | chapter10/exercises/EG10-14 Time Tracker with string method.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | chapter10/exercises/EG10-14 Time Tracker with string method.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | # EG10-14 Time Tracker with string method
import pickle
from BTCInput import *
# Create the contact class
class Contact:
__min_session_length = 0.5
__max_session_length = 3.5
__open_fee = 30
__hourly_fee = 50
@staticmethod
def validate_session_length(session_length):
'''
... | 29.824561 | 85 | 0.626 |
ff89e9181d6ac7a89b157d7fdce4dc266f68f2b2 | 8,438 | py | Python | salt/states/npm.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 1 | 2020-06-16T05:47:58.000Z | 2020-06-16T05:47:58.000Z | salt/states/npm.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/states/npm.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Installation of NPM Packages
============================
These states manage the installed packages for node.js using the Node Package
Manager (npm). Note that npm must be installed for these states to be
available, so npm states should include a requisite to a pkg.installed state
for the ... | 29.096552 | 82 | 0.5653 |
ff8a0786c72984b7735783d973b363e9428dd638 | 2,008 | py | Python | venv/Lib/site-packages/pyrogram/raw/base/config.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/raw/base/config.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/raw/base/config.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 34.62069 | 87 | 0.624004 |
ff8a2bbf06f4ec610b370d3581bfebe6aad602be | 855 | py | Python | mps_database/models/beam_destination.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | null | null | null | mps_database/models/beam_destination.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 1 | 2017-07-07T21:31:59.000Z | 2017-07-07T21:31:59.000Z | mps_database/models/beam_destination.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 4 | 2017-07-07T20:10:54.000Z | 2020-12-13T00:03:37.000Z | from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import relationship, backref
from mps_database.models import Base
class BeamDestination(Base):
"""
BeamDestination class (beam_destinations table)
properties:
name: linac, sxu, hxu, diag0
description: main linac, soft x-ray u... | 37.173913 | 83 | 0.773099 |
ff8a52d369d52a17870b4a4039a8ad93b9d2cb10 | 399 | py | Python | django_rest/django_rest/wsgi.py | deepaerial/django-rest-sandbox | af94ae5b92cf3732bae5ceab43362906ef4e9633 | [
"MIT"
] | null | null | null | django_rest/django_rest/wsgi.py | deepaerial/django-rest-sandbox | af94ae5b92cf3732bae5ceab43362906ef4e9633 | [
"MIT"
] | 7 | 2019-12-15T18:00:27.000Z | 2021-09-22T18:07:46.000Z | django_rest/django_rest/wsgi.py | deepaerial/django-rest-sandbox | af94ae5b92cf3732bae5ceab43362906ef4e9633 | [
"MIT"
] | null | null | null | """
WSGI config for django_rest 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/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_S... | 23.470588 | 78 | 0.789474 |
ff8a55ad880b429a5b977e16c080e3207c1dcc31 | 3,686 | py | Python | unitreport/generate.py | annahadji/unitreport | d2d7e5e7ab641d0245d41e1e3339518d80e40463 | [
"MIT"
] | 1 | 2020-07-05T20:07:17.000Z | 2020-07-05T20:07:17.000Z | unitreport/generate.py | annahadji/unitreport | d2d7e5e7ab641d0245d41e1e3339518d80e40463 | [
"MIT"
] | null | null | null | unitreport/generate.py | annahadji/unitreport | d2d7e5e7ab641d0245d41e1e3339518d80e40463 | [
"MIT"
] | null | null | null | """Test orchestration and report generation module."""
import pathlib
import datetime
import logging
import unittest
from typing import Dict, Tuple
import jinja2
import markdown
from .decorators import FIGURES
logger = logging.getLogger(__name__)
def discover_and_run(
tests_dir: str = ".", pattern: str = "test... | 39.212766 | 97 | 0.685838 |
ff8a6049e3e0b0c52dd151ae1b31ff64a58437e4 | 1,308 | py | Python | rocksetta/old/qnode.py | hpssjellis/tfQuantumJs | 5235c682b0d2de2eaab8d52b84e295c9f4abf4e5 | [
"MIT"
] | 1 | 2021-05-11T22:13:28.000Z | 2021-05-11T22:13:28.000Z | rocksetta/old/qnode.py | hpssjellis/tfQuantumJs | 5235c682b0d2de2eaab8d52b84e295c9f4abf4e5 | [
"MIT"
] | null | null | null | rocksetta/old/qnode.py | hpssjellis/tfQuantumJs | 5235c682b0d2de2eaab8d52b84e295c9f4abf4e5 | [
"MIT"
] | 1 | 2021-05-11T22:13:34.000Z | 2021-05-11T22:13:34.000Z | @qml.qnode(dev)
def circuit(inputs, conv_params):
# Encoding of 4 classical input values
for j in range(4):
qml.RY(np.pi * inputs[j], wires=j)
# Random quantum circuit
RandomLayers(conv_params, wires=list(range(4)))
# Measurement producing 4 classical output values
return [qm... | 28.434783 | 92 | 0.598624 |
ff8a904f6bfe8e7642839a876f4b6b1b5d767406 | 628 | py | Python | balsa/routines/io/__init__.py | wsp-sag/balsa | d522fba57e0bf70ffb757d061165ce9f1945acc4 | [
"MIT"
] | 2 | 2020-01-10T15:40:52.000Z | 2021-12-13T22:19:22.000Z | balsa/routines/io/__init__.py | wsp-sag/balsa | d522fba57e0bf70ffb757d061165ce9f1945acc4 | [
"MIT"
] | 2 | 2020-05-21T13:57:06.000Z | 2021-12-13T22:19:14.000Z | balsa/routines/io/__init__.py | wsp-sag/balsa | d522fba57e0bf70ffb757d061165ce9f1945acc4 | [
"MIT"
] | 2 | 2020-04-10T15:45:57.000Z | 2021-03-25T13:15:24.000Z | from .common import coerce_matrix, expand_array, open_file
from .fortran import read_fortran_rectangle, read_fortran_square, to_fortran
from .inro import read_mdf, read_emx, peek_mdf, to_mdf, to_emx
from .nwp import (read_nwp_base_network, read_nwp_exatts_list, read_nwp_node_attributes, read_nwp_link_attributes,
... | 69.777778 | 116 | 0.81051 |
ff8aedeb04078f7a14749973f7f4742acd06bb1c | 3,277 | py | Python | rally/plugins/openstack/scenarios/ceilometer/stats.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 1 | 2018-01-01T00:43:41.000Z | 2018-01-01T00:43:41.000Z | rally/plugins/openstack/scenarios/ceilometer/stats.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | rally/plugins/openstack/scenarios/ceilometer/stats.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 1 | 2020-06-05T10:06:37.000Z | 2020-06-05T10:06:37.000Z | # 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 law or agreed to in... | 42.558442 | 78 | 0.690876 |
ff8af3e164d73bbeee8d2e821db7896f908178a4 | 1,525 | py | Python | archive/nexus-api-v2/Database/AGILE/Schemas/Note.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/AGILE/Schemas/Note.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/AGILE/Schemas/Note.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | 1 | 2022-01-03T05:33:15.000Z | 2022-01-03T05:33:15.000Z | # !/usr/bin/env python3
# -*- Coding: UTF-8 -*- #
# -*- System: Linux -*- #
# -*- Usage: *.py -*- #
# Owner: Jacob B. Sanders
# Source: code.cloud-technology.io
# License: BSD 2-Clause License
"""
...
"""
from . import *
Configuration = Scheme.Configuration
__module__ = __name__
class Base(Scheme):
"... | 17.732558 | 82 | 0.569836 |
ff8af94ff2fc7f37f7e7d323cd127c953021f558 | 2,143 | py | Python | tests/settings.py | varche1/django-seo | 6291381bdc19d3b98a9aa971e205378bcc64a790 | [
"BSD-3-Clause"
] | 27 | 2015-05-08T08:29:43.000Z | 2021-08-02T01:58:06.000Z | tests/settings.py | varche1/django-seo | 6291381bdc19d3b98a9aa971e205378bcc64a790 | [
"BSD-3-Clause"
] | 28 | 2015-05-14T06:25:31.000Z | 2021-09-22T18:54:56.000Z | tests/settings.py | varche1/django-seo | 6291381bdc19d3b98a9aa971e205378bcc64a790 | [
"BSD-3-Clause"
] | 32 | 2015-05-08T09:41:01.000Z | 2021-09-23T05:55:02.000Z | from __future__ import unicode_literals
import os
"""
Django settings for tests project.
"""
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = '=)c(th7-3@w*n9mf9_b+2qg685lc6qgfars@yu1g516xu5&is)'
DEBUG = True
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'djan... | 23.293478 | 69 | 0.666356 |
ff8b03c802020493f5dde9c6539cd9c2373ad231 | 42,241 | py | Python | one_more_layer_of_stacking/src/sf_stack.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | one_more_layer_of_stacking/src/sf_stack.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | one_more_layer_of_stacking/src/sf_stack.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | def sf_stack():
import importlib
import sf_utils; importlib.reload(sf_utils)
from sf_utils import *
test_meta = pd.read_csv('input/test_meta.csv')
test_meta.shape
train_val_meta = pd.read_csv('input/train_meta.csv')
new_data_meta = pd.read_csv('input/new_data_meta.csv')
new_data_meta.c... | 53.60533 | 4,991 | 0.599938 |
ff8b12dfddaa6ee1435589cc1fa8a07636a2ff76 | 2,026 | py | Python | .leetcode/650.2-keys-keyboard.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/650.2-keys-keyboard.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/650.2-keys-keyboard.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=650 lang=python3
#
# [650] 2 Keys Keyboard
#
# https://leetcode.com/problems/2-keys-keyboard/description/
#
# algorithms
# Medium (51.16%)
# Likes: 2124
# Dislikes: 152
# Total Accepted: 87.7K
# Total Submissions: 170.7K
# Testcase Example: '3'
#
# There is only one character 'A' on the scr... | 17.617391 | 77 | 0.583909 |
ff8b5ac3e32a1decf07b13b74a8fa94a38df88ef | 122 | py | Python | tests/context.py | James-LG/SteamGuard | 85e51b5bc306abf68c434e36bba34b747fd29ce1 | [
"MIT"
] | 3 | 2021-02-09T16:03:41.000Z | 2021-07-28T10:40:10.000Z | tests/context.py | Tygon/SteamGuard | 85e51b5bc306abf68c434e36bba34b747fd29ce1 | [
"MIT"
] | 2 | 2021-02-05T22:28:58.000Z | 2021-04-30T21:14:30.000Z | tests/context.py | Tygon/SteamGuard | 85e51b5bc306abf68c434e36bba34b747fd29ce1 | [
"MIT"
] | null | null | null | import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import steamguard | 24.4 | 82 | 0.745902 |
ff8b62d7d6a46bdf8eea5a81073da98beb41f5f2 | 1,321 | py | Python | projects/dynamic_facial_expressions_ICANN/Call_test_functions.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | projects/dynamic_facial_expressions_ICANN/Call_test_functions.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | projects/dynamic_facial_expressions_ICANN/Call_test_functions.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | import json
import os
import numpy as np
#from EB_Test_seq_code import test_model_seq
from Test_set_VGG_feature_extr_skPCA import load_EB_data
from Test_set_VGG_feature_extr_skPCA import extract_v4_features
from EB_Test_Seq_code_sklearnPCA import compute_snapshot_neurons
from EB_Test_Seq_code_sklearnPCA import compute... | 30.72093 | 74 | 0.788039 |
ff8b6368511a80a3b33e44b9b2a3c3df88c4d5c7 | 3,996 | py | Python | apps/quotes/migrations/0001_initial.py | lucifurtun/myquotes | 4b78622acc9223cc18999dce1c2d6374bb52e20f | [
"BSD-3-Clause"
] | 4 | 2016-12-12T12:18:37.000Z | 2017-03-08T07:49:14.000Z | apps/quotes/migrations/0001_initial.py | lucifurtun/myquotes | 4b78622acc9223cc18999dce1c2d6374bb52e20f | [
"BSD-3-Clause"
] | 24 | 2017-08-25T14:15:52.000Z | 2022-02-26T19:24:17.000Z | apps/quotes/migrations/0001_initial.py | lucifurtun/myquotes | 4b78622acc9223cc18999dce1c2d6374bb52e20f | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2.5 on 2020-06-15 20:09
import apps.quotes.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_U... | 47.011765 | 139 | 0.576577 |
ff8b6a6455f84c6c2aedef8fcb4b074fddadf886 | 22,303 | py | Python | test/integration/dss/test_dss_api.py | DataBiosphere/data-store-cli | d83776ac68d3c6c86de1714487803bbdf705fddf | [
"MIT"
] | null | null | null | test/integration/dss/test_dss_api.py | DataBiosphere/data-store-cli | d83776ac68d3c6c86de1714487803bbdf705fddf | [
"MIT"
] | 41 | 2020-01-13T22:19:19.000Z | 2020-03-16T23:11:37.000Z | test/integration/dss/test_dss_api.py | DataBiosphere/data-store-cli | d83776ac68d3c6c86de1714487803bbdf705fddf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import errno
from concurrent.futures import ThreadPoolExecutor
import datetime
import filecmp
from dbio.util import tsv
import itertools
import os
import sys
import tempfile
import uuid
import unittest
from fnmatch import fnmatchcase
import boto3
pkg_root = os.path.abspath(os.path... | 52.35446 | 121 | 0.573062 |
ff8b9115ab788e9eeb33506cfee1bd4ceb06c73b | 4,657 | py | Python | zerver/tests/webhooks/test_freshdesk.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | zerver/tests/webhooks/test_freshdesk.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | zerver/tests/webhooks/test_freshdesk.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from six import text_type
from zerver.lib.test_classes import WebhookTestCase
class FreshdeskHookTests(WebhookTestCase):
STREAM_NAME = 'freshdesk'
URL_TEMPLATE = u"/api/v1/external/freshdesk?stream={stream}"
def test_ticket_creation(self):
# type: () -> None
"""
... | 49.021053 | 451 | 0.638179 |
ff8bb0e226843d103c29437c18b343ac211bab22 | 2,571 | py | Python | venv/lib/python3.8/site-packages/dateparser/data/date_translation_data/eo.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | 1 | 2021-11-17T04:55:14.000Z | 2021-11-17T04:55:14.000Z | dateparser/data/date_translation_data/eo.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | dateparser/data/date_translation_data/eo.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
info = {
"name": "eo",
"date_order": "YMD",
"january": [
"januaro",
"jan"
],
"february": [
"februaro",
"feb"
],
"march": [
"marto",
"mar"
],
"april": [
"aprilo",
"apr"
],
"may": [
... | 15.035088 | 26 | 0.261766 |
ff8bc54ad83869e8692e2901b837668f1df172dc | 387 | py | Python | python3-src/steem/data.py | AnCh7/sweetshot | 60a025bd19a9cb71292f2b1e35fe706d815b2a99 | [
"Unlicense"
] | 5 | 2017-01-06T07:11:41.000Z | 2017-11-07T01:47:29.000Z | python3-src/steem/data.py | AnCh7/sweetshot | 60a025bd19a9cb71292f2b1e35fe706d815b2a99 | [
"Unlicense"
] | null | null | null | python3-src/steem/data.py | AnCh7/sweetshot | 60a025bd19a9cb71292f2b1e35fe706d815b2a99 | [
"Unlicense"
] | null | null | null | from piston.data import SteemData as PistonSteemData
import warnings
warnings.simplefilter('always', DeprecationWarning)
class SteemData(PistonSteemData):
def __init__(self, *args, **kwargs):
warnings.warn(
"Please use the API compatible 'piston-lib' in future",
DeprecationWarning
... | 29.769231 | 67 | 0.687339 |
ff8bd9285a91afad46966a1aacbf71a2f7a0647a | 4,839 | py | Python | pdffitx/tests/modeling/test_running.py | st3107/pdffitx | c746f6dfaf5656e9bb62508a9847c00567b34bbe | [
"BSD-3-Clause"
] | null | null | null | pdffitx/tests/modeling/test_running.py | st3107/pdffitx | c746f6dfaf5656e9bb62508a9847c00567b34bbe | [
"BSD-3-Clause"
] | null | null | null | pdffitx/tests/modeling/test_running.py | st3107/pdffitx | c746f6dfaf5656e9bb62508a9847c00567b34bbe | [
"BSD-3-Clause"
] | null | null | null | import pytest
from matplotlib import pyplot as plt
from pdffitx.modeling import F, multi_phase, optimize, fit_calib, MyParser
@pytest.mark.parametrize(
"data_key,kwargs,free_params,use_cf,expected",
[
(
"Ni_stru",
{
'values': {'scale_G0': 0.1, 'a_G0': 3.42, 'Bi... | 32.695946 | 107 | 0.468899 |
ff8c54275f49ea91ca24b53dd63ad06db99a6d1d | 692 | py | Python | Courses/Udacity/CS101/Lesson_4_Responding_to_Queries/06-Add_Page_To_Index/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2019-02-13T12:02:26.000Z | 2019-02-13T12:02:26.000Z | Courses/Udacity/CS101/Lesson_4_Responding_to_Queries/06-Add_Page_To_Index/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2018-08-13T15:58:33.000Z | 2018-08-13T15:58:33.000Z | Courses/Udacity/CS101/Lesson_4_Responding_to_Queries/06-Add_Page_To_Index/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 2 | 2017-08-10T20:01:29.000Z | 2021-07-01T08:39:13.000Z | # Define a procedure, add_page_to_index,
# that takes three inputs:
# - index
# - url (String)
# - content (String)
# It should update the index to include
# all of the word occurences found in the
# page content by adding the url to the
# word's associated url list.
index = []
def add_to_index(index,keyword... | 19.771429 | 75 | 0.622832 |
ff8c5bb041ed8c802bf11cc82082819692006123 | 1,855 | py | Python | sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connection_info.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connection_info.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connection_info.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 36.372549 | 256 | 0.632345 |
ff8c5cc1bf71f586b78cba18cea8405ccb080a31 | 13,437 | py | Python | pathcore/feature_pathway_overrepresentation.py | kathyxchen/PathCORE-dev | 9d079d5ebffea2fe9fb9ab557588d51ad67d2c9c | [
"BSD-3-Clause"
] | null | null | null | pathcore/feature_pathway_overrepresentation.py | kathyxchen/PathCORE-dev | 9d079d5ebffea2fe9fb9ab557588d51ad67d2c9c | [
"BSD-3-Clause"
] | null | null | null | pathcore/feature_pathway_overrepresentation.py | kathyxchen/PathCORE-dev | 9d079d5ebffea2fe9fb9ab557588d51ad67d2c9c | [
"BSD-3-Clause"
] | null | null | null | """Determine the pathways overrepresented in a constructed feature.
"""
from crosstalk_correction import crosstalk_correction
import numpy as np
import pandas as pd
from scipy import stats
from statsmodels.sandbox.stats.multicomp import multipletests
# handle the floating point errors thrown in the Fisher's exact tes... | 46.175258 | 79 | 0.6753 |
ff8c96a0a86c001aec9949474044cb4c8d6558d9 | 15,432 | py | Python | vlcp/event/stream.py | hubo1016/vlcp | 61c4c2595b610675ac0cbc4dbc46f70ec40090d3 | [
"Apache-2.0"
] | 252 | 2015-11-17T14:21:50.000Z | 2022-03-11T10:19:47.000Z | vlcp/event/stream.py | SarahZarei/vlcp | 61c4c2595b610675ac0cbc4dbc46f70ec40090d3 | [
"Apache-2.0"
] | 23 | 2018-01-09T13:28:52.000Z | 2019-12-12T06:11:44.000Z | vlcp/event/stream.py | SarahZarei/vlcp | 61c4c2595b610675ac0cbc4dbc46f70ec40090d3 | [
"Apache-2.0"
] | 37 | 2016-08-03T04:42:22.000Z | 2021-12-30T16:57:10.000Z | '''
Created on 2015/8/14
:author: hubo
'''
from vlcp.event import Event, withIndices
import os
@withIndices('stream', 'type')
class StreamDataEvent(Event):
canignore = False
STREAM_DATA = 'data'
STREAM_EOF = 'eof'
STREAM_ERROR = 'error'
def canignorenow(self):
return self.stream.closed
c... | 37.639024 | 174 | 0.526179 |
ff8ce3da4861a95e5d4e219ba7fee3155596ab44 | 17,513 | py | Python | spyke/nsx.py | spyke/spyke | 20934521de9c557924911cf6190690ac1c6f8e80 | [
"CNRI-Python"
] | 22 | 2015-06-01T03:31:00.000Z | 2022-03-18T09:12:28.000Z | spyke/nsx.py | spyke/spyke | 20934521de9c557924911cf6190690ac1c6f8e80 | [
"CNRI-Python"
] | 3 | 2017-03-24T19:16:02.000Z | 2021-01-27T14:34:30.000Z | spyke/nsx.py | spyke/spyke | 20934521de9c557924911cf6190690ac1c6f8e80 | [
"CNRI-Python"
] | 6 | 2015-07-10T15:28:08.000Z | 2022-03-17T19:30:45.000Z | """Load Blackrock Neural Signal Processing System .nsx files. Inherits from dat.File, because
.nsx also stores its waveform data in flat .dat format
Based on file documentation at:
http://support.blackrockmicro.com/KB/View/166838-file-specifications-packet-details-headers-etc
"""
from __future__ import division
from... | 47.849727 | 97 | 0.608177 |
ff8ce4b2963645b40f83bf3cb47e1e78c0ecc822 | 264 | py | Python | Code Forces/Round 647/B.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | Code Forces/Round 647/B.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | Code Forces/Round 647/B.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z |
if __name__ == '__main__':
for t in range(int(input())):
n = int(input())
a = list(map(int,input().split()))
ans = 1
for i in a:
ans &= i
if ans:
print(ans)
else:
print(-1) | 20.307692 | 42 | 0.397727 |
ff8cf90896c1f0ee0ba028c8347f186d57d12437 | 18,198 | py | Python | common/kivyparticle/engine.py | yaatehr/ChordShed | 5b04fd086792898bf41dd9a88f4ab1b1656a3f9e | [
"MIT"
] | null | null | null | common/kivyparticle/engine.py | yaatehr/ChordShed | 5b04fd086792898bf41dd9a88f4ab1b1656a3f9e | [
"MIT"
] | null | null | null | common/kivyparticle/engine.py | yaatehr/ChordShed | 5b04fd086792898bf41dd9a88f4ab1b1656a3f9e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from kivy.uix.widget import Widget
from kivy.clock import Clock
from kivy.graphics import Color, Callback, Rotate, PushMatrix, PopMatrix, Translate, Quad
from kivy.graphics.opengl import glBlendFunc, GL_SRC_ALPHA, GL_ONE, GL_ZERO, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_ONE_MINUS_SRC_ALPHA, GL... | 45.156328 | 221 | 0.671612 |
ff8d15b9b43792885bfef8edfa38034aa6436d76 | 20,035 | py | Python | GOSTnets/fetch_od.py | worldbank/GOSTnets | b3eb446a146a1419cbc761bc75b4fd6c5b350698 | [
"MIT"
] | 11 | 2019-12-09T19:18:46.000Z | 2021-11-05T11:26:18.000Z | GOSTnets/fetch_od.py | worldbank/GOSTnets | b3eb446a146a1419cbc761bc75b4fd6c5b350698 | [
"MIT"
] | 25 | 2019-06-19T11:30:26.000Z | 2022-03-01T20:32:48.000Z | GOSTnets/fetch_od.py | worldbank/GOSTnets | b3eb446a146a1419cbc761bc75b4fd6c5b350698 | [
"MIT"
] | 9 | 2019-06-26T17:27:43.000Z | 2022-03-25T10:27:10.000Z | # -*- coding: utf-8 -*-
## library Imports
import json, sys, os, time, argparse, logging
import shapely
import pandas as pd
import numpy as np
try:
import urllib.request as url # python 3
except:
import urllib2 as url # python 2
###### OD Matrix ######
def CreateODMatrix(infile, infile_2, la... | 48.746959 | 254 | 0.598553 |
ff8d282130ec57ddf89cf78e28b7230ff9895495 | 13,023 | py | Python | tests/test_torrent.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | tests/test_torrent.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | 1 | 2018-06-09T18:03:35.000Z | 2018-06-09T18:03:35.000Z | tests/test_torrent.py | sasese/Flexget | 8cca4a6a3cacc919c7a5b36f428176e170739de5 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
import os
from nose.plugins.attrib import attr
from tests import FlexGetBase, with_filecopy
from flexget.utils.bittorrent import Torrent
class TestInfoHash(FlexGetBase):
__yaml__ = """
tasks:
test:
mock:
... | 38.758929 | 120 | 0.608232 |
ff8d4c69541ddeb5c2b0db994c1d771ea57f8b26 | 10,393 | py | Python | src/python/pants/backend/python/python_chroot.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/python_chroot.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/python_chroot.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:24:34.000Z | 2019-06-10T17:24:34.000Z | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import functools
imp... | 38.635688 | 115 | 0.708554 |
ff8d5c1add0f6579afba5086ad5a45db46ffec08 | 8,067 | py | Python | tests/conftest.py | michalk8/squidpy | b3b5f8a4784250c6792137853092a3d5c9dbf1c7 | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | michalk8/squidpy | b3b5f8a4784250c6792137853092a3d5c9dbf1c7 | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | michalk8/squidpy | b3b5f8a4784250c6792137853092a3d5c9dbf1c7 | [
"BSD-3-Clause"
] | null | null | null | from abc import ABC, ABCMeta
from typing import Tuple, Mapping, Callable, Optional, Sequence
from pathlib import Path
from functools import wraps
from itertools import product
import sys
import pickle
import pytest
from anndata import AnnData
import scanpy as sc
import numpy as np
import pandas as pd
from matplotlib... | 27.721649 | 119 | 0.632701 |
ff8d97d1bc27a9d35417e03fa2fa3f5fa8779828 | 11,371 | py | Python | djangae/contrib/googleauth/tests/test_oauth.py | flea89/djangae | 3435770669d5453e70a8187bee5a951c1a25f6f5 | [
"BSD-3-Clause"
] | null | null | null | djangae/contrib/googleauth/tests/test_oauth.py | flea89/djangae | 3435770669d5453e70a8187bee5a951c1a25f6f5 | [
"BSD-3-Clause"
] | null | null | null | djangae/contrib/googleauth/tests/test_oauth.py | flea89/djangae | 3435770669d5453e70a8187bee5a951c1a25f6f5 | [
"BSD-3-Clause"
] | 1 | 2020-11-24T18:18:28.000Z | 2020-11-24T18:18:28.000Z |
from datetime import timedelta
from unittest.mock import patch
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.sessions.middleware import SessionMiddleware
from django.http import HttpResponse
from django.shortcuts import reverse
from django.test import (
LiveServerTestCase,
RequestFac... | 35.870662 | 118 | 0.672588 |
ff8da350edcb18bb6337ea2f59aaa457b97b3c61 | 3,787 | py | Python | nicos_mlz/spodi/setups/slits.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/spodi/setups/slits.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/spodi/setups/slits.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'Slits'
group = 'lowlevel'
tango_base = 'tango://motorbox03.spodi.frm2.tum.de:10000/box/'
devices = dict(
# Monochromator slit
slitm_u = device('nicos.devices.generic.Axis',
description = 'Monochromator slit upper blade',
motor = 'slitm_u_m',
coder = 'slitm_u_c',
... | 31.297521 | 62 | 0.569052 |
ff8da4d5473f83d64619e47997b67f3c07a612ba | 1,156 | py | Python | test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 30.421053 | 94 | 0.632353 |
ff8dbdf49f7e985a949a3a13a245457c42047b7a | 719 | py | Python | MultilayerOptics/Test.py | KanglinXiong/multilayerOptics | 7dac180edbb62c1caf82471eb58617026ab92ebb | [
"BSD-2-Clause"
] | null | null | null | MultilayerOptics/Test.py | KanglinXiong/multilayerOptics | 7dac180edbb62c1caf82471eb58617026ab92ebb | [
"BSD-2-Clause"
] | null | null | null | MultilayerOptics/Test.py | KanglinXiong/multilayerOptics | 7dac180edbb62c1caf82471eb58617026ab92ebb | [
"BSD-2-Clause"
] | null | null | null | #########################################################
# This file is part of the MultilayerOptics package. #
# Version 0.1.0 #
# Copyright (c) 2016 and later, Kanglin Xiong. #
#########################################################
import App
''' an ... | 29.958333 | 62 | 0.513213 |
ff8dbfb063d12e5bf48d7e981e21e2a16f048013 | 12,762 | py | Python | intra_arbitrage.py | ai-abhinav/CCArbitrage | 6af8c2e6722f2398fabf3a6e483b1a0fcb8a3a53 | [
"MIT"
] | 1 | 2021-03-07T23:07:52.000Z | 2021-03-07T23:07:52.000Z | intra_arbitrage.py | ai-abhinav/CCArbitrage | 6af8c2e6722f2398fabf3a6e483b1a0fcb8a3a53 | [
"MIT"
] | null | null | null | intra_arbitrage.py | ai-abhinav/CCArbitrage | 6af8c2e6722f2398fabf3a6e483b1a0fcb8a3a53 | [
"MIT"
] | null | null | null | import ccxt
# from fiat_normalizer import fixerio
from fixerio import fixerio
FIAT = {'EUR', 'USD', 'JPY', 'GBP', 'CAD'}
def fiat_markets():
""" Retrieves all tickers from an exchange (Kraken for now) and returns only fiat markets """
kraken = ccxt.kraken()
tickers = kraken.fetch_tickers()
fiat_tick... | 42.825503 | 120 | 0.510892 |
ff8dc82c6be02ac8727271a1ca8316d79fdc07f2 | 1,326 | py | Python | test/test_medios.py | miglesias91/dicenlosmedios | 1f8867cd09689006f35447ad8540359d9429b518 | [
"MIT"
] | 1 | 2020-10-20T20:50:51.000Z | 2020-10-20T20:50:51.000Z | test/test_medios.py | miglesias91/dicenlosmedios | 1f8867cd09689006f35447ad8540359d9429b518 | [
"MIT"
] | 8 | 2021-03-19T01:17:28.000Z | 2022-03-02T14:57:48.000Z | test/test_medios.py | miglesias91/dicenlosmedios | 1f8867cd09689006f35447ad8540359d9429b518 | [
"MIT"
] | null | null | null | import unittest
import newspaper as np
from medios.diarios.diarios import Clarin, ElDestape, Infobae, LaNacion, PaginaDoce, CasaRosada
class TestMedios(unittest.TestCase):
def test_limpiar_texto_clarin(self):
articulo = np.Article(url="https://www.clarin.com/politica/jingle-bizarro-nicolas-cano-ritmo-ri... | 33.15 | 176 | 0.680241 |
ff8dc9ae5c7df8d67b690d1213bae8ab07130abc | 1,954 | py | Python | boiler/migrations/templates/project/env.py | projectshift/shift-boiler | 5f1d236b97fc814ba72897fa8bc76c7518bd1919 | [
"MIT"
] | 19 | 2016-08-06T20:06:21.000Z | 2020-10-22T08:31:49.000Z | boiler/migrations/templates/project/env.py | projectshift/shift-boiler | 5f1d236b97fc814ba72897fa8bc76c7518bd1919 | [
"MIT"
] | 104 | 2016-07-31T19:45:00.000Z | 2021-09-15T08:13:36.000Z | boiler/migrations/templates/project/env.py | projectshift/shift-boiler | 5f1d236b97fc814ba72897fa8bc76c7518bd1919 | [
"MIT"
] | 1 | 2017-12-30T09:07:38.000Z | 2017-12-30T09:07:38.000Z | from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
# ------------------------------------------------------------------------
# Load all your models in here for autogenerate support
# from project.app1 import models
# from project.app2 import models
# et... | 25.376623 | 74 | 0.659672 |
ff8dedb94d438dc52fce626192590ec35451152c | 3,153 | py | Python | tests/_validation/test_number_validation.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | tests/_validation/test_number_validation.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | tests/_validation/test_number_validation.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | from random import randint
from retrying import retry
import apysc as ap
from apysc._validation import number_validation
from tests import testing_helper
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test_validate_num() -> None:
number_validation.validate_num(num=100)
numb... | 39.4125 | 76 | 0.745005 |
ff8e071836cfd0781c0e1dc1d3ba46516333a088 | 8,120 | py | Python | intropyproject-classify-pet-images/print_results.py | MartynaKosciukiewicz/pet_image_classifier | 4ab776d0b5a7301a11784fae83b978c1d744c5e2 | [
"MIT"
] | null | null | null | intropyproject-classify-pet-images/print_results.py | MartynaKosciukiewicz/pet_image_classifier | 4ab776d0b5a7301a11784fae83b978c1d744c5e2 | [
"MIT"
] | null | null | null | intropyproject-classify-pet-images/print_results.py | MartynaKosciukiewicz/pet_image_classifier | 4ab776d0b5a7301a11784fae83b978c1d744c5e2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# */AIPND-revision/intropyproject-classify-pet-images/print_results.py
#
# PROGRAMMER: Martyna Kosciukiewicz
# DATE CREATED: 3/03/2021
# REVISED DATE:
# PURPOSE: Create a function print_results t... | 55.238095 | 130 | 0.606527 |
ff8e1e455c5b7ec1161ffff77092f4a071eab90e | 13,887 | py | Python | ryu/app/simple_isolation.py | rpt/ryu | ebf7638aac4481762e10ec90958f1480761a3893 | [
"Apache-2.0"
] | 1 | 2021-09-26T06:09:27.000Z | 2021-09-26T06:09:27.000Z | ryu/app/simple_isolation.py | rpt/ryu | ebf7638aac4481762e10ec90958f1480761a3893 | [
"Apache-2.0"
] | null | null | null | ryu/app/simple_isolation.py | rpt/ryu | ebf7638aac4481762e10ec90958f1480761a3893 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2011 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2011, 2012 Isaku Yamahata <yamahata at valinux co jp>
#
# 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
#
# h... | 39.677143 | 79 | 0.58544 |
ff8e37a8d3bcd93728a523b916fcdf4bd6c3609e | 1,610 | py | Python | tests/test_cast_infrastructure.py | janluak/dynamo_db_resource | f05403b61c71b1df8dcad65e099c648507f295e7 | [
"Apache-2.0"
] | null | null | null | tests/test_cast_infrastructure.py | janluak/dynamo_db_resource | f05403b61c71b1df8dcad65e099c648507f295e7 | [
"Apache-2.0"
] | null | null | null | tests/test_cast_infrastructure.py | janluak/dynamo_db_resource | f05403b61c71b1df8dcad65e099c648507f295e7 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
import json
with open(Path(Path(__file__).parent, "test_data/tables/TableForInfrastructureTest.json")) as f:
DATABASE_SCHEMA = json.load(f)
def test_to_infrastructure_code():
from dynamo_db_resource.table_existence import convert_schema_to_infrastructure_code
assert convert_schem... | 28.75 | 96 | 0.465217 |
ff8e3fb70686c920322dad27f27bed32ddf1249a | 114 | py | Python | hs_odm2/apps.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_odm2/apps.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_odm2/apps.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | # -*- coding: utf-8 -*-
from django.apps import AppConfig
class HsOdm2Config(AppConfig):
name = 'hs_odm2'
| 12.666667 | 33 | 0.666667 |
ff8e73d2c6e545c141d6068ec9e57dae5d91b8dc | 17,480 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/9_crop/1/train1_lm.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/9_crop/1/train1_lm.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/9_crop/1/train1_lm.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa
from tqdm import tqdm
import PIL
from PIL import Image... | 35.746421 | 123 | 0.656979 |
ff8e81afb7a2fcedb51814e11d5abf327aedab99 | 23,431 | py | Python | galois/_modular.py | iyanmv/galois | a5e6386a684e3e0b47af608217002795dc25c702 | [
"MIT"
] | null | null | null | galois/_modular.py | iyanmv/galois | a5e6386a684e3e0b47af608217002795dc25c702 | [
"MIT"
] | null | null | null | galois/_modular.py | iyanmv/galois | a5e6386a684e3e0b47af608217002795dc25c702 | [
"MIT"
] | null | null | null | import math
from typing import List, Optional
import numpy as np
from ._factor import factors
from ._math import lcm
from ._overrides import set_module
__all__ = [
"totatives", "euler_phi", "carmichael_lambda", "is_cyclic",
"is_primitive_root", "primitive_root", "primitive_roots",
]
@set_module("galois")
d... | 36.496885 | 165 | 0.594469 |
ff8e8397e7c8b2f9717e2c565142ac884a3d636a | 4,794 | py | Python | skynet/consensus/get_block_challenge.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 7 | 2021-09-07T02:14:15.000Z | 2022-03-27T06:42:35.000Z | skynet/consensus/get_block_challenge.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 1 | 2021-10-21T16:38:56.000Z | 2021-11-15T13:03:15.000Z | skynet/consensus/get_block_challenge.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 3 | 2021-10-21T07:17:40.000Z | 2022-03-16T12:57:09.000Z | import logging
from typing import List, Union
from skynet.consensus.block_record import BlockRecord
from skynet.consensus.blockchain_interface import BlockchainInterface
from skynet.consensus.constants import ConsensusConstants
from skynet.types.blockchain_format.sized_bytes import bytes32
from skynet.types.full_block... | 46.543689 | 120 | 0.695244 |
ff8e878543da79fe2cdc66fccae4cb4d81bd6131 | 135,016 | py | Python | nova/tests/unit/compute/test_resource_tracker.py | mariusleu/nova | b19e37cbfddfce0839dbeeb0d556ed1ffae664ad | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/compute/test_resource_tracker.py | mariusleu/nova | b19e37cbfddfce0839dbeeb0d556ed1ffae664ad | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/compute/test_resource_tracker.py | mariusleu/nova | b19e37cbfddfce0839dbeeb0d556ed1ffae664ad | [
"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
# d... | 43.979153 | 79 | 0.63054 |
ff8ea0b20117f60d27199e775c9e77eea7ed1aef | 1,688 | py | Python | tests/settings.py | unt-libraries/django-nomination | 90e42109f8113e411e51e29485e8d1f1e9848373 | [
"BSD-3-Clause"
] | 2 | 2016-12-07T09:09:11.000Z | 2018-01-31T13:57:04.000Z | tests/settings.py | unt-libraries/django-nomination | 90e42109f8113e411e51e29485e8d1f1e9848373 | [
"BSD-3-Clause"
] | 100 | 2016-01-21T19:52:57.000Z | 2021-06-01T20:23:59.000Z | tests/settings.py | unt-libraries/django-nomination | 90e42109f8113e411e51e29485e8d1f1e9848373 | [
"BSD-3-Clause"
] | null | null | null | import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '2itrmmu!xm++g)ua(z^h@2$0srye+d0gfy!j_$osjg4!7amnp!'
SITE_ID = 1
DEBUG = True
ALLOWED_HOSTS = [
'localhost',
'127.0.0.1',
]
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.co... | 23.123288 | 70 | 0.649882 |
ff8eaee4e3832ed013788f5e178fb099b46446a1 | 2,553 | py | Python | mmf/utils/env.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | mmf/utils/env.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | mmf/utils/env.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | import importlib
import os
import random
import sys
from datetime import datetime
import numpy as np
import torch
from mmf.utils.general import get_absolute_path
def set_seed(seed):
if seed:
if seed == -1:
# From detectron2
seed = (
os.getpid()
+ i... | 30.392857 | 84 | 0.640815 |
ff8eb06cb84f7efdef7150a7fa9e6d917eff9256 | 986 | py | Python | fud/fud/stages/relay.py | badenh/calyx | 020f04f090b95e2f986565eec7e3c1b0dfb68f4a | [
"MIT"
] | 109 | 2021-02-14T23:08:05.000Z | 2022-03-25T23:50:58.000Z | fud/fud/stages/relay.py | badenh/calyx | 020f04f090b95e2f986565eec7e3c1b0dfb68f4a | [
"MIT"
] | 432 | 2021-02-05T19:10:25.000Z | 2022-03-30T19:03:50.000Z | fud/fud/stages/relay.py | badenh/calyx | 020f04f090b95e2f986565eec7e3c1b0dfb68f4a | [
"MIT"
] | 21 | 2021-02-14T23:27:52.000Z | 2022-02-03T06:22:43.000Z | from pathlib import Path
from fud.stages import SourceType, Stage
from fud.utils import shell
class RelayStage(Stage):
"""
Stage that invokes the Relay frontend.
"""
name = "relay"
def __init__(self, config):
super().__init__(
src_state="relay",
target_state="fut... | 26.648649 | 77 | 0.587221 |
ff8ecdadb9b6cfbb1b968d48158fc7d08223d826 | 498 | py | Python | tests/test_bots/test_bots/test_decorators/test_exception_handler.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | tests/test_bots/test_bots/test_decorators/test_exception_handler.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | tests/test_bots/test_bots/test_decorators/test_exception_handler.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | import threading
import pytest
pytestmark = pytest.mark.asyncio
async def test_register_middleware_through_decorator(
bot,
client,
incoming_message,
build_failed_handler,
build_exception_catcher,
):
exception_event = threading.Event()
bot.exception_handler(Exception)(build_exception_catc... | 22.636364 | 78 | 0.777108 |
ff8edf3502625520cc12324892850f5676463028 | 4,851 | py | Python | 1_screen_pipeline/02_build_cre/check.py | weng-lab/SCREEN | e8e7203e2f9baa2de70e2f75bdad3ae24b568367 | [
"MIT"
] | 5 | 2020-07-30T02:35:20.000Z | 2020-12-24T01:26:47.000Z | 1_screen_pipeline/02_build_cre/check.py | weng-lab/SCREEN | e8e7203e2f9baa2de70e2f75bdad3ae24b568367 | [
"MIT"
] | 6 | 2021-03-04T10:30:11.000Z | 2022-03-16T16:47:47.000Z | 1_screen_pipeline/02_build_cre/check.py | weng-lab/SCREEN | e8e7203e2f9baa2de70e2f75bdad3ae24b568367 | [
"MIT"
] | 2 | 2020-12-08T10:05:02.000Z | 2022-03-10T09:41:19.000Z | #!/usr/bin/env python
# SPDX-License-Identifier: MIT
# Copyright (c) 2016-2020 Michael Purcaro, Henry Pratt, Jill Moore, Zhiping Weng
from __future__ import print_function
import os
import sys
import json
import psycopg2
import re
import argparse
import StringIO
sys.path.append(os.path.join(os.path.dirname(__file__... | 34.65 | 149 | 0.552051 |
ff8ef6866e9bba388be933d2e3afc9017db6bf80 | 23 | py | Python | xmap/__init__.py | jhamman/xmap | e530bca2753efaa31e276075c69dc83883861539 | [
"Apache-2.0"
] | 11 | 2017-01-11T08:53:40.000Z | 2021-01-28T01:51:33.000Z | xmap/__init__.py | NicWayand/xmap | e530bca2753efaa31e276075c69dc83883861539 | [
"Apache-2.0"
] | 2 | 2017-09-14T18:53:09.000Z | 2017-11-07T20:45:45.000Z | xmap/__init__.py | NicWayand/xmap | e530bca2753efaa31e276075c69dc83883861539 | [
"Apache-2.0"
] | 3 | 2017-08-23T16:05:09.000Z | 2018-08-07T15:53:02.000Z | from .xmap import XMap
| 11.5 | 22 | 0.782609 |
ff8f0131f73331779f57a10187185a656c1dc041 | 2,555 | py | Python | motion_repr_learning/ae/learn_dataset_encoding.py | ramfalas/Speech_driven_gesture_generation_with_autoencoder | 1ee381112d760a9d21b9ba1a87163ba2c0bed9ee | [
"Apache-2.0"
] | 65 | 2019-03-18T09:59:43.000Z | 2022-02-20T02:30:50.000Z | motion_repr_learning/ae/learn_dataset_encoding.py | GestureGeneration/Speech-driven-gesture-generation-with-autoencoder | 59e8ebdb0f6e87b0e81268046c99a4d6c9bf62a8 | [
"Apache-2.0"
] | 10 | 2019-07-12T06:46:14.000Z | 2022-01-06T07:34:37.000Z | motion_repr_learning/ae/learn_dataset_encoding.py | GestureGeneration/Speech-driven-gesture-generation-with-autoencoder | 59e8ebdb0f6e87b0e81268046c99a4d6c9bf62a8 | [
"Apache-2.0"
] | 21 | 2019-01-17T08:47:53.000Z | 2022-02-15T13:27:27.000Z | """
This file contains a script for learning encoding-decoding network
on our dataset.
Usage example: python learn_dataset_encoding.py data_dir
Developed by Taras Kucherenko (tarask@kth.se)
"""
import sys
import numpy as np
import os
import train as tr
from utils.utils import prepare_motion_data, DataSet, DataSets,... | 31.9375 | 123 | 0.67593 |
ff8f1b4ae90ba05680d44c43cada790cdc65f5b6 | 15,815 | py | Python | authors/apps/profiles/tests/tests.py | andela/ah-backend-prime | 0708463d4565a4977a5a5dcb839f1dfed52fdc90 | [
"BSD-3-Clause"
] | null | null | null | authors/apps/profiles/tests/tests.py | andela/ah-backend-prime | 0708463d4565a4977a5a5dcb839f1dfed52fdc90 | [
"BSD-3-Clause"
] | 22 | 2019-03-25T16:10:53.000Z | 2022-03-11T23:44:21.000Z | authors/apps/profiles/tests/tests.py | andela/ah-backend-prime | 0708463d4565a4977a5a5dcb839f1dfed52fdc90 | [
"BSD-3-Clause"
] | 6 | 2019-03-25T09:39:39.000Z | 2021-03-11T23:54:12.000Z | import json
from .test_base import BaseTestProfile
from rest_framework import status
from django.urls import reverse
from authors.apps.profiles.renderers import ProfileJSONRenderer
from authors.apps.profiles.tests.test_data import (VALID_LOGIN_DATA,
VALID_USER_DATA,
... | 32.144309 | 83 | 0.536642 |
ff8f33bb8f61da7ff1356c826e47cb03ba7e4020 | 9,617 | py | Python | svhn/adversarial_networks/models/resnet18.py | whxbergkamp/RobustDL_GAN | a622faf1c7d5e803bca3091dd035c616b5736bd7 | [
"MIT"
] | 22 | 2019-02-27T12:37:39.000Z | 2021-04-19T04:08:36.000Z | svhn/adversarial_networks/models/resnet18.py | whxbergkamp/RobustDL_GAN | a622faf1c7d5e803bca3091dd035c616b5736bd7 | [
"MIT"
] | 3 | 2019-06-28T21:51:04.000Z | 2021-03-19T08:08:50.000Z | svhn/adversarial_networks/models/resnet18.py | whxbergkamp/RobustDL_GAN | a622faf1c7d5e803bca3091dd035c616b5736bd7 | [
"MIT"
] | 4 | 2019-04-07T08:18:00.000Z | 2021-12-22T00:45:19.000Z |
import tensorflow as tf
from tensorflow.contrib import slim
import logging
logger = logging.getLogger(__name__)
_BATCH_NORM_DECAY = 0.997
_BATCH_NORM_EPSILON = 1e-5
################################################################################
# Convenience functions for building the ResNet model.
############... | 38.314741 | 136 | 0.691276 |
ff8f3c2b757a1168942aaa117ef9f138aa445324 | 15,355 | py | Python | tests/pytest/test_environments.py | bcdady/cloudtruth-cli | 9b556b728919c49195cdf89a64301a2ae6a0afe4 | [
"Apache-2.0"
] | null | null | null | tests/pytest/test_environments.py | bcdady/cloudtruth-cli | 9b556b728919c49195cdf89a64301a2ae6a0afe4 | [
"Apache-2.0"
] | null | null | null | tests/pytest/test_environments.py | bcdady/cloudtruth-cli | 9b556b728919c49195cdf89a64301a2ae6a0afe4 | [
"Apache-2.0"
] | null | null | null | from testcase import TestCase
from testcase import DEFAULT_ENV_NAME
from testcase import TEST_PAGE_SIZE
class TestEnvironments(TestCase):
def test_environment_basic(self):
# verify `env_name` does not yet exist
base_cmd = self.get_cli_base_cmd()
cmd_env = self.get_cmd_env()
env_nam... | 43.871429 | 108 | 0.64155 |
ff8f462a3ed15eece2696d1c0fe6e9e0c5790e3d | 12,057 | py | Python | api/views.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | api/views.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | api/views.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.db.utils import IntegrityError
from django.contrib.auth.models import Group
from django.core.validators import validate_email, ValidationError
from rest_framework import serializers
from rest_framework.generics import get_object_or_404
from rest_framework.respo... | 36.647416 | 79 | 0.715186 |
ff8f7c8e6a6abb36c58d6874ed3ffd510decf8ea | 2,566 | py | Python | SoftLayer/CLI/firewall/list.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/CLI/firewall/list.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/CLI/firewall/list.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | """List firewalls."""
# :license: MIT, see LICENSE for more details.
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
from SoftLayer import utils
import click
@click.command()
@environment.pass_env
def cli(env):
"""List firewalls."""
mgr = SoftLayer.FirewallManage... | 29.837209 | 75 | 0.537802 |
ff8f94acd2cf6576649c35bcf853f9acf5078489 | 1,847 | py | Python | ramp-frontend/ramp_frontend/tests/test_testing.py | tomMoral/ramp-board | 9e3aa335a90701e2ae4c6295eb2b77f3555f54de | [
"BSD-3-Clause"
] | null | null | null | ramp-frontend/ramp_frontend/tests/test_testing.py | tomMoral/ramp-board | 9e3aa335a90701e2ae4c6295eb2b77f3555f54de | [
"BSD-3-Clause"
] | null | null | null | ramp-frontend/ramp_frontend/tests/test_testing.py | tomMoral/ramp-board | 9e3aa335a90701e2ae4c6295eb2b77f3555f54de | [
"BSD-3-Clause"
] | null | null | null | import shutil
import pytest
from ramp_utils import generate_flask_config
from ramp_utils import read_config
from ramp_utils.testing import database_config_template
from ramp_utils.testing import ramp_config_template
from ramp_database.model import Model
from ramp_database.testing import create_toy_db
from ramp_datab... | 33.581818 | 77 | 0.731456 |
ff8fa67bdf27070f23d87be4ecbca010299a49be | 553 | py | Python | examples/globals.py | quynhanh-ngx/pytago | de976ad8d85702ae665e97978bc4a75d282c857f | [
"MIT"
] | 206 | 2021-06-24T16:16:13.000Z | 2022-03-31T07:44:17.000Z | examples/globals.py | quynhanh-ngx/pytago | de976ad8d85702ae665e97978bc4a75d282c857f | [
"MIT"
] | 13 | 2021-06-24T17:51:36.000Z | 2022-02-23T10:07:17.000Z | examples/globals.py | quynhanh-ngx/pytago | de976ad8d85702ae665e97978bc4a75d282c857f | [
"MIT"
] | 14 | 2021-06-26T02:19:45.000Z | 2022-03-30T03:02:49.000Z | SITE = "https://www.google.com/"
NAME = ["Michael", "Wayne", "Phelps"]
KEYS = {1: 2, 3: 4}
AGE = 1000
BIRTH_YEAR = 2050
def main():
global AGE
print(SITE)
print(NAME)
print(BIRTH_YEAR)
print(KEYS)
print(AGE)
AGE = 20 # This should use the variable from the global scope
other_1()
p... | 17.83871 | 66 | 0.616637 |
ff9029d307d3a0396ab7102a5cdc04c763310177 | 413 | py | Python | scripts/py/one_off/stripped_lengths.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | scripts/py/one_off/stripped_lengths.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | scripts/py/one_off/stripped_lengths.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | from time import sleep
from legislative_act import model as dm
MAXLEN = 1000000
aids = [h.meta.id for h in dm.Search().filter('term', doc_type='article').scan()
if len(h.body.stripped) > 1000000]
print(aids)
for aid in aids:
print(aid, flush=True)
c = dm.Article.get(aid)
c.body.stripped = c.body... | 19.666667 | 80 | 0.653753 |
ff9050bffcc0cfe2f570669fa1e01be146b0e499 | 4,666 | py | Python | hypixel/vampirez.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 10 | 2020-06-06T13:57:46.000Z | 2021-11-08T09:27:42.000Z | hypixel/vampirez.py | HypixelBot/Bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 7 | 2020-06-06T14:04:05.000Z | 2020-07-05T04:05:37.000Z | hypixel/vampirez.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 14 | 2020-06-09T17:12:52.000Z | 2021-07-21T23:24:30.000Z | import datetime
from hypixel.utils.functions import *
class VampireZ(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.utils = utils(self.bot)
@commands.command(hidden=True, enabled=False)
async def HiddenVampireZ(self, ctx, user):
start = datetime.datetime.now()
... | 53.022727 | 215 | 0.572225 |
ff908dfc74f6a59a55574355a3ead1fd3a430281 | 31 | py | Python | sandbox/settings/__init__.py | django-oscar/django-oscar-docdata | 8f95458d4dff7d27ec507bacfede0a19e1f0e6b2 | [
"ECL-2.0",
"Apache-2.0"
] | 15 | 2017-04-25T10:31:27.000Z | 2022-03-01T10:58:10.000Z | sandbox/settings/__init__.py | django-oscar/django-oscar-docdata | 8f95458d4dff7d27ec507bacfede0a19e1f0e6b2 | [
"ECL-2.0",
"Apache-2.0"
] | 45 | 2017-04-26T13:17:51.000Z | 2022-02-16T12:27:57.000Z | sandbox/settings/__init__.py | django-oscar/django-oscar-docdata | 8f95458d4dff7d27ec507bacfede0a19e1f0e6b2 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2017-07-18T03:43:53.000Z | 2020-07-10T16:29:30.000Z | from .default import * # noqa | 31 | 31 | 0.677419 |
ff909d5988b30c8ee05a348cd076a4bcbdc59ea8 | 34,347 | py | Python | src/streamlink_cli/main.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | 1 | 2019-11-25T01:37:21.000Z | 2019-11-25T01:37:21.000Z | src/streamlink_cli/main.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | src/streamlink_cli/main.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | import argparse
import errno
import logging
import os
import platform
from collections import OrderedDict
from gettext import gettext
import requests
import sys
import signal
import webbrowser
from contextlib import closing
from distutils.version import StrictVersion
from functools import partial
from itertools impor... | 33.089595 | 106 | 0.624829 |
ff90e6036c0f3051878ce06e0fa3062c74ffd567 | 2,290 | py | Python | zhaquirks/centralite/3310S.py | artmg/zha-device-handlers | 5b30b8b0ffb8ff2b23ea4ce8dcbf0fa556843c1c | [
"Apache-2.0"
] | null | null | null | zhaquirks/centralite/3310S.py | artmg/zha-device-handlers | 5b30b8b0ffb8ff2b23ea4ce8dcbf0fa556843c1c | [
"Apache-2.0"
] | null | null | null | zhaquirks/centralite/3310S.py | artmg/zha-device-handlers | 5b30b8b0ffb8ff2b23ea4ce8dcbf0fa556843c1c | [
"Apache-2.0"
] | null | null | null | from zigpy.profiles import PROFILES, zha
from zigpy.zcl.clusters.general import Basic, Identify,\
PollControl, Ota
from zhaquirks.centralite import PowerConfigurationCluster
from zigpy.zcl.clusters.measurement import TemperatureMeasurement
from zigpy.quirks import CustomDevice
from zigpy.quirks.smartthings import S... | 32.714286 | 73 | 0.588646 |
ff90e6d399f9d8874d6b614089d0575edf93eb12 | 2,355 | py | Python | scorpio_bringup/launch/zero_move.py | applejenny66/goldpaint | cbb368d2d21cc1e26177314eb1e6fceb7c6e6c8d | [
"MIT"
] | null | null | null | scorpio_bringup/launch/zero_move.py | applejenny66/goldpaint | cbb368d2d21cc1e26177314eb1e6fceb7c6e6c8d | [
"MIT"
] | 1 | 2020-08-10T05:33:02.000Z | 2020-08-10T05:33:02.000Z | scorpio_bringup/launch/zero_move.py | applejenny66/goldpaint | cbb368d2d21cc1e26177314eb1e6fceb7c6e6c8d | [
"MIT"
] | 1 | 2021-05-20T09:08:05.000Z | 2021-05-20T09:08:05.000Z | #!/usr/bin/env python
import rospy
import moveit_commander
import moveit_msgs.msg
import geometry_msgs.msg
import actionlib
from control_msgs.msg import GripperCommandAction, GripperCommandGoal
from control_msgs.msg import GripperCommand
from math import pi
from std_msgs.msg import String
from moveit_commander.convers... | 30.584416 | 130 | 0.732909 |
ff90fdcbe08900a5417f9b88ad199032ca4f6d82 | 2,870 | py | Python | bark_ml/tests/capability_gnn_actor/actor_nets.py | mansoorcheema/bark-ml | 349c0039a5f54778d6b7aea7fd18e3e979efc3a3 | [
"MIT"
] | 3 | 2020-04-25T12:38:55.000Z | 2020-04-29T11:55:45.000Z | bark_ml/tests/capability_gnn_actor/actor_nets.py | mansoorcheema/bark-ml | 349c0039a5f54778d6b7aea7fd18e3e979efc3a3 | [
"MIT"
] | 1 | 2020-07-19T06:58:21.000Z | 2020-07-19T06:58:21.000Z | bark_ml/tests/capability_gnn_actor/actor_nets.py | mansoorcheema/bark-ml | 349c0039a5f54778d6b7aea7fd18e3e979efc3a3 | [
"MIT"
] | 1 | 2022-01-27T13:08:46.000Z | 2022-01-27T13:08:46.000Z | # Copyright (c) 2020 fortiss GmbH
#
# Authors: Silvan Wimmer
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
import numpy as np
import time
import tensorflow as tf
class RandomActorNet:
"""RandomActor which returns uniformely sampled random acti... | 33.372093 | 79 | 0.672474 |
ff90ff1e639032671f26e29fbc7e1bbd67d82d7a | 27,290 | py | Python | google/cloud/compute_v1/services/target_grpc_proxies/transports/rest.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/target_grpc_proxies/transports/rest.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/target_grpc_proxies/transports/rest.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | 39.379509 | 105 | 0.586918 |
ff91115d9911846d4c4c8b252fbcda21e98c92e3 | 2,600 | py | Python | venv/lib/python3.8/site-packages/dateparser/data/date_translation_data/sg.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | 1 | 2021-11-17T04:55:14.000Z | 2021-11-17T04:55:14.000Z | dateparser/data/date_translation_data/sg.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | dateparser/data/date_translation_data/sg.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
info = {
"name": "sg",
"date_order": "DMY",
"january": [
"nyenye",
"nye"
],
"february": [
"fulundïgi",
"ful"
],
"march": [
"mbängü",
"mbä"
],
"april": [
"ngubùe",
"ngu"
],
"may": [
... | 15.204678 | 26 | 0.267308 |
ff911309b37626a28000c800ba3e2d60a19c25b8 | 2,504 | py | Python | venv/lib/python3.8/site-packages/autocorrect-2.3.0-py3.8.egg/autocorrect/constants.py | spacerockzero/dupecheck-py | 33b8ae324eb012ac3f13dfd572ca99ecc7c89f0f | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/autocorrect-2.3.0-py3.8.egg/autocorrect/constants.py | spacerockzero/dupecheck-py | 33b8ae324eb012ac3f13dfd572ca99ecc7c89f0f | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/autocorrect-2.3.0-py3.8.egg/autocorrect/constants.py | spacerockzero/dupecheck-py | 33b8ae324eb012ac3f13dfd572ca99ecc7c89f0f | [
"MIT"
] | null | null | null | word_regexes = {
"en": r"[A-Za-z]+",
"pl": r"[A-Za-zęĘóÓąĄśŚłŁżŻźŹćĆńŃ]+",
"ru": r"[АаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя]+",
"uk": r"[АаБбВвГ㥴ДдЕеЄєЖжЗзИиІіЇїЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЬЮюЯя]+",
"tr": r"[a-zA-ZçÇğĞüÜöÖşŞıİ]+",
"es": r"[A-Za-zÁáÉéÍíÓóÚúÜüÑñ]... | 44.714286 | 107 | 0.6877 |
ff9114bf3d39079b867435c589dfd3cbaaa08382 | 11,817 | py | Python | apis/aws-batch/batch-ingest.py | mitochon/TileDB-VCF | 143d53734ab9496ad0c47222ba0ca015ab54b64f | [
"MIT"
] | 45 | 2019-11-12T19:21:11.000Z | 2022-03-30T17:29:17.000Z | apis/aws-batch/batch-ingest.py | mitochon/TileDB-VCF | 143d53734ab9496ad0c47222ba0ca015ab54b64f | [
"MIT"
] | 135 | 2019-11-12T19:24:51.000Z | 2022-03-30T01:47:31.000Z | apis/aws-batch/batch-ingest.py | mitochon/TileDB-VCF | 143d53734ab9496ad0c47222ba0ca015ab54b64f | [
"MIT"
] | 8 | 2019-12-04T21:34:28.000Z | 2021-09-03T15:01:11.000Z | #!/usr/bin/env python
import batchmetrics
import boto3
import click
import math
import sys
import tempfile
import os
# Path and size of scratch directory in the tiledbvcf container.
scratch_path = "/data"
scratch_size_mb = 1000 * 1024 # 1TB
class JobInfo(object):
"""Simple struct to contain batch job informati... | 31.851752 | 88 | 0.628078 |
ff91260e01b62cc774569b36a9608e8783322d55 | 16,993 | py | Python | facebook_business/asyncobjects/aioedgeiterator.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | facebook_business/asyncobjects/aioedgeiterator.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | facebook_business/asyncobjects/aioedgeiterator.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | 1 | 2018-09-24T14:04:48.000Z | 2018-09-24T14:04:48.000Z | import logging
import random
import time
from six import string_types, text_type, binary_type
from requests.exceptions import ConnectionError
import facebook_business.api
from facebook_business.exceptions import FacebookUnavailablePropertyException, FacebookApiTimeout, FacebookRequestError
from facebook_business.util... | 36.38758 | 119 | 0.606191 |
ff9136523a12d6809935f41c67478e0f5c235a18 | 912 | py | Python | blog/urls.py | zouyapeng/Homepage | 6e2b13ef2003fda5a74840b6627e7e0cb0f0c08c | [
"Apache-2.0"
] | null | null | null | blog/urls.py | zouyapeng/Homepage | 6e2b13ef2003fda5a74840b6627e7e0cb0f0c08c | [
"Apache-2.0"
] | null | null | null | blog/urls.py | zouyapeng/Homepage | 6e2b13ef2003fda5a74840b6627e7e0cb0f0c08c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf.urls import url, include
import views
urlpatterns = [
# url(r'^$', TemplateView.as_view(template_name='blog/index.html'), name='index'),
url(r'^$', views.BlogArchiveIndexView.as_view(), name='index'),
url(
r'^(?P<year>\d{4})/$',
views.BlogYe... | 30.4 | 87 | 0.531798 |
ff91588a0181b49dcd16f37b7744878d56358550 | 3,544 | py | Python | graph.py | jakub-olczyk/graph.py | a7f710acdb1ba5a322bdaf44f06473f0b5e3dad9 | [
"MIT"
] | null | null | null | graph.py | jakub-olczyk/graph.py | a7f710acdb1ba5a322bdaf44f06473f0b5e3dad9 | [
"MIT"
] | null | null | null | graph.py | jakub-olczyk/graph.py | a7f710acdb1ba5a322bdaf44f06473f0b5e3dad9 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import collections
class Graph():
""" This class implements proof of concept graph class with different
iterators for DFS and BFS
Graph is implemented using adjacency lists, as in this suggestion:
https://www.python.org/doc/essays/graphs/
"""
class __dfs_iter():
... | 30.290598 | 80 | 0.539503 |
ff9174aa303c700c5705614d5d02ba67573cbe7d | 164 | py | Python | pytrol/model/action/Actions.py | mothguib/pytrol | 1b9634fb97e77407b4c609399c27663396a8d7e3 | [
"MIT"
] | null | null | null | pytrol/model/action/Actions.py | mothguib/pytrol | 1b9634fb97e77407b4c609399c27663396a8d7e3 | [
"MIT"
] | null | null | null | pytrol/model/action/Actions.py | mothguib/pytrol | 1b9634fb97e77407b4c609399c27663396a8d7e3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class Actions:
None_action = -1
Going_to = 0
Moving_to = 1
Waiting = 2
Sending_message = 3
Stopping_move = 4
| 10.25 | 23 | 0.554878 |
ff917bbbcaa5984e5590e4906fa23cc063cc0a26 | 24,889 | py | Python | volatility/framework/symbols/windows/extensions/__init__.py | orchechik/volatility3 | 99a536e57e908850a656f8aed6262d56f60e4bdc | [
"Linux-OpenIB"
] | null | null | null | volatility/framework/symbols/windows/extensions/__init__.py | orchechik/volatility3 | 99a536e57e908850a656f8aed6262d56f60e4bdc | [
"Linux-OpenIB"
] | null | null | null | volatility/framework/symbols/windows/extensions/__init__.py | orchechik/volatility3 | 99a536e57e908850a656f8aed6262d56f60e4bdc | [
"Linux-OpenIB"
] | null | null | null | # This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
import collections.abc
import datetime
import functools
import logging
import struct
from typing import Iterable, Iterator, Optional... | 37.147761 | 119 | 0.611354 |
ff9199cfd0c6e6e5905d0380b6fb31d71b869e9f | 7,876 | py | Python | tensorflow/contrib/tensor_forest/python/topn.py | smarthi/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 2 | 2019-10-09T08:06:48.000Z | 2021-01-07T03:16:09.000Z | tensorflow/contrib/tensor_forest/python/topn.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 1 | 2017-02-06T08:12:22.000Z | 2017-02-06T08:12:22.000Z | tensorflow/contrib/tensor_forest/python/topn.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 45.790698 | 80 | 0.697181 |
ff91b95140c14cef39e27486a8facd9f18e96abd | 2,860 | py | Python | extracted_data/extracted_song.py | jcontesti/spotify-solar-radio-chart | 8b397d900b68ccb10e367383bde0bd8d7c1b9374 | [
"MIT"
] | 1 | 2020-02-14T09:20:29.000Z | 2020-02-14T09:20:29.000Z | extracted_data/extracted_song.py | jcontesti/spotify-solar-radio-chart | 8b397d900b68ccb10e367383bde0bd8d7c1b9374 | [
"MIT"
] | 1 | 2022-03-02T14:56:11.000Z | 2022-03-02T14:56:11.000Z | extracted_data/extracted_song.py | jcontesti/spotify-solar-radio-chart | 8b397d900b68ccb10e367383bde0bd8d7c1b9374 | [
"MIT"
] | null | null | null | """Class that represents a song that has been extracted from any source."""
from typing import List
class ExtractedSong:
"""Class that represents an song that has been extracted from any source."""
ARTISTS_SEPARATORS = [
' & ',
' ft ',
' ft. ',
' feat ',
' feat. ',
... | 28.039216 | 80 | 0.569231 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.