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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6b70272511fc344cf089622587b2441714b3dadb | 15,262 | py | Python | train_stylegan2.py | HappyBelief/ContraD | abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f | [
"MIT"
] | null | null | null | train_stylegan2.py | HappyBelief/ContraD | abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f | [
"MIT"
] | null | null | null | train_stylegan2.py | HappyBelief/ContraD | abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f | [
"MIT"
] | null | null | null | from argparse import ArgumentParser
from pathlib import Path
import shutil
import imageio
def silence_imageio_warning(*args, **kwargs):
pass
imageio.core.util._precision_warn = silence_imageio_warning
import gin
import numpy as np
import torch
import torch.nn as nn
from torch import autograd
import torch.optim as... | 40.590426 | 118 | 0.615974 |
9e7dd87af3fd969e05b2e7a687d1d018b68a06e4 | 6,995 | py | Python | dopamine/discrete_domains/checkpointer.py | csherstan/dopamine | 76cdae1f858233a8501e2b61095cde54c6f8a214 | [
"Apache-2.0"
] | 2 | 2019-02-17T18:37:58.000Z | 2019-05-06T18:57:13.000Z | dopamine/discrete_domains/checkpointer.py | csherstan/dopamine | 76cdae1f858233a8501e2b61095cde54c6f8a214 | [
"Apache-2.0"
] | null | null | null | dopamine/discrete_domains/checkpointer.py | csherstan/dopamine | 76cdae1f858233a8501e2b61095cde54c6f8a214 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Dopamine 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... | 37.607527 | 80 | 0.716655 |
e418f2430847c8b9357a8811829032b2bcd8f489 | 226 | py | Python | one.py | PythonTriCities/Sep2018SecondTues | 72b4bfc0314a875d966deea6129924c68cc7205a | [
"MIT"
] | null | null | null | one.py | PythonTriCities/Sep2018SecondTues | 72b4bfc0314a875d966deea6129924c68cc7205a | [
"MIT"
] | null | null | null | one.py | PythonTriCities/Sep2018SecondTues | 72b4bfc0314a875d966deea6129924c68cc7205a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
alist = ['first', 'dog', 'word', 'Person']
adict = {'key1': 'Value1', 'key2': 'Value2'}
print(alist)
alist.sort()
print(alist)
print(len(alist))
print(adict)
dictlength = len(adict)
print(dictlength)
| 16.142857 | 44 | 0.659292 |
8e9e77d056b32bd3aa603eb1abf51669c5161a5c | 1,397 | py | Python | setup.py | ppsirg/python-async-console | e19c398a4c98c632a2e8164ff99bd50aeddf82f3 | [
"MIT"
] | 1 | 2019-05-14T16:49:02.000Z | 2019-05-14T16:49:02.000Z | setup.py | ppsirg/python-async-console | e19c398a4c98c632a2e8164ff99bd50aeddf82f3 | [
"MIT"
] | null | null | null | setup.py | ppsirg/python-async-console | e19c398a4c98c632a2e8164ff99bd50aeddf82f3 | [
"MIT"
] | null | null | null | #!/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()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'pygobject==3.20.0',
'gbulb=... | 27.392157 | 57 | 0.648533 |
69dbcc3b57ba6d5ee5cf9cbd3be7a36a40fe2197 | 5,281 | py | Python | python/datamigration.py | flexifyio/flexify-api-sample | 6cb257fd7c5d74e9d500564fe84e74152632a748 | [
"MIT"
] | 2 | 2018-06-19T08:03:25.000Z | 2018-06-20T12:54:07.000Z | python/datamigration.py | flexifyio/flexify-api-sample | 6cb257fd7c5d74e9d500564fe84e74152632a748 | [
"MIT"
] | null | null | null | python/datamigration.py | flexifyio/flexify-api-sample | 6cb257fd7c5d74e9d500564fe84e74152632a748 | [
"MIT"
] | 1 | 2020-08-01T19:12:01.000Z | 2020-08-01T19:12:01.000Z | from __future__ import print_function
import flexify_api
import time
import json
from flexify_api import ApiClient, StorageAccountsControllerApi, MigrationsControllerApi, \
AddStorageAccountRequest, NewStorageAccount, StorageAccountSettingsReq, \
AddMigrationRequest, AddMigrationRequestMapping, MigrationSettin... | 35.206667 | 91 | 0.658209 |
ee64ab5b4d07361c5e7635e484d2194c6eccfe97 | 217 | py | Python | pipeline/0x00-pandas/10-index.py | Naouali/holbertonschool-machine_learning | 60b7d50cd385bdf9c1372b6004308eec408d2670 | [
"MIT"
] | null | null | null | pipeline/0x00-pandas/10-index.py | Naouali/holbertonschool-machine_learning | 60b7d50cd385bdf9c1372b6004308eec408d2670 | [
"MIT"
] | null | null | null | pipeline/0x00-pandas/10-index.py | Naouali/holbertonschool-machine_learning | 60b7d50cd385bdf9c1372b6004308eec408d2670 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import pandas as pd
from_file = __import__('2-from_file').from_file
df = from_file('coinbaseUSD_1-min_data_2014-12-01_to_2019-01-09.csv', ',')
df = df.set_index('Timestamp')
print(df.tail()) | 21.7 | 74 | 0.732719 |
abb039df35d9f63de4a2653140c4aacb8d84b0b9 | 1,045 | py | Python | test/test_parse_file_guess_format.py | tonyfast/rdflib | e4fe0fdbd4de7e1183418f302315b51a14602e03 | [
"BSD-3-Clause"
] | 2 | 2021-02-06T17:36:05.000Z | 2021-04-21T07:33:39.000Z | test/test_parse_file_guess_format.py | pragya16067/rdflib | 6b5bd37ccc67bdec62d2e36d174eb7933b5020b2 | [
"BSD-3-Clause"
] | null | null | null | test/test_parse_file_guess_format.py | pragya16067/rdflib | 6b5bd37ccc67bdec62d2e36d174eb7933b5020b2 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from pathlib import Path
from shutil import copyfile
from tempfile import TemporaryDirectory
from xml.sax import SAXParseException
from rdflib import Graph, logger as graph_logger
class FileParserGuessFormatTest(unittest.TestCase):
def test_ttl(self):
g = Graph()
self.assertIsIns... | 31.666667 | 90 | 0.676555 |
a90f64fc654ec771dcf3cdc8602c13dd6b7c38d0 | 15,005 | py | Python | build.py | matteobertozzi/GDEngine | 73bc923b628ad465b8ab7319edb0306ba8f172c5 | [
"BSD-3-Clause"
] | 2 | 2016-09-04T19:57:35.000Z | 2016-12-06T14:31:35.000Z | build.py | matteobertozzi/GDEngine | 73bc923b628ad465b8ab7319edb0306ba8f172c5 | [
"BSD-3-Clause"
] | null | null | null | build.py | matteobertozzi/GDEngine | 73bc923b628ad465b8ab7319edb0306ba8f172c5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import commands
import string
import sys
import os
def execCommand(cmd):
return commands.getstatusoutput(cmd)
def writeFile(filename, content):
fd = open(filename, 'w')
fd.write(content)
fd.close()
def platformIsMac():
return os.uname()[0] == 'Darwin'... | 33.719101 | 93 | 0.536355 |
e30bdba2e74be693b6fa0a5f742d6bc3275ee568 | 13,474 | py | Python | martools/marttools.py | jack1142/predacogs | 61311651a9ea89cb1ea496a1414f656a05c831bd | [
"MIT"
] | null | null | null | martools/marttools.py | jack1142/predacogs | 61311651a9ea89cb1ea496a1414f656a05c831bd | [
"MIT"
] | null | null | null | martools/marttools.py | jack1142/predacogs | 61311651a9ea89cb1ea496a1414f656a05c831bd | [
"MIT"
] | null | null | null | import discord
import lavalink
from redbot.core import bank, commands, checks
from redbot.core.i18n import Translator, cog_i18n
from redbot.core.utils.chat_formatting import bold, humanize_timedelta
# from redbot.cogs.audio.localtracks import Query <- Will be probably changed
from datetime import datetime
_ = Trans... | 41.458462 | 98 | 0.541784 |
ef3e8914ad4faf0a893ebd4dd42e75298af2f803 | 1,359 | py | Python | bigfastapi/models/customer_models.py | Smyja/bigfastapi | b05beede7bb8e853ce0494b495379037ccf27e8d | [
"MIT"
] | null | null | null | bigfastapi/models/customer_models.py | Smyja/bigfastapi | b05beede7bb8e853ce0494b495379037ccf27e8d | [
"MIT"
] | null | null | null | bigfastapi/models/customer_models.py | Smyja/bigfastapi | b05beede7bb8e853ce0494b495379037ccf27e8d | [
"MIT"
] | null | null | null | from sqlalchemy.types import String, DateTime, Text, Integer
from sqlalchemy import ForeignKey
import bigfastapi.db.database as database
from uuid import uuid4
from sqlalchemy.schema import Column
import datetime as dt
from bigfastapi.utils.utils import generate_short_id
class Customer(database.Base):
__tablenam... | 46.862069 | 85 | 0.727005 |
45042e7da84ca3b940e65f4e61ef32feae432273 | 3,401 | py | Python | supervisor/hardware/policy.py | pnjongang/supervisor | 2a006ae76de4b06e3e291b37aa2a4e14dc272445 | [
"Apache-2.0"
] | 597 | 2017-04-27T15:10:08.000Z | 2019-12-18T16:02:57.000Z | supervisor/hardware/policy.py | pnjongang/supervisor | 2a006ae76de4b06e3e291b37aa2a4e14dc272445 | [
"Apache-2.0"
] | 1,056 | 2020-01-30T09:59:44.000Z | 2022-03-31T10:15:32.000Z | supervisor/hardware/policy.py | pnjongang/supervisor | 2a006ae76de4b06e3e291b37aa2a4e14dc272445 | [
"Apache-2.0"
] | 295 | 2020-02-03T11:30:42.000Z | 2022-03-31T18:53:14.000Z | """Policy / cgroups management of local host."""
import logging
from ..coresys import CoreSys, CoreSysAttributes
from .const import PolicyGroup, UdevSubsystem
from .data import Device
_LOGGER: logging.Logger = logging.getLogger(__name__)
# fmt: off
# https://www.kernel.org/doc/Documentation/admin-guide/devices.txt
... | 29.068376 | 76 | 0.602764 |
83271322e595c769e17ae17c527bf61de2188bce | 41 | py | Python | job/__init__.py | calumlim/talentalps | cc66eabf71e04b6ab5831ee15f57e771cba82279 | [
"FSFAP"
] | 2 | 2019-11-28T02:42:25.000Z | 2020-03-05T01:13:40.000Z | job/__init__.py | mingyuchoo/myartworks | 9404dad4b9ee0047049a1a0196cb9ac32ce520d7 | [
"MIT"
] | 22 | 2019-12-04T23:41:12.000Z | 2022-03-02T14:58:20.000Z | job/__init__.py | mingyuchoo/myartworks | 9404dad4b9ee0047049a1a0196cb9ac32ce520d7 | [
"MIT"
] | 1 | 2020-04-13T12:37:37.000Z | 2020-04-13T12:37:37.000Z | default_app_config = 'job.apps.JobConfig' | 41 | 41 | 0.829268 |
612922649f595de30a81a359b7853a4957660e79 | 22,291 | py | Python | auth/auth/driver/driver.py | jkgoodrich/hail | 95ce1d792b553a5e97b390d349237a7ed86fbf98 | [
"MIT"
] | null | null | null | auth/auth/driver/driver.py | jkgoodrich/hail | 95ce1d792b553a5e97b390d349237a7ed86fbf98 | [
"MIT"
] | null | null | null | auth/auth/driver/driver.py | jkgoodrich/hail | 95ce1d792b553a5e97b390d349237a7ed86fbf98 | [
"MIT"
] | null | null | null | import asyncio
import base64
import json
import logging
import os
import random
import secrets
from typing import Optional
import aiohttp
import kubernetes_asyncio.client
import kubernetes_asyncio.client.rest
import kubernetes_asyncio.config
from gear import Database, create_session
from gear.clients import get_ident... | 33.46997 | 116 | 0.626935 |
19461038095b810cbf1c537e521f422ed342d517 | 3,084 | py | Python | tests/intersim/envs/test_intersim.py | sisl/InteractionSimulator | a4f68349eb7fa55ed5855a94bb97d8242869149d | [
"MIT"
] | 3 | 2021-07-13T07:28:34.000Z | 2021-07-29T12:37:20.000Z | tests/intersim/envs/test_intersim.py | sisl/InteractionSimulator | a4f68349eb7fa55ed5855a94bb97d8242869149d | [
"MIT"
] | 6 | 2021-08-30T15:51:19.000Z | 2022-02-21T12:39:08.000Z | tests/intersim/envs/test_intersim.py | sisl/InteractionSimulator | a4f68349eb7fa55ed5855a94bb97d8242869149d | [
"MIT"
] | 1 | 2021-08-29T20:28:54.000Z | 2021-08-29T20:28:54.000Z | import gym
import numpy as np
def test_nv():
env = gym.make('intersim:intersim-v0')
action_space_nv, _ = env.action_space.shape
_, simstate_nv, _ = env._svt.simstate.shape
assert env._nv == env._svt.nv
assert action_space_nv == env._nv
assert simstate_nv == env._nv
def test_T():
env = gym.... | 32.125 | 147 | 0.595331 |
f968852dd5901673e6b4c1686f84a19ff81cd997 | 61,664 | py | Python | src/sentry/south_migrations/0220_auto__del_field_fileblob_storage_options__del_field_fileblob_storage__.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 1 | 2022-02-09T22:56:49.000Z | 2022-02-09T22:56:49.000Z | src/sentry/south_migrations/0220_auto__del_field_fileblob_storage_options__del_field_fileblob_storage__.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 6 | 2018-10-19T10:04:23.000Z | 2019-12-09T20:29:12.000Z | src/sentry/south_migrations/0220_auto__del_field_fileblob_storage_options__del_field_fileblob_storage__.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 2 | 2021-01-26T09:53:39.000Z | 2022-03-22T09:01:47.000Z | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'FileBlob.storage_options'
db.delete_column(u'sentry_file... | 36.209043 | 98 | 0.395401 |
700f7a1e7fc1c08567a5e29b71be55a87f521dc5 | 3,549 | py | Python | ardublocklyserver/local-packages/waitress/compat.py | wired2000000/ardublockly | d574b45523c3061b6d38513f46be8234814dda65 | [
"Apache-2.0"
] | 424 | 2015-03-08T03:36:26.000Z | 2022-03-18T15:18:01.000Z | ardublocklyserver/local-packages/waitress/compat.py | wired2000000/ardublockly | d574b45523c3061b6d38513f46be8234814dda65 | [
"Apache-2.0"
] | 235 | 2015-01-01T23:51:19.000Z | 2022-01-14T21:19:44.000Z | ardublocklyserver/local-packages/waitress/compat.py | wired2000000/ardublockly | d574b45523c3061b6d38513f46be8234814dda65 | [
"Apache-2.0"
] | 296 | 2015-05-13T15:03:32.000Z | 2022-03-22T20:51:25.000Z | import sys
import types
import platform
import warnings
try:
import urlparse
except ImportError: # pragma: no cover
from urllib import parse as urlparse
# True if we are running on Python 3.
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
# True if we are running on Windows
WIN = platform.syste... | 25.170213 | 88 | 0.633136 |
ea1f2405eec7f79f898a5846ce89f3e538a0378d | 12,677 | py | Python | env/lib/python3.8/site-packages/pandas/io/json/_normalize.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | env/lib/python3.8/site-packages/pandas/io/json/_normalize.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | env/lib/python3.8/site-packages/pandas/io/json/_normalize.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | # ---------------------------------------------------------------------
# JSON normalization routines
from collections import defaultdict
import copy
from typing import Any, DefaultDict, Dict, Iterable, List, Optional, Union
import numpy as np
from pandas._libs.writers import convert_json_to_lines
from pandas._typin... | 34.826923 | 86 | 0.514081 |
b5c1dc850a140d023ed0f2daebfb9977af6168b6 | 2,924 | py | Python | src/read_data.py | siphlord/pybioclim | 5a873a1a62fc06428a0e29687b29dc3288dfd024 | [
"MIT"
] | null | null | null | src/read_data.py | siphlord/pybioclim | 5a873a1a62fc06428a0e29687b29dc3288dfd024 | [
"MIT"
] | null | null | null | src/read_data.py | siphlord/pybioclim | 5a873a1a62fc06428a0e29687b29dc3288dfd024 | [
"MIT"
] | null | null | null | '''
>>> variable_names['bio1.bil']
'annual mean temperature'
'''
import os
import gdal
from .config import DATA_PATHS, find_data
variable_names = {}
metadata = {}
def filename(name):
if not name.endswith('.bil'): name += '.bil'
return name
def read_header(name, dataset=None):
name = filename(name)
... | 28.38835 | 92 | 0.568057 |
28a4f9f21ca34136781b0085e1084cfb516e849b | 42,975 | py | Python | tests/app/main/helpers/test_frameworks.py | Crown-Commercial-Service/digitalmarketplace-supplier-frontend | f467a511d5b60ef64b88f10f56978c9426089c19 | [
"MIT"
] | 7 | 2015-11-21T20:43:37.000Z | 2020-07-22T13:20:18.000Z | tests/app/main/helpers/test_frameworks.py | alphagov/digitalmarketplace-supplier-frontend | de13b34f7c049bddf53a2e8770b45d8742982437 | [
"MIT"
] | 783 | 2015-04-07T16:34:57.000Z | 2021-07-27T12:13:02.000Z | tests/app/main/helpers/test_frameworks.py | alphagov/digitalmarketplace-supplier-frontend | de13b34f7c049bddf53a2e8770b45d8742982437 | [
"MIT"
] | 20 | 2015-06-13T15:37:23.000Z | 2021-04-10T18:02:09.000Z | # -*- coding: utf-8 -*-
"""Test for app/main/helpers/frameworks.py"""
import inspect
import mock
import pytest
from lxml import html
from werkzeug.exceptions import HTTPException
from dmtestutils.api_model_stubs import FrameworkStub, SupplierFrameworkStub
from dmapiclient import DataAPIClient, HTTPError
from dmconten... | 43.018018 | 120 | 0.585736 |
8cacecf24ad73cea8b28f3de833d97926b2d38c5 | 43,929 | py | Python | fbpmp/private_lift/test/service/test_privatelift.py | benliugithub/fbpcs | 7af984264428058645847135026d474d7e28144e | [
"MIT"
] | null | null | null | fbpmp/private_lift/test/service/test_privatelift.py | benliugithub/fbpcs | 7af984264428058645847135026d474d7e28144e | [
"MIT"
] | null | null | null | fbpmp/private_lift/test/service/test_privatelift.py | benliugithub/fbpcs | 7af984264428058645847135026d474d7e28144e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import unittest
from collections import defaultdict
from unittest.mock import MagicMock, call, patch
from fbpcp.entity... | 40.044667 | 515 | 0.653008 |
0bd43145c88940022de1cdc045b76365004581aa | 18,221 | py | Python | sdk/python/pulumi_google_native/pubsub/v1beta2/outputs.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 44 | 2021-04-18T23:00:48.000Z | 2022-02-14T17:43:15.000Z | sdk/python/pulumi_google_native/pubsub/v1beta2/outputs.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 354 | 2021-04-16T16:48:39.000Z | 2022-03-31T17:16:39.000Z | sdk/python/pulumi_google_native/pubsub/v1beta2/outputs.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 8 | 2021-04-24T17:46:51.000Z | 2022-01-05T10:40:21.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, overload
from ... import _utilities
fro... | 78.878788 | 1,947 | 0.720872 |
e3f1e37d0bab20289fd1c5535be12feddf1c778d | 11,118 | py | Python | plugins/text.py | MRK-YT/MT-Instagram-Bot | b28c8ea1ecbbf390de23569c022228d087293599 | [
"MIT"
] | 1 | 2021-08-07T17:40:31.000Z | 2021-08-07T17:40:31.000Z | plugins/text.py | MRK-YT/MT-Instagram-Bot | b28c8ea1ecbbf390de23569c022228d087293599 | [
"MIT"
] | null | null | null | plugins/text.py | MRK-YT/MT-Instagram-Bot | b28c8ea1ecbbf390de23569c022228d087293599 | [
"MIT"
] | 3 | 2021-08-21T17:49:27.000Z | 2022-01-27T09:54:41.000Z | #MIT License
#Copyright (c) 2021 subinps
#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, dis... | 43.2607 | 458 | 0.558734 |
866635f4a7e69d275b3498e268dc9b7dcd1595f0 | 5,410 | py | Python | build/python-env/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py | rfraposa/hadoopbeat | 884c0f8e0f2027cb4aa180d8f419f05b4d890e85 | [
"Apache-2.0"
] | null | null | null | build/python-env/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py | rfraposa/hadoopbeat | 884c0f8e0f2027cb4aa180d8f419f05b4d890e85 | [
"Apache-2.0"
] | null | null | null | build/python-env/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py | rfraposa/hadoopbeat | 884c0f8e0f2027cb4aa180d8f419f05b4d890e85 | [
"Apache-2.0"
] | null | null | null | import time
import urllib3
from urllib3.exceptions import ReadTimeoutError, SSLError as UrllibSSLError
import warnings
from .base import Connection
from ..exceptions import ConnectionError, ImproperlyConfigured, ConnectionTimeout, SSLError
from ..compat import urlencode
class Urllib3HttpConnection(Connection):
""... | 44.710744 | 102 | 0.63512 |
8b5768bedba49aa723674af1428e55a9402ed422 | 399 | py | Python | Semana 8/Veterinaria/Veterinaria/Veterinaria/wsgi.py | ederivero/CodigoVirtualBackend | 355fb17206a468655722f7249492843728a8a71b | [
"MIT"
] | 1 | 2020-11-21T18:11:32.000Z | 2020-11-21T18:11:32.000Z | Semana 8/Veterinaria/Veterinaria/Veterinaria/wsgi.py | roldanlihugo/backendCodigo | 219acad5a21fd47a630c00c7fb6877ea98b79d83 | [
"MIT"
] | null | null | null | Semana 8/Veterinaria/Veterinaria/Veterinaria/wsgi.py | roldanlihugo/backendCodigo | 219acad5a21fd47a630c00c7fb6877ea98b79d83 | [
"MIT"
] | 2 | 2020-12-03T23:23:59.000Z | 2021-09-22T01:06:18.000Z | """
WSGI config for Veterinaria project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_S... | 23.470588 | 78 | 0.789474 |
1f1ecaea70e7b17e61cd8a45ff70b659225cc102 | 145 | py | Python | src/Ionomy/__init__.py | Distortedlogic/ionomy-python | be806a2a678a3b6bf6650e3933fcbe824b040c00 | [
"MIT"
] | 3 | 2020-05-19T09:33:00.000Z | 2020-06-15T01:51:55.000Z | src/Ionomy/__init__.py | Distortedlogic/ionomy-python | be806a2a678a3b6bf6650e3933fcbe824b040c00 | [
"MIT"
] | null | null | null | src/Ionomy/__init__.py | Distortedlogic/ionomy-python | be806a2a678a3b6bf6650e3933fcbe824b040c00 | [
"MIT"
] | 1 | 2020-05-21T07:08:42.000Z | 2020-05-21T07:08:42.000Z | from .ionomy import Ionomy
from .ion_panda import IonPanda
from .bittrex import BitTrex
from .bit_panda import BitPanda
from .bit_ta import BitTA | 29 | 31 | 0.834483 |
3e594774785435dc807503100bac7f7c101d6b19 | 3,762 | py | Python | travis_pypi_setup.py | RedQA/stf-selector | 92f20e3cdd181f629a2309ca15ab66252d4862be | [
"Apache-2.0"
] | 22 | 2016-12-29T11:39:05.000Z | 2021-07-06T12:01:26.000Z | travis_pypi_setup.py | RedQA/stf-selector | 92f20e3cdd181f629a2309ca15ab66252d4862be | [
"Apache-2.0"
] | 1 | 2020-05-31T10:49:25.000Z | 2020-05-31T10:49:25.000Z | travis_pypi_setup.py | RedQA/stf-selector | 92f20e3cdd181f629a2309ca15ab66252d4862be | [
"Apache-2.0"
] | 8 | 2017-01-17T04:17:42.000Z | 2020-03-13T13:32:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Update encrypted deploy password in Travis config file
"""
from __future__ import print_function
import base64
import json
import os
from getpass import getpass
import yaml
from cryptography.hazmat.primitives.serialization import load_pem_public_key
from cryptography.h... | 30.585366 | 79 | 0.700957 |
82379af934e09dd34f5b33c3653461fe926e0ed0 | 6,600 | py | Python | dp-search/server/suggest/suggest_engine.py | flaxandteal/dp-search-app | eecdd61435d8665ea18c9f084bfa6a3c23b00221 | [
"MIT"
] | null | null | null | dp-search/server/suggest/suggest_engine.py | flaxandteal/dp-search-app | eecdd61435d8665ea18c9f084bfa6a3c23b00221 | [
"MIT"
] | null | null | null | dp-search/server/suggest/suggest_engine.py | flaxandteal/dp-search-app | eecdd61435d8665ea18c9f084bfa6a3c23b00221 | [
"MIT"
] | 3 | 2018-08-12T06:43:04.000Z | 2021-12-20T12:54:16.000Z | import collections
from ..word_embedding.word2vec_models import WordVectorModels
class Suggestion(object):
def __init__(self, suggestion, confidence):
self._data = {"suggestion": suggestion, "confidence": confidence}
def __getitem__(self, item):
return self._data[item]
def __str__(self)... | 29.864253 | 78 | 0.552273 |
574b0bac77983485c6b61a7ba02ec9356422fef6 | 1,261 | py | Python | newbeercellar/__init__.py | atlefren/newbeercellar | fcf5a174f45a3d21ce9613b88977a88d9bae4aa5 | [
"MIT"
] | 3 | 2015-02-08T21:40:48.000Z | 2015-07-24T11:59:57.000Z | newbeercellar/__init__.py | atlefren/newbeercellar | fcf5a174f45a3d21ce9613b88977a88d9bae4aa5 | [
"MIT"
] | 5 | 2015-02-08T22:25:33.000Z | 2015-02-09T21:38:46.000Z | newbeercellar/__init__.py | atlefren/newbeercellar | fcf5a174f45a3d21ce9613b88977a88d9bae4aa5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from flask import Flask
from webassets.loaders import PythonLoader
from flask.ext.assets import Environment
from flask_googlelogin import GoogleLogin
from flask_login import LoginManager
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
# load config
app.config.updat... | 28.659091 | 80 | 0.777954 |
8dc8690104c19f7b10c9d66e58e12e2ca5094e1e | 3,047 | py | Python | rosevomit/programcli/formatting.py | AlexLemna/npc-name-generator | 20de7c330fc44ddc8702aced2c5d0c126707896b | [
"MIT"
] | null | null | null | rosevomit/programcli/formatting.py | AlexLemna/npc-name-generator | 20de7c330fc44ddc8702aced2c5d0c126707896b | [
"MIT"
] | 44 | 2019-05-01T15:23:58.000Z | 2019-10-26T17:10:11.000Z | rosevomit/programcli/formatting.py | AlexLemna/rosevomit | 20de7c330fc44ddc8702aced2c5d0c126707896b | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
# ___________________________________________________________________
# formatting.py
# rosevomit.programcli.formatting
# ___________________________________________________________________
"""A file containing functions used for the formatting of output messages.""... | 33.119565 | 178 | 0.661963 |
b603d0ce9cab65067a3d90fa6bd10640b56e6e04 | 184 | py | Python | src/GravitationalClustering.py | sdc-project/semantic-segmentation | 7987473185e23efa5cb70a1a9172cd743e9f983e | [
"MIT"
] | null | null | null | src/GravitationalClustering.py | sdc-project/semantic-segmentation | 7987473185e23efa5cb70a1a9172cd743e9f983e | [
"MIT"
] | null | null | null | src/GravitationalClustering.py | sdc-project/semantic-segmentation | 7987473185e23efa5cb70a1a9172cd743e9f983e | [
"MIT"
] | null | null | null | import numpy as np
def MoveVector(APositions, BPositions, masses, G=1.0):
dim = APositions.shape[1]
diff = BPositions - APositions
magnitude = np.power(diff, 2).sum()
| 26.285714 | 54 | 0.673913 |
75d167fdf0be48cf387ea2b7e7b4327e6023e038 | 13,287 | py | Python | ansible_collection/Juniper/junos/plugins/modules/juniper_junos_facts.py | isometry/ansible-junos-stdlib | 63345737c43057b425593bb57d7b8a0eaaf766c1 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ansible_collection/Juniper/junos/plugins/modules/juniper_junos_facts.py | isometry/ansible-junos-stdlib | 63345737c43057b425593bb57d7b8a0eaaf766c1 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ansible_collection/Juniper/junos/plugins/modules/juniper_junos_facts.py | isometry/ansible-junos-stdlib | 63345737c43057b425593bb57d7b8a0eaaf766c1 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 1999-2018, Juniper Networks Inc.
# 2014, Jeremy Schulman
#
# All rights reserved.
#
# License: Apache 2.0
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 38.625 | 99 | 0.681192 |
3ec3f7e5d4651f179e2c0590048a77363d1d2ed8 | 382 | py | Python | rearrangement/dataset/sampler.py | ylabbe/rearrangement-planning | 44fbb4520306b3d5a72bebb5f758422a06f5a87f | [
"MIT"
] | 40 | 2019-04-24T09:32:22.000Z | 2021-12-01T10:00:05.000Z | rearrangement/dataset/sampler.py | ylabbe/rearrangement-planning | 44fbb4520306b3d5a72bebb5f758422a06f5a87f | [
"MIT"
] | null | null | null | rearrangement/dataset/sampler.py | ylabbe/rearrangement-planning | 44fbb4520306b3d5a72bebb5f758422a06f5a87f | [
"MIT"
] | 2 | 2019-04-25T00:58:36.000Z | 2019-05-25T22:20:02.000Z | import torch
from torch.utils.data import Sampler
class ResizedRandomSampler(Sampler):
def __init__(self, n_items, epoch_size):
super().__init__(None)
self.n_items = n_items
self.epoch_size = epoch_size
def __len__(self):
return self.epoch_size
def __iter__(self):
... | 23.875 | 68 | 0.675393 |
22d433adb8ab5bb6b438f8f05ca5cc61af36215d | 5,094 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/config/network/vxlan_iptunnel_binding.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/network/vxlan_iptunnel_binding.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/network/vxlan_iptunnel_binding.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2021 Citrix Systems, Inc.
#
# 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... | 29.789474 | 166 | 0.715744 |
2c2aac46daae93aae8ab22950ffd10198b179059 | 236 | py | Python | 2020/day1/1.py | jadenPete/AdventOfCode | a9dc9dfd602e9cc4101c6dcce0944308a5e034bd | [
"MIT"
] | null | null | null | 2020/day1/1.py | jadenPete/AdventOfCode | a9dc9dfd602e9cc4101c6dcce0944308a5e034bd | [
"MIT"
] | null | null | null | 2020/day1/1.py | jadenPete/AdventOfCode | a9dc9dfd602e9cc4101c6dcce0944308a5e034bd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
with open("input.txt") as file:
entries = list(sorted(map(int, file.readlines())))
for i, e1 in enumerate(entries):
for j, e2 in enumerate(entries):
if i != j and e1 + e2 == 2020:
print(e1 * e2)
exit()
| 21.454545 | 51 | 0.631356 |
710f60252b2960046d322b837be54b59fe7eeda6 | 3,529 | py | Python | bindings/python/ensmallen/datasets/string/pedobactersaltans.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/pedobactersaltans.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/pedobactersaltans.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Pedobacter saltans.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein ass... | 32.675926 | 223 | 0.675829 |
2b114baabb65d345eb7e28d29db5d1f6bc973061 | 1,568 | py | Python | 7-hopfild/hopfild_network.py | couatl/neural-networks | f299e0e39e5dac6729362fc4a10995ecd0635316 | [
"MIT"
] | null | null | null | 7-hopfild/hopfild_network.py | couatl/neural-networks | f299e0e39e5dac6729362fc4a10995ecd0635316 | [
"MIT"
] | null | null | null | 7-hopfild/hopfild_network.py | couatl/neural-networks | f299e0e39e5dac6729362fc4a10995ecd0635316 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
class HopfildNetwork:
"""
НС Хопфилда
"""
def __init__(self, f, len_vector):
"""
Конструктор класса
:param len_vector: Размер вектора входных "изображений"
:param f: Функция активации
"""
self.len_vector = len_... | 30.745098 | 105 | 0.54273 |
e818801b23d3d3db0f3429d047956d7f030bcfa8 | 45,531 | py | Python | holoviews/streams.py | mkp170791/holoviews | a17f5c66eac7c23817e31edd3b3768b3be35076f | [
"BSD-3-Clause"
] | null | null | null | holoviews/streams.py | mkp170791/holoviews | a17f5c66eac7c23817e31edd3b3768b3be35076f | [
"BSD-3-Clause"
] | null | null | null | holoviews/streams.py | mkp170791/holoviews | a17f5c66eac7c23817e31edd3b3768b3be35076f | [
"BSD-3-Clause"
] | null | null | null | """
The streams module defines the streams API that allows visualizations to
generate and respond to events, originating either in Python on the
server-side or in Javascript in the Jupyter notebook (client-side).
"""
import weakref
from numbers import Number
from collections import defaultdict
from contextlib import c... | 35.131944 | 108 | 0.611561 |
79df913c9c0f94283bcb28c0fc51656da787a8ef | 1,326 | py | Python | fmojinja/awk/makefile/pdb_reformer.py | Taro-Imahiro/fmojinja | 5b2c4100e25bd198b1cf8ed44b37b1c4bb93d2ee | [
"MIT"
] | null | null | null | fmojinja/awk/makefile/pdb_reformer.py | Taro-Imahiro/fmojinja | 5b2c4100e25bd198b1cf8ed44b37b1c4bb93d2ee | [
"MIT"
] | 13 | 2021-07-06T07:03:58.000Z | 2021-11-22T15:25:22.000Z | fmojinja/awk/makefile/pdb_reformer.py | Taro-Imahiro/fmojinja | 5b2c4100e25bd198b1cf8ed44b37b1c4bb93d2ee | [
"MIT"
] | 3 | 2021-06-26T19:40:34.000Z | 2021-09-15T04:24:21.000Z | from ...mixin import TemplateRendererMixin
from ...__version__ import get_version
from argparse import ArgumentParser
class PdbReformer(TemplateRendererMixin):
@classmethod
def template(cls) -> str:
return f"# Generated by fmojinja version {get_version()}" + """
PREFIX := {{ prefix }}
PDB :={% for pa... | 27.625 | 88 | 0.639517 |
8cf1c433e95d5012fcb73e5c0bad23fdbdf40ebc | 7,213 | py | Python | rest_framework_oauth/authentication.py | mvpoland/django-rest-framework-oauth | 5afc705df1351ac411595b9db4d4f0f21ff08fc0 | [
"BSD-3-Clause"
] | null | null | null | rest_framework_oauth/authentication.py | mvpoland/django-rest-framework-oauth | 5afc705df1351ac411595b9db4d4f0f21ff08fc0 | [
"BSD-3-Clause"
] | null | null | null | rest_framework_oauth/authentication.py | mvpoland/django-rest-framework-oauth | 5afc705df1351ac411595b9db4d4f0f21ff08fc0 | [
"BSD-3-Clause"
] | null | null | null | """
Provides OAuth authentication policies.
"""
from django.core.exceptions import ImproperlyConfigured
from django.conf import settings
from rest_framework import exceptions
from rest_framework.authentication import get_authorization_header, BaseAuthentication
from .compat import oauth, oauth_provider, oauth_provide... | 38.367021 | 104 | 0.660197 |
5fd30812f8adc612e195b0019f788d3978b9b95a | 18,922 | py | Python | inversion.py | cvl-umass/bilinear-cnn | d6a05aa200774c97b38f753feed9032aa3764cce | [
"MIT"
] | 9 | 2020-06-07T09:57:23.000Z | 2021-12-27T08:02:45.000Z | inversion.py | cvl-umass/bilinear-cnn | d6a05aa200774c97b38f753feed9032aa3764cce | [
"MIT"
] | 3 | 2021-06-08T21:47:36.000Z | 2022-01-13T02:51:06.000Z | inversion.py | cvl-umass/bilinear-cnn | d6a05aa200774c97b38f753feed9032aa3764cce | [
"MIT"
] | null | null | null | from config import dset_root, setup_dataset
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import torchvision
from torchvision import datasets, models, transforms
import os
import argparse
import sys
from BCNN import create_multi_heads_bcnn
import json
import logging
import copy
impo... | 35.634652 | 97 | 0.552901 |
335c08eee7fbc1a2deee8beb3802d149f3d5c014 | 14,618 | py | Python | sentry_sdk/integrations/aws_lambda.py | Ivo-Donchev/sentry-python | 4c08988eda9bb410afa3a4fa743cc4ea806f9902 | [
"BSD-2-Clause"
] | null | null | null | sentry_sdk/integrations/aws_lambda.py | Ivo-Donchev/sentry-python | 4c08988eda9bb410afa3a4fa743cc4ea806f9902 | [
"BSD-2-Clause"
] | null | null | null | sentry_sdk/integrations/aws_lambda.py | Ivo-Donchev/sentry-python | 4c08988eda9bb410afa3a4fa743cc4ea806f9902 | [
"BSD-2-Clause"
] | null | null | null | from datetime import datetime, timedelta
from os import environ
import sys
from sentry_sdk.hub import Hub, _should_send_default_pii
from sentry_sdk.tracing import Transaction
from sentry_sdk._compat import reraise
from sentry_sdk.utils import (
AnnotatedValue,
capture_internal_exceptions,
event_from_except... | 36.545 | 105 | 0.599672 |
117390fb9edd3025af7bacae5a86b85d01a1a10c | 735 | py | Python | core/src/zeit/cms/content/tests/test_lxmlpickle.py | rickdg/vivi | 16134ac954bf8425646d4ad47bdd1f372e089355 | [
"BSD-3-Clause"
] | 5 | 2019-05-16T09:51:29.000Z | 2021-05-31T09:30:03.000Z | core/src/zeit/cms/content/tests/test_lxmlpickle.py | rickdg/vivi | 16134ac954bf8425646d4ad47bdd1f372e089355 | [
"BSD-3-Clause"
] | 107 | 2019-05-24T12:19:02.000Z | 2022-03-23T15:05:56.000Z | core/src/zeit/cms/content/tests/test_lxmlpickle.py | rickdg/vivi | 16134ac954bf8425646d4ad47bdd1f372e089355 | [
"BSD-3-Clause"
] | 3 | 2020-08-14T11:01:17.000Z | 2022-01-08T17:32:19.000Z | # coding: utf-8
from zeit.cms.checkout.helper import checked_out
import lxml.objectify
import transaction
import zeit.cms.testing
class XMLPickleException(zeit.cms.testing.ZeitCmsTestCase):
def test_parse_errors_are_deserialized_as_comment(self):
with checked_out(
self.repository['testcon... | 35 | 75 | 0.647619 |
52e270ee3b797643dcf5234eacdf6088ae60a12b | 1,290 | py | Python | ssmachine_consts.py | splunk-soar-connectors/screenshotmachine | a4891d5c8b84d740919911654f7988ef15f14061 | [
"Apache-2.0"
] | null | null | null | ssmachine_consts.py | splunk-soar-connectors/screenshotmachine | a4891d5c8b84d740919911654f7988ef15f14061 | [
"Apache-2.0"
] | null | null | null | ssmachine_consts.py | splunk-soar-connectors/screenshotmachine | a4891d5c8b84d740919911654f7988ef15f14061 | [
"Apache-2.0"
] | null | null | null | # File: ssmachine_consts.py
#
# Copyright (c) 2016-2022 Splunk Inc.
#
# 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 a... | 49.615385 | 128 | 0.793023 |
de727f34dbf9d7de323755560b164397460dd9d4 | 112 | py | Python | TestProgram.py | Hallflower20/NU_git_intro | 421b301916541437db0c8794ae5e792fa0490216 | [
"MIT"
] | null | null | null | TestProgram.py | Hallflower20/NU_git_intro | 421b301916541437db0c8794ae5e792fa0490216 | [
"MIT"
] | null | null | null | TestProgram.py | Hallflower20/NU_git_intro | 421b301916541437db0c8794ae5e792fa0490216 | [
"MIT"
] | null | null | null | import numpy as np
print("Did you know 2 + 2 {}".format(2+2))
print("Why wouldn't I know such a simple fact")
| 18.666667 | 47 | 0.669643 |
30503c9517f9cd369304d721d5813eca283aeea2 | 759 | py | Python | docs/conf.py | Rajpratik71/stacks-usecase | 19272c2d7f9ece306024b4bc9c97a0f9354c5f89 | [
"Apache-2.0"
] | 15 | 2019-09-19T09:32:11.000Z | 2021-03-25T15:45:11.000Z | docs/conf.py | Rajpratik71/stacks-usecase | 19272c2d7f9ece306024b4bc9c97a0f9354c5f89 | [
"Apache-2.0"
] | 8 | 2019-11-01T12:13:15.000Z | 2020-04-06T19:18:13.000Z | docs/conf.py | Rajpratik71/stacks-usecase | 19272c2d7f9ece306024b4bc9c97a0f9354c5f89 | [
"Apache-2.0"
] | 21 | 2019-09-19T16:57:41.000Z | 2021-09-23T04:57:25.000Z | # Configuration file for the Sphinx documentation builder.
import os
import sys
sys.path.insert(0, os.path.abspath("."))
project = "stacks-usecase"
copyright = "2019, Intel"
author = "unrahul"
# The short X.Y version
version = "0.0.1"
release = version
extensions = [
"sphinx.ext.githubpages",
"sphinx.ext.int... | 22.323529 | 81 | 0.68643 |
c20fff8e3f2598cf12600a4081bb29a98c7e7ddd | 15,401 | py | Python | improver/nowcasting/accumulation.py | ddlddl58/improver | 37b5b12491a77feccb03e33813efe8ffdebfa25d | [
"BSD-3-Clause"
] | 1 | 2021-05-01T22:59:15.000Z | 2021-05-01T22:59:15.000Z | improver/nowcasting/accumulation.py | ddlddl58/improver | 37b5b12491a77feccb03e33813efe8ffdebfa25d | [
"BSD-3-Clause"
] | null | null | null | improver/nowcasting/accumulation.py | ddlddl58/improver | 37b5b12491a77feccb03e33813efe8ffdebfa25d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2019 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 43.261236 | 85 | 0.641192 |
53154e1cfd29711fce80f9066252e80169241671 | 905 | py | Python | isaacgymenvs/rl_games/common/ivecenv.py | ZaneZh/IsaacGymEnvs | adc20a5fbd70d77a716fefe86eb947f83d3efbd2 | [
"BSD-3-Clause"
] | 193 | 2019-05-28T01:48:56.000Z | 2022-03-31T07:56:37.000Z | isaacgymenvs/rl_games/common/ivecenv.py | ZaneZh/IsaacGymEnvs | adc20a5fbd70d77a716fefe86eb947f83d3efbd2 | [
"BSD-3-Clause"
] | 35 | 2020-01-28T22:15:51.000Z | 2022-03-28T22:10:54.000Z | isaacgymenvs/rl_games/common/ivecenv.py | ZaneZh/IsaacGymEnvs | adc20a5fbd70d77a716fefe86eb947f83d3efbd2 | [
"BSD-3-Clause"
] | 37 | 2019-06-28T01:09:53.000Z | 2022-03-26T09:14:06.000Z | class IVecEnv:
def step(self, actions):
raise NotImplementedError
def reset(self):
raise NotImplementedError
def has_action_masks(self):
return False
def get_number_of_agents(self):
return 1
def get_env_info(self):
pass
def set_train_info(self, env_fr... | 26.617647 | 111 | 0.640884 |
64ff936c3fd73dbcfada79eec86915c5304f50ac | 4,284 | py | Python | python3/koans/about_iteration.py | Drumstick42/python_koans | d91276ffc46a439768d94da5c9756b30bd18b35e | [
"MIT"
] | null | null | null | python3/koans/about_iteration.py | Drumstick42/python_koans | d91276ffc46a439768d94da5c9756b30bd18b35e | [
"MIT"
] | null | null | null | python3/koans/about_iteration.py | Drumstick42/python_koans | d91276ffc46a439768d94da5c9756b30bd18b35e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
class AboutIteration(Koan):
def test_iterators_are_a_type(self):
it = iter(range(1,6))
total = 0
for num in it:
total += num
self.assertEqual(15, total)
def test_iterating_with_next(self):
... | 30.382979 | 115 | 0.54902 |
a31d6e3422a59aba419bd8464d89a8b3ce3ec156 | 1,194 | py | Python | src/angr/tutorial/angr-workshop/exercise/solution_md5_simproc.py | Sylhare/Flag | 8f056593466c8611fae0f5ed0d39c711f694f41b | [
"MIT"
] | null | null | null | src/angr/tutorial/angr-workshop/exercise/solution_md5_simproc.py | Sylhare/Flag | 8f056593466c8611fae0f5ed0d39c711f694f41b | [
"MIT"
] | 4 | 2019-02-06T16:08:56.000Z | 2019-03-17T20:12:50.000Z | src/angr/tutorial/angr-workshop/exercise/solution_md5_simproc.py | Sylhare/Flag | 8f056593466c8611fae0f5ed0d39c711f694f41b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# angr
import angr
# interactive plugin
# sensible logging
import logging
logging.getLogger("angr.sim_manager").setLevel(logging.INFO)
# Options for the Project
filename = "./md5_ex.elf"
use_libs = False
p = angr.Project(filename, auto_load_libs=use_libs)
print("[!] created angr project for "+... | 25.404255 | 70 | 0.646566 |
504be97087e3e7b8c1110de3e3a68a47d98f5599 | 566 | py | Python | django/contrib/flatpages/sitemaps.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/contrib/flatpages/sitemaps.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/contrib/flatpages/sitemaps.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | from django.apps import apps as django_apps
from django.contrib.sitemaps import Sitemap
from django.core.exceptions import ImproperlyConfigured
class FlatPageSitemap(Sitemap):
def items(self):
if not django_apps.is_installed('django.contrib.sites'):
raise ImproperlyConfigured("FlatPage... | 43.538462 | 112 | 0.74735 |
0ef957d982d57d9133db2b8b35a964a4e78a29b3 | 1,498 | py | Python | 2021-04-Python-SEA-ENGRSL-Workshops/Workshop_1-Python-for-Automation/s01a_Overview.py | shawnduong/manimations | 1d36d9d1e7dff90a1a8da1e687ef442f750e29c5 | [
"MIT"
] | null | null | null | 2021-04-Python-SEA-ENGRSL-Workshops/Workshop_1-Python-for-Automation/s01a_Overview.py | shawnduong/manimations | 1d36d9d1e7dff90a1a8da1e687ef442f750e29c5 | [
"MIT"
] | null | null | null | 2021-04-Python-SEA-ENGRSL-Workshops/Workshop_1-Python-for-Automation/s01a_Overview.py | shawnduong/manimations | 1d36d9d1e7dff90a1a8da1e687ef442f750e29c5 | [
"MIT"
] | null | null | null | from manim import *
class s01a_Overview(Scene):
def construct(self):
mainTitle = Text("Overview")
subtitleA = Text("Objectives")
subtitleB = Text("Agenda")
objectives = [
Text("1. Understand what computer programming is."),
Text("2. Develop a programmatic problem-solving mindset."),
Text("3. Becom... | 25.389831 | 66 | 0.686248 |
abbaf8b3cf44ff7c370eb613e698fbb8e243b1de | 1,038 | py | Python | zfit/settings.py | kailiu77/zfit | 00eed81fb34e0eb2e4bae5ddc9ebf38699e107ca | [
"BSD-3-Clause"
] | 1 | 2022-01-15T13:38:12.000Z | 2022-01-15T13:38:12.000Z | zfit/settings.py | kailiu77/zfit | 00eed81fb34e0eb2e4bae5ddc9ebf38699e107ca | [
"BSD-3-Clause"
] | null | null | null | zfit/settings.py | kailiu77/zfit | 00eed81fb34e0eb2e4bae5ddc9ebf38699e107ca | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2019 zfit
import numpy as np
import tensorflow as tf
from .util.container import DotDict
from .util.execution import RunManager
run = RunManager()
def set_seed(seed):
"""
Set random seed for numpy
"""
np.random.seed(seed)
tf.compat.v1.random.set_random_seed(seed)
_verbosit... | 21.625 | 47 | 0.549133 |
5021fe3b09b74b0ace6cc16314cd17d98e9f4689 | 1,896 | py | Python | frontend/python/common.py | alxshine/eNNclave | 639aa7e8df9440922788d0c2a79846b198f117aa | [
"MIT"
] | null | null | null | frontend/python/common.py | alxshine/eNNclave | 639aa7e8df9440922788d0c2a79846b198f117aa | [
"MIT"
] | null | null | null | frontend/python/common.py | alxshine/eNNclave | 639aa7e8df9440922788d0c2a79846b198f117aa | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow.keras.layers as layers
from invoke.context import Context
from tensorflow.keras.models import Sequential
import config as cfg
from ennclave import Enclave
import ennclave_inference
def build_library(model: Enclave, mode: str):
model.generate_state()
model.generate_forward... | 32.135593 | 75 | 0.699895 |
ae1c2798fb179f648c6b9016b0a0b4d6635dc007 | 3,553 | py | Python | tools/check_author.py | amyspark/libjxl | 057cd06c19875bcf8b5d34d41d92a8abdb856b7c | [
"BSD-3-Clause"
] | 453 | 2021-05-25T15:53:07.000Z | 2022-03-30T05:32:31.000Z | tools/check_author.py | amyspark/libjxl | 057cd06c19875bcf8b5d34d41d92a8abdb856b7c | [
"BSD-3-Clause"
] | 659 | 2021-05-25T16:33:46.000Z | 2022-03-31T14:59:34.000Z | tools/check_author.py | amyspark/libjxl | 057cd06c19875bcf8b5d34d41d92a8abdb856b7c | [
"BSD-3-Clause"
] | 105 | 2021-05-25T16:11:10.000Z | 2022-03-29T09:52:09.000Z | #!/usr/bin/env python3
# Copyright (c) the JPEG XL Project Authors. All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
"""check_author.py: Check that a given author is listed in the AUTHORS file."""
import argparse
import fnmatch
import os
imp... | 34.495146 | 82 | 0.657191 |
b949afff9337fb53458dc3c08b13da0ce33c5972 | 2,807 | py | Python | xlate/views/translator.py | manistal/xlator | bf0385865912fd4b71db55cd5fc559147d06126d | [
"MIT"
] | null | null | null | xlate/views/translator.py | manistal/xlator | bf0385865912fd4b71db55cd5fc559147d06126d | [
"MIT"
] | null | null | null | xlate/views/translator.py | manistal/xlator | bf0385865912fd4b71db55cd5fc559147d06126d | [
"MIT"
] | null | null | null |
import pandas as pd
from flask import Blueprint, render_template, request, redirect, url_for, current_app
from .bluemix_translate_api import BluemixLanguageTranslator
bp = Blueprint('translator', __name__)
def get_language_selections():
"""
Utility function that generates the available language translation ... | 43.859375 | 118 | 0.727823 |
d2476a2ef7f038c15446a2277b013872fadd45d8 | 6,725 | py | Python | examples/pwr_run/checkpointing/socket_short/random2/job15.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/socket_short/random2/job15.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/socket_short/random2/job15.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | """
#Trains a ResNet on the CIFAR10 dataset.
"""
from __future__ import print_function
import keras
from keras.layers import Dense, Conv2D, BatchNormalization, Activation
from keras.layers import AveragePooling2D, Input, Flatten
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRa... | 30.568182 | 118 | 0.703048 |
43576ee5f0c5ec248407a568d85d86c6037eee3e | 676 | py | Python | manage.py | AudreyCherrie/mov-ie | c2c0aeb71000e7af93dbf7a1758c53c532a5d8e6 | [
"Unlicense"
] | null | null | null | manage.py | AudreyCherrie/mov-ie | c2c0aeb71000e7af93dbf7a1758c53c532a5d8e6 | [
"Unlicense"
] | null | null | null | manage.py | AudreyCherrie/mov-ie | c2c0aeb71000e7af93dbf7a1758c53c532a5d8e6 | [
"Unlicense"
] | null | null | null | from app import create_app,db
from flask_script import Manager,Server
from app.models import User,Role
from flask_migrate import Migrate, MigrateCommand
# Creating app instance
app = create_app('development')
manager = Manager(app)
manager.add_command('server',Server)
migrate = Migrate(app,db)
manager.add_command('d... | 27.04 | 60 | 0.733728 |
0c73ebc17a4ba9953d1ee660d92c44d343bf6ee6 | 1,626 | py | Python | camera.py | tonycmooz/Computer-Vision | 4e11991bfb38a0aba182244a0a8a3a3c0e0458a5 | [
"MIT"
] | null | null | null | camera.py | tonycmooz/Computer-Vision | 4e11991bfb38a0aba182244a0a8a3a3c0e0458a5 | [
"MIT"
] | null | null | null | camera.py | tonycmooz/Computer-Vision | 4e11991bfb38a0aba182244a0a8a3a3c0e0458a5 | [
"MIT"
] | 1 | 2021-03-16T12:22:18.000Z | 2021-03-16T12:22:18.000Z | import cv2
import pandas
from datetime import datetime
import time
video = cv2.VideoCapture(1)
first_frame = None
status_list = [None, None]
# times = []
# df = pandas.DataFrame(columns=["Start", "End"])
while True:
check, frame = video.read()
status = 0
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
... | 27.1 | 100 | 0.632226 |
abf37859f8eeb27144bbfabbe25935df45769689 | 30,020 | py | Python | [archived]/mcmt-tracking-python/mcmt-tracking-python/bin/mcmt/trackplot_process.py | sieniven/spot-it-3d | 7c149c5ede1c72fd0178dd76e1b96bb9d6ecdcf5 | [
"Apache-2.0"
] | 8 | 2021-04-26T15:05:45.000Z | 2021-09-18T17:56:29.000Z | [archived]/mcmt-tracking-python/mcmt-tracking-python/bin/mcmt/trackplot_process.py | sieniven/spot-it-3d | 7c149c5ede1c72fd0178dd76e1b96bb9d6ecdcf5 | [
"Apache-2.0"
] | 1 | 2021-07-28T06:54:26.000Z | 2021-07-28T06:54:26.000Z | [archived]/mcmt-tracking-python/mcmt-tracking-python/bin/mcmt/trackplot_process.py | sieniven/spot-it-3d | 7c149c5ede1c72fd0178dd76e1b96bb9d6ecdcf5 | [
"Apache-2.0"
] | 1 | 2021-11-12T14:08:21.000Z | 2021-11-12T14:08:21.000Z | import os
import cv2
import math
import time
import numpy as np
from multiprocessing import Process
# local imported code
from plot_tracking_util import plot_track_feature_variable, export_data_as_csv, mcmt_plot
from object_tracking_util import scalar_to_rgb
from trackplots_util import CameraTracks, TrackPlot, combine... | 43.633721 | 127 | 0.699434 |
98b3d5615a4a661aa816e3af166181665870b799 | 931 | py | Python | src/optimization/optimize_sfa_explicit.py | paulnikolaus/python-mgf-calculator | b6a897e211e8003a7b4eee26fafdaf5f06e8a0c5 | [
"MIT"
] | null | null | null | src/optimization/optimize_sfa_explicit.py | paulnikolaus/python-mgf-calculator | b6a897e211e8003a7b4eee26fafdaf5f06e8a0c5 | [
"MIT"
] | null | null | null | src/optimization/optimize_sfa_explicit.py | paulnikolaus/python-mgf-calculator | b6a897e211e8003a7b4eee26fafdaf5f06e8a0c5 | [
"MIT"
] | null | null | null | """Optimize theta"""
from math import inf
from typing import List
from optimization.optimize import Optimize
from utils.exceptions import ParameterOutOfBounds
from utils.setting_sfa import SettingSFA
class OptimizeSFAExplicit(Optimize):
"""Optimize class"""
def __init__(self, setting_sfa: SettingSFA, number... | 32.103448 | 79 | 0.700322 |
018b9199b89f7d15c01900bd11defddf9df92fa0 | 12,777 | py | Python | gridpath/get_scenario_inputs.py | anamileva/gridpath | e55eacb88ca5e6c034a90b18819e17cbd6f43854 | [
"Apache-2.0"
] | null | null | null | gridpath/get_scenario_inputs.py | anamileva/gridpath | e55eacb88ca5e6c034a90b18819e17cbd6f43854 | [
"Apache-2.0"
] | null | null | null | gridpath/get_scenario_inputs.py | anamileva/gridpath | e55eacb88ca5e6c034a90b18819e17cbd6f43854 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2020 Blue Marble Analytics LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 34.072 | 85 | 0.675276 |
53e17d24e770bef709f599d76da5ed028980b150 | 31 | py | Python | version_writer.py | Nepmia/N4-Framework | 84d98f3fe05ca02f938332e5970bca5482ef8ce7 | [
"MIT"
] | null | null | null | version_writer.py | Nepmia/N4-Framework | 84d98f3fe05ca02f938332e5970bca5482ef8ce7 | [
"MIT"
] | null | null | null | version_writer.py | Nepmia/N4-Framework | 84d98f3fe05ca02f938332e5970bca5482ef8ce7 | [
"MIT"
] | null | null | null | from helpers import *
# WIP
| 5.166667 | 21 | 0.645161 |
33d3e9036e3042458f42132f0dfbcc1db5cbc4b2 | 435 | py | Python | mysite/theStash/migrations/0005_auto_20210522_1604.py | pontusnordstrom89/CreativeStash | ce510433df9662bd70238612f47927aa09c66f3c | [
"CC0-1.0"
] | 2 | 2021-03-24T13:15:18.000Z | 2021-03-31T12:54:12.000Z | mysite/theStash/migrations/0005_auto_20210522_1604.py | pontusnordstrom89/CreativeStash | ce510433df9662bd70238612f47927aa09c66f3c | [
"CC0-1.0"
] | 4 | 2021-04-29T13:18:58.000Z | 2021-06-02T12:18:25.000Z | mysite/theStash/migrations/0005_auto_20210522_1604.py | pontusnordstrom89/CreativeStash | ce510433df9662bd70238612f47927aa09c66f3c | [
"CC0-1.0"
] | null | null | null | # Generated by Django 3.0.13 on 2021-05-22 16:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('theStash', '0004_auto_20210522_1515'),
]
operations = [
migrations.AlterField(
model_name='profile',
name='profile_... | 22.894737 | 87 | 0.618391 |
9e60021d26fe7093574dcc4b183cb26150175cfb | 4,519 | py | Python | experiments/experiments_gdsc/model_selection/run_line_search_bnmf_Sanger.py | ThomasBrouwer/BNMTF | 34df0c3cebc5e67a5e39762b9305b75d73a2a0e0 | [
"Apache-2.0"
] | 16 | 2017-04-19T12:04:47.000Z | 2021-12-03T00:50:43.000Z | experiments/experiments_gdsc/model_selection/run_line_search_bnmf_Sanger.py | ThomasBrouwer/BNMTF | 34df0c3cebc5e67a5e39762b9305b75d73a2a0e0 | [
"Apache-2.0"
] | 1 | 2017-04-20T11:26:16.000Z | 2017-04-20T11:26:16.000Z | experiments/experiments_gdsc/model_selection/run_line_search_bnmf_Sanger.py | ThomasBrouwer/BNMTF | 34df0c3cebc5e67a5e39762b9305b75d73a2a0e0 | [
"Apache-2.0"
] | 8 | 2015-12-15T05:29:43.000Z | 2019-06-05T03:14:11.000Z | """
Run the line search for BNMF with the Exp priors on the Sanger dataset.
"""
import sys, os
project_location = os.path.dirname(__file__)+"/../../../../"
sys.path.append(project_location)
from BNMTF.code.models.bnmf_vb_optimised import bnmf_vb_optimised
from BNMTF.code.cross_validation.mask import compute_Ms, compu... | 71.730159 | 2,830 | 0.796415 |
91c35d75557057fb1c02f6a4ac22420e1b4c5931 | 135,194 | py | Python | pandas/core/groupby/groupby.py | LucyJimenez/pandas | d2aa44f50f6ac4789d4e351e4e52a53a358da42e | [
"BSD-3-Clause"
] | null | null | null | pandas/core/groupby/groupby.py | LucyJimenez/pandas | d2aa44f50f6ac4789d4e351e4e52a53a358da42e | [
"BSD-3-Clause"
] | 1 | 2022-03-18T01:26:58.000Z | 2022-03-18T01:26:58.000Z | pandas/core/groupby/groupby.py | LucyJimenez/pandas | d2aa44f50f6ac4789d4e351e4e52a53a358da42e | [
"BSD-3-Clause"
] | null | null | null | """
Provide the groupby split-apply-combine paradigm. Define the GroupBy
class providing the base-class of operations.
The SeriesGroupBy and DataFrameGroupBy sub-class
(defined in pandas.core.groupby.generic)
expose these user-facing objects to provide specific functionality.
"""
from __future__ import annotations
fr... | 32.861935 | 106 | 0.566149 |
fb65da060599d1c6105a9c37a9cd941e7438c546 | 453 | py | Python | HackerRank/Python/String_Split_and_Join.py | GoTo-Coders/Competitive-Programming | c5a58f41d2362e9c31591e46ac1c9f057060769e | [
"MIT"
] | 4 | 2021-06-19T14:15:34.000Z | 2021-06-21T13:53:53.000Z | HackerRank/Python/String_Split_and_Join.py | GoTo-Coders/Competitive-Programming | c5a58f41d2362e9c31591e46ac1c9f057060769e | [
"MIT"
] | 2 | 2021-07-02T12:41:06.000Z | 2021-07-12T09:37:50.000Z | HackerRank/Python/String_Split_and_Join.py | GoTo-Coders/Competitive-Programming | c5a58f41d2362e9c31591e46ac1c9f057060769e | [
"MIT"
] | 3 | 2021-06-19T15:19:20.000Z | 2021-07-02T17:24:51.000Z | # Link --> https://www.hackerrank.com/challenges/python-string-split-and-join/problem
# Code:
def split_and_join(line):
answer_string = ""
temp_list = line.split(" ")
for i in range(len(temp_list)):
answer_string += temp_list[i]
if i != (len(temp_list)-1):
answer_string += ... | 23.842105 | 85 | 0.613687 |
fbb532f7f48583239e5ea689d97182d5a2a9d68a | 7,704 | py | Python | advance_player.py | ANKIT-PYLOVER/MUSIC-PLAYER | 497db0d0c4f131dda3d22edf012af8f26730248b | [
"Apache-2.0"
] | null | null | null | advance_player.py | ANKIT-PYLOVER/MUSIC-PLAYER | 497db0d0c4f131dda3d22edf012af8f26730248b | [
"Apache-2.0"
] | null | null | null | advance_player.py | ANKIT-PYLOVER/MUSIC-PLAYER | 497db0d0c4f131dda3d22edf012af8f26730248b | [
"Apache-2.0"
] | null | null | null | from math import trunc
import tkinter as tk
from tkinter import StringVar,Label,Scrollbar
from tkinter import *
from tkinter.filedialog import askopenfilenames
from PIL import ImageTk
from pygame import mixer
import os
from tkinter import messagebox
import pygame
import random
paths = "C:/Users/H1CK3R/Mu... | 29.630769 | 203 | 0.601376 |
45910d08848e086bc93996e7583bbfa439d53b9b | 559 | py | Python | bioprocs/scripts/vcfnext/pMutationSigs.py | LeaveYeah/bioprocs | c5d2ddcc837f5baee00faf100e7e9bd84222cfbf | [
"MIT"
] | null | null | null | bioprocs/scripts/vcfnext/pMutationSigs.py | LeaveYeah/bioprocs | c5d2ddcc837f5baee00faf100e7e9bd84222cfbf | [
"MIT"
] | 2 | 2019-02-15T22:59:49.000Z | 2019-02-15T23:03:09.000Z | bioprocs/scripts/vcfnext/pMutationSigs.py | LeaveYeah/bioprocs | c5d2ddcc837f5baee00faf100e7e9bd84222cfbf | [
"MIT"
] | null | null | null | from pyppl import Box
from deconstructSigs import DeconstructSigs, Settings
infile = {{i.infile | quote}}
outdir = {{o.outdir | quote}}
args = {{args | repr}}
Settings.font_family = args.get('font_family', 'Arial')
Settings.font_weight = args.get('font_weight', 'bold')
Settings.sig_cutoff = args.get('sig_cutoff' ,... | 34.9375 | 86 | 0.72093 |
3171d9d7f96cfb2571377d5842f26bb10a748a16 | 2,336 | py | Python | PageRank/code.py | Javed-Akhtar/nlp-dl-prework | faeefb858bc46b28bd62fffb123c9160c7624f1f | [
"MIT"
] | null | null | null | PageRank/code.py | Javed-Akhtar/nlp-dl-prework | faeefb858bc46b28bd62fffb123c9160c7624f1f | [
"MIT"
] | null | null | null | PageRank/code.py | Javed-Akhtar/nlp-dl-prework | faeefb858bc46b28bd62fffb123c9160c7624f1f | [
"MIT"
] | null | null | null | # --------------
# Code starts here
import numpy as np
# Code starts here
# Adjacency matrix
adj_mat = np.array([[0, 0,0, 0, 0, 0,1/3,0],
[1/2,0,1/2,1/3,0, 0,0, 0],
[1/2,0,0, 0, 0, 0,0, 0],
[0, 1,0, 0, 0, 0,0, 0],
[0, 0,1/2,1/... | 23.36 | 71 | 0.558219 |
b90356f8e197d53a98261f0e85e4fa47a10e2d1e | 37,636 | py | Python | snakeskin/protos/peer/chaincode_shim_pb2.py | healthverity/snakeskin-fabric | 31ba7fa5a71445eba76f89723c998d603704e0f9 | [
"Apache-2.0"
] | 5 | 2019-08-08T17:16:02.000Z | 2021-05-15T07:28:31.000Z | snakeskin/protos/peer/chaincode_shim_pb2.py | healthverity/snakeskin-fabric | 31ba7fa5a71445eba76f89723c998d603704e0f9 | [
"Apache-2.0"
] | 4 | 2019-08-20T15:07:12.000Z | 2020-07-31T17:50:51.000Z | snakeskin/protos/peer/chaincode_shim_pb2.py | healthverity/snakeskin-fabric | 31ba7fa5a71445eba76f89723c998d603704e0f9 | [
"Apache-2.0"
] | 2 | 2019-08-20T15:22:48.000Z | 2019-12-17T19:38:55.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: snakeskin/protos/peer/chaincode_shim.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _mes... | 37.673674 | 3,298 | 0.743039 |
f12cfd6f65b7b59eccd6c8f6d0e02815df472a69 | 2,244 | py | Python | utils/content_process.py | NCU-NLP/news_feed | af2097c5b815c45c6089824759b50c64e51955e4 | [
"MIT"
] | 2 | 2017-11-22T02:51:25.000Z | 2017-11-27T10:50:22.000Z | utils/content_process.py | NCU-NLP/news_feed | af2097c5b815c45c6089824759b50c64e51955e4 | [
"MIT"
] | 4 | 2017-11-12T14:13:16.000Z | 2021-06-01T21:56:17.000Z | utils/content_process.py | NCU-NLP/news_feed | af2097c5b815c45c6089824759b50c64e51955e4 | [
"MIT"
] | 7 | 2017-11-01T12:46:17.000Z | 2020-05-14T01:20:45.000Z | # --*-- coding: utf-8 --*--
import os
import sys
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__),".."))
sys.path.append(BASE_DIR)
from urllib.parse import urlparse
from utils.blacklist import blacklist_url, blacklist_text
def complement_url(url, site):
"""
通过匹配给定的url以及当前site,对某些奇怪的url做一些拼接... | 25.213483 | 90 | 0.580214 |
55546cce413f54607fb5e6990fa33e541e1f130e | 477 | py | Python | day10b.py | jjayala1/adventofCode2020 | d5587fd812368d2ff24f215d904ddf258dd0a4a8 | [
"MIT"
] | null | null | null | day10b.py | jjayala1/adventofCode2020 | d5587fd812368d2ff24f215d904ddf258dd0a4a8 | [
"MIT"
] | null | null | null | day10b.py | jjayala1/adventofCode2020 | d5587fd812368d2ff24f215d904ddf258dd0a4a8 | [
"MIT"
] | null | null | null | def clean_data():
f = open('day10b.txt','r')
data = [int(x.replace('\n','')) for x in f.readlines()]
data.sort()
return data
def part2(data):
data.sort()
print(data)
ans = {}
ans[0] = 1
for a in data:
ans[a] = ans.get(a-1,0) + ans.get(a-2,0) + ans.get(a-3,0)
prin... | 18.346154 | 68 | 0.534591 |
031c9e1bbcbe30c61880f84c4a099f88f0e5e9e2 | 2,607 | py | Python | neutron/tests/unit/objects/test_l3_hamode.py | EwaldvanGeffen/neutron | 858d7f33950a80c73501377a4b2cd36b915d0f40 | [
"Apache-2.0"
] | 1,080 | 2015-01-04T08:35:00.000Z | 2022-03-27T09:15:52.000Z | neutron/tests/unit/objects/test_l3_hamode.py | EwaldvanGeffen/neutron | 858d7f33950a80c73501377a4b2cd36b915d0f40 | [
"Apache-2.0"
] | 24 | 2015-02-21T01:48:28.000Z | 2021-11-26T02:38:56.000Z | neutron/tests/unit/objects/test_l3_hamode.py | EwaldvanGeffen/neutron | 858d7f33950a80c73501377a4b2cd36b915d0f40 | [
"Apache-2.0"
] | 1,241 | 2015-01-02T10:47:10.000Z | 2022-03-27T09:42:23.000Z | # Copyright (c) 2016 Intel Corporation.
#
# 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 la... | 34.76 | 78 | 0.705792 |
0e78fc8289bd3f8d399dae5d35e42c1debac7c56 | 4,670 | py | Python | Chapter04/cnn/dogs_cats/dataset.py | PacktPublishing/Neural-Network-Programming-with-TensorFlow | 6ab03d8bfc8b23217968e7f71b656e3afc8bd7a0 | [
"MIT"
] | 26 | 2017-11-17T18:56:16.000Z | 2022-03-03T13:25:44.000Z | Chapter04/cnn/dogs_cats/dataset.py | PacktPublishing/Neural-Network-Programming-with-TensorFlow | 6ab03d8bfc8b23217968e7f71b656e3afc8bd7a0 | [
"MIT"
] | 2 | 2021-08-25T14:50:10.000Z | 2022-02-09T23:30:51.000Z | Chapter04/cnn/dogs_cats/dataset.py | PacktPublishing/Neural-Network-Programming-with-TensorFlow | 6ab03d8bfc8b23217968e7f71b656e3afc8bd7a0 | [
"MIT"
] | 22 | 2017-11-16T05:16:38.000Z | 2022-01-03T20:10:04.000Z | import os
import glob
import numpy as np
import cv2
from sklearn.utils import shuffle
def load_train(train_path, image_size, classes):
images = []
labels = []
ids = []
cls = []
print('Reading training images')
for fld in classes: # assuming data directory has a separate folder for each clas... | 28.47561 | 135 | 0.672377 |
44aaef4a76f9a328bb5bbe0c2682cb988523c318 | 57,469 | py | Python | from_3b1b/old/eola/chapter8.py | adornetejr/manim | e0715ceeff4778d11ef4ac31f8f8f2b56a2187ad | [
"MIT"
] | 48 | 2021-06-28T01:48:01.000Z | 2022-03-31T18:22:32.000Z | from_3b1b/old/eola/chapter8.py | im-AMS/manim | 19e3c97589181ffd43ef14d9169af4e40e054664 | [
"MIT"
] | 5 | 2021-03-19T11:41:36.000Z | 2022-03-12T00:20:16.000Z | from_3b1b/old/eola/chapter8.py | im-AMS/manim | 19e3c97589181ffd43ef14d9169af4e40e054664 | [
"MIT"
] | 15 | 2021-06-28T07:48:36.000Z | 2022-03-23T03:05:11.000Z | from manimlib.imports import *
from from_3b1b.old.eola.chapter5 import get_det_text, RightHandRule
U_COLOR = ORANGE
V_COLOR = YELLOW
W_COLOR = MAROON_B
P_COLOR = RED
def get_vect_tex(*strings):
result = ["\\vec{\\textbf{%s}}"%s for s in strings]
if len(result) == 1:
return result[0]
else:
... | 33.666667 | 96 | 0.549653 |
85041138686146969259245e70213f0379534c25 | 714 | py | Python | lis/configs/557WW-7.4-FOC/JULES/single_snow_layer/gen_time.py | KathyNie/LISF | 5c3e8b94494fac5ff76a1a441a237e32af420d06 | [
"Apache-2.0"
] | 67 | 2018-11-13T21:40:54.000Z | 2022-02-23T08:11:56.000Z | lis/configs/557WW-7.4-FOC/NRT_GLOBAL/JULES/single_snow_layer/gen_time.py | dmocko/LISF | 08d024d6d5fe66db311e43e78740842d653749f4 | [
"Apache-2.0"
] | 679 | 2018-11-13T20:10:29.000Z | 2022-03-30T19:55:25.000Z | lis/configs/557WW-7.4-FOC/NRT_GLOBAL/JULES/single_snow_layer/gen_time.py | dmocko/LISF | 08d024d6d5fe66db311e43e78740842d653749f4 | [
"Apache-2.0"
] | 119 | 2018-11-08T15:53:35.000Z | 2022-03-28T10:16:01.000Z | #-----------------------BEGIN NOTICE -- DO NOT EDIT-----------------------
# NASA Goddard Space Flight Center
# Land Information System Framework (LISF)
# Version 7.3
#
# Copyright (c) 2020 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights ... | 31.043478 | 81 | 0.602241 |
7d65cb9bb46fe0dcb7c7f34d3296d83ed3d97661 | 23,300 | py | Python | git/test/test_index.py | FlorianLudwig/GitPython | c08f4350b9e4c791bc928303af16642ab9e308fe | [
"BSD-3-Clause"
] | 1 | 2020-03-25T16:04:59.000Z | 2020-03-25T16:04:59.000Z | git/test/test_index.py | FlorianLudwig/GitPython | c08f4350b9e4c791bc928303af16642ab9e308fe | [
"BSD-3-Clause"
] | null | null | null | git/test/test_index.py | FlorianLudwig/GitPython | c08f4350b9e4c791bc928303af16642ab9e308fe | [
"BSD-3-Clause"
] | null | null | null | # test_index.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
from git.test.lib import (
TestBase,
with_rw_repo,
fixture_path,
fi... | 34.467456 | 134 | 0.722146 |
813644c4dee801dfc52d80a22e53f5a5a847b868 | 582 | py | Python | tests/linear_model/test_perceptron.py | akoury/dask-ml | c704d0d036da90684ade98d4f2ba0006c5c3df0e | [
"BSD-3-Clause"
] | null | null | null | tests/linear_model/test_perceptron.py | akoury/dask-ml | c704d0d036da90684ade98d4f2ba0006c5c3df0e | [
"BSD-3-Clause"
] | null | null | null | tests/linear_model/test_perceptron.py | akoury/dask-ml | c704d0d036da90684ade98d4f2ba0006c5c3df0e | [
"BSD-3-Clause"
] | null | null | null | import pytest
from sklearn.linear_model import Perceptron
from dask_ml.linear_model import PartialPerceptron
from dask_ml.utils import assert_estimator_equal
@pytest.mark.filterwarnings("ignore:'Partial:FutureWarning")
class TestPerceptron(object):
def test_basic(self, single_chunk_classification):
X, y ... | 34.235294 | 70 | 0.731959 |
a69fa200790cbb2351cbab39dfe23b63df4c2f18 | 85,101 | py | Python | Spcht/Core/SpchtCore.py | jpkanter/efre-lod-elasticsearch-tools | eadc7e59fa813f8dea79d749096bc536042af294 | [
"Apache-2.0"
] | 2 | 2020-06-26T09:35:46.000Z | 2020-06-29T07:52:10.000Z | Spcht/Core/SpchtCore.py | jpkanter/efre-lod-elasticsearch-tools | eadc7e59fa813f8dea79d749096bc536042af294 | [
"Apache-2.0"
] | null | null | null | Spcht/Core/SpchtCore.py | jpkanter/efre-lod-elasticsearch-tools | eadc7e59fa813f8dea79d749096bc536042af294 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Copyright 2022 by Leipzig University Library, http://ub.uni-leipzig.de
# JP Kanter, <kanter@ub.uni-leipzig.de>
#
# This file is part of the Spcht.
#
# This program is free software: you can redistribute
# it and/or modify it under the terms of the GNU General P... | 51.922514 | 243 | 0.61494 |
dc84db24d048d853f96b9af4317104f895123eb2 | 1,970 | py | Python | pyckaxe/lib/pack/writable_pack.py | Arcensoth/pyckaxe | 09ed0828d6660a233b827721454293579329991b | [
"MIT"
] | 3 | 2018-09-23T05:16:44.000Z | 2021-12-23T03:06:07.000Z | pyckaxe/lib/pack/writable_pack.py | Arcensoth/pyckaxe | 09ed0828d6660a233b827721454293579329991b | [
"MIT"
] | 5 | 2018-07-11T02:31:56.000Z | 2018-07-11T03:15:05.000Z | pyckaxe/lib/pack/writable_pack.py | Arcensoth/pyckaxe | 09ed0828d6660a233b827721454293579329991b | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from pathlib import Path
from pyckaxe.lib.pack.abc.resource import Resource
from pyckaxe.lib.pack.physical_pack import PhysicalPack
from pyckaxe.lib.pack.physical_resource_location import PhysicalResourceLocation
from pyckaxe.lib.pack.resource_dumper_set import ResourceDumperSet
from ... | 33.965517 | 87 | 0.727919 |
3785b17c227819d4c40a914a1113061a6c46335d | 136 | py | Python | tests/basics/int_big_cmp.py | geowor01/micropython | 7fb13eeef4a85f21cae36f1d502bcc53880e1815 | [
"MIT"
] | 7 | 2019-10-18T13:41:39.000Z | 2022-03-15T17:27:57.000Z | tests/basics/int_big_cmp.py | geowor01/micropython | 7fb13eeef4a85f21cae36f1d502bcc53880e1815 | [
"MIT"
] | null | null | null | tests/basics/int_big_cmp.py | geowor01/micropython | 7fb13eeef4a85f21cae36f1d502bcc53880e1815 | [
"MIT"
] | 2 | 2020-06-23T09:10:15.000Z | 2020-12-22T06:42:14.000Z | # test bignum comparisons
i = 1 << 65
print(i == 0)
print(i != 0)
print(i < 0)
print(i > 0)
print(i <= 0)
print(i >= 0)
print("PASS") | 11.333333 | 25 | 0.558824 |
a8eaa3cafc05ca75059e8920a090fc6136cdbf3d | 105 | py | Python | vo2mft/twodof_environment.py | tflovorn/vo2mft | 734f691ba2dd245601bf3835be481e2f061723bc | [
"MIT"
] | null | null | null | vo2mft/twodof_environment.py | tflovorn/vo2mft | 734f691ba2dd245601bf3835be481e2f061723bc | [
"MIT"
] | null | null | null | vo2mft/twodof_environment.py | tflovorn/vo2mft | 734f691ba2dd245601bf3835be481e2f061723bc | [
"MIT"
] | 1 | 2020-08-18T15:11:23.000Z | 2020-08-18T15:11:23.000Z | def Jtot(env):
return 4.0 * env["Jb0"] + 2.0 * env["Jc0"]
def Jbe(env):
return 4.0 * env["Jb0"]
| 17.5 | 46 | 0.52381 |
92c7983ee2c4021fdaa90fe6edf6da71370654ee | 1,506 | py | Python | tests/test_model/test_recognizer/test_resnet.py | YinAoXiong/ZCls | 8aeea3640f8456937db35d043e37cf2c03ac9017 | [
"Apache-2.0"
] | 110 | 2021-02-04T14:32:57.000Z | 2022-03-30T01:51:56.000Z | tests/test_model/test_recognizer/test_resnet.py | YinAoXiong/ZCls | 8aeea3640f8456937db35d043e37cf2c03ac9017 | [
"Apache-2.0"
] | 8 | 2021-04-11T02:46:57.000Z | 2021-12-14T19:30:58.000Z | tests/test_model/test_recognizer/test_resnet.py | YinAoXiong/ZCls | 8aeea3640f8456937db35d043e37cf2c03ac9017 | [
"Apache-2.0"
] | 20 | 2021-02-07T14:17:07.000Z | 2022-03-22T05:20:40.000Z | # -*- coding: utf-8 -*-
"""
@date: 2020/11/21 下午4:16
@file: test_resnest.py
@author: zj
@description:
"""
import torch
from zcls.config import cfg
from zcls.config.key_word import KEY_OUTPUT
from zcls.model.recognizers.resnet.resnet import ResNet
from zcls.model.recognizers.resnet.torchvision_resnet import build_to... | 25.525424 | 87 | 0.715803 |
2398fc44161d55aff6e645df66ca207cad29394e | 26,353 | py | Python | onadata/apps/api/tests/viewsets/test_xform_viewset.py | qedsoftware/kobocat | 273e06a352350d69a8fb4624bcab74d601e35ba6 | [
"BSD-2-Clause"
] | 1 | 2019-12-05T14:29:23.000Z | 2019-12-05T14:29:23.000Z | onadata/apps/api/tests/viewsets/test_xform_viewset.py | qedsoftware/kobocat | 273e06a352350d69a8fb4624bcab74d601e35ba6 | [
"BSD-2-Clause"
] | 4 | 2018-01-20T12:06:00.000Z | 2020-01-21T23:13:37.000Z | onadata/apps/api/tests/viewsets/test_xform_viewset.py | qedsoftware/kobocat | 273e06a352350d69a8fb4624bcab74d601e35ba6 | [
"BSD-2-Clause"
] | null | null | null | # coding=utf-8
import json
import os
import re
import requests
import pytz
import unittest
from datetime import datetime
from django.utils import timezone
from django.conf import settings
from httmock import urlmatch, HTTMock
from rest_framework import status
from xml.dom import minidom, Node
from onadata.apps.api.te... | 38.527778 | 79 | 0.60384 |
570842617f3201d0e7a5d869cd021cfbb7d81f3a | 7,648 | py | Python | struct2tensor/prensor.py | priyansh19/struct2tensor | 1b9ada0c4018323a0549cc13437c561d39a46a05 | [
"Apache-2.0"
] | 2 | 2019-07-25T12:53:00.000Z | 2019-08-18T16:26:13.000Z | struct2tensor/prensor.py | priyansh19/struct2tensor | 1b9ada0c4018323a0549cc13437c561d39a46a05 | [
"Apache-2.0"
] | null | null | null | struct2tensor/prensor.py | priyansh19/struct2tensor | 1b9ada0c4018323a0549cc13437c561d39a46a05 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 28.325926 | 99 | 0.693253 |
2c9337b5ab5024c4474bb2b0036a8e3802766061 | 4,296 | py | Python | gogamechen2/api/rpc/taskflow/hotfix.py | lolizeppelin/gogamechen2 | eaa27a43671e0a14eab184e6adfb5ca150975ac6 | [
"MIT"
] | null | null | null | gogamechen2/api/rpc/taskflow/hotfix.py | lolizeppelin/gogamechen2 | eaa27a43671e0a14eab184e6adfb5ca150975ac6 | [
"MIT"
] | null | null | null | gogamechen2/api/rpc/taskflow/hotfix.py | lolizeppelin/gogamechen2 | eaa27a43671e0a14eab184e6adfb5ca150975ac6 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
import os
from simpleutil.config import cfg
from simpleutil.log import log as logging
from simpleutil.utils import systemutils
from simpleutil.utils.zlibutils.excluder import Excluder
from simpleflow.api import load
from simpleflow.storage import Connection
from simpleflow.storage.middleware imp... | 35.213115 | 94 | 0.660615 |
38f813555d2d4c1ab2eb80e110ef720293c6996d | 1,933 | py | Python | csbdeep/internals/probability.py | Takuya1031/CSBDeep | 75877938b329173fb33cc19b2d96a773ed000b62 | [
"BSD-3-Clause"
] | 205 | 2018-02-27T09:54:56.000Z | 2022-03-24T02:20:02.000Z | csbdeep/internals/probability.py | Takuya1031/CSBDeep | 75877938b329173fb33cc19b2d96a773ed000b62 | [
"BSD-3-Clause"
] | 59 | 2018-02-07T07:56:59.000Z | 2022-02-03T14:05:23.000Z | csbdeep/internals/probability.py | Takuya1031/CSBDeep | 75877938b329173fb33cc19b2d96a773ed000b62 | [
"BSD-3-Clause"
] | 81 | 2018-06-02T15:03:19.000Z | 2022-03-12T08:43:17.000Z | from __future__ import print_function, unicode_literals, absolute_import, division
from six.moves import range, zip, map, reduce, filter
from ..utils import _raise, consume
import warnings
import numpy as np
from scipy.stats import laplace
class ProbabilisticPrediction(object):
"""Laplace distribution (independ... | 28.426471 | 89 | 0.601138 |
fb31bdb7c14b490e063fc16436c93daf3c6f5818 | 117 | py | Python | contacts/urls.py | pstevek/btre-django | 3407a40831f0c8a7d0e5174eff726a074bea946e | [
"MIT"
] | null | null | null | contacts/urls.py | pstevek/btre-django | 3407a40831f0c8a7d0e5174eff726a074bea946e | [
"MIT"
] | 12 | 2021-03-19T11:50:53.000Z | 2022-03-12T00:40:47.000Z | contacts/urls.py | pstevek/btre-django | 3407a40831f0c8a7d0e5174eff726a074bea946e | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.make_inquiry, name='contact'),
] | 19.5 | 49 | 0.700855 |
77f53391c2802472b4542895ec15e023081a69c3 | 1,347 | py | Python | cogs/currency.py | WoW-E/C3PO | a3daec66a8f1820e3730b11734dcaa2f5608584a | [
"BSD-3-Clause"
] | 1 | 2021-04-05T12:22:47.000Z | 2021-04-05T12:22:47.000Z | cogs/currency.py | WoW-E/E-WoW | a3daec66a8f1820e3730b11734dcaa2f5608584a | [
"BSD-3-Clause"
] | null | null | null | cogs/currency.py | WoW-E/E-WoW | a3daec66a8f1820e3730b11734dcaa2f5608584a | [
"BSD-3-Clause"
] | null | null | null | import json
import discord
from discord.ext import commands
class Balance(commands.Cog):
def __init__(self, client):
self.client = client
@commands.command(name="balance", aliases=['bal', 'cash', 'money'])
async def balance(self, ctx, *, user: discord.User = None):
with open("json_files... | 30.613636 | 87 | 0.564959 |
6a2a796b26ddee71f356bd06938f906af9d1401d | 4,473 | py | Python | agml/backend/config.py | Project-AgML/AgML | 1f57c886d29082d79d9a4fa1566a9209f5d04ab3 | [
"Apache-2.0"
] | 16 | 2021-12-31T05:18:57.000Z | 2022-03-28T21:50:40.000Z | agml/backend/config.py | Project-AgML/AgML | 1f57c886d29082d79d9a4fa1566a9209f5d04ab3 | [
"Apache-2.0"
] | 5 | 2021-10-29T20:15:00.000Z | 2021-12-01T13:34:02.000Z | agml/backend/config.py | Project-AgML/AgML | 1f57c886d29082d79d9a4fa1566a9209f5d04ab3 | [
"Apache-2.0"
] | 2 | 2022-01-13T15:08:58.000Z | 2022-02-14T21:33:26.000Z | # Copyright 2021 UC Davis Plant AI and Biophysics Lab
#
# 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 ... | 37.275 | 81 | 0.691706 |
a2eca6bf88985fa550405f14ba69006e6f614db1 | 51 | py | Python | python-网易云音乐爬虫music_163/__init__.py | wangchuanli001/Project-experience | b563c5c3afc07c913c2e1fd25dff41c70533f8de | [
"Apache-2.0"
] | 12 | 2019-12-07T01:44:55.000Z | 2022-01-27T14:13:30.000Z | python-网易云音乐爬虫music_163/__init__.py | hujiese/Project-experience | b563c5c3afc07c913c2e1fd25dff41c70533f8de | [
"Apache-2.0"
] | 23 | 2020-05-23T03:56:33.000Z | 2022-02-28T07:54:45.000Z | python-网易云音乐爬虫music_163/__init__.py | hujiese/Project-experience | b563c5c3afc07c913c2e1fd25dff41c70533f8de | [
"Apache-2.0"
] | 7 | 2019-12-20T04:48:56.000Z | 2021-11-19T02:23:45.000Z | """
__init__.py 用于告诉 Python 这个文件夹是一个 Python 的包
"""
| 12.75 | 42 | 0.705882 |
7a95ff19dcb3bbf8d9b804d9abd92fe215869daa | 4,108 | py | Python | marathon_deploy/utils/events.py | minitux/marathon-deploy | f3a409cba665904a7ad6d078ce8e5c8d5bd1eca3 | [
"Apache-2.0"
] | null | null | null | marathon_deploy/utils/events.py | minitux/marathon-deploy | f3a409cba665904a7ad6d078ce8e5c8d5bd1eca3 | [
"Apache-2.0"
] | 1 | 2019-10-10T15:46:32.000Z | 2019-10-10T20:17:19.000Z | marathon_deploy/utils/events.py | minitux/marathon-deploy | f3a409cba665904a7ad6d078ce8e5c8d5bd1eca3 | [
"Apache-2.0"
] | 4 | 2017-12-29T15:06:14.000Z | 2019-10-09T12:45:45.000Z | from marathon import MarathonClient, MarathonApp
from marathon.models.deployment import MarathonDeployment
from typing import Union
import time
import sys
# TODO: Timeout mechanism
def wait_for_event(client: MarathonClient, event: str, deployment_id: str):
for evt in client.event_stream():
if evt.event_ty... | 42.350515 | 118 | 0.608812 |
e3c68f1b2eeb1e63a71c3d50bf034df7deafd04b | 676 | py | Python | tree/572_subtree_of_another_tree.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | tree/572_subtree_of_another_tree.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | tree/572_subtree_of_another_tree.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | 2 | 2020-02-07T20:49:02.000Z | 2020-02-11T06:01:55.000Z | class Solution(object):
def isSubtree(self, s, t):
"""
:type s: TreeNode
:type t: TreeNode
:rtype: bool
"""
def isSameTree(t1, t2):
if not t1 and not t2:
return True
if not t1 or not t2:
return False
... | 30.727273 | 84 | 0.491124 |
33db12ba9c7b119259fc918a70c029a99aea0c68 | 3,953 | py | Python | python/paddle/v2/fluid/tests/test_cos_sim_op.py | jczaja/Paddle | 07923ba006220bf39ebd9fcf19c6b930012e5139 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-03-14T05:20:07.000Z | 2019-03-14T05:20:07.000Z | python/paddle/v2/fluid/tests/test_cos_sim_op.py | boru-roylu/Paddle | b15c675530db541440ddb5b7e774d522ecaf1533 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | python/paddle/v2/fluid/tests/test_cos_sim_op.py | boru-roylu/Paddle | b15c675530db541440ddb5b7e774d522ecaf1533 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
#
# 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 appl... | 36.601852 | 79 | 0.594232 |
db324631015b39e35d9e924f8d186b33957f28e0 | 17,116 | py | Python | respy/tests/test_integration.py | tobiasraabe/respy_for_ma | 405f40851b176705fe924220fba606263d47f3d6 | [
"MIT"
] | null | null | null | respy/tests/test_integration.py | tobiasraabe/respy_for_ma | 405f40851b176705fe924220fba606263d47f3d6 | [
"MIT"
] | null | null | null | respy/tests/test_integration.py | tobiasraabe/respy_for_ma | 405f40851b176705fe924220fba606263d47f3d6 | [
"MIT"
] | null | null | null | import copy
import random
import numpy as np
import pandas as pd
import pytest
from pandas.util.testing import assert_frame_equal
from respy import RespyCls
from respy.custom_exceptions import UserError
from respy.pre_processing.data_processing import process_dataset
from respy.python.shared.shared_auxiliary import c... | 36.808602 | 96 | 0.613636 |
8c70b6a8b44b159ec55e613233c1e24d0cadd9c5 | 12,147 | py | Python | paddlevideo/modeling/backbones/bmn.py | 0shelter0/pingpong_action_temport_generation_based_Paddle | 6d30d75ee0cc13a802539415ce18b024b87b7d37 | [
"Apache-2.0"
] | 1 | 2022-03-07T04:27:02.000Z | 2022-03-07T04:27:02.000Z | paddlevideo/modeling/backbones/bmn.py | 0shelter0/pingpong_action_temport_generation_based_Paddle | 6d30d75ee0cc13a802539415ce18b024b87b7d37 | [
"Apache-2.0"
] | null | null | null | paddlevideo/modeling/backbones/bmn.py | 0shelter0/pingpong_action_temport_generation_based_Paddle | 6d30d75ee0cc13a802539415ce18b024b87b7d37 | [
"Apache-2.0"
] | 1 | 2022-03-07T10:51:21.000Z | 2022-03-07T10:51:21.000Z | # Copyright (c) 2020 PaddlePaddle 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 applic... | 36.477477 | 120 | 0.585165 |
51aa117335637f92c2bc3d9775beaaa67d92e076 | 2,103 | py | Python | tests/views/categories_test.py | Yelp/schematizer | 035845d27945a05db475f00eb76f59e8825dbaa4 | [
"Apache-2.0"
] | 86 | 2016-11-17T17:39:13.000Z | 2021-06-01T15:19:05.000Z | tests/views/categories_test.py | tomzhang/schematizer | 035845d27945a05db475f00eb76f59e8825dbaa4 | [
"Apache-2.0"
] | 2 | 2016-12-01T20:57:43.000Z | 2021-09-28T09:26:25.000Z | tests/views/categories_test.py | tomzhang/schematizer | 035845d27945a05db475f00eb76f59e8825dbaa4 | [
"Apache-2.0"
] | 26 | 2016-11-29T22:38:11.000Z | 2021-03-02T19:44:17.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 Yelp Inc.
#
# 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 ag... | 33.919355 | 75 | 0.748455 |
3a1fe1d9d3e28dc7897c0c9bdc47321a3c182cd7 | 13,130 | py | Python | tests/test_config_entries.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | tests/test_config_entries.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | tests/test_config_entries.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | 1 | 2021-03-13T18:15:31.000Z | 2021-03-13T18:15:31.000Z | """Test the config manager."""
import asyncio
from unittest.mock import MagicMock, patch, mock_open
import pytest
import voluptuous as vol
from homeassistant import config_entries, loader
from homeassistant.setup import async_setup_component
from tests.common import MockModule, mock_coro, MockConfigEntry
@pytest.f... | 32.98995 | 76 | 0.634349 |
71178e297d44faf1a11f90e10de63e8392ffb6a1 | 2,108 | py | Python | two_armed_bandit/bandit_example.py | mmmfarrell/DeepPathPlanning | 96d0a4a26312774f9eb9c2d591d75702d5b01dbe | [
"MIT"
] | 1 | 2021-03-23T06:25:15.000Z | 2021-03-23T06:25:15.000Z | two_armed_bandit/bandit_example.py | mmmfarrell/DeepPathPlanning | 96d0a4a26312774f9eb9c2d591d75702d5b01dbe | [
"MIT"
] | null | null | null | two_armed_bandit/bandit_example.py | mmmfarrell/DeepPathPlanning | 96d0a4a26312774f9eb9c2d591d75702d5b01dbe | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
# Define our bandits
bandits = [0.2, 0, -0.2, -5]
num_bandits = len(bandits)
def pull_bandit(bandit):
# get a random number
rand = np.random.randn(1)
if rand > bandit:
# return a positve reward
return 1
else:
return -1
tf.reset_defaul... | 29.277778 | 129 | 0.68074 |
ed26c46148c5e65f33f1aafe6fbe8d260539bfe3 | 8,648 | py | Python | pylearn2/datasets/filetensor.py | Menerve/pylearn2 | ad7bcfda3294404aebd71f5a5c4a8623d401a98e | [
"BSD-3-Clause"
] | 1 | 2015-11-05T19:33:07.000Z | 2015-11-05T19:33:07.000Z | pylearn2/datasets/filetensor.py | Menerve/pylearn2 | ad7bcfda3294404aebd71f5a5c4a8623d401a98e | [
"BSD-3-Clause"
] | null | null | null | pylearn2/datasets/filetensor.py | Menerve/pylearn2 | ad7bcfda3294404aebd71f5a5c4a8623d401a98e | [
"BSD-3-Clause"
] | null | null | null | """
Read and write the matrix file format described at
http://www.cs.nyu.edu/~ylclab/data/norb-v1.0/index.html
The format is for dense tensors:
- magic number indicating type and endianness - 4bytes
- rank of tensor - int32
- dimensions - int32, int32, int32, ...
- <data>
The number of dimensions and rank is slight... | 29.616438 | 102 | 0.599214 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.