hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c483fb1b2c4923ff5ccaa7292e0366375d10da70 | 1,473 | py | Python | examples/human-preference/common_hp_a3c.py | vacancy/TensorArtist | 7654eb026f6d87f64e28ca152d006ef7625b0f45 | [
"MIT"
] | 54 | 2017-03-31T08:46:18.000Z | 2022-03-09T14:37:19.000Z | examples/human-preference/common_hp_a3c.py | vacancy/TensorArtist | 7654eb026f6d87f64e28ca152d006ef7625b0f45 | [
"MIT"
] | 1 | 2017-08-21T07:29:33.000Z | 2017-08-21T09:52:40.000Z | examples/human-preference/common_hp_a3c.py | vacancy/TensorArtist | 7654eb026f6d87f64e28ca152d006ef7625b0f45 | [
"MIT"
] | 3 | 2017-05-24T17:43:35.000Z | 2018-09-19T11:18:23.000Z | # -*- coding:utf8 -*-
# File : common_hp_a3c.py
# Author : Jiayuan Mao
# Email : maojiayuan@gmail.com
# Date : 06/07/2017
#
# This file is part of TensorArtist.
import threading
from tartist.app import rl
import numpy as np
from tartist.core import get_env
def main_inference_play_multithread(trainer, make_pla... | 30.6875 | 94 | 0.645621 |
a919e8c3a618fb070e48f14a3ab46f7118859c07 | 424 | py | Python | pySOT/auxiliary_problems/__init__.py | WY-Wang/pySOT | a2de59a0ab00da0465b964e070199fe4773918cd | [
"BSD-3-Clause"
] | 180 | 2015-11-17T03:36:31.000Z | 2022-03-16T10:09:42.000Z | pySOT/auxiliary_problems/__init__.py | WY-Wang/pySOT | a2de59a0ab00da0465b964e070199fe4773918cd | [
"BSD-3-Clause"
] | 41 | 2015-06-30T15:43:10.000Z | 2021-02-04T06:03:02.000Z | pySOT/auxiliary_problems/__init__.py | WY-Wang/pySOT | a2de59a0ab00da0465b964e070199fe4773918cd | [
"BSD-3-Clause"
] | 45 | 2015-10-29T16:40:11.000Z | 2021-11-14T01:44:39.000Z | #!/usr/bin/env python3
from .candidate_dycors import candidate_dycors
from .candidate_srbf import candidate_srbf
from .candidate_uniform import candidate_uniform
from .ei_ga import ei_ga
from .ei_merit import ei_merit
from .lcb_ga import lcb_ga
from .lcb_merit import lcb_merit
__all__ = [
"candidate_dycors",
"... | 22.315789 | 48 | 0.75 |
03052a9782aea1a4e615508169f71c15c134d5ef | 1,343 | py | Python | azure-mgmt-compute/azure/mgmt/compute/models/container_service_linux_profile.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2018-11-09T06:16:34.000Z | 2018-11-09T06:16:34.000Z | azure-mgmt-compute/azure/mgmt/compute/models/container_service_linux_profile.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | null | null | null | azure-mgmt-compute/azure/mgmt/compute/models/container_service_linux_profile.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2018-11-09T06:17:41.000Z | 2018-11-09T06:17:41.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.342105 | 78 | 0.609829 |
4ad8e1abef2eb095af45cd578e8c1ed9d368d2fa | 789 | py | Python | manabe/api/urls.py | luoyedao/manabe | 90c158bd23e956308263b542634adc97f6526276 | [
"Apache-2.0"
] | 16 | 2018-08-12T08:28:00.000Z | 2022-03-15T02:13:42.000Z | manabe/api/urls.py | luoyedao/manabe | 90c158bd23e956308263b542634adc97f6526276 | [
"Apache-2.0"
] | 14 | 2020-02-11T23:27:29.000Z | 2022-02-11T03:43:26.000Z | manabe/api/urls.py | luoyedao/manabe | 90c158bd23e956308263b542634adc97f6526276 | [
"Apache-2.0"
] | 25 | 2018-08-26T07:38:46.000Z | 2022-03-15T02:13:45.000Z | # coding=utf8
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from rest_framework.authtoken import views as rest_views
from . import views
app_name = 'api'
# Create a router and register our viewsets with it.
router = DefaultRouter()
router.register(r'users', views.UserViewSet, ... | 37.571429 | 80 | 0.7782 |
2cb65682210833cb846acb32845cb85d5562c8e0 | 21,885 | py | Python | tests/one_to_one/tests.py | geelweb/django | 59afe61a970dd60df388e7cda9041ef3c0e770cb | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2017-02-11T07:07:16.000Z | 2017-02-11T07:07:16.000Z | tests/one_to_one/tests.py | geelweb/django | 59afe61a970dd60df388e7cda9041ef3c0e770cb | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2020-07-02T21:10:44.000Z | 2020-07-02T21:11:21.000Z | tests/one_to_one/tests.py | geelweb/django | 59afe61a970dd60df388e7cda9041ef3c0e770cb | [
"PSF-2.0",
"BSD-3-Clause"
] | 2 | 2018-03-30T04:24:48.000Z | 2021-05-09T12:39:09.000Z | from __future__ import unicode_literals
from django.db import IntegrityError, connection, transaction
from django.test import TestCase, ignore_warnings
from django.utils.deprecation import RemovedInDjango20Warning
from .models import (
Bar, Director, Favorites, HiddenPointer, ManualPrimaryKey, MultiModel,
Pla... | 40.602968 | 106 | 0.651542 |
63013318694a44183e3212755e9b12502f13f112 | 1,190 | py | Python | chia/util/service_groups.py | 13thProgression/gold-blockchain | 2a1b19ed9d088315fd717b9b521e21f229522c4b | [
"Apache-2.0"
] | 3 | 2022-02-10T09:42:06.000Z | 2022-03-09T16:39:22.000Z | chia/util/service_groups.py | lahyunLee/gold-blockchain | b9f90babeb58c3c0fa384153ca01ae973e19cffd | [
"Apache-2.0"
] | null | null | null | chia/util/service_groups.py | lahyunLee/gold-blockchain | b9f90babeb58c3c0fa384153ca01ae973e19cffd | [
"Apache-2.0"
] | 2 | 2022-03-16T14:22:56.000Z | 2022-03-19T11:11:31.000Z | from typing import Generator, KeysView
SERVICES_FOR_GROUP = {
"all": "gold_harvester gold_timelord_launcher gold_timelord gold_farmer gold_full_node gold_wallet".split(),
"node": "gold_full_node".split(),
"harvester": "gold_harvester".split(),
"farmer": "gold_harvester gold_farmer gold_full_node gold_w... | 37.1875 | 112 | 0.717647 |
e4811811d3bc8f84a9f4e8db7a545cc81c7aca32 | 7,047 | py | Python | glue/viewers/common/qt/attribute_limits_helper.py | ejeschke/glue | 21689e3474aeaeb70e258d76c60755596856976c | [
"BSD-3-Clause"
] | null | null | null | glue/viewers/common/qt/attribute_limits_helper.py | ejeschke/glue | 21689e3474aeaeb70e258d76c60755596856976c | [
"BSD-3-Clause"
] | null | null | null | glue/viewers/common/qt/attribute_limits_helper.py | ejeschke/glue | 21689e3474aeaeb70e258d76c60755596856976c | [
"BSD-3-Clause"
] | null | null | null | # DEPREACTED
import numpy as np
from qtpy import QtWidgets
from glue.core import Subset
from glue.utils.qt.widget_properties import (CurrentComboTextProperty,
CurrentComboDataProperty,
FloatLineProperty,
... | 35.41206 | 88 | 0.655456 |
8519787d494a363db746cfddc3e7f2f293ea56ad | 39,506 | py | Python | pytorch-CycleGAN-and-pix2pix-with-PONO/networks_pono.py | Boyiliee/PONO | b9108e8bf8ba0228635532ba5bdc973b7393d045 | [
"MIT"
] | 133 | 2019-07-10T01:46:47.000Z | 2021-06-30T12:12:03.000Z | pytorch-CycleGAN-and-pix2pix-with-PONO/networks_pono.py | Boyiliee/Positional-Normalization | b9108e8bf8ba0228635532ba5bdc973b7393d045 | [
"MIT"
] | 4 | 2019-07-13T08:24:42.000Z | 2020-10-11T13:17:57.000Z | pytorch-CycleGAN-and-pix2pix-with-PONO/networks_pono.py | Boyiliee/Positional-Normalization | b9108e8bf8ba0228635532ba5bdc973b7393d045 | [
"MIT"
] | 16 | 2019-09-15T14:31:02.000Z | 2020-10-18T13:14:41.000Z | import torch
import torch.nn as nn
from torch.nn import init
import functools
from torch.optim import lr_scheduler
###############################################################################
# Helper Functions
###############################################################################
class Identity(nn.Modu... | 45.937209 | 176 | 0.609958 |
584259c87499503331c62bd650f9b84fe6358e97 | 1,012 | py | Python | venv/Lib/site-packages/terminado/uimodule.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | venv/Lib/site-packages/terminado/uimodule.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | venv/Lib/site-packages/terminado/uimodule.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 35 | 2021-03-26T03:12:04.000Z | 2022-03-23T10:15:10.000Z | """A Tornado UI module for a terminal backed by terminado.
See the Tornado docs for information on UI modules:
http://www.tornadoweb.org/en/stable/guide/templates.html#ui-modules
"""
# Copyright (c) Jupyter Development Team
# Copyright (c) 2014, Ramalingam Saravanan <sarava@sarava.net>
# Distributed under the terms of... | 36.142857 | 72 | 0.657115 |
f1e7f0b8547d66e1426eb4d97a43a1a84242fdbe | 4,662 | py | Python | OnlineHeart.py | fakegit/bilibili-live-tools | 99dfb53d1dc3275e37f0be34e4199e672aecb1bf | [
"MIT"
] | 1,018 | 2017-12-24T01:53:18.000Z | 2022-03-25T09:25:02.000Z | OnlineHeart.py | fakegit/bilibili-live-tools | 99dfb53d1dc3275e37f0be34e4199e672aecb1bf | [
"MIT"
] | 274 | 2017-12-29T13:58:19.000Z | 2021-12-09T14:31:55.000Z | OnlineHeart.py | fakegit/bilibili-live-tools | 99dfb53d1dc3275e37f0be34e4199e672aecb1bf | [
"MIT"
] | 240 | 2018-01-22T05:01:28.000Z | 2022-01-21T06:30:57.000Z | from bilibili import bilibili
from login import login
import time
import traceback
import datetime
import asyncio
import queue
from statistics import Statistics
from printer import Printer
def CurrentTime():
currenttime = int(time.mktime(datetime.datetime.now().timetuple()))
return str(currenttime)
class On... | 46.62 | 116 | 0.531961 |
253f2b7f7bb256dcd5e8d316b3fda26726ad7f11 | 22,831 | py | Python | tests/http/test_http_parser.py | kmille/proxy.py | 8d2168d73ce55ccfe04f4bba738cbb56f30e9b8c | [
"BSD-3-Clause"
] | 1 | 2022-03-19T11:34:56.000Z | 2022-03-19T11:34:56.000Z | tests/http/test_http_parser.py | kmille/proxy.py | 8d2168d73ce55ccfe04f4bba738cbb56f30e9b8c | [
"BSD-3-Clause"
] | null | null | null | tests/http/test_http_parser.py | kmille/proxy.py | 8d2168d73ce55ccfe04f4bba738cbb56f30e9b8c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE... | 42.358071 | 115 | 0.597828 |
368fd39430bd0713e9b288bdeaa4795bb6ac204f | 23,256 | py | Python | recipes/arrow/all/conanfile.py | iblancasa/conan-center-index | 5d35ee2d247ce0e624d12f55f6fffa80e1be5255 | [
"MIT"
] | null | null | null | recipes/arrow/all/conanfile.py | iblancasa/conan-center-index | 5d35ee2d247ce0e624d12f55f6fffa80e1be5255 | [
"MIT"
] | null | null | null | recipes/arrow/all/conanfile.py | iblancasa/conan-center-index | 5d35ee2d247ce0e624d12f55f6fffa80e1be5255 | [
"MIT"
] | null | null | null | from conans import ConanFile, tools, CMake
from conans.errors import ConanInvalidConfiguration
import os
class ArrowConan(ConanFile):
name = "arrow"
description = "Apache Arrow is a cross-language development platform for in-memory data"
topics = ("conan", "arrow", "memory")
url = "https://github.com/... | 48.45 | 130 | 0.645898 |
9fd9e5c438544ad188801d690c99252fa90b5c90 | 1,826 | py | Python | htbapi/__init__.py | zachhanson94/htb | 687cc9f69b31cecdf4b7146513f4544f80e3b5bc | [
"MIT"
] | null | null | null | htbapi/__init__.py | zachhanson94/htb | 687cc9f69b31cecdf4b7146513f4544f80e3b5bc | [
"MIT"
] | 1 | 2021-04-05T15:27:53.000Z | 2021-04-05T15:27:53.000Z | htbapi/__init__.py | zachhanson94/htb | 687cc9f69b31cecdf4b7146513f4544f80e3b5bc | [
"MIT"
] | null | null | null | """An unofficial library for working with HackTheBox's API.
This library provides an easy way to work with the HackTheBox API.
It supports querying machine info, challenge info, user info, and more.
"""
import logging
from . import client
from . import exceptions
from .client import Client
from .client import session
... | 35.115385 | 96 | 0.745893 |
f930bdc604ccb541ba3ea7f930a08de587f8dd5d | 2,710 | py | Python | resources/user.py | LukaszMalucha/Twitter-REST-API | 718c58a9e19b386ba2e6501efb36cbaf17bad421 | [
"MIT"
] | 7 | 2018-11-08T17:34:06.000Z | 2020-10-01T20:07:18.000Z | resources/user.py | LukaszMalucha/Twitter-REST-API | 718c58a9e19b386ba2e6501efb36cbaf17bad421 | [
"MIT"
] | 7 | 2020-01-28T22:36:02.000Z | 2022-02-10T00:12:32.000Z | resources/user.py | LukaszMalucha/Twitter-REST-API | 718c58a9e19b386ba2e6501efb36cbaf17bad421 | [
"MIT"
] | 3 | 2019-04-27T20:12:39.000Z | 2020-05-09T08:59:42.000Z | from flask import session, Response, render_template, redirect, flash
from werkzeug.security import generate_password_hash, check_password_hash
from flask_restful import Resource
from models.user import UserModel
from models.forms import RegisterForm, LoginForm
from flask_login import LoginManager, login_user, logout_u... | 36.133333 | 116 | 0.663469 |
81277d66ff9151abba2c920c0e98f0cf64491db5 | 3,073 | py | Python | Methods/Machine/WindingDW1L/comp_connection_mat.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | null | null | null | Methods/Machine/WindingDW1L/comp_connection_mat.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | null | null | null | Methods/Machine/WindingDW1L/comp_connection_mat.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from numpy import mod, zeros, arange, sign
from pyleecan.Methods.Machine.Winding import WindingError
from pyleecan.Functions.Winding.reverse_wind_mat import reverse_wind_mat
from pyleecan.Functions.Winding.shift_wind_mat import shift_wind_mat
def comp_connection_mat(self, Zs=None):
"""C... | 28.990566 | 88 | 0.535308 |
a737e22c36b6df5cb20b4f2fcf5f1fc351d83148 | 10,471 | py | Python | ops/thumos_db.py | Lechatelia/SSN | 7b09ffadecb324e516fcd37183c9e8b3adc56408 | [
"BSD-3-Clause"
] | 1 | 2022-01-31T09:08:25.000Z | 2022-01-31T09:08:25.000Z | ops/thumos_db.py | Lechatelia/SSN | 7b09ffadecb324e516fcd37183c9e8b3adc56408 | [
"BSD-3-Clause"
] | null | null | null | ops/thumos_db.py | Lechatelia/SSN | 7b09ffadecb324e516fcd37183c9e8b3adc56408 | [
"BSD-3-Clause"
] | null | null | null | #from .utils import *
import os
import glob
import json
class Instance(object):
"""
Representing an instance of activity in the videos
"""
def __init__(self, idx, anno, vid_id, vid_info, name_num_mapping):
self._starting, self._ending = anno['segment'][0], anno['segment'][1]
self._str_... | 36.611888 | 144 | 0.594213 |
f0785fcaf75212fcb6033f609fe82fedec01ac72 | 42,570 | py | Python | fastparquet/writer.py | jbrockmendel/fastparquet | 67c017142b41cee2926d1d0c95986c65e58f42e2 | [
"Apache-2.0"
] | null | null | null | fastparquet/writer.py | jbrockmendel/fastparquet | 67c017142b41cee2926d1d0c95986c65e58f42e2 | [
"Apache-2.0"
] | null | null | null | fastparquet/writer.py | jbrockmendel/fastparquet | 67c017142b41cee2926d1d0c95986c65e58f42e2 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from copy import copy
import json
import re
import struct
import warnings
import numba
import numpy as np
import pandas as pd
from six import integer_types
from fastparquet.util import join_path, PANDAS_VERSION
from .thrift_structures import write_thrift
try:
from pandas.ap... | 39.896907 | 87 | 0.583627 |
e11bfd1d71630045cbc6cb1d862e96d6732b9a28 | 7,064 | py | Python | great_expectations/render/renderer/suite_scaffold_notebook_renderer.py | markovml/great_expectations | 0b4b8924a0ee6aff4ffdf235f074a8681ffa1658 | [
"Apache-2.0"
] | 2 | 2022-01-28T15:51:32.000Z | 2022-02-02T05:07:58.000Z | great_expectations/render/renderer/suite_scaffold_notebook_renderer.py | markovml/great_expectations | 0b4b8924a0ee6aff4ffdf235f074a8681ffa1658 | [
"Apache-2.0"
] | null | null | null | great_expectations/render/renderer/suite_scaffold_notebook_renderer.py | markovml/great_expectations | 0b4b8924a0ee6aff4ffdf235f074a8681ffa1658 | [
"Apache-2.0"
] | 1 | 2022-03-27T06:53:38.000Z | 2022-03-27T06:53:38.000Z | import nbformat
from great_expectations import DataContext
from great_expectations.core.expectation_suite import ExpectationSuite
from great_expectations.dataset import Dataset
from great_expectations.render.renderer.suite_edit_notebook_renderer import (
SuiteEditNotebookRenderer,
)
class SuiteScaffoldNotebookRe... | 39.685393 | 302 | 0.730747 |
5d1e8ef48bf80965aa201ad0b7a1a9b205da3392 | 2,108 | py | Python | docs/programming_language/python/src/threading/prodcom_better_queue.py | chyidl/begin-again | 0f0e0ad19738f9f5370bf5a7d6e90d1d3d0f47b8 | [
"MIT"
] | 1 | 2021-07-17T05:45:39.000Z | 2021-07-17T05:45:39.000Z | docs/programming_language/python/src/threading/prodcom_better_queue.py | chyidl/begin-again | 0f0e0ad19738f9f5370bf5a7d6e90d1d3d0f47b8 | [
"MIT"
] | null | null | null | docs/programming_language/python/src/threading/prodcom_better_queue.py | chyidl/begin-again | 0f0e0ad19738f9f5370bf5a7d6e90d1d3d0f47b8 | [
"MIT"
] | null | null | null | # Producer - comsumer queue lock
import concurrent.futures
import logging
import queue
import random
import threading
import time
# Queue is thread-safe
class Pipeline(queue.Queue):
"""
Class to allow a single element pipeline
between producer and consumer.
"""
def __init__(self):
super()... | 29.277778 | 131 | 0.657021 |
6eb6c1ebf333e98cf6626ce6dfa00afa21024fb5 | 2,159 | py | Python | new_version/prob_tree.py | paulcacheux/ctw | fa2d6ccb36d9bcd38158c0e0455af97efb9e37e7 | [
"MIT"
] | null | null | null | new_version/prob_tree.py | paulcacheux/ctw | fa2d6ccb36d9bcd38158c0e0455af97efb9e37e7 | [
"MIT"
] | null | null | null | new_version/prob_tree.py | paulcacheux/ctw | fa2d6ccb36d9bcd38158c0e0455af97efb9e37e7 | [
"MIT"
] | null | null | null | import tree
import graphviz
import sys
from data import Data
from fractions import Fraction
class ProbNode(tree.Node):
def get_pm(self, beta):
"""
Returns:
Fraction: The Pm probability of this Node, calculated on demand. This value is not stored.
"""
if self.is_leaf():
... | 28.407895 | 102 | 0.572487 |
aabf2d88dfd798be77a0fe6ce38dc92512d485a5 | 932 | py | Python | wrappers/python/__init__.py | genisysram/odil | e6b12df698ce452f9c5d86858e896e9b6d28cdf0 | [
"CECILL-B"
] | 72 | 2016-02-04T00:41:02.000Z | 2022-03-18T18:10:34.000Z | wrappers/python/__init__.py | genisysram/odil | e6b12df698ce452f9c5d86858e896e9b6d28cdf0 | [
"CECILL-B"
] | 74 | 2016-01-11T16:04:46.000Z | 2021-11-18T16:36:11.000Z | wrappers/python/__init__.py | genisysram/odil | e6b12df698ce452f9c5d86858e896e9b6d28cdf0 | [
"CECILL-B"
] | 23 | 2016-04-27T07:14:56.000Z | 2021-09-28T21:59:31.000Z | import contextlib
import warnings
from ._odil import *
_open = open
@contextlib.contextmanager
def open(path, mode="rb"):
fd = _open(path, mode)
stream = iostream(fd)
try:
yield stream
finally:
fd.close()
def read(path, keep_group_length=False, halt_condition=None):
warnings.warn... | 29.125 | 79 | 0.697425 |
e3d98735414b8252c6e7b759358a7a76514531f1 | 74,419 | py | Python | test/rect_test.py | amipy/pygame_unit_test | f7e6da4d4ed02cac6ddf5f5ff2022ce7970bb605 | [
"Python-2.0",
"OLDAP-2.3"
] | 2 | 2021-04-03T20:01:35.000Z | 2021-09-09T23:42:21.000Z | test/rect_test.py | amipy/pygame_unit_test | f7e6da4d4ed02cac6ddf5f5ff2022ce7970bb605 | [
"Python-2.0",
"OLDAP-2.3"
] | null | null | null | test/rect_test.py | amipy/pygame_unit_test | f7e6da4d4ed02cac6ddf5f5ff2022ce7970bb605 | [
"Python-2.0",
"OLDAP-2.3"
] | 1 | 2021-06-06T17:52:54.000Z | 2021-06-06T17:52:54.000Z | import math
import sys
import unittest
from pygame import Rect, Vector2, get_sdl_version
from pygame.tests import test_utils
PY3 = sys.version_info >= (3, 0, 0)
SDL1 = get_sdl_version()[0] < 2
class RectTypeTest(unittest.TestCase):
def _assertCountEqual(self, *args, **kwargs):
# Handle method name diff... | 34.987776 | 87 | 0.574947 |
b60f6cb1eab993275680bec5e687e9ced4958197 | 1,314 | py | Python | HLTrigger/Configuration/python/HLT_75e33/psets/hltPhase2L3MuonHighPtTripletStepTrajectoryBuilder_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:24:46.000Z | 2021-11-30T16:24:46.000Z | HLTrigger/Configuration/python/HLT_75e33/psets/hltPhase2L3MuonHighPtTripletStepTrajectoryBuilder_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 4 | 2021-11-29T13:57:56.000Z | 2022-03-29T06:28:36.000Z | HLTrigger/Configuration/python/HLT_75e33/psets/hltPhase2L3MuonHighPtTripletStepTrajectoryBuilder_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:16:05.000Z | 2021-11-30T16:16:05.000Z | import FWCore.ParameterSet.Config as cms
hltPhase2L3MuonHighPtTripletStepTrajectoryBuilder = cms.PSet(
ComponentType = cms.string('GroupedCkfTrajectoryBuilder'),
TTRHBuilder = cms.string('WithTrackAngle'),
alwaysUseInvalidHits = cms.bool(False),
bestHitOnly = cms.bool(True),
estimator = cms.string(... | 43.8 | 88 | 0.743531 |
be82bee89f4bf41a84b1b845fa54bd9e9f04bf50 | 14,390 | py | Python | test/functional/mempool_accept.py | BlockStamp/bstnew | f3775b14874a78c3fd811616752f2c07415b04ee | [
"MIT"
] | 37 | 2018-11-29T13:13:40.000Z | 2020-12-10T00:39:21.000Z | test/functional/mempool_accept.py | BlockStamp/bstnew | f3775b14874a78c3fd811616752f2c07415b04ee | [
"MIT"
] | 6 | 2018-11-27T19:07:36.000Z | 2019-07-13T06:28:39.000Z | test/functional/mempool_accept.py | BlockStamp/bstnew | f3775b14874a78c3fd811616752f2c07415b04ee | [
"MIT"
] | 6 | 2018-05-28T07:58:46.000Z | 2020-01-15T18:41:24.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 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 mempool acceptance of raw transactions."""
from io import BytesIO
from test_framework.test_framework i... | 48.779661 | 154 | 0.644336 |
ed55c968cd094ec487c1d0c2ee8aff05ac9986b7 | 1,690 | py | Python | osx-dtruss/list-files.py | opf-labs/strender | 7ff70cc03055f1bbf09fa14d9addb2eb1239ec9b | [
"Apache-2.0"
] | 6 | 2015-05-19T09:48:16.000Z | 2020-01-13T02:29:57.000Z | osx-dtruss/list-files.py | opf-labs/strender | 7ff70cc03055f1bbf09fa14d9addb2eb1239ec9b | [
"Apache-2.0"
] | 2 | 2021-06-03T23:48:14.000Z | 2021-09-02T15:27:13.000Z | osx-dtruss/list-files.py | opf-labs/strender | 7ff70cc03055f1bbf09fa14d9addb2eb1239ec9b | [
"Apache-2.0"
] | 4 | 2015-05-19T09:48:25.000Z | 2021-08-18T08:53:10.000Z | import re
import sys
import os
#linere = re.compile(r'^(\d+)\s+(\w+)\(([^)]+)\)\s+\=\s*(.*)$')
linere = re.compile(r'^(\S+)\s+(\w+)\(([^)]+)\)\s+\=\s*(.*)$')
# Does not cope file-descriptor switches:
#fcntl(3, F_DUPFD, 10) = 10
#close(3) = 0
#fcntl(10, F_SETFD, FD_CLOEXEC) = 0
... | 31.886792 | 80 | 0.526036 |
86a6cd6307393dd32e210d4fb7cd31810d7b7920 | 4,487 | py | Python | tm/tm.py | armingh2000/automata-theory | c964a92c9b28f9b7a4bbedb4bf0f853a82323b1b | [
"MIT"
] | null | null | null | tm/tm.py | armingh2000/automata-theory | c964a92c9b28f9b7a4bbedb4bf0f853a82323b1b | [
"MIT"
] | null | null | null | tm/tm.py | armingh2000/automata-theory | c964a92c9b28f9b7a4bbedb4bf0f853a82323b1b | [
"MIT"
] | null | null | null |
class tm_state:
def __init__(self, state_number, is_final):
self.state_number = state_number
self.is_final = is_final
self.transitions = {}
def add_transition(self, state2, tape_read, tape_write, move_direction):
self.transitions[tape_read].append((state2, tape_write, move_d... | 31.822695 | 118 | 0.622911 |
060da207ed4bffef43a3fd4e74ec2ccf57dcc995 | 1,112 | py | Python | tencent_learn_test/learn_request.py | mysoulssh/Crewlar | e1eea6dd42889eaa53b64c1f3409b580f686ebbb | [
"MIT"
] | null | null | null | tencent_learn_test/learn_request.py | mysoulssh/Crewlar | e1eea6dd42889eaa53b64c1f3409b580f686ebbb | [
"MIT"
] | null | null | null | tencent_learn_test/learn_request.py | mysoulssh/Crewlar | e1eea6dd42889eaa53b64c1f3409b580f686ebbb | [
"MIT"
] | null | null | null | import urllib.request
import urllib.parse
# 获取html文件并保存在文件中
# url = "http://www.baidu.com"
# response = urllib.request.urlopen(url=url)
# print(response.read().decode())
# with open('baidu.html', 'w', encoding='utf8') as fp:
# fp.write(response.read().decode())
# 下载图片
# image_url = "http://b-ssl.duitang.com/up... | 22.693878 | 141 | 0.704137 |
0e7be23b72cff3a4d0b1ecc2a1144e0470a992a0 | 731 | py | Python | core/data/dataloader/__init__.py | lovetian0910/awesome-semantic-segmentation-pytorch | 233d668b664d8e7e4852e81f60f79e048f08906f | [
"Apache-2.0"
] | null | null | null | core/data/dataloader/__init__.py | lovetian0910/awesome-semantic-segmentation-pytorch | 233d668b664d8e7e4852e81f60f79e048f08906f | [
"Apache-2.0"
] | null | null | null | core/data/dataloader/__init__.py | lovetian0910/awesome-semantic-segmentation-pytorch | 233d668b664d8e7e4852e81f60f79e048f08906f | [
"Apache-2.0"
] | null | null | null | """
This module provides data loaders and transformers for popular vision datasets.
"""
from .mscoco import COCOSegmentation
from .cityscapes import CitySegmentation
from .ade import ADE20KSegmentation
from .pascal_voc import VOCSegmentation
from .pascal_aug import VOCAugSegmentation
from .sbu_shadow import SBUSegmenta... | 28.115385 | 79 | 0.767442 |
e4885471a3cb10beba3ce620a2b8078e65c87c63 | 6,641 | py | Python | packages/postgres-database/src/simcore_postgres_database/migration/versions/e1227c539ff4_update_ondelete_and_oncascade_for_.py | colinRawlings/osparc-simcore | bf2f18d5bc1e574d5f4c238d08ad15156184c310 | [
"MIT"
] | 25 | 2018-04-13T12:44:12.000Z | 2022-03-12T15:01:17.000Z | packages/postgres-database/src/simcore_postgres_database/migration/versions/e1227c539ff4_update_ondelete_and_oncascade_for_.py | colinRawlings/osparc-simcore | bf2f18d5bc1e574d5f4c238d08ad15156184c310 | [
"MIT"
] | 2,553 | 2018-01-18T17:11:55.000Z | 2022-03-31T16:26:40.000Z | packages/postgres-database/src/simcore_postgres_database/migration/versions/e1227c539ff4_update_ondelete_and_oncascade_for_.py | mrnicegyu11/osparc-simcore | b6fa6c245dbfbc18cc74a387111a52de9b05d1f4 | [
"MIT"
] | 20 | 2018-01-18T19:45:33.000Z | 2022-03-29T07:08:47.000Z | """update ondelete and oncascade for projects_vc tables
Revision ID: e1227c539ff4
Revises: a2a020b67bd2
Create Date: 2021-09-16 20:42:25.547273+00:00
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "e1227c539ff4"
down_revision = "a2a020b67bd2"
branch_labels = No... | 27.670833 | 86 | 0.615269 |
b2274729a3bd97f870786b35dd9bf0938ead9537 | 1,064 | py | Python | Scripts/viewer.py | dhaval6552/ecommerce-2 | ab80fbbf15c0fbd37db94cfd7aa9a3ac0b46c737 | [
"MIT"
] | null | null | null | Scripts/viewer.py | dhaval6552/ecommerce-2 | ab80fbbf15c0fbd37db94cfd7aa9a3ac0b46c737 | [
"MIT"
] | null | null | null | Scripts/viewer.py | dhaval6552/ecommerce-2 | ab80fbbf15c0fbd37db94cfd7aa9a3ac0b46c737 | [
"MIT"
] | null | null | null | #!c:\users\dhava\djangopractice\ecommerce-2\scripts\python.exe
#
# The Python Imaging Library
# $Id$
#
from __future__ import print_function
import sys
if sys.version_info[0] > 2:
import tkinter
else:
import Tkinter as tkinter
from PIL import Image, ImageTk
#
# an image viewer
class UI(tkinter.Label):
... | 19 | 72 | 0.602444 |
d7cdac30083605a0b52159d1b2df99e9a101267a | 3,641 | py | Python | todolist.py | NikolayL2sch/JetBrainsAcademy | 5202406f0dd8150a16268a03162cbd25262e8e8d | [
"MIT"
] | null | null | null | todolist.py | NikolayL2sch/JetBrainsAcademy | 5202406f0dd8150a16268a03162cbd25262e8e8d | [
"MIT"
] | null | null | null | todolist.py | NikolayL2sch/JetBrainsAcademy | 5202406f0dd8150a16268a03162cbd25262e8e8d | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, Date
from datetime import datetime, timedelta
from sqlalchemy.orm import sessionmaker
engine = create_engine('sqlite:///todo.db?check_same_thread=False')
Base = declarative_base... | 36.777778 | 103 | 0.555342 |
e15af75d9191e06e5d7514b985235a06b4fe6ada | 12,776 | py | Python | test/functional/interface_rest.py | Okschain/okschain | bf36840d86a6f7e3d8e4ef22279c7e4bfd246563 | [
"MIT"
] | null | null | null | test/functional/interface_rest.py | Okschain/okschain | bf36840d86a6f7e3d8e4ef22279c7e4bfd246563 | [
"MIT"
] | null | null | null | test/functional/interface_rest.py | Okschain/okschain | bf36840d86a6f7e3d8e4ef22279c7e4bfd246563 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 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 the REST API."""
import binascii
from decimal import Decimal
from enum import Enum
from io import... | 42.026316 | 153 | 0.64989 |
795fe35cfeeed30d45f1f9af168ae31714a2ba06 | 415 | py | Python | docmaker/hacks/convert_single_row_tables.py | HurricaneLabs/docmaker | 4c1ce0c967ddca0a6113225c2041cfe0770bc93e | [
"MIT"
] | null | null | null | docmaker/hacks/convert_single_row_tables.py | HurricaneLabs/docmaker | 4c1ce0c967ddca0a6113225c2041cfe0770bc93e | [
"MIT"
] | null | null | null | docmaker/hacks/convert_single_row_tables.py | HurricaneLabs/docmaker | 4c1ce0c967ddca0a6113225c2041cfe0770bc93e | [
"MIT"
] | null | null | null | from docx import Document
from docmaker.hooks import Hook
@Hook("pre_finalize_docx")
def convert_single_row_tables(ctx):
d = Document(ctx.docxfile)
style_name = ctx.get("hacks.single_row_table_style") or "Normal Table"
if style_name not in d.styles:
return
for table in d.tables:
if ... | 21.842105 | 74 | 0.679518 |
67feb44b0a67968c8211134c0f311533029a024d | 60 | py | Python | lightconvpoint/utils/__init__.py | StructuralNeurobiologyLab/LightConvPoint | 3f353f45e9e910fa390a74520dfd478e3e88f104 | [
"Apache-2.0"
] | 58 | 2020-04-16T16:55:15.000Z | 2022-02-27T00:36:55.000Z | lightconvpoint/utils/__init__.py | StructuralNeurobiologyLab/LightConvPoint | 3f353f45e9e910fa390a74520dfd478e3e88f104 | [
"Apache-2.0"
] | 9 | 2020-04-18T13:04:05.000Z | 2022-03-13T02:37:44.000Z | lightconvpoint/utils/__init__.py | StructuralNeurobiologyLab/LightConvPoint | 3f353f45e9e910fa390a74520dfd478e3e88f104 | [
"Apache-2.0"
] | 12 | 2020-04-17T04:07:19.000Z | 2022-03-10T00:38:23.000Z | from .network import get_network
__all__ = ["get_network"]
| 15 | 32 | 0.766667 |
a5a87f5c55e1d8bd3a15163444ee8edb82d975ec | 9,259 | py | Python | models/intphys/model/mac.py | hucvl/craft | 85c50b26eb8941781dc4bb93bce61201aff4643d | [
"MIT"
] | 9 | 2021-06-02T06:05:14.000Z | 2022-02-16T09:53:51.000Z | models/intphys/model/mac.py | hucvl/craft | 85c50b26eb8941781dc4bb93bce61201aff4643d | [
"MIT"
] | 2 | 2022-03-16T11:21:03.000Z | 2022-03-17T12:00:06.000Z | models/intphys/model/mac.py | hucvl/craft | 85c50b26eb8941781dc4bb93bce61201aff4643d | [
"MIT"
] | null | null | null | # https://github.com/rosinality/mac-network-pytorch/blob/564ca5bbb39bb2bff45e9fa84c898fadd8145d94/model.py
from math import sqrt
from intphys.data import SimulationInput
import torch
from torch.autograd import Variable
from torch import nn
from torch.nn.init import kaiming_uniform_, xavier_uniform_, normal
import tor... | 32.149306 | 106 | 0.596177 |
b6c64107b1ce4ba34fbe9cc30c34b0cbcbda33b2 | 252 | py | Python | alcazas/eod/doctype/job_uom/job_uom.py | ShahzadNaser/bagos_alcazas | 6cad57868da5b9264becb8b2cf5cb8eb86bc2103 | [
"MIT"
] | null | null | null | alcazas/eod/doctype/job_uom/job_uom.py | ShahzadNaser/bagos_alcazas | 6cad57868da5b9264becb8b2cf5cb8eb86bc2103 | [
"MIT"
] | null | null | null | alcazas/eod/doctype/job_uom/job_uom.py | ShahzadNaser/bagos_alcazas | 6cad57868da5b9264becb8b2cf5cb8eb86bc2103 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, Alcazas and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class JobUOM(Document):
pass
| 22.909091 | 49 | 0.769841 |
240af4dd243124a479e161ea2da0df196b59642c | 6,439 | py | Python | sdk/python/pulumi_azure_nextgen/dbforpostgresql/latest/get_configuration.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/dbforpostgresql/latest/get_configuration.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/dbforpostgresql/latest/get_configuration.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 36.378531 | 197 | 0.649324 |
cc7834153e49b5d8769a0eddc6ae435a1399e7b3 | 4,292 | py | Python | FRAP_Analysis/finiteNucleusUtilities.py | DomenicN/FRAP_Analysis | f351d4ee2c7d7d6f005dd33f280499949136b1f8 | [
"MIT"
] | null | null | null | FRAP_Analysis/finiteNucleusUtilities.py | DomenicN/FRAP_Analysis | f351d4ee2c7d7d6f005dd33f280499949136b1f8 | [
"MIT"
] | null | null | null | FRAP_Analysis/finiteNucleusUtilities.py | DomenicN/FRAP_Analysis | f351d4ee2c7d7d6f005dd33f280499949136b1f8 | [
"MIT"
] | null | null | null | """
finiteNucleusUtilities.py
This file contains helper functions for the finite nucleus model based on the derivation in Mueller et al.,
Evidence for a common mode of transcription factor interaction with chromatin as revealed by improved quantitative FRAP,
Biophysical Journal, 2007. Equation numbers refer to this pu... | 36.372881 | 120 | 0.64329 |
0ddd2bfe8e941896fa6b03efe8d033e2ef2729dd | 4,944 | py | Python | contrib/python/tests/python/pants_test/contrib/python/checks/checker/test_variable_names.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | 94 | 2015-01-15T21:24:20.000Z | 2022-02-16T16:55:43.000Z | contrib/python/tests/python/pants_test/contrib/python/checks/checker/test_variable_names.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | 5 | 2020-07-18T01:04:43.000Z | 2021-05-10T08:40:56.000Z | contrib/python/tests/python/pants_test/contrib/python/checks/checker/test_variable_names.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | 47 | 2015-02-25T02:20:07.000Z | 2022-03-21T00:59:16.000Z | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from pants_test.contrib.python.checks.checker.plugin_test_base import CheckstylePluginTes... | 32.96 | 101 | 0.650283 |
8c29e90749bebb57d11541778299ed7fa5b8b29c | 306 | py | Python | tfsrep/lib/data.py | xnuiem/tfsrep | ca0c428c79e422b5d1ccc263e85e6ea0c3e24291 | [
"Apache-2.0"
] | null | null | null | tfsrep/lib/data.py | xnuiem/tfsrep | ca0c428c79e422b5d1ccc263e85e6ea0c3e24291 | [
"Apache-2.0"
] | null | null | null | tfsrep/lib/data.py | xnuiem/tfsrep | ca0c428c79e422b5d1ccc263e85e6ea0c3e24291 | [
"Apache-2.0"
] | null | null | null | from tfsrep.lib.session import DataSession
class dataSource:
def __init__(self, config, logger):
self.session = DataSession(config, logger)
self.config = config
self.logger = logger
def select(self, query):
rows = self.session.execute(query)
| 18 | 51 | 0.620915 |
6dc13c1ac5981ac3db97b1d0e012ad103c4214dc | 1,062 | py | Python | bms_receiver.py | clean-code-craft-tcq-1/stream-bms-data-Padmashree-DJ | 4e834d5872068ef930c9bae9068fc43140bd34f7 | [
"MIT"
] | null | null | null | bms_receiver.py | clean-code-craft-tcq-1/stream-bms-data-Padmashree-DJ | 4e834d5872068ef930c9bae9068fc43140bd34f7 | [
"MIT"
] | null | null | null | bms_receiver.py | clean-code-craft-tcq-1/stream-bms-data-Padmashree-DJ | 4e834d5872068ef930c9bae9068fc43140bd34f7 | [
"MIT"
] | 1 | 2021-05-31T07:23:59.000Z | 2021-05-31T07:23:59.000Z | import time,datetime
import bms_receiver_utility as bms_utility
def recevie_bms_details():
final_bms_data = []
while(True):
bms_details = input()
bms_details = bms_utility.format_bms_data(bms_details)
final_bms_data.append(bms_details)
final_display_list = bms_utility.ca... | 39.333333 | 94 | 0.648776 |
fea061cecd880ea2e20e9f97629bd10226c732e8 | 4,618 | py | Python | src/you_get/extractors/tumblr.py | helloqingfeng/you-get | ac19e9656619c74b011eb696e332914d27c05f0d | [
"MIT"
] | 4 | 2017-08-23T09:06:24.000Z | 2019-03-07T01:51:46.000Z | src/you_get/extractors/tumblr.py | snow212-cn/you-get | 86cf4dfed82da1f4c7465263c37d04706c0d62f5 | [
"MIT"
] | null | null | null | src/you_get/extractors/tumblr.py | snow212-cn/you-get | 86cf4dfed82da1f4c7465263c37d04706c0d62f5 | [
"MIT"
] | 3 | 2016-04-22T05:04:04.000Z | 2018-10-31T06:48:38.000Z | #!/usr/bin/env python
__all__ = ['tumblr_download']
from ..common import *
from .universal import *
from .dailymotion import dailymotion_download
from .vimeo import vimeo_download
from .vine import vine_download
def tumblr_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
if re.match(r'https?... | 44.403846 | 106 | 0.525119 |
6a5c680fba01dedab46962fc6732d0f038f129b1 | 2,326 | py | Python | episodes/old_scenes/compare_ac_dc_scenes.py | pj0620/acca-video-series | 1b09548014cc899ded5a8fdd1293f7fc121a98bc | [
"MIT"
] | null | null | null | episodes/old_scenes/compare_ac_dc_scenes.py | pj0620/acca-video-series | 1b09548014cc899ded5a8fdd1293f7fc121a98bc | [
"MIT"
] | 3 | 2020-04-16T09:24:48.000Z | 2021-03-27T19:27:48.000Z | episodes/old_scenes/compare_ac_dc_scenes.py | pj0620/acca-video-series | 1b09548014cc899ded5a8fdd1293f7fc121a98bc | [
"MIT"
] | 1 | 2020-09-01T05:32:04.000Z | 2020-09-01T05:32:04.000Z | from manimlib.imports import *
class CompareACDC(Scene):
def construct(self):
self.show_titles()
self.show_dc_examples()
self.show_ac_examples()
self.wait(2)
def show_titles(self):
# SS6.1
self.DC_title = TextMobject("\\underline{DC}")\
.scale(2.5)\... | 26.431818 | 79 | 0.479364 |
f30494b0fd4ff7c2a2b1e92a1999fe317311a5bd | 3,105 | py | Python | labs/lab-06/plot_words_variation.py | zlmcdaniel/oss-repo-template | 32722e902a004fd050a5e870eb2a303787a851eb | [
"MIT"
] | 1 | 2022-01-17T18:26:53.000Z | 2022-01-17T18:26:53.000Z | labs/lab-06/plot_words_variation.py | zlmcdaniel/oss-repo-template | 32722e902a004fd050a5e870eb2a303787a851eb | [
"MIT"
] | null | null | null | labs/lab-06/plot_words_variation.py | zlmcdaniel/oss-repo-template | 32722e902a004fd050a5e870eb2a303787a851eb | [
"MIT"
] | null | null | null | """
=====
Words
=====
Words/Ladder Graph
------------------
Generate an undirected graph over the 5757 5-letter words in the
datafile `words_dat.txt.gz`. Two words are connected by an edge
if they differ in one letter, resulting in 14,135 edges. This example
is described in Section 1.1 in Knuth's book (see [1]_ and [... | 32.34375 | 76 | 0.550081 |
d4b0662fc643e15dcb93cd9ff369a173f08d9bbd | 45,428 | py | Python | dirscan/dirsearch/thirdparty/chardet/langcyrillicmodel.py | imfiver/Sec-Tools | a828e31c2e371c37f1256f0a574707a24776530d | [
"Apache-2.0"
] | 351 | 2020-02-26T05:23:26.000Z | 2022-03-26T12:39:19.000Z | dirscan/dirsearch/thirdparty/chardet/langcyrillicmodel.py | imfiver/Sec-Tools | a828e31c2e371c37f1256f0a574707a24776530d | [
"Apache-2.0"
] | 15 | 2020-03-26T07:31:49.000Z | 2022-03-09T02:12:17.000Z | dirscan/dirsearch/thirdparty/chardet/langcyrillicmodel.py | imfiver/Sec-Tools | a828e31c2e371c37f1256f0a574707a24776530d | [
"Apache-2.0"
] | 99 | 2020-02-28T07:30:46.000Z | 2022-03-16T16:41:09.000Z | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | 7.911529 | 69 | 0.231113 |
701140cb90b0308d8f73e16c902deec8aa6492db | 11,660 | py | Python | sdk/python/pulumi_azure_native/network/latest/dscp_configuration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/latest/dscp_configuration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/latest/dscp_configuration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 44.503817 | 683 | 0.659605 |
4a43497aa74506abf853bfb5209fe8ccc3705e45 | 764 | py | Python | api/news/google/helpers.py | suricats/surirobot-api-services | b23b440649a759d638cbc8644acc4aeb7f118674 | [
"MIT"
] | null | null | null | api/news/google/helpers.py | suricats/surirobot-api-services | b23b440649a759d638cbc8644acc4aeb7f118674 | [
"MIT"
] | 1 | 2019-05-22T16:17:59.000Z | 2019-09-05T13:09:03.000Z | api/news/google/helpers.py | suricats/surirobot-api-services | b23b440649a759d638cbc8644acc4aeb7f118674 | [
"MIT"
] | 1 | 2019-07-02T09:40:28.000Z | 2019-07-02T09:40:28.000Z | import requests
import os
import json
from api.exceptions import ExternalAPIException, InvalidCredentialsException, ResourceNotFoundException, BadParameterException
with open(os.getcwd() + '/res/credentials/google.json', 'r') as file:
GOOGLE_NEWS_CREDENTIALS = json.load(file)
token = GOOGLE_NEWS_CREDENTIALS['API_... | 38.2 | 126 | 0.740838 |
e53b08a64c7685a3f4adc490fc8a502d2028666a | 2,967 | py | Python | test/test_schema.py | jerrykan/herder | 381f51198f21d232cc05d7c458638d78c0f25366 | [
"MIT"
] | 4 | 2020-08-01T00:34:14.000Z | 2022-02-27T06:04:12.000Z | test/test_schema.py | jerrykan/herder | 381f51198f21d232cc05d7c458638d78c0f25366 | [
"MIT"
] | 1 | 2021-05-17T22:47:26.000Z | 2021-05-25T14:26:06.000Z | test/test_schema.py | jerrykan/herder | 381f51198f21d232cc05d7c458638d78c0f25366 | [
"MIT"
] | 3 | 2020-11-13T17:43:43.000Z | 2022-02-27T06:04:13.000Z | #
# Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
# This module is free software, and you may redistribute it and/or modify
# under the same terms as Python, so long as this copyright message and
# disclaimer are retained in their original form.
#
# IN NO EVENT SHALL BIZAR SOFTWARE PTY LT... | 39.039474 | 78 | 0.661274 |
23aaa8bd18cd2ad492d4bc48ace07237c3bc04ec | 1,280 | py | Python | libraries/python/setup.py | CaseInnovation107/brainsatplay | 582d6faec64ab414b15b010b3f30749182d6580b | [
"MIT"
] | null | null | null | libraries/python/setup.py | CaseInnovation107/brainsatplay | 582d6faec64ab414b15b010b3f30749182d6580b | [
"MIT"
] | null | null | null | libraries/python/setup.py | CaseInnovation107/brainsatplay | 582d6faec64ab414b15b010b3f30749182d6580b | [
"MIT"
] | null | null | null | from distutils.core import setup
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name = 'brainsatplay', # How you named your package folder (MyLib)
packages=setuptools.find_packages(),
version = '0.0.6', # Start with a small number and increase it ... | 42.666667 | 110 | 0.642969 |
a728c89a754db515580a7211d6a6318d25e197c9 | 176 | py | Python | profiles_project/urls.py | AitorPo/profiles-rest-api | 66f6505957dbf728707325836ef5b2e88d067e72 | [
"MIT"
] | null | null | null | profiles_project/urls.py | AitorPo/profiles-rest-api | 66f6505957dbf728707325836ef5b2e88d067e72 | [
"MIT"
] | 7 | 2020-02-12T03:26:42.000Z | 2022-02-10T12:20:33.000Z | profiles_project/profiles_project/urls.py | amin72/profiles-rest-api | 8800e11a574f7330c2d8b7cd814da1c85f3d926e | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('profiles_api.urls')),
]
| 19.555556 | 47 | 0.693182 |
39fe7d2acf6de4e09ec722e3427771e1f8220428 | 7,109 | py | Python | point_gcn/runner/runner.py | gyshgx868/pc-classification | 1667f08785e89bbe475fe7b4dbf8141a29d8c371 | [
"MIT"
] | 7 | 2020-10-23T10:23:14.000Z | 2021-10-06T02:04:02.000Z | point_gcn/runner/runner.py | gyshgx868/pc-classification | 1667f08785e89bbe475fe7b4dbf8141a29d8c371 | [
"MIT"
] | null | null | null | point_gcn/runner/runner.py | gyshgx868/pc-classification | 1667f08785e89bbe475fe7b4dbf8141a29d8c371 | [
"MIT"
] | null | null | null | import collections
import json
import os
import time
import torch
import yaml
import torch.nn as nn
from abc import abstractmethod
class Runner:
def __init__(self, args):
# register variables
self.model_path = None
self.tensorboard_path = None
self.dataset = {'train': None, 'tes... | 33.375587 | 78 | 0.582642 |
6266c7a649c9a6dccb8ef78ab60c2ca397235f8a | 526 | py | Python | kYPython/Cookbook/Chapter01/multidict.py | kyaing/KDYSample | 6a09ef3f7dab18a71187cd81f7da2dd13cf7a4a5 | [
"MIT"
] | 10 | 2017-02-23T07:42:20.000Z | 2017-02-23T07:42:25.000Z | kYPython/Cookbook/Chapter01/multidict.py | kaideyi/KDYSample | 6a09ef3f7dab18a71187cd81f7da2dd13cf7a4a5 | [
"MIT"
] | null | null | null | kYPython/Cookbook/Chapter01/multidict.py | kaideyi/KDYSample | 6a09ef3f7dab18a71187cd81f7da2dd13cf7a4a5 | [
"MIT"
] | null | null | null | # coding: utf-8
from collections import defaultdict
strings = ('puppy', 'kitten', 'puppy', 'puppy', 'weasel', 'puppy', 'kitten', 'puppy')
counts = {}
# for kw in strings:
# counts[kw] += 1 # Python的dict中不存在默认值的说法,keyError!
for kw in strings:
counts.setdefault(kw, 0)
counts[kw] += 1
# counts[kw] = c... | 18.137931 | 85 | 0.631179 |
2b2657408af2943bf5ef8a20b5b5840adcda8b7c | 4,505 | py | Python | scIB/metrics/isolated_labels.py | gokceneraslan/scib | 91cfe2e4872230d8806c8f9ad5a0c251f268fdc4 | [
"MIT"
] | null | null | null | scIB/metrics/isolated_labels.py | gokceneraslan/scib | 91cfe2e4872230d8806c8f9ad5a0c251f268fdc4 | [
"MIT"
] | null | null | null | scIB/metrics/isolated_labels.py | gokceneraslan/scib | 91cfe2e4872230d8806c8f9ad5a0c251f268fdc4 | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.metrics import f1_score
from scIB.clustering import opt_louvain
from .silhouette import silhouette
def isolated_labels(
adata,
label_key,
batch_key,
embed,
cluster=True,
n=None,
all_=False,
verbose=True
):
"""
sco... | 31.503497 | 90 | 0.625083 |
4d8b2bd1b4d018d829db768c30766748f7675329 | 3,115 | py | Python | nav_help_screen/scripts/help_screen.py | Jailander/strands_recovery_behaviours | 10ea6ee2fcc9af8f5373c0513161d93c754e89f6 | [
"MIT"
] | null | null | null | nav_help_screen/scripts/help_screen.py | Jailander/strands_recovery_behaviours | 10ea6ee2fcc9af8f5373c0513161d93c754e89f6 | [
"MIT"
] | null | null | null | nav_help_screen/scripts/help_screen.py | Jailander/strands_recovery_behaviours | 10ea6ee2fcc9af8f5373c0513161d93c754e89f6 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
import rospy
from human_help_manager.srv import AskHelp, AskHelpRequest, Register
import nav_help_screen.client
class NavHelpScreen(object):
def __init__(self, webserver_srv_prefix='/strands_webserver'):
rospy.loginfo("Waiting for webserver services...")
r... | 38.45679 | 113 | 0.675441 |
8e8ba6448ab1fca1d6216ba32c9505427503500c | 32,622 | py | Python | test/mitmproxy/protocol/test_http2.py | caputomarcos/mitmproxy | d24f76c98e9673d4c66121c007080a62a0998569 | [
"MIT"
] | null | null | null | test/mitmproxy/protocol/test_http2.py | caputomarcos/mitmproxy | d24f76c98e9673d4c66121c007080a62a0998569 | [
"MIT"
] | null | null | null | test/mitmproxy/protocol/test_http2.py | caputomarcos/mitmproxy | d24f76c98e9673d4c66121c007080a62a0998569 | [
"MIT"
] | 1 | 2020-11-07T08:54:29.000Z | 2020-11-07T08:54:29.000Z | # coding=utf-8
import os
import tempfile
import traceback
import h2
from mitmproxy import options
from mitmproxy.proxy.config import ProxyConfig
import mitmproxy.net
from ...mitmproxy.net import tservers as net_tservers
from mitmproxy import exceptions
from mitmproxy.net.http import http1, http2
from .. import ts... | 34.520635 | 108 | 0.563209 |
937afdd358b0949f64b44917a59a3a683b28f196 | 2,388 | py | Python | members/scripts/srtags_init.py | louking/members | ee204211812e00945f9e2b09cfa130cc9d3e6558 | [
"Apache-2.0"
] | 1 | 2020-12-07T02:52:01.000Z | 2020-12-07T02:52:01.000Z | members/scripts/srtags_init.py | louking/members | ee204211812e00945f9e2b09cfa130cc9d3e6558 | [
"Apache-2.0"
] | 496 | 2020-02-12T15:48:26.000Z | 2022-03-23T11:17:27.000Z | members/scripts/srtags_init.py | louking/members | ee204211812e00945f9e2b09cfa130cc9d3e6558 | [
"Apache-2.0"
] | null | null | null | '''
srtags_init - command line database initialization - initialize in positions, meetings for status reports
===========================================================================================================
run from 3 levels up, like python -m members.scripts.meetingsrtags_init
'''
# standard
from os.path i... | 37.3125 | 117 | 0.693886 |
b8989a55ced4c119c6e37dc55041996ac9a906a1 | 7,764 | py | Python | onnx/backend/test/case/node/argmax.py | stillmatic/onnx | 8d5eb62d5299f6dcb6ac787f0ea8e6cf5b8331a7 | [
"Apache-2.0"
] | null | null | null | onnx/backend/test/case/node/argmax.py | stillmatic/onnx | 8d5eb62d5299f6dcb6ac787f0ea8e6cf5b8331a7 | [
"Apache-2.0"
] | null | null | null | onnx/backend/test/case/node/argmax.py | stillmatic/onnx | 8d5eb62d5299f6dcb6ac787f0ea8e6cf5b8331a7 | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
import onnx
from ..base import Base
from . import expect
def argmax_use_numpy(data, axis=0, keepdims=1): # t... | 40.020619 | 122 | 0.61154 |
8a10441014a4d793b6509bc1e999f739018d1558 | 6,744 | py | Python | regipy/regdiff.py | kamnon/regipy | 12d3be9da631dcc0d6fb342767e51ec4799141c6 | [
"MIT"
] | 190 | 2019-03-06T09:13:08.000Z | 2022-03-19T14:43:34.000Z | regipy/regdiff.py | kamnon/regipy | 12d3be9da631dcc0d6fb342767e51ec4799141c6 | [
"MIT"
] | 117 | 2019-05-15T12:22:46.000Z | 2022-03-30T10:43:03.000Z | regipy/regdiff.py | kamnon/regipy | 12d3be9da631dcc0d6fb342767e51ec4799141c6 | [
"MIT"
] | 37 | 2019-03-12T14:46:12.000Z | 2022-01-12T11:07:10.000Z | import os
from typing import Any, Set, Tuple
import logging
from regipy.exceptions import RegistryKeyNotFoundException
from regipy.registry import RegistryHive, NKRecord
from regipy.utils import convert_wintime, calculate_sha1
logger = logging.getLogger(__name__)
def get_subkeys_and_timestamps(registry_hive):
... | 48.517986 | 118 | 0.674229 |
2cce3fb35dfd8cab29ad00f6522452f6f99b7218 | 9,510 | py | Python | custom_components/weather_data/sensor.py | dykandDK/home-assistant-conf | 20202d85807548cfd45202eb01bfd708dfe1a096 | [
"MIT"
] | 31 | 2021-01-24T00:57:23.000Z | 2022-03-18T05:49:00.000Z | custom_components/weather_data/sensor.py | dykandDK/home-assistant-conf | 20202d85807548cfd45202eb01bfd708dfe1a096 | [
"MIT"
] | null | null | null | custom_components/weather_data/sensor.py | dykandDK/home-assistant-conf | 20202d85807548cfd45202eb01bfd708dfe1a096 | [
"MIT"
] | 2 | 2022-01-20T21:47:16.000Z | 2022-02-04T13:41:35.000Z | """Support for weather service."""
import asyncio
import logging
from random import randrange
from xml.parsers.expat import ExpatError
import aiohttp
import async_timeout
import voluptuous as vol
import xmltodict
from http import HTTPStatus
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassista... | 33.723404 | 86 | 0.611251 |
1b32bab63cb978412f371e1277112f89cb9ddcfb | 3,951 | py | Python | examples/cloud_object_storage/cos_sink_from_file.py | doru1004/rayvens | da89f405586a06b50cc8bb6273d8582400fbca9c | [
"Apache-2.0"
] | 24 | 2021-06-18T21:38:04.000Z | 2022-02-16T19:16:49.000Z | examples/cloud_object_storage/cos_sink_from_file.py | doru1004/rayvens | da89f405586a06b50cc8bb6273d8582400fbca9c | [
"Apache-2.0"
] | 11 | 2021-06-22T14:36:27.000Z | 2021-12-09T16:33:15.000Z | examples/cloud_object_storage/cos_sink_from_file.py | doru1004/rayvens | da89f405586a06b50cc8bb6273d8582400fbca9c | [
"Apache-2.0"
] | 5 | 2021-06-18T22:03:55.000Z | 2021-08-02T05:11:46.000Z | #
# Copyright IBM Corporation 2021
#
# 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 wri... | 37.273585 | 78 | 0.687421 |
42ea7dcb2035d1ec1e793de66097648ec9385cc9 | 2,715 | py | Python | setup.py | dxr3x/openapi-core | db5d8253950df2a93cae5c36430bb4688c36b20b | [
"BSD-3-Clause"
] | null | null | null | setup.py | dxr3x/openapi-core | db5d8253950df2a93cae5c36430bb4688c36b20b | [
"BSD-3-Clause"
] | null | null | null | setup.py | dxr3x/openapi-core | db5d8253950df2a93cae5c36430bb4688c36b20b | [
"BSD-3-Clause"
] | null | null | null | """OpenAPI core setup module"""
import os
import re
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
def read_requirements(filename):
"""Open a requirements file and return list of its lines."""
contents = read_file(filename).strip('\n')
retur... | 29.51087 | 73 | 0.624678 |
ff1c71c21593f50063442d89826ecc2fdd6bdbf9 | 2,584 | py | Python | Train/GTSRB_Train(Keras).py | Starry-2000/PYNQ-Z2- | 523d522a7c2dc1e86ccb32f6c9f0e20f9195cdd4 | [
"MIT"
] | 3 | 2021-12-08T10:14:32.000Z | 2022-03-22T03:42:52.000Z | Train/GTSRB_Train(Keras).py | Starry-2000/PYNQ-Z2- | 523d522a7c2dc1e86ccb32f6c9f0e20f9195cdd4 | [
"MIT"
] | null | null | null | Train/GTSRB_Train(Keras).py | Starry-2000/PYNQ-Z2- | 523d522a7c2dc1e86ccb32f6c9f0e20f9195cdd4 | [
"MIT"
] | 2 | 2020-11-12T10:44:40.000Z | 2022-03-14T01:53:38.000Z | # Normal Model
import cv2
import os
import matplotlib.pyplot as plt
import numpy as np
from sklearn.model_selection import train_test_split
import keras
from keras.models import Sequential
from keras.layers.convolutional import Conv2D, MaxPooling2D
from keras.layers import Dense, Flatten, Dropout
# 获取照片路径
imagepaths ... | 30.046512 | 97 | 0.712074 |
832cae20b4aaa997ec726a948ac05f432bf70d98 | 66,459 | py | Python | dislib/data/array.py | SrTangente/dislib | 9434ed357e5311854d9b7450cdc9c9032a43bd3e | [
"Apache-2.0"
] | null | null | null | dislib/data/array.py | SrTangente/dislib | 9434ed357e5311854d9b7450cdc9c9032a43bd3e | [
"Apache-2.0"
] | null | null | null | dislib/data/array.py | SrTangente/dislib | 9434ed357e5311854d9b7450cdc9c9032a43bd3e | [
"Apache-2.0"
] | null | null | null | import operator
from collections import defaultdict, deque
from math import ceil
import numpy as np
from pycompss.api.api import compss_wait_on, compss_delete_object
from pycompss.api.constraint import constraint
from pycompss.api.parameter import Type, COLLECTION_IN, Depth, \
COLLECTION_OUT, INOUT
from pycompss.a... | 33.821374 | 79 | 0.567132 |
a4007b96b730301f587a65e4c858f23200697ccf | 25,934 | py | Python | library/merge.py | guoqunfei/RES-Scanner2 | 707916f897294aa1b41ab057d6c92398ab671d4e | [
"MIT"
] | 3 | 2019-12-09T01:46:48.000Z | 2020-08-19T01:22:23.000Z | library/merge.py | guoqunfei/RES-Scanner2 | 707916f897294aa1b41ab057d6c92398ab671d4e | [
"MIT"
] | null | null | null | library/merge.py | guoqunfei/RES-Scanner2 | 707916f897294aa1b41ab057d6c92398ab671d4e | [
"MIT"
] | 2 | 2019-11-01T03:52:59.000Z | 2021-09-12T23:18:28.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Author: guoqunfei, guoqunfei@genomics.cn
import os
import re
import sys
import gzip
import subprocess
import argparse
import shell
def merge_RES(Config, Genomefile, Phred_DNA=33, Phred_RNA=33,
Qual_cutoff=30, HomoPrior=0.99, Rate=2, Method='Bayesian',
Plo... | 44.255973 | 903 | 0.507712 |
007da26ce20b96b58032d594ed4ff72211af4962 | 2,173 | py | Python | examples/ch05/snippets_py/05_10.py | germanngc/PythonFundamentals | 14d22baa30d7c3c5404fc11362709669e92474b8 | [
"Apache-2.0"
] | 4 | 2019-05-04T00:33:25.000Z | 2021-05-29T20:37:59.000Z | examples/ch05/snippets_py/05_10.py | germanngc/PythonFundamentals | 14d22baa30d7c3c5404fc11362709669e92474b8 | [
"Apache-2.0"
] | null | null | null | examples/ch05/snippets_py/05_10.py | germanngc/PythonFundamentals | 14d22baa30d7c3c5404fc11362709669e92474b8 | [
"Apache-2.0"
] | 3 | 2020-05-05T13:14:28.000Z | 2022-02-03T16:18:37.000Z | # Section 5.10 snippets
color_names = ['orange', 'yellow', 'green']
# Inserting an Element at a Specific List Index
color_names.insert(0, 'red')
color_names
# Adding an Element to the End of a List
color_names.append('blue')
color_names
# Adding All the Elements of a Sequence to the End of a List
color_names.exte... | 25.564706 | 74 | 0.607915 |
a013c79ee24fd42cb352e65bccae4abde9415645 | 13,981 | py | Python | awx/main/tests/functional/api/test_credential_input_sources.py | iamroddo/awx | b04e944ea52586c722843e7557f649fea4cd1287 | [
"Apache-2.0"
] | 1 | 2019-04-07T23:56:30.000Z | 2019-04-07T23:56:30.000Z | awx/main/tests/functional/api/test_credential_input_sources.py | iamroddo/awx | b04e944ea52586c722843e7557f649fea4cd1287 | [
"Apache-2.0"
] | 4 | 2022-02-15T01:33:35.000Z | 2022-03-02T12:47:41.000Z | awx/main/tests/functional/api/test_credential_input_sources.py | iamroddo/awx | b04e944ea52586c722843e7557f649fea4cd1287 | [
"Apache-2.0"
] | 7 | 2019-06-29T10:47:55.000Z | 2020-03-07T06:54:26.000Z | import pytest
from awx.main.models import CredentialInputSource
from awx.api.versioning import reverse
@pytest.mark.django_db
def test_associate_credential_input_source(get, post, delete, admin, vault_credential, external_credential):
list_url = reverse(
'api:credential_input_source_list',
kwargs... | 36.889182 | 155 | 0.679851 |
2dab3ff23afda3982120ecc1484214f94de1319c | 237 | py | Python | demo/confmp/manage.py | jeanqasaur/jeeves | 1b5783a98f88fa2fc9e4cae7e005d2c9242cfea4 | [
"MIT"
] | 253 | 2015-01-02T01:54:27.000Z | 2022-03-10T01:44:02.000Z | demo/confnp/manage.py | jeanqasaur/jeeves | 1b5783a98f88fa2fc9e4cae7e005d2c9242cfea4 | [
"MIT"
] | 4 | 2015-06-09T03:36:28.000Z | 2017-08-11T15:54:24.000Z | demo/confnp/manage.py | jeanqasaur/jeeves | 1b5783a98f88fa2fc9e4cae7e005d2c9242cfea4 | [
"MIT"
] | 29 | 2015-02-14T02:24:08.000Z | 2021-12-16T02:46:16.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ["DJANGO_SETTINGS_MODULE"] = "conf.settings"
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 21.545455 | 64 | 0.759494 |
fbfa23f1e74fea77f1988aeed13a7b9b39d5f75d | 19,095 | py | Python | homeassistant/components/buienradar/sensor.py | mburget/core | 01fcc41aa067bce649721fa1d04c800b6576eb02 | [
"Apache-2.0"
] | 1 | 2021-03-20T12:25:26.000Z | 2021-03-20T12:25:26.000Z | homeassistant/components/buienradar/sensor.py | Chreece/core | e97f7a96562a8d263f54ff6e759a18dce01198d2 | [
"Apache-2.0"
] | 51 | 2020-08-03T07:30:44.000Z | 2022-03-22T06:02:42.000Z | homeassistant/components/buienradar/sensor.py | Chreece/core | e97f7a96562a8d263f54ff6e759a18dce01198d2 | [
"Apache-2.0"
] | null | null | null | """Support for Buienradar.nl weather service."""
import logging
from buienradar.constants import (
ATTRIBUTION,
CONDCODE,
CONDITION,
DETAILED,
EXACT,
EXACTNL,
FORECAST,
IMAGE,
MEASURED,
PRECIPITATION_FORECAST,
STATIONNAME,
TIMEFRAME,
VISIBILITY,
WINDGUST,
WIN... | 40.888651 | 88 | 0.627337 |
06f756e35bec6a4f2029ea427a0d30b72ab498f8 | 6,484 | py | Python | tests/many_to_one_null/tests.py | zanderle/django | a0c37686c75a74fc34d90203c3188d03ee72aebc | [
"BSD-3-Clause"
] | 3 | 2015-09-26T13:33:07.000Z | 2020-03-08T07:34:38.000Z | tests/many_to_one_null/tests.py | zanderle/django | a0c37686c75a74fc34d90203c3188d03ee72aebc | [
"BSD-3-Clause"
] | null | null | null | tests/many_to_one_null/tests.py | zanderle/django | a0c37686c75a74fc34d90203c3188d03ee72aebc | [
"BSD-3-Clause"
] | 15 | 2016-01-08T14:28:41.000Z | 2019-04-19T08:33:31.000Z | from __future__ import unicode_literals
from django.test import TestCase
from .models import Article, Car, Driver, Reporter
class ManyToOneNullTests(TestCase):
def setUp(self):
# Create a Reporter.
self.r = Reporter(name='John Smith')
self.r.save()
# Create an Article.
se... | 45.985816 | 96 | 0.620296 |
c66a4192d0aea2e8a3140f243bceb8196a09d784 | 663 | py | Python | custom_textblob/textblob_fr/sentiments.py | ouassimBenMosbah/python_nlp | 732500722e046480a5f0d127b17389b6bc28fcc7 | [
"MIT"
] | null | null | null | custom_textblob/textblob_fr/sentiments.py | ouassimBenMosbah/python_nlp | 732500722e046480a5f0d127b17389b6bc28fcc7 | [
"MIT"
] | null | null | null | custom_textblob/textblob_fr/sentiments.py | ouassimBenMosbah/python_nlp | 732500722e046480a5f0d127b17389b6bc28fcc7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""French sentiment analysis implementations.
"""
from __future__ import absolute_import
from textblob.base import BaseSentimentAnalyzer, CONTINUOUS
from custom_textblob.textblob_fr.fr import sentiment as pattern_sentiment
class PatternAnalyzer(BaseSentimentAnalyzer):
'''Sentiment analyze... | 27.625 | 73 | 0.713424 |
d3d9543a1d552f8c82a50828fd411eee0c7a1035 | 2,637 | py | Python | nipy/algorithms/statistics/models/glm.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | 1 | 2020-01-02T01:50:19.000Z | 2020-01-02T01:50:19.000Z | nipy/algorithms/statistics/models/glm.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | null | null | null | nipy/algorithms/statistics/models/glm.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
General linear models
--------------------
"""
import numpy as np
from . import family
from .regression import WLSModel
class Model(WLSModel):
niter = 10
def __init__(self, design, family... | 27.757895 | 77 | 0.574896 |
0f30b8e0f88bc582e87938c63865b3d1492728eb | 1,178 | py | Python | examples/base_agents_play.py | NoblesseCoder/gym-tictactoe | 8fbc44b284425e2e1d982078c4825a6e92bff1fe | [
"MIT"
] | null | null | null | examples/base_agents_play.py | NoblesseCoder/gym-tictactoe | 8fbc44b284425e2e1d982078c4825a6e92bff1fe | [
"MIT"
] | null | null | null | examples/base_agents_play.py | NoblesseCoder/gym-tictactoe | 8fbc44b284425e2e1d982078c4825a6e92bff1fe | [
"MIT"
] | null | null | null | import itertools
import gym_tictactoe.envs.tictactoe_env as ttt
from agents.base_agents import RandomAgent,HumanAgent
def play(max_episodes=2):
episode=0
player1_symbol,player2_symbol='X','O'
env=ttt.TicTacToeEnv(player1_symbol,player2_symbol)
player1=RandomAgent(player1_symbol)
player2=RandomAgent(player2_symbol... | 30.205128 | 101 | 0.798812 |
982008e5346a6893524e3798975d4c43098191e9 | 10,806 | py | Python | dcCustom/utils/save.py | simonfqy/DTI_prediction | e01c592cc06c4de04b3ed6db35da5af5ff7f863f | [
"MIT"
] | 31 | 2018-08-15T13:35:24.000Z | 2022-02-18T08:11:12.000Z | dcCustom/utils/save.py | simonfqy/DTI_prediction | e01c592cc06c4de04b3ed6db35da5af5ff7f863f | [
"MIT"
] | 14 | 2018-07-13T03:56:19.000Z | 2020-05-22T23:25:34.000Z | dcCustom/utils/save.py | simonfqy/DTI_prediction | e01c592cc06c4de04b3ed6db35da5af5ff7f863f | [
"MIT"
] | 13 | 2018-07-13T03:56:26.000Z | 2021-02-24T10:58:37.000Z | """
Simple utils to save and load from disk.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
# TODO(rbharath): Use standard joblib once old-data has been regenerated.
import joblib
from sklearn.externals import joblib as old_joblib
from sklearn.preproce... | 31.876106 | 83 | 0.689617 |
a4702db3c6b67c6f4982eebe5c9cc041ffe24bf2 | 1,105 | py | Python | caller.py | M4ND33P-M4L4K4R143/Caller-Assistant | e478a43528244569ea4b6dbac677d2fe079cfa12 | [
"MIT"
] | 3 | 2021-08-21T13:58:34.000Z | 2022-01-11T02:35:20.000Z | caller.py | M4ND33P-M4L4K4R143/Caller-Assistant | e478a43528244569ea4b6dbac677d2fe079cfa12 | [
"MIT"
] | null | null | null | caller.py | M4ND33P-M4L4K4R143/Caller-Assistant | e478a43528244569ea4b6dbac677d2fe079cfa12 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Hello Guys This is Your Caller Assistant From this Script You will be Able to Make call in termux ..
This Tool is Created by Mandeep
Malakar
Use This Tool But Give Credits
"""
# Requirements For this Tool
'''
1.Python Programming
2.Termux
3.Termux-Api Apps and Packages
... | 24.555556 | 107 | 0.59276 |
ee2b57be10e76eb924eff2332847bfaa84abbcf1 | 5,490 | py | Python | CIM16/IEC61970/Informative/InfAssets/FinancialInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM16/IEC61970/Informative/InfAssets/FinancialInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM16/IEC61970/Informative/InfAssets/FinancialInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 1 | 2021-04-02T18:04:49.000Z | 2021-04-02T18:04:49.000Z | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 53.300971 | 323 | 0.716029 |
9cb8a471adff2fbd98af39adfaf9d38c15380c84 | 2,914 | py | Python | app/tplink.py | ivandelabeldad/miner-waker | ab81da67b739078e189e693d36066c64e4fe9a47 | [
"MIT"
] | null | null | null | app/tplink.py | ivandelabeldad/miner-waker | ab81da67b739078e189e693d36066c64e4fe9a47 | [
"MIT"
] | null | null | null | app/tplink.py | ivandelabeldad/miner-waker | ab81da67b739078e189e693d36066c64e4fe9a47 | [
"MIT"
] | null | null | null | import requests
import config
import utils
import time
import os.path
def is_valid_token(token):
"""Check if the token is valid or not."""
url = config.get()['tplink']['url'] + '?token=' + token
response = requests.post(url, json={'method':'getDeviceList'})
response_json = response.json()
return ... | 24.905983 | 97 | 0.596431 |
028222f2f97432087ff9585e1f95557aa65891d7 | 12,824 | py | Python | rascil/processing_components/imaging/ng.py | SKA-ScienceDataProcessor/rascil | bd3b47f779e18e184781e2928ad1539d1fdc1c9b | [
"Apache-2.0"
] | 7 | 2019-12-14T13:42:33.000Z | 2022-01-28T03:31:45.000Z | rascil/processing_components/imaging/ng.py | SKA-ScienceDataProcessor/rascil | bd3b47f779e18e184781e2928ad1539d1fdc1c9b | [
"Apache-2.0"
] | 6 | 2020-01-08T09:40:08.000Z | 2020-06-11T14:56:13.000Z | rascil/processing_components/imaging/ng.py | SKA-ScienceDataProcessor/rascil | bd3b47f779e18e184781e2928ad1539d1fdc1c9b | [
"Apache-2.0"
] | 3 | 2020-01-14T11:14:16.000Z | 2020-09-15T05:21:06.000Z | """
Functions that implement prediction of and imaging from visibilities using the nifty gridder.
https://gitlab.mpcdf.mpg.de/ift/nifty_gridder
This performs all necessary w term corrections, to high precision.
"""
__all__ = ['predict_ng', 'invert_ng']
import logging
from typing import Union
import numpy
from ra... | 43.033557 | 112 | 0.532205 |
c5551c7a1bcab215c700731c638048acee15834c | 3,131 | py | Python | RLBotPack/Beast from the East/maneuvers/small_jump.py | RLMarvin/RLBotPack | c88c4111bf67d324b471ad87ad962e7bc8c2a202 | [
"MIT"
] | null | null | null | RLBotPack/Beast from the East/maneuvers/small_jump.py | RLMarvin/RLBotPack | c88c4111bf67d324b471ad87ad962e7bc8c2a202 | [
"MIT"
] | null | null | null | RLBotPack/Beast from the East/maneuvers/small_jump.py | RLMarvin/RLBotPack | c88c4111bf67d324b471ad87ad962e7bc8c2a202 | [
"MIT"
] | null | null | null | from rlbot.agents.base_agent import SimpleControllerState
from maneuvers.maneuver import Maneuver
from maneuvers.recovery import RecoveryManeuver
from util.rlmath import sign
from util.vec import proj_onto_size, angle_between, dot, normalize
class SmallJumpManeuver(Maneuver):
def __init__(self, bot, target=None,... | 32.614583 | 100 | 0.589269 |
c8e22754466cf86e101ad22c16c78003d3647d1f | 7,352 | py | Python | qa/rpc-tests/checkdatasig-activation.py | cpacia/BitcoinUnlimited | 5fd8162239b431eb6061d711ae02226c8786a208 | [
"MIT"
] | null | null | null | qa/rpc-tests/checkdatasig-activation.py | cpacia/BitcoinUnlimited | 5fd8162239b431eb6061d711ae02226c8786a208 | [
"MIT"
] | null | null | null | qa/rpc-tests/checkdatasig-activation.py | cpacia/BitcoinUnlimited | 5fd8162239b431eb6061d711ae02226c8786a208 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
This test checks activation of OP_CHECKDATASIG
"""
import test_framework.loginit
from test_framework.test_framew... | 38.899471 | 155 | 0.641866 |
0e161c5e2ccd47c7d28a9396d6fa1143f4c1e185 | 1,251 | py | Python | babelsubs/generators/srt.py | pculture/babelsubs | 10505885d274f609e345da523ab41b975a68a5e6 | [
"BSD-3-Clause"
] | 11 | 2015-12-06T02:44:14.000Z | 2022-01-27T01:40:45.000Z | babelsubs/generators/srt.py | pculture/babelsubs | 10505885d274f609e345da523ab41b975a68a5e6 | [
"BSD-3-Clause"
] | 9 | 2015-01-05T15:58:11.000Z | 2018-04-27T15:02:31.000Z | babelsubs/generators/srt.py | pculture/babelsubs | 10505885d274f609e345da523ab41b975a68a5e6 | [
"BSD-3-Clause"
] | 4 | 2015-07-22T19:54:11.000Z | 2020-05-20T13:38:03.000Z | from cgi import escape
from babelsubs.generators.base import BaseGenerator, register
from babelsubs.utils import UNSYNCED_TIME_FULL
class SRTGenerator(BaseGenerator):
file_type = 'srt'
MAPPINGS=dict(linebreaks="\r\n")
def __init__(self, subtitle_set, language=None):
super(SRTGenerator, self)... | 31.275 | 102 | 0.629896 |
c59d07a58561ff31d45cd0c8df4c575021e7350b | 1,778 | py | Python | ai_stub/ai_stub.py | timbleman/DriveBuild | 9581a8cf4dbe392a9767c9271bb452e0a3c19d50 | [
"MIT"
] | 3 | 2020-01-03T19:50:05.000Z | 2020-03-30T13:01:51.000Z | ai_stub/ai_stub.py | timbleman/DriveBuild | 9581a8cf4dbe392a9767c9271bb452e0a3c19d50 | [
"MIT"
] | 9 | 2020-01-20T21:33:42.000Z | 2020-07-21T04:18:52.000Z | ai_stub/ai_stub.py | timbleman/DriveBuild | 9581a8cf4dbe392a9767c9271bb452e0a3c19d50 | [
"MIT"
] | 3 | 2020-03-27T20:53:56.000Z | 2020-04-04T10:10:03.000Z | class MyFancyAI:
from drivebuildclient.AIExchangeService import AIExchangeService
from drivebuildclient.aiExchangeMessages_pb2 import SimulationID, VehicleID
def __init__(self, service: AIExchangeService) -> None:
self.service = service
def start(self, sid: SimulationID, vid: VehicleID) -> Non... | 53.878788 | 107 | 0.615861 |
8ee494858468cd456d13040d24a86d4ae43cab9a | 2,498 | py | Python | texttable/setup.py | atticusmordecai/pingSweep.py | 5904fe260aeaa57ff8d71c335b1804b83a3456c8 | [
"MIT"
] | null | null | null | texttable/setup.py | atticusmordecai/pingSweep.py | 5904fe260aeaa57ff8d71c335b1804b83a3456c8 | [
"MIT"
] | null | null | null | texttable/setup.py | atticusmordecai/pingSweep.py | 5904fe260aeaa57ff8d71c335b1804b83a3456c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# texttable - module for creating simple ASCII tables
# Copyright (C) 2003-2015 Gerome Fournier <jef(at)foutaise.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundat... | 37.848485 | 89 | 0.681745 |
d5afadbd80d3167e24b91a003f579b7db6901e17 | 2,888 | py | Python | training/train_fasttext.py | DanielRuf3/grained | c0fc3bb759b4ad56101760ff3cdd8acb3b512799 | [
"MIT"
] | 1 | 2020-04-26T09:36:11.000Z | 2020-04-26T09:36:11.000Z | training/train_fasttext.py | surajsrivathsa/fine-grained-sentiment | ebc38e73aa519906a8192b4957ca50a7695dece0 | [
"MIT"
] | null | null | null | training/train_fasttext.py | surajsrivathsa/fine-grained-sentiment | ebc38e73aa519906a8192b4957ca50a7695dece0 | [
"MIT"
] | 1 | 2021-09-17T12:18:09.000Z | 2021-09-17T12:18:09.000Z | """
Python API for FastText text classification model training.
All default arguments in this file are obtained using hyperparameter autotuning
in fastText: https://fasttext.cc/docs/en/autotune.html
Run the following command for the CLI utility to obtain optimum hyperparameters:
./fasttext supervised -input sst_trai... | 40.676056 | 101 | 0.695637 |
41639406ce1fd715d95c8bdf282cb9b431be66f8 | 534 | py | Python | bag_transfer/rights/urls.py | RockefellerArchiveCenter/aurora | a52eca717dc585a1c5034c8fd83a6fdc97fe4515 | [
"MIT"
] | 19 | 2018-05-09T21:00:24.000Z | 2021-03-11T23:09:03.000Z | bag_transfer/rights/urls.py | RockefellerArchiveCenter/aurora | a52eca717dc585a1c5034c8fd83a6fdc97fe4515 | [
"MIT"
] | 339 | 2017-10-12T16:05:22.000Z | 2022-02-23T20:48:41.000Z | bag_transfer/rights/urls.py | RockefellerArchiveCenter/aurora | a52eca717dc585a1c5034c8fd83a6fdc97fe4515 | [
"MIT"
] | 3 | 2019-11-05T16:30:07.000Z | 2021-08-16T15:50:34.000Z | from bag_transfer.rights.views import (RightsAPIAdminView, RightsCreateView,
RightsDetailView, RightsUpdateView)
from django.conf.urls import url
app_name = 'rights'
urlpatterns = [
url(r"^add/$", RightsCreateView.as_view(), name="add"),
url(r"^(?P<pk>\d+)/$", RightsDeta... | 35.6 | 88 | 0.608614 |
29a5bfe13996a25ea8cd6de749fe5d2b13efa533 | 1,262 | py | Python | RandomCoupling.py | nameforjoy/Synchronisation | 48f0c115626637363dbcd77bcbff977a475d06a8 | [
"RSA-MD"
] | 3 | 2021-03-27T11:25:15.000Z | 2022-02-15T16:02:21.000Z | RandomCoupling.py | nameforjoy/Synchronisation | 48f0c115626637363dbcd77bcbff977a475d06a8 | [
"RSA-MD"
] | null | null | null | RandomCoupling.py | nameforjoy/Synchronisation | 48f0c115626637363dbcd77bcbff977a475d06a8 | [
"RSA-MD"
] | 2 | 2020-06-19T13:29:29.000Z | 2021-06-02T10:33:15.000Z | """"
@author: JoyClimaco
"""
import numpy as np
import scipy.stats as ss
import networkx as nx
from NetworkFunctions import RandomCoupling
from NetworkFunctions import OrderParameter
from NetworkClasses import StuartLandau
A = np.load('A_BA_m2_N200_1.npy') # load adjacency matrix
w = np.load('w200_3unif.npy') # load f... | 28.681818 | 92 | 0.722662 |
d84f0c6f2b59e9c9abfbc895f5bb8348842aa7f2 | 1,047 | py | Python | src/localshop/apps/accounts/migrations/0002_migrate_users.py | tranarthur/localshop | fd6056561851c6a40df56375d106c81864b77c26 | [
"MIT"
] | 162 | 2015-01-03T07:59:18.000Z | 2022-02-04T12:37:14.000Z | src/localshop/apps/accounts/migrations/0002_migrate_users.py | tranarthur/localshop | fd6056561851c6a40df56375d106c81864b77c26 | [
"MIT"
] | 110 | 2015-01-06T00:58:21.000Z | 2022-02-10T07:16:54.000Z | src/localshop/apps/accounts/migrations/0002_migrate_users.py | tranarthur/localshop | fd6056561851c6a40df56375d106c81864b77c26 | [
"MIT"
] | 67 | 2015-01-15T18:12:18.000Z | 2021-09-27T09:45:55.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
if 'auth_user' in schema_editor.connection.introspection.table_names():
cursor = schema_editor.connection.cursor()
cursor.execute("""
INSERT INTO accoun... | 27.552632 | 75 | 0.617956 |
5134ee0ea8534aa46ca20fbd81afc577dda885e2 | 219 | py | Python | language/type/_thing/_typing.py | jedhsu/language | 3772a4a0ff287e1fc5ebefc716b8d91928d04c72 | [
"MIT"
] | null | null | null | language/type/_thing/_typing.py | jedhsu/language | 3772a4a0ff287e1fc5ebefc716b8d91928d04c72 | [
"MIT"
] | null | null | null | language/type/_thing/_typing.py | jedhsu/language | 3772a4a0ff287e1fc5ebefc716b8d91928d04c72 | [
"MIT"
] | null | null | null | """
*Typing Thing*
Intuitively regarding types.
"""
from wich.___thing import Thing
from wich.__intuition import Intuitive
__all__ = ["TypingThing"]
class TypingThing(
Thing,
Intuitive,
):
pass
| 10.95 | 38 | 0.680365 |
b5d9d589eeb31d2d9048dd86b01d266d3436e791 | 2,083 | py | Python | bioblend/_tests/TestCloudmanLaunch.py | fubar2/bioblend | 99ea9dae70dcda803a6465aa6ecae6f4ab39aef7 | [
"MIT"
] | 51 | 2015-01-23T20:45:01.000Z | 2022-01-31T10:46:31.000Z | bioblend/_tests/TestCloudmanLaunch.py | fubar2/bioblend | 99ea9dae70dcda803a6465aa6ecae6f4ab39aef7 | [
"MIT"
] | 288 | 2015-01-22T21:01:31.000Z | 2022-03-14T09:09:25.000Z | bioblend/_tests/TestCloudmanLaunch.py | fubar2/bioblend | 99ea9dae70dcda803a6465aa6ecae6f4ab39aef7 | [
"MIT"
] | 87 | 2015-02-02T06:31:54.000Z | 2022-03-31T02:39:31.000Z | """
Tests the functionality of the Blend CloudMan API. These tests require working
credentials to supported cloud infrastructure.
"""
import contextlib
from bioblend.cloudman import CloudManConfig, CloudManInstance
from . import CloudmanTestBase, test_util
@test_util.skip_unless_cloudman()
class TestCloudmanLaunch(C... | 46.288889 | 167 | 0.722036 |
66a4c74e3a8aa2d2564962280cf0bc2a96eb8710 | 162 | py | Python | run.py | eLemmings/back | ba5dbc5f64625b61150ce53f12a9393fba060f02 | [
"MIT"
] | null | null | null | run.py | eLemmings/back | ba5dbc5f64625b61150ce53f12a9393fba060f02 | [
"MIT"
] | null | null | null | run.py | eLemmings/back | ba5dbc5f64625b61150ce53f12a9393fba060f02 | [
"MIT"
] | null | null | null | import os
from config import config as cf
from app import app
# Entry point aplikacji
if __name__ == '__main__':
app.run(debug=cf['DEBUG'], port=cf['PORT']) | 20.25 | 47 | 0.709877 |
ca095cd4debf6083954e58902cd8defd0a452a30 | 1,658 | py | Python | package.py | j0yu/rez-picom | 41ecbc79fb390935d8b7b0e8b30f7230df853565 | [
"MIT"
] | null | null | null | package.py | j0yu/rez-picom | 41ecbc79fb390935d8b7b0e8b30f7230df853565 | [
"MIT"
] | null | null | null | package.py | j0yu/rez-picom | 41ecbc79fb390935d8b7b0e8b30f7230df853565 | [
"MIT"
] | null | null | null | name = "picom"
__version__ = "v8.2"
version = __version__.replace("v", "") + "+local.1.0.0"
variants = [["os-CentOS-7", "arch-x86_64"]]
relocatable = False
build_command = r"""
set -euf -o pipefail
cp "$REZ_BUILD_SOURCE_PATH"/Dockerfile "$REZ_BUILD_SOURCE_PATH"/entrypoint.sh .
IMAGE_ID_FILE="$(readlink -f DockerI... | 25.90625 | 79 | 0.660434 |
1fe8fd8d3e3ceb5b8459db5cda1d47bbcf455f99 | 549 | py | Python | demoslogic/premises/migrations/0011_auto_20161230_1507.py | amstart/demoslogic | 059575b502c21f8f27c66a26abee9a42fcb788b7 | [
"MIT"
] | null | null | null | demoslogic/premises/migrations/0011_auto_20161230_1507.py | amstart/demoslogic | 059575b502c21f8f27c66a26abee9a42fcb788b7 | [
"MIT"
] | 3 | 2021-06-08T20:04:58.000Z | 2022-03-11T23:26:36.000Z | demoslogic/premises/migrations/0011_auto_20161230_1507.py | amstart/demoslogic | 059575b502c21f8f27c66a26abee9a42fcb788b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-12-30 14:07
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('premises', '0010_auto_20161230_1340'),
]
operations = [
migrations.AlterFie... | 26.142857 | 140 | 0.621129 |
14b63a43205046e48e2bb5f4cf22618b301e5492 | 68 | py | Python | timemachine/__init__.py | nanashi-byakuren/poverty-reddit-bot | e295dabd7faa15a4f9a33e82f3d9bb392ace383e | [
"MIT"
] | null | null | null | timemachine/__init__.py | nanashi-byakuren/poverty-reddit-bot | e295dabd7faa15a4f9a33e82f3d9bb392ace383e | [
"MIT"
] | 3 | 2021-01-30T13:03:55.000Z | 2021-04-03T07:21:21.000Z | timemachine/__init__.py | nanashi-byakuren/poverty-reddit-bot | e295dabd7faa15a4f9a33e82f3d9bb392ace383e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .main import *
| 13.6 | 23 | 0.588235 |
c3a9095f5651e2ff492694c0e7a72efc012e077e | 398 | py | Python | cage/migrations/0004_auto_20210318_1025.py | Cryptids-CN21/operation-cage | d5041704c14bd838853b7e2ea04c1ac316fc96bc | [
"Unlicense"
] | null | null | null | cage/migrations/0004_auto_20210318_1025.py | Cryptids-CN21/operation-cage | d5041704c14bd838853b7e2ea04c1ac316fc96bc | [
"Unlicense"
] | 11 | 2021-03-17T10:34:57.000Z | 2021-03-19T11:44:12.000Z | cage/migrations/0004_auto_20210318_1025.py | Cryptids-CN21/operation-cage | d5041704c14bd838853b7e2ea04c1ac316fc96bc | [
"Unlicense"
] | 1 | 2021-03-19T16:58:08.000Z | 2021-03-19T16:58:08.000Z | # Generated by Django 3.1.7 on 2021-03-18 10:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cage', '0003_auto_20210317_2113'),
]
operations = [
migrations.AlterField(
model_name='cryptid',
name='image',
... | 20.947368 | 65 | 0.600503 |
5e1a0d12ca3c65b927c062d5ddb10b6e8be79ff4 | 19,416 | py | Python | nicos/devices/vendor/caress/corbadevice_idl.py | ebadkamil/nicos | 0355a970d627aae170c93292f08f95759c97f3b5 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos/devices/vendor/caress/corbadevice_idl.py | ebadkamil/nicos | 0355a970d627aae170c93292f08f95759c97f3b5 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos/devices/vendor/caress/corbadevice_idl.py | ISISComputingGroup/nicos | 94cb4d172815919481f8c6ee686f21ebb76f2068 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | #pylint: skip-file
# Python stubs generated by omniidl from corbadevice.idl
# DO NOT EDIT THIS FILE!
import omniORB, _omnipy
from omniORB import CORBA, PortableServer
_0_CORBA = CORBA
_omnipy.checkVersion(4,2, __file__, 1)
try:
property
except NameError:
def property(*args):
return None
#
# Start ... | 68.607774 | 1,099 | 0.802379 |
7f23e14d90e5e122899365d6c1aa8d2a3358ea40 | 5,787 | py | Python | CIM100/CDPSM/Asset/IEC61968/AssetModels/WireType.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM100/CDPSM/Asset/IEC61968/AssetModels/WireType.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM100/CDPSM/Asset/IEC61968/AssetModels/WireType.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 50.763158 | 242 | 0.689649 |
947c5d884845b34b902ed7c4b16e9e8984a8d2b4 | 1,787 | py | Python | tests/cli/test_clean.py | elin1231/htmap | b9c43ec1d86e90730210c3317409b75595061d91 | [
"Apache-2.0"
] | 21 | 2018-11-28T23:59:18.000Z | 2021-11-16T20:09:27.000Z | tests/cli/test_clean.py | elin1231/htmap | b9c43ec1d86e90730210c3317409b75595061d91 | [
"Apache-2.0"
] | 184 | 2018-09-24T03:30:19.000Z | 2021-06-29T01:01:34.000Z | tests/cli/test_clean.py | elin1231/htmap | b9c43ec1d86e90730210c3317409b75595061d91 | [
"Apache-2.0"
] | 6 | 2019-08-08T19:38:22.000Z | 2021-09-05T05:39:49.000Z | # Copyright 2019 HTCondor Team, Computer Sciences Department,
# University of Wisconsin-Madison, WI.
#
# 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/LICE... | 23.826667 | 74 | 0.684387 |
b2d6afb25210028cf01c97ff35bc1b05f6ac5c80 | 6,818 | py | Python | exercises/hello-world-v5/metrics.py | GrahamDumpleton/lab-mod-wsgi-metrics | 6bf8371523992163548573928ae1b6a4bbb010de | [
"Apache-2.0"
] | null | null | null | exercises/hello-world-v5/metrics.py | GrahamDumpleton/lab-mod-wsgi-metrics | 6bf8371523992163548573928ae1b6a4bbb010de | [
"Apache-2.0"
] | null | null | null | exercises/hello-world-v5/metrics.py | GrahamDumpleton/lab-mod-wsgi-metrics | 6bf8371523992163548573928ae1b6a4bbb010de | [
"Apache-2.0"
] | null | null | null | import socket
import threading
import queue
import time
import atexit
import traceback
import os
from threading import Thread
from queue import Queue
import wrapt
import mod_wsgi
from influxdb import InfluxDBClient
from datetime import datetime
session_namespace = os.environ["SESSION_NAMESPACE"]
influxdb_hostname ... | 30.573991 | 101 | 0.679965 |
f91eaab49b66c658df15471f7f4c71a4d55055a4 | 2,569 | py | Python | homeassistant/components/cert_expiry/__init__.py | DavidDeSloovere/core | 909a20b36d4df6724c955c2ae28cb82fe6d50c2e | [
"Apache-2.0"
] | 4 | 2020-08-10T20:02:24.000Z | 2022-01-31T02:14:22.000Z | homeassistant/components/cert_expiry/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 78 | 2020-07-23T07:13:08.000Z | 2022-03-31T06:02:04.000Z | homeassistant/components/cert_expiry/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 3 | 2022-01-17T20:10:54.000Z | 2022-01-17T20:17:22.000Z | """The cert_expiry component."""
from __future__ import annotations
from datetime import datetime, timedelta
import logging
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_PORT
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinat... | 31.329268 | 88 | 0.699883 |
3544980c8513b72a2c8cebfa2c41db0c26974e5f | 4,238 | py | Python | bin/gaffer.py | davidsminor/gaffer | 64f75654ce778105dd93fbaad0e4486a5577cd09 | [
"BSD-3-Clause"
] | null | null | null | bin/gaffer.py | davidsminor/gaffer | 64f75654ce778105dd93fbaad0e4486a5577cd09 | [
"BSD-3-Clause"
] | null | null | null | bin/gaffer.py | davidsminor/gaffer | 64f75654ce778105dd93fbaad0e4486a5577cd09 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.6
##########################################################################
#
# Copyright (c) 2011, John Haddon. All rights reserved.
# Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modifica... | 38.527273 | 113 | 0.679094 |
e221d2c0bea986a88bd27494666a8335b5aa3fe1 | 51,587 | py | Python | docs/parser/parser.py | xiangze/edward | 6419751d1d849c84c502e5ff3f7249b9bbc7b3aa | [
"Apache-2.0"
] | 1 | 2021-01-11T03:33:36.000Z | 2021-01-11T03:33:36.000Z | docs/parser/parser.py | xiangze/edward | 6419751d1d849c84c502e5ff3f7249b9bbc7b3aa | [
"Apache-2.0"
] | null | null | null | docs/parser/parser.py | xiangze/edward | 6419751d1d849c84c502e5ff3f7249b9bbc7b3aa | [
"Apache-2.0"
] | 3 | 2017-12-22T08:21:41.000Z | 2020-11-16T02:45:04.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.498052 | 80 | 0.677593 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.