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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1f58099aa1fd3866ae1ea7e7e33449de571610fe | 45,464 | py | Python | manila/db/api.py | vponomaryov/manila | ffe135a5b35a0964179f0dc148d569037f26a929 | [
"Apache-2.0"
] | null | null | null | manila/db/api.py | vponomaryov/manila | ffe135a5b35a0964179f0dc148d569037f26a929 | [
"Apache-2.0"
] | null | null | null | manila/db/api.py | vponomaryov/manila | ffe135a5b35a0964179f0dc148d569037f26a929 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file... | 36.025357 | 79 | 0.703942 |
16a7d8514eedbe4bb8befe8ce33d4255d7a8e120 | 8,284 | py | Python | usr/local/lib/python3.6/dist-packages/pymux/stream.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | usr/local/lib/python3.6/dist-packages/pymux/stream.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 1 | 2018-04-04T12:13:40.000Z | 2018-05-03T07:57:52.000Z | usr/local/lib/python3.6/dist-packages/pymux/stream.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | """
Improvements on Pyte.
"""
from __future__ import unicode_literals
from pyte.streams import Stream
from pyte.escape import NEL
from pyte import control as ctrl
from collections import defaultdict
from .log import logger
import re
__all__ = (
'BetterStream',
)
class BetterStream(Stream):
"""
Extensio... | 37.826484 | 94 | 0.516176 |
b20dea5cc5b5ab522587da64fa1028aabc5d1f39 | 698 | py | Python | Q153FindMinimuminRotatedSortedArray.py | ChenliangLi205/LeetCode | 6c547c338eb05042cb68f57f737dce483964e2fd | [
"MIT"
] | null | null | null | Q153FindMinimuminRotatedSortedArray.py | ChenliangLi205/LeetCode | 6c547c338eb05042cb68f57f737dce483964e2fd | [
"MIT"
] | null | null | null | Q153FindMinimuminRotatedSortedArray.py | ChenliangLi205/LeetCode | 6c547c338eb05042cb68f57f737dce483964e2fd | [
"MIT"
] | null | null | null | class Solution(object):
def findMin(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
if len(nums) == 0:
return 0
if len(nums) == 1:
return nums[0]
if(nums[-1] > nums[0]):
return nums[0]
if(nums[-1] < nums[-2]):... | 26.846154 | 50 | 0.429799 |
90997ba5d0f48bfd02438dbd1da28f9572c546eb | 19,535 | py | Python | src/lib/opts_deploy.py | gordonjun2/CenterNet-1 | 82c8fcf30faf9ea5bbbf84dda55ff57db3f089b5 | [
"MIT"
] | null | null | null | src/lib/opts_deploy.py | gordonjun2/CenterNet-1 | 82c8fcf30faf9ea5bbbf84dda55ff57db3f089b5 | [
"MIT"
] | null | null | null | src/lib/opts_deploy.py | gordonjun2/CenterNet-1 | 82c8fcf30faf9ea5bbbf84dda55ff57db3f089b5 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import os
import sys
class opts(object):
def __init__(self):
self.parser = argparse.ArgumentParser()
# basic experiment setting
self.parser.add_argument('--task', default='ctdet_d... | 51.816976 | 125 | 0.55956 |
601dac3a1208b92d411eced1db3178198ae83ee2 | 282,172 | py | Python | pandas/core/frame.py | maheshbapatu/pandas | 308e1cbb64869fe5ce2fbd921e7148b4705bbdd1 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/frame.py | maheshbapatu/pandas | 308e1cbb64869fe5ce2fbd921e7148b4705bbdd1 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/frame.py | maheshbapatu/pandas | 308e1cbb64869fe5ce2fbd921e7148b4705bbdd1 | [
"BSD-3-Clause"
] | null | null | null | """
DataFrame
---------
An efficient 2D container for potentially mixed-type time series or other
labeled data series.
Similar to its R counterpart, data.frame, except providing automatic data
alignment and a host of useful data manipulation methods having to do with the
labeling information
"""
import collections
fro... | 34.529124 | 169 | 0.531435 |
70717a4d1424cf9b4ce01dc88af553dac4ab5ddb | 11,946 | py | Python | yt/frontends/stream/io.py | aemerick/yt | 984484616d75c6d7603e71b9d45c5d617705a0e5 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/frontends/stream/io.py | aemerick/yt | 984484616d75c6d7603e71b9d45c5d617705a0e5 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/frontends/stream/io.py | aemerick/yt | 984484616d75c6d7603e71b9d45c5d617705a0e5 | [
"BSD-3-Clause-Clear"
] | null | null | null | import numpy as np
from yt.utilities.io_handler import \
BaseIOHandler
from yt.utilities.logger import ytLogger as mylog
from yt.utilities.exceptions import YTDomainOverflow
class IOHandlerStream(BaseIOHandler):
_dataset_type = "stream"
_vector_fields = ("particle_velocity", "particle_position")
def... | 41.193103 | 96 | 0.53407 |
00617736ea06d241d0707e5eb0ef471b6054cd52 | 2,459 | py | Python | Automatic_Inter_var_server_new.py | krishdb38/Bio_python | e20ba5579e1e6b4ecf9fe72ef9e21a5960416ae4 | [
"MIT"
] | null | null | null | Automatic_Inter_var_server_new.py | krishdb38/Bio_python | e20ba5579e1e6b4ecf9fe72ef9e21a5960416ae4 | [
"MIT"
] | null | null | null | Automatic_Inter_var_server_new.py | krishdb38/Bio_python | e20ba5579e1e6b4ecf9fe72ef9e21a5960416ae4 | [
"MIT"
] | null | null | null | #/bin/python
import os
import subprocess
from subprocess import run
#! This must be run in linux
in_path = "/BiO/Preterm/raw_data/"
# Old 20 and new 40 are different
out_path = "/BiO/Preterm/intervar_result/"
# Check for old and New
#files = [1119,910,873,1489,989,880,1282,1584,875,1009,1093,1134,1293,1316,1389,142... | 33.684932 | 157 | 0.640911 |
16b1dc7bc0cc1d0714307f72eaaf4b99e2eb8741 | 8,221 | py | Python | salt/modules/test.py | sunbenxin/salt | b821f6a174e67a3e1def1ba7fa16885cd985bb0c | [
"Apache-2.0"
] | 1 | 2016-03-13T09:05:15.000Z | 2016-03-13T09:05:15.000Z | salt/modules/test.py | sunbenxin/salt | b821f6a174e67a3e1def1ba7fa16885cd985bb0c | [
"Apache-2.0"
] | null | null | null | salt/modules/test.py | sunbenxin/salt | b821f6a174e67a3e1def1ba7fa16885cd985bb0c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Module for running arbitrary tests
'''
# Import Python libs
import os
import sys
import time
import random
# Import Salt libs
import salt
import salt.version
import salt.loader
def echo(text):
'''
Return a string - used for testing the connection
CLI Example:
.. code-bl... | 20.865482 | 80 | 0.588006 |
4b5cfe0982be016ffaf7b0bfe9d6cf4590bccc24 | 1,062 | py | Python | independence_tests/mi/var_info.py | marcuskaiser/projects | 4841bb3adcd8625681d50bc8a2eed599eae44305 | [
"MIT"
] | 1 | 2020-04-20T20:05:00.000Z | 2020-04-20T20:05:00.000Z | independence_tests/mi/var_info.py | marcuskaiser/projects | 4841bb3adcd8625681d50bc8a2eed599eae44305 | [
"MIT"
] | null | null | null | independence_tests/mi/var_info.py | marcuskaiser/projects | 4841bb3adcd8625681d50bc8a2eed599eae44305 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.stats import entropy
from independence_tests.mi.utils import _check_xy, _get_bins, _mi
from independence_tests.utils import fast_rank
def var_info(x, y, bins=None, rank=False, norm=False):
"""
Variation of Information
https://en.wikipedia.org/wiki/Variation_of_information
... | 27.230769 | 70 | 0.6629 |
de7995d52e07fbbcdaadec89aa51fc87a77616e6 | 2,829 | py | Python | _2020.py | LariUnkari/advent-of-code-2020 | 426142a6911d0f186967db9aa84432ceaf8c7bf0 | [
"CC0-1.0"
] | null | null | null | _2020.py | LariUnkari/advent-of-code-2020 | 426142a6911d0f186967db9aa84432ceaf8c7bf0 | [
"CC0-1.0"
] | null | null | null | _2020.py | LariUnkari/advent-of-code-2020 | 426142a6911d0f186967db9aa84432ceaf8c7bf0 | [
"CC0-1.0"
] | null | null | null | """Advent of Code 2020 Solutions
Author: Lari Unkari
"""
#Definitions
import os, importlib, modules.userInput
DAY_COUNT = len([f for f in os.listdir("days/") if f.startswith("day") == True])
def get_day_input():
"""Takes in user input for day choice"""
print(f"Select day (1-{DAY_COUNT:d}), then press ente... | 30.75 | 119 | 0.604454 |
5fa59caac11b5de7bac8da330cf15072ff6e7cca | 22,649 | py | Python | contrib/devtools/copyright_header.py | suprnurd/MicroPaymentCoin | a3cd265a866b8213d6150e3a8848f2b3adc35512 | [
"MIT"
] | null | null | null | contrib/devtools/copyright_header.py | suprnurd/MicroPaymentCoin | a3cd265a866b8213d6150e3a8848f2b3adc35512 | [
"MIT"
] | null | null | null | contrib/devtools/copyright_header.py | suprnurd/MicroPaymentCoin | a3cd265a866b8213d6150e3a8848f2b3adc35512 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2018 The Bitcoin Core developers
# Copyright (c) 2018-2019 The PIVX developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import re
import fnmatch
import sys
import subprocess
impor... | 36.47182 | 121 | 0.601484 |
5bbabfddc5fd8e9ed9f1043bc202c63580744030 | 14,278 | py | Python | astropy/io/misc/tests/test_hdf5.py | REMeyer/astropy | 28c49fb618538a01812e586cd07bccdf0591a6c6 | [
"BSD-3-Clause"
] | 3 | 2018-03-20T15:09:16.000Z | 2021-05-27T11:17:33.000Z | astropy/io/misc/tests/test_hdf5.py | REMeyer/astropy | 28c49fb618538a01812e586cd07bccdf0591a6c6 | [
"BSD-3-Clause"
] | null | null | null | astropy/io/misc/tests/test_hdf5.py | REMeyer/astropy | 28c49fb618538a01812e586cd07bccdf0591a6c6 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import print_function
import pytest
import numpy as np
from ....tests.helper import catch_warnings
from ....table import Table, Column
try:
import h5py
except ImportError:
HAS_H5PY = False
else:
HAS_H5PY = True
try:
imp... | 30.573876 | 106 | 0.635873 |
3cf5cf4944c82dc1e2013c870032327044ea5169 | 4,976 | py | Python | PyTorch/Resources/Examples/01_nn_classification.py | methylDragon/python-data-tools-reference | e965720aba05c326f5cad3c864ba820ad299533a | [
"MIT"
] | 9 | 2019-03-03T06:47:02.000Z | 2021-12-08T18:05:12.000Z | PyTorch/Resources/Examples/01_nn_classification.py | methylDragon/python-data-tools-reference | e965720aba05c326f5cad3c864ba820ad299533a | [
"MIT"
] | null | null | null | PyTorch/Resources/Examples/01_nn_classification.py | methylDragon/python-data-tools-reference | e965720aba05c326f5cad3c864ba820ad299533a | [
"MIT"
] | 4 | 2019-03-11T00:12:03.000Z | 2021-01-09T00:14:37.000Z | # Modified from SUTD
# Classification with FashionMNIST
import torchvision
from torchvision.datasets import FashionMNIST
from torch.utils.data import DataLoader
import torch
import torch.nn as nn
import torch.nn.functional as F
# MODEL ========================================================================
class F... | 35.798561 | 89 | 0.615957 |
582dcae9d30fb5d1fb0151568bd83d4fbf7564ba | 3,560 | py | Python | app/recipe/views.py | DDonts/Django-recipe-api | a5ba3ba90ab612ee40fb09a98c7bad66ca8f19e2 | [
"MIT"
] | null | null | null | app/recipe/views.py | DDonts/Django-recipe-api | a5ba3ba90ab612ee40fb09a98c7bad66ca8f19e2 | [
"MIT"
] | null | null | null | app/recipe/views.py | DDonts/Django-recipe-api | a5ba3ba90ab612ee40fb09a98c7bad66ca8f19e2 | [
"MIT"
] | null | null | null | from rest_framework.decorators import action
from rest_framework.response import Response
from rest_framework import viewsets, mixins, status
from rest_framework.authentication import TokenAuthentication
from rest_framework.permissions import IsAuthenticated
from core.models import Tag, Ingredient, Recipe
from recipe... | 32.363636 | 75 | 0.674719 |
b0fd59a2a866ec7f71f3d3c75363d5cf102e7bff | 4,673 | py | Python | RaspberryPi/app.py | DreamN/Smart-Tollbooth | 9f3af18a84cfd871ed1eaebcab1aea8b40dd2e91 | [
"MIT"
] | null | null | null | RaspberryPi/app.py | DreamN/Smart-Tollbooth | 9f3af18a84cfd871ed1eaebcab1aea8b40dd2e91 | [
"MIT"
] | null | null | null | RaspberryPi/app.py | DreamN/Smart-Tollbooth | 9f3af18a84cfd871ed1eaebcab1aea8b40dd2e91 | [
"MIT"
] | null | null | null | #################################################################
## SMART TOLLBOOTH PROJECT ##
#################################################################
#!/usr/bin/env python
# -*- coding: utf8 -*-
import RPi.GPIO as GPIO
import paho.mqtt.client as mqtt
from picamera impor... | 27.650888 | 105 | 0.585919 |
acf1e9532b7ac771f3df57c8b67c24d73d5c6aee | 1,721 | py | Python | pylib/rtstats_util.py | mustbei/rtstats | f1466c2af7b0ffa1c1433ede8276f915008d0170 | [
"Apache-2.0"
] | 2 | 2017-02-09T18:59:50.000Z | 2017-02-09T19:07:36.000Z | pylib/rtstats_util.py | mustbei/rtstats | f1466c2af7b0ffa1c1433ede8276f915008d0170 | [
"Apache-2.0"
] | 8 | 2016-10-04T14:01:01.000Z | 2017-04-20T12:39:40.000Z | pylib/rtstats_util.py | mustbei/rtstats | f1466c2af7b0ffa1c1433ede8276f915008d0170 | [
"Apache-2.0"
] | 2 | 2019-04-01T19:01:52.000Z | 2019-11-22T20:26:31.000Z | """Collection of Utilities for rtstats"""
import json
import os
os.environ["MPLCONFIGDIR"] = "/tmp" # hack
import psycopg2
import matplotlib
from matplotlib.ticker import FuncFormatter
import matplotlib.dates as mdates
matplotlib.use("agg")
import matplotlib.pyplot as plt
from pandas.plotting import register_matpl... | 25.308824 | 73 | 0.629866 |
753cbf082451a5ca73a223f3000b69c3d37abaf7 | 57,631 | py | Python | Unicycle Simulation/scripts/drrrts_nmpc.py | TSummersLab/Risk_Bounded_Nonlinear_Robot_Motion_Planning | 717b9f07f4ed625ee33ab8ec22ce78dc2907d759 | [
"MIT"
] | 3 | 2022-01-07T19:37:03.000Z | 2022-03-15T08:50:28.000Z | Unicycle Simulation/scripts/drrrts_nmpc.py | TSummersLab/Risk_Bounded_Nonlinear_Robot_Motion_Planning | 717b9f07f4ed625ee33ab8ec22ce78dc2907d759 | [
"MIT"
] | null | null | null | Unicycle Simulation/scripts/drrrts_nmpc.py | TSummersLab/Risk_Bounded_Nonlinear_Robot_Motion_Planning | 717b9f07f4ed625ee33ab8ec22ce78dc2907d759 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Changelog:
New is v1_0:
- Create script
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Author:
Sleiman Safaoui
Email:
sleiman.safaoui@utdallas.edu
Github:
@The-SS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | 45.558103 | 194 | 0.580018 |
32bad00e0f89ef0bba12f5d7d6472b0409166d60 | 20,941 | py | Python | ddtrace/contrib/django/patch.py | yiweig/dd-trace-py | bce68ed584d2c3e4e6607a4f8da632c0ea72760a | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ddtrace/contrib/django/patch.py | yiweig/dd-trace-py | bce68ed584d2c3e4e6607a4f8da632c0ea72760a | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ddtrace/contrib/django/patch.py | yiweig/dd-trace-py | bce68ed584d2c3e4e6607a4f8da632c0ea72760a | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | """
The Django patching works as follows:
Django internals are instrumented via normal `patch()`.
`django.apps.registry.Apps.populate` is patched to add instrumentation for any
specific Django apps like Django Rest Framework (DRF).
"""
from inspect import getmro
from inspect import isclass
from inspect import isfunct... | 39.436911 | 120 | 0.673177 |
fd0955fc83ed137615937c5cc45563d9cfbb7950 | 2,100 | py | Python | aroundme/__main__.py | Rishabh570/what-is-around | fe7ff8e1c571b4501f5286ae84491d6a5190bf9b | [
"MIT"
] | null | null | null | aroundme/__main__.py | Rishabh570/what-is-around | fe7ff8e1c571b4501f5286ae84491d6a5190bf9b | [
"MIT"
] | null | null | null | aroundme/__main__.py | Rishabh570/what-is-around | fe7ff8e1c571b4501f5286ae84491d6a5190bf9b | [
"MIT"
] | null | null | null | import sys
import argparse
import requests
import googlemaps
# This class provides color options
class bcolors:
HEADER = '\033[95m'
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\03... | 32.8125 | 127 | 0.602381 |
31b132d51fd69fa5ebe4bd128619481b9a005b68 | 1,672 | py | Python | zentral/contrib/inventory/events/__init__.py | mikemcdonald/zentral | 4aa03937abfbcea6480aa04bd99f4da7b8dfc923 | [
"Apache-2.0"
] | null | null | null | zentral/contrib/inventory/events/__init__.py | mikemcdonald/zentral | 4aa03937abfbcea6480aa04bd99f4da7b8dfc923 | [
"Apache-2.0"
] | null | null | null | zentral/contrib/inventory/events/__init__.py | mikemcdonald/zentral | 4aa03937abfbcea6480aa04bd99f4da7b8dfc923 | [
"Apache-2.0"
] | 1 | 2020-09-09T19:26:04.000Z | 2020-09-09T19:26:04.000Z | import logging
from zentral.core.events import event_cls_from_type, register_event_type
from zentral.core.events.base import BaseEvent, EventMetadata
logger = logging.getLogger('zentral.contrib.inventory.events')
ALL_EVENTS_SEARCH_DICT = {"tag": "inventory_update"}
class InventoryMachineAdded(BaseEvent):
event... | 30.4 | 112 | 0.632177 |
5e08b3f133a1c8d5284d233a7632139fde21ff72 | 6,049 | py | Python | alipay/aop/api/domain/ContractQueryDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ContractQueryDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ContractQueryDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ContractAttachDTO import ContractAttachDTO
from alipay.aop.api.domain.ContractAttachDTO import ContractAttachDTO
class ContractQueryDTO(object):
def __init__(self):
s... | 34.175141 | 89 | 0.609688 |
dc2141b9fbd5fe516b4b88200b9b109689a03628 | 37,548 | py | Python | ckan/controllers/group.py | ziveo/ckan | f4cfe5e28789df58b2bf7e73e5989ffda00e5c5c | [
"Apache-2.0"
] | 1 | 2022-02-14T20:25:34.000Z | 2022-02-14T20:25:34.000Z | ckan/controllers/group.py | ziveo/ckan | f4cfe5e28789df58b2bf7e73e5989ffda00e5c5c | [
"Apache-2.0"
] | 4 | 2020-03-24T17:53:23.000Z | 2021-03-31T19:19:03.000Z | ckan/controllers/group.py | ziveo/ckan | f4cfe5e28789df58b2bf7e73e5989ffda00e5c5c | [
"Apache-2.0"
] | 3 | 2020-01-02T10:32:37.000Z | 2021-12-22T07:20:21.000Z | # encoding: utf-8
import logging
import datetime
from six.moves.urllib.parse import urlencode
from pylons.i18n import get_lang
from six import string_types, text_type
import ckan.lib.base as base
import ckan.lib.helpers as h
import ckan.lib.navl.dictization_functions as dict_fns
import ckan.logic as logic
import cka... | 39.691332 | 79 | 0.558192 |
c3282225cb57a4bff30b28c4ebcfc8d617f2b650 | 25,175 | py | Python | wagtailmodeladmin/options.py | rkhleics/wagtailmodeladmin | 7fddc853bab2ff3868b8c7a03329308c55f16358 | [
"MIT"
] | 77 | 2015-12-23T17:01:37.000Z | 2021-06-02T19:04:50.000Z | wagtailmodeladmin/options.py | ababic/wagtailmodeladmin | 7fddc853bab2ff3868b8c7a03329308c55f16358 | [
"MIT"
] | 27 | 2015-08-02T13:59:41.000Z | 2015-12-21T11:22:52.000Z | wagtailmodeladmin/options.py | rkhleics/wagtailmodeladmin | 7fddc853bab2ff3868b8c7a03329308c55f16358 | [
"MIT"
] | 17 | 2015-12-29T12:34:49.000Z | 2019-11-27T13:20:10.000Z | import warnings
from django.contrib.auth.models import Permission
from django.conf.urls import url
from django.core.urlresolvers import reverse
from django.core.exceptions import ImproperlyConfigured
from django.db.models import Model
from django.forms.widgets import flatatt
from django.utils.translation import ugette... | 38.259878 | 79 | 0.659901 |
96f546ec43f13e7f34658fd1113e09e62f6cb141 | 188,933 | py | Python | tests/functional/preview_and_dev/consts.py | alphagov/notify-functional-tests | 5d15be45500f381629c32dba7650dd77c9f58a2e | [
"MIT"
] | 3 | 2017-03-01T18:17:36.000Z | 2019-05-15T12:32:05.000Z | tests/functional/preview_and_dev/consts.py | alphagov/notify-functional-tests | 5d15be45500f381629c32dba7650dd77c9f58a2e | [
"MIT"
] | 110 | 2016-03-09T16:42:24.000Z | 2021-11-22T16:51:21.000Z | tests/functional/preview_and_dev/consts.py | alphagov/notify-functional-tests | 5d15be45500f381629c32dba7650dd77c9f58a2e | [
"MIT"
] | 4 | 2017-11-21T17:14:56.000Z | 2021-04-10T19:11:26.000Z | # These string constants are a copy of the base64 constants in
# https://github.com/alphagov/notifications-utils/blob/master/tests/pdf_consts.py
# The source pdfs are located here - https://github.com/alphagov/notifications-utils/tree/master/tests/test_files
# cat test_files/one_page_pdf.pdf | openssl base64 -A
one_pa... | 7,266.653846 | 122,268 | 0.967354 |
10a4654109a4de6765483d961ea5240e3193b14d | 1,285 | py | Python | etc/scripts/tree.py | bkchung/dotfiles_old | 396582eaea2a593f5f05908e136dca2cdf0fd29c | [
"Vim",
"curl",
"MIT"
] | 852 | 2015-01-15T23:22:27.000Z | 2022-03-12T04:13:45.000Z | etc/scripts/tree.py | bkchung/dotfiles_old | 396582eaea2a593f5f05908e136dca2cdf0fd29c | [
"Vim",
"curl",
"MIT"
] | 6 | 2015-10-05T02:47:13.000Z | 2022-03-11T15:34:31.000Z | etc/scripts/tree.py | bkchung/dotfiles_old | 396582eaea2a593f5f05908e136dca2cdf0fd29c | [
"Vim",
"curl",
"MIT"
] | 326 | 2015-02-26T12:37:39.000Z | 2022-03-13T12:34:46.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import sys
import os
INDENT_WIDTH = 4
EXCULUDE_LIST = ['.git']
def main(args):
path_list = []
if len(args) == 0:
path_list.append('.')
else:
for path in args:
path = os.path... | 29.204545 | 76 | 0.494942 |
51bc23e81e61870b4ab953c72f0a4c8077bc5a43 | 6,115 | py | Python | fastf1/utils.py | weracenet/Fast-F1 | d063234199043840c62c53df65f272d37cbef0c3 | [
"MIT"
] | null | null | null | fastf1/utils.py | weracenet/Fast-F1 | d063234199043840c62c53df65f272d37cbef0c3 | [
"MIT"
] | null | null | null | fastf1/utils.py | weracenet/Fast-F1 | d063234199043840c62c53df65f272d37cbef0c3 | [
"MIT"
] | null | null | null | """
Utils module - :mod:`fastf1.utils`
==================================
"""
from functools import reduce
import numpy as np
from datetime import datetime, timedelta
def delta_time(reference_lap, compare_lap):
# TODO move somewhere else
"""Calculates the delta time of a given lap, along the 'Distance' axis
... | 32.876344 | 96 | 0.597383 |
ac5103e137c648a786b603eadbad08a394a77885 | 801 | py | Python | mdp.py | rrmenon10/MarkovChain | e1143181338bef373ca27e44c483a97e60c17dec | [
"MIT"
] | null | null | null | mdp.py | rrmenon10/MarkovChain | e1143181338bef373ca27e44c483a97e60c17dec | [
"MIT"
] | null | null | null | mdp.py | rrmenon10/MarkovChain | e1143181338bef373ca27e44c483a97e60c17dec | [
"MIT"
] | null | null | null | __author__ = 'Rakesh R Menon'
class MarkovChain:
def __init__(self, chain_length):
if chain_length <=2:
raise ValueError('Please provide Markov Chain length > 2 for task.')
self.current_state = 2
self.goal_state = self.chain_length = chain_length
self.action_dim = 2
def reset(self):
self.current_st... | 20.025 | 71 | 0.700375 |
12d5e9b7df122a0cf6c087eac0da5d8b33e4567d | 1,354 | py | Python | cyber/python/cyber_py/examples/timer.py | dustinksi/Edith | 09f151612fadd2155b89c208e2af91c41d837a03 | [
"Apache-2.0"
] | 3 | 2020-02-07T13:09:50.000Z | 2020-08-31T12:37:48.000Z | cyber/python/cyber_py/examples/timer.py | dustinksi/Edith | 09f151612fadd2155b89c208e2af91c41d837a03 | [
"Apache-2.0"
] | null | null | null | cyber/python/cyber_py/examples/timer.py | dustinksi/Edith | 09f151612fadd2155b89c208e2af91c41d837a03 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# ****************************************************************************
# Copyright 2020 The Edith Author. 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 o... | 25.074074 | 78 | 0.604874 |
0b9d25c22cddf7a3a4eb0750fcd07eb6f910130b | 1,765 | py | Python | django_app/generate_views_urls.py | federiva/django-bootstrap-studio-tools | 3a016346c64d273b01cd92e2afef4ccb06f29987 | [
"MIT"
] | null | null | null | django_app/generate_views_urls.py | federiva/django-bootstrap-studio-tools | 3a016346c64d273b01cd92e2afef4ccb06f29987 | [
"MIT"
] | null | null | null | django_app/generate_views_urls.py | federiva/django-bootstrap-studio-tools | 3a016346c64d273b01cd92e2afef4ccb06f29987 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 9 13:16:15 2020
@author: federiva
"""
import sys
import os
def list_html_files(path_html):
abs_path= os.path.abspath(path_html)
html_files= os.listdir(path_html)
html_files= [os.path.join(abs_path, x) for x in html_files if x.endswith... | 30.964912 | 108 | 0.648159 |
098790b4c5385f6967f0d406ec8c856b9fe3385b | 9,803 | py | Python | tests/kafkatest/tests/connect/connect_rest_test.py | aartigupta/kafka | bf4fa286dfd4812229081c0f31d1318c360adb7f | [
"Apache-2.0"
] | null | null | null | tests/kafkatest/tests/connect/connect_rest_test.py | aartigupta/kafka | bf4fa286dfd4812229081c0f31d1318c360adb7f | [
"Apache-2.0"
] | null | null | null | tests/kafkatest/tests/connect/connect_rest_test.py | aartigupta/kafka | bf4fa286dfd4812229081c0f31d1318c360adb7f | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 50.530928 | 189 | 0.685504 |
dd7e46285d737c6c5680c47e62424896c521614f | 13,203 | py | Python | grafeas/rest.py | hanyuwang1993/client-python | 7eadfcc01047bc92fe1ff71faed1173d370b8954 | [
"Apache-2.0"
] | null | null | null | grafeas/rest.py | hanyuwang1993/client-python | 7eadfcc01047bc92fe1ff71faed1173d370b8954 | [
"Apache-2.0"
] | null | null | null | grafeas/rest.py | hanyuwang1993/client-python | 7eadfcc01047bc92fe1ff71faed1173d370b8954 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
grafeas.proto
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1beta1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
impor... | 40.75 | 134 | 0.541771 |
a83fbc9199b55abd2c3432061d0c714088cbba8d | 361 | py | Python | instagram_api/response/model/voter_info.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | 13 | 2019-08-07T21:24:34.000Z | 2020-12-12T12:23:50.000Z | instagram_api/response/model/voter_info.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | null | null | null | instagram_api/response/model/voter_info.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | null | null | null | from ..mapper import PropertyMapper, ApiInterfaceBase
from ..mapper.types import Timestamp, AnyType
from .voter import Voter
__all__ = ['VoterInfo', 'VoterInfoInterface']
class VoterInfoInterface(ApiInterfaceBase):
poll_id: int
voters: [Voter]
max_id: int
more_available: bool
class VoterInfo(Prope... | 20.055556 | 53 | 0.759003 |
51906d3990ac3ca8b1a1a679a6f804d49e0affab | 69,882 | py | Python | odim-controller/scripts/odim-controller.py | nimmalagautam/ODIM | 9da14cf26bcb8bf5177e4488ebd7a6ec5f7ebc60 | [
"Apache-2.0"
] | null | null | null | odim-controller/scripts/odim-controller.py | nimmalagautam/ODIM | 9da14cf26bcb8bf5177e4488ebd7a6ec5f7ebc60 | [
"Apache-2.0"
] | null | null | null | odim-controller/scripts/odim-controller.py | nimmalagautam/ODIM | 9da14cf26bcb8bf5177e4488ebd7a6ec5f7ebc60 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
#(C) Copyright [2020] Hewlett Packard Enterprise Development LP
#
#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 re... | 39.615646 | 313 | 0.739146 |
425fd5c0840cf5ac800e5edb68ac890f7262be50 | 648 | py | Python | computer/migrations/0001_initial.py | Zomba4okk/EmployeesManager | bff29dec7a7b83db79ef3449e19ad51b6fd4df8d | [
"MIT"
] | null | null | null | computer/migrations/0001_initial.py | Zomba4okk/EmployeesManager | bff29dec7a7b83db79ef3449e19ad51b6fd4df8d | [
"MIT"
] | null | null | null | computer/migrations/0001_initial.py | Zomba4okk/EmployeesManager | bff29dec7a7b83db79ef3449e19ad51b6fd4df8d | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2020-12-23 03:03
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Computer',
fields=[
('id', models.AutoField... | 27 | 114 | 0.560185 |
0f6f239ce7a7d71f01fe86cad02bcd999ccf2c42 | 5,833 | py | Python | samtranslator/feature_toggle/feature_toggle.py | BearerPipelineTest/serverless-application-model | 2be47dfdf1140b1e84a24bab392cfd634dfe9d1f | [
"Apache-2.0",
"MIT"
] | null | null | null | samtranslator/feature_toggle/feature_toggle.py | BearerPipelineTest/serverless-application-model | 2be47dfdf1140b1e84a24bab392cfd634dfe9d1f | [
"Apache-2.0",
"MIT"
] | null | null | null | samtranslator/feature_toggle/feature_toggle.py | BearerPipelineTest/serverless-application-model | 2be47dfdf1140b1e84a24bab392cfd634dfe9d1f | [
"Apache-2.0",
"MIT"
] | null | null | null | import os
import sys
import json
import boto3
import logging
import hashlib
from botocore.config import Config
from samtranslator.feature_toggle.dialup import (
DisabledDialup,
ToggleDialup,
SimpleAccountPercentileDialup,
)
from samtranslator.metrics.method_decorator import cw_timer
LOG = logging.getLogge... | 36.917722 | 123 | 0.674267 |
05948391e430bc86b87b3db56e00869f67095460 | 1,093 | py | Python | configs/twins/twins_svt-s_uperhead_8x2_512x512_160k_ade20k.py | heytanay/mmsegmentation | 7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8 | [
"Apache-2.0"
] | 11 | 2022-02-04T01:09:45.000Z | 2022-03-08T05:49:16.000Z | configs/twins/twins_svt-s_uperhead_8x2_512x512_160k_ade20k.py | heytanay/mmsegmentation | 7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8 | [
"Apache-2.0"
] | 1 | 2022-01-07T15:03:23.000Z | 2022-01-12T14:39:09.000Z | configs/twins/twins_svt-s_uperhead_8x2_512x512_160k_ade20k.py | heytanay/mmsegmentation | 7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8 | [
"Apache-2.0"
] | 2 | 2021-04-23T05:32:00.000Z | 2021-11-11T02:45:08.000Z | _base_ = [
'../_base_/models/twins_pcpvt-s_upernet.py',
'../_base_/datasets/ade20k.py', '../_base_/default_runtime.py',
'../_base_/schedules/schedule_160k.py'
]
model = dict(
backbone=dict(
type='SVT',
init_cfg=dict(
type='Pretrained', checkpoint='pretrained/alt_gvt_small.pth... | 26.02381 | 74 | 0.600183 |
814d030d0c581425cc9c8c7602c26b7424b22d29 | 17,800 | py | Python | qt_binder/widgets.py | Qt-Widgets/qt_binding-traits | 16c7a9ee439ff35d4d027c797ae1d05453a5fc06 | [
"BSD-3-Clause"
] | 15 | 2015-09-02T11:16:50.000Z | 2021-06-24T04:00:52.000Z | qt_binder/widgets.py | Qt-Widgets/qt_binding-traits | 16c7a9ee439ff35d4d027c797ae1d05453a5fc06 | [
"BSD-3-Clause"
] | 54 | 2015-09-02T10:45:49.000Z | 2020-11-30T13:01:05.000Z | qt_binder/widgets.py | Qt-Widgets/qt_binding-traits | 16c7a9ee439ff35d4d027c797ae1d05453a5fc06 | [
"BSD-3-Clause"
] | 3 | 2015-09-16T17:23:50.000Z | 2016-07-23T05:35:55.000Z | #------------------------------------------------------------------------------
#
# Copyright (c) 2014-2015, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only
# under the conditions descri... | 34.099617 | 79 | 0.59764 |
ea1750f6b9aa22e84bacf4224262692b624e9c58 | 127 | py | Python | function.py | jaiminjerry/Python | eb7013c7560b09d37849d653516257d939e143aa | [
"bzip2-1.0.6"
] | null | null | null | function.py | jaiminjerry/Python | eb7013c7560b09d37849d653516257d939e143aa | [
"bzip2-1.0.6"
] | null | null | null | function.py | jaiminjerry/Python | eb7013c7560b09d37849d653516257d939e143aa | [
"bzip2-1.0.6"
] | 1 | 2021-08-17T03:46:56.000Z | 2021-08-17T03:46:56.000Z | def example(): # def is a keyword to create any function.
print('Basic funtion')
z = 3+9
print(z)
example()
| 18.142857 | 58 | 0.590551 |
77217e38f9034246d687eb4f6c3c523afd6b10f8 | 3,830 | py | Python | webapp/app.py | eandreas/ds18b20 | eac5da4d26504a3b8f9472955ec7fe38b104e732 | [
"Apache-2.0"
] | null | null | null | webapp/app.py | eandreas/ds18b20 | eac5da4d26504a3b8f9472955ec7fe38b104e732 | [
"Apache-2.0"
] | null | null | null | webapp/app.py | eandreas/ds18b20 | eac5da4d26504a3b8f9472955ec7fe38b104e732 | [
"Apache-2.0"
] | null | null | null | from pathlib2 import Path
import dash
from dash.dependencies import Output, Input
import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
import pandas as pd
import plotly.graph_objects as go
import dash_bootstrap_components as dbc
external_stylesheets = [
dbc.themes.YETI... | 29.689922 | 143 | 0.493473 |
16adb4b410dc40a6ef49912b8a2f533cfddda810 | 7,830 | py | Python | SIVAE.py | mingzhang-yin/SIVI-Semi-implicit-Variational-Inference- | c457d09dddcfed94602c48e75ba6f2a3d159b3dc | [
"MIT"
] | 80 | 2018-05-29T04:29:25.000Z | 2022-03-22T02:02:17.000Z | SIVAE.py | mingzhang-yin/SIVI-Semi-implicit-Variational-Inference- | c457d09dddcfed94602c48e75ba6f2a3d159b3dc | [
"MIT"
] | 1 | 2018-10-11T20:27:44.000Z | 2018-10-13T18:00:48.000Z | SIVAE.py | mingzhang-yin/SIVI-Semi-implicit-Variational-Inference- | c457d09dddcfed94602c48e75ba6f2a3d159b3dc | [
"MIT"
] | 13 | 2018-05-28T22:35:40.000Z | 2021-02-12T04:13:04.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import matplotlib
matplotlib.use('Agg')
import numpy as np
import os
import sys
import seaborn as sns
import scipy.spatial.distance
from matplotlib import pyplot as plt
import pandas as pd
import scipy.stats ... | 31.700405 | 122 | 0.673308 |
6bc5156345fc949358ea0409b7852ee508bcd3d3 | 1,228 | py | Python | examples/maze/maze-4.py | predicatemike/predigame | 096e8379beb1d40ccb3f19ed2bb3ad82b405bb7f | [
"Apache-2.0"
] | null | null | null | examples/maze/maze-4.py | predicatemike/predigame | 096e8379beb1d40ccb3f19ed2bb3ad82b405bb7f | [
"Apache-2.0"
] | null | null | null | examples/maze/maze-4.py | predicatemike/predigame | 096e8379beb1d40ccb3f19ed2bb3ad82b405bb7f | [
"Apache-2.0"
] | null | null | null | WIDTH = 30
HEIGHT = 18
TITLE = 'MAZE'
# a callback that keeps the player from running
# into walls. it's only acceptable to walk into
# an object marked as a "destination"
def evaluate(action, sprite, pos):
obj = at(pos)
if obj:
if obj.tag == 'destination':
return True
else:
... | 26.12766 | 64 | 0.675896 |
8b26d5cfde285a20fd04097031792962b1d79b30 | 5,604 | py | Python | src/models/yolo/yolo_layers.py | Brechard/computer-vision-tf2 | 6ccd2a669058f0c106d9b26a6e2c674b235fed6d | [
"MIT"
] | 4 | 2019-11-26T19:01:57.000Z | 2020-04-02T05:41:16.000Z | src/models/yolo/yolo_layers.py | Brechard/computer-vision-tf2 | 6ccd2a669058f0c106d9b26a6e2c674b235fed6d | [
"MIT"
] | null | null | null | src/models/yolo/yolo_layers.py | Brechard/computer-vision-tf2 | 6ccd2a669058f0c106d9b26a6e2c674b235fed6d | [
"MIT"
] | 2 | 2020-02-27T12:27:33.000Z | 2021-05-03T03:44:14.000Z | import tensorflow as tf
import tensorflow.keras.layers as layers
from tensorflow.keras.regularizers import l2
def concat_layers(n_filters: int, upsample_features: tf.Tensor,
skip_features: tf.Tensor) -> tf.keras.layers.Concatenate:
""" Layers to concatenate the features from bigger features that... | 48.730435 | 119 | 0.701642 |
da4246f8755c36017baa2425da0f755362539b29 | 468 | py | Python | Python/check-if-word-is-valid-after-substitutions.py | black-shadows/LeetCode-Solutions | b1692583f7b710943ffb19b392b8bf64845b5d7a | [
"Fair",
"Unlicense"
] | null | null | null | Python/check-if-word-is-valid-after-substitutions.py | black-shadows/LeetCode-Solutions | b1692583f7b710943ffb19b392b8bf64845b5d7a | [
"Fair",
"Unlicense"
] | null | null | null | Python/check-if-word-is-valid-after-substitutions.py | black-shadows/LeetCode-Solutions | b1692583f7b710943ffb19b392b8bf64845b5d7a | [
"Fair",
"Unlicense"
] | null | null | null | # Time: O(n)
# Space: O(n)
class Solution(object):
def isValid(self, S):
"""
:type S: str
:rtype: bool
"""
stack = []
for i in S:
if i == 'c':
if stack[-2:] == ['a', 'b']:
stack.pop()
... | 22.285714 | 45 | 0.32265 |
af0639c7e26b5e80852d8598387a5f1af757d40d | 250 | py | Python | NLTK/raws.py | samuelwycliffe/Machine-Learning | 2fa6632ed1cfc591711c6b463ea40f95c2c2ae50 | [
"MIT"
] | null | null | null | NLTK/raws.py | samuelwycliffe/Machine-Learning | 2fa6632ed1cfc591711c6b463ea40f95c2c2ae50 | [
"MIT"
] | null | null | null | NLTK/raws.py | samuelwycliffe/Machine-Learning | 2fa6632ed1cfc591711c6b463ea40f95c2c2ae50 | [
"MIT"
] | null | null | null | from nltk.tokenize import sent_tokenize, word_tokenize
EXAMPLE_TEXT = "Hello Mr. Smith, how are you doing today? The weather is great, and Python is awesome. The sky is pinkish-blue. You shouldn't eat cardboard."
print(sent_tokenize(EXAMPLE_TEXT))
| 41.666667 | 157 | 0.792 |
24f123af501a97e3e02bcda444aa2e8b1fb263d1 | 2,698 | py | Python | games/xworld/tasks/XWorldLanObjectToDirection.py | emailweixu/XWorld | 3c5f2180e2152f5d96dde1c1a27c96af07525a4c | [
"Apache-2.0"
] | null | null | null | games/xworld/tasks/XWorldLanObjectToDirection.py | emailweixu/XWorld | 3c5f2180e2152f5d96dde1c1a27c96af07525a4c | [
"Apache-2.0"
] | null | null | null | games/xworld/tasks/XWorldLanObjectToDirection.py | emailweixu/XWorld | 3c5f2180e2152f5d96dde1c1a27c96af07525a4c | [
"Apache-2.0"
] | null | null | null | import random
from xworld_task import XWorldTask
class XWorldLanObjectToDirection(XWorldTask):
def __init__(self, env):
super(XWorldLanObjectToDirection, self).__init__(env)
def idle(self):
"""
Start a task
"""
agent, _, _ = self._get_agent()
goals = self._get_g... | 32.119048 | 93 | 0.5404 |
59d206dff7612af87b03dafe4125b6fa7376b907 | 20,185 | py | Python | lib/googlecloudsdk/third_party/apis/clouderrorreporting/v1beta1/clouderrorreporting_v1beta1_messages.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/third_party/apis/clouderrorreporting/v1beta1/clouderrorreporting_v1beta1_messages.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/third_party/apis/clouderrorreporting/v1beta1/clouderrorreporting_v1beta1_messages.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | 1 | 2020-07-24T21:52:25.000Z | 2020-07-24T21:52:25.000Z | """Generated message classes for clouderrorreporting version v1beta1.
Google Stackdriver Error Reporting groups and counts similar errors from cloud
services. The Google Stackdriver Error Reporting API provides read access to
error groups and their associated errors.
"""
# NOTE: This file is autogenerated and should n... | 40.450902 | 87 | 0.748229 |
d3ee5951809f8a2bf4e1a39418e037ea297c315d | 5,188 | py | Python | train.py | baoyujing/multi_gras | 1bc9b72bee786f5a439c1119a86b6ebaa19bf9f9 | [
"MIT"
] | null | null | null | train.py | baoyujing/multi_gras | 1bc9b72bee786f5a439c1119a86b6ebaa19bf9f9 | [
"MIT"
] | null | null | null | train.py | baoyujing/multi_gras | 1bc9b72bee786f5a439c1119a86b6ebaa19bf9f9 | [
"MIT"
] | null | null | null | import os
import yaml
import time
import json
import torch
import logging
import argparse
from tqdm import tqdm
from modules.multi_gras import MultiGraS
from data_management.vocabulary import Vocabulary
from data_management.data_loader import DataLoader
from evaluate import Evaluator
logging.basicConfig(level=logging... | 36.027778 | 114 | 0.595027 |
5cb42fef59f4f2c234cd6fc8bc17bb516f5721b9 | 604 | py | Python | blender/arm/logicnode/math/LN_separate_rgb.py | Lykdraft/armory | da1cf33930ce9a8b1865d35c128fe4842bef2933 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/math/LN_separate_rgb.py | Lykdraft/armory | da1cf33930ce9a8b1865d35c128fe4842bef2933 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/math/LN_separate_rgb.py | Lykdraft/armory | da1cf33930ce9a8b1865d35c128fe4842bef2933 | [
"Zlib"
] | null | null | null | from arm.logicnode.arm_nodes import *
class SeparateColorNode(ArmLogicTreeNode):
"""Use to split a color into RGB values."""
bl_idname = 'LNSeparateColorNode'
bl_label = 'Separate RGB'
arm_version = 1
def init(self, context):
super(SeparateColorNode, self).init(context)
self.add_in... | 35.529412 | 86 | 0.688742 |
20ab7bc6ec02b4f298dbe73f357afa93b60f4b95 | 21,205 | py | Python | model_compound_scaling/main_grid_search.py | d-becking/neurips-2019-micronet-challenge | 157fa47e979f684f682f415b10dce1e3aa1b457b | [
"MIT"
] | 6 | 2019-12-13T22:47:17.000Z | 2021-01-22T11:05:34.000Z | model_compound_scaling/main_grid_search.py | d-becking/neurips-2019-micronet-challenge | 157fa47e979f684f682f415b10dce1e3aa1b457b | [
"MIT"
] | 12 | 2019-10-31T23:30:05.000Z | 2022-01-13T01:43:15.000Z | model_compound_scaling/main_grid_search.py | d-becking/neurips-2019-micronet-challenge | 157fa47e979f684f682f415b10dce1e3aa1b457b | [
"MIT"
] | 1 | 2021-03-30T08:58:04.000Z | 2021-03-30T08:58:04.000Z | '''
References:
https://github.com/TropComplique/trained-ternary-quantization
MIT License - Copyright (c) 2017 Dan Antoshchenko
https://github.com/uoguelph-mlrg/Cutout
Educational Community License, Version 2.0 (ECL-2.0) - Copyright (c) 2019 Vithursan Thangarasa
https://github.com/lukemelas/Efficien... | 38.836996 | 118 | 0.590946 |
3ccc8e234d64c6afbb716972d56c7fa3d5383223 | 65,019 | py | Python | test/functional/feature_block.py | criptolot/bsvcoin | 125fc951c1bb5a87b706c5a3821a1e3252f45a3d | [
"MIT"
] | null | null | null | test/functional/feature_block.py | criptolot/bsvcoin | 125fc951c1bb5a87b706c5a3821a1e3252f45a3d | [
"MIT"
] | null | null | null | test/functional/feature_block.py | criptolot/bsvcoin | 125fc951c1bb5a87b706c5a3821a1e3252f45a3d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test block processing."""
import copy
import struct
import time
from test_framework.blocktools import ... | 45.852609 | 183 | 0.593934 |
af38fa5a571d0819beeb283e9202f7c88428d851 | 3,363 | py | Python | src/hltv_api/api/stats.py | hoangvu01/hltv_python | 227947c7bfb2cbd475f1aefcda6447e677658820 | [
"MIT"
] | 2 | 2021-12-22T16:10:40.000Z | 2021-12-22T16:44:50.000Z | src/hltv_api/api/stats.py | hoangvu01/hltv_python | 227947c7bfb2cbd475f1aefcda6447e677658820 | [
"MIT"
] | null | null | null | src/hltv_api/api/stats.py | hoangvu01/hltv_python | 227947c7bfb2cbd475f1aefcda6447e677658820 | [
"MIT"
] | null | null | null | import os
from urllib.parse import urljoin
import pandas as pd
from lxml import html
from hltv_api.api.results import get_past_matches_ids
from hltv_api.client import HLTVClient
from hltv_api.common import HLTVConfig
from hltv_api.pages.matches import parse_match_page
from hltv_api.pages.stats import parse_map_stat_e... | 31.138889 | 88 | 0.663693 |
2db5da5aeec7dd84dcbb8d33922cf052d7495c34 | 3,622 | py | Python | tests/kernels/test_split.py | MammothStack/Lyteflow | 63a60f593b954f8a224fcd4864fe6af82d20dd91 | [
"MIT"
] | 1 | 2021-08-25T02:43:19.000Z | 2021-08-25T02:43:19.000Z | tests/kernels/test_split.py | MammothStack/Lyteflow | 63a60f593b954f8a224fcd4864fe6af82d20dd91 | [
"MIT"
] | null | null | null | tests/kernels/test_split.py | MammothStack/Lyteflow | 63a60f593b954f8a224fcd4864fe6af82d20dd91 | [
"MIT"
] | null | null | null | # Third party imports
import pytest
import warnings
# Local imports
from lyteflow.construct import PipeSystem
from lyteflow.kernels.split import *
from lyteflow.kernels.io import *
from lyteflow.kernels.merge import *
@pytest.fixture()
def dupe_pipe():
in_1 = Inlet(convert=True, name="in_2")
x = Duplicator(n... | 36.585859 | 86 | 0.615406 |
4cf223002be3c7fda49c43b0228b48ca61715157 | 442 | py | Python | PyOpenGL-3.0.2/OpenGL/raw/GL/SUN/convolution_border_modes.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | PyOpenGL-3.0.2/OpenGL/raw/GL/SUN/convolution_border_modes.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | PyOpenGL-3.0.2/OpenGL/raw/GL/SUN/convolution_border_modes.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | '''Autogenerated by get_gl_extensions script, do not edit!'''
from OpenGL import platform as _p
from OpenGL.GL import glget
EXTENSION_NAME = 'GL_SUN_convolution_border_modes'
_p.unpack_constants( """GL_WRAP_BORDER_SUN 0x81D4""", globals())
def glInitConvolutionBorderModesSUN():
'''Return boolean indicating whethe... | 36.833333 | 71 | 0.791855 |
d234d720f590bb37d0ffc5fdedb1a62b7085b3b7 | 303 | py | Python | Python/write-a-function/write-a-function.py | rutendo-nyakutira/HackerRankSolutions | 8aa3f922b8b2e06138ce1fc348b7634576b02b1f | [
"MIT"
] | null | null | null | Python/write-a-function/write-a-function.py | rutendo-nyakutira/HackerRankSolutions | 8aa3f922b8b2e06138ce1fc348b7634576b02b1f | [
"MIT"
] | null | null | null | Python/write-a-function/write-a-function.py | rutendo-nyakutira/HackerRankSolutions | 8aa3f922b8b2e06138ce1fc348b7634576b02b1f | [
"MIT"
] | null | null | null | def is_leap(year):
leap = False
if(year%4 ==0):
if(year%100 ==0):
if(year%400 ==0):
leap = True
else:
leap = False
else:
leap = True
return leap
year = int(input())
print(is_leap(year))
| 18.9375 | 30 | 0.40264 |
4835f4e7463cfef7b5f7d198e3cbc413b0995572 | 1,009 | py | Python | setup.py | lstillwe/Flask-GoogleMaps | a517fd7fc54f9438df524b80436697bef20a80d5 | [
"MIT"
] | 1 | 2020-08-12T20:32:43.000Z | 2020-08-12T20:32:43.000Z | setup.py | lstillwe/Flask-GoogleMaps | a517fd7fc54f9438df524b80436697bef20a80d5 | [
"MIT"
] | null | null | null | setup.py | lstillwe/Flask-GoogleMaps | a517fd7fc54f9438df524b80436697bef20a80d5 | [
"MIT"
] | null | null | null | # coding: utf8
from setuptools import setup, find_packages
setup(
name='Flask-GoogleMaps',
version='0.2.5',
license='MIT',
description='Small extension for Flask to make using Google Maps easy',
long_description=open('README.md').read(),
author='Bruno Rocha',
author_email='rochacbruno@gmai... | 32.548387 | 75 | 0.641229 |
0aeff6464afcdf619b2dc8172460e61069c54bfb | 1,865 | py | Python | test.py | StuSe/Multimodal-Shape-Completion | f053d0babdd223a7511911b8682afb80fbf42823 | [
"MIT"
] | 75 | 2020-07-04T22:26:29.000Z | 2022-03-28T06:07:50.000Z | test.py | StuSe/Multimodal-Shape-Completion | f053d0babdd223a7511911b8682afb80fbf42823 | [
"MIT"
] | 7 | 2020-08-13T16:06:00.000Z | 2021-07-30T02:07:44.000Z | test.py | StuSe/Multimodal-Shape-Completion | f053d0babdd223a7511911b8682afb80fbf42823 | [
"MIT"
] | 11 | 2020-07-05T02:35:22.000Z | 2022-01-18T10:52:21.000Z | from tqdm import tqdm
import torch
import os
from dataset import get_dataloader
from common import get_config
from agent import get_agent
from util.pc_utils import write_ply
from util.utils import cycle, ensure_dir
import random
random.seed(1856)
def main():
# create experiment config containing all hyperparamet... | 30.080645 | 115 | 0.653619 |
4ce4c742406652d6eee4b0667c64c591e2fb152e | 1,619 | py | Python | setup.py | peterk87/guppywuppy | 0d5ecdaa9c113a7c1a730e368ec319bcee38c05f | [
"MIT"
] | null | null | null | setup.py | peterk87/guppywuppy | 0d5ecdaa9c113a7c1a730e368ec319bcee38c05f | [
"MIT"
] | null | null | null | setup.py | peterk87/guppywuppy | 0d5ecdaa9c113a7c1a730e368ec319bcee38c05f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = ['Click>=7.0',
'pyguppyclient',
... | 28.403509 | 67 | 0.623842 |
49582821d8be412a43a6568f74732364170945b0 | 313 | py | Python | Chapter15/ex15.py | banerjeesamrat/LearnPythonTheHardWay.py | 2f97c4060c0b13222db8991c3dda743bdafcad58 | [
"MIT"
] | 2 | 2018-05-22T14:00:31.000Z | 2022-01-17T20:20:00.000Z | Chapter15/ex15.py | banerjeesamrat/LearnPythonTheHardWay.py | 2f97c4060c0b13222db8991c3dda743bdafcad58 | [
"MIT"
] | null | null | null | Chapter15/ex15.py | banerjeesamrat/LearnPythonTheHardWay.py | 2f97c4060c0b13222db8991c3dda743bdafcad58 | [
"MIT"
] | null | null | null |
"""
Author: Samrat Banerjee
Date: 25-05-2018
Description: Reading Files
"""
from sys import argv
script,filename=argv
txt=open(filename)
print("Here's your file %r:" %filename)
print(txt.read())
print("Type the filename again:")
file_again=input("> ")
txt_again=open(file_again)
print(txt_again.read())
| 12.52 | 39 | 0.71885 |
078d2e30ae6c4165c05e5c74471d6836b88cf3c4 | 7,045 | py | Python | gigalixir/observer.py | oleks/gigalixir-cli | d1b1c303e24be548ddc895165e34652c378f4347 | [
"MIT"
] | 52 | 2017-11-15T09:05:36.000Z | 2021-11-29T07:58:47.000Z | gigalixir/observer.py | oleks/gigalixir-cli | d1b1c303e24be548ddc895165e34652c378f4347 | [
"MIT"
] | 76 | 2017-08-17T16:58:48.000Z | 2022-03-11T11:01:15.000Z | gigalixir/observer.py | oleks/gigalixir-cli | d1b1c303e24be548ddc895165e34652c378f4347 | [
"MIT"
] | 50 | 2017-06-21T19:51:56.000Z | 2022-01-19T01:58:19.000Z | import logging
import signal
import os
import urllib
import json
import re
import uuid
import requests
import sys
import subprocess
import time
from .shell import cast, call
from . import app as gigalixir_app
from six.moves.urllib.parse import quote
def observer(ctx, app_name, erlang_cookie, ssh_opts, ssh_cmd):
if... | 48.253425 | 237 | 0.613911 |
8c9621639063d7b3499320f614cd0dc173d0c40f | 8,492 | py | Python | wavefront_api_client/models/paged_saved_search.py | httpsgithu/python-client | f85a530367cdabe458a11919ad35609b9bc0606b | [
"Apache-2.0"
] | null | null | null | wavefront_api_client/models/paged_saved_search.py | httpsgithu/python-client | f85a530367cdabe458a11919ad35609b9bc0606b | [
"Apache-2.0"
] | null | null | null | wavefront_api_client/models/paged_saved_search.py | httpsgithu/python-client | f85a530367cdabe458a11919ad35609b9bc0606b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Wavefront REST API Documentation
<p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the W... | 29.486111 | 409 | 0.593264 |
dcea7e058f217b4cdbce11e5bcd37673fb5e92b7 | 3,013 | py | Python | backend/workspaces/Jobs/views/jobList.py | makakken/roseguarden | 9a867f3d5e979b990bf474dcba81e5e9d0814c6a | [
"MIT"
] | null | null | null | backend/workspaces/Jobs/views/jobList.py | makakken/roseguarden | 9a867f3d5e979b990bf474dcba81e5e9d0814c6a | [
"MIT"
] | 50 | 2021-03-28T03:06:19.000Z | 2021-10-18T12:36:16.000Z | backend/workspaces/Jobs/views/jobList.py | makakken/roseguarden | 9a867f3d5e979b990bf474dcba81e5e9d0814c6a | [
"MIT"
] | 1 | 2021-07-30T07:12:46.000Z | 2021-07-30T07:12:46.000Z | """
The roseguarden project
Copyright (C) 2018-2020 Marcus Drobisch,
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This pr... | 34.632184 | 80 | 0.668769 |
03b64ed7c278c96f2c6d5c37474ae7716fe225d3 | 8,459 | py | Python | reviews/google_structured_data.py | UrbanBogger/horrorexplosion | 3698e00a6899a5e8b224cd3d1259c3deb3a2ca80 | [
"MIT"
] | null | null | null | reviews/google_structured_data.py | UrbanBogger/horrorexplosion | 3698e00a6899a5e8b224cd3d1259c3deb3a2ca80 | [
"MIT"
] | 4 | 2020-06-05T18:21:18.000Z | 2021-06-10T20:17:31.000Z | reviews/google_structured_data.py | UrbanBogger/horrorexplosion | 3698e00a6899a5e8b224cd3d1259c3deb3a2ca80 | [
"MIT"
] | null | null | null | from .models import return_mov_participation_data
MS_REVIEW_AUTHOR = 'Mitch Sokolov'
DD_REVIEW_AUTHOR = 'Dave Dukowski'
ORGANIZATION_NAME = 'The Horror Explosion'
ORGANIZATION_HOME_URL = 'http://www.horrorexplosion.com/'
CONTRIBUTORS_URL = 'http://www.horrorexplosion.com/reviews/contributors/'
CONTEXT = 'https://schem... | 39.900943 | 79 | 0.593924 |
fd83724a0df2b11853b181ae17f1baeac319895d | 1,000 | py | Python | blog/models.py | burhankapadia18/savagecoder | bbb5150473abcd1dd9a3557fdfcb2ef0d7ac7f41 | [
"MIT"
] | 1 | 2021-07-27T07:32:42.000Z | 2021-07-27T07:32:42.000Z | blog/models.py | burhankapadia18/savagecoder | bbb5150473abcd1dd9a3557fdfcb2ef0d7ac7f41 | [
"MIT"
] | null | null | null | blog/models.py | burhankapadia18/savagecoder | bbb5150473abcd1dd9a3557fdfcb2ef0d7ac7f41 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.utils.timezone import now
# Create your models here.
class Post(models.Model):
sno = models.AutoField(primary_key=True)
title = models.CharField(max_length=225)
content = models.TextField()
author = models.CharField(... | 32.258065 | 75 | 0.715 |
def1a13b0bb44dfdc0d9765f91f1290a5154ecff | 1,831 | py | Python | compiler/daanpnr.py | PietPtr/verilog2minecraft | 911a4e35df80c340747bbc7b53019a90cbac9e3b | [
"MIT"
] | null | null | null | compiler/daanpnr.py | PietPtr/verilog2minecraft | 911a4e35df80c340747bbc7b53019a90cbac9e3b | [
"MIT"
] | null | null | null | compiler/daanpnr.py | PietPtr/verilog2minecraft | 911a4e35df80c340747bbc7b53019a90cbac9e3b | [
"MIT"
] | null | null | null | import random
import numpy as np
from compiler.cell_defs import minecraft_cell_lib
from compiler.graph import collides_with_any
def place_and_route(unplaced):
to_place = [(None, unplaced[1])]
placed_cells = [x for x in unplaced if x.placed]
print(placed_cells)
while len(to_place) > 0:
place... | 32.122807 | 91 | 0.586565 |
5c204ab769e4dcb6393793ff1c1fc060fee38ec5 | 3,576 | py | Python | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_explorer_sink.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_explorer_sink.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2020-03-06T05:57:16.000Z | 2020-03-06T05:57:16.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_explorer_sink.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"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 ... | 46.441558 | 92 | 0.657718 |
89862f357f5f4151aa9e6187c0b86073e91413eb | 823 | py | Python | src/tutorialsite/tutorialsite/urls.py | hawwestin/MSR.Polls_sample | c88a30d763f319eecf2a8a69f8d39e0056a2aaf0 | [
"MIT"
] | null | null | null | src/tutorialsite/tutorialsite/urls.py | hawwestin/MSR.Polls_sample | c88a30d763f319eecf2a8a69f8d39e0056a2aaf0 | [
"MIT"
] | null | null | null | src/tutorialsite/tutorialsite/urls.py | hawwestin/MSR.Polls_sample | c88a30d763f319eecf2a8a69f8d39e0056a2aaf0 | [
"MIT"
] | null | null | null | """tutorialsite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/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')
Class-... | 34.291667 | 77 | 0.708384 |
c9a9309ad05cfabd46494c3cb1992effbdab6530 | 9,006 | py | Python | examples/music_drop_fade.py | czogran/pygame1 | 1591a3295402f914950ae15039b91136d8bf8f79 | [
"Python-2.0",
"OLDAP-2.3"
] | 3 | 2021-06-13T00:22:21.000Z | 2021-06-13T11:58:35.000Z | examples/music_drop_fade.py | czogran/pygame1 | 1591a3295402f914950ae15039b91136d8bf8f79 | [
"Python-2.0",
"OLDAP-2.3"
] | 7 | 2021-06-18T00:10:09.000Z | 2022-03-28T21:10:20.000Z | examples/music_drop_fade.py | czogran/pygame1 | 1591a3295402f914950ae15039b91136d8bf8f79 | [
"Python-2.0",
"OLDAP-2.3"
] | 4 | 2021-03-24T07:28:37.000Z | 2021-10-03T14:30:46.000Z | #!/usr/bin/env python
""" pygame.examples.music_drop_fade
Fade in and play music from a list while observing several events
Adds music files to a playlist whenever played by one of the following methods
Music files passed from the commandline are played
Music files and filenames are played when drag and dropped onto t... | 36.024 | 92 | 0.63058 |
ae14fd394a7b0d1f4196e9cc1de22c95b7e61737 | 36,932 | py | Python | v3.x/aerialvision/startup.py | csl-iisc/dws | 46d6c60d2b832525a8edf7b117b4d392c6a2f967 | [
"Unlicense"
] | null | null | null | v3.x/aerialvision/startup.py | csl-iisc/dws | 46d6c60d2b832525a8edf7b117b4d392c6a2f967 | [
"Unlicense"
] | null | null | null | v3.x/aerialvision/startup.py | csl-iisc/dws | 46d6c60d2b832525a8edf7b117b4d392c6a2f967 | [
"Unlicense"
] | 4 | 2021-04-24T00:08:23.000Z | 2021-05-13T06:30:21.000Z | #!/usr/bin/env python
# Copyright (C) 2009 by Aaron Ariel, Tor M. Aamodt, Andrew Turner, Wilson W. L.
# Fung, Zev Weiss and the University of British Columbia, Vancouver,
# BC V6T 1Z4, All Rights Reserved.
#
# THIS IS A LEGAL DOCUMENT BY DOWNLOADING GPGPU-SIM, YOU ARE AGREEING TO THESE
# TERMS AND CONDITIONS.
#
# T... | 42.159817 | 241 | 0.653065 |
c57c0f483e1ba06d5114da49cbadbc07b32e61c6 | 5,077 | py | Python | tests/nightly/model_backwards_compatibility_check/model_backwards_compat_inference.py | t-triobox/incubator-mxnet | 93aa9e33fcb2f216179c691ed9461bc96e37ae70 | [
"Apache-2.0"
] | 1 | 2021-11-09T01:40:17.000Z | 2021-11-09T01:40:17.000Z | tests/nightly/model_backwards_compatibility_check/model_backwards_compat_inference.py | t-triobox/incubator-mxnet | 93aa9e33fcb2f216179c691ed9461bc96e37ae70 | [
"Apache-2.0"
] | null | null | null | tests/nightly/model_backwards_compatibility_check/model_backwards_compat_inference.py | t-triobox/incubator-mxnet | 93aa9e33fcb2f216179c691ed9461bc96e37ae70 | [
"Apache-2.0"
] | 1 | 2018-07-19T00:43:30.000Z | 2018-07-19T00:43:30.000Z | #!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | 48.352381 | 116 | 0.688005 |
bc1683cc694d62cdb9ed9b67eefcb257d3c29e6d | 5,014 | py | Python | python/get_cooccurrence.py | undertherain/nlp_cooc | e316740c469e4ade6ba064e6756057fee10466ed | [
"Apache-2.0"
] | 1 | 2017-09-20T03:04:47.000Z | 2017-09-20T03:04:47.000Z | python/get_cooccurrence.py | undertherain/nlp_cooc | e316740c469e4ade6ba064e6756057fee10466ed | [
"Apache-2.0"
] | null | null | null | python/get_cooccurrence.py | undertherain/nlp_cooc | e316740c469e4ade6ba064e6756057fee10466ed | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import line_profiler
from timeit import default_timer as timer
import sys
import glob
import os
import re
import fnmatch
import math
import numpy as np
from vocabulary import Vocabulary
import collections
from scipy import sparse
from scipy.sparse import * # dok_matrix
from swig.array_of_trees i... | 27.102703 | 95 | 0.654767 |
18997b79b6ce35db54775d5c6c152e40294265e4 | 4,275 | py | Python | src/twitter_analysis_tools/plotting.py | dmmolitor/twitter_analysis_tools | 0599b6c1a5093ea2fb916d5fb05df92786ab6a61 | [
"MIT"
] | 1 | 2020-05-03T18:02:16.000Z | 2020-05-03T18:02:16.000Z | src/twitter_analysis_tools/plotting.py | dmmolitor/twitter_analysis_tools | 0599b6c1a5093ea2fb916d5fb05df92786ab6a61 | [
"MIT"
] | null | null | null | src/twitter_analysis_tools/plotting.py | dmmolitor/twitter_analysis_tools | 0599b6c1a5093ea2fb916d5fb05df92786ab6a61 | [
"MIT"
] | 1 | 2020-05-03T18:01:22.000Z | 2020-05-03T18:01:22.000Z | import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
sns.set(style="whitegrid", font_scale=1.5, context="talk")
"""
For details on the params below, see the matplotlib docs:
https://matplotlib.org/users/customizing.html
"""
plt.rcParams["axes.edgecolor"] = "0.6"
plt.rcParams["figure.dpi"] = 200
p... | 30.755396 | 84 | 0.625731 |
2244ed8b157c380beffe1ea6be468beaaa3957d1 | 1,268 | py | Python | django/contrib/gis/tests/geo3d/models.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | 2 | 2016-07-23T18:08:37.000Z | 2016-07-24T09:54:34.000Z | env/lib/python2.7/site-packages/django/contrib/gis/tests/geo3d/models.py | luiscarlosgph/nas | e5acee61e8bbf12c34785fe971ce7df8dee775d4 | [
"MIT"
] | 10 | 2019-12-26T17:31:31.000Z | 2022-03-21T22:17:33.000Z | env/lib/python2.7/site-packages/django/contrib/gis/tests/geo3d/models.py | luiscarlosgph/nas | e5acee61e8bbf12c34785fe971ce7df8dee775d4 | [
"MIT"
] | 1 | 2020-05-25T08:55:19.000Z | 2020-05-25T08:55:19.000Z | from django.contrib.gis.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class NamedModel(models.Model):
name = models.CharField(max_length=30)
objects = models.GeoManager()
class Meta:
abstract = True
app_label = 'geo3d'
de... | 19.212121 | 61 | 0.72082 |
6aa50d73cdb5503d3f00ea7e1cfb6b0835e5bf1f | 7,449 | py | Python | pywhistle/client.py | RobertD502/pywhistle | 2c0718a6041bf4c747bd229fc628774ce247c613 | [
"MIT"
] | 20 | 2019-02-18T02:53:21.000Z | 2021-07-10T18:22:29.000Z | pywhistle/client.py | RobertD502/pywhistle | 2c0718a6041bf4c747bd229fc628774ce247c613 | [
"MIT"
] | 7 | 2019-11-17T14:25:58.000Z | 2021-09-19T18:21:48.000Z | pywhistle/client.py | RobertD502/pywhistle | 2c0718a6041bf4c747bd229fc628774ce247c613 | [
"MIT"
] | 15 | 2019-11-17T04:16:46.000Z | 2021-07-18T00:51:59.000Z | from aiohttp import ClientSession, client_exceptions
WHISTLE_CONST = {
"proto": "https",
"remote_host": "app.whistle.com",
"endpoint": "api"
}
class Client:
"""
Returns a string: URL(host, endpoint, resource)
"""
def url(self, config, resource) -> str:
return "%s://%... | 30.528689 | 141 | 0.560478 |
2a5a1af65a40ae839eff82b001d865bf09f65fc2 | 45,431 | py | Python | src/DataDriver/DataDriver.py | WillyWinkel/robotframework-datadriver | b2ca59672ffd9c44764c009198948f3b94a460ff | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/DataDriver/DataDriver.py | WillyWinkel/robotframework-datadriver | b2ca59672ffd9c44764c009198948f3b94a460ff | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/DataDriver/DataDriver.py | WillyWinkel/robotframework-datadriver | b2ca59672ffd9c44764c009198948f3b94a460ff | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2018- René Rohner
#
# 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,... | 32.778499 | 139 | 0.599657 |
ae8425d1ecd7277285f54d7661eb0b7626689220 | 12,407 | py | Python | src/vm-builder-0.12.4+bzr489/build/lib.linux-x86_64-2.7/VMBuilder/plugins/__init__.py | cryptorinium/Num2 | e83ea5b18b7822c73699de2a667d189791c48fbb | [
"MIT"
] | null | null | null | src/vm-builder-0.12.4+bzr489/build/lib.linux-x86_64-2.7/VMBuilder/plugins/__init__.py | cryptorinium/Num2 | e83ea5b18b7822c73699de2a667d189791c48fbb | [
"MIT"
] | null | null | null | src/vm-builder-0.12.4+bzr489/build/lib.linux-x86_64-2.7/VMBuilder/plugins/__init__.py | cryptorinium/Num2 | e83ea5b18b7822c73699de2a667d189791c48fbb | [
"MIT"
] | null | null | null | #
# Uncomplicated VM Builder
# Copyright (C) 2007-2009 Canonical Ltd.
#
# See AUTHORS for list of contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, as
# published by the Free Software Foundation.
#
# ... | 37.59697 | 153 | 0.562021 |
15dfe899cbaa455fd0f81f045a547f7803f7a859 | 52,615 | py | Python | userbot/google_imgs.py | karcexy/Marshmello | 8035ddf830880fb860a12af3562a07f46f294641 | [
"MIT"
] | 2 | 2020-12-06T03:46:08.000Z | 2022-02-19T20:34:52.000Z | userbot/google_imgs.py | karcexy/Marshmello | 8035ddf830880fb860a12af3562a07f46f294641 | [
"MIT"
] | 4 | 2020-11-07T07:39:51.000Z | 2020-11-10T03:46:41.000Z | userbot/google_imgs.py | karcexy/Marshmello | 8035ddf830880fb860a12af3562a07f46f294641 | [
"MIT"
] | 9 | 2020-11-28T11:30:44.000Z | 2021-06-01T07:11:57.000Z | #Credit - Catuserbot @sandy1709
#!/usr/bin/env python
# In[ ]:
# coding: utf-8
###### Searching and Downloading Google Images to the local disk ######
# Import Libraries
# import encodes as request
import sys
import ast
version = (3, 0)
cur_version = sys.version_info
if cur_version >= version: # If the Current Ve... | 52.145689 | 622 | 0.574703 |
8766dffe73edf443043c12e35092d922cfc97e76 | 17,366 | py | Python | operations.py | JStuckner/smart_tem | 5381ba1fa5b74784e520bd0f07e420347959f72e | [
"MIT"
] | 1 | 2021-07-28T05:46:33.000Z | 2021-07-28T05:46:33.000Z | operations.py | JStuckner/smart_tem | 5381ba1fa5b74784e520bd0f07e420347959f72e | [
"MIT"
] | null | null | null | operations.py | JStuckner/smart_tem | 5381ba1fa5b74784e520bd0f07e420347959f72e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This module applies global filters to the image sets
Author: Joshua Stuckner
Date: 2017/06/21
"""
import warnings
import sys
import time
import math
import warnings
from scipy.ndimage import filters
from scipy.misc import imresize, imsave
import s... | 36.10395 | 103 | 0.572843 |
499c6e4d851ca3c855396bcccf78b9281d8625f1 | 3,843 | py | Python | desktop/core/ext-py/sqlalchemy-vertica-python-0.5.8/setup.py | aroville/hue | 63f5f9bcd18f9e76be1983a56137a30cbd96e49d | [
"Apache-2.0"
] | 1 | 2021-04-16T19:53:43.000Z | 2021-04-16T19:53:43.000Z | desktop/core/ext-py/sqlalchemy-vertica-python-0.5.8/setup.py | aroville/hue | 63f5f9bcd18f9e76be1983a56137a30cbd96e49d | [
"Apache-2.0"
] | null | null | null | desktop/core/ext-py/sqlalchemy-vertica-python-0.5.8/setup.py | aroville/hue | 63f5f9bcd18f9e76be1983a56137a30cbd96e49d | [
"Apache-2.0"
] | 4 | 2020-06-01T06:00:49.000Z | 2021-01-13T18:16:34.000Z | from decimal import Decimal
from distutils.cmd import Command
from setuptools import setup
from setuptools.command.install import install
import os.path
import sys
__version__ = '0.5.8'
# From https://circleci.com/blog/continuously-deploying-python-packages-to-pypi-with-circleci/
class VerifyVersionCommand(install)... | 34.00885 | 108 | 0.608379 |
606a8b21c1b51288e6d9a34e34efdb66daefdfd2 | 5,252 | py | Python | bitbots_bringup/scripts/game_settings.py | MosHumanoid/bitbots_misc | 0435dd2875cde68d625932a4408423958865c502 | [
"MIT"
] | null | null | null | bitbots_bringup/scripts/game_settings.py | MosHumanoid/bitbots_misc | 0435dd2875cde68d625932a4408423958865c502 | [
"MIT"
] | null | null | null | bitbots_bringup/scripts/game_settings.py | MosHumanoid/bitbots_misc | 0435dd2875cde68d625932a4408423958865c502 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
import yaml
import rospy
import rospkg
import os
import roslaunch
rospack = rospkg.RosPack()
# every parameter has its own SETTING_PATH
SETTING_PATH = rospack.get_path("bitbots_bringup") + "/config/game_settings.yaml"
TO_BE_SET_PATH = rospack.get_path("bitbots_bringup") + "/config/to_be... | 33.031447 | 143 | 0.616908 |
3ccbd3a0c20a489a69ce5b93ee3c020dfa8bfab7 | 2,044 | py | Python | cohesity_management_sdk/models/view_privileges.py | nick6655/management-sdk-python | 88e792cb83e5c24a22af495b220c145d0c45841d | [
"Apache-2.0"
] | 18 | 2019-09-24T17:35:53.000Z | 2022-03-25T08:08:47.000Z | cohesity_management_sdk/models/view_privileges.py | nick6655/management-sdk-python | 88e792cb83e5c24a22af495b220c145d0c45841d | [
"Apache-2.0"
] | 18 | 2019-03-29T19:32:29.000Z | 2022-01-03T23:16:45.000Z | cohesity_management_sdk/models/view_privileges.py | nick6655/management-sdk-python | 88e792cb83e5c24a22af495b220c145d0c45841d | [
"Apache-2.0"
] | 16 | 2019-02-27T06:54:12.000Z | 2021-11-16T18:10:24.000Z | # -*- coding: utf-8 -*-
# Copyright 2021 Cohesity Inc.
class ViewPrivileges(object):
"""Implementation of the 'ViewPrivileges' model.
ViewPrivileges specifies which views are allowed to be accessed by an app
instance.
Attributes:
privileges_type (PrivilegesTypeViewPrivilegesEnum): Specifies... | 30.507463 | 81 | 0.624755 |
f907ce92d42a26d992f1a6d46d12bcfd156f3b65 | 4,645 | py | Python | env/lib/python3.8/site-packages/unidecode/x088.py | avdhari/enigma | b7e965a91ca5f0e929c4c719d695f15ccb8b5a2c | [
"MIT"
] | 48 | 2021-11-20T08:17:53.000Z | 2022-03-19T13:57:15.000Z | venv/lib/python3.6/site-packages/unidecode/x088.py | mrsaicharan1/iiita-updates | a22a0157b90d29b946d0f020e5f76744f73a6bff | [
"Apache-2.0"
] | 392 | 2015-07-30T14:37:05.000Z | 2022-03-21T16:56:09.000Z | venv/lib/python3.6/site-packages/unidecode/x088.py | mrsaicharan1/iiita-updates | a22a0157b90d29b946d0f020e5f76744f73a6bff | [
"Apache-2.0"
] | 15 | 2015-10-01T21:31:08.000Z | 2020-05-05T00:03:27.000Z | data = (
'Ci ', # 0x00
'Xiang ', # 0x01
'She ', # 0x02
'Luo ', # 0x03
'Qin ', # 0x04
'Ying ', # 0x05
'Chai ', # 0x06
'Li ', # 0x07
'Ze ', # 0x08
'Xuan ', # 0x09
'Lian ', # 0x0a
'Zhu ', # 0x0b
'Ze ', # 0x0c
'Xie ', # 0x0d
'Mang ', # 0x0e
'Xie ', # 0x0f
'Qi ', # 0x10
'Ro... | 17.934363 | 23 | 0.390312 |
f3384e333fd19b76757f60f8b7bdd4f24e44f6b1 | 599 | py | Python | fractalis/data/etls/picsure/picsure_handler.py | thehyve/Fractalis | 5591112e5bc994eea5baf3d28caa7e5dfee85a57 | [
"Apache-2.0"
] | null | null | null | fractalis/data/etls/picsure/picsure_handler.py | thehyve/Fractalis | 5591112e5bc994eea5baf3d28caa7e5dfee85a57 | [
"Apache-2.0"
] | 6 | 2018-11-02T10:00:04.000Z | 2021-09-13T14:15:36.000Z | fractalis/data/etls/picsure/picsure_handler.py | thehyve/Fractalis | 5591112e5bc994eea5baf3d28caa7e5dfee85a57 | [
"Apache-2.0"
] | 1 | 2018-10-22T08:12:00.000Z | 2018-10-22T08:12:00.000Z | """This module provides PicSureHandler,
an implementation of ETLHandler for PIC-SURE."""
import logging
from fractalis.data.etlhandler import ETLHandler
from fractalis.data_services_config import Handler
logger = logging.getLogger(__name__)
class PicSureHandler(ETLHandler):
"""This ETLHandler provides integrat... | 26.043478 | 73 | 0.734558 |
3c72e0f0c29405a4894579907a1a630552a70adf | 8,859 | py | Python | torch_ecg/models/rr_lstm.py | wenh06/torch_ecg | a260bac0b4be8cd84c411874af3337358f135442 | [
"MIT"
] | 7 | 2020-09-29T09:29:18.000Z | 2021-04-13T14:22:57.000Z | torch_ecg/models/rr_lstm.py | wenh06/torch_ecg | a260bac0b4be8cd84c411874af3337358f135442 | [
"MIT"
] | null | null | null | torch_ecg/models/rr_lstm.py | wenh06/torch_ecg | a260bac0b4be8cd84c411874af3337358f135442 | [
"MIT"
] | 2 | 2021-04-28T03:13:11.000Z | 2021-05-15T14:15:34.000Z | """
AF (and perhaps other arrhythmias like preamature beats) detection
using rr time series as input and using lstm as model
References
----------
[1] https://github.com/al3xsh/rnn-based-af-detection
"""
from copy import deepcopy
from itertools import repeat
from collections import OrderedDict
from typing import Union... | 37.858974 | 124 | 0.603454 |
4c0cc9727616e422a857f962abbd0890fc58618b | 1,619 | py | Python | copydf/copydf.py | alonnir/copydf | dd5a460e010fc7acdfeb51251a611fb11dcf7e9d | [
"MIT"
] | null | null | null | copydf/copydf.py | alonnir/copydf | dd5a460e010fc7acdfeb51251a611fb11dcf7e9d | [
"MIT"
] | 1 | 2022-03-13T23:36:26.000Z | 2022-03-13T23:36:26.000Z | copydf/copydf.py | alonnir/copydf | dd5a460e010fc7acdfeb51251a611fb11dcf7e9d | [
"MIT"
] | 2 | 2021-04-18T12:06:00.000Z | 2022-03-05T11:19:13.000Z | from IPython import get_ipython
import re
def copyDF( df ):
'''
A function that copies a dataframe to your clipboard when run in Jupyter.
Args:
* df (``pandas.DataFrame``): a dataframe to copy to the local clipboard
Returns:
None
'''
ipy = get_ipython()
ipy.run_cel... | 42.605263 | 178 | 0.519456 |
29ca4ad6ff31597505881747800701ef1bf9f751 | 4,423 | py | Python | Betsy/Betsy/modules/index_reference_rsem.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 9 | 2017-01-13T02:38:41.000Z | 2021-04-08T00:44:39.000Z | Betsy/Betsy/modules/index_reference_rsem.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | null | null | null | Betsy/Betsy/modules/index_reference_rsem.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 4 | 2017-01-05T16:25:25.000Z | 2019-12-12T20:07:38.000Z | from Module import AbstractModule
class Module(AbstractModule):
def __init__(self):
AbstractModule.__init__(self)
def run(
self, network, antecedents, out_attributes, user_options, num_cores,
out_path):
import os
import shutil
#from genomicode import config
... | 34.023077 | 78 | 0.549627 |
335334ad65c5879939ec1b08c97e4dc6b7d84e76 | 7,229 | py | Python | mittab/urls.py | yoitsdave/mit-tab | e0c2bb845cf816291c5db624281d98f54ff4d263 | [
"MIT"
] | null | null | null | mittab/urls.py | yoitsdave/mit-tab | e0c2bb845cf816291c5db624281d98f54ff4d263 | [
"MIT"
] | null | null | null | mittab/urls.py | yoitsdave/mit-tab | e0c2bb845cf816291c5db624281d98f54ff4d263 | [
"MIT"
] | null | null | null | from django.views import i18n
from django.conf.urls import include, url
from django.contrib.auth.views import logout
from django.conf import settings
import mittab.apps.tab.views as views
import mittab.apps.tab.judge_views as judge_views
import mittab.apps.tab.team_views as team_views
import mittab.apps.tab.debater_vie... | 50.908451 | 83 | 0.67409 |
2a30e25d5fe9c18e235797b1bd19ab7ca2c34287 | 503 | py | Python | testkit/backend.py | AndyHeap-NeoTech/neo4j-dotnet-driver | ea19f49c6d09b824bef1fce86d66e92140a13dc5 | [
"Apache-2.0"
] | 1 | 2020-04-08T08:02:06.000Z | 2020-04-08T08:02:06.000Z | testkit/backend.py | AndyHeap-NeoTech/neo4j-dotnet-driver | ea19f49c6d09b824bef1fce86d66e92140a13dc5 | [
"Apache-2.0"
] | null | null | null | testkit/backend.py | AndyHeap-NeoTech/neo4j-dotnet-driver | ea19f49c6d09b824bef1fce86d66e92140a13dc5 | [
"Apache-2.0"
] | 1 | 2021-04-09T13:42:03.000Z | 2021-04-09T13:42:03.000Z | """
Executed in dotnet driver container.
Assumes driver and backend has been built.
Responsible for starting the test backend.
"""
import os, subprocess, sys
if __name__ == "__main__":
backend_path = os.path.join(
"bin", "Publish", "Neo4j.Driver.Tests.TestBackend.dll"
)
logfile_path = os.path.joi... | 23.952381 | 66 | 0.66004 |
fa9e0e5b10c152932c396e180da5d05301f21551 | 389 | py | Python | jtyoui/data/Enums.py | vanton/Jtyoui | c44d66b038ac5f4e2d75b68b3493d02f7b7b385e | [
"MIT"
] | 2 | 2019-11-06T01:47:17.000Z | 2019-11-06T01:48:19.000Z | jtyoui/data/Enums.py | liangxioa/Jtyoui | 5a584cbf12d644b6c4fb13167d8841a383afbbac | [
"MIT"
] | null | null | null | jtyoui/data/Enums.py | liangxioa/Jtyoui | 5a584cbf12d644b6c4fb13167d8841a383afbbac | [
"MIT"
] | null | null | null | #!/usr/bin/python3.7
# -*- coding: utf-8 -*-
# @Time : 2019/4/29 15:08
# @Author: Jtyoui@qq.com
from enum import Enum
class Languages(Enum):
"""英语单词对应中文"""
English = '英语'
Japanese = '日语'
Korean = '韩语'
French = '法语'
German = '德语'
Spanish = '西班牙语'
Chinese = '汉语'
if __name__ == '__main... | 17.681818 | 34 | 0.583548 |
1de2f8a6845eb094ec18e25ad3d21a1e102f1fa8 | 326 | py | Python | Python-Exercise-100/python-exercise-example72.py | MiracleWong/PythonPractice | 40aecd84045ad18f6aff95d5b8be8e352ca0a726 | [
"MIT"
] | null | null | null | Python-Exercise-100/python-exercise-example72.py | MiracleWong/PythonPractice | 40aecd84045ad18f6aff95d5b8be8e352ca0a726 | [
"MIT"
] | null | null | null | Python-Exercise-100/python-exercise-example72.py | MiracleWong/PythonPractice | 40aecd84045ad18f6aff95d5b8be8e352ca0a726 | [
"MIT"
] | null | null | null | #!#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Content:
# 地址:http: //www.runoob.com/python/python-exercise-example72.html
# 知识点:Python 链表
if __name__ == "__main__":
ptr = []
for i in range(5):
num = int(input("please input a number:\n"))
ptr.append(num)
print(ptr)
# TODO: List 作为链表来使... | 18.111111 | 65 | 0.601227 |
5c0189254064ee56c95d47514157c33692bb03a9 | 489 | py | Python | tests/test_app.py | JeremiahNgige/pitch-app | 2fc0e49f50cb2f936930ec4214b87afc830962c8 | [
"MIT"
] | null | null | null | tests/test_app.py | JeremiahNgige/pitch-app | 2fc0e49f50cb2f936930ec4214b87afc830962c8 | [
"MIT"
] | null | null | null | tests/test_app.py | JeremiahNgige/pitch-app | 2fc0e49f50cb2f936930ec4214b87afc830962c8 | [
"MIT"
] | null | null | null | import unittest
from app.models import User, Post, Comment
class PitchTest(unittest.TestCase):
def setUp(self):
self.new_user = User(username='victor', email='bkafrika144@gmail.com', password='tyrrelhaslay718')
self.new_post = Post()
self.new_comment = Comment()
def test_user_instanc... | 21.26087 | 106 | 0.664622 |
f0d9befdc93778e60609ad4f3324a1c4d49b8744 | 6,148 | py | Python | carbondesign/tags/tooltip.py | dozymoe/django-carbondesign | 34aed0cfdccfa90fcb5bf2bbd347229815f1417b | [
"MIT"
] | null | null | null | carbondesign/tags/tooltip.py | dozymoe/django-carbondesign | 34aed0cfdccfa90fcb5bf2bbd347229815f1417b | [
"MIT"
] | null | null | null | carbondesign/tags/tooltip.py | dozymoe/django-carbondesign | 34aed0cfdccfa90fcb5bf2bbd347229815f1417b | [
"MIT"
] | null | null | null | """
Tooltip
=======
See: https://www.carbondesignsystem.com/components/tooltip/usage/
Tooltips display additional information upon click, hover, or focus. The
information should be contextual, useful, and nonessential.
Overview
--------
A tooltip is a message box that is displayed when a user hovers over, clicks
or... | 29.700483 | 93 | 0.610117 |
edac343ba431ee82c4dee94a707c9788382b0cde | 370,684 | py | Python | template_container_ferret/labels/slice_71.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | template_container_ferret/labels/slice_71.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | template_container_ferret/labels/slice_71.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | coordinates_993300 = ((222, 20),
(222, 22), (222, 23), (222, 24), (222, 25), (222, 26), (222, 27), (222, 28), (222, 29), (222, 30), (222, 31), (222, 32), (222, 33), (222, 34), (222, 35), (222, 37), (222, 50), (222, 52), (222, 53), (222, 54), (222, 55), (222, 56), (222, 57), (222, 58), (222, 59), (222, 60), (222, 61),... | 773.870564 | 865 | 0.483406 |
95fe6a08f20abbeb1fd3af69ebd4ff2ec8e7ff6d | 2,444 | py | Python | compare_df/MatchingRecords.py | Sanyam15/compare_df | 8ab1a51196d22dcd597e9b31066cb4046de2c8ac | [
"MIT"
] | null | null | null | compare_df/MatchingRecords.py | Sanyam15/compare_df | 8ab1a51196d22dcd597e9b31066cb4046de2c8ac | [
"MIT"
] | null | null | null | compare_df/MatchingRecords.py | Sanyam15/compare_df | 8ab1a51196d22dcd597e9b31066cb4046de2c8ac | [
"MIT"
] | null | null | null | '''
This function returns a dataframe which contains identical records for the
passed list of columns (default :- all columns) in the two dataframes.
'''
import pandas as pd
def checkError(dataframe1, dataframe2, common_columns):
#Error : If no columns are there to compare
if len(common_columns) == 0:
... | 37.030303 | 140 | 0.63216 |
a6f604bf9c0832b1019c1dcd8108bd6b37c9609f | 2,637 | py | Python | backend/dating/models.py | crowdbotics-apps/me-challenge-28814 | 894d4b4384167ca8e22ea7530185dcd736a64f29 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/dating/models.py | crowdbotics-apps/me-challenge-28814 | 894d4b4384167ca8e22ea7530185dcd736a64f29 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/dating/models.py | crowdbotics-apps/me-challenge-28814 | 894d4b4384167ca8e22ea7530185dcd736a64f29 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.conf import settings
from django.db import models
class Setting(models.Model):
"Generated Model"
maximum_distance = models.IntegerField()
gender = models.CharField(
max_length=256,
)
age_range = models.IntegerField()
show_me_on_searches = models.BooleanField()
new_match... | 23.131579 | 54 | 0.633675 |
d0891b50b3d9c1aa1dd7e2a38b92898e11636fb5 | 4,796 | py | Python | data/modelnet/12_1_visualize_gt.py | davidstutz/aml-improved-shape-completion | 9337a0421994199fa218d564cc34a7e7af1a275f | [
"Unlicense"
] | 9 | 2018-10-11T08:03:59.000Z | 2021-11-17T11:16:07.000Z | data/modelnet/12_1_visualize_gt.py | jtpils/aml-improved-shape-completion | 9337a0421994199fa218d564cc34a7e7af1a275f | [
"Unlicense"
] | 1 | 2019-07-08T16:43:53.000Z | 2019-11-25T17:08:07.000Z | data/modelnet/12_1_visualize_gt.py | jtpils/aml-improved-shape-completion | 9337a0421994199fa218d564cc34a7e7af1a275f | [
"Unlicense"
] | 3 | 2018-07-19T13:06:16.000Z | 2020-12-09T00:59:56.000Z | import argparse
import sys
import os
sys.path.insert(1, os.path.realpath(__file__ + '../lib/'))
from blender_utils import *
import common
import json
import re
def read_json(file):
"""
Read a JSON file.
:param file: path to file to read
:type file: str
:return: parsed JSON as dict
:rtype: dict... | 31.142857 | 119 | 0.603003 |
47993c99aa76ce12b9540c5fd58dd3af2e168b25 | 319 | py | Python | dynamicprofiles/admin.py | jgroszko/django-dynamic-profiles | 01cbeec4677052a24ce2acc1d61e319d2f99c052 | [
"BSD-3-Clause"
] | null | null | null | dynamicprofiles/admin.py | jgroszko/django-dynamic-profiles | 01cbeec4677052a24ce2acc1d61e319d2f99c052 | [
"BSD-3-Clause"
] | null | null | null | dynamicprofiles/admin.py | jgroszko/django-dynamic-profiles | 01cbeec4677052a24ce2acc1d61e319d2f99c052 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from dynamicprofiles.models import Profile, ProfileDataGroup, ProfileDataField, ProfileData, ProfileTextData
admin.site.register(Profile)
admin.site.register(ProfileDataGroup)
admin.site.register(ProfileDataField)
admin.site.register(ProfileData)
admin.site.register(ProfileTextData)
| 31.9 | 108 | 0.858934 |
82b0f10fa28f73a1d96c25097653c5847df68298 | 5,013 | py | Python | utils/p4runtime_ap.py | ramonfontes/tutorials | 3335911512c14d90a1dddf425c3bc697c73e9581 | [
"Apache-2.0"
] | 3 | 2019-12-17T13:10:19.000Z | 2021-03-19T14:16:34.000Z | utils/p4runtime_ap.py | ramonfontes/tutorials | 3335911512c14d90a1dddf425c3bc697c73e9581 | [
"Apache-2.0"
] | null | null | null | utils/p4runtime_ap.py | ramonfontes/tutorials | 3335911512c14d90a1dddf425c3bc697c73e9581 | [
"Apache-2.0"
] | 4 | 2019-08-23T03:48:46.000Z | 2020-07-14T18:26:53.000Z | # Copyright 2017-present Barefoot Networks, Inc.
# Copyright 2017-present Open Networking Foundation
#
# 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/licens... | 37.133333 | 115 | 0.575903 |
f927c455fad64cdc93e6448db360a65aa5d1e102 | 5,425 | py | Python | feature_extraction.py | MenglingHettinger/CarND-Behavioral-Cloning-P3 | e291721fad75cf35e0fa8396665b53bc170a4452 | [
"MIT"
] | null | null | null | feature_extraction.py | MenglingHettinger/CarND-Behavioral-Cloning-P3 | e291721fad75cf35e0fa8396665b53bc170a4452 | [
"MIT"
] | null | null | null | feature_extraction.py | MenglingHettinger/CarND-Behavioral-Cloning-P3 | e291721fad75cf35e0fa8396665b53bc170a4452 | [
"MIT"
] | null | null | null | import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import glob
import pickle
import cv2
from sklearn.svm import SVC
def convert_color(img, conv='RGB2YCrCb'):
if conv == 'RGB2YCrCb':
return cv2.cvtColor(img, cv2.COLOR_RGB2YCrCb)
if conv == 'BGR2YCrCb':
return cv2... | 45.588235 | 129 | 0.638157 |
f84aa2603f64ebe57ed19960a9b59f7678eaeddb | 1,082 | py | Python | first_steps_with_tensor_flow.py | chenmich/google-ml-crash-course-exercises | d610f890d53b1537a3ce80531ce1ff2df1f5dc84 | [
"MIT"
] | null | null | null | first_steps_with_tensor_flow.py | chenmich/google-ml-crash-course-exercises | d610f890d53b1537a3ce80531ce1ff2df1f5dc84 | [
"MIT"
] | null | null | null | first_steps_with_tensor_flow.py | chenmich/google-ml-crash-course-exercises | d610f890d53b1537a3ce80531ce1ff2df1f5dc84 | [
"MIT"
] | null | null | null | #setup
import math
from matplotlib import cm
from matplotlib import gridspec
from matplotlib import pyplot as plt
import pandas as pd
import numpy as np
import tensorflow as tf
from tensorflow.python.data import Dataset
tf.logging.set_verbosity(tf.logging.ERROR)
pd.set_option('display.max_row', 10)
pd.set_option('disp... | 30.914286 | 90 | 0.820702 |
b1f445c3af5c767ef2835f57e660b61901abbf8a | 2,626 | py | Python | multivariate_time_series_rnn/datasets/custom_mono_split.py | xdr940/huawei2021 | 4d51f4b15bf152a6a7c75c9724d9414df3b9b636 | [
"MIT"
] | 1 | 2021-12-10T10:14:55.000Z | 2021-12-10T10:14:55.000Z | multivariate_time_series_rnn/datasets/custom_mono_split.py | xdr940/huawei2021 | 4d51f4b15bf152a6a7c75c9724d9414df3b9b636 | [
"MIT"
] | null | null | null | multivariate_time_series_rnn/datasets/custom_mono_split.py | xdr940/huawei2021 | 4d51f4b15bf152a6a7c75c9724d9414df3b9b636 | [
"MIT"
] | null | null | null |
from path import Path
from random import random
import argparse
import pandas as pd
import random
import numpy as np
def writelines(list,path):
lenth = len(list)
with open(path,'w') as f:
for i in range(lenth):
if i == lenth-1:
f.writelines(str(list[i]))
else... | 24.542056 | 173 | 0.646992 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.