hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79839d366662601072006e3b6b3f8cfb95c79ab4 | 3,467 | py | Python | Entities/Asteroid/Asteroid.py | irisSchaffer/component-based-asteroids | 0e82a6cb5ab7519d82f53179a242f48520ae9ab3 | [
"Apache-2.0"
] | null | null | null | Entities/Asteroid/Asteroid.py | irisSchaffer/component-based-asteroids | 0e82a6cb5ab7519d82f53179a242f48520ae9ab3 | [
"Apache-2.0"
] | null | null | null | Entities/Asteroid/Asteroid.py | irisSchaffer/component-based-asteroids | 0e82a6cb5ab7519d82f53179a242f48520ae9ab3 | [
"Apache-2.0"
] | null | null | null | '''
Created on 13.02.2015
@author: Iris
'''
from Component.Component import Component
from Component.LifeCycle import LifeCycle
from Component.PoseTransmitter import PoseTransmitter
from Component.PolyVisual import PolyVisual
from Collision.AabbCollider import AabbCollider
from Physics.Body import Body
from Component... | 35.377551 | 130 | 0.635131 |
79839ed046b92c5f7107e5cea19beef2882ac2e5 | 620 | py | Python | scripts/Todos los caracteres.py | killetter/allcaps | c4f2e81077fe1d4705b81e8bf2bf2d672401e533 | [
"RSA-MD"
] | null | null | null | scripts/Todos los caracteres.py | killetter/allcaps | c4f2e81077fe1d4705b81e8bf2bf2d672401e533 | [
"RSA-MD"
] | null | null | null | scripts/Todos los caracteres.py | killetter/allcaps | c4f2e81077fe1d4705b81e8bf2bf2d672401e533 | [
"RSA-MD"
] | 1 | 2021-08-18T17:10:43.000Z | 2021-08-18T17:10:43.000Z | path = "/Users/imac/Documents/Torneo 2/Allcaps_git/allcaps/fonts/AC-Jade-Regular.otf"
nombre = 'Noto_DT_ Miguel3'
margen_x= 39.99
margen_y = 30
fs = FormattedString()
font(path)
x=listFontGlyphNames()
#print(x)
fs.font(path)
#print(x)
fs.fontSize(135)
fs.lineHeight(141.22)
fs.fill(1.00,0.93,0.00)
for i, name in enumer... | 22.142857 | 99 | 0.682258 |
79839fd9d78d7b3dac4a348e017e5c36007c9dd2 | 740 | py | Python | geo/data/f_add_geo.py | liucsny/Processing-Data | 41eb12ecb53869771d266e1d9afccd39d4ca8234 | [
"MIT"
] | null | null | null | geo/data/f_add_geo.py | liucsny/Processing-Data | 41eb12ecb53869771d266e1d9afccd39d4ca8234 | [
"MIT"
] | null | null | null | geo/data/f_add_geo.py | liucsny/Processing-Data | 41eb12ecb53869771d266e1d9afccd39d4ca8234 | [
"MIT"
] | null | null | null | import pandas as pd
import pprint as pp
df=pd.read_csv("f_cleaned.csv");
df_geo=pd.read_csv("f_geo.csv");
print(df)
print(df_geo)
df["谷歌地图经度"]=0.0
df["谷歌地图纬度"]=0.0
keyWord=list(df_geo["关键词"])
# count=0
for index,rows in df.iterrows():
print(rows.MOBILEAREA)
if rows.MOBILEAREA in keyWord:
df.set_value(index,"谷... | 19.473684 | 73 | 0.712162 |
7983a02c174a38c7405a76eb1f1699e536fe8dae | 12,627 | py | Python | dashboard/tests/test_dashboard.py | hekaisheng/ray | 05fe6dc278126352e830a21b408027bd7a8cfd78 | [
"Apache-2.0"
] | 1 | 2021-04-08T12:02:58.000Z | 2021-04-08T12:02:58.000Z | dashboard/tests/test_dashboard.py | hekaisheng/ray | 05fe6dc278126352e830a21b408027bd7a8cfd78 | [
"Apache-2.0"
] | null | null | null | dashboard/tests/test_dashboard.py | hekaisheng/ray | 05fe6dc278126352e830a21b408027bd7a8cfd78 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import json
import time
import logging
import asyncio
import aiohttp.web
import ray
import psutil
import pytest
import redis
import requests
from ray import ray_constants
from ray.test_utils import (
format_web_url,
wait_for_condition,
wait_until_server_available,
run_string_as_dr... | 34.5 | 80 | 0.657718 |
7983a05e680b8291767a309928ce1980420a652e | 6,453 | py | Python | core/utils/utils.py | vsilent/smarty-bot | 963cba05433be14494ba339343c9903ccab3c37d | [
"MIT"
] | 1 | 2016-10-08T09:01:05.000Z | 2016-10-08T09:01:05.000Z | core/utils/utils.py | vsilent/smarty-bot | 963cba05433be14494ba339343c9903ccab3c37d | [
"MIT"
] | 1 | 2019-09-24T09:56:52.000Z | 2019-09-24T09:56:52.000Z | core/utils/utils.py | vsilent/smarty-bot | 963cba05433be14494ba339343c9903ccab3c37d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import json
from shutil import copy
from core.config.settings import logger
import subprocess
import types
#from pprint import pprint
from core.config import settings
class Utils:
"""class Util"""
def __str__(self):
return 'Util'
... | 31.173913 | 84 | 0.565783 |
7983a08edc01dcc843a96de15d5eec2c76de3bb0 | 1,248 | py | Python | scraping_scripts/boxscores.py | damansc/NBA_DFS | 493ca62e47311b05dc0dba2739823e7c9f785671 | [
"MIT"
] | 2 | 2020-04-29T00:02:45.000Z | 2021-10-05T07:32:02.000Z | scraping_scripts/boxscores.py | damansc/NBA_DFS | 493ca62e47311b05dc0dba2739823e7c9f785671 | [
"MIT"
] | null | null | null | scraping_scripts/boxscores.py | damansc/NBA_DFS | 493ca62e47311b05dc0dba2739823e7c9f785671 | [
"MIT"
] | null | null | null | import pandas as pd
from bs4 import BeautifulSoup
import requests
import numpy as np
import os
def get_boxscore_links(year='2020'):
"""
retrieves all links to every single available box score.
It seems that bball reference lags behind a bit.
I ran today (1/6/20) and only through 1/4/20 is up.
"""
... | 27.733333 | 108 | 0.643429 |
7983a0bc36f814b5864b056c89b49076c925fcd9 | 435 | py | Python | main/migrations/0003_auto_20150208_1831.py | oronibrian/Tenant | 42662797db54f8f169a570c920795c487ce3896a | [
"MIT"
] | 24 | 2015-01-28T20:02:27.000Z | 2021-10-03T15:29:44.000Z | main/migrations/0003_auto_20150208_1831.py | oronibrian/Tenant | 42662797db54f8f169a570c920795c487ce3896a | [
"MIT"
] | 31 | 2015-01-19T20:51:40.000Z | 2018-12-13T14:54:01.000Z | main/migrations/0003_auto_20150208_1831.py | oronibrian/Tenant | 42662797db54f8f169a570c920795c487ce3896a | [
"MIT"
] | 20 | 2015-11-15T14:07:20.000Z | 2021-10-03T17:07:42.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0002_auto_20150208_1810'),
]
operations = [
migrations.AlterField(
model_name='payment',
nam... | 21.75 | 80 | 0.622989 |
7983a0da6cec7e3c7e4b0767603794bbfe066595 | 3,119 | py | Python | sdk/python/pulumi_azure_nextgen/web/latest/list_connection_consent_links.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/web/latest/list_connection_consent_links.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/web/latest/list_connection_consent_links.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 39.987179 | 207 | 0.705675 |
7983a23c94ae81e89130cab9849e61cb15055482 | 1,724 | py | Python | step_2_training.py | houweidong2020/face_detect_by_camera | 75110c6715e5bd0c254b08440021712d587d0bd0 | [
"MIT"
] | null | null | null | step_2_training.py | houweidong2020/face_detect_by_camera | 75110c6715e5bd0c254b08440021712d587d0bd0 | [
"MIT"
] | null | null | null | step_2_training.py | houweidong2020/face_detect_by_camera | 75110c6715e5bd0c254b08440021712d587d0bd0 | [
"MIT"
] | null | null | null | #
# 人脸数据训练
"""
注:1.运行该程序前,请在人脸识别文件夹下创建face_trainer文件夹。
注:2.训练后的文件会保存在目录中。
"""
import numpy as np
from PIL import Image
import os
import cv2
# 人脸数据路径
__path__ = 'facedata'
__cascadefile__ = r'D:\works\python\opencv-450\data\haarcascades\haarcascade_frontalface_default.xml'
__training_... | 30.785714 | 106 | 0.602668 |
7983a24995c16494490c5e4d5520c6d2097dab9b | 1,512 | py | Python | main.py | SawshaDev/Discord-Webhook-fetcher | 47063c0f25bbc14108e8a704c055538b34f66d35 | [
"MIT"
] | null | null | null | main.py | SawshaDev/Discord-Webhook-fetcher | 47063c0f25bbc14108e8a704c055538b34f66d35 | [
"MIT"
] | 1 | 2022-01-27T04:49:53.000Z | 2022-01-27T05:14:54.000Z | main.py | SawshaDev/Discord-Webhook-fetcher | 47063c0f25bbc14108e8a704c055538b34f66d35 | [
"MIT"
] | null | null | null | import requests
from colorama import init, Style, Fore
import os
option = input("Please choose an option! \n 1: Webhook Deleter ; 2: Webhook spammer ; 3: Webhook Checker: ")
if option == "1":
os.system("cls")
webhook_picker = input("Please enter the webhook link you want to delete: ")
... | 26.526316 | 109 | 0.571429 |
7983a2de89dc7932f0f508ce5c9e564aed2216af | 1,664 | py | Python | tests/roundtrip_gltf.py | AlexLondonK/glTF-Blender-IO-OperatorLand468 | 5d976d3642b5ce885719a29976b83f8d6562713b | [
"Apache-2.0"
] | 3 | 2021-03-15T02:44:16.000Z | 2022-03-28T17:27:26.000Z | tests/roundtrip_gltf.py | AlexLondonK/glTF-Blender-IO-OperatorLand468 | 5d976d3642b5ce885719a29976b83f8d6562713b | [
"Apache-2.0"
] | null | null | null | tests/roundtrip_gltf.py | AlexLondonK/glTF-Blender-IO-OperatorLand468 | 5d976d3642b5ce885719a29976b83f8d6562713b | [
"Apache-2.0"
] | 1 | 2021-12-25T01:31:18.000Z | 2021-12-25T01:31:18.000Z | # Copyright (c) 2018 The Khronos Group 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 agreed ... | 32.627451 | 141 | 0.689303 |
7983a3b96cc8327e4bdd6ebb34183ef4cb6f9576 | 1,176 | py | Python | utils/img.py | liqiwudao/job | de95c56627336060234755ab8bbe0510ed112573 | [
"Apache-2.0"
] | 1 | 2017-06-10T04:14:34.000Z | 2017-06-10T04:14:34.000Z | utils/img.py | liqiwudao/job | de95c56627336060234755ab8bbe0510ed112573 | [
"Apache-2.0"
] | null | null | null | utils/img.py | liqiwudao/job | de95c56627336060234755ab8bbe0510ed112573 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8
from __future__ import print_function
import os, sys
import random
from PIL import Image
import imghdr
import base64
def ResizeImage(filein, fileout, width, height, i_type):
img = Image.open(filein)
out = img.resize((width, height), Image.ANTIALIAS) # resize image w... | 27.348837 | 88 | 0.586735 |
7983a481dc9957bc673552c2b5aa360862aa21f3 | 241 | py | Python | api/opentrons/instruments/__init__.py | heyoni/opentrons | abb4c742091d800541ed27273c6865fd5ba3aeac | [
"Apache-2.0"
] | null | null | null | api/opentrons/instruments/__init__.py | heyoni/opentrons | abb4c742091d800541ed27273c6865fd5ba3aeac | [
"Apache-2.0"
] | null | null | null | api/opentrons/instruments/__init__.py | heyoni/opentrons | abb4c742091d800541ed27273c6865fd5ba3aeac | [
"Apache-2.0"
] | null | null | null | from opentrons.instruments.magbead import Magbead
from opentrons.instruments.pipette import Pipette
__all__ = [
Magbead,
Pipette
]
def load(axis, name):
pass
def create(*args, **kwargs):
return Pipette(*args, **kwargs)
| 14.176471 | 49 | 0.705394 |
7983a55493981856af218139c3c96f7384d46d1d | 2,239 | py | Python | app/__init__.py | wuqundong520/ApiTestManage | ad6afcbb4876e4f9183ec9027009a8f027b41783 | [
"Apache-2.0"
] | 318 | 2018-07-06T08:47:52.000Z | 2022-03-29T08:50:29.000Z | app/__init__.py | wuqundong520/ApiTestManage | ad6afcbb4876e4f9183ec9027009a8f027b41783 | [
"Apache-2.0"
] | 6 | 2019-07-25T02:56:57.000Z | 2021-01-25T08:31:30.000Z | app/__init__.py | wuqundong520/ApiTestManage | ad6afcbb4876e4f9183ec9027009a8f027b41783 | [
"Apache-2.0"
] | 145 | 2018-07-06T14:00:15.000Z | 2022-02-23T07:20:18.000Z | # encoding: utf-8
import logging
import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from config import config
from config import config_log
from .util import global_variable # 初始化文件地址
from sqlalchemy import MetaData
from flask_apscheduler import APScheduler
f... | 29.077922 | 98 | 0.686021 |
7983a655ff1bea019d20128a252704e25c8b44ad | 1,698 | py | Python | airflow/example_dags/example_short_circuit_operator.py | wileeam/airflow | f46be8152a4d89c57db4ca46f5b3339e4876b723 | [
"Apache-2.0"
] | 8 | 2017-04-20T16:15:44.000Z | 2020-10-11T13:44:10.000Z | airflow/example_dags/example_short_circuit_operator.py | devlocalca/airflow | 58c3542ed25061320ce61dbe0adf451a44c738dd | [
"Apache-2.0"
] | 219 | 2017-03-15T18:40:16.000Z | 2022-02-28T22:52:43.000Z | airflow/example_dags/example_short_circuit_operator.py | devlocalca/airflow | 58c3542ed25061320ce61dbe0adf451a44c738dd | [
"Apache-2.0"
] | 3 | 2016-07-14T21:51:10.000Z | 2020-10-12T13:26:36.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 33.96 | 87 | 0.757951 |
7983a6890d8c0c23630452707e6753c7ff5c442a | 11,727 | py | Python | src/peeringdb/backend.py | peeringdb/peeringdb-py | 95c50d0c34cf770c476954efa318a870b64e8284 | [
"Apache-2.0"
] | 71 | 2015-11-10T04:55:54.000Z | 2022-02-25T20:03:48.000Z | src/peeringdb/backend.py | peeringdb/peeringdb-py | 95c50d0c34cf770c476954efa318a870b64e8284 | [
"Apache-2.0"
] | 53 | 2016-01-29T12:15:38.000Z | 2022-03-04T07:03:41.000Z | src/peeringdb/backend.py | peeringdb/peeringdb-py | 95c50d0c34cf770c476954efa318a870b64e8284 | [
"Apache-2.0"
] | 28 | 2016-02-03T07:59:34.000Z | 2022-02-27T19:25:06.000Z | import inspect
from functools import wraps
from peeringdb.resource import RESOURCES_BY_TAG
def reftag_to_cls(fn):
"""
decorator that checks function arguments for `concrete` and `resource`
and will properly set them to class references if a string (reftag) is
passed as the value
"""
spec = in... | 23.738866 | 80 | 0.58344 |
7983a7690cf0732c9678999e3f2570e223593665 | 8,899 | py | Python | py_vsys/contract/lock_ctrt.py | josephzxy/py-vsys | 7046f052259bc04d05717833f97f3f37d89b82db | [
"BSD-4-Clause"
] | 1 | 2022-01-29T09:48:32.000Z | 2022-01-29T09:48:32.000Z | py_vsys/contract/lock_ctrt.py | josephzxy/py-vsys | 7046f052259bc04d05717833f97f3f37d89b82db | [
"BSD-4-Clause"
] | 12 | 2022-01-18T08:03:37.000Z | 2022-02-21T07:56:02.000Z | py_vsys/contract/lock_ctrt.py | josephzxy/py-vsys | 7046f052259bc04d05717833f97f3f37d89b82db | [
"BSD-4-Clause"
] | 4 | 2022-01-13T01:21:59.000Z | 2022-01-26T03:18:36.000Z | """
lock_ctrt contains Lock contract.
"""
from __future__ import annotations
from typing import TYPE_CHECKING, Dict, Any, Optional
from loguru import logger
# https://stackoverflow.com/a/39757388
if TYPE_CHECKING:
from py_vsys import chain as ch
from py_vsys import account as acnt
from py_vsys import data_en... | 32.837638 | 834 | 0.610293 |
7983a7ea9e7508d1624a6d2682db4d04d6ea7620 | 10,919 | py | Python | dataset/transform.py | s-mizuki-nlp/semantic_specialization | 4d00a461f18828ee8ebaccf7c737a32ccc11809f | [
"Apache-2.0"
] | null | null | null | dataset/transform.py | s-mizuki-nlp/semantic_specialization | 4d00a461f18828ee8ebaccf7c737a32ccc11809f | [
"Apache-2.0"
] | null | null | null | dataset/transform.py | s-mizuki-nlp/semantic_specialization | 4d00a461f18828ee8ebaccf7c737a32ccc11809f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import division
from __future__ import print_function
from typing import Dict, Callable, Optional, List, Tuple, Union
from collections import defaultdict, Counter
import os, sys, ... | 41.048872 | 142 | 0.66105 |
7983a8ae13a620b0e8882c0dfb8766ca72d4163b | 976 | py | Python | alembic/versions/483c067e97af_add_user_foreignkey.py | Chise1/ToDoList | 22e5f371a2c84e3d38ba555940cb04beb30edb02 | [
"Apache-2.0"
] | null | null | null | alembic/versions/483c067e97af_add_user_foreignkey.py | Chise1/ToDoList | 22e5f371a2c84e3d38ba555940cb04beb30edb02 | [
"Apache-2.0"
] | null | null | null | alembic/versions/483c067e97af_add_user_foreignkey.py | Chise1/ToDoList | 22e5f371a2c84e3d38ba555940cb04beb30edb02 | [
"Apache-2.0"
] | null | null | null | """add user foreignkey
Revision ID: 483c067e97af
Revises: 2869daa0af99
Create Date: 2021-02-28 12:39:43.813336
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '483c067e97af'
down_revision = '2869daa0af99'
branch_labels = None
depends_on = None
def upgrade():
... | 26.378378 | 65 | 0.675205 |
7983a8ece1da8d6172ad66746645b34b4afb8f2d | 3,907 | py | Python | meetpy/meetups/views.py | MattBlack85/meetpy | 1cdf1a9d2dc413e0729cce16e6269ab86beb76af | [
"MIT"
] | null | null | null | meetpy/meetups/views.py | MattBlack85/meetpy | 1cdf1a9d2dc413e0729cce16e6269ab86beb76af | [
"MIT"
] | null | null | null | meetpy/meetups/views.py | MattBlack85/meetpy | 1cdf1a9d2dc413e0729cce16e6269ab86beb76af | [
"MIT"
] | null | null | null | from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.contrib.syndication import views as syndication_views
from django.core.mail import send_mail
from django.urls import reverse_lazy
from django.http import Http404
from django.shortcuts import get_object_or_404, redir... | 30.286822 | 98 | 0.705657 |
7983a91bf097d0dcf15a949919b1e55a8b71de12 | 1,792 | py | Python | scipy/sparse/linalg/dsolve/__init__.py | eugenhu/scipy | 807e455c3d82b775b07fcc16e177f7407cac07d0 | [
"BSD-3-Clause"
] | null | null | null | scipy/sparse/linalg/dsolve/__init__.py | eugenhu/scipy | 807e455c3d82b775b07fcc16e177f7407cac07d0 | [
"BSD-3-Clause"
] | null | null | null | scipy/sparse/linalg/dsolve/__init__.py | eugenhu/scipy | 807e455c3d82b775b07fcc16e177f7407cac07d0 | [
"BSD-3-Clause"
] | null | null | null | """
Linear Solvers
==============
The default solver is SuperLU (included in the scipy distribution),
which can solve real or complex linear systems in both single and
double precisions. It is automatically replaced by UMFPACK, if
available. Note that UMFPACK works in double precision only, so
switch it off by::
... | 28.444444 | 70 | 0.586496 |
7983a942f1972d766b618731e6000b74c38ad7b2 | 735 | py | Python | tests/test_1931.py | yurirocha15/coding_practice | 952506932c47414da689454853ee745637413160 | [
"MIT"
] | 2 | 2020-12-08T13:59:10.000Z | 2021-05-01T05:07:39.000Z | tests/test_1931.py | yurirocha15/coding_practice | 952506932c47414da689454853ee745637413160 | [
"MIT"
] | null | null | null | tests/test_1931.py | yurirocha15/coding_practice | 952506932c47414da689454853ee745637413160 | [
"MIT"
] | 1 | 2021-05-02T17:42:02.000Z | 2021-05-02T17:42:02.000Z | #!/usr/bin/env python
import pytest
"""
Test 1931. Painting a Grid With Three Different Colors
"""
@pytest.fixture(scope="session")
def init_variables_1931():
from src.leetcode_1931_painting_a_grid_with_three_different_colors import Solution
solution = Solution()
def _init_variables_1931():
re... | 23.709677 | 86 | 0.736054 |
7983a9be97ed545b3b3f7d93dfcbe9d21b0b9665 | 33,657 | py | Python | electrum_mona/gui/qt/history_list.py | zcore-dev/electrum-mona | 2beb0c9c7794e8b03d1725bae41ee8b792c57275 | [
"MIT"
] | null | null | null | electrum_mona/gui/qt/history_list.py | zcore-dev/electrum-mona | 2beb0c9c7794e8b03d1725bae41ee8b792c57275 | [
"MIT"
] | null | null | null | electrum_mona/gui/qt/history_list.py | zcore-dev/electrum-mona | 2beb0c9c7794e8b03d1725bae41ee8b792c57275 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... | 45.72962 | 143 | 0.603975 |
7983a9f1410489fdeb5aaccb98535da6d1a1fbf7 | 43,335 | py | Python | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_data_feeds.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1 | 2021-09-16T02:33:52.000Z | 2021-09-16T02:33:52.000Z | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_data_feeds.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1 | 2019-08-05T19:14:28.000Z | 2019-08-05T19:30:05.000Z | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_data_feeds.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1 | 2016-04-19T22:15:47.000Z | 2016-04-19T22:15:47.000Z | # coding=utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ----------------------------------------------------------------------... | 48.800676 | 142 | 0.606 |
7983a9f9e289bcad78a2eae7b012b5bbd7951457 | 2,609 | py | Python | mmedit/datasets/sr_vimeo90k_multiple_gt_dataset.py | akimotty877/mmediting | cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6 | [
"Apache-2.0"
] | null | null | null | mmedit/datasets/sr_vimeo90k_multiple_gt_dataset.py | akimotty877/mmediting | cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6 | [
"Apache-2.0"
] | null | null | null | mmedit/datasets/sr_vimeo90k_multiple_gt_dataset.py | akimotty877/mmediting | cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import os
import os.path as osp
from .base_sr_dataset import BaseSRDataset
from .registry import DATASETS
@DATASETS.register_module()
class SRVimeo90KMultipleGTDataset(BaseSRDataset):
"""Vimeo90K dataset for video super resolution for recurrent networks.
The d... | 31.059524 | 79 | 0.588348 |
7983aafa603cf586e210bf38e100e67f5964f950 | 7,977 | py | Python | irace/test.py | lapic-ufjf/evolutionary-ACS-benchmark | 5baf0f9a42e252f549a44d82c7aa2e46ab904238 | [
"MIT"
] | 1 | 2020-11-15T21:34:42.000Z | 2020-11-15T21:34:42.000Z | irace/test.py | lapic-ufjf/evolutionary-ACS-benchmark | 5baf0f9a42e252f549a44d82c7aa2e46ab904238 | [
"MIT"
] | null | null | null | irace/test.py | lapic-ufjf/evolutionary-ACS-benchmark | 5baf0f9a42e252f549a44d82c7aa2e46ab904238 | [
"MIT"
] | 1 | 2020-03-26T08:26:40.000Z | 2020-03-26T08:26:40.000Z | import argparse
import random
import numpy as np
import matplotlib.pyplot as plt
from acs.objective import fitness
from acs.instance import Instance
from utils.misc import evaluate_population_fixed, evaluate_population_random
from utils.runner import run_method
from ppa_d.main import prey_predator_algorithm_discret... | 46.923529 | 147 | 0.67983 |
7983ac745ab8e268fcdd3bc01b53122cd5ee2755 | 4,780 | py | Python | deployment/framework-nuke/framework_nuke_core.py | stackArmor/compliant-framework-for-federal-and-dod-workloads-in-aws-govcloud-us | 8d2aa7426e352242bbded64e3c6da88199aef025 | [
"Apache-2.0"
] | 36 | 2020-12-22T18:40:50.000Z | 2022-03-23T03:48:13.000Z | deployment/framework-nuke/framework_nuke_core.py | stackArmor/compliant-framework-for-federal-and-dod-workloads-in-aws-govcloud-us | 8d2aa7426e352242bbded64e3c6da88199aef025 | [
"Apache-2.0"
] | 10 | 2021-03-01T20:29:10.000Z | 2022-02-15T23:28:58.000Z | deployment/framework-nuke/framework_nuke_core.py | stackArmor/compliant-framework-for-federal-and-dod-workloads-in-aws-govcloud-us | 8d2aa7426e352242bbded64e3c6da88199aef025 | [
"Apache-2.0"
] | 17 | 2020-12-18T15:23:15.000Z | 2022-03-20T17:47:39.000Z | ######################################################################################################################
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... | 40.508475 | 118 | 0.575314 |
7983ac7fff834fbe79dfed914ae9a202950b2094 | 79,329 | py | Python | pandas/tests/test_generic.py | wjt/pandas | 0813a3359a7a946ee5f9246a5d49a933ff130f8e | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/tests/test_generic.py | wjt/pandas | 0813a3359a7a946ee5f9246a5d49a933ff130f8e | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/tests/test_generic.py | wjt/pandas | 0813a3359a7a946ee5f9246a5d49a933ff130f8e | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable-msg=E1101,W0612
from operator import methodcaller
import nose
import numpy as np
from numpy import nan
import pandas as pd
from distutils.version import LooseVersion
from pandas import (Index, Series, DataFrame, Panel, isnull,
date_range, period_range, Pan... | 36.339441 | 79 | 0.541693 |
7983ad73c0031ad5825e3369cf49c9de79cf08a5 | 93 | py | Python | jetbrains-academy/Numeric Matrix Processor/Problems/Percentage/task.py | robinpatra/ML-Study-3 | 6f401706a8da4cac5e63304ce09ff6ff62756d0b | [
"MIT"
] | null | null | null | jetbrains-academy/Numeric Matrix Processor/Problems/Percentage/task.py | robinpatra/ML-Study-3 | 6f401706a8da4cac5e63304ce09ff6ff62756d0b | [
"MIT"
] | null | null | null | jetbrains-academy/Numeric Matrix Processor/Problems/Percentage/task.py | robinpatra/ML-Study-3 | 6f401706a8da4cac5e63304ce09ff6ff62756d0b | [
"MIT"
] | null | null | null | def get_percentage(number, decimal=None):
return str(round(number * 100, decimal)) + "%"
| 31 | 50 | 0.688172 |
7983aea7828f5786b3011a63b83ef541ab01aa81 | 827 | py | Python | fiche_produit/migrations/0030_auto_20211011_1123.py | amanmyrats/fiche-produit | 37bc109e63a7eaeab05078a268c798bb54136475 | [
"Unlicense"
] | null | null | null | fiche_produit/migrations/0030_auto_20211011_1123.py | amanmyrats/fiche-produit | 37bc109e63a7eaeab05078a268c798bb54136475 | [
"Unlicense"
] | null | null | null | fiche_produit/migrations/0030_auto_20211011_1123.py | amanmyrats/fiche-produit | 37bc109e63a7eaeab05078a268c798bb54136475 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.2.6 on 2021-10-11 06:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('fiche_produit', '0029_auto_20211008_1207'),
]
operations = [
migrations.AlterField(
model_name=... | 33.08 | 175 | 0.665054 |
7983aeec4d2fe2f55f75a2ebc365622c1327afab | 2,296 | py | Python | src/classicalgsg/formats/draw.py | kyrarivest/ACRES_REU_Project_2021 | fc3fd121fbffb630e3652bacdc74d1b1bddab50e | [
"MIT"
] | 3 | 2020-10-23T20:22:35.000Z | 2022-01-13T01:08:43.000Z | src/classicalgsg/formats/draw.py | ADicksonLab/ClassicalGSG | ed855d50d8d308a07d9eb9e80ca7f5b4168a47ab | [
"MIT"
] | null | null | null | src/classicalgsg/formats/draw.py | ADicksonLab/ClassicalGSG | ed855d50d8d308a07d9eb9e80ca7f5b4168a47ab | [
"MIT"
] | null | null | null | import os
import os.path as osp
import numpy as np
from rdkit import Chem
from rdkit.Chem import Draw
DATA_SET = '../mol_files/Guo_Wei/first_test/minimized'
def drawfrompdb():
pdbfiles_path = osp.join(DATA_SET, 'pdbs')
pdb_files = [f for f in os.listdir(pdbfiles_path) if f.endswith(".pdb")]
molecule... | 25.511111 | 105 | 0.638937 |
7983af29e8cfd8b66d05d96d2744681f0438efdc | 278 | py | Python | TransfomerTranslation/src/args.py | XUE-Hao/NLPLibrary | e685f908d45ee4c534018dbe7ae202a85bc8977a | [
"MIT"
] | null | null | null | TransfomerTranslation/src/args.py | XUE-Hao/NLPLibrary | e685f908d45ee4c534018dbe7ae202a85bc8977a | [
"MIT"
] | null | null | null | TransfomerTranslation/src/args.py | XUE-Hao/NLPLibrary | e685f908d45ee4c534018dbe7ae202a85bc8977a | [
"MIT"
] | null | null | null | import torch
num_epochs = 10
batch_size = 32
num_layers = 2
max_sentence_length = 100
warm_up_epoches = 5
log_batch_interval = 100 # 多少个batch记录一次
ckpt_dir = '../model/'
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
vocab_size = 5000
num_batchs = 400
| 18.533333 | 69 | 0.748201 |
7983b003205333ed57ebdde6cae9bbcd69cf46cd | 188 | py | Python | examples/get_templates.py | blazingdocs/blazingdocs-python | b08fb689e233caf85e22ca6e451af99a2fce0adf | [
"MIT"
] | 1 | 2021-08-20T11:01:19.000Z | 2021-08-20T11:01:19.000Z | examples/get_templates.py | blazingdocs/blazingdocs-python | b08fb689e233caf85e22ca6e451af99a2fce0adf | [
"MIT"
] | null | null | null | examples/get_templates.py | blazingdocs/blazingdocs-python | b08fb689e233caf85e22ca6e451af99a2fce0adf | [
"MIT"
] | null | null | null | from blazingdocs import BlazingClient
def get_templates():
client = BlazingClient('API-KEY')
templates = client.get_templates()
if __name__ == '__main__':
get_templates()
| 15.666667 | 38 | 0.712766 |
7983b0fef8188edb8717a1d51f6167ecc104307f | 3,497 | py | Python | bindings/python/ensmallen/datasets/string/mycobacteriumspsoil538.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/mycobacteriumspsoil538.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/mycobacteriumspsoil538.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 Mycobacterium sp. Soil538.
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--prot... | 33.304762 | 223 | 0.678296 |
7983b103fe596ce6b91581f6396a2c2ad12bd62a | 65 | py | Python | _solutions/basics/files/file_write_a.py | sages-pl/2022-01-pythonsqlalchemy-aptiv | 1d6d856608e9dbe25b139e8968c48b7f46753b84 | [
"MIT"
] | null | null | null | _solutions/basics/files/file_write_a.py | sages-pl/2022-01-pythonsqlalchemy-aptiv | 1d6d856608e9dbe25b139e8968c48b7f46753b84 | [
"MIT"
] | null | null | null | _solutions/basics/files/file_write_a.py | sages-pl/2022-01-pythonsqlalchemy-aptiv | 1d6d856608e9dbe25b139e8968c48b7f46753b84 | [
"MIT"
] | null | null | null |
with open(FILE, mode='wt') as file:
file.write(DATA + '\n')
| 16.25 | 35 | 0.584615 |
7983b1549d1d0dd0a20d94896182b3520b873ba2 | 9,138 | py | Python | src/sentry/plugins/base/v2.py | arsh-co/sentry | 7a83a7e8a13047a9471756d679e2deb596cc2ca1 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/plugins/base/v2.py | arsh-co/sentry | 7a83a7e8a13047a9471756d679e2deb596cc2ca1 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/plugins/base/v2.py | arsh-co/sentry | 7a83a7e8a13047a9471756d679e2deb596cc2ca1 | [
"BSD-3-Clause"
] | null | null | null | """
sentry.plugins.base.v2
~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
__all__ = ('Plugin2',)
import logging
from django.http import HttpResponseRedirect
fro... | 30.158416 | 94 | 0.605822 |
7983b1938f9eb8986c3ea8d6949fd0bff51b9ac7 | 1,507 | py | Python | analisa-kmodes.py | ramadhanqa/tugas3_datmining | 4976ddd1740ad94d856f190ce511bf1454a5d313 | [
"MIT"
] | null | null | null | analisa-kmodes.py | ramadhanqa/tugas3_datmining | 4976ddd1740ad94d856f190ce511bf1454a5d313 | [
"MIT"
] | null | null | null | analisa-kmodes.py | ramadhanqa/tugas3_datmining | 4976ddd1740ad94d856f190ce511bf1454a5d313 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
from kmodes.kmodes import KModes
# reproduce results on small soybean data set
x = np.genfromtxt('data-categorical.csv', dtype=int, delimiter=',')[:, :-1]
y = np.genfromtxt('data-categorical.csv', dtype=str, delimiter=',', usecols=(35, ))
kmodes_huang = KModes(n_clusters=5, i... | 35.880952 | 100 | 0.64499 |
7983b240976338a9319807398b8559f3f6085eef | 3,971 | py | Python | kolejka/judge/config.py | Raalsky/kolejka-judge | 4fa42d9b9a52a94cd8dc57a99218b32d0e8fc18f | [
"MIT"
] | null | null | null | kolejka/judge/config.py | Raalsky/kolejka-judge | 4fa42d9b9a52a94cd8dc57a99218b32d0e8fc18f | [
"MIT"
] | 1 | 2021-08-31T12:08:50.000Z | 2021-08-31T15:09:50.000Z | kolejka/judge/config.py | Raalsky/kolejka-judge | 4fa42d9b9a52a94cd8dc57a99218b32d0e8fc18f | [
"MIT"
] | null | null | null | # vim:ts=4:sts=4:sw=4:expandtab
import sys
assert sys.version_info >= (3, 6)
DISTRIBUTION_PATH = 'kolejka-judge'
DISTRIBUTION_ADDRESS = 'https://kolejka.matinf.uj.edu.pl/' + DISTRIBUTION_PATH
SATORI_STRING_LENGTH = 4096
SATORI_RESULT = 'satori'
LOG = 'log'
COLLECTED_LOG = 'log.zip'
SOLUTION = 'solution'
SOLUTION... | 24.974843 | 78 | 0.578696 |
7983b2d136ea033da586c4f1cb09e9e0aad9c64a | 7,957 | py | Python | zzr_configs/Gaofen_Contest/RoITransformer_r50_pafpn_V2_Multi_InLd_add_softmax_atss_head_1x_dota1_5.py | ZZR8066/AerialDetection | 34c732b61d7df9a832a2a072e8b6abbe8031cb07 | [
"Apache-2.0"
] | 6 | 2020-07-30T02:45:35.000Z | 2022-02-08T13:47:26.000Z | zzr_configs/Gaofen_Contest/RoITransformer_r50_pafpn_V2_Multi_InLd_add_softmax_atss_head_1x_dota1_5.py | ZZR8066/AerialDetection_and_Segmenation | 34c732b61d7df9a832a2a072e8b6abbe8031cb07 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:51:10.000Z | 2021-12-26T22:28:08.000Z | zzr_configs/Gaofen_Contest/RoITransformer_r50_pafpn_V2_Multi_InLd_add_softmax_atss_head_1x_dota1_5.py | ZZR8066/AerialDetection_and_Segmenation | 34c732b61d7df9a832a2a072e8b6abbe8031cb07 | [
"Apache-2.0"
] | 3 | 2020-11-09T03:11:16.000Z | 2021-11-02T09:30:39.000Z | # model settings
model = dict(
type='AF_InLd_RoITransformer',
pretrained='/disk2/zzr/resnet50.pth',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='pytorch'),
neck=dict(
type='PAFPN_V2',
... | 31.575397 | 99 | 0.574463 |
7983b3533f5f418688b17fd90a7dd03922acd334 | 3,409 | py | Python | src/utils/yolink_utils.py | Tonio101/YoLinkAPI_V2 | bfec14b556559cdad8bf6ea4729693c1943b3ac7 | [
"MIT"
] | 1 | 2022-03-24T22:55:12.000Z | 2022-03-24T22:55:12.000Z | src/utils/yolink_utils.py | Tonio101/YoLinkAPI_V2 | bfec14b556559cdad8bf6ea4729693c1943b3ac7 | [
"MIT"
] | null | null | null | src/utils/yolink_utils.py | Tonio101/YoLinkAPI_V2 | bfec14b556559cdad8bf6ea4729693c1943b3ac7 | [
"MIT"
] | null | null | null | import argparse
import json
import logging
import os
import requests
import sys
import time
from models.yolink_token import YoLinkToken
logging.basicConfig(level=logging.DEBUG)
log = logging.getLogger()
def parse_config_file(fname) -> dict:
"""
Args:
fname (_type_): _description_
Returns:
... | 25.825758 | 77 | 0.599883 |
7983b36adfc218c93cba12ce71ca53b500a10be1 | 9,384 | py | Python | utils/evaluate.py | scrose/pylc | 9c4c4e84a14cb3adc0b4226199e4cd5841384b0b | [
"MIT"
] | 2 | 2021-11-29T10:48:40.000Z | 2022-01-15T20:57:36.000Z | utils/evaluate.py | scrose/pylc | 9c4c4e84a14cb3adc0b4226199e4cd5841384b0b | [
"MIT"
] | 3 | 2021-01-19T19:07:02.000Z | 2021-03-03T01:56:26.000Z | utils/evaluate.py | scrose/pylc | 9c4c4e84a14cb3adc0b4226199e4cd5841384b0b | [
"MIT"
] | 2 | 2021-09-07T12:02:50.000Z | 2022-02-19T22:32:28.000Z | """
(c) 2020 Spencer Rose, MIT Licence
Python Landscape Classification Tool (PyLC)
Reference: An evaluation of deep learning semantic segmentation
for land cover classification of oblique ground-based photography,
MSc. Thesis 2020.
<http://hdl.handle.net/1828/12156>
Spencer Rose <spencerrose@uvic.ca>, June 2020
Uni... | 32.926316 | 116 | 0.603474 |
7983b41a006fa17ab7af0d0357b44411e02cbde9 | 7,328 | py | Python | searching/tasks.py | netvigator/auctions | f88bcce800b60083a5d1a6f272c51bb540b8342a | [
"MIT"
] | null | null | null | searching/tasks.py | netvigator/auctions | f88bcce800b60083a5d1a6f272c51bb540b8342a | [
"MIT"
] | 13 | 2019-12-12T03:07:55.000Z | 2022-03-07T12:59:27.000Z | searching/tasks.py | netvigator/auctions | f88bcce800b60083a5d1a6f272c51bb540b8342a | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from os import walk
from time import sleep
from django.contrib.auth import get_user_model
from django.db.models import Q
from django.utils import timezone
from django.core.wsgi import get_wsgi_application
applicati... | 31.316239 | 142 | 0.567003 |
7983b6537542bdb0caca5cf19a0b1bfaac33b63f | 9,277 | py | Python | gilp/_geometry.py | xbrq/gilp | 7fb1d2425d905aa43a5bcde25713b40878bc30d1 | [
"MIT"
] | 18 | 2020-07-24T02:35:14.000Z | 2022-01-28T18:51:46.000Z | gilp/_geometry.py | xbrq/gilp | 7fb1d2425d905aa43a5bcde25713b40878bc30d1 | [
"MIT"
] | 3 | 2021-01-25T11:18:45.000Z | 2021-09-04T23:21:28.000Z | gilp/_geometry.py | xbrq/gilp | 7fb1d2425d905aa43a5bcde25713b40878bc30d1 | [
"MIT"
] | 3 | 2021-02-12T05:02:31.000Z | 2021-09-04T22:29:58.000Z | """Computational geometry functions.
This module contains various computational geometry functions related to linear
programming.
"""
__author__ = 'Henry Robbins'
__all__ = ['intersection', 'polytope_vertices', 'polytope_facets',
'halfspace_intersection', 'interior_point', 'order']
from collections import... | 36.813492 | 79 | 0.606015 |
7983b657146c8980958c08aed976e0a2512c6785 | 7,548 | py | Python | kubernetes_asyncio/client/models/v1beta1_lease_spec.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1beta1_lease_spec.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1beta1_lease_spec.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.13.5
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1beta1Lea... | 33.251101 | 175 | 0.63805 |
7983b67b3b6e30f7759f297ff9e2dc2bfee8770b | 4,161 | py | Python | src/parse_acm_data.py | sreekarcheg/Citation-Count-Prediction | 9b6936c3f78b4264d685ada8d1163955f410111c | [
"MIT"
] | 9 | 2017-05-07T05:15:42.000Z | 2021-07-20T07:20:38.000Z | src/parse_acm_data.py | sreekarcheg/Citation-Count-Prediction | 9b6936c3f78b4264d685ada8d1163955f410111c | [
"MIT"
] | null | null | null | src/parse_acm_data.py | sreekarcheg/Citation-Count-Prediction | 9b6936c3f78b4264d685ada8d1163955f410111c | [
"MIT"
] | 6 | 2016-12-19T07:22:07.000Z | 2021-12-16T07:59:43.000Z | from collections import namedtuple, defaultdict
import sys,re
import cPickle as pickle
ordinals = ['first',
'second',
'third',
'fourth',
'fifth',
'sixth',
'seventh',
'eighth',
'ninth',
'tenth',
'eleventh',
'twelfth',
'thirteenth',
'fourteenth',
'fifteenth',
'sixteenth',
'seventeenth',
'eighteenth',
... | 26.169811 | 88 | 0.541456 |
7983b7037dd3b1d175b84222ee5ea5c7dcafde6c | 5,589 | py | Python | env/lib/python3.6/site-packages/nibabel/tests/test_quaternions.py | Raniac/NEURO-LEARN | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | env/lib/python3.6/site-packages/nibabel/tests/test_quaternions.py | Raniac/neurolearn_dev | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | env/lib/python3.6/site-packages/nibabel/tests/test_quaternions.py | Raniac/NEURO-LEARN | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 1 | 2020-07-17T12:49:49.000Z | 2020-07-17T12:49:49.000Z | # emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the NiBabel package for the
# copyright and license terms.
#
### ### ### #... | 29.26178 | 78 | 0.59796 |
7983b725e54bb2df2f74602a3ba4d5cc46f22f19 | 210 | py | Python | django_echarts/datasets/managers.py | SmirkCao/django-echarts | 50f9ebb60ccd5e96aeb88176b6e8c789a66b7677 | [
"MIT"
] | 181 | 2017-07-30T04:37:41.000Z | 2022-03-27T04:58:04.000Z | django_echarts/datasets/managers.py | lili1230120/django-echarts | 50f9ebb60ccd5e96aeb88176b6e8c789a66b7677 | [
"MIT"
] | 22 | 2017-07-30T11:49:34.000Z | 2022-03-28T12:44:07.000Z | django_echarts/datasets/managers.py | lili1230120/django-echarts | 50f9ebb60ccd5e96aeb88176b6e8c789a66b7677 | [
"MIT"
] | 57 | 2017-08-12T09:47:09.000Z | 2022-03-28T07:20:53.000Z | # coding=utf8
from django.db import models
from borax.fetch import fetch
class AxisValuesQuerySet(models.QuerySet):
def as_axis_values(self, *keys, **kwargs):
return fetch(self, *keys, **kwargs)
| 21 | 46 | 0.72381 |
7983b84cf913fc1f684a9a9f142b69dccea2416c | 1,271 | py | Python | setup.py | danspinola/thonny | 0ce2653c581df90606bdfb4af745003ef256ac75 | [
"MIT"
] | 6 | 2020-10-02T20:00:32.000Z | 2021-07-24T08:26:40.000Z | setup.py | danspinola/thonny | 0ce2653c581df90606bdfb4af745003ef256ac75 | [
"MIT"
] | 1 | 2020-10-23T06:35:58.000Z | 2022-03-24T20:44:22.000Z | setup.py | danspinola/thonny | 0ce2653c581df90606bdfb4af745003ef256ac75 | [
"MIT"
] | 1 | 2021-01-05T17:05:51.000Z | 2021-01-05T17:05:51.000Z | from setuptools import setup
import os
#setupdir = os.path.dirname(__file__)
setup(
name='thonny-dracula',
version='0.1.2',
description='Dracula dark theme for Thonny IDE',
long_description=open('README.md').read(),
url='https://github.com/danspinola/thonny',
download_url='https://github.com/d... | 34.351351 | 67 | 0.630212 |
7983b85592dcef56d41d4afd556d466af9a54e74 | 6,473 | py | Python | examples/wav2vec/unsupervised/scripts/wav2vec_cluster_faiss.py | mahshidaln/fairseq | feed52e0a028adddca565447852e5e0dfeeabb7a | [
"MIT"
] | null | null | null | examples/wav2vec/unsupervised/scripts/wav2vec_cluster_faiss.py | mahshidaln/fairseq | feed52e0a028adddca565447852e5e0dfeeabb7a | [
"MIT"
] | null | null | null | examples/wav2vec/unsupervised/scripts/wav2vec_cluster_faiss.py | mahshidaln/fairseq | feed52e0a028adddca565447852e5e0dfeeabb7a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3 -u
# 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 argparse
import gc
import os
import os.path as osp
import random
import numpy as np
import tqdm
import torch
... | 30.106977 | 129 | 0.563108 |
7983b85c48a544a5afb7333d68883d1042a7e8ae | 1,561 | py | Python | populationevolution/wrightfisher.py | quanta413/Population-Evolution-Project-Source-Code | d2512f1fa6672e229cb3b2767c6837ca83865e8b | [
"BSD-2-Clause"
] | null | null | null | populationevolution/wrightfisher.py | quanta413/Population-Evolution-Project-Source-Code | d2512f1fa6672e229cb3b2767c6837ca83865e8b | [
"BSD-2-Clause"
] | null | null | null | populationevolution/wrightfisher.py | quanta413/Population-Evolution-Project-Source-Code | d2512f1fa6672e229cb3b2767c6837ca83865e8b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 8 12:05:22 2018
@author: nashere2
"""
import numpy as np
from . import arraymultinomial as am
def mean_exp_fitness(pop_dist, fitnesses):
return np.sum(pop_dist*np.exp(fitnesses))/np.sum(pop_dist)
def var_exp_fitness(pop_dist, fitnesses):
mean_exp2_fitness = ... | 33.212766 | 77 | 0.745676 |
7983b8dbe4062bf8992976246607d40cef0a7928 | 29,099 | py | Python | chatbot_env/Lib/site-packages/sklearn/impute/_iterative.py | rakmakan/Chatbot | d04bc1526b56961a16c25148d9ef18c4f157e9c4 | [
"MIT"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | chatbot_env/Lib/site-packages/sklearn/impute/_iterative.py | rakmakan/Chatbot | d04bc1526b56961a16c25148d9ef18c4f157e9c4 | [
"MIT"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | chatbot_env/Lib/site-packages/sklearn/impute/_iterative.py | rakmakan/Chatbot | d04bc1526b56961a16c25148d9ef18c4f157e9c4 | [
"MIT"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z |
from time import time
from distutils.version import LooseVersion
from collections import namedtuple
import warnings
import scipy
from scipy import stats
import numpy as np
from ..base import clone
from ..exceptions import ConvergenceWarning
from ..preprocessing import normalize
from ..utils import check_array, check... | 40.984507 | 79 | 0.599436 |
7983bbb3bc36308039f6cb033a8416b6ec542983 | 2,433 | py | Python | easydecks/cards/default/__init__.py | butuzov/easydecks | 45ff770f6cbd0d2cba1d811bc3c775e6250fe70b | [
"Apache-2.0"
] | 1 | 2021-04-11T20:42:04.000Z | 2021-04-11T20:42:04.000Z | easydecks/cards/default/__init__.py | butuzov/easydecks | 45ff770f6cbd0d2cba1d811bc3c775e6250fe70b | [
"Apache-2.0"
] | 3 | 2020-03-23T08:27:15.000Z | 2021-03-08T04:32:44.000Z | easydecks/cards/default/__init__.py | butuzov/easydecks | 45ff770f6cbd0d2cba1d811bc3c775e6250fe70b | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from typing import List
from os.path import basename, dirname
from re import compile
import genanki
def __init__(*args, **kwargs) -> Card:
"""
module router
TODO: Write docs
"""
return Card(*args, **kwargs)
def read(filename):
with open(filename, "r") as ... | 25.882979 | 93 | 0.565146 |
7983bc0b4fb21cb71a363ab41e1e970300e335f5 | 1,390 | py | Python | material/issue40.py | Equin89/PyRFC | 4569c6f766e2c89fc1b50e66f6faade056f170e6 | [
"Apache-2.0"
] | 1 | 2019-04-06T11:30:01.000Z | 2019-04-06T11:30:01.000Z | material/issue40.py | Equin89/PyRFC | 4569c6f766e2c89fc1b50e66f6faade056f170e6 | [
"Apache-2.0"
] | null | null | null | material/issue40.py | Equin89/PyRFC | 4569c6f766e2c89fc1b50e66f6faade056f170e6 | [
"Apache-2.0"
] | null | null | null | connection_info = {
'user': 'demo',
'passwd': 'Welcome',
'ashost': '10.117.19.101',
'saprouter': '/H/203.13.155.17/W/xjkb3d/H/172.19.138.120/H/',
'sysnr': '00',
'lang': 'EN',
'client': '100',
'sysid': 'S16'
}
connection_info = {'user': 'demo',
'passwd': 'welcome',
'ashost': '10.68.110.... | 27.254902 | 74 | 0.670504 |
7983bef3c3abc8e06ccc36d4fdd9e4e74cbe3ddf | 34,303 | py | Python | venv/Lib/site-packages/jedi/inference/syntax_tree.py | BoxicaLion/BasicMathFormulas | 4d9782f2c0c75ecccf4c0ea995f324f93e4fb6e2 | [
"MIT"
] | 641 | 2015-01-01T11:27:21.000Z | 2022-03-22T12:46:01.000Z | venv/Lib/site-packages/jedi/inference/syntax_tree.py | BoxicaLion/BasicMathFormulas | 4d9782f2c0c75ecccf4c0ea995f324f93e4fb6e2 | [
"MIT"
] | 177 | 2015-01-01T13:00:21.000Z | 2022-03-15T08:23:28.000Z | venv/Lib/site-packages/jedi/inference/syntax_tree.py | BoxicaLion/BasicMathFormulas | 4d9782f2c0c75ecccf4c0ea995f324f93e4fb6e2 | [
"MIT"
] | 118 | 2015-01-14T03:03:08.000Z | 2022-03-10T03:37:40.000Z | """
Functions inferring the syntax tree.
"""
import copy
from parso.python import tree
from jedi._compatibility import force_unicode, unicode
from jedi import debug
from jedi import parser_utils
from jedi.inference.base_value import ValueSet, NO_VALUES, ContextualizedNode, \
iterator_to_value_set, iterate_values
... | 40.49941 | 97 | 0.610646 |
7983c00c73d50cc484e40cc14e7346bf4e62dd60 | 2,590 | bzl | Python | tools/codegen/codegen.bzl | george-enf/enkit | af32fede472f04f77965b972c7ef3008f52c8caf | [
"BSD-3-Clause"
] | null | null | null | tools/codegen/codegen.bzl | george-enf/enkit | af32fede472f04f77965b972c7ef3008f52c8caf | [
"BSD-3-Clause"
] | 1 | 2021-10-01T05:24:29.000Z | 2021-10-01T05:24:29.000Z | tools/codegen/codegen.bzl | george-enf/enkit | af32fede472f04f77965b972c7ef3008f52c8caf | [
"BSD-3-Clause"
] | null | null | null | load("//bazel/utils:diff_test.bzl", "diff_test")
def _codegen_impl(ctx):
args = ctx.actions.args()
for f in ctx.files.schema:
args.add("--schema", f)
for f in ctx.files.data:
args.add("--load", f)
for f in ctx.files.srcs:
args.add(f)
if ctx.attr.multigen_mode:
args.a... | 33.636364 | 102 | 0.565637 |
7983c1913e245235bee4bde1d20ffbd6a1ee929d | 608 | py | Python | analyze/filter_db.py | adiyoss/Representation_Analysis | 5d56cf1c98a3d284cfa329efc7425e58cc55acdc | [
"MIT"
] | 2 | 2018-02-26T21:02:11.000Z | 2018-02-27T08:20:16.000Z | analyze/filter_db.py | adiyoss/InDepth-Analysis | 5d56cf1c98a3d284cfa329efc7425e58cc55acdc | [
"MIT"
] | null | null | null | analyze/filter_db.py | adiyoss/InDepth-Analysis | 5d56cf1c98a3d284cfa329efc7425e58cc55acdc | [
"MIT"
] | null | null | null | in_path = "../data/orig/index_trainBatch32_filter.txt"
out_path = "../data/orig/index_trainBatch32_filter_aggressive.txt"
lower_bound = 5
upper_bound = 70
f_out = open(out_path, 'w')
with open(in_path) as f:
for line in f:
vals = line.split()
if lower_bound <= len(vals) <= upper_bound:
... | 26.434783 | 66 | 0.503289 |
7983c19a5d51f0dde9dbc27aba94e6784034e110 | 4,699 | py | Python | demo/polygon_wrapper.py | clw5180/remote_sensing_object_detection_2019 | 7b348cc237238397798b41e536e212d2471d6da9 | [
"MIT"
] | 62 | 2019-08-23T02:01:22.000Z | 2021-12-19T03:35:49.000Z | demo/polygon_wrapper.py | efandong/remote_sensing_object_detection_2019 | 3810ab924d1899cf43e50c42a790674d738263d3 | [
"MIT"
] | 25 | 2019-08-23T02:19:00.000Z | 2022-01-08T11:26:56.000Z | demo/polygon_wrapper.py | efandong/remote_sensing_object_detection_2019 | 3810ab924d1899cf43e50c42a790674d738263d3 | [
"MIT"
] | 21 | 2019-08-23T02:21:59.000Z | 2022-02-13T04:08:26.000Z | import numpy as np
from skimage.draw import polygon
"""
:param det_x: [1, N] Xs of detection's vertices
:param det_y: [1, N] Ys of detection's vertices
:param gt_x: [1, N] Xs of groundtruth's vertices
:param gt_y: [1, N] Ys of groundtruth's vertices
##############
All the calculation of 'AREA' in this scri... | 33.091549 | 116 | 0.615024 |
7983c1e8b860b03eaa8c95f6135967dc98a44589 | 31,464 | py | Python | tests/unittest.py | 3ayazaya/synapse | e3fe6347be1da930b6a0ed2005b565369800a327 | [
"Apache-2.0"
] | 1 | 2022-02-22T21:40:29.000Z | 2022-02-22T21:40:29.000Z | tests/unittest.py | 3ayazaya/synapse | e3fe6347be1da930b6a0ed2005b565369800a327 | [
"Apache-2.0"
] | null | null | null | tests/unittest.py | 3ayazaya/synapse | e3fe6347be1da930b6a0ed2005b565369800a327 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014-2016 OpenMarket Ltd
# Copyright 2018 New Vector
# Copyright 2019 Matrix.org Federation C.I.C
#
# 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/lic... | 33.436769 | 114 | 0.608155 |
7983c2f5998176f6f818e0bf47aebd1f59553210 | 4,247 | py | Python | oadenv/lib/python2.7/site-packages/django/contrib/gis/gdal/feature.py | isabernardes/Archaeodatabase | 86090e8f840d5d202c15906e614d683f8a12d3bc | [
"MIT"
] | 7 | 2017-02-12T06:03:00.000Z | 2020-12-31T11:57:35.000Z | oadenv/lib/python2.7/site-packages/django/contrib/gis/gdal/feature.py | isabernardes/Archaeodatabase | 86090e8f840d5d202c15906e614d683f8a12d3bc | [
"MIT"
] | 10 | 2017-07-13T00:24:03.000Z | 2017-07-17T07:39:03.000Z | oadenv/lib/python2.7/site-packages/django/contrib/gis/gdal/feature.py | isabernardes/Archaeodatabase | 86090e8f840d5d202c15906e614d683f8a12d3bc | [
"MIT"
] | 7 | 2017-08-01T04:02:07.000Z | 2018-10-06T21:07:20.000Z | from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import GDALException, OGRIndexError
from django.contrib.gis.gdal.field import Field
from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType
from django.contrib.gis.gdal.prototypes import ds as capi, geom as geom_api
fro... | 34.25 | 84 | 0.64681 |
7983c31eb4bbca7c9b79c167067af902e368879d | 1,325 | py | Python | tests.py | maluramichael/lektor-read-full-post | 06c499b394f182f59b733b32ac243403d0eb21dc | [
"MIT"
] | 4 | 2018-07-08T22:32:36.000Z | 2021-03-16T02:21:33.000Z | tests.py | maluramichael/lektor-read-full-post | 06c499b394f182f59b733b32ac243403d0eb21dc | [
"MIT"
] | 1 | 2018-05-12T20:59:40.000Z | 2019-09-21T21:49:03.000Z | tests.py | maluramichael/lektor-read-full-post | 06c499b394f182f59b733b32ac243403d0eb21dc | [
"MIT"
] | 2 | 2020-02-16T11:34:50.000Z | 2020-11-21T17:17:08.000Z |
from lektor_read_full_post import ReadFullPostPlugin
SPLIT_ONE = "[//]: # (PLUGIN-READ-FULL-POST)"
SPLIT_TWO = "<!-- PLUGIN-READ-FULL-POST -->"
URL_PATH = "https://localhost"
class MockSource(object):
def __init__(self):
self.source = ""
class MockPost(object):
def __init__(self):
self... | 22.083333 | 84 | 0.649057 |
7983c35632336afc2c36f1ecbe5bc22a7db8542f | 3,853 | py | Python | src/models_training/retrieve_data.py | ICARUS-H2020/recommender | 1d70bce8989a57a95005f1f0c767ed1659a0f180 | [
"Apache-2.0"
] | null | null | null | src/models_training/retrieve_data.py | ICARUS-H2020/recommender | 1d70bce8989a57a95005f1f0c767ed1659a0f180 | [
"Apache-2.0"
] | null | null | null | src/models_training/retrieve_data.py | ICARUS-H2020/recommender | 1d70bce8989a57a95005f1f0c767ed1659a0f180 | [
"Apache-2.0"
] | null | null | null | import psycopg2
import os
import logging
import requests
import json
import redis
from requests.exceptions import HTTPError
from dotenv import load_dotenv
load_dotenv()
logFormatter = '%(asctime)s - %(levelname)s - %(message)s'
logging.basicConfig(format=logFormatter, level=logging.INFO)
logger = logging.getLogger(__n... | 29.412214 | 85 | 0.627303 |
7983c4bc6863276cd29cdf30ee43a73053b0f641 | 9,629 | py | Python | third_party/legacy_rostest/hztest.py | mvukov/rules_ros | 0919c94fae4c84f40c9ec23164345f6db8aef853 | [
"Apache-2.0"
] | 14 | 2021-05-02T00:58:45.000Z | 2022-01-11T07:01:27.000Z | third_party/legacy_rostest/hztest.py | mvukov/rules_ros | 0919c94fae4c84f40c9ec23164345f6db8aef853 | [
"Apache-2.0"
] | null | null | null | third_party/legacy_rostest/hztest.py | mvukov/rules_ros | 0919c94fae4c84f40c9ec23164345f6db8aef853 | [
"Apache-2.0"
] | 1 | 2022-02-07T00:17:23.000Z | 2022-02-07T00:17:23.000Z | #!/usr/bin/env python
# Software License Agreement (BSD License)
#
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code... | 37.177606 | 121 | 0.595493 |
7983c573482bb680552009191cf1252f71d6ba71 | 10,961 | py | Python | pybrain/optimization/populationbased/coevolution/coevolution.py | potter-potter/pybrain-to-python3 | 2787d13fcaa762d0feb2977da85b48d82beb5015 | [
"BSD-3-Clause"
] | null | null | null | pybrain/optimization/populationbased/coevolution/coevolution.py | potter-potter/pybrain-to-python3 | 2787d13fcaa762d0feb2977da85b48d82beb5015 | [
"BSD-3-Clause"
] | null | null | null | pybrain/optimization/populationbased/coevolution/coevolution.py | potter-potter/pybrain-to-python3 | 2787d13fcaa762d0feb2977da85b48d82beb5015 | [
"BSD-3-Clause"
] | null | null | null |
__author__ = 'Tom Schaul, tom@idsia.ch'
from scipy import argmax, array
from random import sample, choice, shuffle
from pybrain.utilities import fListToString, Named
class Coevolution(Named):
""" Population-based generational evolutionary algorithm
with fitness being based (paritally) on a relative measur... | 37.282313 | 118 | 0.579692 |
7983c5d745fa1ba4037d498dcdf41eaa0281e192 | 416 | py | Python | scripts/analysis/Trypsin-Benzamidine/mean_krev_200.py | dhimanray/MWEM | a105b2cd0d39a76ef6058cd16cf0959c650a8cc6 | [
"BSD-3-Clause"
] | null | null | null | scripts/analysis/Trypsin-Benzamidine/mean_krev_200.py | dhimanray/MWEM | a105b2cd0d39a76ef6058cd16cf0959c650a8cc6 | [
"BSD-3-Clause"
] | null | null | null | scripts/analysis/Trypsin-Benzamidine/mean_krev_200.py | dhimanray/MWEM | a105b2cd0d39a76ef6058cd16cf0959c650a8cc6 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
l = np.loadtxt('K_i_i-1.dat')
a = l.T[1]
alpha = 0.01373 #obtained from fraction coverage
#D = 1E-5 #approximate value for small molecule in water (in cm^2/s)
r = 12 #radius of the outermost milestone in Angstrom
a = 7.569 * 1E+8 * r * alpha * a
mean_krev = np.mean(a[-10:-5])
std_krev = np.st... | 18.909091 | 68 | 0.65625 |
7983c61cd54ba26aef1c5935d7f4c7a2eeba1fec | 146 | py | Python | main.py | templ-project/python-app | 7a5f21df4774f4787963dfa0c9dc491a4cc9473c | [
"MIT"
] | null | null | null | main.py | templ-project/python-app | 7a5f21df4774f4787963dfa0c9dc491a4cc9473c | [
"MIT"
] | 11 | 2019-08-13T06:03:43.000Z | 2020-07-05T18:08:13.000Z | main.py | templ-project/python-app | 7a5f21df4774f4787963dfa0c9dc491a4cc9473c | [
"MIT"
] | null | null | null | """CLI main runner"""
from py_greet import hello
def main():
"""main runner"""
print(hello('World'))
if __name__ == '__main__':
main()
| 11.230769 | 26 | 0.616438 |
7983c62e20aa1474f41f3a09dc796e3e420b9e84 | 1,376 | py | Python | blog_cookiecutter/blog-cookiecutter/blog-cookiecutter/taskapp/celery.py | ghjan/blog-projects | aa6925724e457bec276d98cf7b55b5cdaf2ab5f4 | [
"MIT"
] | 66 | 2017-11-18T06:41:39.000Z | 2021-09-02T15:47:08.000Z | blog_cookiecutter/blog-cookiecutter/blog-cookiecutter/taskapp/celery.py | ghjan/blog-projects | aa6925724e457bec276d98cf7b55b5cdaf2ab5f4 | [
"MIT"
] | 2 | 2018-05-28T14:06:05.000Z | 2020-03-21T14:05:07.000Z | blog_cookiecutter/blog-cookiecutter/blog-cookiecutter/taskapp/celery.py | ghjan/blog-projects | aa6925724e457bec276d98cf7b55b5cdaf2ab5f4 | [
"MIT"
] | 35 | 2017-11-05T23:48:15.000Z | 2021-09-15T12:15:39.000Z |
from __future__ import absolute_import
import os
from celery import Celery
from django.apps import AppConfig
from django.conf import settings
if not settings.configured:
# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")... | 32 | 99 | 0.71657 |
7983c741b7f75dfb90067c3eb3d9c2ded364fd49 | 7,523 | py | Python | models.py | ankanbansal/semi-supervised-learning | 1aa16e2a7ae10908f70bf9657d26a49bacc50be9 | [
"Apache-2.0"
] | null | null | null | models.py | ankanbansal/semi-supervised-learning | 1aa16e2a7ae10908f70bf9657d26a49bacc50be9 | [
"Apache-2.0"
] | 1 | 2018-10-18T18:49:33.000Z | 2018-10-18T18:49:33.000Z | models.py | ankanbansal/semi-supervised-learning | 1aa16e2a7ae10908f70bf9657d26a49bacc50be9 | [
"Apache-2.0"
] | 1 | 2018-10-18T20:59:18.000Z | 2018-10-18T20:59:18.000Z | import numpy as np
import ipdb
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim import lr_scheduler
from torch.autograd import Variable
import torch.nn.functional as F
import torchvision
import torchvision.models as tv_models
from torchvision import transforms
# Model definitions
clas... | 45.047904 | 136 | 0.653064 |
7983c7c54dd6113762f1c2cdd1494e83162d2aa8 | 3,550 | py | Python | bindings/python/ensmallen/datasets/string/methylobacteriumsp77.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/methylobacteriumsp77.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/methylobacteriumsp77.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 Methylobacterium sp. 77.
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--protei... | 32.87037 | 223 | 0.676056 |
7983c8d7db5264103318bb6b41b82515dd9dfd74 | 1,242 | py | Python | master/networking-and-interfacing-iot-platforms/project/node/old_pycom/boot.py | Brent-rb/University | caae9c7d8e44bf7589865517f786529b1f171059 | [
"MIT"
] | null | null | null | master/networking-and-interfacing-iot-platforms/project/node/old_pycom/boot.py | Brent-rb/University | caae9c7d8e44bf7589865517f786529b1f171059 | [
"MIT"
] | null | null | null | master/networking-and-interfacing-iot-platforms/project/node/old_pycom/boot.py | Brent-rb/University | caae9c7d8e44bf7589865517f786529b1f171059 | [
"MIT"
] | null | null | null | from network import WLAN
import pycom
import micropython
from time import sleep as sleep
class PyWiFi(object):
def __init__(self, mode, ssid=None, password=None, hidden=False):
self._ssid = ssid
self._hidden = hidden
if mode == WLAN.STA_AP or mode == WLAN.AP:
self._wlan = WLAN(... | 28.227273 | 102 | 0.580515 |
7983c93eceea40b94b390e81446009efb161ddf6 | 1,222 | py | Python | vision/google/cloud/vision/connection.py | ammayathrajeshnair/googlecloudpython | 22ded3be30dda0206e23a7846b5883a2caeeeddc | [
"Apache-2.0"
] | null | null | null | vision/google/cloud/vision/connection.py | ammayathrajeshnair/googlecloudpython | 22ded3be30dda0206e23a7846b5883a2caeeeddc | [
"Apache-2.0"
] | null | null | null | vision/google/cloud/vision/connection.py | ammayathrajeshnair/googlecloudpython | 22ded3be30dda0206e23a7846b5883a2caeeeddc | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Google 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 agreed to in writing, ... | 33.027027 | 74 | 0.720949 |
7983c9409ec1f6d3bdd9a8cca35a6645840c4d70 | 13,013 | py | Python | commands.py | TaranMayer/vexforum_alerts | f2496fb1b2e0c7c1599c53ce256f4f06c432f9c1 | [
"Apache-2.0"
] | null | null | null | commands.py | TaranMayer/vexforum_alerts | f2496fb1b2e0c7c1599c53ce256f4f06c432f9c1 | [
"Apache-2.0"
] | null | null | null | commands.py | TaranMayer/vexforum_alerts | f2496fb1b2e0c7c1599c53ce256f4f06c432f9c1 | [
"Apache-2.0"
] | null | null | null | import discord
from discord.ext import commands
import bs4 as bs
from bs4 import BeautifulSoup, CData
import urllib.request
import time
import asyncio
import mysql.connector
from urlextract import URLExtract
from threading import Thread
import hashlib
import pprint
import passwords
client = commands.Bot(co... | 45.184028 | 152 | 0.540844 |
7983c9865ef2c801fda5b5a020797d02e92caec4 | 14,658 | py | Python | tests/bosch_shc/test_config_flow.py | philjak/boschshc-hass | 9d902b8319fe50b414e4d914b87e766004e710a1 | [
"Apache-2.0"
] | null | null | null | tests/bosch_shc/test_config_flow.py | philjak/boschshc-hass | 9d902b8319fe50b414e4d914b87e766004e710a1 | [
"Apache-2.0"
] | null | null | null | tests/bosch_shc/test_config_flow.py | philjak/boschshc-hass | 9d902b8319fe50b414e4d914b87e766004e710a1 | [
"Apache-2.0"
] | null | null | null | """Test the Bosch SHC config flow."""
from unittest.mock import PropertyMock
from boschshcpy.exceptions import (
SHCAuthenticationError,
SHCConnectionError,
SHCmDNSError,
)
from boschshcpy.information import SHCInformation
from homeassistant import config_entries, setup
from bosch_shc.const import DOMAIN
... | 31.320513 | 84 | 0.623277 |
7983ca0d42c45c5bd90c9398ff92f08b834fb1bb | 4,972 | py | Python | third_party/unidecode/x0b8.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 39 | 2015-06-10T23:18:07.000Z | 2021-10-21T04:29:06.000Z | third_party/unidecode/x0b8.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 2 | 2016-08-22T12:38:10.000Z | 2017-01-26T18:37:33.000Z | third_party/unidecode/x0b8.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 26 | 2015-06-10T22:09:15.000Z | 2021-06-27T15:45:15.000Z | data = (
'reoss', # 0x00
'reong', # 0x01
'reoj', # 0x02
'reoc', # 0x03
'reok', # 0x04
'reot', # 0x05
'reop', # 0x06
'reoh', # 0x07
're', # 0x08
'reg', # 0x09
'regg', # 0x0a
'regs', # 0x0b
'ren', # 0x0c
'renj', # 0x0d
'renh', # 0x0e
'red', # 0x0f
'rel', ... | 19.196911 | 20 | 0.431818 |
7983cb42d52d06a8b90de2c070a8f1ef9636c8b8 | 2,865 | py | Python | tests/test_csaf_meta.py | sthagen/turvallisuusneuvonta | 503e6026463e475b02cb75fd23ae3faeb5f25b11 | [
"MIT"
] | 1 | 2021-12-08T11:12:30.000Z | 2021-12-08T11:12:30.000Z | tests/test_csaf_meta.py | sthagen/turvallisuusneuvonta | 503e6026463e475b02cb75fd23ae3faeb5f25b11 | [
"MIT"
] | 2 | 2022-02-14T15:43:08.000Z | 2022-02-14T21:22:13.000Z | tests/test_csaf_meta.py | sthagen/turvallisuusneuvonta | 503e6026463e475b02cb75fd23ae3faeb5f25b11 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=line-too-long,missing-docstring,reimported,unused-import,unused-variable
import orjson
import pytest
from pydantic.error_wrappers import ValidationError
import turvallisuusneuvonta.csaf.document as document
from tests import conftest
def _subs(count: int) -> str:
"""DRY.... | 40.928571 | 112 | 0.691449 |
7983cd064b97142a7de32cbf3302749b0c19a929 | 4,038 | py | Python | capa/features/extractors/ida/basicblock.py | clayne/capa | e47f5a2548443509b0f7f251fb10ae3eadb34a88 | [
"Apache-2.0"
] | 1,887 | 2020-07-16T19:43:23.000Z | 2021-09-23T08:40:43.000Z | capa/features/extractors/ida/basicblock.py | clayne/capa | e47f5a2548443509b0f7f251fb10ae3eadb34a88 | [
"Apache-2.0"
] | 440 | 2020-07-16T19:02:32.000Z | 2021-09-23T08:46:44.000Z | capa/features/extractors/ida/basicblock.py | clayne/capa | e47f5a2548443509b0f7f251fb10ae3eadb34a88 | [
"Apache-2.0"
] | 304 | 2020-07-16T19:45:49.000Z | 2021-09-18T00:15:41.000Z | # Copyright (C) 2020 Mandiant, 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: [package root]/LICENSE.txt
# Unless required by applicable law or agreed to in writing... | 27.657534 | 111 | 0.679049 |
7983cf25329990859aad629076ff3214e8a5a7c3 | 7,184 | py | Python | glance/tests/functional/v2/test_metadef_properties.py | komawar/glance | e550cac697dd8c78e837c6884f599ac6ee2137ae | [
"Apache-2.0"
] | null | null | null | glance/tests/functional/v2/test_metadef_properties.py | komawar/glance | e550cac697dd8c78e837c6884f599ac6ee2137ae | [
"Apache-2.0"
] | null | null | null | glance/tests/functional/v2/test_metadef_properties.py | komawar/glance | e550cac697dd8c78e837c6884f599ac6ee2137ae | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.690608 | 74 | 0.612194 |
7983cf96e7ae2c2a3e1b9b364a56a035fdc9e1a2 | 3,781 | py | Python | claire/daemon.py | devilicecream/Claire | 50768bac205d3bdee04f28a4ea13cd83f3acb137 | [
"BSD-2-Clause"
] | null | null | null | claire/daemon.py | devilicecream/Claire | 50768bac205d3bdee04f28a4ea13cd83f3acb137 | [
"BSD-2-Clause"
] | null | null | null | claire/daemon.py | devilicecream/Claire | 50768bac205d3bdee04f28a4ea13cd83f3acb137 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
__author__ = 'walter'
import sys, os, time, atexit
from signal import SIGTERM
class Daemon(object):
"""
A generic daemon class.
Usage: subclass the Daemon class and override the run() method
"""
def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev... | 28.007407 | 110 | 0.504893 |
7983cfead880fcd619a2bff6c13f005c0086ca3f | 10,939 | py | Python | conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_build_modules.py | daravi/conan | f16ff888b76bd12897ca8aa41bca21b624ce73b4 | [
"MIT"
] | null | null | null | conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_build_modules.py | daravi/conan | f16ff888b76bd12897ca8aa41bca21b624ce73b4 | [
"MIT"
] | null | null | null | conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_build_modules.py | daravi/conan | f16ff888b76bd12897ca8aa41bca21b624ce73b4 | [
"MIT"
] | 1 | 2021-08-20T19:47:51.000Z | 2021-08-20T19:47:51.000Z | import os
import platform
import textwrap
import unittest
import pytest
from conans.model.ref import ConanFileReference, PackageReference
from conans.test.assets.genconanfile import GenConanfile
from conans.test.utils.tools import TestClient, NO_SETTINGS_PACKAGE_ID
@pytest.mark.skip(reason="CMakeDeps build modules ... | 39.923358 | 101 | 0.576744 |
7983d0e03de0a57294cbf23eb907633610f72b6d | 677 | py | Python | finrepo/users/models.py | leonardoo/finrepo | 5b0f5ca0cda7beab786a633881beb1f764bcbb2e | [
"MIT"
] | null | null | null | finrepo/users/models.py | leonardoo/finrepo | 5b0f5ca0cda7beab786a633881beb1f764bcbb2e | [
"MIT"
] | null | null | null | finrepo/users/models.py | leonardoo/finrepo | 5b0f5ca0cda7beab786a633881beb1f764bcbb2e | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.db.models import CharField
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
class User(AbstractUser):
"""Default user for finrepo."""
#: First and last name do not cover name patterns around the globe
na... | 29.434783 | 74 | 0.682422 |
7983d1f4c54ebf95cd7cddddca16a857425ce6b4 | 613 | py | Python | credentials.py | Marcos8060/Password-locker | c78cfb4539330c89c38cf21c88c80db9faa92512 | [
"Unlicense"
] | null | null | null | credentials.py | Marcos8060/Password-locker | c78cfb4539330c89c38cf21c88c80db9faa92512 | [
"Unlicense"
] | null | null | null | credentials.py | Marcos8060/Password-locker | c78cfb4539330c89c38cf21c88c80db9faa92512 | [
"Unlicense"
] | null | null | null | class Credentials:
# declaring an empty user accounts list
user_accounts = []
def __init__(self,user_name,user_password):
self.user_name = user_name
self.user_password = user_password
# method to save a user account
def save_account(self):
Credentials.user_accounts.appe... | 23.576923 | 47 | 0.675367 |
7983d255369906d124f2d557ced835f218ef4d29 | 12,169 | py | Python | poroto/none/streams.py | TANGO-Project/poroto | 380c0ab9f33bead70ed71c78493e682924d7f997 | [
"BSD-3-Clause"
] | 1 | 2018-05-22T22:53:31.000Z | 2018-05-22T22:53:31.000Z | poroto/none/streams.py | TANGO-Project/poroto | 380c0ab9f33bead70ed71c78493e682924d7f997 | [
"BSD-3-Clause"
] | null | null | null | poroto/none/streams.py | TANGO-Project/poroto | 380c0ab9f33bead70ed71c78493e682924d7f997 | [
"BSD-3-Clause"
] | null | null | null | from poroto.stream import Stream
from poroto.roccc.wrappers import BurstWrapper, MicroFifo, SynchInterface
class RocccBramInStream(Stream):
def __init__(self, name, memory_name, size, data_size, debug):
Stream.__init__(self, name, memory_name, size, data_size, debug)
self.in_stream=True
def ge... | 55.063348 | 192 | 0.596351 |
7983d3991d26d7d9e8bf5e14b868300b6a076360 | 4,097 | py | Python | mars/tensor/base/broadcast_to.py | wdkwyf/mars | 3f750e360e64380eab779301a5103994d4886b6a | [
"Apache-2.0"
] | null | null | null | mars/tensor/base/broadcast_to.py | wdkwyf/mars | 3f750e360e64380eab779301a5103994d4886b6a | [
"Apache-2.0"
] | null | null | null | mars/tensor/base/broadcast_to.py | wdkwyf/mars | 3f750e360e64380eab779301a5103994d4886b6a | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2018 Alibaba Group Holding Ltd.
#
# 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 a... | 34.428571 | 116 | 0.637296 |
7983d44f263c5e700db916cf62812652f12492ab | 1,947 | py | Python | explicates/model/annotation.py | alexandermendes/libanno | bc504498ef330fab46f2334f96631457d520ec90 | [
"MIT"
] | 7 | 2018-05-22T04:54:08.000Z | 2020-05-28T20:27:39.000Z | explicates/model/annotation.py | alexandermendes/libanno | bc504498ef330fab46f2334f96631457d520ec90 | [
"MIT"
] | 9 | 2018-07-20T12:54:24.000Z | 2020-11-05T17:44:19.000Z | explicates/model/annotation.py | alexandermendes/libanno | bc504498ef330fab46f2334f96631457d520ec90 | [
"MIT"
] | 1 | 2019-06-12T14:19:33.000Z | 2019-06-12T14:19:33.000Z | # -*- coding: utf8 -*-
"""Annotation model."""
from flask import url_for, current_app
from sqlalchemy.schema import Column, ForeignKey
from sqlalchemy import Integer, String
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy.ext.declarative import declarative_base
from explicates.core import db
from ex... | 30.904762 | 79 | 0.653826 |
7983d5acffbd7f25289ad86466a77147dfdd9564 | 1,246 | py | Python | consumers/python/weather_consumer.py | bietdoikiem/pipeline-asm-1 | e9b505d80c6efe6c0343e0a0f32d54f8fdb214a6 | [
"MIT"
] | null | null | null | consumers/python/weather_consumer.py | bietdoikiem/pipeline-asm-1 | e9b505d80c6efe6c0343e0a0f32d54f8fdb214a6 | [
"MIT"
] | null | null | null | consumers/python/weather_consumer.py | bietdoikiem/pipeline-asm-1 | e9b505d80c6efe6c0343e0a0f32d54f8fdb214a6 | [
"MIT"
] | 1 | 2021-09-25T09:50:48.000Z | 2021-09-25T09:50:48.000Z |
from kafka import KafkaConsumer
import pandas as pd
import os, json
import ast
# from cassandrautils import saveWeatherreport
if __name__ == "__main__":
print("Starting Weather Consumer")
TOPIC_NAME = os.environ.get("TOPIC_NAME")
KAFKA_BROKER_URL = os.environ.get("KAFKA_BROKER_URL", "localhost:9092")
... | 34.611111 | 78 | 0.67496 |
7983d61f30c5eb0463f96876b247bc8393f93c36 | 1,869 | py | Python | cvxpy/performance_tests/test_warmstart.py | quantopian/cvxpy | 7deee4d172470aa8f629dab7fead50467afa75ff | [
"Apache-2.0"
] | 5 | 2017-08-31T01:37:00.000Z | 2022-03-24T04:23:09.000Z | cvxpy/performance_tests/test_warmstart.py | quantopian/cvxpy | 7deee4d172470aa8f629dab7fead50467afa75ff | [
"Apache-2.0"
] | null | null | null | cvxpy/performance_tests/test_warmstart.py | quantopian/cvxpy | 7deee4d172470aa8f629dab7fead50467afa75ff | [
"Apache-2.0"
] | 6 | 2017-02-09T19:37:07.000Z | 2021-01-07T00:17:54.000Z | """
Copyright 2017 Steven Diamond
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... | 30.145161 | 72 | 0.629213 |
7983d68e60d381f57127f2d82a5393887f3fefc4 | 5,955 | pyw | Python | src/winlamp.pyw | CILAMP/virtual_cilamp | ece9f665514238b7a055dffadab4d197fa7ae453 | [
"MIT"
] | 3 | 2016-12-06T23:42:24.000Z | 2017-02-26T09:32:42.000Z | src/winlamp.pyw | CILAMP/virtual_cilamp | ece9f665514238b7a055dffadab4d197fa7ae453 | [
"MIT"
] | 8 | 2016-11-23T09:47:21.000Z | 2017-06-03T11:44:21.000Z | src/winlamp.pyw | CILAMP/virtual_cilamp | ece9f665514238b7a055dffadab4d197fa7ae453 | [
"MIT"
] | 1 | 2016-11-28T15:12:11.000Z | 2016-11-28T15:12:11.000Z | # coding: utf-8
import os
import sys
import time
import socket
import webbrowser
from uuid import getnode as get_mac
from threading import Thread
from time import sleep
# Local
from client import PY2, FakeLamp
from pulser import Pulser
from optparse import OptionParser
WINDOWS = 'nt' == os.name
# Fill the 2<>3 gap
i... | 26.004367 | 76 | 0.607725 |
7983d6ab69435dd0e25ff7b3009a914a43eca142 | 3,913 | py | Python | Ichigo/modules/gtranslator.py | DARKCYBERGANG/IchigoBot | 4b963c7509e8e8a2e7bc0fecf352ebabb93d1d18 | [
"MIT"
] | 2 | 2021-07-21T18:39:13.000Z | 2021-11-03T19:28:49.000Z | Ichigo/modules/gtranslator.py | DARKCYBERGANG/IchigoBot | 4b963c7509e8e8a2e7bc0fecf352ebabb93d1d18 | [
"MIT"
] | null | null | null | Ichigo/modules/gtranslator.py | DARKCYBERGANG/IchigoBot | 4b963c7509e8e8a2e7bc0fecf352ebabb93d1d18 | [
"MIT"
] | 3 | 2021-04-25T08:17:10.000Z | 2021-05-03T10:37:11.000Z | from emoji import UNICODE_EMOJI
from google_trans_new import LANGUAGES, google_translator
from telegram import ParseMode, Update
from telegram.ext import CallbackContext, run_async
from Ichigo import dispatcher
from Ichigo.modules.disable import DisableAbleCommandHandler
@run_async
def totranslate(update: Update, co... | 36.570093 | 119 | 0.593918 |
7983d7371ee5ddcc8dc9dd337029b73e5349bf08 | 114 | py | Python | config/mail_config.py | yijianduanlang/n95-py | 6efefe9497ed95a75c7712323a85daec7eb7f3aa | [
"MIT"
] | 357 | 2020-02-08T07:07:18.000Z | 2022-03-26T02:44:53.000Z | config/mail_config.py | tavernier/N95-watcher | 6efefe9497ed95a75c7712323a85daec7eb7f3aa | [
"MIT"
] | 14 | 2020-02-10T08:12:58.000Z | 2022-03-12T00:15:19.000Z | config/mail_config.py | tavernier/N95-watcher | 6efefe9497ed95a75c7712323a85daec7eb7f3aa | [
"MIT"
] | 107 | 2020-02-08T13:26:27.000Z | 2022-03-05T04:38:26.000Z | mail_config = {
"host":"smtp.qq.com",
"user":"xxx@qq.com",
"passwd":"xxx",
"to":"xx@outlook.com"
} | 19 | 25 | 0.517544 |
7983d89cc8c57dc970f0112916459a90faa5367e | 2,904 | py | Python | qa/rpc-tests/zapwallettxes.py | hashtagcoin/hashtagcoinCORE | 1c7c0dd4aed70364909d4666f150c45e741e6f76 | [
"MIT"
] | null | null | null | qa/rpc-tests/zapwallettxes.py | hashtagcoin/hashtagcoinCORE | 1c7c0dd4aed70364909d4666f150c45e741e6f76 | [
"MIT"
] | null | null | null | qa/rpc-tests/zapwallettxes.py | hashtagcoin/hashtagcoinCORE | 1c7c0dd4aed70364909d4666f150c45e741e6f76 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Hashtagcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import HashtagcoinTestFramework
from test_framework.util import *
... | 37.230769 | 106 | 0.646006 |
7983d8bda0890cc86ee3461617f6d996e3824614 | 3,388 | py | Python | sysinv/sysinv/sysinv/sysinv/tests/conductor/test_rpcapi.py | Wind-River/starlingx-config | 96b92e5179d54dde10cb84c943eb239adf26b958 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/tests/conductor/test_rpcapi.py | Wind-River/starlingx-config | 96b92e5179d54dde10cb84c943eb239adf26b958 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/tests/conductor/test_rpcapi.py | Wind-River/starlingx-config | 96b92e5179d54dde10cb84c943eb239adf26b958 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# coding=utf-8
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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 Lic... | 34.571429 | 78 | 0.655254 |
7983d95d788b62c0bb1060208ea56ddc54240d57 | 329,389 | py | Python | Cython/Compiler/Nodes.py | joonro/cython | 4ebc647c2fa54179d25335b2dcf5d845e7fc9a79 | [
"Apache-2.0"
] | null | null | null | Cython/Compiler/Nodes.py | joonro/cython | 4ebc647c2fa54179d25335b2dcf5d845e7fc9a79 | [
"Apache-2.0"
] | null | null | null | Cython/Compiler/Nodes.py | joonro/cython | 4ebc647c2fa54179d25335b2dcf5d845e7fc9a79 | [
"Apache-2.0"
] | null | null | null | #
# Parse tree nodes
#
import cython
cython.declare(sys=object, os=object, copy=object,
Builtin=object, error=object, warning=object, Naming=object, PyrexTypes=object,
py_object_type=object, ModuleScope=object, LocalScope=object, ClosureScope=object,
StructOrUnionScope=ob... | 39.71892 | 179 | 0.589923 |
7983d9f64fcff74e89823ad6d7164255f26dda52 | 6,572 | py | Python | pdvc/ops/modules/ms_deform_attn.py | ajd12342/PDVC | 0a8728c273102c0ba5849255b941c409d599322e | [
"MIT"
] | 74 | 2021-08-18T00:40:36.000Z | 2022-03-28T09:03:40.000Z | pdvc/ops/modules/ms_deform_attn.py | ajd12342/PDVC | 0a8728c273102c0ba5849255b941c409d599322e | [
"MIT"
] | 24 | 2021-08-30T21:21:45.000Z | 2022-03-31T00:28:39.000Z | pdvc/ops/modules/ms_deform_attn.py | ajd12342/PDVC | 0a8728c273102c0ba5849255b941c409d599322e | [
"MIT"
] | 9 | 2021-08-25T12:33:55.000Z | 2022-03-18T05:36:12.000Z | # ------------------------------------------------------------------------------------------------
# Deformable DETR
# Copyright (c) 2020 SenseTime. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 [see LICENSE for details]
# -------------------------------------------------------------------------... | 51.748031 | 137 | 0.616707 |
7983dbd70bc0a3fad07014582aaf6b8b9e3e660a | 3,618 | py | Python | jacket/compute/scheduler/client/query.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | null | null | null | jacket/compute/scheduler/client/query.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | null | null | null | jacket/compute/scheduler/client/query.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | 2 | 2016-08-10T02:21:49.000Z | 2020-07-24T01:57:21.000Z | # Copyright (c) 2014 Red Hat, 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 require... | 42.069767 | 79 | 0.668878 |
7983dbf4e67a620ef19d303ef4e3d3378905e1d2 | 7,520 | py | Python | greentest/test__all__.py | pubnub/gevent | e2ec8bb71fcccd01cee76fa97ca22bd467741a8b | [
"MIT"
] | 1 | 2020-03-21T05:34:18.000Z | 2020-03-21T05:34:18.000Z | greentest/test__all__.py | pubnub/gevent | e2ec8bb71fcccd01cee76fa97ca22bd467741a8b | [
"MIT"
] | null | null | null | greentest/test__all__.py | pubnub/gevent | e2ec8bb71fcccd01cee76fa97ca22bd467741a8b | [
"MIT"
] | 1 | 2021-01-13T11:20:12.000Z | 2021-01-13T11:20:12.000Z | """Check __all__, __implements__, __extensions__, __imports__ of the modules"""
from __future__ import print_function
import six
import sys
import unittest
import types
from greentest import walk_modules
MAPPING = {'gevent.local': '_threading_local',
'gevent.socket': 'socket',
'gevent.select': '... | 38.564103 | 135 | 0.625133 |
7983dc5a01aa355822a291894e0358c91010a87f | 12,977 | py | Python | qiskit/transpiler/passmanager.py | AzizNgoueya/qiskit-terra | 084c51327c5c4d72f72716f88e033ac64f075318 | [
"Apache-2.0"
] | null | null | null | qiskit/transpiler/passmanager.py | AzizNgoueya/qiskit-terra | 084c51327c5c4d72f72716f88e033ac64f075318 | [
"Apache-2.0"
] | null | null | null | qiskit/transpiler/passmanager.py | AzizNgoueya/qiskit-terra | 084c51327c5c4d72f72716f88e033ac64f075318 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 40.680251 | 98 | 0.614009 |
7983dce90eaf8cacf59ca9c1bd27d49c70059c11 | 5,258 | py | Python | klayout_dot_config/tech/EBeam/pymacros/pcells_EBeam/Wireguide.py | YixuanWUSTL/SiEPIC_EBeam_PDK | 38cc7ef2af17e418eaa4757a43ec240f1f5c4b17 | [
"MIT"
] | 95 | 2015-11-15T10:23:13.000Z | 2022-03-10T22:00:44.000Z | klayout_dot_config/tech/EBeam/pymacros/pcells_EBeam/Wireguide.py | YixuanWUSTL/SiEPIC_EBeam_PDK | 38cc7ef2af17e418eaa4757a43ec240f1f5c4b17 | [
"MIT"
] | 155 | 2015-11-14T12:08:09.000Z | 2020-05-17T01:37:23.000Z | klayout_dot_config/tech/EBeam/pymacros/pcells_EBeam/Wireguide.py | YixuanWUSTL/SiEPIC_EBeam_PDK | 38cc7ef2af17e418eaa4757a43ec240f1f5c4b17 | [
"MIT"
] | 87 | 2015-11-16T12:23:22.000Z | 2022-03-31T19:01:59.000Z | from . import *
from pya import *
class Wireguide(pya.PCellDeclarationHelper):
'''
RIT Integrated Photonics Group of Stefan Preble (Karl McNulty)
new wireguide class (essentially the metal path equivalent to a waveguide but no bend is allowed)
'''
def __init__(self):
# Important: initialize the super cl... | 38.101449 | 229 | 0.627425 |
7983dd1adc64bcad6b4e0270ac722d17e86b1d77 | 1,353 | py | Python | src/Genome/sequence/EulerPath.py | jbhangoo/jbhangoo.github.io | dd9ae5238cd493388145f2fd33b8e848295d426a | [
"Apache-2.0"
] | null | null | null | src/Genome/sequence/EulerPath.py | jbhangoo/jbhangoo.github.io | dd9ae5238cd493388145f2fd33b8e848295d426a | [
"Apache-2.0"
] | null | null | null | src/Genome/sequence/EulerPath.py | jbhangoo/jbhangoo.github.io | dd9ae5238cd493388145f2fd33b8e848295d426a | [
"Apache-2.0"
] | null | null | null | class Node():
def __init__(self, name):
self.name = name
self.ins = []
self.outs = []
class EulerPath():
def __init__(self, adj):
self.graph = {}
for src,destlist in adj.items():
srcnode = self.getNode(src)
for dest in destlist:
destnode = self.... | 28.1875 | 54 | 0.513673 |
7983dd5822aecb21a44c5f5929f205847e3e4b99 | 28,468 | py | Python | tools/check_format.py | boazjohn/envoy | aab05453ff2e354093f70d0b1160e25e6cd79a66 | [
"Apache-2.0"
] | 1 | 2019-04-01T01:01:55.000Z | 2019-04-01T01:01:55.000Z | tools/check_format.py | boazjohn/envoy | aab05453ff2e354093f70d0b1160e25e6cd79a66 | [
"Apache-2.0"
] | null | null | null | tools/check_format.py | boazjohn/envoy | aab05453ff2e354093f70d0b1160e25e6cd79a66 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import argparse
import common
import fileinput
import multiprocessing
import os
import os.path
import re
import subprocess
import stat
import sys
import traceback
EXCLUDED_PREFIXES = ("./generated/", "./thirdparty/", "./build", "./.git/", "./bazel-", "./.ca... | 40.902299 | 125 | 0.70711 |
7983dfd281375ecc9cb612331b9556f796cde5da | 1,659 | py | Python | qiskit_nature/drivers/bosonic_bases/bosonic_basis.py | SooluThomas/qiskit-nature | 0d509525b68b76d0f2d613d0e7409b9ea65cfcc0 | [
"Apache-2.0"
] | 1 | 2021-06-20T15:31:01.000Z | 2021-06-20T15:31:01.000Z | qiskit_nature/drivers/bosonic_bases/bosonic_basis.py | SooluThomas/qiskit-nature | 0d509525b68b76d0f2d613d0e7409b9ea65cfcc0 | [
"Apache-2.0"
] | 1 | 2021-08-25T13:31:41.000Z | 2021-08-25T13:31:41.000Z | qiskit_nature/drivers/bosonic_bases/bosonic_basis.py | LaurinFischer/qiskit-nature | 7baf7c7f8c3d18e082e90bc1e593c47aa2f698ca | [
"Apache-2.0"
] | 3 | 2021-07-02T06:57:58.000Z | 2021-07-06T12:32:38.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 34.5625 | 99 | 0.693189 |
7983e00a5da8363da10e8d422aed4285efbd315b | 3,159 | py | Python | gpMgmt/bin/gppylib/test/unit/test_unit_rebalance_segment.py | abhisheknishant138/gpdb | 1805743d505837026aa137cabb8a7072d745a129 | [
"PostgreSQL",
"Apache-2.0"
] | 4 | 2017-11-28T08:12:58.000Z | 2020-10-28T04:15:52.000Z | gpMgmt/bin/gppylib/test/unit/test_unit_rebalance_segment.py | abhisheknishant138/gpdb | 1805743d505837026aa137cabb8a7072d745a129 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | gpMgmt/bin/gppylib/test/unit/test_unit_rebalance_segment.py | abhisheknishant138/gpdb | 1805743d505837026aa137cabb8a7072d745a129 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | from mock import *
from .gp_unittest import *
from gppylib.gparray import GpArray, Segment
from gppylib.commands.base import CommandResult
from gppylib.operations.rebalanceSegments import GpSegmentRebalanceOperation
class RebalanceSegmentsTestCase(GpTestCase):
def setUp(self):
self.pool = Mock()
... | 41.025974 | 110 | 0.705603 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.