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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15701a6c7d0e30161b097cc6929319025ab3a22e | 7,851 | py | Python | blmath/numerics/test_vector_shortcuts.py | lace/blmath | 2d8482a7a3f39f6491251b6e2c92564a62b68aa0 | [
"BSD-2-Clause"
] | 6 | 2019-09-28T16:48:34.000Z | 2022-03-25T17:05:46.000Z | blmath/numerics/test_vector_shortcuts.py | lace/blmath | 2d8482a7a3f39f6491251b6e2c92564a62b68aa0 | [
"BSD-2-Clause"
] | 6 | 2019-09-09T16:42:02.000Z | 2021-06-25T15:25:50.000Z | blmath/numerics/test_vector_shortcuts.py | bodylabs/blmath | 2d8482a7a3f39f6491251b6e2c92564a62b68aa0 | [
"BSD-2-Clause"
] | 4 | 2017-05-09T16:15:07.000Z | 2019-02-15T14:15:30.000Z | import unittest
import numpy as np
from blmath.numerics import vector_shortcuts as vx
class TestVector(unittest.TestCase):
def test_normalize(self):
import math
v = np.array([1, 1, 0])
expected = np.array([math.sqrt(2) / 2., math.sqrt(2) / 2., 0])
np.testing.assert_array_almost_eq... | 33.408511 | 155 | 0.48427 |
1dac499d0b8390bac0689c2eb410e451622fa9c3 | 4,460 | py | Python | notifai_recruitment/settings.py | BudzynskiMaciej/notifai_recruitment | 56860db3a2dad6115747a675895b8f7947e7e12e | [
"MIT"
] | null | null | null | notifai_recruitment/settings.py | BudzynskiMaciej/notifai_recruitment | 56860db3a2dad6115747a675895b8f7947e7e12e | [
"MIT"
] | 2 | 2021-05-21T13:26:26.000Z | 2022-02-10T10:04:55.000Z | notifai_recruitment/settings.py | BudzynskiMaciej/notifai_recruitment | 56860db3a2dad6115747a675895b8f7947e7e12e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Django settings for notifai_recruitment project.
Generated by 'django-admin startproject' using Django 3.2.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/... | 27.195122 | 95 | 0.699776 |
9fe05891d6dbe6f52ea317cf9d8b20394aeb2d0c | 3,248 | py | Python | xfeat/optuna_selector/_kbest_explorer.py | Drunkar/xfeat | 7eced097072a67f06548cc778b27b2310c5e5511 | [
"MIT"
] | 304 | 2020-06-19T05:00:14.000Z | 2022-03-19T19:39:04.000Z | xfeat/optuna_selector/_kbest_explorer.py | Drunkar/xfeat | 7eced097072a67f06548cc778b27b2310c5e5511 | [
"MIT"
] | 4 | 2020-06-28T11:30:33.000Z | 2022-02-17T14:31:39.000Z | xfeat/optuna_selector/_kbest_explorer.py | Drunkar/xfeat | 7eced097072a67f06548cc778b27b2310c5e5511 | [
"MIT"
] | 15 | 2020-06-19T08:34:56.000Z | 2022-02-17T14:51:30.000Z | from typing import Union, List, Optional
import optuna
from xfeat.base import OptunaSelectorMixin
from xfeat.selector._filter import BaseSelectorKBest
from xfeat.types import XDataFrame
class KBestThresholdExplorer(OptunaSelectorMixin):
"""[summary].
Args:
selector (BaseSelectorKBest): [description... | 29.261261 | 81 | 0.596367 |
cca7cc50c55728b4eb5959af423045e86f9bc9dc | 12,657 | py | Python | venv/lib/python3.6/site-packages/astroid/manager.py | ayushgit2498/Secure-Torrent-System | 28e7d48973b41feaf00e1e7ac0075f7b5087c4d0 | [
"MIT"
] | 2 | 2019-11-08T14:37:16.000Z | 2019-11-08T14:37:19.000Z | venv/lib/python3.6/site-packages/astroid/manager.py | ayushgit2498/Secure-Torrent-System | 28e7d48973b41feaf00e1e7ac0075f7b5087c4d0 | [
"MIT"
] | 2 | 2021-06-08T20:56:42.000Z | 2021-06-10T22:35:15.000Z | virtual/lib/python3.6/site-packages/astroid/manager.py | catherine244/Reviews | 30138f5ad09a39c1b6866c8bacf3fd0c89abbd00 | [
"MIT"
] | 2 | 2019-10-08T05:40:39.000Z | 2020-03-02T20:28:22.000Z | # Copyright (c) 2006-2011, 2013-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2014-2018 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 BioGeek <jeroen.vangoey@gmail.com>
# Copyright (c) 2014 Google, Inc.
# Copyright (c) 2014 Eevee (Alex Munroe) <amunroe@yelp.com>
# Copyright (c) 2015... | 38.238671 | 87 | 0.602117 |
cf29c0fc2d7987ef5928179a69bc27d7fa0d0b50 | 748 | py | Python | wings/market_order.py | ellieeee/hummingbot | 89095e6f7cddbc855147ce187a6ded836e1475bc | [
"Apache-2.0"
] | null | null | null | wings/market_order.py | ellieeee/hummingbot | 89095e6f7cddbc855147ce187a6ded836e1475bc | [
"Apache-2.0"
] | null | null | null | wings/market_order.py | ellieeee/hummingbot | 89095e6f7cddbc855147ce187a6ded836e1475bc | [
"Apache-2.0"
] | null | null | null | from typing import NamedTuple, List
import pandas as pd
class MarketOrder(NamedTuple):
order_id: str
symbol: str
is_buy: bool
base_asset: str
quote_asset: str
amount: float
timestamp: float
@classmethod
def to_pandas(cls, market_orders: List["MarketOrder"]) -> pd.DataFrame:
... | 28.769231 | 91 | 0.644385 |
15055ee97dcf3e3ce829ce07b4dd7b3393ffd409 | 2,157 | py | Python | sppas/sppas/src/annotations/Align/aligners/__init__.py | mirfan899/MTTS | 3167b65f576abcc27a8767d24c274a04712bd948 | [
"MIT"
] | null | null | null | sppas/sppas/src/annotations/Align/aligners/__init__.py | mirfan899/MTTS | 3167b65f576abcc27a8767d24c274a04712bd948 | [
"MIT"
] | null | null | null | sppas/sppas/src/annotations/Align/aligners/__init__.py | mirfan899/MTTS | 3167b65f576abcc27a8767d24c274a04712bd948 | [
"MIT"
] | null | null | null | """
..
---------------------------------------------------------------------
___ __ __ __ ___
/ | \ | \ | \ / the automatic
\__ |__/ |__/ |___| \__ annotation and
\ | | | | \ analysis
___/... | 33.184615 | 78 | 0.549374 |
5d0cc27dda1efe7d939f1e2155285bab608a3822 | 584 | py | Python | runs/oscillatingcylinderRe100/algo1-256x256/scripts/create_body.py | mesnardo/petibm-decoupledibpm | 675615a882cc8418b15a34e1100ccfb421f1d9d1 | [
"BSD-3-Clause"
] | null | null | null | runs/oscillatingcylinderRe100/algo1-256x256/scripts/create_body.py | mesnardo/petibm-decoupledibpm | 675615a882cc8418b15a34e1100ccfb421f1d9d1 | [
"BSD-3-Clause"
] | null | null | null | runs/oscillatingcylinderRe100/algo1-256x256/scripts/create_body.py | mesnardo/petibm-decoupledibpm | 675615a882cc8418b15a34e1100ccfb421f1d9d1 | [
"BSD-3-Clause"
] | null | null | null | """Create and save coordinates of the circle."""
import math
import numpy
import pathlib
import petibmpy
# Circle's parameters.
R = 0.5 # radius
xc, yc = 0.0, 0.0 # center's coordinates
dx = 8.0 / 256 # Eulerian grid spacing
simudir = pathlib.Path(__file__).absolute().parents[1]
# Generate coordinates of the c... | 23.36 | 59 | 0.679795 |
57db4109c9a8c13689e25c1954e77ac994d3df84 | 13,487 | py | Python | Inform.py | saudshaikh724/Smart-Security | e2f46b5e26dc582187dfd00846af67d77d131f18 | [
"MIT"
] | null | null | null | Inform.py | saudshaikh724/Smart-Security | e2f46b5e26dc582187dfd00846af67d77d131f18 | [
"MIT"
] | null | null | null | Inform.py | saudshaikh724/Smart-Security | e2f46b5e26dc582187dfd00846af67d77d131f18 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from PyQt5 import QtCore, QtGui, QtWidgets
import pymysql
from PyQt5.QtWidgets import QMessageBox
import pygame
from Validation import Validation
class Ui_Inform(object):
current_position = 0
def qmsg(self,msg,check):
qmsgBox = QMessageBox()
qmsgBox.move(((qmsgBox.width... | 44.365132 | 265 | 0.636094 |
5fb8097d25c0f4b63c4efd0c2dcc45fbaf2328df | 5,801 | py | Python | aiida/tools/importexport/archive/migrations/v02_to_v03.py | frssp/aiida-core | e0fb53bb94af72c063397e0c7c796b2f7f191db6 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | aiida/tools/importexport/archive/migrations/v02_to_v03.py | frssp/aiida-core | e0fb53bb94af72c063397e0c7c796b2f7f191db6 | [
"MIT",
"BSD-3-Clause"
] | 6 | 2019-12-17T16:01:25.000Z | 2020-12-11T10:37:12.000Z | aiida/tools/importexport/archive/migrations/v02_to_v03.py | frssp/aiida-core | e0fb53bb94af72c063397e0c7c796b2f7f191db6 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 41.141844 | 106 | 0.596104 |
fbfea2c3b68eae86da0c033c4c05e8962fa7bd8a | 406 | py | Python | spotify/migrations/0005_account_bio.py | SU-Palm/spotify_main | 119f2023619784432b5825f95d5726dac7214bd6 | [
"MIT"
] | 2 | 2021-03-07T22:35:50.000Z | 2021-03-14T18:52:39.000Z | spotify/migrations/0005_account_bio.py | SU-Palm/spotify_main | 119f2023619784432b5825f95d5726dac7214bd6 | [
"MIT"
] | null | null | null | spotify/migrations/0005_account_bio.py | SU-Palm/spotify_main | 119f2023619784432b5825f95d5726dac7214bd6 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-29 01:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('spotify', '0004_auto_20210329_0103'),
]
operations = [
migrations.AddField(
model_name='account',
name='bio',
... | 21.368421 | 74 | 0.603448 |
83fbe9c2a32a7abdf7d79c08b160c02c9a76f9d7 | 297 | py | Python | utils/account.py | Casa/V2-Casa-Node-Manager | 4fb4c623bd46cee7b4a4fd76bff69576b10a0711 | [
"MIT"
] | 1 | 2021-01-08T10:10:57.000Z | 2021-01-08T10:10:57.000Z | utils/account.py | Casa/V2-Casa-Node-Manager | 4fb4c623bd46cee7b4a4fd76bff69576b10a0711 | [
"MIT"
] | 3 | 2020-02-13T01:08:11.000Z | 2020-07-08T15:37:06.000Z | utils/account.py | Casa/V2-Casa-Node-Manager | 4fb4c623bd46cee7b4a4fd76bff69576b10a0711 | [
"MIT"
] | 1 | 2021-02-13T01:35:17.000Z | 2021-02-13T01:35:17.000Z | import crypt, sys, json
def generate_hashed_password(password):
return crypt.crypt(password, crypt.mksalt(crypt.METHOD_SHA512))
data = {'password': generate_hashed_password(sys.argv[2])}
account_signal_file = sys.argv[1]
with open(account_signal_file, 'w') as asf:
json.dump(data, asf)
| 27 | 67 | 0.757576 |
9d97625fc0342af40dfaffce07e0dad0cecf00e8 | 48,053 | py | Python | sdk/fedn/proto/alliance_pb2.py | joshyka/fedn | 398f9bb9f913f640254294b97b118292af6996ce | [
"Apache-2.0"
] | null | null | null | sdk/fedn/proto/alliance_pb2.py | joshyka/fedn | 398f9bb9f913f640254294b97b118292af6996ce | [
"Apache-2.0"
] | null | null | null | sdk/fedn/proto/alliance_pb2.py | joshyka/fedn | 398f9bb9f913f640254294b97b118292af6996ce | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: fedn/proto/alliance.proto
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _... | 40.722881 | 4,740 | 0.75654 |
fbc2f6897667d548b432500022b25210c1d040ee | 5,969 | py | Python | scripts/train_vae.py | gabrielasuchopar/info-nas | a786015c9d876d73d24dc6e7e07b36fb625f8861 | [
"Apache-2.0"
] | null | null | null | scripts/train_vae.py | gabrielasuchopar/info-nas | a786015c9d876d73d24dc6e7e07b36fb625f8861 | [
"Apache-2.0"
] | null | null | null | scripts/train_vae.py | gabrielasuchopar/info-nas | a786015c9d876d73d24dc6e7e07b36fb625f8861 | [
"Apache-2.0"
] | null | null | null | import datetime
import json
import os
import pickle
import click
import torch
from info_nas.config import load_json_cfg, local_model_cfg
from info_nas.datasets.io.transforms import get_transforms, get_all_scales
from info_nas.datasets.arch2vec_dataset import get_labeled_unlabeled_datasets
from nasbench import api
f... | 48.92623 | 120 | 0.660915 |
bd0e44f164d471a4f4deb1ffcd6871b594d8ff4a | 5,850 | py | Python | virtual_finance_api/client.py | hootnot/virtual-yahoofinance-REST-API | 3246d3f4c14821e4ef0f9de57dd759cf03f42681 | [
"Apache-2.0"
] | 1 | 2022-03-18T08:27:34.000Z | 2022-03-18T08:27:34.000Z | virtual_finance_api/client.py | hootnot/virtual-yahoofinance-REST-API | 3246d3f4c14821e4ef0f9de57dd759cf03f42681 | [
"Apache-2.0"
] | null | null | null | virtual_finance_api/client.py | hootnot/virtual-yahoofinance-REST-API | 3246d3f4c14821e4ef0f9de57dd759cf03f42681 | [
"Apache-2.0"
] | 1 | 2021-06-18T02:14:03.000Z | 2021-06-18T02:14:03.000Z | # -*- coding: utf-8 -*-
import requests
import logging
try:
import rapidjson as json
except ImportError as err:
import json
from .exceptions import VirtualFinanceAPIError, ConversionHookError
from .endpoints.apirequest import VirtualAPIRequest
logger = logging.getLogger(__name__)
DEFAULT_HEADERS = {"Accep... | 31.117021 | 83 | 0.560513 |
47c26154b96cc078fb658eccb4ab12c6e374701d | 815 | py | Python | examples/example_filter/example_neq_key.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 86 | 2017-08-17T12:41:52.000Z | 2022-02-24T12:17:47.000Z | examples/example_filter/example_neq_key.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 10 | 2020-03-30T03:24:46.000Z | 2022-02-23T01:34:53.000Z | examples/example_filter/example_neq_key.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 7 | 2017-08-18T03:40:35.000Z | 2020-05-19T04:09:10.000Z | # !/usr/local/python/bin/python
# -*- coding: utf-8 -*-
# (C) Wu Dong, 2020
# All rights reserved
# @Author: 'Wu Dong <wudong@eastwu.cn>'
# @Time: '2020-04-13 10:54'
""" 演示 pre-request 框架验证不同参数联动限制禁止相等
"""
from flask import Flask
from pre_request import pre, Rule
app = Flask(__name__)
app.config["TESTING"] = True
cli... | 18.953488 | 47 | 0.638037 |
260a9112fb0588b8a689042005fe2e392704b2a8 | 2,511 | py | Python | Roku Network Remote.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkNetworkingWOL.py | RogueProeliator/IndigoPlugins-Roku-Network-Remote | 3e8eb35d60f6f596e2782e715bf54396156e181e | [
"MIT"
] | 1 | 2017-01-22T06:05:28.000Z | 2017-01-22T06:05:28.000Z | Roku Network Remote.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkNetworkingWOL.py | RogueProeliator/IndigoPlugins-Roku-Network-Remote | 3e8eb35d60f6f596e2782e715bf54396156e181e | [
"MIT"
] | 6 | 2016-11-26T04:44:42.000Z | 2022-01-18T22:37:20.000Z | Sharp TV Network Remote.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkNetworkingWOL.py | RogueProeliator/IndigoPlugins-Sharp-TV-Network-Remote | 68ba834f68dfa665dabd96a5d466f7ca8350ced7 | [
"MIT"
] | 1 | 2018-01-28T03:02:54.000Z | 2018-01-28T03:02:54.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#/////////////////////////////////////////////////////////////////////////////////////////
#/////////////////////////////////////////////////////////////////////////////////////////
# RPFrameworkNetworkingWOL by RogueProeliator <adam.d.ashe@gmail.com>
# Classes that handl... | 48.288462 | 90 | 0.445639 |
7158f506832a53a9e9096351b53b4b81f7464dc2 | 4,538 | py | Python | segmentor/tools/data_helper.py | shampooma/openseg.pytorch | d1da408a1e870d52c058c359583bc098f7f3d9e2 | [
"MIT"
] | 1,069 | 2019-01-21T04:32:05.000Z | 2022-03-30T12:07:36.000Z | segmentor/tools/data_helper.py | shampooma/openseg.pytorch | d1da408a1e870d52c058c359583bc098f7f3d9e2 | [
"MIT"
] | 88 | 2019-02-13T03:43:09.000Z | 2022-03-27T08:23:29.000Z | segmentor/tools/data_helper.py | shampooma/openseg.pytorch | d1da408a1e870d52c058c359583bc098f7f3d9e2 | [
"MIT"
] | 124 | 2019-01-23T01:46:00.000Z | 2022-03-26T14:07:23.000Z | import os
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
from lib.utils.tools.logger import Logger as Log
def _get_list_from_env(name):
value = os.environ.get(name)
if value is None:
return None
return [x.strip() for x in... | 31.513889 | 114 | 0.522036 |
b835cd0cc593fd01abf86f6cf8179a01e0364c39 | 359 | py | Python | config.py | relthyg/deezer-rss | 0f725b56dc7b360c2c2e0f6b6579b2975f8404f5 | [
"MIT"
] | 1 | 2021-03-14T00:10:46.000Z | 2021-03-14T00:10:46.000Z | config.py | relthyg/deezer-rss | 0f725b56dc7b360c2c2e0f6b6579b2975f8404f5 | [
"MIT"
] | 1 | 2021-04-13T09:53:37.000Z | 2021-04-13T09:53:37.000Z | config.py | relthyg/deezer-rss | 0f725b56dc7b360c2c2e0f6b6579b2975f8404f5 | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
class Config(object):
CACHE_TYPE = os.environ.get('CACHE_TYPE') or 'NullCache'
CACHE_DEFAULT_TIMEOUT = float(os.environ.get('CACHE_DEFAULT_TIMEOUT') or 0)
CACHE_DIR = ... | 27.615385 | 79 | 0.740947 |
b77d00a4d3f1b29bc24f43f2b56f70b9999f8b55 | 7,722 | py | Python | zerver/views/report.py | dumpmemory/zulip | 496273ddbc567330a0022699d6d6eb5c646e5da5 | [
"Apache-2.0"
] | 4 | 2021-09-16T16:46:55.000Z | 2022-02-06T13:00:21.000Z | zerver/views/report.py | dumpmemory/zulip | 496273ddbc567330a0022699d6d6eb5c646e5da5 | [
"Apache-2.0"
] | null | null | null | zerver/views/report.py | dumpmemory/zulip | 496273ddbc567330a0022699d6d6eb5c646e5da5 | [
"Apache-2.0"
] | 1 | 2022-01-15T08:36:09.000Z | 2022-01-15T08:36:09.000Z | # System documented in https://zulip.readthedocs.io/en/latest/subsystems/logging.html
import logging
import subprocess
from typing import Any, Mapping, Optional, Union
from urllib.parse import SplitResult
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.http import Http... | 35.422018 | 112 | 0.696711 |
709c9f333e7c9071ecc8e49c8849f296b8e60700 | 14,328 | py | Python | Geometry Program.py | HobbaZ/Geometry-Program | cfbfc74aac5b992dbdb62321f88dcc1804c33665 | [
"CC0-1.0"
] | null | null | null | Geometry Program.py | HobbaZ/Geometry-Program | cfbfc74aac5b992dbdb62321f88dcc1804c33665 | [
"CC0-1.0"
] | null | null | null | Geometry Program.py | HobbaZ/Geometry-Program | cfbfc74aac5b992dbdb62321f88dcc1804c33665 | [
"CC0-1.0"
] | null | null | null |
import random, math, pygame
#pygame setup
#pygame.init()
#screen = pygame.display.set_mode((650,400))
#pygame.display.set_caption("Geometry Program")
#screen.fill([0,0,0])
#press X in game window to exit game
#while True:
# for event in pygame.event.get():
# if event.type == pygame.QUIT:
# ... | 34.442308 | 125 | 0.602387 |
ebc88d27d4f3dad86265cb424f0f63f5ede86e37 | 5,423 | py | Python | sphinx/theming.py | sphinxjp/doc10 | 0f47a8091cfa976bac5033aa07ec9a39ab71e7f0 | [
"BSD-2-Clause"
] | 2 | 2019-03-03T00:04:36.000Z | 2020-10-06T16:22:38.000Z | sphinx/theming.py | sphinxjp/doc10 | 0f47a8091cfa976bac5033aa07ec9a39ab71e7f0 | [
"BSD-2-Clause"
] | null | null | null | sphinx/theming.py | sphinxjp/doc10 | 0f47a8091cfa976bac5033aa07ec9a39ab71e7f0 | [
"BSD-2-Clause"
] | 1 | 2019-03-03T00:04:38.000Z | 2019-03-03T00:04:38.000Z | # -*- coding: utf-8 -*-
"""
sphinx.theming
~~~~~~~~~~~~~~
Theming support for HTML builders.
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import shutil
import zipfile
import tempfile
import ConfigParser
from os import path
... | 33.89375 | 79 | 0.538263 |
bd0a82395bc9d1b8789f12f223da348a73185b7b | 629 | py | Python | src/isaw.events/isaw/events/tests/test_doctest.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | null | null | null | src/isaw.events/isaw/events/tests/test_doctest.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | 405 | 2015-03-12T18:20:25.000Z | 2022-03-07T18:44:16.000Z | src/isaw.events/isaw/events/tests/test_doctest.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | 1 | 2016-11-07T21:18:49.000Z | 2016-11-07T21:18:49.000Z | import unittest
import doctest
from zope.testing import doctestunit
from zope.component import testing, eventtesting
from Testing import ZopeTestCase as ztc
from isaw.events.tests import base
def test_suite():
return unittest.TestSuite([
# Demonstrate the main content types
ztc.ZopeDocFileSuite... | 25.16 | 65 | 0.704293 |
b96d26f100aab2562a73ccc572509d67ba297f8f | 739 | py | Python | tools/bin/stretch_robot_jog.py | soumith/stretch_body | 998cec78fae67090060d4474c3029f9db45cde85 | [
"RSA-MD"
] | 19 | 2020-07-14T07:00:45.000Z | 2022-01-26T18:28:59.000Z | tools/bin/stretch_robot_jog.py | soumith/stretch_body | 998cec78fae67090060d4474c3029f9db45cde85 | [
"RSA-MD"
] | 45 | 2020-05-20T03:05:56.000Z | 2022-01-06T22:35:39.000Z | tools/bin/stretch_robot_jog.py | soumith/stretch_body | 998cec78fae67090060d4474c3029f9db45cde85 | [
"RSA-MD"
] | 13 | 2020-07-14T23:13:42.000Z | 2022-03-05T02:00:57.000Z | #!/usr/bin/env python
from __future__ import print_function
import sys
from stretch_body.robot import Robot
from stretch_body.hello_utils import *
import argparse
print_stretch_re_use()
parser=argparse.ArgumentParser(description='Print all robot data to console')
args=parser.parse_args()
r=Robot()
r.startup()
def m... | 18.948718 | 77 | 0.635995 |
7b9545ee8ca60e407a61c7c2e9e81f0e437cf5cc | 23 | py | Python | example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Statistical Functions (see also scipy.stats)/gdtria Inverse of gdtr vs a.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Statistical Functions (see also scipy.stats)/gdtria Inverse of gdtr vs a.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Statistical Functions (see also scipy.stats)/gdtria Inverse of gdtr vs a.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | 1 | 2021-02-04T04:51:48.000Z | 2021-02-04T04:51:48.000Z | special.gdtria(p, b, x) | 23 | 23 | 0.695652 |
92b754b16db08f154a313d1c4babc9f452927b1a | 5,582 | py | Python | t5/scripts/prepare_glue_submission.py | wqi18433/text-to-text-transfer-transformer | 56fbff6d26af1ded529f598dd4eaa4a506002e32 | [
"Apache-2.0"
] | 2 | 2021-02-17T20:04:39.000Z | 2021-03-22T22:47:16.000Z | t5/scripts/prepare_glue_submission.py | wqi18433/text-to-text-transfer-transformer | 56fbff6d26af1ded529f598dd4eaa4a506002e32 | [
"Apache-2.0"
] | null | null | null | t5/scripts/prepare_glue_submission.py | wqi18433/text-to-text-transfer-transformer | 56fbff6d26af1ded529f598dd4eaa4a506002e32 | [
"Apache-2.0"
] | 1 | 2020-04-14T06:26:13.000Z | 2020-04-14T06:26:13.000Z | # Copyright 2020 The T5 Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 36.012903 | 80 | 0.665174 |
a1c74e1b42a20d86e168ce70a2d552c9fc335fe9 | 417 | py | Python | batamlawancorona_api/asgi.py | TjandraD/batamlawancorona_api | b57733f9c6f7a5b6c14cdd2afb67e332ce69ef9d | [
"MIT"
] | 26 | 2021-08-20T13:44:00.000Z | 2022-03-19T04:09:26.000Z | batamlawancorona_api/asgi.py | TjandraD/batamlawancorona_api | b57733f9c6f7a5b6c14cdd2afb67e332ce69ef9d | [
"MIT"
] | 3 | 2021-08-29T00:39:28.000Z | 2021-11-12T04:18:54.000Z | batamlawancorona_api/asgi.py | TjandraD/batamlawancorona_api | b57733f9c6f7a5b6c14cdd2afb67e332ce69ef9d | [
"MIT"
] | 3 | 2021-08-28T23:40:46.000Z | 2021-10-06T12:40:50.000Z | """
ASGI config for batamlawancorona_api project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault(... | 24.529412 | 80 | 0.798561 |
aa4edbf08f51c73fcb6db2b3005ea6fa6edfb239 | 17,562 | py | Python | python_terraform/__init__.py | yurok15/python-terraform | 9a2d30074c7878d75be3e4eb3d436f4567418f79 | [
"MIT"
] | null | null | null | python_terraform/__init__.py | yurok15/python-terraform | 9a2d30074c7878d75be3e4eb3d436f4567418f79 | [
"MIT"
] | null | null | null | python_terraform/__init__.py | yurok15/python-terraform | 9a2d30074c7878d75be3e4eb3d436f4567418f79 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# above is for compatibility of python2.7.11
import subprocess
import os
import sys
import json
import logging
import tempfile
from python_terraform.tfstate import Tfstate
try: # Python 2.7+
from logging import NullHandler
except ImportError:
class NullHandler(logging.Handler):
... | 37.286624 | 114 | 0.588259 |
f1a5c7eb95129a1c1c148f942acfab9fb4ddd578 | 9,952 | py | Python | misc/stest/library/test_archive_portfolio_mixin.py | kristoffer-paulsson/angelos | 2ec236770d6530884a8ad88505aab01183f752b4 | [
"MIT"
] | 8 | 2020-06-07T23:26:34.000Z | 2022-03-28T00:20:34.000Z | misc/stest/library/test_archive_portfolio_mixin.py | kristoffer-paulsson/angelos | 2ec236770d6530884a8ad88505aab01183f752b4 | [
"MIT"
] | 1 | 2019-12-24T22:06:02.000Z | 2020-07-12T19:18:57.000Z | misc/stest/library/test_archive_portfolio_mixin.py | kristoffer-paulsson/angelos | 2ec236770d6530884a8ad88505aab01183f752b4 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2018-2020 by Kristoffer Paulsson <kristoffer.paulsson@talenten.se>.
#
# This software is available under the terms of the MIT license. Parts are licensed under
# different terms if stated. The legal terms are attached to the LICENSE file and are
# made available on:
#
# https://opensource.org/lice... | 40.786885 | 107 | 0.712822 |
cae50b4cf7356db784874e3059201530ddf2999f | 9,563 | py | Python | venv/lib/python3.8/site-packages/arch/unitroot/_engle_granger.py | YileC928/finm-portfolio-2021 | 3fa1e97423fa731bce0cad3457807e1873120891 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/arch/unitroot/_engle_granger.py | YileC928/finm-portfolio-2021 | 3fa1e97423fa731bce0cad3457807e1873120891 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/arch/unitroot/_engle_granger.py | YileC928/finm-portfolio-2021 | 3fa1e97423fa731bce0cad3457807e1873120891 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import Optional
import numpy as np
import pandas as pd
from scipy import stats
from statsmodels.iolib.summary import Summary
from statsmodels.iolib.table import SimpleTable
from statsmodels.regression.linear_model import RegressionResults
from arch.typing import ArrayLi... | 30.072327 | 80 | 0.60138 |
2e9161752974013a7bcc3fb6e24cd6b998c2d5df | 3,983 | py | Python | xt/framework/predictor.py | goodboynotgood/xt | 52857df19119ee5c7da557e854d8259d0a671da5 | [
"MIT"
] | null | null | null | xt/framework/predictor.py | goodboynotgood/xt | 52857df19119ee5c7da557e854d8259d0a671da5 | [
"MIT"
] | null | null | null | xt/framework/predictor.py | goodboynotgood/xt | 52857df19119ee5c7da557e854d8259d0a671da5 | [
"MIT"
] | null | null | null | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to us... | 39.435644 | 99 | 0.66834 |
16ea3555dbd5b33be31e5f7f178332c8c906cc8c | 7,310 | py | Python | tests/trainer/data_flow/test_eval_loop_flow_1_0.py | wdmwhh/pytorch-lightning | 5d10a36762776c4b6f6a9c55b4e6bf7bd258137f | [
"Apache-2.0"
] | 1 | 2021-04-22T01:30:14.000Z | 2021-04-22T01:30:14.000Z | tests/trainer/data_flow/test_eval_loop_flow_1_0.py | wdmwhh/pytorch-lightning | 5d10a36762776c4b6f6a9c55b4e6bf7bd258137f | [
"Apache-2.0"
] | 1 | 2020-11-09T21:07:07.000Z | 2020-11-09T21:07:07.000Z | tests/trainer/data_flow/test_eval_loop_flow_1_0.py | zippeurfou/pytorch-lightning | 4018237c309b7d9d6978da73132003615341e04a | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 30.585774 | 86 | 0.628591 |
cd86bf3e3faea0738fcf798b309b96c63c755a11 | 2,817 | py | Python | office365/sharepoint/contenttypes/content_type_collection.py | juguerre/Office365-REST-Python-Client | dbadaddb14e7bad199499c898cdef1ada9694fc9 | [
"MIT"
] | null | null | null | office365/sharepoint/contenttypes/content_type_collection.py | juguerre/Office365-REST-Python-Client | dbadaddb14e7bad199499c898cdef1ada9694fc9 | [
"MIT"
] | null | null | null | office365/sharepoint/contenttypes/content_type_collection.py | juguerre/Office365-REST-Python-Client | dbadaddb14e7bad199499c898cdef1ada9694fc9 | [
"MIT"
] | null | null | null | from office365.runtime.queries.create_entity_query import CreateEntityQuery
from office365.runtime.queries.service_operation_query import ServiceOperationQuery
from office365.runtime.resource_path_service_operation import ResourcePathServiceOperation
from office365.sharepoint.base_entity_collection import BaseEntityCol... | 44.714286 | 118 | 0.71175 |
cc40c37a935ea5a262e420db0abbfe1bd857fb7f | 143 | py | Python | Module-8-The-Power-Of-Serverless/pythonscript.py | CloudSkills/AWS-Cloud-Architect-BootCamp | 83b20f1f221753581fc153392cccb3a724dff6bb | [
"MIT"
] | 8 | 2021-02-08T16:24:23.000Z | 2022-02-15T21:02:47.000Z | Module-8-The-Power-Of-Serverless/pythonscript.py | CloudSkills/AWS-Cloud-Architect-BootCamp | 83b20f1f221753581fc153392cccb3a724dff6bb | [
"MIT"
] | null | null | null | Module-8-The-Power-Of-Serverless/pythonscript.py | CloudSkills/AWS-Cloud-Architect-BootCamp | 83b20f1f221753581fc153392cccb3a724dff6bb | [
"MIT"
] | 8 | 2021-03-21T18:49:20.000Z | 2022-01-27T22:37:28.000Z | import json
def lambda_handler(event, context):
return {
'statusCode': 200,
'body': json.dumps('Hello from Lambda!')
} | 20.428571 | 48 | 0.601399 |
ad0ab327583847859597b1d086930edf29ac0334 | 1,819 | py | Python | samples/snippets/quickstart.py | krupalvora/python-speech | ef7200d471a090a820f82066b5f3fb1fc0ec5835 | [
"Apache-2.0"
] | null | null | null | samples/snippets/quickstart.py | krupalvora/python-speech | ef7200d471a090a820f82066b5f3fb1fc0ec5835 | [
"Apache-2.0"
] | null | null | null | samples/snippets/quickstart.py | krupalvora/python-speech | ef7200d471a090a820f82066b5f3fb1fc0ec5835 | [
"Apache-2.0"
] | 1 | 2020-10-04T11:55:44.000Z | 2020-10-04T11:55:44.000Z | #!/usr/bin/env python
# Copyright 2016 Google Inc. 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... | 31.362069 | 81 | 0.715778 |
9858f930e51dbb33cb34f6445fc8d39b74a145be | 5,941 | py | Python | pyscf/pbc/scf/rohf.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 501 | 2018-12-06T23:48:17.000Z | 2022-03-31T11:53:18.000Z | pyscf/pbc/scf/rohf.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 710 | 2018-11-26T22:04:52.000Z | 2022-03-30T03:53:12.000Z | pyscf/pbc/scf/rohf.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 273 | 2018-11-26T10:10:24.000Z | 2022-03-30T12:25:28.000Z | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | 35.789157 | 88 | 0.627504 |
3065083671997d329784a2cff8d8b0971760e519 | 51 | py | Python | elearningapp/exceptions.py | samul-1/elearning | c453839d02427894d7ff9dbaf520e054a57ff039 | [
"MIT"
] | 4 | 2021-02-06T22:36:36.000Z | 2021-04-12T15:49:54.000Z | elearningapp/exceptions.py | shaishguni/elearning | c453839d02427894d7ff9dbaf520e054a57ff039 | [
"MIT"
] | 4 | 2021-02-20T15:05:21.000Z | 2021-02-20T15:43:23.000Z | elearningapp/exceptions.py | shaishguni/elearning | c453839d02427894d7ff9dbaf520e054a57ff039 | [
"MIT"
] | 1 | 2021-11-08T14:58:07.000Z | 2021-11-08T14:58:07.000Z | class OutOfQuestionsException(Exception):
pass
| 17 | 41 | 0.803922 |
9860acc1a92fc74b65067dee52ee66b4d1a9f1be | 3,922 | py | Python | general/mmd/generate_materials.py | guansss/toybox | c8a947941f7c84d31ea6ece03f74d49adab815cb | [
"MIT"
] | null | null | null | general/mmd/generate_materials.py | guansss/toybox | c8a947941f7c84d31ea6ece03f74d49adab815cb | [
"MIT"
] | null | null | null | general/mmd/generate_materials.py | guansss/toybox | c8a947941f7c84d31ea6ece03f74d49adab815cb | [
"MIT"
] | null | null | null | """
Generates ray material for each texture downloaded from https://3dtextures.me/
"""
import os
import re
import sys
from collections import namedtuple
from itertools import chain
from pathlib import Path
from utils.collection import find
TEMPLATE = r"F:\MMD\MME\ray-mmd-1.5.2\Materials\material_2.0.fx"
WORK_DIR = r... | 30.169231 | 118 | 0.612188 |
3d22a7422f9164be913f66312e074c217c91943f | 6,686 | py | Python | NBA_prediction.py | busyyang/NBA_winner_prediction | 17e48710391480f05c3abeba20a559bed89e176a | [
"MIT"
] | null | null | null | NBA_prediction.py | busyyang/NBA_winner_prediction | 17e48710391480f05c3abeba20a559bed89e176a | [
"MIT"
] | null | null | null | NBA_prediction.py | busyyang/NBA_winner_prediction | 17e48710391480f05c3abeba20a559bed89e176a | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
"""
NBA winner prediction by machine learning method:
Logistic Regression, Naive Bayes (Gaussian), Random Forest, Decision Tree, XGBoost model
project from: https://www.freelancer.cn/projects/python/NBA-winner-prediction/details
2019/12/9 Jie Y. Init
"""
import pandas as pd
import ... | 37.351955 | 127 | 0.621149 |
a8b7b9bf94496232c6b6d0297eceb65cb9822dfe | 1,090 | py | Python | muhadis server.py | mazhar-karimi/nlp-urdu | 90b7410bf915aa588691b81a68334db7b716614e | [
"MIT"
] | null | null | null | muhadis server.py | mazhar-karimi/nlp-urdu | 90b7410bf915aa588691b81a68334db7b716614e | [
"MIT"
] | null | null | null | muhadis server.py | mazhar-karimi/nlp-urdu | 90b7410bf915aa588691b81a68334db7b716614e | [
"MIT"
] | null | null | null | import islamicqa
from flask import Flask, request, send_from_directory
from flask_restful import Resource, Api
from json import dumps
from flask_jsonpify import jsonify
app = Flask(__name__,static_url_path='')
api = Api(app)
class Search(Resource):
def get(self, question):
hadiths = islamicqa.ge... | 26.585366 | 62 | 0.698165 |
35a4cfac512094d75dfe85dc50edacac57156f7a | 6,421 | py | Python | localtileserver/tileserver/utilities.py | RichardScottOZ/localtileserver | a0e63d1853c8d3410ba9d4ca51c993eae15a0fe6 | [
"MIT"
] | null | null | null | localtileserver/tileserver/utilities.py | RichardScottOZ/localtileserver | a0e63d1853c8d3410ba9d4ca51c993eae15a0fe6 | [
"MIT"
] | null | null | null | localtileserver/tileserver/utilities.py | RichardScottOZ/localtileserver | a0e63d1853c8d3410ba9d4ca51c993eae15a0fe6 | [
"MIT"
] | null | null | null | import logging
import os
import pathlib
import shutil
import tempfile
from typing import Union
from urllib.parse import urlencode, urlparse
from flask import current_app, request
import large_image
from large_image.tilesource import FileTileSource
from large_image_source_gdal import GDALFileTileSource
from osgeo impor... | 32.593909 | 100 | 0.664382 |
66f533852a6861d83b7a8776e58e61023bbc740f | 22,068 | py | Python | espresso/tasks/speech_recognition_hybrid.py | ChunChiehChang/espresso | 3dc67549f55cf9d9d25ab4d2a1da9ec04e3eabd3 | [
"MIT"
] | 920 | 2019-07-03T00:52:06.000Z | 2022-03-28T21:16:44.000Z | espresso/tasks/speech_recognition_hybrid.py | ChunChiehChang/espresso | 3dc67549f55cf9d9d25ab4d2a1da9ec04e3eabd3 | [
"MIT"
] | 58 | 2019-08-28T11:26:40.000Z | 2022-03-17T22:51:42.000Z | espresso/tasks/speech_recognition_hybrid.py | ChunChiehChang/espresso | 3dc67549f55cf9d9d25ab4d2a1da9ec04e3eabd3 | [
"MIT"
] | 145 | 2019-08-05T06:47:11.000Z | 2022-02-08T04:23:12.000Z | # Copyright (c) Yiming Wang
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from collections import OrderedDict
import itertools
import json
import logging
import os
from dataclasses import dataclass, field
from typing import Optional
impor... | 39.978261 | 122 | 0.63404 |
d7621a6b50d344dad379b421970a6fa8b96a18b1 | 43,691 | py | Python | sdk/storage/azure-storage-file-share/azure/storage/fileshare/_models.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | 1 | 2021-09-07T18:35:07.000Z | 2021-09-07T18:35:07.000Z | sdk/storage/azure-storage-file-share/azure/storage/fileshare/_models.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | null | null | null | sdk/storage/azure-storage-file-share/azure/storage/fileshare/_models.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
# pylint: ... | 44.765369 | 136 | 0.687029 |
a5e3d2a6f9f795c4951ccc982bd266ac048252e5 | 45,533 | py | Python | metrics/projectmetrics.py | chrisdonlan/fprime | 0cab90e238cff1b50c20f1e148a44cf8827a5bf8 | [
"Apache-2.0"
] | 5 | 2019-10-22T03:41:02.000Z | 2022-01-16T12:48:31.000Z | metrics/projectmetrics.py | chrisdonlan/fprime | 0cab90e238cff1b50c20f1e148a44cf8827a5bf8 | [
"Apache-2.0"
] | 27 | 2019-02-07T17:58:58.000Z | 2019-08-13T00:46:24.000Z | metrics/projectmetrics.py | chrisdonlan/fprime | 0cab90e238cff1b50c20f1e148a44cf8827a5bf8 | [
"Apache-2.0"
] | 3 | 2019-01-01T18:44:37.000Z | 2019-08-01T01:19:39.000Z | import os
import errno
import gheconnector
import reportconfig
import planvalidator
import datetime
import csv
import numpy as np
class ProjectMetrics:
""" Object class to gather and store project metrics from the following sources: GitHub issues, compiled SLOC
report, compiled component structure report. The... | 44.815945 | 137 | 0.567632 |
a98f38455b03a6f92f72ec3bdbbc200ea75327b4 | 4,289 | py | Python | src/scripts/patched_builds.py | zen93/repairnator | aa184717e6e755801572e9cf0bb7dde1a7591ead | [
"MIT"
] | 271 | 2018-04-06T10:47:52.000Z | 2019-08-31T09:16:49.000Z | src/scripts/patched_builds.py | zen93/repairnator | aa184717e6e755801572e9cf0bb7dde1a7591ead | [
"MIT"
] | 470 | 2018-02-01T15:32:38.000Z | 2019-09-02T21:10:46.000Z | src/scripts/patched_builds.py | zen93/repairnator | aa184717e6e755801572e9cf0bb7dde1a7591ead | [
"MIT"
] | 48 | 2019-09-08T09:51:24.000Z | 2022-03-25T18:05:25.000Z | """
This is a script to create a txt-file from every build repairnator has patched
with the following info:
Build URL
Commit URL
All patches along with the name of the tool that generated them
Requirements:
selenium webdriver for python
pymongo
geckodriver (for linux most likely)
To use:
Fill in the constants below w... | 29.376712 | 107 | 0.63045 |
2dad2c11ce2c90746175a5e115ac65a6e3e1e192 | 46 | py | Python | src/bot/__init__.py | Arseny802/gitlab_helper | 787150f7588664b10fbd8daba09f9870d56bf124 | [
"Apache-2.0"
] | null | null | null | src/bot/__init__.py | Arseny802/gitlab_helper | 787150f7588664b10fbd8daba09f9870d56bf124 | [
"Apache-2.0"
] | null | null | null | src/bot/__init__.py | Arseny802/gitlab_helper | 787150f7588664b10fbd8daba09f9870d56bf124 | [
"Apache-2.0"
] | null | null | null | __all__ = [
"controller",
"updater"
]
| 9.2 | 17 | 0.521739 |
aab6fda5b0d2072a63ad52ffb11eac91ec021087 | 792 | py | Python | collectible-app/base/management/commands/wait_for_db.py | rsintheta/collectible-app-api | e8c3584c4303265a90a0554d759a3b29bb780fe0 | [
"MIT"
] | null | null | null | collectible-app/base/management/commands/wait_for_db.py | rsintheta/collectible-app-api | e8c3584c4303265a90a0554d759a3b29bb780fe0 | [
"MIT"
] | null | null | null | collectible-app/base/management/commands/wait_for_db.py | rsintheta/collectible-app-api | e8c3584c4303265a90a0554d759a3b29bb780fe0 | [
"MIT"
] | null | null | null | import time
from django.db import connections
from django.db.utils import OperationalError
from django.core.management.base import BaseCommand
# Django command that pauses execution of a function
# until the database has been made available
class Command(BaseCommand):
def handle(self, *args, **options):
s... | 34.434783 | 78 | 0.627525 |
61d976036f068b84e951160337d088fbffa67f69 | 3,403 | py | Python | train.py | gustavkkk/image-classifier | 4991c9e828daf793b5b8378bf989d8fb89519204 | [
"MIT"
] | 14 | 2017-07-23T03:22:45.000Z | 2021-03-14T23:56:41.000Z | train.py | deep2essence/image-classifier | 4991c9e828daf793b5b8378bf989d8fb89519204 | [
"MIT"
] | null | null | null | train.py | deep2essence/image-classifier | 4991c9e828daf793b5b8378bf989d8fb89519204 | [
"MIT"
] | 4 | 2017-10-23T14:19:18.000Z | 2020-06-30T14:57:19.000Z | import triplet._init_paths
import triplet.config as cfg
from triplet.sampledata import sampledata
from utils.timer import Timer
import caffe
import numpy as np
import os
from caffe.proto import caffe_pb2
import google.protobuf as pb2
class SolverWrapper(object):
"""A simple wrapper around Caffe's solver.
"""
... | 34.373737 | 230 | 0.603585 |
f4220a715f7cd65639b46de7d40ef914ac11952a | 1,403 | py | Python | src/sardana/macroserver/macros/test/test_ioregister.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 43 | 2016-11-25T15:21:23.000Z | 2021-08-20T06:09:40.000Z | src/sardana/macroserver/macros/test/test_ioregister.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 1,263 | 2016-11-25T15:58:37.000Z | 2021-11-02T22:23:47.000Z | src/sardana/macroserver/macros/test/test_ioregister.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 58 | 2016-11-21T11:33:55.000Z | 2021-09-01T06:21:21.000Z | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... | 34.219512 | 78 | 0.662153 |
6982091196e1e016e74296bdba8fafe172a626ec | 4,935 | py | Python | core/domain/activity_services.py | aman-roy/oppia | 0e7066829b59bf6ce4b15c4723fe0398721cfd1a | [
"Apache-2.0"
] | 2 | 2019-12-02T18:56:49.000Z | 2020-03-14T17:14:15.000Z | core/domain/activity_services.py | aman-roy/oppia | 0e7066829b59bf6ce4b15c4723fe0398721cfd1a | [
"Apache-2.0"
] | 13 | 2019-03-04T18:29:27.000Z | 2019-08-24T23:27:36.000Z | core/domain/activity_services.py | aman-roy/oppia | 0e7066829b59bf6ce4b15c4723fe0398721cfd1a | [
"Apache-2.0"
] | 2 | 2019-12-02T18:56:56.000Z | 2020-03-16T08:03:45.000Z | # coding: utf-8
#
# Copyright 2016 The Oppia 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 requi... | 37.671756 | 78 | 0.724417 |
5ed02108f06e08b23677e71f57431aedb4b7777e | 5,171 | py | Python | measurements/models.py | SaptakS/api | 385cc5deba11e0c4a01c1723ecd99c5239a92a6f | [
"BSD-3-Clause"
] | null | null | null | measurements/models.py | SaptakS/api | 385cc5deba11e0c4a01c1723ecd99c5239a92a6f | [
"BSD-3-Clause"
] | null | null | null | measurements/models.py | SaptakS/api | 385cc5deba11e0c4a01c1723ecd99c5239a92a6f | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
from datetime import datetime
from .utils import ISO_TIMESTAMP_SHORT
from .database import Base
from sqlalchemy.orm import relationship
from sqlalchemy impor... | 27.359788 | 87 | 0.68362 |
a4dae02cf6479320260c0dd98e4efcbe74b0ec15 | 382 | py | Python | DIGITAL SIGN/Certificate_generator.py | HanykyrJakub/SIF | 7ca2d43d4439c7f849243ccebf1a18d40e150dd9 | [
"MIT"
] | null | null | null | DIGITAL SIGN/Certificate_generator.py | HanykyrJakub/SIF | 7ca2d43d4439c7f849243ccebf1a18d40e150dd9 | [
"MIT"
] | null | null | null | DIGITAL SIGN/Certificate_generator.py | HanykyrJakub/SIF | 7ca2d43d4439c7f849243ccebf1a18d40e150dd9 | [
"MIT"
] | null | null | null | from PIL import Image, ImageDraw, ImageFont
import pandas as pd
import os
df = pd.read_csv('list.csv')
font = ImageFont.truetype('arial.ttf',60)
for index,j in df.iterrows():
img = Image.open('cetifikát.jpg')
draw = ImageDraw.Draw(img)
draw.text(xy=(725,760),text='{}'.format(j['name']),fill=(0,0,0),... | 38.2 | 79 | 0.65445 |
0ec7857e1c1f43c98c7512cfb2fc9d9037f541bd | 45,941 | py | Python | moto/autoscaling/responses.py | symroe/moto | 4e106995af6f2820273528fca8a4e9ee288690a5 | [
"Apache-2.0"
] | null | null | null | moto/autoscaling/responses.py | symroe/moto | 4e106995af6f2820273528fca8a4e9ee288690a5 | [
"Apache-2.0"
] | null | null | null | moto/autoscaling/responses.py | symroe/moto | 4e106995af6f2820273528fca8a4e9ee288690a5 | [
"Apache-2.0"
] | null | null | null | import datetime
from moto.core.responses import BaseResponse
from moto.core.utils import (
amz_crc32,
amzn_request_id,
iso_8601_datetime_with_milliseconds,
)
from .models import autoscaling_backends
class AutoScalingResponse(BaseResponse):
@property
def autoscaling_backend(self):
return a... | 45.262069 | 214 | 0.697743 |
a05eafcd86b555dae689ff32f2c5d48f6ae2cdc8 | 23,905 | py | Python | heat/engine/resources/openstack/neutron/router.py | hongbin/heat | 1a8495eaa728d36ccff4b0285befb5a02e31b3de | [
"Apache-2.0"
] | null | null | null | heat/engine/resources/openstack/neutron/router.py | hongbin/heat | 1a8495eaa728d36ccff4b0285befb5a02e31b3de | [
"Apache-2.0"
] | null | null | null | heat/engine/resources/openstack/neutron/router.py | hongbin/heat | 1a8495eaa728d36ccff4b0285befb5a02e31b3de | [
"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
# ... | 37.527473 | 79 | 0.560385 |
a7eecdfefb0c462411e4f57514f357d89f99f5c6 | 3,161 | py | Python | superset/utils/dict_import_export.py | rodrigoguariento/incubator-superset | b2633a51d43faaca74751349b96fc32784d4b377 | [
"Apache-2.0"
] | 7 | 2017-11-01T06:00:12.000Z | 2019-01-05T13:31:48.000Z | superset/utils/dict_import_export.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 108 | 2019-06-10T05:48:22.000Z | 2021-07-26T04:20:03.000Z | superset/utils/dict_import_export.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 4 | 2018-12-13T06:20:34.000Z | 2020-10-02T16:07:17.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.516854 | 88 | 0.697564 |
53984906dbf5830fa222dc62239470097c5397e9 | 162 | py | Python | mods/Roomba/main.py | thermalpilot/opennero | 1bb1ba083cf2576e09bb7cfeac013d6940a47afe | [
"BSD-3-Clause"
] | 215 | 2015-08-26T19:41:28.000Z | 2022-01-19T13:23:17.000Z | mods/Roomba/main.py | ikarpov/opennero | 43e12a1bcba6e228639db3886fec1dc47ddc24cb | [
"BSD-3-Clause"
] | 6 | 2015-11-03T19:40:24.000Z | 2019-10-15T11:19:32.000Z | mods/Roomba/main.py | ikarpov/opennero | 43e12a1bcba6e228639db3886fec1dc47ddc24cb | [
"BSD-3-Clause"
] | 56 | 2015-08-26T19:42:05.000Z | 2022-02-26T16:45:41.000Z | #import all client and server scripts
from Roomba.module import *
from Roomba.client import *
def ModMain(mode = ""):
ServerMain()
ClientMain()
| 20.25 | 38 | 0.67284 |
750e306aeca650d95925d13aa761943433ce5955 | 24,072 | py | Python | openmdao.main/src/openmdao/main/test/test_resource.py | mjfwest/OpenMDAO-Framework | a5521f47ad7686c25b203de74e1c7dff5fd7a52b | [
"Apache-2.0"
] | 69 | 2015-01-02T19:10:08.000Z | 2021-11-14T04:42:28.000Z | openmdao.main/src/openmdao/main/test/test_resource.py | jcchin/OpenMDAO-Framework | 038e89b06da1c74f00918f4c6fbd8bd365e25657 | [
"Apache-2.0"
] | 3 | 2015-01-15T23:08:18.000Z | 2015-03-11T16:57:35.000Z | openmdao.main/src/openmdao/main/test/test_resource.py | jcchin/OpenMDAO-Framework | 038e89b06da1c74f00918f4c6fbd8bd365e25657 | [
"Apache-2.0"
] | 31 | 2015-09-16T00:37:35.000Z | 2022-01-10T06:27:55.000Z | """
Test resource allocation.
"""
import datetime
import getpass
import glob
import logging
import multiprocessing
import nose
import os.path
import platform
import shutil
import socket
import sys
import tempfile
import unittest
from openmdao.main.api import Assembly, Component
from openmdao.main.mp_util import read_... | 38.209524 | 87 | 0.542331 |
6844873007a39aeabb6dd217a027dad8b9645364 | 9,808 | py | Python | jasmin_api/rest_api/views/users.py | uralov/jasmin-api | f2a417947592641af4d27eadddeef23579520f9e | [
"Apache-2.0"
] | 11 | 2016-01-21T12:34:51.000Z | 2020-04-07T10:54:23.000Z | jasmin_api/rest_api/views/users.py | uralov/jasmin-api | f2a417947592641af4d27eadddeef23579520f9e | [
"Apache-2.0"
] | 8 | 2015-12-25T10:05:49.000Z | 2017-04-18T21:56:21.000Z | jasmin_api/rest_api/views/users.py | uralov/jasmin-api | f2a417947592641af4d27eadddeef23579520f9e | [
"Apache-2.0"
] | 12 | 2015-12-25T10:04:35.000Z | 2021-01-10T01:17:37.000Z | from django.conf import settings
from django.http import JsonResponse
from rest_framework.viewsets import ViewSet
from rest_framework.parsers import JSONParser
from rest_framework.decorators import detail_route, parser_classes
from rest_api.tools import set_ikeys
from rest_api.exceptions import (JasminSyntaxError, Ja... | 35.665455 | 99 | 0.552406 |
4bf901c78a6ffec0de521f6ebbb2c86c87f8d822 | 3,689 | py | Python | Chapter02/generative_gaussian_mixtures.py | arifmudi/Mastering-Machine-Learning-Algorithms | 8655e8e3f1e94f4d65bb92465033ebf54c193409 | [
"MIT"
] | 48 | 2018-05-28T12:16:18.000Z | 2022-02-24T12:49:10.000Z | Chapter02/generative_gaussian_mixtures.py | arifmudi/Mastering-Machine-Learning-Algorithms | 8655e8e3f1e94f4d65bb92465033ebf54c193409 | [
"MIT"
] | 1 | 2018-08-19T05:48:22.000Z | 2018-08-19T05:48:22.000Z | Chapter02/generative_gaussian_mixtures.py | arifmudi/Mastering-Machine-Learning-Algorithms | 8655e8e3f1e94f4d65bb92465033ebf54c193409 | [
"MIT"
] | 41 | 2018-05-28T12:16:19.000Z | 2022-01-14T18:48:12.000Z | import matplotlib.pyplot as plt
import numpy as np
from matplotlib.patches import Ellipse
from sklearn.datasets import make_blobs
from scipy.stats import multivariate_normal
# Set random seed for reproducibility
np.random.seed(1000)
nb_samples = 1000
nb_unlabeled = 750
nb_iterations = 5
# First Gaussi... | 32.078261 | 121 | 0.545405 |
48f3601e7d9b9ea55f4bbbfa037a2792d0646bdd | 3,624 | py | Python | setup.py | alexmacniven/ftptools | 68b5c86131cb1cb7507cc566d179799ac4ac9523 | [
"MIT"
] | null | null | null | setup.py | alexmacniven/ftptools | 68b5c86131cb1cb7507cc566d179799ac4ac9523 | [
"MIT"
] | 1 | 2019-11-12T13:18:11.000Z | 2019-11-12T13:32:11.000Z | setup.py | alexmacniven/ftptools | 68b5c86131cb1cb7507cc566d179799ac4ac9523 | [
"MIT"
] | null | null | null | """
setup.py
https://github.com/navdeep-G/setup.py
"""
import io
import os
import sys
from shutil import rmtree
from setuptools import find_packages, setup, Command
# Package meta-data.
NAME = "ftptools"
DESCRIPTION = ("A python package to make working with FTP"
" commands that little bit easier.")
UR... | 27.454545 | 79 | 0.628035 |
df71da5fb04e90d67e34bae437f3b1a73d3c29b1 | 681 | py | Python | tests/test_decorators/timeout_test.py | FBruzzesi/deczoo | c03aa4991411f8c922027f47149cc996ea88ee82 | [
"MIT"
] | 6 | 2022-03-24T23:05:36.000Z | 2022-03-29T15:28:56.000Z | tests/test_decorators/timeout_test.py | FBruzzesi/deczoo | c03aa4991411f8c922027f47149cc996ea88ee82 | [
"MIT"
] | null | null | null | tests/test_decorators/timeout_test.py | FBruzzesi/deczoo | c03aa4991411f8c922027f47149cc996ea88ee82 | [
"MIT"
] | null | null | null | import pytest
import time
from deczoo import timeout
@pytest.mark.parametrize(
"a, b, expected",
[(1, 1, 2), (1, 2, 3)],
)
def test_within_time_limit(sleepy_add, a, b, expected):
"""Tests that if the function runs within time limit returns true value"""
add = timeout(sleepy_add, time_limit=3)
as... | 24.321429 | 84 | 0.662261 |
6553a7b0750a7134814ecb7e25d901312a344901 | 14,947 | py | Python | litex/soc/cores/jtag.py | jevinskie/litex | a5f877b27fab28b48651deccbbceca732172fa69 | [
"ADSL"
] | null | null | null | litex/soc/cores/jtag.py | jevinskie/litex | a5f877b27fab28b48651deccbbceca732172fa69 | [
"ADSL"
] | null | null | null | litex/soc/cores/jtag.py | jevinskie/litex | a5f877b27fab28b48651deccbbceca732172fa69 | [
"ADSL"
] | 1 | 2022-01-26T04:52:58.000Z | 2022-01-26T04:52:58.000Z | #
# This file is part of LiteX.
#
# Copyright (c) 2019 Florent Kermarrec <florent@enjoy-digital.fr>
# Copyright (c) 2019 Antti Lukats <antti.lukats@gmail.com>
# Copyright (c) 2017 Robert Jordens <jordens@gmail.com>
# SPDX-License-Identifier: BSD-2-Clause
from migen import *
from migen.genlib.cdc import AsyncResetSynch... | 33.893424 | 105 | 0.505586 |
5c514f22cb47acc9ef073ac4cbbaf037d6d8fe42 | 688 | py | Python | src/app/bootstrap/key/public_key.py | 5GZORRO/identity | de14b5abacca78b5729e49beffe9ffd667c27775 | [
"Apache-2.0"
] | null | null | null | src/app/bootstrap/key/public_key.py | 5GZORRO/identity | de14b5abacca78b5729e49beffe9ffd667c27775 | [
"Apache-2.0"
] | 1 | 2021-11-10T17:27:59.000Z | 2022-02-08T11:40:03.000Z | src/app/bootstrap/key/public_key.py | 5GZORRO/identity | de14b5abacca78b5729e49beffe9ffd667c27775 | [
"Apache-2.0"
] | 1 | 2021-01-06T16:28:10.000Z | 2021-01-06T16:28:10.000Z | import requests, json, time, sys, os
from timeloop import Timeloop
from datetime import timedelta
from loguru import logger
# Create public agent key
def public_key_create():
try:
holder_url = os.environ["HOLDER_AGENT_URL"]
resp = requests.post(holder_url+"/wallet/did/create", timeout=30)
r... | 32.761905 | 73 | 0.65843 |
ddaaac8574ac25b841c89b570a01f96d74433590 | 8,666 | py | Python | netspot/views.py | MaxIV-KitsControls/netspot | 42f505d004bcadcfb32b6ca0511572d38641c23a | [
"MIT"
] | null | null | null | netspot/views.py | MaxIV-KitsControls/netspot | 42f505d004bcadcfb32b6ca0511572d38641c23a | [
"MIT"
] | null | null | null | netspot/views.py | MaxIV-KitsControls/netspot | 42f505d004bcadcfb32b6ca0511572d38641c23a | [
"MIT"
] | null | null | null | """NetSPOT views."""
import datetime
import helpers
import netspot_settings
from django.shortcuts import render
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.core.exceptions import ObjectDoesNotExist
from .models import ConfigurationT... | 23.807692 | 94 | 0.650819 |
0c73514d302b3ed62ff5e5ca7846947d650654e4 | 1,666 | py | Python | crop_frames.py | Mikhael-Danilov/RandomUtils | 13cfd225ba2caa1e3fe64c8c042d845e1ece3da8 | [
"MIT"
] | null | null | null | crop_frames.py | Mikhael-Danilov/RandomUtils | 13cfd225ba2caa1e3fe64c8c042d845e1ece3da8 | [
"MIT"
] | null | null | null | crop_frames.py | Mikhael-Danilov/RandomUtils | 13cfd225ba2caa1e3fe64c8c042d845e1ece3da8 | [
"MIT"
] | null | null | null | import os
from PIL import Image
from PIL import ImageStat
xs = 32
ys = 32
nFrames = 20
oXs = 1024
oYs = 32
rootDir = '/media/mike/BigData/Nyrds/pixel-dungeon-remix/PixelDungeon/src/main/assets/hero_modern'
def paddedFrameRect(x, y, xs, ys, n, pad):
if n == 0:
return x, y, x + pad, y + ys
if n == 1... | 22.821918 | 98 | 0.517407 |
0360d6a348b1e1e1ab46f6bb4df0785252b2bea4 | 33,734 | py | Python | test/test_algorithm.py | matthiasdiener/pyopencl | b072dd5298d4ecd340afe61089529fb3148872af | [
"Apache-2.0"
] | null | null | null | test/test_algorithm.py | matthiasdiener/pyopencl | b072dd5298d4ecd340afe61089529fb3148872af | [
"Apache-2.0"
] | null | null | null | test/test_algorithm.py | matthiasdiener/pyopencl | b072dd5298d4ecd340afe61089529fb3148872af | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
from __future__ import division, with_statement, absolute_import, print_function
__copyright__ = "Copyright (C) 2013 Andreas Kloeckner"
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Softw... | 29.721586 | 91 | 0.596164 |
13421af2e0d3b6ea525184f659fcccf29f3830a5 | 3,360 | py | Python | python_prototypes/Aldebran_examples/almotion_hulaHoop.py | mikemcfarlane/nao-emotional-framework | 8f8fb3e6d4d27d4f55f55291c9998c94434e1320 | [
"Apache-2.0"
] | null | null | null | python_prototypes/Aldebran_examples/almotion_hulaHoop.py | mikemcfarlane/nao-emotional-framework | 8f8fb3e6d4d27d4f55f55291c9998c94434e1320 | [
"Apache-2.0"
] | null | null | null | python_prototypes/Aldebran_examples/almotion_hulaHoop.py | mikemcfarlane/nao-emotional-framework | 8f8fb3e6d4d27d4f55f55291c9998c94434e1320 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: UTF-8 -*-
'''Motion: Hula Hoop'''
''' This example is only compatible with NAO '''
import argparse
import motion
import almath
from naoqi import ALProxy
def main(robotIP, PORT=9559):
'''
Example showing a Hula Hoop Motion
with the NAO cartesian control of torso
'''
moti... | 32.307692 | 92 | 0.647024 |
358996aca19319eaab46187577d4824785f14b32 | 21,605 | py | Python | kitsune/search/views.py | yfdyh000/kitsune | 9a50b03b715bbabe0543b45d2146875995a6d1e4 | [
"BSD-3-Clause"
] | null | null | null | kitsune/search/views.py | yfdyh000/kitsune | 9a50b03b715bbabe0543b45d2146875995a6d1e4 | [
"BSD-3-Clause"
] | null | null | null | kitsune/search/views.py | yfdyh000/kitsune | 9a50b03b715bbabe0543b45d2146875995a6d1e4 | [
"BSD-3-Clause"
] | null | null | null | import json
import re
import time
from datetime import datetime, timedelta
from itertools import chain
from django.conf import settings
from django.contrib.sites.models import Site
from django.http import HttpResponse, HttpResponseBadRequest
from django.shortcuts import render
from django.utils.html import escape
from... | 35.302288 | 79 | 0.603333 |
902fb06a22250e0ea1740df0ee476aca86e5aaf3 | 1,815 | py | Python | Dart/dart.py | Arpan-29/PI | 8b11b66f1f7bc7affbbbc1b8ad0816ee1e848982 | [
"MIT"
] | null | null | null | Dart/dart.py | Arpan-29/PI | 8b11b66f1f7bc7affbbbc1b8ad0816ee1e848982 | [
"MIT"
] | null | null | null | Dart/dart.py | Arpan-29/PI | 8b11b66f1f7bc7affbbbc1b8ad0816ee1e848982 | [
"MIT"
] | null | null | null | import pygame
import random
pygame.init()
font = pygame.font.SysFont("Times New Roman", 50)
screenHeight = 600
screenWidth = 600
win = pygame.display.set_mode((screenWidth, screenHeight))
pygame.display.set_caption('Approximation of PI')
win.fill(0)
pygame.draw.circle(win, (255,255,255), (screenWidth // ... | 26.691176 | 97 | 0.528926 |
5fabb64cf003301cd5c1fc0465b290b18c42388c | 578 | py | Python | weights/ssdweights .py | LinTANGSS/SSD_resnet_pytorch | 1f21b269de1bbf1e18145e5959ad7b3612ffc890 | [
"MIT"
] | 48 | 2018-11-24T11:04:28.000Z | 2021-12-03T11:45:43.000Z | weights/ssdweights .py | LinTANGSS/SSD_resnet_pytorch | 1f21b269de1bbf1e18145e5959ad7b3612ffc890 | [
"MIT"
] | 4 | 2020-05-25T09:03:25.000Z | 2020-12-05T05:37:04.000Z | weights/ssdweights .py | yczhang1017/SSD_resnet_pytorch | 1f21b269de1bbf1e18145e5959ad7b3612ffc890 | [
"MIT"
] | 9 | 2018-11-30T09:53:30.000Z | 2020-12-05T07:15:30.000Z | import torch.utils.model_zoo as model_zoo
import torch
import numpy as np
from collections import OrderedDict
if torch.cuda.is_available():
r50=torch.load('ssd_300_VOC0712_0.pth')
else:
r50=torch.load('ssd_300_VOC0712_0.pth',map_location='cpu')
rr50=OrderedDict()
for i,_ in enumerate(range(len(r5... | 22.230769 | 63 | 0.602076 |
53f3675c075d366412207416db67d86b58e413d5 | 2,351 | py | Python | app.py | lehr-laemp/kiga-webapp-V2 | 1d35dd1deb82962e166169245fa0d4e5f265af22 | [
"Unlicense"
] | null | null | null | app.py | lehr-laemp/kiga-webapp-V2 | 1d35dd1deb82962e166169245fa0d4e5f265af22 | [
"Unlicense"
] | null | null | null | app.py | lehr-laemp/kiga-webapp-V2 | 1d35dd1deb82962e166169245fa0d4e5f265af22 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Begonnen am 12.03.2022
@author: HM
app.py
- Hauptprogramm
- lädt alle nötigen Funktionen aus dem Ordner def
- Programm soll eine Oberfläche erstellen, damit Schülerdaten eingegeben werden könnnen
- geschützt - verschlüsselt
- übers Internet
"""
# -----------... | 23.277228 | 91 | 0.56912 |
97daf7dcc69959d8290f57e68ab5c76fa8d70144 | 4,816 | py | Python | dragonkeeper/common.py | operasoftware/dragonkeeper | 0b8719c6acc22bb758340cb31a95a19cc0f64bd1 | [
"Apache-2.0"
] | 5 | 2015-05-21T09:18:07.000Z | 2020-05-30T18:25:45.000Z | dragonkeeper/common.py | operasoftware/dragonkeeper | 0b8719c6acc22bb758340cb31a95a19cc0f64bd1 | [
"Apache-2.0"
] | null | null | null | dragonkeeper/common.py | operasoftware/dragonkeeper | 0b8719c6acc22bb758340cb31a95a19cc0f64bd1 | [
"Apache-2.0"
] | 9 | 2015-06-05T08:54:27.000Z | 2020-06-28T19:19:01.000Z | __version__ = '0.8.3'
import socket
import asyncore
import os
import re
import string
import sys
import time
import codecs
from time import gmtime, strftime, mktime, strptime, time, daylight
from calendar import timegm
from os import stat, listdir
from os.path import isfile, isdir
from os.path import exists as path_ex... | 22.296296 | 115 | 0.600706 |
156319fe358349124b9e14da9eb2bcec4b08c282 | 5,641 | py | Python | nablapps/officeBeer/views.py | pettaroni/nablaweb | 5e610698a276884b9cd779a718dfdee641713636 | [
"MIT"
] | null | null | null | nablapps/officeBeer/views.py | pettaroni/nablaweb | 5e610698a276884b9cd779a718dfdee641713636 | [
"MIT"
] | null | null | null | nablapps/officeBeer/views.py | pettaroni/nablaweb | 5e610698a276884b9cd779a718dfdee641713636 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.views.generic import TemplateView, FormView
from django import forms
from django.core.exceptions import ValidationError
from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
from django.contrib import messages
from .models import Ac... | 44.070313 | 139 | 0.664776 |
abe19c971ae37538d2c89a6e53bc4bcddf3f7d61 | 11,109 | py | Python | test/test_filters.py | sailfishos-mirror/mako | 4896546eb4e9248c4f3bb4827d67562227c8762f | [
"MIT"
] | 207 | 2018-11-27T00:16:37.000Z | 2022-03-30T09:45:15.000Z | test/test_filters.py | sailfishos-mirror/mako | 4896546eb4e9248c4f3bb4827d67562227c8762f | [
"MIT"
] | 82 | 2018-11-26T21:39:53.000Z | 2022-03-26T05:27:36.000Z | test/test_filters.py | sailfishos-mirror/mako | 4896546eb4e9248c4f3bb4827d67562227c8762f | [
"MIT"
] | 52 | 2019-03-10T17:15:53.000Z | 2022-03-28T06:44:16.000Z | # -*- coding: utf-8 -*-
import unittest
from mako.template import Template
from .util.assertions import eq_
from .util.fixtures import TemplateTest
from .util.helpers import flatten_result
from .util.helpers import result_lines
class FilterTest(TemplateTest):
def test_basic(self):
t = Template(
... | 24.15 | 79 | 0.406337 |
9edfa366d8ab8256169ea219a00775d7b8e2dd42 | 7,672 | py | Python | src/datadog_api_client/v2/model/incident_services_response.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v2/model/incident_services_response.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v2/model/incident_services_response.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
import re # noqa: F401
import sys # noqa: F401
import nulltype # ... | 41.695652 | 133 | 0.611314 |
ad5dc0d142388d8feea0e773b95b299946c673c2 | 2,576 | py | Python | dash-mqtt/jsonconfig.py | smolz/Misc-Python-Projects | b630b64fcbdbd729e3abe8b1e8ca9e8e5a54937b | [
"MIT"
] | null | null | null | dash-mqtt/jsonconfig.py | smolz/Misc-Python-Projects | b630b64fcbdbd729e3abe8b1e8ca9e8e5a54937b | [
"MIT"
] | null | null | null | dash-mqtt/jsonconfig.py | smolz/Misc-Python-Projects | b630b64fcbdbd729e3abe8b1e8ca9e8e5a54937b | [
"MIT"
] | null | null | null | """
* The MIT License (MIT)
*
* Copyright (c) 2017 Chris Smolen
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use... | 35.777778 | 101 | 0.660326 |
8affc167784779ec6c10501feff04429c76c0ced | 434 | py | Python | PythonExercicios/ex115/sistema.py | raulgranja/Python-Course | eaf776ab144923266a4784586f6bdf21911a5235 | [
"MIT"
] | null | null | null | PythonExercicios/ex115/sistema.py | raulgranja/Python-Course | eaf776ab144923266a4784586f6bdf21911a5235 | [
"MIT"
] | null | null | null | PythonExercicios/ex115/sistema.py | raulgranja/Python-Course | eaf776ab144923266a4784586f6bdf21911a5235 | [
"MIT"
] | null | null | null | from menu import *
from arquivo import *
arq = 'cursoemvideo.txt'
if not arquivoExiste(arq):
criarArquivo(arq)
while True:
lista = ['Ver pessoas cadastradas', 'Cadastrar nova Pessoa', 'Sair do Sistema']
resposta = menu(lista) + 1
if resposta == 3:
cabecalho('Saindo do sistema... Até logo!')
... | 22.842105 | 83 | 0.631336 |
4c0397c983bb9cecefe78caaa82d2f783f0e9eea | 773 | py | Python | aiogram_keyboards/core/helpers.py | TheArcherST/aiogram_keyboards | 2a6a6e76e825b53020de985b237f56fcc1f9a8b0 | [
"MIT"
] | 1 | 2021-10-30T23:38:38.000Z | 2021-10-30T23:38:38.000Z | aiogram_keyboards/core/helpers.py | TheArcherST/aiogram_keyboards | 2a6a6e76e825b53020de985b237f56fcc1f9a8b0 | [
"MIT"
] | 7 | 2021-10-30T23:34:22.000Z | 2022-01-21T21:31:20.000Z | aiogram_keyboards/core/helpers.py | TheArcherST/aiogram_keyboards | 2a6a6e76e825b53020de985b237f56fcc1f9a8b0 | [
"MIT"
] | 2 | 2021-11-05T08:08:09.000Z | 2021-11-10T12:17:45.000Z | class MarkupType:
TEXT = 'TEXT'
INLINE = 'INLINE'
UNDEFINED = f'{TEXT}+{INLINE}'
class Orientation:
TOP = -1
UNDEFINED = 0
BOTTOM = 1
class MarkupScope:
MESSAGE = 'm'
CALLBACK_QUERY = 'c'
UNDEFINED = f'{MESSAGE}+{CALLBACK_QUERY}'
@classmethod
def cast_to_type(cls, scope:... | 20.891892 | 66 | 0.54075 |
ee99cedfdd517fa9e7f114f60455059e8f5cbc2c | 5,161 | py | Python | automol/graph/_igraph.py | sjklipp/autochem | ac343a4bc5ff8c9a75e75d7ed717ea2db659b7a0 | [
"Apache-2.0"
] | 1 | 2021-03-01T14:21:08.000Z | 2021-03-01T14:21:08.000Z | automol/graph/_igraph.py | avcopan/autochem | 19d9b0402568170ae5ca0adecb460d36f258a9bd | [
"Apache-2.0"
] | null | null | null | automol/graph/_igraph.py | avcopan/autochem | 19d9b0402568170ae5ca0adecb460d36f258a9bd | [
"Apache-2.0"
] | null | null | null | """ igraph interface
"""
# import itertools
import igraph
import automol.create.graph
# from automol.util import dict_
from phydat import ptab
def from_graph(gra):
""" igraph object from a molecular graph
"""
atm_keys = sorted(automol.graph.atom_keys(gra))
bnd_keys = sorted(automol.graph.bond_keys(gr... | 28.994382 | 79 | 0.618872 |
45e500b8418dc07bb650add957ae02389ed87258 | 4,336 | py | Python | tests/test_big_cfpq_data.py | SmirnovOleg/formal-languages | 43408e727b516529f840599c1259d81e0a21cfcc | [
"Apache-2.0"
] | null | null | null | tests/test_big_cfpq_data.py | SmirnovOleg/formal-languages | 43408e727b516529f840599c1259d81e0a21cfcc | [
"Apache-2.0"
] | 1 | 2020-12-02T12:29:50.000Z | 2020-12-02T13:10:41.000Z | tests/test_big_cfpq_data.py | SmirnovOleg/formal-languages | 43408e727b516529f840599c1259d81e0a21cfcc | [
"Apache-2.0"
] | null | null | null | import csv
import os
import time
from functools import wraps
from itertools import product
from pathlib import Path
import pytest
from wrappers import GraphWrapper, GrammarWrapper, RFA
data_path = os.path.join(os.getcwd(), 'tests/big_cfpq_data/')
try:
test_suites = [name for name in os.listdir(data_path) if os.p... | 40.523364 | 115 | 0.676891 |
b413e0d286a5c1127b1fddc2cb4c440f890710d9 | 2,879 | py | Python | accounts/migrations/0001_initial.py | Brlaney/django-bs-starter | 8b612e5d211b97754604646fbbd11a3ad42570f2 | [
"MIT"
] | 1 | 2021-07-05T18:29:55.000Z | 2021-07-05T18:29:55.000Z | accounts/migrations/0001_initial.py | Brlaney/django-bs-starter | 8b612e5d211b97754604646fbbd11a3ad42570f2 | [
"MIT"
] | null | null | null | accounts/migrations/0001_initial.py | Brlaney/django-bs-starter | 8b612e5d211b97754604646fbbd11a3ad42570f2 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-07-05 18:38
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_m... | 63.977778 | 329 | 0.664467 |
ca4b0ae413a0579e54cf61a88a6c7a1a3f83406b | 816 | py | Python | test/unit/test_routing.py | esadek/spacex-launch-tracker | ccaf189906d76e6b33501929aabd7b0475167573 | [
"MIT"
] | null | null | null | test/unit/test_routing.py | esadek/spacex-launch-tracker | ccaf189906d76e6b33501929aabd7b0475167573 | [
"MIT"
] | null | null | null | test/unit/test_routing.py | esadek/spacex-launch-tracker | ccaf189906d76e6b33501929aabd7b0475167573 | [
"MIT"
] | null | null | null | import os
import sys
import unittest
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../../src')))
from app import app
class TestRouting(unittest.TestCase):
def setUp(self) -> None:
self.app = app.test_client()
def test_home_status_code(self) -> None:
response = s... | 29.142857 | 89 | 0.670343 |
85bb609a45fba3b2a1a7b12c0db90308701075cd | 2,571 | py | Python | data_process.py | shffrror/isdi | 0e6da392d61ed462ebbc5bf5b45bec6c11f5f941 | [
"MIT"
] | 85 | 2019-08-15T15:10:39.000Z | 2022-03-21T21:36:44.000Z | data_process.py | stefftw/isdi | 0e6da392d61ed462ebbc5bf5b45bec6c11f5f941 | [
"MIT"
] | 23 | 2019-08-02T15:59:33.000Z | 2022-03-30T14:34:45.000Z | data_process.py | stefftw/isdi | 0e6da392d61ed462ebbc5bf5b45bec6c11f5f941 | [
"MIT"
] | 28 | 2019-09-08T16:09:47.000Z | 2022-03-23T15:34:58.000Z | import pandas as pd
import config
import dataset
import sys
def join_csv_files(flist, ofname):
pd.concat([pd.read_csv(f) for f in flist])\
.to_csv(ofname, index=None, compression='gzip')
def create_app_flags_file():
dlist = []
for k, v in config.source_files.items():
d = pd.read_csv(v, ind... | 37.26087 | 98 | 0.58382 |
e77d18fee4f6b479e0f271a91472580e6ee7fdb0 | 22,322 | py | Python | server/website/script/fixture_generators/knob_settings/postgres_9.6/create_knob_settings.py | selwyni/ottertune-1 | 2a096eb7572a46f14522c5ff758aa7970fba81db | [
"Apache-2.0"
] | 1 | 2019-07-25T02:52:18.000Z | 2019-07-25T02:52:18.000Z | server/website/script/fixture_generators/knob_settings/postgres_9.6/create_knob_settings.py | selwyni/ottertune-1 | 2a096eb7572a46f14522c5ff758aa7970fba81db | [
"Apache-2.0"
] | null | null | null | server/website/script/fixture_generators/knob_settings/postgres_9.6/create_knob_settings.py | selwyni/ottertune-1 | 2a096eb7572a46f14522c5ff758aa7970fba81db | [
"Apache-2.0"
] | 1 | 2021-04-02T17:10:21.000Z | 2021-04-02T17:10:21.000Z | #
# OtterTune - create_knob_settings.py
#
# Copyright (c) 2017-18, Carnegie Mellon University Database Group
#
import csv
import json
import shutil
from collections import OrderedDict
PG_SYSTEM = [
(1024 ** 5, 'PB'),
(1024 ** 4, 'TB'),
(1024 ** 3, 'GB'),
(1024 ** 2, 'MB'),
(1024 ** 1, 'kB'),
(1... | 38.353952 | 96 | 0.633635 |
ff9c05c7d58569727c3812d0af80b093e46abfbe | 4,894 | py | Python | python_module/SuperGLU/Services/TextProcessing/pynum2word/num2word_ES.py | GeneralizedLearningUtilities/SuperGLU | 1c373d1358431fb96dd70b324b26a14fc8ed1fcb | [
"MIT"
] | 8 | 2015-07-13T23:07:20.000Z | 2020-11-13T21:09:55.000Z | python_module/SuperGLU/Services/TextProcessing/pynum2word/num2word_ES.py | GeneralizedLearningUtilities/SuperGLU | 1c373d1358431fb96dd70b324b26a14fc8ed1fcb | [
"MIT"
] | 7 | 2016-01-13T12:13:56.000Z | 2021-12-14T21:12:28.000Z | python_module/SuperGLU/Services/TextProcessing/pynum2word/num2word_ES.py | GeneralizedLearningUtilities/SuperGLU | 1c373d1358431fb96dd70b324b26a14fc8ed1fcb | [
"MIT"
] | 6 | 2015-09-23T17:53:32.000Z | 2020-04-30T07:27:01.000Z | '''
Module: num2word_ES.py
Requires: num2word_EU.py
Version: 0.3
Author:
Taro Ogawa (tso@users.sourceforge.org)
Copyright:
Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
Licence:
This module is distributed under the Lesser General Public Licence.
http://www.opensource.org/licenses/lgpl-licen... | 33.067568 | 141 | 0.528198 |
fa451c9abd0bf45d28a24a474d49939a2486ef90 | 1,044 | py | Python | graviteeio_cli/http_client/apim/api_async.py | Shaker5191/graviteeio-cli | 318748bb8e631743ea58afaee24333249ca3d227 | [
"Apache-2.0"
] | null | null | null | graviteeio_cli/http_client/apim/api_async.py | Shaker5191/graviteeio-cli | 318748bb8e631743ea58afaee24333249ca3d227 | [
"Apache-2.0"
] | null | null | null | graviteeio_cli/http_client/apim/api_async.py | Shaker5191/graviteeio-cli | 318748bb8e631743ea58afaee24333249ca3d227 | [
"Apache-2.0"
] | null | null | null | import asyncio
import concurrent.futures
from graviteeio_cli.core.config import GraviteeioConfig
from ..gio_resources import APIM_Client
APIS_CONTEXT = "/management/{}apis/"
class ApiClientAsync:
def __init__(self, config: GraviteeioConfig = None, debug=False):
self.config = config
self.timeout ... | 28.216216 | 79 | 0.617816 |
547df13ee30c996a0e9ecf602352debe3180d58d | 17,297 | py | Python | resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/idlelib/MultiCall.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | 7 | 2015-04-06T15:17:13.000Z | 2020-10-21T04:57:00.000Z | resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/idlelib/MultiCall.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | 1 | 2021-04-11T15:01:12.000Z | 2021-04-11T15:01:12.000Z | resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/idlelib/MultiCall.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | 4 | 2016-05-16T17:53:08.000Z | 2020-11-28T17:18:50.000Z | """
MultiCall - a class which inherits its methods from a Tkinter widget (Text, for
example), but enables multiple calls of functions per virtual event - all
matching events will be called, not only the most specific one. This is done
by wrapping the event functions - event_add, event_delete and event_info.
MultiCall r... | 42.498771 | 80 | 0.585015 |
0ce1ca500f6c544a2c3427d07e6d39a00990b04d | 2,853 | py | Python | scripts/dynamics.py | korzhimanov/vlasov-solver | ffaeb5ae5a0f756a933d6e353b026e4df98c15c9 | [
"MIT"
] | 6 | 2016-09-22T04:17:52.000Z | 2021-04-17T00:13:33.000Z | scripts/dynamics.py | korzhimanov/vlasov-solver | ffaeb5ae5a0f756a933d6e353b026e4df98c15c9 | [
"MIT"
] | null | null | null | scripts/dynamics.py | korzhimanov/vlasov-solver | ffaeb5ae5a0f756a933d6e353b026e4df98c15c9 | [
"MIT"
] | 4 | 2016-11-23T02:28:23.000Z | 2020-09-29T01:03:54.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import numpy as np
import gzip
import matplotlib.pyplot as plt
from init import sail as inp
data_size = inp.MAX_Z
energy_data_size = 100000
prefix = 'output'
fig = plt.figure(figsize=(16, 12))
fd = gzip.open('{0}/conc0.gz'.format(prefix), 'rb')
a = np.frombuffer(fd.read(),... | 25.473214 | 84 | 0.662461 |
fade7e481ad1a2523132abf71d655c294bdc11ff | 13,463 | py | Python | youtube_dl/extractor/vevo.py | w00kster/not-youtube-dl | fa9b454e2191c7d8d4d2cdcf72a370ee9c681e96 | [
"Unlicense"
] | null | null | null | youtube_dl/extractor/vevo.py | w00kster/not-youtube-dl | fa9b454e2191c7d8d4d2cdcf72a370ee9c681e96 | [
"Unlicense"
] | null | null | null | youtube_dl/extractor/vevo.py | w00kster/not-youtube-dl | fa9b454e2191c7d8d4d2cdcf72a370ee9c681e96 | [
"Unlicense"
] | null | null | null | from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
from ..compat import (
compat_str,
compat_urlparse,
compat_HTTPError,
)
from ..utils import (
ExtractorError,
int_or_none,
parse_iso8601,
)
class VevoBaseIE(InfoExtractor):
def _extract_json(s... | 37.501393 | 121 | 0.525217 |
0081ee798efbc16b50501888d0ca058a0edf10e2 | 21,960 | py | Python | skbio/io/format/fastq.py | ebolyen/scikit-bio | 04dff688aa67de871e7c4b1c47f459d0f701b4d2 | [
"BSD-3-Clause"
] | null | null | null | skbio/io/format/fastq.py | ebolyen/scikit-bio | 04dff688aa67de871e7c4b1c47f459d0f701b4d2 | [
"BSD-3-Clause"
] | null | null | null | skbio/io/format/fastq.py | ebolyen/scikit-bio | 04dff688aa67de871e7c4b1c47f459d0f701b4d2 | [
"BSD-3-Clause"
] | null | null | null | r"""
FASTQ format (:mod:`skbio.io.format.fastq`)
===========================================
.. currentmodule:: skbio.io.format.fastq
The FASTQ file format (``fastq``) stores biological (e.g., nucleotide)
sequences and their quality scores in a simple plain text format that is both
human-readable and easy to parse. T... | 40.591497 | 79 | 0.610929 |
72cb0d13d6cc40d3794dae2a76156774d25447c2 | 17,240 | py | Python | gmrf/treeSampler.py | sakira/smc-pgm | 72282f4efe4f48186156ab0093023423be648efe | [
"MIT"
] | 4 | 2016-11-09T21:37:06.000Z | 2021-12-03T11:31:34.000Z | gmrf/treeSampler.py | sakira/smc-pgm | 72282f4efe4f48186156ab0093023423be648efe | [
"MIT"
] | null | null | null | gmrf/treeSampler.py | sakira/smc-pgm | 72282f4efe4f48186156ab0093023423be648efe | [
"MIT"
] | 2 | 2018-12-15T11:54:04.000Z | 2020-11-25T17:30:25.000Z | """treeSampler.py
2D square lattice Gaussian MRF using tree sampling.
"""
import numpy as np
from scipy import misc
from numpy.random import random_sample
import time
def main():
# Number of particles - N, number of iterations of PGAS - R
R = 1000
# Initialize arrays/matrices
nx = 10
ny = 10... | 44.43299 | 119 | 0.528306 |
164386ce69ea90a51f7a20e043c67c3e835499e3 | 47 | py | Python | create_table.py | UniBell/crawler | 39bf28b57f5cb35af8032254cee710c5be663fd6 | [
"Apache-2.0"
] | null | null | null | create_table.py | UniBell/crawler | 39bf28b57f5cb35af8032254cee710c5be663fd6 | [
"Apache-2.0"
] | null | null | null | create_table.py | UniBell/crawler | 39bf28b57f5cb35af8032254cee710c5be663fd6 | [
"Apache-2.0"
] | null | null | null | from crawler.manager import db
db.create_all()
| 15.666667 | 30 | 0.808511 |
eed15b4da0de7c36b8aace9c3b85c5757385be82 | 41,491 | py | Python | libcloud/loadbalancer/drivers/dimensiondata.py | niteoweb/libcloud | 1965299d9895e04ae77d1d0a27209610e1cecb90 | [
"Apache-2.0"
] | null | null | null | libcloud/loadbalancer/drivers/dimensiondata.py | niteoweb/libcloud | 1965299d9895e04ae77d1d0a27209610e1cecb90 | [
"Apache-2.0"
] | 1 | 2015-10-26T21:29:56.000Z | 2015-10-27T17:29:20.000Z | libcloud/loadbalancer/drivers/dimensiondata.py | niteoweb/libcloud | 1965299d9895e04ae77d1d0a27209610e1cecb90 | [
"Apache-2.0"
] | 1 | 2020-11-11T12:59:13.000Z | 2020-11-11T12:59:13.000Z | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 36.815439 | 79 | 0.594057 |
ef0cbd3fe4ce6259a09c389bc8ef5da5e1a46534 | 4,704 | py | Python | applications/taurus/taurus/announcement.py | FrederichRiver/neutrino | e91db53486e56ddeb83ae9714311d606b33fb165 | [
"BSD-3-Clause"
] | 2 | 2019-02-10T15:14:23.000Z | 2019-02-12T13:59:52.000Z | applications/taurus/taurus/announcement.py | FrederichRiver/neutrino | e91db53486e56ddeb83ae9714311d606b33fb165 | [
"BSD-3-Clause"
] | null | null | null | applications/taurus/taurus/announcement.py | FrederichRiver/neutrino | e91db53486e56ddeb83ae9714311d606b33fb165 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3
from venus.cninfo import cninfoSpider
class cninfoAnnounce(cninfoSpider):
def _set_param(self):
from polaris.mysql8 import mysqlBase
from dev_global.env import GLOBAL_HEADER
self.index = mysqlBase(GLOBAL_HEADER)
self.url = 'http://www.cninfo.com.cn/new/hisAnnoun... | 43.962617 | 441 | 0.60034 |
74e3c1ca61f4e9c651e460e5f63c11f7b273e557 | 1,968 | py | Python | examples/agnn.py | mrmotallebi/pytorch_geometric | 5d768659d2a54544219c057ad05172ca55b43119 | [
"MIT"
] | 12,651 | 2017-10-28T15:14:24.000Z | 2021-09-12T07:22:57.000Z | examples/agnn.py | mrmotallebi/pytorch_geometric | 5d768659d2a54544219c057ad05172ca55b43119 | [
"MIT"
] | 2,472 | 2017-10-30T23:38:47.000Z | 2021-09-12T06:41:44.000Z | examples/agnn.py | mrmotallebi/pytorch_geometric | 5d768659d2a54544219c057ad05172ca55b43119 | [
"MIT"
] | 2,363 | 2017-12-01T13:25:05.000Z | 2021-09-12T07:23:09.000Z | import os.path as osp
import torch
import torch.nn.functional as F
from torch_geometric.datasets import Planetoid
import torch_geometric.transforms as T
from torch_geometric.nn import AGNNConv
dataset = 'Cora'
path = osp.join(osp.dirname(osp.realpath(__file__)), '..', 'data', dataset)
dataset = Planetoid(path, datase... | 30.75 | 76 | 0.653455 |
5b56d0006e6363d5982200fa3a2a0417df696708 | 163 | py | Python | tests/__init__.py | marirs/quart-rapidoc | fd86604ee5ffea7bd33b08af537472f0df21e8c8 | [
"MIT"
] | 1 | 2020-07-06T17:11:02.000Z | 2020-07-06T17:11:02.000Z | tests/__init__.py | marirs/quart-rapidoc | fd86604ee5ffea7bd33b08af537472f0df21e8c8 | [
"MIT"
] | null | null | null | tests/__init__.py | marirs/quart-rapidoc | fd86604ee5ffea7bd33b08af537472f0df21e8c8 | [
"MIT"
] | null | null | null | import pytest
from .quart_rapidoc_tests.test_quart_rapidoc import TestQuartRapidoc
if __name__ == '__main__':
pytest.main(['--color=auto', '--no-cov', '-v'])
| 27.166667 | 68 | 0.723926 |
6f698e73d15203803e7537d323c0f30d12f866a2 | 30,139 | py | Python | experiments/experiments.py | gmum/3d-point-clouds-LoCondA | 9a9531d08eb4272cba01d6aafe633efeacd4e08a | [
"MIT"
] | 4 | 2021-02-17T05:44:15.000Z | 2021-09-03T19:40:08.000Z | experiments/experiments.py | gmum/3d-point-clouds-LoCondA | 9a9531d08eb4272cba01d6aafe633efeacd4e08a | [
"MIT"
] | null | null | null | experiments/experiments.py | gmum/3d-point-clouds-LoCondA | 9a9531d08eb4272cba01d6aafe633efeacd4e08a | [
"MIT"
] | 1 | 2021-03-06T08:04:09.000Z | 2021-03-06T08:04:09.000Z | import argparse
import json
import logging
import pickle
from os.path import join, exists
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn.parallel
import torch.utils.data
from torch.utils.data import DataLoader
from sklearn.neighbors import KNeighborsClassifier
from datasets.patche... | 55.607011 | 130 | 0.609841 |
29ca3466d9ab394bfcc655af0d3ab4538df06fcd | 1,449 | py | Python | {{cookiecutter.project_name}}/alembic/env.py | KovalevVasiliy/python-fastapi-backend | e9ed466c00bae2eeb0b4271b013cc8dacd98acf0 | [
"MIT"
] | 1 | 2020-05-11T14:42:25.000Z | 2020-05-11T14:42:25.000Z | {{cookiecutter.project_name}}/alembic/env.py | KovalevVasiliy/python-fastapi-backend | e9ed466c00bae2eeb0b4271b013cc8dacd98acf0 | [
"MIT"
] | null | null | null | {{cookiecutter.project_name}}/alembic/env.py | KovalevVasiliy/python-fastapi-backend | e9ed466c00bae2eeb0b4271b013cc8dacd98acf0 | [
"MIT"
] | null | null | null | from logging.config import fileConfig
from alembic import context
from sqlalchemy import create_engine
from conf import DB_URI
from database import Base
config = context.config
config.set_main_option('sqlalchemy.url', DB_URI)
fileConfig(config.config_file_name) # setting up loggers
target_metadata = Base.metadata... | 24.15 | 81 | 0.719807 |
4d36aa53f62757df434c94749324d3cb8c01accf | 7,055 | py | Python | sdk/keyvault/azure-keyvault-secrets/tests/test_samples_secrets_async.py | anuchandy/azure-sdk-for-python | 589b9890554ebf261aa2184e8f1c6507f01a207c | [
"MIT"
] | null | null | null | sdk/keyvault/azure-keyvault-secrets/tests/test_samples_secrets_async.py | anuchandy/azure-sdk-for-python | 589b9890554ebf261aa2184e8f1c6507f01a207c | [
"MIT"
] | null | null | null | sdk/keyvault/azure-keyvault-secrets/tests/test_samples_secrets_async.py | anuchandy/azure-sdk-for-python | 589b9890554ebf261aa2184e8f1c6507f01a207c | [
"MIT"
] | null | null | null | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# -------------------------------------
import hashlib
import os
from azure.core.exceptions import ResourceNotFoundError
from devtools_testutils import ResourceGroupPreparer, KeyVaultPreparer
from secrets_as... | 34.925743 | 115 | 0.694259 |
32ba2e2709e499b55a51280937cc963116f750cc | 3,990 | py | Python | src/sdk/pynni/nni/nas/pytorch/trainer.py | Rapixar/nni | 21699435fbfde11b8d2809171426a34b4aaad4e1 | [
"MIT"
] | 2 | 2019-12-30T20:42:17.000Z | 2021-01-24T16:51:56.000Z | src/sdk/pynni/nni/nas/pytorch/trainer.py | lswzjuer/nni | e9cba778257804a2a1a6002687835233a779d7af | [
"MIT"
] | null | null | null | src/sdk/pynni/nni/nas/pytorch/trainer.py | lswzjuer/nni | e9cba778257804a2a1a6002687835233a779d7af | [
"MIT"
] | 1 | 2020-01-11T13:19:26.000Z | 2020-01-11T13:19:26.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import json
import logging
from abc import abstractmethod
import torch
from .base_trainer import BaseTrainer
_logger = logging.getLogger(__name__)
class TorchTensorEncoder(json.JSONEncoder):
def default(self, o): # pylint: disable=metho... | 33.25 | 112 | 0.614286 |
dc350a80f3a5755f92376f8c49ae64e546363c23 | 5,886 | py | Python | models/custom_loss/lightgbm_train_valid_score_gap.py | h2oai/driverlessai-recipes | 508663ed6bd1961925fcb29fde268493fe40e9e8 | [
"Apache-2.0"
] | 194 | 2019-04-23T10:25:13.000Z | 2022-03-29T04:19:28.000Z | models/custom_loss/lightgbm_train_valid_score_gap.py | h2oai/driverlessai-recipes | 508663ed6bd1961925fcb29fde268493fe40e9e8 | [
"Apache-2.0"
] | 50 | 2019-06-24T20:17:51.000Z | 2022-03-16T20:05:37.000Z | models/custom_loss/lightgbm_train_valid_score_gap.py | h2oai/driverlessai-recipes | 508663ed6bd1961925fcb29fde268493fe40e9e8 | [
"Apache-2.0"
] | 85 | 2019-03-27T12:26:43.000Z | 2022-01-27T13:15:37.000Z | """Modified version of Driverless AI's internal LightGBM implementation with a custom objective function (used for tree split finding).
"""
from h2oaicore.models import BaseCustomModel, LightGBMModel, XGBoostGBMModel
from h2oaicore.systemutils import config, loggerinfo
import numpy as np
class GBMTrainValidScoreGap:
... | 54 | 135 | 0.633707 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.