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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a3a64b23cac5bab2f266d868c0775b45a843256 | 2,400 | py | Python | twitter_stats.py | bit2pixel/watch-twitter-unfollowers | 4f13e3c6f95bd350e06fdb37ac7dd8f95f7a80fa | [
"MIT"
] | 3 | 2016-02-23T22:54:39.000Z | 2016-04-18T05:16:49.000Z | twitter_stats.py | bit2pixel/watch-twitter-unfollowers | 4f13e3c6f95bd350e06fdb37ac7dd8f95f7a80fa | [
"MIT"
] | null | null | null | twitter_stats.py | bit2pixel/watch-twitter-unfollowers | 4f13e3c6f95bd350e06fdb37ac7dd8f95f7a80fa | [
"MIT"
] | 3 | 2016-02-21T17:50:59.000Z | 2018-09-27T03:08:30.000Z | import time
import shelve
import datetime
import settings
from twython import Twython
from contextlib import contextmanager
@contextmanager
def closing(this):
try:
yield this
finally:
this.close()
class TwitterStats():
def __init__(self):
# connect to twitter api
self.twi... | 29.62963 | 90 | 0.606667 |
6b6b7973534c05588ff3575e5d9f9a643520d0e6 | 292 | py | Python | tests/__init__.py | karpierz/pyc_wheel | b2502dc0d77dbeadd554f9d385103e4fde1be6fe | [
"MIT"
] | 9 | 2020-07-30T00:56:32.000Z | 2022-03-03T19:36:27.000Z | tests/__init__.py | karpierz/pyc_wheel | b2502dc0d77dbeadd554f9d385103e4fde1be6fe | [
"MIT"
] | 5 | 2020-02-28T15:47:26.000Z | 2021-07-12T11:47:54.000Z | tests/__init__.py | karpierz/pyc_wheel | b2502dc0d77dbeadd554f9d385103e4fde1be6fe | [
"MIT"
] | 6 | 2020-04-16T16:14:14.000Z | 2021-04-06T05:44:49.000Z | # Copyright (c) 2019-2021 Adam Karpierz
# Licensed under the MIT License
# https://opensource.org/licenses/MIT
__all__ = ('top_dir', 'test_dir')
import sys, pathlib
sys.dont_write_bytecode = True
test_dir = pathlib.Path(__file__).resolve().parent
top_dir = test_dir.parent
del sys, pathlib
| 24.333333 | 50 | 0.763699 |
7326b4af9691f5a596a14bfbbc863db57be19b50 | 813 | py | Python | getcardlist.py | shinji19/sealed-deck-generator | 8321d023fbef3a4b58c37fe36ac9b225b22bb4d1 | [
"MIT"
] | null | null | null | getcardlist.py | shinji19/sealed-deck-generator | 8321d023fbef3a4b58c37fe36ac9b225b22bb4d1 | [
"MIT"
] | null | null | null | getcardlist.py | shinji19/sealed-deck-generator | 8321d023fbef3a4b58c37fe36ac9b225b22bb4d1 | [
"MIT"
] | null | null | null | from mtgsdk import Card
import pickle
DATABASE_FILE_NAME = 'database.dat'
def fetch():
print('Start request...')
card_all = Card.where(set='M21').all()
print('Success request!')
cards = []
for c in card_all:
# 番外カードは除外する
if int(c.number) < 275:
cards.append(c)
card... | 19.357143 | 71 | 0.595326 |
7e6b6b11353fef27e6bfd2b5690c7d183e68b6c8 | 40,794 | py | Python | tests/api/test_discount.py | fooliscool/saleor | 9502467c0e745eb8afdbfa373d634814d133e864 | [
"CC-BY-4.0"
] | 1 | 2017-01-07T04:04:39.000Z | 2017-01-07T04:04:39.000Z | tests/api/test_discount.py | fooliscool/saleor | 9502467c0e745eb8afdbfa373d634814d133e864 | [
"CC-BY-4.0"
] | 14 | 2021-02-02T22:31:33.000Z | 2022-03-12T00:16:06.000Z | tests/api/test_discount.py | fooliscool/saleor | 9502467c0e745eb8afdbfa373d634814d133e864 | [
"CC-BY-4.0"
] | null | null | null | from datetime import timedelta
from decimal import Decimal
import graphene
import pytest
from django.utils import timezone
from django_countries import countries
from saleor.discount import DiscountValueType, VoucherType
from saleor.discount.models import Sale, Voucher
from saleor.graphql.discount.enums import Discou... | 31.452583 | 88 | 0.578958 |
0ba4d82e10860ff375fc8e13ba320f4ec55c774a | 7,459 | py | Python | src/benchmark/trace_record.py | renkekuhlmann/gams-benchmark | 91a5a5ee5ba97de63fbbc4c2b6f0b25c5897caf6 | [
"MIT"
] | null | null | null | src/benchmark/trace_record.py | renkekuhlmann/gams-benchmark | 91a5a5ee5ba97de63fbbc4c2b6f0b25c5897caf6 | [
"MIT"
] | null | null | null | src/benchmark/trace_record.py | renkekuhlmann/gams-benchmark | 91a5a5ee5ba97de63fbbc4c2b6f0b25c5897caf6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
""" TraceRecord """
import os
import re
import math
TRACE_ENTRIES = [
'InputFileName', 'ModelType', 'SolverName', 'NLP', 'MIP', 'JulianDate',
'Direction', 'NumberOfEquations', 'NumberOfVariables',
'NumberOfDiscreteVariables', 'NumberOfNonZeros', 'NumberOfNonlinearNonZeros',
'Opt... | 32.290043 | 90 | 0.486124 |
04b4dbcf978b1e582f5aceb45d2cf98bbf331ec6 | 2,482 | py | Python | tests/sentry/models/test_event.py | JannKleen/sentry | 8b29c8234bb51a81d5cab821a1f2ed4ea8e8bd88 | [
"BSD-3-Clause"
] | 1 | 2019-02-27T15:13:06.000Z | 2019-02-27T15:13:06.000Z | tests/sentry/models/test_event.py | rmax/sentry | 8b29c8234bb51a81d5cab821a1f2ed4ea8e8bd88 | [
"BSD-3-Clause"
] | 5 | 2020-07-17T11:20:41.000Z | 2021-05-09T12:16:53.000Z | tests/sentry/models/test_event.py | zaasmi/codeerrorhelp | 1ab8d3e314386b9b2d58dad9df45355bf6014ac9 | [
"BSD-3-Clause"
] | 2 | 2021-01-26T09:53:39.000Z | 2022-03-22T09:01:47.000Z | from __future__ import absolute_import
from sentry.testutils import TestCase
class EventTest(TestCase):
def test_legacy_tags(self):
event = self.create_event(
data={'tags': [
('logger', 'foobar'),
('site', 'foo'),
('server_name', 'bar'),
... | 32.233766 | 97 | 0.537067 |
6493a3e0dba384602bd4c28c6e965bc2c0e9c85b | 21,581 | py | Python | stable_baselines3/common/logger.py | martinwimpff/stable-baselines3-hmlf | 6ffa947760f8c42a09f9ae42aa7485c608efc42d | [
"MIT"
] | null | null | null | stable_baselines3/common/logger.py | martinwimpff/stable-baselines3-hmlf | 6ffa947760f8c42a09f9ae42aa7485c608efc42d | [
"MIT"
] | null | null | null | stable_baselines3/common/logger.py | martinwimpff/stable-baselines3-hmlf | 6ffa947760f8c42a09f9ae42aa7485c608efc42d | [
"MIT"
] | null | null | null | import datetime
import json
import os
import sys
import tempfile
import warnings
from collections import defaultdict
from typing import Any, Dict, List, Optional, Sequence, TextIO, Tuple, Union
import numpy as np
import pandas
import torch as th
from matplotlib import pyplot as plt
try:
from torch.utils.tensorboa... | 33.720313 | 125 | 0.589268 |
3547cdf50c35971804118408397e69797527a4c6 | 1,459 | py | Python | esphome/components/tx20/sensor.py | huhuhugo1/esphome | eb895d2095861a4d51f1a5fcd582a97389c27b4f | [
"MIT"
] | null | null | null | esphome/components/tx20/sensor.py | huhuhugo1/esphome | eb895d2095861a4d51f1a5fcd582a97389c27b4f | [
"MIT"
] | null | null | null | esphome/components/tx20/sensor.py | huhuhugo1/esphome | eb895d2095861a4d51f1a5fcd582a97389c27b4f | [
"MIT"
] | null | null | null | import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import pins
from esphome.components import sensor
from esphome.const import CONF_ID, CONF_WIND_SPEED, CONF_PIN, \
CONF_WIND_DIRECTION_DEGREES, UNIT_KILOMETER_PER_HOUR, \
ICON_WEATHER_WINDY, ICON_SIGN_DIRECTION, UNIT_DEGREES
tx20_n... | 37.410256 | 77 | 0.744345 |
5cc3315cdfe7907704228d6c8e5898cdb8d26ea4 | 1,541 | py | Python | Python Programs/step-numbers-from-1-to-n.py | muhammad-masood-ur-rehman/Skillrack | 71a25417c89d0efab40ee6229ccd758b26ae4312 | [
"CC0-1.0"
] | 2 | 2021-06-26T21:50:59.000Z | 2021-09-18T04:55:51.000Z | Python Programs/step-numbers-from-1-to-n.py | muhammad-masood-ur-rehman/Skillrack | 71a25417c89d0efab40ee6229ccd758b26ae4312 | [
"CC0-1.0"
] | null | null | null | Python Programs/step-numbers-from-1-to-n.py | muhammad-masood-ur-rehman/Skillrack | 71a25417c89d0efab40ee6229ccd758b26ae4312 | [
"CC0-1.0"
] | null | null | null | Step Numbers from 1 to N
The program must accept an integer N as the input. The program must print all the step numbers from 1 to N as the output. If there is no such integer then the program must print -1 as the output. A number is called a step number if all the adjacent digits have an absolute difference of 1.
Note... | 23.707692 | 289 | 0.621674 |
07b490f74faa19233d1ff227771939dab4b60f9b | 7,060 | py | Python | django_countries/__init__.py | toofishes/django-countries | 5c4745d80c294aed121bf532429cbcd08bf5031f | [
"MIT"
] | null | null | null | django_countries/__init__.py | toofishes/django-countries | 5c4745d80c294aed121bf532429cbcd08bf5031f | [
"MIT"
] | null | null | null | django_countries/__init__.py | toofishes/django-countries | 5c4745d80c294aed121bf532429cbcd08bf5031f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import unicode_literals
from itertools import islice
from django_countries.conf import settings
from django.utils.encoding import force_text
try:
import pyuca
except ImportError:
pyuca = None
# Use UCA sorting if it's available.
if pyuca:
collator = pyuca.Collator()
... | 32.685185 | 78 | 0.596034 |
cd57a3d31ec50f7b18f6f73eea9a565817927311 | 1,081 | py | Python | scripts/leg_init_position.py | open-dynamic-robot-initiative/python_blmc | 8b8e9d73469098437ed43f237f65be74b2c99060 | [
"BSD-3-Clause"
] | null | null | null | scripts/leg_init_position.py | open-dynamic-robot-initiative/python_blmc | 8b8e9d73469098437ed43f237f65be74b2c99060 | [
"BSD-3-Clause"
] | null | null | null | scripts/leg_init_position.py | open-dynamic-robot-initiative/python_blmc | 8b8e9d73469098437ed43f237f65be74b2c99060 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Demo on how to initialize the zero position at start up.
Runs the position initialization procedure and starts to print joint positions
when done.
"""
from __future__ import print_function
import can
import time
import blmc.motor_data as md
import blmc.can_helper as ch
from blmc.helper import... | 25.738095 | 78 | 0.6605 |
f5f9d24be73a9a8e2a967ba25e47ef2a0274f323 | 4,701 | py | Python | django_any/test.py | ixc/django-whatever | 8889321bb935aec7b7747def4768819b1623f832 | [
"MIT"
] | 1 | 2015-02-21T11:49:33.000Z | 2015-02-21T11:49:33.000Z | django_any/test.py | ixc/django-whatever | 8889321bb935aec7b7747def4768819b1623f832 | [
"MIT"
] | null | null | null | django_any/test.py | ixc/django-whatever | 8889321bb935aec7b7747def4768819b1623f832 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import time, random
try:
from unittest import _strclass
except ImportError:
_strclass = str
from django import forms
from django_any import any_form
from django.test.client import Client as DjangoClient
from django_any.contrib.auth import any_user
from django.contrib.admin.helpers impo... | 32.19863 | 130 | 0.62859 |
8f303b0b13200089756242ef79f73eb29122007d | 878 | py | Python | python/setup.py | bowlofstew/planout | 175f3833c00df7c0a4606396797cbb4220ea6cb6 | [
"BSD-3-Clause"
] | null | null | null | python/setup.py | bowlofstew/planout | 175f3833c00df7c0a4606396797cbb4220ea6cb6 | [
"BSD-3-Clause"
] | null | null | null | python/setup.py | bowlofstew/planout | 175f3833c00df7c0a4606396797cbb4220ea6cb6 | [
"BSD-3-Clause"
] | null | null | null | from distutils.core import setup
setup(
name='PlanOut',
version='0.5',
author='Facebook, Inc.',
author_email='eytan@fb.com',
packages=[
'planout',
'planout.ops',
'planout.test'
],
url='http://pypi.python.org/pypi/PlanOut/',
license='LICENSE',
description='Pla... | 33.769231 | 80 | 0.694761 |
381ea4da8e57d809bd0d1f796775e9de4bebc6a3 | 1,169 | py | Python | File_Transfer_Protocol/ftp_send_receive.py | srivama/Python | 809d4c077c179feb077f09a3cd2501f9724366a2 | [
"MIT"
] | null | null | null | File_Transfer_Protocol/ftp_send_receive.py | srivama/Python | 809d4c077c179feb077f09a3cd2501f9724366a2 | [
"MIT"
] | null | null | null | File_Transfer_Protocol/ftp_send_receive.py | srivama/Python | 809d4c077c179feb077f09a3cd2501f9724366a2 | [
"MIT"
] | null | null | null | """
File transfer protocol used to send and receive files using FTP server.
Use credentials to provide access to the FTP client
Note: Do not use root user name & password for security reasons
Create a separate user and provide access to a home directory of the user
Use logic id and password of the user created ca... | 33.4 | 92 | 0.711719 |
7fc9168ce6f9fbe70d95c79ca8b3c202d82c877e | 1,900 | py | Python | lib/cxxtest/python/setup.py | aproeme/libgeodecomp | f78899c67ad62540fd153cba132a0a363a7b3fa9 | [
"BSL-1.0"
] | 493 | 2016-07-11T13:35:24.000Z | 2022-02-15T13:04:29.000Z | lib/cxxtest/python/setup.py | aproeme/libgeodecomp | f78899c67ad62540fd153cba132a0a363a7b3fa9 | [
"BSL-1.0"
] | 72 | 2015-02-05T10:41:30.000Z | 2022-03-03T12:02:47.000Z | lib/cxxtest/python/setup.py | aproeme/libgeodecomp | f78899c67ad62540fd153cba132a0a363a7b3fa9 | [
"BSL-1.0"
] | 229 | 2016-07-12T10:39:54.000Z | 2022-02-15T13:04:31.000Z | #-------------------------------------------------------------------------
# CxxTest: A lightweight C++ unit testing library.
# Copyright (c) 2008 Sandia Corporation.
# This software is distributed under the LGPL License v3
# For more information, see the COPYING file in the top CxxTest directory.
# Under the terms of ... | 30.15873 | 74 | 0.641579 |
6045ec6e264d342642d3d4a0c87fe2bf712ad52d | 4,067 | py | Python | fairseq/bleu.py | gcunhase/fairseq | dfc13956a3f6c40b8de44d7b8b0959f62c8db025 | [
"BSD-3-Clause"
] | null | null | null | fairseq/bleu.py | gcunhase/fairseq | dfc13956a3f6c40b8de44d7b8b0959f62c8db025 | [
"BSD-3-Clause"
] | null | null | null | fairseq/bleu.py | gcunhase/fairseq | dfc13956a3f6c40b8de44d7b8b0959f62c8db025 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import ctypes
import math
import t... | 30.810606 | 88 | 0.57192 |
2769de9c0d8568b13dc0e82f94d528a9cef1c2a8 | 7,724 | py | Python | ucsmsdk/mometa/fabric/FabricFcVsanPc.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/fabric/FabricFcVsanPc.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/fabric/FabricFcVsanPc.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for FabricFcVsanPc ManagedObject."""
import sys, os
from ...ucsmo import ManagedObject
from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class FabricFcVsanPcConsts():
ADMIN_STATE_DISABLED = "disabled"
ADMIN_STATE_E... | 60.818898 | 344 | 0.651346 |
fcb4db0b630a486bbf51833af1f4f05fa66f2aa7 | 440 | py | Python | advocate/__init__.py | ColdHeat/Advocate | 6d699aed899784dfae5fac28e29567936bed81a3 | [
"Apache-2.0"
] | 76 | 2015-12-05T02:38:13.000Z | 2022-02-02T07:34:57.000Z | advocate/__init__.py | ColdHeat/Advocate | 6d699aed899784dfae5fac28e29567936bed81a3 | [
"Apache-2.0"
] | 16 | 2015-10-29T20:28:45.000Z | 2021-10-11T04:43:38.000Z | advocate/__init__.py | ColdHeat/Advocate | 6d699aed899784dfae5fac28e29567936bed81a3 | [
"Apache-2.0"
] | 9 | 2017-01-28T01:14:09.000Z | 2022-01-17T00:20:31.000Z | __version__ = "1.0.0"
from requests import utils
from requests.models import Request, Response, PreparedRequest
from requests.status_codes import codes
from requests.exceptions import (
RequestException, Timeout, URLRequired,
TooManyRedirects, HTTPError, ConnectionError
)
from .adapters import ValidatingHTTPA... | 29.333333 | 62 | 0.827273 |
be487f768bf77631352158b2bb1237f4c8e07c1d | 1,795 | py | Python | shared/modules/verify_cce_module.py | fduthilleul/scap-security-guide | f9b67869600f6c20dcb0ba83801578cec1a51bba | [
"BSD-3-Clause"
] | null | null | null | shared/modules/verify_cce_module.py | fduthilleul/scap-security-guide | f9b67869600f6c20dcb0ba83801578cec1a51bba | [
"BSD-3-Clause"
] | null | null | null | shared/modules/verify_cce_module.py | fduthilleul/scap-security-guide | f9b67869600f6c20dcb0ba83801578cec1a51bba | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
import sys
import platform
from lxml import etree
# This script checks the validity of assigned CCEs, lists granted and remaining
# available CCEs, and checks for duplicates.
release = '%.0f' % float(platform.linux_distribution()[1])
xccdf_ns = "http://checklists.nist.gov/xccdf/1.1"
tree = et... | 33.867925 | 84 | 0.651253 |
5c59b6fb3431f6ac626e34d2ac6b1bfd96c606ea | 45,314 | py | Python | zerver/tornado/event_queue.py | measo3/2018-2-OSS-L5 | 15af7b91489b6cab794c5bd5af5948b3cc059f85 | [
"Apache-2.0"
] | 3 | 2018-12-04T01:44:43.000Z | 2019-05-13T06:16:21.000Z | zerver/tornado/event_queue.py | measo3/2018-2-OSS-L5 | 15af7b91489b6cab794c5bd5af5948b3cc059f85 | [
"Apache-2.0"
] | 58 | 2018-11-27T15:18:54.000Z | 2018-12-09T13:43:07.000Z | zerver/tornado/event_queue.py | measo3/2018-2-OSS-L5 | 15af7b91489b6cab794c5bd5af5948b3cc059f85 | [
"Apache-2.0"
] | 4 | 2018-11-29T22:47:27.000Z | 2018-12-04T09:34:22.000Z | # See https://zulip.readthedocs.io/en/latest/subsystems/events-system.html for
# high-level documentation on how this system works.
from typing import cast, AbstractSet, Any, Callable, Dict, List, \
Mapping, MutableMapping, Optional, Iterable, Sequence, Set, Union
from mypy_extensions import TypedDict
from django.... | 44.732478 | 119 | 0.654566 |
6715f79511639f21c7c8b7b03d43f0af95b12802 | 1,520 | py | Python | src/script_convert.py | ybsat/NZDairyForecast | fba62dc4c89d2737af0fc986f413a4a4c0aaa585 | [
"MIT"
] | null | null | null | src/script_convert.py | ybsat/NZDairyForecast | fba62dc4c89d2737af0fc986f413a4a4c0aaa585 | [
"MIT"
] | null | null | null | src/script_convert.py | ybsat/NZDairyForecast | fba62dc4c89d2737af0fc986f413a4a4c0aaa585 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import os
import json
import pandas as pd
# must correct the path"
with open("trading_data2.json", "r") as read_file:
data = json.load(read_file)
row = data[0]
temp = {k: [v] for k, v in row['EventSummary'].items()}
events = pd.Dat... | 27.636364 | 113 | 0.678289 |
e63cdcbce0a2d19a7d44f756a261a1022c2c513d | 3,933 | py | Python | test/unit/config/test_reload_config.py | julozi/galaxy | 90d9da03975f254ac128747cd04532c3595d6155 | [
"CC-BY-3.0"
] | 2 | 2017-03-28T12:11:41.000Z | 2017-04-22T02:58:25.000Z | test/unit/config/test_reload_config.py | userssss/galaxy | 9662164ad68b39adf5a5606a7aa8e388f6a79f1e | [
"CC-BY-3.0"
] | 2 | 2019-04-03T15:37:17.000Z | 2019-04-03T19:37:09.000Z | test/unit/config/test_reload_config.py | userssss/galaxy | 9662164ad68b39adf5a5606a7aa8e388f6a79f1e | [
"CC-BY-3.0"
] | 1 | 2019-01-16T22:21:54.000Z | 2019-01-16T22:21:54.000Z | from galaxy import config
from galaxy.config import reload_config_options
R1, R2, N1, N2 = 'reloadable1', 'reloadable2', 'nonrelodable1', 'nonreloadable2' # config options
class MockGalaxyAppConfiguration():
def __init__(self, properties):
self.config_file = None
self.reloadable_options = {R1, ... | 42.75 | 107 | 0.707094 |
596ebbfe48a7d049af468bffad9c7f0e53cfbe1f | 363 | py | Python | tests/numeric-utils/test_clamp.py | shinnng/platon-utils | 50f2b95279ab12bf295b430b83827d9db440da74 | [
"MIT"
] | null | null | null | tests/numeric-utils/test_clamp.py | shinnng/platon-utils | 50f2b95279ab12bf295b430b83827d9db440da74 | [
"MIT"
] | null | null | null | tests/numeric-utils/test_clamp.py | shinnng/platon-utils | 50f2b95279ab12bf295b430b83827d9db440da74 | [
"MIT"
] | null | null | null | import pytest
from platon_utils.numeric import clamp
@pytest.mark.parametrize(
"lower_bound,upper_bound,value,expected",
((5, 7, 4, 5), (5, 7, 5, 5), (5, 7, 6, 6), (5, 7, 7, 7), (5, 7, 8, 7)),
)
def test_numeric_clamp_utility(lower_bound, upper_bound, value, expected):
result = clamp(lower_bound, upper_b... | 27.923077 | 75 | 0.672176 |
e9d8bd0f1f585936d45b4652fc90cdfbb0ee6e8d | 5,789 | py | Python | transpiler.py | MiguelRobledo/workshop.py | 0159eb752e3154d4eb051fdf242a9d0157ab0887 | [
"MIT"
] | 1 | 2019-05-28T15:01:13.000Z | 2019-05-28T15:01:13.000Z | transpiler.py | MiguelRobledo/workshop.py | 0159eb752e3154d4eb051fdf242a9d0157ab0887 | [
"MIT"
] | null | null | null | transpiler.py | MiguelRobledo/workshop.py | 0159eb752e3154d4eb051fdf242a9d0157ab0887 | [
"MIT"
] | null | null | null | import io
import re
import uuid
import tokenize
from helper import casify
# captures specific tokens
class Captor:
def __init__(self, output_func, start_tok, end_tok, remove_start = True, remove_end = False):
self.start_tok = start_tok
self.end_tok = end_tok
self.output_func = output_func
self.remove_start = ... | 25.728889 | 119 | 0.635688 |
b5ab80f6123f3c393659e6accdce375c114121f8 | 1,859 | py | Python | python/dgllife/model/pretrain/property_prediction.py | padr31/dgl-lifesci | 932581468b330862836c0f050077fa33d0eb9405 | [
"Apache-2.0"
] | 390 | 2020-06-05T13:16:18.000Z | 2022-03-31T07:36:34.000Z | python/dgllife/model/pretrain/property_prediction.py | padr31/dgl-lifesci | 932581468b330862836c0f050077fa33d0eb9405 | [
"Apache-2.0"
] | 71 | 2020-06-12T05:26:56.000Z | 2022-03-29T06:26:39.000Z | python/dgllife/model/pretrain/property_prediction.py | padr31/dgl-lifesci | 932581468b330862836c0f050077fa33d0eb9405 | [
"Apache-2.0"
] | 113 | 2020-06-08T18:48:18.000Z | 2022-03-22T01:16:26.000Z | # -*- coding: utf-8 -*-
#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#
# pylint: disable= no-member, arguments-differ, invalid-name
#
# Pre-trained models for molecular property prediction
from ..gnn.gin import GIN
from ..model_zoo.attentivefp_predictor i... | 33.196429 | 87 | 0.600861 |
dcf9e612475b9d80d6feb55c100117285f613eea | 4,271 | py | Python | score/consonance.py | ljumbam/Score | 52dfa782e1e2e6b7b4c441ebbd223e7d305ecf8e | [
"MIT"
] | null | null | null | score/consonance.py | ljumbam/Score | 52dfa782e1e2e6b7b4c441ebbd223e7d305ecf8e | [
"MIT"
] | null | null | null | score/consonance.py | ljumbam/Score | 52dfa782e1e2e6b7b4c441ebbd223e7d305ecf8e | [
"MIT"
] | null | null | null | """
Chord consonance based on frequency ratio
"""
from fractions import Fraction
from itertools import combinations
from score.base import ScoreObject
from score.note import Note
"""
TODO: Experiment with consonance. Consider always setting a tonic, and
getting the consonance of 3 or more notes by the theory de... | 29.253425 | 124 | 0.610162 |
1621e7a656b53ff777c579ccb79006f2b5633a7a | 7,297 | py | Python | tests/test_transforms/test_scalers_transform.py | Carlosbogo/etna | b6210f0e79ee92aa9ae8ff4fcfb267be9fb7cc94 | [
"Apache-2.0"
] | 1 | 2021-11-11T21:18:42.000Z | 2021-11-11T21:18:42.000Z | tests/test_transforms/test_scalers_transform.py | Carlosbogo/etna | b6210f0e79ee92aa9ae8ff4fcfb267be9fb7cc94 | [
"Apache-2.0"
] | null | null | null | tests/test_transforms/test_scalers_transform.py | Carlosbogo/etna | b6210f0e79ee92aa9ae8ff4fcfb267be9fb7cc94 | [
"Apache-2.0"
] | null | null | null | from typing import Any
from typing import List
from typing import Optional
from typing import Union
import numpy as np
import numpy.testing as npt
import pandas as pd
import pytest
from etna.datasets import TSDataset
from etna.transforms import MaxAbsScalerTransform
from etna.transforms import MinMaxScalerTransform
f... | 35.945813 | 111 | 0.707825 |
f86ba51f4ebdaea70378b2257c6887129089706e | 16,208 | py | Python | libradtran/spectral_options.py | NelisW/libraddask | 3c622ec0010d79aee210d2ce7cf2b6cba79c1835 | [
"MIT"
] | 4 | 2020-04-20T21:31:25.000Z | 2022-03-23T11:33:13.000Z | libradtran/spectral_options.py | NelisW/libraddask | 3c622ec0010d79aee210d2ce7cf2b6cba79c1835 | [
"MIT"
] | null | null | null | libradtran/spectral_options.py | NelisW/libraddask | 3c622ec0010d79aee210d2ce7cf2b6cba79c1835 | [
"MIT"
] | 1 | 2021-05-23T05:09:24.000Z | 2021-05-23T05:09:24.000Z |
"""--------------------------------------------------------------------
* $Id: spectral_options.py 3145 2015-08-04 13:35:30Z josef.gasteiger $
*
* This file is part of libRadtran.
* Copyright (c) 1997-2012 by Arve Kylling, Bernhard Mayer,
* Claudia Emde, Robert Buras
*
* ######### Co... | 49.115152 | 205 | 0.64752 |
6470ce9a91cea989e98aee17418d426c6078bf20 | 3,704 | py | Python | lib/galaxy/web/framework/middleware/sentry.py | BalthazarPavot/galaxy_project_reports | aa397de11a9a3425f85c701087af4c5d165b571f | [
"CC-BY-3.0"
] | 1 | 2019-07-03T08:13:57.000Z | 2019-07-03T08:13:57.000Z | lib/galaxy/web/framework/middleware/sentry.py | LainOldAccound/galaxy_project_reports | aa397de11a9a3425f85c701087af4c5d165b571f | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/web/framework/middleware/sentry.py | LainOldAccound/galaxy_project_reports | aa397de11a9a3425f85c701087af4c5d165b571f | [
"CC-BY-3.0"
] | null | null | null | """
raven.middleware
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
try:
from raven import Client
from raven.utils.wsgi import get_current_url, get_headers, get_environ
except:
Client = None
RAVEN_IMPO... | 39.827957 | 88 | 0.605832 |
8ee2a20cf695ae6ec59ff34a8bf9356262815cff | 6,028 | py | Python | examples/django_spine/django_spine/settings.py | ikeikeikeike/django-spine | b8bf097d746b552c61a013436b0dceefa7b9207f | [
"MIT"
] | 1 | 2015-11-05T05:07:50.000Z | 2015-11-05T05:07:50.000Z | examples/django_spine/django_spine/settings.py | ikeikeikeike/django-spine | b8bf097d746b552c61a013436b0dceefa7b9207f | [
"MIT"
] | null | null | null | examples/django_spine/django_spine/settings.py | ikeikeikeike/django-spine | b8bf097d746b552c61a013436b0dceefa7b9207f | [
"MIT"
] | null | null | null | # Django settings for django_spine project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '... | 32.76087 | 109 | 0.671865 |
30777cb550eeb1f619e226de26b5448e7404d6e2 | 561 | py | Python | 0x0A-python-inheritance/11-square.py | BennettDixon/holbertonschool-higher_level_programming | 3fbcd5e009548aab5539ce8610b4113f005964c4 | [
"MIT"
] | 1 | 2022-02-07T12:13:18.000Z | 2022-02-07T12:13:18.000Z | 0x0A-python-inheritance/11-square.py | BennettDixon/holbertonschool-higher_level_programming | 3fbcd5e009548aab5539ce8610b4113f005964c4 | [
"MIT"
] | null | null | null | 0x0A-python-inheritance/11-square.py | BennettDixon/holbertonschool-higher_level_programming | 3fbcd5e009548aab5539ce8610b4113f005964c4 | [
"MIT"
] | 1 | 2021-12-06T18:15:54.000Z | 2021-12-06T18:15:54.000Z | #!/usr/bin/python3
Rectangle = __import__('9-rectangle').Rectangle
class Square(Rectangle):
"""square shape class, super class is BaseGeometry, then Rectangle
"""
def __init__(self, size):
"""instantiation method for class
"""
super().__init__(size, size)
self.integer_val... | 24.391304 | 70 | 0.593583 |
a69730dfa3be43e24616dcf81a893059818e50d3 | 1,285 | py | Python | threatminer/komand_threatminer/actions/ssdeep_sample/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | threatminer/komand_threatminer/actions/ssdeep_sample/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | threatminer/komand_threatminer/actions/ssdeep_sample/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
from .schema import SsdeepSampleInput, SsdeepSampleOutput
# Custom imports below
import json
import requests
class SsdeepSample(komand.Action):
API_URL = 'https://www.threatminer.org/ssdeep.php?api=True&rt=1'
def __init__(self):
super(self.__class__, self).__init__(
nam... | 32.948718 | 91 | 0.620233 |
12c7ed34130c6d3ccc08188217a5a9b258ef3d9d | 7,504 | py | Python | chipy_org/settings.py | ahlusar1989/chipy.org | 01a1321db4731a9dabeea22d8462de97a9ab0880 | [
"MIT"
] | null | null | null | chipy_org/settings.py | ahlusar1989/chipy.org | 01a1321db4731a9dabeea22d8462de97a9ab0880 | [
"MIT"
] | null | null | null | chipy_org/settings.py | ahlusar1989/chipy.org | 01a1321db4731a9dabeea22d8462de97a9ab0880 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Django settings for account project
import os
import sys
import dj_database_url
from django.conf.global_settings import MIDDLEWARE_CLASSES
def env_var(key, default=None):
"""Retrieves env vars and makes Python boolean replacements"""
val = os.environ.get(key, default)
if val ==... | 27.895911 | 96 | 0.720283 |
cc89bca44ee939607208a81f60285960b3e944cd | 1,910 | py | Python | tests/models/test_3d_secure_status.py | lejion/django-sagepaypi | 86eeff5afb9681fcc820e2d75910c4e642fefe85 | [
"MIT"
] | null | null | null | tests/models/test_3d_secure_status.py | lejion/django-sagepaypi | 86eeff5afb9681fcc820e2d75910c4e642fefe85 | [
"MIT"
] | 12 | 2019-03-06T14:27:38.000Z | 2019-03-12T21:45:59.000Z | tests/models/test_3d_secure_status.py | lejion/django-sagepaypi | 86eeff5afb9681fcc820e2d75910c4e642fefe85 | [
"MIT"
] | 1 | 2021-01-06T12:09:42.000Z | 2021-01-06T12:09:42.000Z | import mock
from sagepaypi.exceptions import InvalidTransactionStatus
from sagepaypi.models import Transaction
from tests.mocks import gone_response, auth_success_response, outcome_live_response
from tests.test_case import AppTestCase
class TestTransactionOutcome(AppTestCase):
fixtures = ['tests/fixtures/test']... | 38.2 | 88 | 0.740314 |
ccbb431389e7d717d7e2ff4200a585a5a03bea10 | 19,809 | py | Python | week 1/gradient checking/Gradient+Checking+v1.py | sazzadBuet08/deep-learning-ai-improve-deep-networks-by-andrew-ng | 5e821ee8cf1a902ccedddd429645c60011e8b3b8 | [
"MIT"
] | null | null | null | week 1/gradient checking/Gradient+Checking+v1.py | sazzadBuet08/deep-learning-ai-improve-deep-networks-by-andrew-ng | 5e821ee8cf1a902ccedddd429645c60011e8b3b8 | [
"MIT"
] | null | null | null | week 1/gradient checking/Gradient+Checking+v1.py | sazzadBuet08/deep-learning-ai-improve-deep-networks-by-andrew-ng | 5e821ee8cf1a902ccedddd429645c60011e8b3b8 | [
"MIT"
] | null | null | null |
# coding: utf-8
# # Gradient Checking
#
# Welcome to the final assignment for this week! In this assignment you will learn to implement and use gradient checking.
#
# You are part of a team working to make mobile payments available globally, and are asked to build a deep learning model to detect fraud--whenever so... | 44.216518 | 392 | 0.643849 |
b2a53a3bcaf994ebd51d05e539a674394f2256da | 14,309 | py | Python | .venv/lib/python3.8/site-packages/poetry/core/packages/dependency.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | null | null | null | .venv/lib/python3.8/site-packages/poetry/core/packages/dependency.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | null | null | null | .venv/lib/python3.8/site-packages/poetry/core/packages/dependency.py | RivtLib/replit01 | ce1ae18b446a9c844f40e88a51c71fbc45ab3ad7 | [
"MIT"
] | null | null | null | from typing import TYPE_CHECKING
from typing import Any
from typing import FrozenSet
from typing import List
from typing import Optional
from typing import Union
import poetry.core.packages
from poetry.core.semver import Version
from poetry.core.semver import VersionConstraint
from poetry.core.semver impor... | 33.988124 | 89 | 0.566007 |
f105cb1db086ef424560ec3c0f4d5ca9cc837bbc | 1,018 | py | Python | lib/python2.7/site-packages/braintree/partner_merchant.py | ervinpepic/E-commerce | 2c15255d1730728cf35c166b9f88cffcb99f5323 | [
"MIT"
] | 182 | 2015-01-09T05:26:46.000Z | 2022-03-16T14:10:06.000Z | lib/python2.7/site-packages/braintree/partner_merchant.py | ervinpepic/E-commerce | 2c15255d1730728cf35c166b9f88cffcb99f5323 | [
"MIT"
] | 95 | 2015-02-24T23:29:56.000Z | 2022-03-13T03:27:58.000Z | lib/python2.7/site-packages/braintree/partner_merchant.py | ervinpepic/E-commerce | 2c15255d1730728cf35c166b9f88cffcb99f5323 | [
"MIT"
] | 93 | 2015-02-19T17:59:06.000Z | 2022-03-19T17:01:25.000Z | from braintree.configuration import Configuration
from braintree.resource import Resource
class PartnerMerchant(Resource):
def __init__(self, gateway, attributes):
Resource.__init__(self, gateway, attributes)
if "partner_merchant_id" in attributes:
self.partner_merchant_id = attributes... | 46.272727 | 111 | 0.719057 |
96e8ffd445d91f37345680ae1f18deba3a8ff465 | 87 | py | Python | shipengine/http_client/__init__.py | artem1205/shipengine-python | b23a7adee19162220f106346d4d81c755aafea27 | [
"Apache-2.0"
] | null | null | null | shipengine/http_client/__init__.py | artem1205/shipengine-python | b23a7adee19162220f106346d4d81c755aafea27 | [
"Apache-2.0"
] | null | null | null | shipengine/http_client/__init__.py | artem1205/shipengine-python | b23a7adee19162220f106346d4d81c755aafea27 | [
"Apache-2.0"
] | null | null | null | """Synchronous HTTP Client for ShipEngine SDK."""
from .client import ShipEngineClient
| 29 | 49 | 0.793103 |
aa9c66361c624ade298d8f05060d2670b89d38f1 | 646 | py | Python | python/nano/src/bigdl/nano/pytorch/optim/__init__.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | null | null | null | python/nano/src/bigdl/nano/pytorch/optim/__init__.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | null | null | null | python/nano/src/bigdl/nano/pytorch/optim/__init__.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 The BigDL 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 ... | 35.888889 | 74 | 0.766254 |
ccd3300ba81b67ba0e0621215ac58c9f517d3db1 | 1,154 | py | Python | test/cloud_simulation_test.py | shihao-zhang/buildsimhub_python_api | daa0b7d2e92820b6b1cdaa981fb9f0d88c375012 | [
"MIT"
] | 19 | 2018-02-27T22:58:04.000Z | 2022-02-21T15:03:59.000Z | test/cloud_simulation_test.py | shihao-zhang/buildsimhub_python_api | daa0b7d2e92820b6b1cdaa981fb9f0d88c375012 | [
"MIT"
] | 11 | 2018-02-15T16:47:53.000Z | 2018-12-19T18:33:20.000Z | test/cloud_simulation_test.py | shihao-zhang/buildsimhub_python_api | daa0b7d2e92820b6b1cdaa981fb9f0d88c375012 | [
"MIT"
] | 11 | 2018-01-26T02:12:38.000Z | 2019-09-29T12:05:31.000Z | """
This sample file demonstrate three ways of running a single model simulation
"""
import BuildSimHubAPI as bsh_api
import BuildSimHubAPI.postprocess as pp
# project_key can be found in every project (click the information icon next to project name)
project_key = "f98aadb3-254f-428d-a321-82a6e4b9424c"
file_dir = ... | 30.368421 | 93 | 0.77643 |
9652fe2bff47d4497a7a11b2370a4629af04d3c5 | 604 | py | Python | m4/numpyinclude.py | ndl303/umkehr | a9a499931a2b99bb9eda6f93dae3b3807ef1746b | [
"Unlicense"
] | 1 | 2020-06-29T19:56:58.000Z | 2020-06-29T19:56:58.000Z | m4/numpyinclude.py | woudc/woudc-umkehr | a9a499931a2b99bb9eda6f93dae3b3807ef1746b | [
"Unlicense"
] | null | null | null | m4/numpyinclude.py | woudc/woudc-umkehr | a9a499931a2b99bb9eda6f93dae3b3807ef1746b | [
"Unlicense"
] | null | null | null | import site
import os
names = site.getusersitepackages()
found = False
for name in names:
if (not found):
fullname = name + os.sep +'numpy'+os.sep+'core'+os.sep+'include'
found = os.path.isdir(fullname)
if (found):
print(fullname)
if (not found):
names = site.get... | 24.16 | 73 | 0.554636 |
6604529143a3f04aa81dc2b0ae64257985d2d7bc | 8,072 | py | Python | packages/create_python.py | emsig/libdlf | bbe626d7bf4b13afb8878eafb28ed835c884104e | [
"CC-BY-4.0"
] | 4 | 2021-08-06T14:52:20.000Z | 2021-09-12T09:40:06.000Z | packages/create_python.py | emsig/libdlf | bbe626d7bf4b13afb8878eafb28ed835c884104e | [
"CC-BY-4.0"
] | 12 | 2021-08-07T08:40:26.000Z | 2021-08-22T17:51:16.000Z | packages/create_python.py | emsig/libdlf | bbe626d7bf4b13afb8878eafb28ed835c884104e | [
"CC-BY-4.0"
] | 1 | 2021-08-10T09:20:27.000Z | 2021-08-10T09:20:27.000Z | import os
import json
import shutil
import pathlib
import subprocess
import numpy as np
from os.path import abspath
# Get git version
version = subprocess.check_output(
['git', 'describe', '--tags'], stderr=subprocess.DEVNULL
).strip().decode('utf-8').split('-')
if len(version) > 1 and version[1]:
version = ve... | 29.567766 | 79 | 0.54051 |
ff978cd83ffa847cb62b0f4334ab3b9fbdddf634 | 1,285 | py | Python | pyannote/audio/embedding/approaches/__init__.py | lgalmant/pyannote-audio | d58a9d2e18fb2fddaab99dbc6f93fdbdcfc5f290 | [
"MIT"
] | null | null | null | pyannote/audio/embedding/approaches/__init__.py | lgalmant/pyannote-audio | d58a9d2e18fb2fddaab99dbc6f93fdbdcfc5f290 | [
"MIT"
] | null | null | null | pyannote/audio/embedding/approaches/__init__.py | lgalmant/pyannote-audio | d58a9d2e18fb2fddaab99dbc6f93fdbdcfc5f290 | [
"MIT"
] | 1 | 2020-02-06T16:22:54.000Z | 2020-02-06T16:22:54.000Z | #!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2017-2019 CNRS
# 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 limita... | 40.15625 | 79 | 0.775875 |
f558e239b85ef4a70ab098732b4018d3120e8c48 | 3,409 | py | Python | toys/basic-example.py | jmtrivial/cartel-generation | 6746f99f43b67b6809fe24f940acfaf0d3728689 | [
"MIT"
] | null | null | null | toys/basic-example.py | jmtrivial/cartel-generation | 6746f99f43b67b6809fe24f940acfaf0d3728689 | [
"MIT"
] | null | null | null | toys/basic-example.py | jmtrivial/cartel-generation | 6746f99f43b67b6809fe24f940acfaf0d3728689 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import xml.etree.cElementTree as ET
avenirStyle = "font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;line-height:125%;font-family:Avenir;-inkscape-font-specification:'Avenir, Medium';text-align:start;writing-mode:lr-tb;"
avenirStyleLeft = avenirStyle+... | 74.108696 | 253 | 0.699032 |
0d697a986ea1d146621fdcf06a970eb8869ce4df | 1,136 | py | Python | vmware_nsx/dhcp_meta/constants.py | yebinama/vmware-nsx | 5f59ce8d4668c24e0f4f934898fb4b4e63f1c2f4 | [
"Apache-2.0"
] | null | null | null | vmware_nsx/dhcp_meta/constants.py | yebinama/vmware-nsx | 5f59ce8d4668c24e0f4f934898fb4b4e63f1c2f4 | [
"Apache-2.0"
] | null | null | null | vmware_nsx/dhcp_meta/constants.py | yebinama/vmware-nsx | 5f59ce8d4668c24e0f4f934898fb4b4e63f1c2f4 | [
"Apache-2.0"
] | 1 | 2019-06-21T18:07:53.000Z | 2019-06-21T18:07:53.000Z | # Copyright 2014 VMware, 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 by... | 39.172414 | 78 | 0.734155 |
629c2de4441a3df8906b4c14042bc19bb1833d8e | 3,413 | py | Python | wsl/networks/medinet/engine.py | nishanthta/wsl | 5fda3b909a314b7f88ffa9ab27a6a142de6b0159 | [
"MIT"
] | 1 | 2020-11-18T23:46:09.000Z | 2020-11-18T23:46:09.000Z | wsl/networks/medinet/engine.py | nishanthta/wsl | 5fda3b909a314b7f88ffa9ab27a6a142de6b0159 | [
"MIT"
] | null | null | null | wsl/networks/medinet/engine.py | nishanthta/wsl | 5fda3b909a314b7f88ffa9ab27a6a142de6b0159 | [
"MIT"
] | 5 | 2020-09-11T15:43:42.000Z | 2021-03-29T16:42:33.000Z | #!/usr/bin/python3
import time
from typing import Dict, Any
import numpy as np
from wsl.networks.medinet.utils import regression_accuracy
from sklearn.metrics import r2_score
from scipy.stats import spearmanr
from monai.metrics import compute_roc_auc, compute_confusion_metric
import torch
def engine(loader: Any, chec... | 44.324675 | 115 | 0.600352 |
ba96767e6eb734e1aa61e83cb1ef25bc5206d044 | 31,785 | py | Python | havsim/simulation/update_lane_routes.py | ronan-keane/hav-sim | 0aaf9674e987822ff2dc90c74613d5e68e8ef0ce | [
"Apache-2.0"
] | null | null | null | havsim/simulation/update_lane_routes.py | ronan-keane/hav-sim | 0aaf9674e987822ff2dc90c74613d5e68e8ef0ce | [
"Apache-2.0"
] | null | null | null | havsim/simulation/update_lane_routes.py | ronan-keane/hav-sim | 0aaf9674e987822ff2dc90c74613d5e68e8ef0ce | [
"Apache-2.0"
] | 2 | 2020-09-30T22:44:37.000Z | 2021-05-09T07:36:28.000Z |
"""
Functions for setting/updating lane events, route events, and code for changing lanes.
"""
from havsim.simulation import vehicle_orders
def update_veh_after_lc(lc_actions, veh, timeind):
"""When a vehicle changes lanes, this function does all the necessary updates.
When a vehicle changes lanes, we need ... | 47.440299 | 110 | 0.652603 |
7da5c3c0c6f091edf50f83a961a11dfe879dabc8 | 3,167 | py | Python | src_2d/preprocessing/compute_ncc_images.py | xzluo97/MvMM-RegNet | c08d5df14b4a9c4a98c66973ff4950aba7f416e4 | [
"MIT"
] | 19 | 2020-07-14T02:23:58.000Z | 2022-03-15T12:22:49.000Z | src_2d/preprocessing/compute_ncc_images.py | xzluo97/MvMM-RegNet | c08d5df14b4a9c4a98c66973ff4950aba7f416e4 | [
"MIT"
] | 4 | 2020-09-25T22:42:40.000Z | 2021-08-25T15:03:29.000Z | src_2d/preprocessing/compute_ncc_images.py | xzluo97/MvMM-RegNet | c08d5df14b4a9c4a98c66973ff4950aba7f416e4 | [
"MIT"
] | 7 | 2020-08-29T15:46:13.000Z | 2021-07-16T01:51:28.000Z | import os
import glob
from PIL import Image
import numpy as np
from scipy import stats
import tensorflow as tf
from core import losses_2d, utils_2d
config = tf.ConfigProto(allow_soft_placement=True)
config.gpu_options.allow_growth = True
def _load_image(name, dtype=np.float32):
img = Image.open(na... | 33.336842 | 108 | 0.620145 |
4d6c0c629071e44db431d638a7cc7e7a92cee1c6 | 665 | py | Python | migration/versions/de2ba0a9b704_add_language.py | floresmatthew/sahasrahbot | a3fcc2aba9cd204331ce612ecf269d8a48a1ebc4 | [
"MIT"
] | null | null | null | migration/versions/de2ba0a9b704_add_language.py | floresmatthew/sahasrahbot | a3fcc2aba9cd204331ce612ecf269d8a48a1ebc4 | [
"MIT"
] | null | null | null | migration/versions/de2ba0a9b704_add_language.py | floresmatthew/sahasrahbot | a3fcc2aba9cd204331ce612ecf269d8a48a1ebc4 | [
"MIT"
] | null | null | null | """add language
Revision ID: de2ba0a9b704
Revises: b71aea760df1
Create Date: 2021-04-25 15:16:50.654227
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'de2ba0a9b704'
down_revision = 'b71aea760df1'
branch_labels = None
depends_on = None
def upgrade():
# #... | 22.931034 | 88 | 0.694737 |
d80b6ebc8d305846de3c746b7a3f83ed4cded0c9 | 862 | py | Python | botoy/decorators/_startswith.py | yuban10703/botoy | 892a170caea08362c22f1d909545a8c7a962ba3b | [
"MIT"
] | 32 | 2020-10-11T15:18:59.000Z | 2021-04-11T10:39:07.000Z | botoy/decorators/_startswith.py | yuban10703/botoy | 892a170caea08362c22f1d909545a8c7a962ba3b | [
"MIT"
] | 17 | 2020-10-12T15:56:19.000Z | 2021-04-03T01:53:05.000Z | botoy/decorators/_startswith.py | yuban10703/botoy | 892a170caea08362c22f1d909545a8c7a962ba3b | [
"MIT"
] | 7 | 2020-10-12T23:55:57.000Z | 2021-04-15T16:14:46.000Z | from ..model import FriendMsg, GroupMsg
from ..parser import friend as fp
from ..parser import group as gp
def startswith(string: str):
"""Content以指定前缀开头 GroupMsg, FriendMsg
:param string: 前缀字符串, 会解析图片消息的Content
"""
def deco(func):
def inner(ctx):
assert isinstance(ctx, (GroupMsg... | 27.806452 | 66 | 0.571926 |
3f184ff0f70ad542a5dc2691c58f7f083cfe5dcd | 1,317 | py | Python | tests/test_designer.py | Kandongwe/RunestoneServer | f555868521b3717beec0ec42dbcbcb443c64686c | [
"MIT"
] | 344 | 2015-10-15T20:03:57.000Z | 2022-03-25T18:37:42.000Z | tests/test_designer.py | Kandongwe/RunestoneServer | f555868521b3717beec0ec42dbcbcb443c64686c | [
"MIT"
] | 1,170 | 2015-10-15T08:17:03.000Z | 2022-03-28T14:32:47.000Z | tests/test_designer.py | Kandongwe/RunestoneServer | f555868521b3717beec0ec42dbcbcb443c64686c | [
"MIT"
] | 278 | 2015-10-12T23:44:38.000Z | 2022-03-19T09:22:47.000Z | def test_build(test_client, test_user_1, runestone_db_tools):
test_user_1.make_instructor()
test_user_1.login()
test_client.validate(
"designer/build",
"build_course_1",
data=dict(
coursetype=test_user_1.course.course_name,
institution="Runestone",
... | 30.627907 | 73 | 0.611997 |
24c2ae1139c62ce7f25e0a97430c14866ff24e75 | 7,383 | py | Python | experiments/segnet.py | xboix/insideness | cf5c349b75eedfc993f91b12f578bfda4bbce989 | [
"MIT"
] | null | null | null | experiments/segnet.py | xboix/insideness | cf5c349b75eedfc993f91b12f578bfda4bbce989 | [
"MIT"
] | null | null | null | experiments/segnet.py | xboix/insideness | cf5c349b75eedfc993f91b12f578bfda4bbce989 | [
"MIT"
] | null | null | null | import numpy as np
import sys
import datasets
import copy
import pickle
class DNN(object):
def __init__(self):
self.name = "MLP1"
self.pretrained = False
self.version = 1
self.layers = 2
self.stride = 2
self.c = 1
self.n_t = 1
class Hyperparameters(object... | 33.107623 | 112 | 0.507924 |
2cd7cd3dcf8305c7ffbd131beffa01ac7eb3c1ae | 19,792 | py | Python | nova/tests/api/openstack/compute/contrib/test_keypairs.py | bopopescu/OpenStack-DNRM-Nova | 7354f378398850113ac93b511547ed05218dc770 | [
"Apache-2.0"
] | null | null | null | nova/tests/api/openstack/compute/contrib/test_keypairs.py | bopopescu/OpenStack-DNRM-Nova | 7354f378398850113ac93b511547ed05218dc770 | [
"Apache-2.0"
] | null | null | null | nova/tests/api/openstack/compute/contrib/test_keypairs.py | bopopescu/OpenStack-DNRM-Nova | 7354f378398850113ac93b511547ed05218dc770 | [
"Apache-2.0"
] | 1 | 2020-07-24T08:49:47.000Z | 2020-07-24T08:49:47.000Z | # Copyright 2011 Eldar Nugaev
# 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 ... | 39.584 | 78 | 0.606811 |
750b2aab527161684fd957da144413d1b0440e9c | 1,703 | py | Python | setup.py | Veritaris/fastapi_contrib | 081670603917b1b7e9646c75fba5614b09823a3e | [
"MIT"
] | null | null | null | setup.py | Veritaris/fastapi_contrib | 081670603917b1b7e9646c75fba5614b09823a3e | [
"MIT"
] | null | null | null | setup.py | Veritaris/fastapi_contrib | 081670603917b1b7e9646c75fba5614b09823a3e | [
"MIT"
] | 1 | 2021-05-16T11:53:14.000Z | 2021-05-16T11:53:14.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open("README.rst") as readme_file:
readme = readme_file.read()
requirements = [
'fastapi>=0.52.0',
'pydantic>=1.4',
'contextvars;python_version<"3.7"'
]
setup_requirements = ["pyte... | 27.467742 | 72 | 0.591897 |
a381cc4ca26403b63436727355c9e20c50657e1d | 3,377 | py | Python | test1/test1/settings.py | StanislavDanilov/interview | 4b113c6415cc8f18c6d0b18d40949032a8ccd8eb | [
"MIT"
] | null | null | null | test1/test1/settings.py | StanislavDanilov/interview | 4b113c6415cc8f18c6d0b18d40949032a8ccd8eb | [
"MIT"
] | null | null | null | test1/test1/settings.py | StanislavDanilov/interview | 4b113c6415cc8f18c6d0b18d40949032a8ccd8eb | [
"MIT"
] | null | null | null | """
Django settings for test1 project.
Generated by 'django-admin startproject' using Django 3.2.5.
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/3.2/ref/settings/
"""
from pathlib i... | 25.778626 | 91 | 0.702102 |
e4374640e1256126daec6d3096fe1c8caf8f5f45 | 2,006 | py | Python | python/phonenumbers/data/region_SG.py | vishnuku/python-phonenumbers | 6ac2cdd06b7ccf709a8efb21629cf2c5f030e627 | [
"Apache-2.0"
] | 3 | 2018-12-02T23:09:00.000Z | 2018-12-02T23:16:59.000Z | python/phonenumbers/data/region_SG.py | carljm/python-phonenumbers | 494044aaf75443dbfd62b8d1352b441af6a458ae | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/data/region_SG.py | carljm/python-phonenumbers | 494044aaf75443dbfd62b8d1352b441af6a458ae | [
"Apache-2.0"
] | null | null | null | """Auto-generated file, do not edit by hand. SG metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_SG = PhoneMetadata(id='SG', country_code=65, international_prefix='0[0-3]\\d',
general_desc=PhoneNumberDesc(national_number_pattern='[36]\\d{7}|[17-9]\\d{7,10}', possi... | 91.181818 | 163 | 0.707876 |
28ac6bf33812c53153481b37f8bd9d729149f302 | 284 | py | Python | apple/apple/pipelines.py | wutienyang/scrapy_redis_example | 5376ae711908ed29cb837f1623239fd1f758ba6f | [
"MIT"
] | 1 | 2018-05-22T09:36:08.000Z | 2018-05-22T09:36:08.000Z | apple/apple/pipelines.py | wutienyang/scrapy_redis_example | 5376ae711908ed29cb837f1623239fd1f758ba6f | [
"MIT"
] | null | null | null | apple/apple/pipelines.py | wutienyang/scrapy_redis_example | 5376ae711908ed29cb837f1623239fd1f758ba6f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
class ApplePipeline(object):
def process_item(self, item, spider):
return item | 25.818182 | 65 | 0.711268 |
8b93aa26ee59445d0fcad7ddd13577ac9cfd4da2 | 4,395 | py | Python | azure-iot-device/samples/async-hub-scenarios/upload_to_blob.py | olivakar/azure-iot-sdk-python | d8f2403030cf94510d381d8d5ac37af6e8d306f8 | [
"MIT"
] | null | null | null | azure-iot-device/samples/async-hub-scenarios/upload_to_blob.py | olivakar/azure-iot-sdk-python | d8f2403030cf94510d381d8d5ac37af6e8d306f8 | [
"MIT"
] | null | null | null | azure-iot-device/samples/async-hub-scenarios/upload_to_blob.py | olivakar/azure-iot-sdk-python | d8f2403030cf94510d381d8d5ac37af6e8d306f8 | [
"MIT"
] | 1 | 2019-12-17T17:50:43.000Z | 2019-12-17T17:50:43.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import os... | 36.02459 | 140 | 0.681911 |
a7054291bc5b201f8fb30f1b6f346aed8d07a279 | 610 | py | Python | faces/models.py | royeis/demos | 59dfcd490a7a2f1f730465d347e1fb169ca2d810 | [
"Apache-2.0"
] | null | null | null | faces/models.py | royeis/demos | 59dfcd490a7a2f1f730465d347e1fb169ca2d810 | [
"Apache-2.0"
] | null | null | null | faces/models.py | royeis/demos | 59dfcd490a7a2f1f730465d347e1fb169ca2d810 | [
"Apache-2.0"
] | null | null | null | from torch import nn
class FeedForwardNeuralNetModel(nn.Module):
def __init__(self, input_dim, hidden_dim, output_dim):
super(FeedForwardNeuralNetModel, self).__init__()
# First(hidden) linear layer
self.linearA = nn.Linear(input_dim, hidden_dim)
# Logistic activation func... | 23.461538 | 58 | 0.616393 |
5b3ee22fcbf7ec204a2e585bc1f45a80e386b20f | 3,434 | py | Python | freeze.py | andrewginns/CycleGAN-Tensorflow-Simple | f0f843a8713823f2198a875b2b7538ea6d3519bd | [
"MIT"
] | null | null | null | freeze.py | andrewginns/CycleGAN-Tensorflow-Simple | f0f843a8713823f2198a875b2b7538ea6d3519bd | [
"MIT"
] | null | null | null | freeze.py | andrewginns/CycleGAN-Tensorflow-Simple | f0f843a8713823f2198a875b2b7538ea6d3519bd | [
"MIT"
] | null | null | null | import os, argparse
import tensorflow as tf
from tensorflow.python.framework import graph_util
dir = os.path.dirname(os.path.realpath(__file__))
# Modified from https://gist.github.com/moodoki/e37a85fb0258b045c005ca3db9cbc7f6
def freeze_graph(model_folder, output_nodes='a2b_generator/output_image',
... | 39.930233 | 93 | 0.631334 |
55a1ee53950d749f842fb73a2a2025aee4297928 | 155 | py | Python | init.py | VisionNetworkProject/tgbot | a61cfa8d1bd3009dfa80983257bfc3ff734b13c0 | [
"MIT"
] | 1 | 2018-06-28T06:49:58.000Z | 2018-06-28T06:49:58.000Z | init.py | VisionNetworkProject/tgbot | a61cfa8d1bd3009dfa80983257bfc3ff734b13c0 | [
"MIT"
] | null | null | null | init.py | VisionNetworkProject/tgbot | a61cfa8d1bd3009dfa80983257bfc3ff734b13c0 | [
"MIT"
] | null | null | null | # coding:utf-8
from vn_db import *
db.connect()
db.create_tables([Member, Chat, Message, Doorbell])
print('Database: initialization complete!')
| 17.222222 | 52 | 0.703226 |
fd07f936acb29d5e740599ecd33a9ba783c36972 | 2,037 | py | Python | Day50/main.py | SSRout/100-days-of-code | 7aafa7789a57bf701b60043fa2bf8fb61b64bfb5 | [
"MIT"
] | null | null | null | Day50/main.py | SSRout/100-days-of-code | 7aafa7789a57bf701b60043fa2bf8fb61b64bfb5 | [
"MIT"
] | null | null | null | Day50/main.py | SSRout/100-days-of-code | 7aafa7789a57bf701b60043fa2bf8fb61b64bfb5 | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import ElementClickInterceptedException, NoSuchElementException
from time import sleep
FB_EMAIL = YOUR FACEBOOK LOGIN EMAIL
FB_PASSWORD = YOUR FACEBOOK PASSWORD
chrome_driver_path = YOUR CHROME DRIVER PATH
d... | 33.95 | 132 | 0.737359 |
2b5711504d8d24e68a622aafe9573face75c148c | 6,306 | py | Python | trafficsignrecognition/correlationfilter/correlationfilter.py | nontas/trafficsignrecognition | dcf0c2657c14098842ee5f9b9a5cf72be8be7d52 | [
"BSD-3-Clause"
] | null | null | null | trafficsignrecognition/correlationfilter/correlationfilter.py | nontas/trafficsignrecognition | dcf0c2657c14098842ee5f9b9a5cf72be8be7d52 | [
"BSD-3-Clause"
] | 1 | 2017-03-25T10:07:28.000Z | 2017-03-28T08:34:41.000Z | trafficsignrecognition/correlationfilter/correlationfilter.py | nontas/trafficsignrecognition | dcf0c2657c14098842ee5f9b9a5cf72be8be7d52 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from numpy.fft import fft2, ifft2, ifftshift
from functools import partial
from scipy.sparse import spdiags, eye as speye
from scipy.sparse.linalg import spsolve
from menpofit.visualize import print_progress
from menpofit.math.fft_utils import pad, crop
def train_mosse(X, y, l=0.01, boundary='symm... | 32.505155 | 78 | 0.618617 |
39b96e80d77fbe9945c622003c0b48f3dd15e838 | 4,161 | py | Python | b2sdk/v1/bucket.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | b2sdk/v1/bucket.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | b2sdk/v1/bucket.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | ######################################################################
#
# File: b2sdk/v1/bucket.py
#
# Copyright 2021 Backblaze Inc. All Rights Reserved.
#
# License https://www.backblaze.com/using_b2_code.html
#
######################################################################
from typing import Optional
from ... | 42.030303 | 197 | 0.66883 |
8e499b8640f5d2741faf8c3f7fefc259427890b3 | 9,657 | py | Python | core/domain/rule_domain.py | aldeka/oppia | aead304c95a282c9ca8035bc25c4794864d07578 | [
"Apache-2.0"
] | 3 | 2015-01-10T23:45:23.000Z | 2015-02-17T10:46:08.000Z | core/domain/rule_domain.py | aldeka/oppia | aead304c95a282c9ca8035bc25c4794864d07578 | [
"Apache-2.0"
] | null | null | null | core/domain/rule_domain.py | aldeka/oppia | aead304c95a282c9ca8035bc25c4794864d07578 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2014 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... | 31.558824 | 79 | 0.641607 |
cb569f7167e32bed64389f83e825f21c8c730c9c | 11,517 | py | Python | Training/ptsemseg/models/td4_psp/resnet.py | Xlinford/TDNet | e7cb59c40b8751b6dab9691d26ad224fd61c24d1 | [
"MIT"
] | null | null | null | Training/ptsemseg/models/td4_psp/resnet.py | Xlinford/TDNet | e7cb59c40b8751b6dab9691d26ad224fd61c24d1 | [
"MIT"
] | null | null | null | Training/ptsemseg/models/td4_psp/resnet.py | Xlinford/TDNet | e7cb59c40b8751b6dab9691d26ad224fd61c24d1 | [
"MIT"
] | null | null | null | """Dilated ResNet"""
import math
import torch
import torch.utils.model_zoo as model_zoo
import torch.nn as nn
from torch.nn import functional as F
from .utils.model_store import get_model_file
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152', 'BasicBlock', 'Bottle... | 36.795527 | 107 | 0.56829 |
94bd5f1d40ad91ce080f836dfd4fa087c0848876 | 1,300 | py | Python | testedpy/intersectionEllipse_new.py | ljm0/RandomEllipse_CrowdingZone | 2c920abb0381cc79e5d3aa09429e37d5c5196832 | [
"BSD-2-Clause"
] | 4 | 2018-11-01T22:49:46.000Z | 2019-01-16T10:12:01.000Z | testedpy/intersectionEllipse_new.py | ljm0/RandomEllipse_CrowdingZone | 2c920abb0381cc79e5d3aa09429e37d5c5196832 | [
"BSD-2-Clause"
] | null | null | null | testedpy/intersectionEllipse_new.py | ljm0/RandomEllipse_CrowdingZone | 2c920abb0381cc79e5d3aa09429e37d5c5196832 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Dec 1 18:06:20 2018
@author: MiaoLi
"""
import numpy as np
from shapely.geometry.polygon import LinearRing
import matplotlib.pyplot as plt
def ellipse_polyline_intersection(ellipses, n=100):
t = np.linspace(0, 2*np.pi, n, endpoint=False)
st = np.sin(t)
ct = np.... | 28.888889 | 70 | 0.612308 |
55e8245d55b3e80f28dd28504b0f7a46a038fb58 | 8,636 | py | Python | applications/welcome/languages/de.py | Querra/piraoke | 9fd067dbcf55dd505c7825a0745c74bdbb5d1231 | [
"BSD-3-Clause"
] | null | null | null | applications/welcome/languages/de.py | Querra/piraoke | 9fd067dbcf55dd505c7825a0745c74bdbb5d1231 | [
"BSD-3-Clause"
] | null | null | null | applications/welcome/languages/de.py | Querra/piraoke | 9fd067dbcf55dd505c7825a0745c74bdbb5d1231 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
{
'!langcode!': 'de',
'!langname!': 'Deutsch (DE)',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '""Update" ist ein optionaler Ausdruck wie "Feld1 = \'newvalue". JOIN Ergebnisse können nicht aktualisiert oder gelöscht werden'... | 41.320574 | 291 | 0.683997 |
ab5a7a9a1d670882b4a4aa397ca34b58c845b340 | 5,889 | py | Python | src/convert_to_rdf.py | MaastrichtU-IDS/neuro_dkg | e61bf2354ce80b1036e0b1631bb4210593177aad | [
"MIT"
] | 1 | 2020-11-27T19:22:34.000Z | 2020-11-27T19:22:34.000Z | src/convert_to_rdf.py | MaastrichtU-IDS/neuro_dkg | e61bf2354ce80b1036e0b1631bb4210593177aad | [
"MIT"
] | null | null | null | src/convert_to_rdf.py | MaastrichtU-IDS/neuro_dkg | e61bf2354ce80b1036e0b1631bb4210593177aad | [
"MIT"
] | 1 | 2020-10-26T20:27:35.000Z | 2020-10-26T20:27:35.000Z | # -*- coding: utf-8 -*-
"""Copy_Convert_NeuroDKG.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1la848FqlwvvxMyW_zvNVfC5MkCFhS1n6
"""
# import for RDF knowledge
from rdflib import Graph, URIRef, Literal, RDF, ConjunctiveGraph
from rdflib import... | 49.075 | 168 | 0.592291 |
eb0e00041caf7a0c89409490c3a5a21c8d9a503c | 5,380 | py | Python | GUI_Adquisicion/ULTRACORTEX_conexion.py | LASER-UD/Open_BCI_and_MYO_UD | f5e9aae94370c9edd7da9a38159bce71241eb043 | [
"MIT"
] | null | null | null | GUI_Adquisicion/ULTRACORTEX_conexion.py | LASER-UD/Open_BCI_and_MYO_UD | f5e9aae94370c9edd7da9a38159bce71241eb043 | [
"MIT"
] | 5 | 2021-06-02T01:50:42.000Z | 2022-03-12T00:29:55.000Z | GUI_Adquisicion/ULTRACORTEX_conexion.py | LASER-UD/Open_BCI_and_MYO_UD | f5e9aae94370c9edd7da9a38159bce71241eb043 | [
"MIT"
] | 3 | 2020-03-20T04:33:38.000Z | 2020-09-29T01:04:40.000Z | import sys
sys.path.append('C:/Python37/Lib/site-packages')
from IPython.display import clear_output
import csv
import os
from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
import random
from pyOpenBCI import OpenBCICyton
import threading
import time
import numpy as np
from scipy import signal
from pyOpenBCI... | 32.606061 | 116 | 0.592379 |
66ec9b78430c361ae979ce109bc97b8a2e5377b5 | 2,744 | py | Python | fedot/core/operations/evaluation/common_preprocessing.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 358 | 2020-06-11T09:34:53.000Z | 2022-03-31T12:56:22.000Z | fedot/core/operations/evaluation/common_preprocessing.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 467 | 2020-06-11T13:49:45.000Z | 2022-03-31T14:19:48.000Z | fedot/core/operations/evaluation/common_preprocessing.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 48 | 2020-07-13T14:50:45.000Z | 2022-03-26T09:37:13.000Z | import warnings
from typing import Optional
from fedot.core.data.data import InputData
from fedot.core.operations.evaluation.evaluation_interfaces import EvaluationStrategy
from fedot.core.operations.evaluation.operation_implementations.data_operations.sklearn_transformations import \
ImputationImplementation, Ker... | 42.215385 | 115 | 0.720845 |
18a1a5ef0fdef7d37d24ea55defadea4385ee924 | 1,312 | py | Python | LimpezaDeArquivosSellout.py | Weslei25/Limpeza_Arquivos | e2476ed0c3f8f03a8c8b5ceb740a09a7b80e7f0d | [
"MIT"
] | null | null | null | LimpezaDeArquivosSellout.py | Weslei25/Limpeza_Arquivos | e2476ed0c3f8f03a8c8b5ceb740a09a7b80e7f0d | [
"MIT"
] | null | null | null | LimpezaDeArquivosSellout.py | Weslei25/Limpeza_Arquivos | e2476ed0c3f8f03a8c8b5ceb740a09a7b80e7f0d | [
"MIT"
] | null | null | null | import time
import schedule
from config import *
from datetime import date
from functions.delete import delete_arquivos
from functions.controle_servico import iniciar_servico, parar_servico
from functions.lerconfs import ler_json
def job():
if __name__ == "__main__":
config = ler_json('config.json... | 32.8 | 150 | 0.621189 |
ea5da562bc7c7f5e6d197c49e522c6d84aee39ee | 18,947 | py | Python | models/resnest.py | Xiaziheng89/Spatial-Location-Constraint-Prototype-Loss-for-Open-Set-Recognition | 47ebf4b844bc2b0ba98761bd47a0bb4b7963e174 | [
"MIT"
] | 5 | 2021-11-09T09:12:19.000Z | 2021-12-11T12:34:30.000Z | models/resnest.py | Xiaziheng89/Spatial-Location-Constraint-Prototype-Loss-for-Open-Set-Recognition | 47ebf4b844bc2b0ba98761bd47a0bb4b7963e174 | [
"MIT"
] | 2 | 2021-12-10T13:12:26.000Z | 2022-01-10T10:10:23.000Z | models/resnest.py | Xiaziheng89/Adversarial-Motorial-Prototype-Framework-for-Open-Set-Recognition | 022b7e5a81360a8b448072999ecf2988b34055cc | [
"MIT"
] | null | null | null | import math
import torch
import torch.nn as nn
from torch.nn import Conv2d, Module, Linear, BatchNorm2d, ReLU
import torch.nn.functional as F
from torch.nn.modules.utils import _pair
__all__ = ['resnest50', 'resnest101', 'resnest200', 'resnest269']
_url_format = 'https://s3.us-west-1.wasabisys.com/resnest/torch/{}-{}... | 41.73348 | 116 | 0.569853 |
dbb83a845af1db140bd2fd71f32018da889bbfa9 | 203 | py | Python | testing.py | tacticalretard0/pylinalg | 8481927eb4e5ec1ed7ca3d2462054b325accd074 | [
"WTFPL"
] | null | null | null | testing.py | tacticalretard0/pylinalg | 8481927eb4e5ec1ed7ca3d2462054b325accd074 | [
"WTFPL"
] | null | null | null | testing.py | tacticalretard0/pylinalg | 8481927eb4e5ec1ed7ca3d2462054b325accd074 | [
"WTFPL"
] | null | null | null | # test file to make sure changes are working
import pylinalg.two as pyla2
import pylinalg.thr as pyla3
chungus = pyla3.Vec3(1, 0, 0)
matungus = pyla3.Mat4.make_rotateZ(90)
print(chungus * matungus)
| 16.916667 | 44 | 0.753695 |
a2681aa520509cb252bf24c1fa93f718f89aa721 | 88,848 | py | Python | Modules/Scripted/ShapeAnalysisToolBox/DataImporter.py | Kitware/Shape-AnaLysis-Toolbox-SALT- | 57a1eca1cc841d73cd1b8c4e2c526ecd8bb55ddf | [
"Apache-2.0"
] | 37 | 2017-03-10T18:59:17.000Z | 2021-12-21T15:52:22.000Z | Modules/Scripted/ShapeAnalysisToolBox/DataImporter.py | Kitware/Shape-AnaLysis-Toolbox-SALT- | 57a1eca1cc841d73cd1b8c4e2c526ecd8bb55ddf | [
"Apache-2.0"
] | 176 | 2017-03-17T20:46:15.000Z | 2022-03-25T15:39:06.000Z | Modules/Scripted/ShapeAnalysisToolBox/DataImporter.py | Kitware/Shape-AnaLysis-Toolbox-SALT- | 57a1eca1cc841d73cd1b8c4e2c526ecd8bb55ddf | [
"Apache-2.0"
] | 20 | 2017-02-21T18:27:48.000Z | 2021-12-21T16:43:19.000Z | import vtk, ctk, qt, slicer
from slicer.ScriptedLoadableModule import (ScriptedLoadableModule,
ScriptedLoadableModuleLogic,
ScriptedLoadableModuleWidget,
ScriptedLoadableModuleTest)
from coll... | 41.343881 | 164 | 0.741075 |
7af7a406c9e4df5c354347027aaebf36eb17e682 | 1,471 | py | Python | pex/vendor/_vendored/setuptools/setuptools/py33compat.py | hbmartin/pex | a4c5d96e16dac892a6d84b02bdb3c0b8e14e9e1b | [
"Apache-2.0"
] | null | null | null | pex/vendor/_vendored/setuptools/setuptools/py33compat.py | hbmartin/pex | a4c5d96e16dac892a6d84b02bdb3c0b8e14e9e1b | [
"Apache-2.0"
] | 1 | 2020-03-02T14:52:32.000Z | 2020-03-02T14:52:32.000Z | pex/vendor/_vendored/setuptools/setuptools/py33compat.py | hbmartin/pex | a4c5d96e16dac892a6d84b02bdb3c0b8e14e9e1b | [
"Apache-2.0"
] | null | null | null | import dis
import array
import collections
try:
import html
except ImportError:
html = None
if "__PEX_UNVENDORED__" in __import__("os").environ:
from setuptools.extern import six # vendor:skip
else:
from pex.third_party.setuptools.extern import six
if "__PEX_UNVENDORED__" in __import__("os").environ:
... | 22.984375 | 76 | 0.604351 |
1750235e93ac5a5eec414a9f7d0bf1b2c14d62db | 5,737 | py | Python | data/utils/sample.py | slowbull/leaf | a2eda2b551fb0db8ddf88ae8c9e60adf965c7e85 | [
"BSD-2-Clause"
] | 1 | 2020-01-03T03:45:14.000Z | 2020-01-03T03:45:14.000Z | data/utils/sample.py | slowbull/leaf | a2eda2b551fb0db8ddf88ae8c9e60adf965c7e85 | [
"BSD-2-Clause"
] | null | null | null | data/utils/sample.py | slowbull/leaf | a2eda2b551fb0db8ddf88ae8c9e60adf965c7e85 | [
"BSD-2-Clause"
] | null | null | null | '''
samples from all raw data;
by default samples in a non-iid manner; namely, randomly selects users from
raw data until their cumulative amount of data exceeds the given number of
datapoints to sample (specified by --fraction argument);
ordering of original data points is not preserved in sampled data
'''
import a... | 31.696133 | 83 | 0.576085 |
64e569584424cd25d27c242c42579806703fa7de | 6,893 | py | Python | scripts/summary.py | DanielKowalczyk1984/GSBPA | 2aa35c3d23ec02bf503738772c93ea5f8bcb339d | [
"MIT"
] | null | null | null | scripts/summary.py | DanielKowalczyk1984/GSBPA | 2aa35c3d23ec02bf503738772c93ea5f8bcb339d | [
"MIT"
] | null | null | null | scripts/summary.py | DanielKowalczyk1984/GSBPA | 2aa35c3d23ec02bf503738772c93ea5f8bcb339d | [
"MIT"
] | null | null | null |
# %%
import re
import pandas as pd
import numpy as np
import os
import sys
from shutil import copy, copyfile
from pathlib import Path
from pandas.core import groupby
from tikzplotlib import save as tikz_save
import matplotlib.pyplot as plt
workdir = Path.cwd().parent
results = workdir.joinpath(Path("./results"))
# ... | 40.786982 | 164 | 0.663717 |
6bd7740e334a6023307f7fdb56f01a7ad1992a01 | 362 | py | Python | src/default_documents/migrations/0033_auto_20160203_1238.py | PhaseDMS/phase | 4f776d0b1b5e7916a3e26aee890b3c2b9454ef0e | [
"MIT"
] | 2 | 2021-09-10T19:40:30.000Z | 2022-01-31T07:15:51.000Z | src/default_documents/migrations/0033_auto_20160203_1238.py | PhaseDMS/phase | 4f776d0b1b5e7916a3e26aee890b3c2b9454ef0e | [
"MIT"
] | null | null | null | src/default_documents/migrations/0033_auto_20160203_1238.py | PhaseDMS/phase | 4f776d0b1b5e7916a3e26aee890b3c2b9454ef0e | [
"MIT"
] | 1 | 2021-09-10T19:40:42.000Z | 2021-09-10T19:40:42.000Z | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('default_documents', '0032_auto_20160203_1238'),
]
operations = [
migrations.RenameField(
model_name='correspondence',
old_name='contract_number',
new_nam... | 21.294118 | 57 | 0.618785 |
30d6634844f68eb209fa5572bc3eb54d8bffb9fc | 7,326 | py | Python | kur/containers/layers/pooling.py | ZacharyJacobCollins/Learning_Kur | ecb28d38437e9162ae465de25a143642ce16d1b6 | [
"Apache-2.0"
] | 1 | 2017-03-30T21:42:33.000Z | 2017-03-30T21:42:33.000Z | kur/containers/layers/pooling.py | ZacharyJacobCollins/Learning_Kur | ecb28d38437e9162ae465de25a143642ce16d1b6 | [
"Apache-2.0"
] | null | null | null | kur/containers/layers/pooling.py | ZacharyJacobCollins/Learning_Kur | ecb28d38437e9162ae465de25a143642ce16d1b6 | [
"Apache-2.0"
] | 1 | 2019-11-05T17:11:27.000Z | 2019-11-05T17:11:27.000Z | """
Copyright 2016 Deepgram
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
distri... | 29.304 | 79 | 0.603877 |
f09e10f806231b6889a17c36cc8a29eeb4d2f761 | 19,827 | py | Python | opendr/test_renderer.py | yukihiko/hrm | 89bfb075d3c9ba91826c0c782ca6aff9507c663b | [
"MIT"
] | 1 | 2019-05-09T07:36:04.000Z | 2019-05-09T07:36:04.000Z | opendr/test_renderer.py | yukihiko/hrm | 89bfb075d3c9ba91826c0c782ca6aff9507c663b | [
"MIT"
] | null | null | null | opendr/test_renderer.py | yukihiko/hrm | 89bfb075d3c9ba91826c0c782ca6aff9507c663b | [
"MIT"
] | null | null | null | # #!/usr/bin/env python
# # encoding: utf-8
# """
# Author(s): Matthew Loper
#
# See LICENCE.txt for licensing and contact information.
# """
#
# import time
# import math
# import unittest
# import numpy as np
# import unittest
# import mathutils
# try:
# import matplotlib.pyplot as plt
# import matplotlib
# e... | 38.424419 | 150 | 0.526151 |
eaf5e756e0c953776bf102676657f2ed5bca449a | 1,534 | py | Python | discord/types/template.py | jeromedontdev/discord.py | 42bab370a73440fa8af2380211ad92ccb6bf7f46 | [
"MIT"
] | 13 | 2020-12-16T06:13:11.000Z | 2021-04-15T12:01:38.000Z | discord/types/template.py | penguenn/discord.py | fb024546ffd12cda771bb58a762b2ebc824f0299 | [
"MIT"
] | 1 | 2021-05-23T16:08:10.000Z | 2021-05-23T16:08:10.000Z | discord/types/template.py | penguenn/discord.py | fb024546ffd12cda771bb58a762b2ebc824f0299 | [
"MIT"
] | 6 | 2020-12-16T00:01:24.000Z | 2021-02-05T12:32:54.000Z | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
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, merg... | 34.088889 | 75 | 0.781617 |
323b7c09b3fbebefb973b8f765645f81383e55a0 | 473 | py | Python | libmysql_utils/libmysql_utils/test.py | FrederichRiver/neutrino3 | c16c6ea824999c012252d0e281473a6ab13fd38e | [
"BSD-3-Clause"
] | 1 | 2021-07-12T11:20:58.000Z | 2021-07-12T11:20:58.000Z | libmysql_utils/libmysql_utils/test.py | FrederichRiver/neutrino3 | c16c6ea824999c012252d0e281473a6ab13fd38e | [
"BSD-3-Clause"
] | null | null | null | libmysql_utils/libmysql_utils/test.py | FrederichRiver/neutrino3 | c16c6ea824999c012252d0e281473a6ab13fd38e | [
"BSD-3-Clause"
] | null | null | null | import unittest
from libmysql_utils.mysql8 import mysqlBase
from libmysql_utils.header import GLOBAL_HEADER, _IP
class TestMysql(unittest.TestCase):
def setUp(self) -> None:
return super().setUp()
def tearDown(self) -> None:
return super().tearDown()
def testConnection(self):
mys... | 20.565217 | 52 | 0.668076 |
21d10d8a453b4c243f8f4f9a60ddd3d8c589c213 | 5,865 | py | Python | freenet/handler/tundev.py | alexliyu/fdslight | d54c718dde3bb8b2ccea1e091fa24c31dad13265 | [
"BSD-2-Clause"
] | null | null | null | freenet/handler/tundev.py | alexliyu/fdslight | d54c718dde3bb8b2ccea1e091fa24c31dad13265 | [
"BSD-2-Clause"
] | null | null | null | freenet/handler/tundev.py | alexliyu/fdslight | d54c718dde3bb8b2ccea1e091fa24c31dad13265 | [
"BSD-2-Clause"
] | 1 | 2019-06-22T23:25:56.000Z | 2019-06-22T23:25:56.000Z | #!/usr/bin/env python3
import pywind.evtframework.excepts as excepts
import os, sys, socket
import pywind.evtframework.handler.handler as handler
import freenet.lib.fn_utils as fn_utils
import pywind.lib.timer as timer
try:
import fcntl
except ImportError:
pass
class tun_base(handler.handler):
__creator... | 25.951327 | 84 | 0.593009 |
e1234eed0976578dc9d65e4bc92208eacb85596f | 2,548 | py | Python | tests/models/validators/v2_1_2/jsd_9480fa1f47ca9254.py | oboehmer/dnacentersdk | 25c4e99900640deee91a56aa886874d9cb0ca960 | [
"MIT"
] | 32 | 2019-09-05T05:16:56.000Z | 2022-03-22T09:50:38.000Z | tests/models/validators/v2_1_2/jsd_9480fa1f47ca9254.py | oboehmer/dnacentersdk | 25c4e99900640deee91a56aa886874d9cb0ca960 | [
"MIT"
] | 35 | 2019-09-07T18:58:54.000Z | 2022-03-24T19:29:36.000Z | tests/models/validators/v2_1_2/jsd_9480fa1f47ca9254.py | oboehmer/dnacentersdk | 25c4e99900640deee91a56aa886874d9cb0ca960 | [
"MIT"
] | 18 | 2019-09-09T11:07:21.000Z | 2022-03-25T08:49:59.000Z | # -*- coding: utf-8 -*-
"""Cisco DNA Center Update Project data model.
Copyright (c) 2019-2021 Cisco Systems.
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 withou... | 31.85 | 78 | 0.598509 |
1c2d60629e50286a1c1d72d99a70b5b0dfbf9049 | 9,690 | py | Python | fastai2/text/learner.py | moritzschwyzer/fastai2 | 3aa40a4e736ffac50b17359a399aef40ac11fcca | [
"Apache-2.0"
] | null | null | null | fastai2/text/learner.py | moritzschwyzer/fastai2 | 3aa40a4e736ffac50b17359a399aef40ac11fcca | [
"Apache-2.0"
] | null | null | null | fastai2/text/learner.py | moritzschwyzer/fastai2 | 3aa40a4e736ffac50b17359a399aef40ac11fcca | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/37_text.learner.ipynb (unless otherwise specified).
__all__ = ['match_embeds', 'load_ignore_keys', 'TextLearner', 'decode_spec_tokens', 'LMLearner',
'language_model_learner', 'text_classifier_learner']
# Cell
from ..basics import *
from .core import *
from .d... | 44.861111 | 123 | 0.642724 |
fedba58fbaab0ade3bd56e2021d6fe63c44e15fe | 6,894 | py | Python | nestimer/nestimer.py | tkhs3/nestimer | c0cb5793cf52e7513dd5dcc1882e6155ceb8d408 | [
"MIT"
] | null | null | null | nestimer/nestimer.py | tkhs3/nestimer | c0cb5793cf52e7513dd5dcc1882e6155ceb8d408 | [
"MIT"
] | null | null | null | nestimer/nestimer.py | tkhs3/nestimer | c0cb5793cf52e7513dd5dcc1882e6155ceb8d408 | [
"MIT"
] | null | null | null | import statistics
import timeit
import re
class timer(object):
dict_duration = {}
path_block_current = ""
flg_suspend = False
def __init__(self,
name,
n_digit=3,
flg_share_path_block=True):
"""record execution time for code block... | 34.643216 | 107 | 0.507543 |
fe59f627c054cd60740ebbe68294e73b2777c721 | 4,653 | py | Python | week8/collaborative_filter.py | Emmayyyyy/dso-560-nlp-and-text-analytics | 76bde7d0ed7e760b5de455251a523e92a10116fd | [
"MIT"
] | 19 | 2019-03-06T02:34:41.000Z | 2021-12-28T23:06:57.000Z | week8/collaborative_filter.py | Emmayyyyy/dso-560-nlp-and-text-analytics | 76bde7d0ed7e760b5de455251a523e92a10116fd | [
"MIT"
] | null | null | null | week8/collaborative_filter.py | Emmayyyyy/dso-560-nlp-and-text-analytics | 76bde7d0ed7e760b5de455251a523e92a10116fd | [
"MIT"
] | 54 | 2020-03-10T06:43:24.000Z | 2022-03-22T22:20:28.000Z | import pandas as pd
from pyspark.mllib.recommendation import ALS, Rating
from pyspark.sql import SparkSession, SQLContext
from sklearn.metrics.pairwise import cosine_similarity
if __name__ == "__main__": # run this by typing "python collaborative_filter.py"
app_name = "collab_filter_example"
# create a Spark ... | 56.743902 | 123 | 0.691382 |
537b3d95a223498fd6b5aee18aec3959bab885be | 807 | py | Python | test/backup_transform_mysqlctld.py | paralin/vitess | 7b048c5442679ce6cf48773cf17a184c1ce91295 | [
"Apache-2.0"
] | 8 | 2017-08-14T15:19:04.000Z | 2021-06-07T10:36:52.000Z | test/backup_transform_mysqlctld.py | paralin/vitess | 7b048c5442679ce6cf48773cf17a184c1ce91295 | [
"Apache-2.0"
] | 19 | 2020-09-25T15:41:41.000Z | 2022-03-25T23:06:54.000Z | test/backup_transform_mysqlctld.py | paralin/vitess | 7b048c5442679ce6cf48773cf17a184c1ce91295 | [
"Apache-2.0"
] | 7 | 2021-03-07T03:24:39.000Z | 2022-02-16T06:46:10.000Z | #!/usr/bin/env python
# Copyright 2019 The Vitess 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 applic... | 31.038462 | 74 | 0.760843 |
515e0b720dc88bf0d4f68ee6b19b10cbc8c9e3af | 635 | py | Python | src/old/main.py | plug-obp/plug-remote-python | 9b57989e3536b34fbbd7d6cafbc674ff6f4686eb | [
"MIT"
] | null | null | null | src/old/main.py | plug-obp/plug-remote-python | 9b57989e3536b34fbbd7d6cafbc674ff6f4686eb | [
"MIT"
] | null | null | null | src/old/main.py | plug-obp/plug-remote-python | 9b57989e3536b34fbbd7d6cafbc674ff6f4686eb | [
"MIT"
] | 1 | 2020-01-28T13:44:52.000Z | 2020-01-28T13:44:52.000Z | "Imports"
import sys
import getopt
from old import remote
def main(argv, model):
"Main function for remote"
## Read arguments
port = "1238"
try:
opts, _ = getopt.getopt(argv, "hp:", ["port="])
except getopt.GetoptError:
print ( 'remote.py -p port' )
sys.exit(2)
for o... | 19.84375 | 55 | 0.488189 |
b49a95fb3ea53d62f96febe3ce242b422118e3fb | 9,486 | py | Python | ckan/lib/jobs.py | singularita/ckan | 81d9e44b71f9ed6ec607cb0eb966265a2c524b90 | [
"Apache-2.0"
] | 1 | 2018-01-09T18:34:13.000Z | 2018-01-09T18:34:13.000Z | ckan/lib/jobs.py | singularita/ckan | 81d9e44b71f9ed6ec607cb0eb966265a2c524b90 | [
"Apache-2.0"
] | 4 | 2018-07-25T07:09:35.000Z | 2019-01-23T07:21:23.000Z | ckan/lib/jobs.py | Pilchards/ckan | 729480f82345df1e2d753c94c5e0541a2aff9bd8 | [
"Apache-2.0"
] | 1 | 2017-11-03T14:55:25.000Z | 2017-11-03T14:55:25.000Z | #!/usr/bin/env python
# encoding: utf-8
u'''
Asynchronous background jobs.
Note that most job management functions are not available from this
module but via the various ``job_*`` API functions.
Internally, RQ queue names are prefixed with a string containing the
CKAN site ID to avoid key collisions when the same Re... | 31.832215 | 78 | 0.652751 |
40d05e713c173906fd9e5ba96a9335042741b960 | 18,115 | py | Python | src/backend/utils/terraform.py | ddddhm1/LuWu | f9feaf10a6aca0dd31f250741a1c542ee5256633 | [
"Apache-2.0"
] | 658 | 2019-04-29T02:46:02.000Z | 2022-03-30T03:58:42.000Z | src/backend/utils/terraform.py | ddddhm1/LuWu | f9feaf10a6aca0dd31f250741a1c542ee5256633 | [
"Apache-2.0"
] | 9 | 2020-06-04T13:38:58.000Z | 2022-02-27T21:23:29.000Z | src/backend/utils/terraform.py | ddddhm1/LuWu | f9feaf10a6aca0dd31f250741a1c542ee5256633 | [
"Apache-2.0"
] | 130 | 2019-05-02T23:42:58.000Z | 2022-03-24T04:35:37.000Z | import base64
import contextlib
import logging
import time
from tempfile import NamedTemporaryFile
from tempfile import TemporaryDirectory
from typing import List
from python_terraform import IsFlagged
from python_terraform import Terraform as TF
from terrascript import Data
from terrascript import Output
from terrasc... | 32.996357 | 93 | 0.606238 |
172ec2af796e9f2949b68d10d19c929f4f97c96e | 12,519 | py | Python | var/spack/repos/builtin/packages/octave/package.py | mtmiller/spack | c97c135f1dbe24955048fcc4f0f98281ef0c9300 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-10-04T20:05:45.000Z | 2021-10-04T20:05:45.000Z | var/spack/repos/builtin/packages/octave/package.py | mtmiller/spack | c97c135f1dbe24955048fcc4f0f98281ef0c9300 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2021-05-12T05:53:01.000Z | 2022-03-18T17:30:25.000Z | var/spack/repos/builtin/packages/octave/package.py | mtmiller/spack | c97c135f1dbe24955048fcc4f0f98281ef0c9300 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-11-06T06:38:51.000Z | 2020-10-27T07:45:01.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import re
import shutil
import sys
import tempfile
import spack.util.environment
class Octave(AutotoolsPa... | 40.383871 | 95 | 0.584951 |
c4e3d3d92d51b048d206c0c8409af00ab8856070 | 33,881 | py | Python | rasa/core/agent.py | wtoalabi/rasa | 1106845b5628dc1f739a09f75270926b572af918 | [
"Apache-2.0"
] | null | null | null | rasa/core/agent.py | wtoalabi/rasa | 1106845b5628dc1f739a09f75270926b572af918 | [
"Apache-2.0"
] | 2 | 2020-04-17T19:46:20.000Z | 2020-04-17T20:06:06.000Z | rasa/core/agent.py | wtoalabi/rasa | 1106845b5628dc1f739a09f75270926b572af918 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import shutil
import tempfile
import uuid
from asyncio import CancelledError
from typing import Any, Callable, Dict, List, Optional, Text, Tuple, Union
import aiohttp
from sanic import Sanic
import rasa
import rasa.utils.io
import rasa.core.utils
from rasa.constants import (
DEFAULT_DOMAI... | 36.431183 | 88 | 0.624008 |
ebf981e21e3aa8af4659473e806c4b779f938b17 | 2,572 | py | Python | tests/test_export_convert_to_jpeg.py | garz75/osxphotos | 8cedef447ee8cf8419ae3cbdfc197b2dbab5186a | [
"MIT"
] | null | null | null | tests/test_export_convert_to_jpeg.py | garz75/osxphotos | 8cedef447ee8cf8419ae3cbdfc197b2dbab5186a | [
"MIT"
] | null | null | null | tests/test_export_convert_to_jpeg.py | garz75/osxphotos | 8cedef447ee8cf8419ae3cbdfc197b2dbab5186a | [
"MIT"
] | null | null | null | import os
import pytest
from osxphotos._constants import _UNKNOWN_PERSON
skip_test = "OSXPHOTOS_TEST_CONVERT" not in os.environ
pytestmark = pytest.mark.skipif(
skip_test, reason="Skip if running on GitHub actions, no GPU."
)
PHOTOS_DB = "tests/Test-10.15.6.photoslibrary"
UUID_DICT = {
"raw": "D05A5FE3-15FB... | 25.979798 | 73 | 0.71423 |
1480562a98949cac914cb4867bcd52accffa64df | 17,976 | py | Python | utils/neural_net_testing.py | qarchli/Multi-Layer-Neural-Network | f8f14f90ec90644c89f0e291c9a41e4d2fec7850 | [
"MIT"
] | null | null | null | utils/neural_net_testing.py | qarchli/Multi-Layer-Neural-Network | f8f14f90ec90644c89f0e291c9a41e4d2fec7850 | [
"MIT"
] | null | null | null | utils/neural_net_testing.py | qarchli/Multi-Layer-Neural-Network | f8f14f90ec90644c89f0e291c9a41e4d2fec7850 | [
"MIT"
] | 1 | 2021-11-14T16:37:53.000Z | 2021-11-14T16:37:53.000Z | import numpy as np
import activation_functions
import performance
import init_methods
import debug_utils
class MLNN:
def __init__(self, layers_dims, init_method, activations, lambd, keep_prob, learning_rate, num_iterations):
"""
Initializes a Muli-Layer Neural Network.
---
Argumen... | 38.410256 | 127 | 0.544949 |
fd4179ec25a4cec13f729c1f71ef46e207b2dd2c | 2,817 | py | Python | tests/test_modules/test_pmac/test_rawmotorcspart.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_pmac/test_rawmotorcspart.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_pmac/test_rawmotorcspart.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | import unittest
from mock import patch
from malcolm.core import Process, AlarmSeverity
from malcolm.modules.builtin.controllers import StatefulController
from malcolm.modules.pmac.parts import RawMotorCSPart
class castr(str):
ok = True
severity = 0
class caenum(int):
ok = True
severity = 0
enum... | 31.3 | 70 | 0.604189 |
e8b1d5ffd3cecab7f1dc3b8ff06c8af55ea4639b | 382 | py | Python | homedisplay/info_ext_pages/models.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 1 | 2016-11-28T04:35:06.000Z | 2016-11-28T04:35:06.000Z | homedisplay/info_ext_pages/models.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 160 | 2015-01-01T20:59:29.000Z | 2016-04-25T13:36:52.000Z | homedisplay/info_ext_pages/models.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 1 | 2015-02-25T21:24:01.000Z | 2015-02-25T21:24:01.000Z | from django.db import models
class ExtPage(models.Model):
timestamp = models.DateTimeField(auto_now_add=True)
url = models.CharField(max_length=1024)
def __unicode__(self):
return u"%s" % self.url
class Meta:
ordering = ("timestamp", )
verbose_name = "Osoite"
verbose_... | 23.875 | 55 | 0.65445 |
26c34d0677c8017cc322f8c6e46efd6ef198b6ef | 1,518 | py | Python | src/shinymud/models/script.py | shinymud/ShinyMUD | 3f659d8be4468c9a8745b8797f5f96c2bc86533c | [
"MIT"
] | 35 | 2015-01-06T12:01:38.000Z | 2022-01-22T13:57:26.000Z | src/shinymud/models/script.py | shinymud/ShinyMUD | 3f659d8be4468c9a8745b8797f5f96c2bc86533c | [
"MIT"
] | 1 | 2021-06-24T13:21:16.000Z | 2021-07-06T18:46:06.000Z | src/shinymud/models/script.py | shinymud/ShinyMUD | 3f659d8be4468c9a8745b8797f5f96c2bc86533c | [
"MIT"
] | 8 | 2015-02-04T16:30:52.000Z | 2021-02-03T15:02:38.000Z | from shinymud.modes.text_edit_mode import TextEditMode
from shinymud.models import Model, Column, model_list
from shinymud.models.shiny_types import *
import re
class Script(Model):
"""A model that represents an in-game script object."""
db_table_name = 'script'
db_columns = Model.db_columns + [
... | 36.142857 | 79 | 0.582345 |
df5220252fb45fbdb498a7804ea26cee7b89f833 | 21,885 | py | Python | nilearn/datasets/struct.py | ariekahn/nilearn | baa77b18ecee7c4507579214af59d715cc9292f9 | [
"BSD-2-Clause"
] | 1 | 2020-04-01T21:56:17.000Z | 2020-04-01T21:56:17.000Z | nilearn/datasets/struct.py | ariekahn/nilearn | baa77b18ecee7c4507579214af59d715cc9292f9 | [
"BSD-2-Clause"
] | 1 | 2019-04-17T15:23:42.000Z | 2019-04-17T19:59:16.000Z | nilearn/datasets/struct.py | ariekahn/nilearn | baa77b18ecee7c4507579214af59d715cc9292f9 | [
"BSD-2-Clause"
] | 1 | 2017-03-06T05:14:46.000Z | 2017-03-06T05:14:46.000Z | """
Downloading NeuroImaging datasets: structural datasets
"""
import warnings
import os
import numpy as np
from scipy import ndimage
from sklearn.utils import Bunch
from .utils import (_get_dataset_dir, _fetch_files,
_get_dataset_descr, _uncompress_file)
from .._utils import check_niimg, niimg
fr... | 38.52993 | 85 | 0.64775 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.