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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
474e39f932f09701d13fdc237d0528baa6a57177 | 13,299 | py | Python | quant/utils/web.py | guantau/thenextquant | 99942f4c0b70c24921f17eeba7beb76b4ac62930 | [
"MIT"
] | 1 | 2022-02-21T15:08:23.000Z | 2022-02-21T15:08:23.000Z | quant/utils/web.py | mrganer/thenextquant | 52fb22f5df20d43cb275a08adad81dc97f25a712 | [
"MIT"
] | null | null | null | quant/utils/web.py | mrganer/thenextquant | 52fb22f5df20d43cb275a08adad81dc97f25a712 | [
"MIT"
] | 2 | 2020-07-18T17:03:59.000Z | 2021-02-11T00:28:13.000Z | # -*- coding:utf-8 -*-
"""
Web module.
Author: HuangTao
Date: 2018/08/26
Email: huangtao@ifclover.com
"""
import json
import base64
import aiohttp
from aiohttp import web
from urllib.parse import urlparse
from quant.utils import tools
from quant.utils import logger
from quant.config import config
from quant.util... | 37.674221 | 123 | 0.604181 |
d822e5f44ceea068728afd67803ad06ec489acfc | 28,162 | py | Python | cleanrl/ppo_atari_visual.py | limberc/cleanrl | 61c7f4572bfbcfccb061f247e53e83119146e0db | [
"MIT"
] | null | null | null | cleanrl/ppo_atari_visual.py | limberc/cleanrl | 61c7f4572bfbcfccb061f247e53e83119146e0db | [
"MIT"
] | null | null | null | cleanrl/ppo_atari_visual.py | limberc/cleanrl | 61c7f4572bfbcfccb061f247e53e83119146e0db | [
"MIT"
] | null | null | null | # https://github.com/facebookresearch/torchbeast/blob/master/torchbeast/core/environment.py
from collections import deque
import cv2
import gym
from gym import spaces
cv2.ocl.setUseOpenCL(False)
class NoopResetEnv(gym.Wrapper):
def __init__(self, env, noop_max=30):
"""Sample initial states by taking ra... | 38.790634 | 133 | 0.616931 |
c99a58ea8d2a3b8358703a64c0aaa8fd82aac883 | 4,139 | py | Python | instabot/bot/bot_like.py | StefanoPoma97/insta-bot1 | 94720c241a697ed3fc67d6f4bc94bd34ee20b27a | [
"Apache-2.0"
] | null | null | null | instabot/bot/bot_like.py | StefanoPoma97/insta-bot1 | 94720c241a697ed3fc67d6f4bc94bd34ee20b27a | [
"Apache-2.0"
] | null | null | null | instabot/bot/bot_like.py | StefanoPoma97/insta-bot1 | 94720c241a697ed3fc67d6f4bc94bd34ee20b27a | [
"Apache-2.0"
] | null | null | null | from tqdm import tqdm
def like(self, media_id):
if not self.reached_limit('likes'):
self.delay('like')
if not self.check_media(media_id):
return False
if self.api.like(media_id):
self.logger.info("Liked media %d." % media_id)
self.total['likes'] += 1
... | 32.335938 | 102 | 0.658855 |
6ca7a36338f1bf7f31c1bbd1b37d8f695bfb71fd | 397 | py | Python | basics/solutions/array_operations.py | carlosal1015/ACM-Python-Tutorials-KAUST-2015 | 688acf1017dba7687254a8c880b7f19c6f939c3f | [
"CC-BY-3.0"
] | 5 | 2019-01-16T14:43:43.000Z | 2021-06-29T02:20:47.000Z | basics/solutions/array_operations.py | carlosal1015/ACM-Python-Tutorials-KAUST-2015 | 688acf1017dba7687254a8c880b7f19c6f939c3f | [
"CC-BY-3.0"
] | null | null | null | basics/solutions/array_operations.py | carlosal1015/ACM-Python-Tutorials-KAUST-2015 | 688acf1017dba7687254a8c880b7f19c6f939c3f | [
"CC-BY-3.0"
] | 3 | 2017-02-21T06:19:19.000Z | 2021-06-29T02:20:54.000Z | print('Part 1:')
print 10+np.arange(90)
print('\nPart 2:')
print np.nonzero([1,2,0,0,4,0])[0]
print('\nPart 3:')
chess = np.zeros((8,8))
chess[1::2,::2] = 1
chess[::2,1::2] = 1
print chess
print('\nPart 4:')
print np.fromfunction(lambda i, j: (i +1)* (j+1)**2, (5, 3), dtype=int)
print('\nPart 5:')
normal_dist = np.... | 19.85 | 71 | 0.619647 |
76516803db1be76f7c5fa9baf54d0b106b37884c | 5,395 | py | Python | library/py/sphinxextras/cmakedomain.py | eblot/tde-base | 0be99e58cbe8ee70c896645131be6e0ad3c75744 | [
"MIT"
] | null | null | null | library/py/sphinxextras/cmakedomain.py | eblot/tde-base | 0be99e58cbe8ee70c896645131be6e0ad3c75744 | [
"MIT"
] | null | null | null | library/py/sphinxextras/cmakedomain.py | eblot/tde-base | 0be99e58cbe8ee70c896645131be6e0ad3c75744 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
sphinx_domain_cmake
~~~~~~~~~~~~~~~~~~~
A CMake domain.
:copyright: 2012 by Kay-Uwe (Kiwi) Lorenz, ModuleWorks GmbH
:license: BSD, see LICENSE for details.
"""
from .domaintools import custom_domain
import re
from docutils import nodes
from sphinx import addnodes
from... | 25.56872 | 88 | 0.572567 |
d0e5b4c55d35e4d4463a595d56e44b850631ca29 | 25,976 | py | Python | kafka_consumer/datadog_checks/kafka_consumer/legacy_0_10_2.py | tanner-bruce/integrations-core | 36337b84fefb73e94d4f1ee28aaeb669dc12fb59 | [
"BSD-3-Clause"
] | null | null | null | kafka_consumer/datadog_checks/kafka_consumer/legacy_0_10_2.py | tanner-bruce/integrations-core | 36337b84fefb73e94d4f1ee28aaeb669dc12fb59 | [
"BSD-3-Clause"
] | null | null | null | kafka_consumer/datadog_checks/kafka_consumer/legacy_0_10_2.py | tanner-bruce/integrations-core | 36337b84fefb73e94d4f1ee28aaeb669dc12fb59 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
from __future__ import division
from collections import defaultdict
from time import time
from kafka import errors as kafka_errors
from kafka.client import KafkaClient
from kafka.protocol.commit import GroupCo... | 56.225108 | 145 | 0.641207 |
1fa86c4d5d8174d3d773eedbd654e0cdf91b5194 | 2,613 | py | Python | CIM16/CDPSM/Asset/IEC61968/AssetModels/OverheadConductorInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM16/CDPSM/Asset/IEC61968/AssetModels/OverheadConductorInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM16/CDPSM/Asset/IEC61968/AssetModels/OverheadConductorInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 1 | 2021-04-02T18:04:49.000Z | 2021-04-02T18:04:49.000Z | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 50.25 | 123 | 0.753923 |
af73e8ab81964641c973296e681546e9a9cd2d01 | 9,087 | py | Python | .history/classes/Menu_20171107203023.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Menu_20171107203023.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Menu_20171107203023.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | # DADSA - Assignment 1
# Reece Benson
from functools import partial
from os import system as call
from collections import OrderedDict
class Menu():
# Define the variables we will be using
_app = None
_menu = None
_current = [ "main" ]
_current_menu = "main"
just_called_back = False
def __... | 40.386667 | 218 | 0.563222 |
a468a36888be87334e7aaf4f9c3ff4e8cd661019 | 868 | py | Python | troposphere/resourcegroups.py | pierretr/troposphere | 1bd6a010a3132aa3436ffe6b892f352876face4b | [
"BSD-2-Clause"
] | 4,573 | 2015-01-02T20:31:04.000Z | 2022-03-31T17:15:32.000Z | troposphere/resourcegroups.py | pierretr/troposphere | 1bd6a010a3132aa3436ffe6b892f352876face4b | [
"BSD-2-Clause"
] | 1,730 | 2015-01-02T19:24:47.000Z | 2022-03-31T23:22:52.000Z | troposphere/resourcegroups.py | pierretr/troposphere | 1bd6a010a3132aa3436ffe6b892f352876face4b | [
"BSD-2-Clause"
] | 1,753 | 2015-01-01T01:24:12.000Z | 2022-03-27T05:36:17.000Z | # Copyright (c) 2020, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject, AWSProperty, Tags
from .validators import resourcequery_type
class TagFilter(AWSProperty):
props = {
"Key": (str, False),
"Values": ([str], False),
}
class ... | 21.170732 | 48 | 0.592166 |
934801b3e77c4ea931cb7dcee3d83459e05d42d4 | 2,650 | py | Python | 2016/slides/ComputationalGeometry/arc.py | MercerBinaryBears/ProgrammingTeam | 5a4819753ad14d16022778388c772da100e22517 | [
"MIT"
] | 1 | 2016-07-18T04:14:50.000Z | 2016-07-18T04:14:50.000Z | 2016/slides/ComputationalGeometry/arc.py | MercerBinaryBears/ProgrammingTeam | 5a4819753ad14d16022778388c772da100e22517 | [
"MIT"
] | 7 | 2016-08-10T22:56:45.000Z | 2016-08-11T13:12:19.000Z | 2016/slides/ComputationalGeometry/arc.py | tylerburnham42/ProgrammingTeam | 5a4819753ad14d16022778388c772da100e22517 | [
"MIT"
] | null | null | null | from math import cos, sin, pi
def distance(p1, p2):
dx = p1[0] - p2[0]
dy = p1[1] - p2[1]
return (dx * dx + dy * dy)**0.5
def equals(p1, p2, epsilon=0.001):
return distance(p1, p2) <= epsilon
def add(p1, p2):
return p1[0] + p2[0], p1[1] + p2[1]
def subtract(p1, p2):
return p1[0] - p2[0], p1[1] - p2[1]
def sc... | 35.333333 | 125 | 0.698868 |
bbb6476e66e84ce6287eea92f265a0996785164f | 1,806 | py | Python | du/gerrit/ssh/File.py | spiricn/DevUtils | 58a035a08a7c58035c25f992c1b8aa33cc997cd2 | [
"MIT"
] | 1 | 2021-12-21T13:18:08.000Z | 2021-12-21T13:18:08.000Z | du/gerrit/ssh/File.py | spiricn/DevUtils | 58a035a08a7c58035c25f992c1b8aa33cc997cd2 | [
"MIT"
] | null | null | null | du/gerrit/ssh/File.py | spiricn/DevUtils | 58a035a08a7c58035c25f992c1b8aa33cc997cd2 | [
"MIT"
] | null | null | null | from enum import Enum
class File:
"""
Information about a patch on a file
Schema described here
https://gerrit-review.googlesource.com/Documentation/json.html#file
"""
class Type(Enum):
"""
The type of change
"""
# The file is being created/introduced by this... | 22.860759 | 78 | 0.567553 |
8013e246f1f8cd3643568089e03bfcae6e6fade2 | 594 | py | Python | reviews/migrations/0002_review_room.py | alstn2468/Django_Airbnb_Clone | eeb61e4a36320a0b269d96f47cc6755dbc4c40f8 | [
"MIT"
] | 5 | 2019-11-26T00:34:24.000Z | 2021-01-04T06:04:48.000Z | reviews/migrations/0002_review_room.py | alstn2468/Django_Airbnb_Clone | eeb61e4a36320a0b269d96f47cc6755dbc4c40f8 | [
"MIT"
] | 3 | 2021-06-09T19:05:40.000Z | 2021-09-08T01:49:01.000Z | reviews/migrations/0002_review_room.py | alstn2468/Django_Airbnb_Clone | eeb61e4a36320a0b269d96f47cc6755dbc4c40f8 | [
"MIT"
] | 6 | 2019-11-24T11:47:09.000Z | 2021-08-16T20:21:35.000Z | # Generated by Django 2.2.5 on 2019-12-22 12:48
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
("rooms", "0001_initial"),
("reviews", "0001_initial"),
]
operations = [
migratio... | 22 | 60 | 0.553872 |
f230ecac51fed70dea728667639fbb6bf63023fb | 12,398 | py | Python | zvmsdk/sdkwsgi/validation/parameter_types.py | IBMCaoBiao/python-zvm-sdk | 655e701cf3f90c57b0969c1f9971541ab38cedc4 | [
"Apache-2.0"
] | 1 | 2017-08-17T06:31:33.000Z | 2017-08-17T06:31:33.000Z | zvmsdk/sdkwsgi/validation/parameter_types.py | SharpRazor/python-zvm-sdk | 655e701cf3f90c57b0969c1f9971541ab38cedc4 | [
"Apache-2.0"
] | 1 | 2019-12-10T08:38:01.000Z | 2019-12-10T08:38:01.000Z | zvmsdk/sdkwsgi/validation/parameter_types.py | SharpRazor/python-zvm-sdk | 655e701cf3f90c57b0969c1f9971541ab38cedc4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017,2020 IBM Corp.
# Copyright 2013 NEC Corporation.
# 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/LI... | 21.904594 | 78 | 0.492337 |
8c10bb7f88ef8f92fc43cb390c1c21924dd070d5 | 20,241 | py | Python | torba/torba/client/basetransaction.py | gpjacobs/lbry-sdk | 3562234f9d80552196113d51736321a41dcc91d9 | [
"MIT"
] | null | null | null | torba/torba/client/basetransaction.py | gpjacobs/lbry-sdk | 3562234f9d80552196113d51736321a41dcc91d9 | [
"MIT"
] | null | null | null | torba/torba/client/basetransaction.py | gpjacobs/lbry-sdk | 3562234f9d80552196113d51736321a41dcc91d9 | [
"MIT"
] | null | null | null | import logging
import typing
from typing import List, Iterable, Optional, Tuple
from binascii import hexlify
from torba.client.basescript import BaseInputScript, BaseOutputScript
from torba.client.baseaccount import BaseAccount
from torba.client.constants import COIN, NULL_HASH32
from torba.client.bcd_data_stream impo... | 34.898276 | 105 | 0.613507 |
b30b8b3827cbfc1424e492fe819ce8edc3c79e8d | 2,454 | py | Python | analyses/Outdated/nmhc_YearlyComparisons/ethaneMethane.py | ARLlab/Summit | 1aa0d85cedebe85fab969df004409cc8f28595b3 | [
"Apache-2.0"
] | null | null | null | analyses/Outdated/nmhc_YearlyComparisons/ethaneMethane.py | ARLlab/Summit | 1aa0d85cedebe85fab969df004409cc8f28595b3 | [
"Apache-2.0"
] | 4 | 2020-04-30T01:43:09.000Z | 2022-02-12T07:05:51.000Z | analyses/Outdated/nmhc_YearlyComparisons/ethaneMethane.py | ARLlab/Summit | 1aa0d85cedebe85fab969df004409cc8f28595b3 | [
"Apache-2.0"
] | 4 | 2019-05-13T20:23:03.000Z | 2020-01-24T23:51:45.000Z | """
Created on Tuesday, March 19th, 2019.
This script plots the following ratio in a similar fashion to plotTest.py
1) Ethane / Methane
This code was written in Spyder via Anaconda Distribution [Python 3.7]
"""
## Import Libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from matplotli... | 43.821429 | 111 | 0.695192 |
7615226de6ac97e451ea6009c9dcaf05007b6f03 | 14,214 | py | Python | dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py | guoshupei/dolphinscheduler | 48d526f275f941d2068985b22747fd017a4d48e0 | [
"Apache-2.0"
] | 2 | 2021-11-16T13:01:44.000Z | 2022-03-11T03:10:08.000Z | dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py | guoshupei/dolphinscheduler | 48d526f275f941d2068985b22747fd017a4d48e0 | [
"Apache-2.0"
] | null | null | null | dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py | guoshupei/dolphinscheduler | 48d526f275f941d2068985b22747fd017a4d48e0 | [
"Apache-2.0"
] | 3 | 2022-03-14T07:16:22.000Z | 2022-03-21T03:04:55.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.539846 | 108 | 0.632756 |
8660096cf23d7e280e43ba5ea068b556a0973643 | 1,042 | py | Python | app.py | mnh78614/Project | ed18860d00ea5ec576e8c908320535d7a3df9a92 | [
"MIT"
] | null | null | null | app.py | mnh78614/Project | ed18860d00ea5ec576e8c908320535d7a3df9a92 | [
"MIT"
] | null | null | null | app.py | mnh78614/Project | ed18860d00ea5ec576e8c908320535d7a3df9a92 | [
"MIT"
] | null | null | null | #Create a calculator that asks the user for two numbers
m = "multiplication"
d = "division"
a = "addition"
s = "subtraction"
#function for multiplication
def multiplication():
num1 = input("Okay, enter a number: ")
num2 = input("Okay enter another number: ")
print(float(num1) * float(num2))
#function f... | 22.652174 | 79 | 0.643954 |
5c24163809d3a089d60146898329a58ce2084250 | 758 | py | Python | bookworm/speech.py | xingkong0113/bookworm | 7214067f48e7a951198806a1f9170e3fd8fc0cce | [
"MIT"
] | 36 | 2020-11-15T03:21:39.000Z | 2022-03-05T01:11:26.000Z | bookworm/speech.py | xingkong0113/bookworm | 7214067f48e7a951198806a1f9170e3fd8fc0cce | [
"MIT"
] | 90 | 2020-10-06T14:46:07.000Z | 2022-03-31T03:03:34.000Z | bookworm/speech.py | xingkong0113/bookworm | 7214067f48e7a951198806a1f9170e3fd8fc0cce | [
"MIT"
] | 20 | 2020-09-30T17:40:44.000Z | 2022-03-17T19:59:53.000Z | # coding: utf-8
"""Screen reader and braille output."""
from accessible_output2.outputs.auto import Auto
from bookworm import config
from bookworm.logger import logger
log = logger.getChild(__name__)
_auto_output = None
def announce(message, urgent=False):
"""Speak and braille a message related to UI."""
... | 24.451613 | 68 | 0.692612 |
474c6de9c1c531dcade629c4208d125f51290cba | 1,361 | py | Python | license_protected_downloads/tests/test_pep8.py | NexellCorp/infrastructure_server_fileserver | b2d0cd30b7658735f914c29e401a670d9bb42f92 | [
"Net-SNMP",
"Xnet",
"Info-ZIP",
"OML"
] | null | null | null | license_protected_downloads/tests/test_pep8.py | NexellCorp/infrastructure_server_fileserver | b2d0cd30b7658735f914c29e401a670d9bb42f92 | [
"Net-SNMP",
"Xnet",
"Info-ZIP",
"OML"
] | null | null | null | license_protected_downloads/tests/test_pep8.py | NexellCorp/infrastructure_server_fileserver | b2d0cd30b7658735f914c29e401a670d9bb42f92 | [
"Net-SNMP",
"Xnet",
"Info-ZIP",
"OML"
] | null | null | null | # Copyright (C) 2012 Linaro Ltd.
#
# Author: Loic Minier <loic.minier@linaro.org>
#
# This file is part of Linaro Image Tools.
#
# Linaro Image Tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either vers... | 34.897436 | 77 | 0.667891 |
d17410c31930bec59be37a76440c7071a09e0749 | 500 | py | Python | test/mapreduce/avro_mapred.py | kikkomep/pydoop | 4f855ef775b925b8c9f2adf1c0ef13337323ee24 | [
"Apache-2.0"
] | null | null | null | test/mapreduce/avro_mapred.py | kikkomep/pydoop | 4f855ef775b925b8c9f2adf1c0ef13337323ee24 | [
"Apache-2.0"
] | null | null | null | test/mapreduce/avro_mapred.py | kikkomep/pydoop | 4f855ef775b925b8c9f2adf1c0ef13337323ee24 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import pydoop.mapreduce.api as api
import pydoop.mapreduce.pipes as pp
from pydoop.avrolib import AvroContext
class Mapper(api.Mapper):
def map(self, context):
context.emit('', context.value['population'])
class Reducer(api.Reducer):
def reduce(self, context):
context.e... | 20.833333 | 70 | 0.724 |
c492ea6afbcf73f7483d1b3e5225dad397d4ff0d | 5,769 | py | Python | zoe_master/preprocessing.py | AtosCodex/atos-zoe | 36919a787b7675a571674c2b3c61d3b8f98522cc | [
"Apache-2.0"
] | null | null | null | zoe_master/preprocessing.py | AtosCodex/atos-zoe | 36919a787b7675a571674c2b3c61d3b8f98522cc | [
"Apache-2.0"
] | null | null | null | zoe_master/preprocessing.py | AtosCodex/atos-zoe | 36919a787b7675a571674c2b3c61d3b8f98522cc | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016, Daniele Venzano
#
# 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 w... | 40.914894 | 128 | 0.699775 |
96a94cd453926150ee7af04cd62e419d33a55392 | 3,154 | py | Python | BuildingApp/settings.py | sayakray111/App_Folder | 7cf966efb4bbff6dfb9b364198220fde062f0a7f | [
"MIT"
] | null | null | null | BuildingApp/settings.py | sayakray111/App_Folder | 7cf966efb4bbff6dfb9b364198220fde062f0a7f | [
"MIT"
] | null | null | null | BuildingApp/settings.py | sayakray111/App_Folder | 7cf966efb4bbff6dfb9b364198220fde062f0a7f | [
"MIT"
] | null | null | null | """
Django settings for BuildingApp project.
Generated by 'django-admin startproject' using Django 3.0.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import o... | 25.852459 | 91 | 0.695942 |
dde1571c05813f229b1011378c800326ecaa0d11 | 2,072 | py | Python | Temp.py | Milo980412/HealthReport | 904b056f884bb52a467da19b3338a9a22b6b1a8f | [
"Apache-2.0"
] | null | null | null | Temp.py | Milo980412/HealthReport | 904b056f884bb52a467da19b3338a9a22b6b1a8f | [
"Apache-2.0"
] | null | null | null | Temp.py | Milo980412/HealthReport | 904b056f884bb52a467da19b3338a9a22b6b1a8f | [
"Apache-2.0"
] | null | null | null | import random
from selenium import webdriver
import time
import datetime
#import pandas as pd
#username = ["学号1","学号2",""]
username = ["学号"]
#password = ["密码1","密码2",""]
password = ["密码"]
#可以用pandas导入excel文件
#data = pd.read_excel('account.xlsx', dtype={'username': str})
def fill(username, password):
# 登录
# 通过... | 31.876923 | 116 | 0.684363 |
1277178230a3f9e4fa4b0946fb9828f0373f9806 | 29,727 | py | Python | custom_components/fpl_api/fpl_mod.py | Hojland/hass-fpl | 0492e47fe7c0bab17494f6b78c934fd83fba3abd | [
"Apache-2.0"
] | null | null | null | custom_components/fpl_api/fpl_mod.py | Hojland/hass-fpl | 0492e47fe7c0bab17494f6b78c934fd83fba3abd | [
"Apache-2.0"
] | 2 | 2021-10-11T21:15:11.000Z | 2021-10-11T21:52:21.000Z | custom_components/fpl_api/fpl_mod.py | Hojland/hass-fpl | 0492e47fe7c0bab17494f6b78c934fd83fba3abd | [
"Apache-2.0"
] | null | null | null | """
The FPL module.
Fantasy Premier League API:
* /bootstrap-static
* /bootstrap-dynamic
* /elements
* /element-summary/{player_id}
* /entry/{user_id}
* /entry/{user_id}/cup
* /entry/{user_id}/event/{event_id}/picks
* /entry/{user_id}/history
* /entry/{user_id}/transfers
* /events
* /event/{event_id}/live
* /fixtures/... | 34.687281 | 87 | 0.550072 |
63a46f3517865f77bf9a258a93ef84259da5567e | 4,662 | py | Python | examples/text_correction/ernie-csc/sighan_evaluate.py | JeremyZhao1998/PaddleNLP | 5a34684a7f0c8a186043fed386be4b62cb85fb15 | [
"Apache-2.0"
] | 7,091 | 2021-02-05T13:56:25.000Z | 2022-03-31T11:42:50.000Z | examples/text_correction/ernie-csc/sighan_evaluate.py | JeremyZhao1998/PaddleNLP | 5a34684a7f0c8a186043fed386be4b62cb85fb15 | [
"Apache-2.0"
] | 844 | 2021-02-10T01:09:29.000Z | 2022-03-31T12:12:58.000Z | examples/text_correction/ernie-csc/sighan_evaluate.py | JeremyZhao1998/PaddleNLP | 5a34684a7f0c8a186043fed386be4b62cb85fb15 | [
"Apache-2.0"
] | 1,035 | 2021-02-05T14:26:48.000Z | 2022-03-31T11:42:57.000Z | # Copyright (c) 2021 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 app... | 37 | 80 | 0.573574 |
64ec0801b5d8adc663cb05b52f674b1948a72d78 | 354,336 | py | Python | pandas/core/frame.py | AnglinaBhambra/pandas | c03164e8daa812193baa99378fded16695f3ef51 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-04-18T09:51:04.000Z | 2021-04-18T09:51:04.000Z | pandas/core/frame.py | AnglinaBhambra/pandas | c03164e8daa812193baa99378fded16695f3ef51 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-05-11T00:05:40.000Z | 2021-05-11T00:05:40.000Z | pandas/core/frame.py | AnglinaBhambra/pandas | c03164e8daa812193baa99378fded16695f3ef51 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2018-08-02T06:29:14.000Z | 2018-08-02T06:29:14.000Z | """
DataFrame
---------
An efficient 2D container for potentially mixed-type time series or other
labeled data series.
Similar to its R counterpart, data.frame, except providing automatic data
alignment and a host of useful data manipulation methods having to do with the
labeling information
"""
from __future__ import... | 34.218831 | 170 | 0.528078 |
1c9e8f0c5d24c9eeba6ec6e42e594ceb7ddc8bc5 | 1,223 | py | Python | Algo and DSA/LeetCode-Solutions-master/Python/maximum-number-of-people-that-can-be-caught-in-tag.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 3,269 | 2018-10-12T01:29:40.000Z | 2022-03-31T17:58:41.000Z | Algo and DSA/LeetCode-Solutions-master/Python/maximum-number-of-people-that-can-be-caught-in-tag.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 53 | 2018-12-16T22:54:20.000Z | 2022-02-25T08:31:20.000Z | Algo and DSA/LeetCode-Solutions-master/Python/maximum-number-of-people-that-can-be-caught-in-tag.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 1,236 | 2018-10-12T02:51:40.000Z | 2022-03-30T13:30:37.000Z | # Time: O(n)
# Space: O(1)
# greedy with two pointers solution
class Solution(object):
def catchMaximumAmountofPeople(self, team, dist):
"""
:type team: List[int]
:type dist: int
:rtype: int
"""
result = i = j = 0
while i < len(team) and j < len(team):
... | 24.959184 | 53 | 0.415372 |
4697dbb039112dc172c920771991f5c696ec9c1d | 514 | py | Python | bootalert.py | andyseubert/doorbell | ab65d44aa36fcad407275e33d8aa3140d17d3c35 | [
"Unlicense"
] | null | null | null | bootalert.py | andyseubert/doorbell | ab65d44aa36fcad407275e33d8aa3140d17d3c35 | [
"Unlicense"
] | null | null | null | bootalert.py | andyseubert/doorbell | ab65d44aa36fcad407275e33d8aa3140d17d3c35 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
import time
from time import sleep
import datetime
import os
import sys
import subprocess
from subprocess import Popen
import pynma
p = pynma.PyNMA( "12842c4d5f6061eb9543674248c3518edda9dd83343ebe19" )
application="alertpi boot"
event="DoorBell OnBoot"
description="doorbell just turned on"
priority=2
... | 25.7 | 150 | 0.81323 |
61ade65f2a68fce9fc8b8594973ce9dbb7d9c83c | 3,120 | py | Python | IMU/VTK-6.2.0/Filters/Core/Testing/Python/SliceOrder.py | timkrentz/SunTracker | 9a189cc38f45e5fbc4e4c700d7295a871d022795 | [
"MIT"
] | 4 | 2019-05-30T01:52:12.000Z | 2021-09-29T21:12:13.000Z | IMU/VTK-6.2.0/Filters/Core/Testing/Python/SliceOrder.py | timkrentz/SunTracker | 9a189cc38f45e5fbc4e4c700d7295a871d022795 | [
"MIT"
] | null | null | null | IMU/VTK-6.2.0/Filters/Core/Testing/Python/SliceOrder.py | timkrentz/SunTracker | 9a189cc38f45e5fbc4e4c700d7295a871d022795 | [
"MIT"
] | 2 | 2019-08-30T23:36:13.000Z | 2019-11-08T16:52:01.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
=========================================================================
Program: Visualization Toolkit
Module: TestNamedColorsIntegration.py
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or ... | 32.5 | 76 | 0.584615 |
e523d2a99df244efa27b36194a427edd212f75e5 | 2,536 | py | Python | roadmap/spring-boot.py | yuvarajsanjeevi/jhipster-lite | 90b9d010266b4d3317204c89e9e20a5cbe8c2a0f | [
"Apache-2.0"
] | null | null | null | roadmap/spring-boot.py | yuvarajsanjeevi/jhipster-lite | 90b9d010266b4d3317204c89e9e20a5cbe8c2a0f | [
"Apache-2.0"
] | 49 | 2021-12-17T22:12:42.000Z | 2022-03-31T19:47:40.000Z | roadmap/spring-boot.py | MSaguer/jhipster-lite | 77a68e77f8792dcc23b10c28aa50af6f902c4c68 | [
"Apache-2.0"
] | null | null | null | from urllib.request import urlretrieve
from diagrams import Cluster, Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB
from diagrams.onprem.database import PostgreSQL, Mysql, Mariadb, Mongodb, Neo4J, Cassandra, Couchbase, Mssql
from diagrams.custom ... | 37.294118 | 109 | 0.724369 |
275307b85c097fa74665cdc829a64b483aa3887d | 7,832 | py | Python | msibi/pair.py | jennyfothergill/msibi | 0e309eff836dc13016d87889fe8d8f6960a13599 | [
"MIT"
] | 7 | 2021-03-24T17:01:09.000Z | 2022-01-03T21:53:26.000Z | msibi/pair.py | jennyfothergill/msibi | 0e309eff836dc13016d87889fe8d8f6960a13599 | [
"MIT"
] | 22 | 2021-03-24T18:09:57.000Z | 2022-02-24T18:36:49.000Z | msibi/pair.py | jennyfothergill/msibi | 0e309eff836dc13016d87889fe8d8f6960a13599 | [
"MIT"
] | 2 | 2021-03-24T16:19:56.000Z | 2021-03-24T17:04:48.000Z | import os
import matplotlib.pyplot as plt
import numpy as np
from cmeutils.structure import gsd_rdf
from msibi.potentials import alpha_array, head_correction, tail_correction
from msibi.utils.error_calculation import calc_similarity
from msibi.utils.exceptions import UnsupportedEngine
from msibi.utils.general import ... | 35.762557 | 95 | 0.572651 |
f856687d34a8bf822cc6303cebec55837d1cb34d | 2,018 | py | Python | othello/gis/util.py | ulaval-rs/othello | d62c55986a778443f43a639a980a3be36767f661 | [
"BSD-3-Clause"
] | null | null | null | othello/gis/util.py | ulaval-rs/othello | d62c55986a778443f43a639a980a3be36767f661 | [
"BSD-3-Clause"
] | 8 | 2021-07-07T14:06:40.000Z | 2021-07-27T00:03:23.000Z | othello/gis/util.py | ulaval-rs/othello | d62c55986a778443f43a639a980a3be36767f661 | [
"BSD-3-Clause"
] | null | null | null | import copy
import functools
from typing import Dict, List
import pandas
from geopandas import GeoDataFrame
from othello.gis import io
def find_common_columns(dfs: List[GeoDataFrame]) -> List[str]:
common_columns = functools.reduce(lambda c1, c2: set(c1).intersection(set(c2)), dfs)
return common_columns
... | 34.20339 | 125 | 0.705154 |
229893786f39bf0b9a729f93fee32b2388504fec | 24,951 | py | Python | monospace/game.py | Ball-Man/monospace | 570faa0b800b95e5305e83542512c38ff500b3b2 | [
"MIT"
] | 1 | 2021-06-19T00:24:17.000Z | 2021-06-19T00:24:17.000Z | monospace/game.py | Ball-Man/monospace | 570faa0b800b95e5305e83542512c38ff500b3b2 | [
"MIT"
] | null | null | null | monospace/game.py | Ball-Man/monospace | 570faa0b800b95e5305e83542512c38ff500b3b2 | [
"MIT"
] | null | null | null | import ctypes
import copy
import random
import enum
import math
import desper
import esper
import dsdl
import monospace
from sdl2 import *
from sdl2.sdlttf import *
from sdl2.sdlmixer import *
DEFAULT_BULLET_SPEED = 15
MAX_BULLET_SPEED = 25
DEFAULT_BULLET_DELAY = 30
MIN_BULLET_DELAY = 7
class GameProcessor(esper.Pr... | 34.086066 | 79 | 0.562262 |
3852360e2f4978f2491a1181800210068ea01dca | 4,724 | py | Python | datasets.py | microsoft/VoxHRNet | be72d6448ff4b45c531163a6a6b46ff1ff5e60fd | [
"MIT"
] | 4 | 2021-11-12T17:19:29.000Z | 2022-03-27T05:08:24.000Z | datasets.py | microsoft/VoxHRNet | be72d6448ff4b45c531163a6a6b46ff1ff5e60fd | [
"MIT"
] | null | null | null | datasets.py | microsoft/VoxHRNet | be72d6448ff4b45c531163a6a6b46ff1ff5e60fd | [
"MIT"
] | 1 | 2021-11-10T11:22:01.000Z | 2021-11-10T11:22:01.000Z | # --------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Created by Yeshu Li (yli299@uic.edu)
# --------------------------------------------------------------------------
from torch.utils.data.dataset import Dataset
from torch.utils.dat... | 33.985612 | 133 | 0.6395 |
7dd70c0ed291bda4e8e7e80c18c7fd2271093442 | 534 | py | Python | 11-Notifications/mqttwarn/funcs-alldata.py | outsmartit/raspberry-pi-home-automation | 398201d97ea5f2e18a69a79145c25bfc5a4290ad | [
"MIT"
] | 30 | 2020-08-11T08:38:48.000Z | 2022-03-26T03:17:06.000Z | 11-Notifications/mqttwarn/funcs-alldata.py | outsmartit/raspberry-pi-home-automation | 398201d97ea5f2e18a69a79145c25bfc5a4290ad | [
"MIT"
] | 5 | 2020-09-01T18:44:06.000Z | 2021-03-13T16:16:30.000Z | 11-Notifications/mqttwarn/funcs-alldata.py | outsmartit/raspberry-pi-home-automation | 398201d97ea5f2e18a69a79145c25bfc5a4290ad | [
"MIT"
] | 10 | 2020-09-21T14:14:49.000Z | 2022-02-15T10:46:21.000Z | """Custom functions for mqttwarn.
Copyright (C) 2020 Koen Vervloesem
License: MIT
"""
import json
# Data mapping functions
def translate_xiaomi_aqara_contact(topic, data, srv=None):
"""Translate the Xiaomi Aqara's contact sensor JSON data to a
human-readable description of whether it's open or closed."""
... | 23.217391 | 65 | 0.670412 |
2d23d75e11c8804f3da1e804a9d528d9cccff58a | 17,977 | py | Python | xarray/backends/netCDF4_.py | EricKeenan/xarray | 7355c350a88ec6892c5e9ccdf8dee5ef532036be | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | xarray/backends/netCDF4_.py | EricKeenan/xarray | 7355c350a88ec6892c5e9ccdf8dee5ef532036be | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | xarray/backends/netCDF4_.py | EricKeenan/xarray | 7355c350a88ec6892c5e9ccdf8dee5ef532036be | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import functools
import operator
import os
import pathlib
from contextlib import suppress
import numpy as np
from .. import coding
from ..coding.variables import pop_to
from ..core import indexing
from ..core.utils import FrozenDict, is_remote_uri
from ..core.variable import Variable
from .common import (
Backend... | 32.508137 | 87 | 0.610558 |
07b5bd9ae4623a54004aa82e6b043ff14298e072 | 2,608 | py | Python | tests/unit/plugins/widgets/test_widget_directive.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 2 | 2017-11-08T19:55:57.000Z | 2018-12-21T12:41:41.000Z | tests/unit/plugins/widgets/test_widget_directive.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | null | null | null | tests/unit/plugins/widgets/test_widget_directive.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 1 | 2018-10-13T08:59:29.000Z | 2018-10-13T08:59:29.000Z | import pytest
from kaybee.plugins.widgets.directive import WidgetDirective
from kaybee import app
class TestWidgetDirective:
def test_import(self):
assert 'WidgetDirective' == WidgetDirective.__name__
def test_construction(self, dummy_directive):
assert 'dummy_directive' == dummy_directive.n... | 37.797101 | 74 | 0.61158 |
e76226567e0e27e230c551557515ef62cc2fdd41 | 3,766 | py | Python | splices2npz_test.py | gcunhase/AnnotatedMV-PreProcessing | 32ccce86c0cc4219d9d9f09868aa1e473ca3c25a | [
"MIT"
] | 3 | 2021-03-09T10:55:33.000Z | 2021-04-08T19:19:19.000Z | splices2npz_test.py | gcunhase/AnnotatedMV-PreProcessing | 32ccce86c0cc4219d9d9f09868aa1e473ca3c25a | [
"MIT"
] | 3 | 2020-01-18T11:50:26.000Z | 2020-06-27T04:51:03.000Z | splices2npz_test.py | gcunhase/AnnotatedMV-PreProcessing | 32ccce86c0cc4219d9d9f09868aa1e473ca3c25a | [
"MIT"
] | null | null | null |
import numpy as np
from moviepy.editor import VideoFileClip
from ImageSequenceClip import ImageSequenceClip
import utils
from skimage import color
import librosa
import pandas as pd
import math
"""
Test steps: takes a movie file, resizes, downsamples, does RGB2HSV color transformation and saves data in .npz,
... | 35.866667 | 128 | 0.661445 |
8dea51464e66b60b236b3c56f185707b384c213c | 458 | py | Python | env/lib/python3.8/site-packages/plotly/validators/scatter3d/_customdatasrc.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/scatter3d/_customdatasrc.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/scatter3d/_customdatasrc.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="customdatasrc", parent_name="scatter3d", **kwargs):
super(CustomdatasrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent... | 35.230769 | 87 | 0.665939 |
ecbc4477f3b5089a29dee0151dc1660b383b6874 | 4,835 | py | Python | flask_rest_controller/controller.py | teitei-tk/Flask-REST-Controller | b4386b523f3d2c6550051c95d5ba74e5ff459946 | [
"MIT"
] | 1 | 2016-10-14T08:52:45.000Z | 2016-10-14T08:52:45.000Z | flask_rest_controller/controller.py | teitei-tk/Flask-REST-Controller | b4386b523f3d2c6550051c95d5ba74e5ff459946 | [
"MIT"
] | 1 | 2015-06-16T12:17:23.000Z | 2015-06-16T12:17:23.000Z | flask_rest_controller/controller.py | teitei-tk/Flask-REST-Controller | b4386b523f3d2c6550051c95d5ba74e5ff459946 | [
"MIT"
] | 1 | 2017-05-21T13:49:56.000Z | 2017-05-21T13:49:56.000Z | # coding: utf-8
try:
import simplejson as json
except:
import json
import urllib
import jsonschema
from flask import redirect, url_for, render_template, session, request, abort, current_app
from flask.views import MethodView
__all__ = ['BaseRender', 'JsonRender', 'TemplateRender', 'BaseHandler', 'Controlle... | 23.585366 | 111 | 0.609514 |
345d3c0a1b64e66f197430e075ae6940e8ff9993 | 12,728 | py | Python | tensorflow/python/ops/parallel_for/array_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/parallel_for/array_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/parallel_for/array_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 33.494737 | 89 | 0.626807 |
5f14a769907cd2d3c3e71f7f8b11474a1d5c0a5b | 259 | py | Python | change_color/__init__.py | fongradnastya/color_palette | 98baeba0c26499ef5c42034a13f6b72dfa8affe5 | [
"MIT"
] | null | null | null | change_color/__init__.py | fongradnastya/color_palette | 98baeba0c26499ef5c42034a13f6b72dfa8affe5 | [
"MIT"
] | null | null | null | change_color/__init__.py | fongradnastya/color_palette | 98baeba0c26499ef5c42034a13f6b72dfa8affe5 | [
"MIT"
] | null | null | null | """Модуль инициализирует пакет change_color"""
__all__ = ['color', 'graphic_ui']
from change_color import *
__title__ = 'color_palette'
__author__ = 'Anastasia Fongrad'
__email__ = 'fongradnastya@gmail.com'
__copyright__ = f'Copyright (c) 2021, {__author__}'
| 32.375 | 51 | 0.760618 |
0ad97eeb130a091b29e4b39e3ed1e9cb77b44a94 | 75 | py | Python | states/__init__.py | vogelfenx/storagebot | 64ab07b068bf645d7cdf5bb1cd5db91c0e2a9228 | [
"MIT"
] | null | null | null | states/__init__.py | vogelfenx/storagebot | 64ab07b068bf645d7cdf5bb1cd5db91c0e2a9228 | [
"MIT"
] | 2 | 2021-11-24T18:20:00.000Z | 2021-11-24T18:31:55.000Z | states/__init__.py | vogelfenx/storagebot | 64ab07b068bf645d7cdf5bb1cd5db91c0e2a9228 | [
"MIT"
] | 4 | 2021-11-24T16:40:28.000Z | 2021-11-28T10:40:57.000Z | from .natural_person_state import NaturalPerson
__all__ = [NaturalPerson] | 18.75 | 47 | 0.84 |
09fabafeb847ec65b2ba112b261adc1031ff53c0 | 3,701 | py | Python | module/malware/28.py | 5l1v3r1/saydog-framework | 92d6d2a80958ecf5724c95d1d3c76d8ca95db8d6 | [
"Xnet",
"TCP-wrappers",
"X11"
] | 2 | 2020-09-26T16:43:11.000Z | 2021-02-09T21:46:08.000Z | module/malware/28.py | 5l1v3r1/saydog-framework | 92d6d2a80958ecf5724c95d1d3c76d8ca95db8d6 | [
"Xnet",
"TCP-wrappers",
"X11"
] | null | null | null | module/malware/28.py | 5l1v3r1/saydog-framework | 92d6d2a80958ecf5724c95d1d3c76d8ca95db8d6 | [
"Xnet",
"TCP-wrappers",
"X11"
] | 1 | 2022-03-19T06:40:56.000Z | 2022-03-19T06:40:56.000Z | import os,sys
import time
u='\033[4m'
w='\x1b[00m'
r='\x1b[91m'
b='\x1b[36;1m'
y='\x1b[33m'
def exit():
print(r+'[!]'+w+' The user forces it to stop')
print(r+'[!]'+w+' Exiting program')
sys.exit(1)
def corrupt():
print(r+'[?]'+w+' Command not found, please type help')
... | 50.013514 | 178 | 0.348014 |
3ac6ddb482b37086f75ce1f674fd7aaf2b343911 | 58,080 | py | Python | object_detection/utils/object_detection_evaluation.py | Picsell-ia/training | ab16373c0deaf17a6408136e8a8d62d318bedd9e | [
"MIT"
] | 3 | 2020-06-04T00:56:07.000Z | 2020-06-16T08:20:31.000Z | object_detection/utils/object_detection_evaluation.py | Picsell-ia/training | ab16373c0deaf17a6408136e8a8d62d318bedd9e | [
"MIT"
] | 6 | 2020-06-08T14:35:41.000Z | 2022-02-10T01:52:40.000Z | object_detection/utils/object_detection_evaluation.py | Picsell-ia/training | ab16373c0deaf17a6408136e8a8d62d318bedd9e | [
"MIT"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 43.408072 | 80 | 0.714205 |
4740288f2f586e8c1a632338cbd08f2fdd2ed987 | 2,239 | py | Python | recipes/python/flask/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/app.py | roscopecoltran/sniperkit-cookiecutter | 50b7ecd87d4127875764c2b7d4668ede2ed4b299 | [
"BSD-3-Clause"
] | null | null | null | recipes/python/flask/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/app.py | roscopecoltran/sniperkit-cookiecutter | 50b7ecd87d4127875764c2b7d4668ede2ed4b299 | [
"BSD-3-Clause"
] | null | null | null | recipes/python/flask/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/app.py | roscopecoltran/sniperkit-cookiecutter | 50b7ecd87d4127875764c2b7d4668ede2ed4b299 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""The app module, containing the app factory function."""
from flask import Flask, render_template
from {{cookiecutter.app_name}} import commands, public, user
from {{cookiecutter.app_name}}.extensions import bcrypt, cache, csrf_protect, db, debug_toolbar, login_manager, migrate, webpack
from ... | 30.256757 | 128 | 0.702546 |
82e0fd769d2a5d60acda55e2cfb1ddf7edba78f1 | 8,857 | py | Python | lib/epd4in2.py | jsyzthz/rasp-epaper-calendar | caf33e0c8ee650b735e4363546abe61a3e51287d | [
"MIT"
] | 5 | 2019-08-12T11:27:39.000Z | 2021-05-23T16:30:57.000Z | lib/epd4in2.py | jsyzthz/rasp-epaper-calendar | caf33e0c8ee650b735e4363546abe61a3e51287d | [
"MIT"
] | null | null | null | lib/epd4in2.py | jsyzthz/rasp-epaper-calendar | caf33e0c8ee650b735e4363546abe61a3e51287d | [
"MIT"
] | 4 | 2019-09-08T18:51:50.000Z | 2020-07-29T16:40:07.000Z | # *****************************************************************************
# * | File : epd4in2.py
# * | Author : Waveshare team
# * | Function : Electronic paper driver
# * | Info :
# *----------------
# * | This version: V4.0
# * | Date : 2019-06-20
# # | Info ... | 36.599174 | 123 | 0.557074 |
5309214d0163ff4ed4820b501f0b4df63828be46 | 23,128 | py | Python | examples/rdp_check.py | iamjmat/impacket | 61da73fcc793259e6d1487fff9835e638487fe04 | [
"Apache-1.1"
] | 4 | 2019-08-12T01:48:30.000Z | 2021-12-03T11:30:54.000Z | examples/rdp_check.py | 3ozir/impacket | d1ced941eb2235ed365b13f661b1d5b4bc2683f3 | [
"Apache-1.1"
] | null | null | null | examples/rdp_check.py | 3ozir/impacket | d1ced941eb2235ed365b13f661b1d5b4bc2683f3 | [
"Apache-1.1"
] | 1 | 2021-08-03T20:43:02.000Z | 2021-08-03T20:43:02.000Z | #!/usr/bin/env python
# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved.
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Author:
# Alberto Solino (@agsolino)
#
# Description... | 40.083189 | 148 | 0.611467 |
b7dbe27f079e6a1edec1fd3fd179efd5b734786d | 5,485 | py | Python | eval_c3d.py | crazylazylife/Crowd-Behaviour-Analysis | 3422084e1adc16d801b5643c4758a80da12f4bf8 | [
"MIT"
] | 4 | 2019-12-23T02:43:26.000Z | 2022-02-28T22:41:32.000Z | eval_c3d.py | crazylazylife/Crowd-Behaviour-Analysis | 3422084e1adc16d801b5643c4758a80da12f4bf8 | [
"MIT"
] | null | null | null | eval_c3d.py | crazylazylife/Crowd-Behaviour-Analysis | 3422084e1adc16d801b5643c4758a80da12f4bf8 | [
"MIT"
] | 2 | 2019-06-27T15:44:40.000Z | 2020-08-19T15:54:29.000Z | #!/usr/bin/env python
"""Evaluates the C3D network"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from datetime import datetime
import math
import time
import tensorflow as tf
import numpy as np
import c3d_model
import input_data
# B... | 36.085526 | 88 | 0.624066 |
2fc7ec891b849ce28d3f628a89349d65759e0461 | 3,585 | py | Python | camera.py | Georg-Auer/hetcam-webcam | 03ec1d76c889af17656b299dce374f50294aebc4 | [
"MIT"
] | null | null | null | camera.py | Georg-Auer/hetcam-webcam | 03ec1d76c889af17656b299dce374f50294aebc4 | [
"MIT"
] | null | null | null | camera.py | Georg-Auer/hetcam-webcam | 03ec1d76c889af17656b299dce374f50294aebc4 | [
"MIT"
] | null | null | null | #Modified by Georg Auer
#Desc: Camera import for Flask
import cv2
try:
from imutils.video.pivideostream import PiVideoStream
except:
print("No Raspberry/No Raspberry Cam found")
import imutils
import time
import numpy as np
class VideoCamera(object):
def __init__(self, flip = False):
try:
... | 31.447368 | 87 | 0.553696 |
399578101cd173b7ab82b7e81a3da232708ab81b | 2,160 | py | Python | stem_cell_hypothesis/en_bert_base/head/con_dot.py | emorynlp/stem-cell-hypothesis | 48a628093d93d653865fbac6409d179cddd99293 | [
"Apache-2.0"
] | 4 | 2021-09-17T15:23:31.000Z | 2022-02-28T10:18:04.000Z | stem_cell_hypothesis/en_bert_base/head/con_dot.py | emorynlp/stem-cell-hypothesis | 48a628093d93d653865fbac6409d179cddd99293 | [
"Apache-2.0"
] | null | null | null | stem_cell_hypothesis/en_bert_base/head/con_dot.py | emorynlp/stem-cell-hypothesis | 48a628093d93d653865fbac6409d179cddd99293 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2021-04-08 22:49
import matplotlib.pyplot as plt
import torch
from stem_cell_hypothesis import cdroot
from stem_cell_hypothesis.en_bert_base.head.con import ConAcc
import numpy as np
from tests import cdroot
from adjustText import adjust_text
cdroot()
rs = []
static = ... | 28.8 | 99 | 0.675463 |
99d278bb60a306a0d2cf39fa8a93f8adedc1f506 | 922 | py | Python | src/python_wheel_boilerplate/framework/messages.py | NexSabre/python-wheel-boilerplate | f9fa23671b8dc72b91ea5701e3c4dc0a048af6dd | [
"MIT"
] | null | null | null | src/python_wheel_boilerplate/framework/messages.py | NexSabre/python-wheel-boilerplate | f9fa23671b8dc72b91ea5701e3c4dc0a048af6dd | [
"MIT"
] | null | null | null | src/python_wheel_boilerplate/framework/messages.py | NexSabre/python-wheel-boilerplate | f9fa23671b8dc72b91ea5701e3c4dc0a048af6dd | [
"MIT"
] | null | null | null | class Messages:
@staticmethod
def package_availability(available: list, unavailable: list):
Messages.info("Package status")
if available:
print("Available to convert:")
for key in available:
print(f"\t{key}")
packages_not_found = unavailable
... | 23.05 | 65 | 0.543384 |
4cb08e6fe5eadc3fa231d183f23c09eaef57149c | 11,672 | py | Python | nenupy/astro2/sky.py | AlanLoh/nenupy | 5b9e6ae7cc28d0dc4ed450a408b124f71a1c9cc8 | [
"MIT"
] | 4 | 2018-10-02T16:32:32.000Z | 2022-03-08T10:55:36.000Z | nenupy/astro2/sky.py | AlanLoh/nenupy | 5b9e6ae7cc28d0dc4ed450a408b124f71a1c9cc8 | [
"MIT"
] | 54 | 2018-10-16T14:48:29.000Z | 2022-02-24T11:02:59.000Z | nenupy/astro2/sky.py | AlanLoh/nenupy | 5b9e6ae7cc28d0dc4ed450a408b124f71a1c9cc8 | [
"MIT"
] | 2 | 2020-10-12T14:29:17.000Z | 2021-11-24T13:11:16.000Z | #! /usr/bin/python3
# -*- coding: utf-8 -*-
"""
"""
__author__ = "Alan Loh"
__copyright__ = "Copyright 2021, nenupy"
__credits__ = ["Alan Loh"]
__maintainer__ = "Alan"
__email__ = "alan.loh@obspm.fr"
__status__ = "Production"
__all__ = [
"Sky",
"HpxSky"
]
import numpy as np
import copy
import logging
log ... | 30.960212 | 100 | 0.514222 |
5763a7a93d9bee2f1c0e0ad4c3caee9b4724d1ab | 6,152 | py | Python | project-code/AllTests/lib/googlemock/test/gmock_output_test.py | Bho007/MPEG-2-TS-Decoder | 6021af80f9a79b241da1db158b87ed3fe53f8e61 | [
"MIT"
] | null | null | null | project-code/AllTests/lib/googlemock/test/gmock_output_test.py | Bho007/MPEG-2-TS-Decoder | 6021af80f9a79b241da1db158b87ed3fe53f8e61 | [
"MIT"
] | null | null | null | project-code/AllTests/lib/googlemock/test/gmock_output_test.py | Bho007/MPEG-2-TS-Decoder | 6021af80f9a79b241da1db158b87ed3fe53f8e61 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2008, Google 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 must retain the above copyright
# notice, this list... | 33.434783 | 80 | 0.725618 |
de76db907e240dbd4bfb09601bb4570bdd122b3e | 26,404 | py | Python | intersight/apis/storage_flex_util_physical_drive_api.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | intersight/apis/storage_flex_util_physical_drive_api.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | intersight/apis/storage_flex_util_physical_drive_api.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-262
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from s... | 52.285149 | 818 | 0.630624 |
48ef4c1cd59038d70cfc478348c2708a91c06781 | 13,914 | py | Python | capa/features/extractors/smda/insn.py | ruppde/capa | 3c0bafc22b9e1c209066c12e444fec66920b53af | [
"Apache-2.0"
] | 1 | 2021-07-06T23:20:56.000Z | 2021-07-06T23:20:56.000Z | capa/features/extractors/smda/insn.py | ruppde/capa | 3c0bafc22b9e1c209066c12e444fec66920b53af | [
"Apache-2.0"
] | null | null | null | capa/features/extractors/smda/insn.py | ruppde/capa | 3c0bafc22b9e1c209066c12e444fec66920b53af | [
"Apache-2.0"
] | null | null | null | import re
import string
import struct
from smda.common.SmdaReport import SmdaReport
import capa.features.extractors.helpers
from capa.features import (
ARCH_X32,
ARCH_X64,
MAX_BYTES_FEATURE_SIZE,
THUNK_CHAIN_DEPTH_DELTA,
Bytes,
String,
Characteristic,
)
from capa.features.insn import API, ... | 35.314721 | 136 | 0.636481 |
94d057e874fc8daf77391f99a70ff127295d3253 | 2,209 | py | Python | src/RIOT/tests/test_tools/tests/01-run.py | ARte-team/ARte | 19f17f57522e1b18ba390718fc94be246451837b | [
"MIT"
] | 2 | 2020-04-30T08:17:45.000Z | 2020-05-23T08:46:54.000Z | src/RIOT/tests/test_tools/tests/01-run.py | ARte-team/ARte | 19f17f57522e1b18ba390718fc94be246451837b | [
"MIT"
] | null | null | null | src/RIOT/tests/test_tools/tests/01-run.py | ARte-team/ARte | 19f17f57522e1b18ba390718fc94be246451837b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Test behaviour of the test running and the term program interaction."""
import sys
import pexpect
from testrunner import run
def _shellping(child, timeout=1):
"""Issue a 'shellping' command.
Raises a pexpect exception on failure.
:param timeout: timeout for the answer
"""
... | 26.297619 | 75 | 0.679493 |
e6cad6c6aa70ef0bb94c6e9e7fd9563040b20262 | 8,223 | py | Python | redis-twitter-console/users.py | lauslim12/redis-twitter-console | 56f2658d1f9396c20cb7bc80565639b917304928 | [
"MIT"
] | null | null | null | redis-twitter-console/users.py | lauslim12/redis-twitter-console | 56f2658d1f9396c20cb7bc80565639b917304928 | [
"MIT"
] | null | null | null | redis-twitter-console/users.py | lauslim12/redis-twitter-console | 56f2658d1f9396c20cb7bc80565639b917304928 | [
"MIT"
] | null | null | null | """This module is to manage our users."""
from time import time
from redis import Redis
from errors import (
DuplicateUserError,
EmptyInputError,
FollowError,
UserDoesNotExistError,
UserIsNotYourFollowingError,
)
from utils import is_string_blank
def follow(redis: Redis, uid: int) -> None:
... | 26.785016 | 99 | 0.634197 |
df07f73afb6f8270c71e1c1b9f23204abfea14cb | 20,379 | py | Python | sympy/logic/algorithms/dpll2.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 8,323 | 2015-01-02T15:51:43.000Z | 2022-03-31T13:13:19.000Z | sympy/logic/algorithms/dpll2.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 15,102 | 2015-01-01T01:33:17.000Z | 2022-03-31T22:53:13.000Z | sympy/logic/algorithms/dpll2.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 4,490 | 2015-01-01T17:48:07.000Z | 2022-03-31T17:24:05.000Z | """Implementation of DPLL algorithm
Features:
- Clause learning
- Watch literal scheme
- VSIDS heuristic
References:
- https://en.wikipedia.org/wiki/DPLL_algorithm
"""
from collections import defaultdict
from heapq import heappush, heappop
from sympy import ordered
from sympy.assumptions.cnf import EncodedC... | 30.783988 | 80 | 0.521076 |
5f98abe3deb4db120b5bdab2d8a9209617bd09da | 1,094 | py | Python | migrations/versions/0330_edit_templates_permission.py | department-of-veterans-affairs/notification-api | 698bc98d8e78a13a0b2cfc432cfc718ff1016b06 | [
"MIT"
] | 10 | 2020-05-04T14:11:06.000Z | 2022-02-22T19:06:36.000Z | migrations/versions/0330_edit_templates_permission.py | department-of-veterans-affairs/notification-api | 698bc98d8e78a13a0b2cfc432cfc718ff1016b06 | [
"MIT"
] | 554 | 2020-05-07T21:56:24.000Z | 2022-03-31T23:04:51.000Z | migrations/versions/0330_edit_templates_permission.py | department-of-veterans-affairs/notification-api | 698bc98d8e78a13a0b2cfc432cfc718ff1016b06 | [
"MIT"
] | 4 | 2020-08-27T16:43:29.000Z | 2021-02-17T22:17:27.000Z | """
Revision ID: 0330_edit_templates_permission
Revises: 0329_notification_status
Create Date: 2021-06-25 10:39:29.089237
"""
from alembic import op
revision = '0330_edit_templates_permission'
down_revision = '0329_notification_status'
def upgrade():
# adding a value to an enum must be done outside of a trans... | 34.1875 | 164 | 0.734918 |
5d26e4c20ad43ff78ea236bca81b77806218285a | 1,869 | py | Python | scandeval/benchmarks/ndt_nn_pos.py | ebanalyse/ScandEval | ecdacaf176c42e5f9078ea586315fdf5bc8e2015 | [
"MIT"
] | null | null | null | scandeval/benchmarks/ndt_nn_pos.py | ebanalyse/ScandEval | ecdacaf176c42e5f9078ea586315fdf5bc8e2015 | [
"MIT"
] | null | null | null | scandeval/benchmarks/ndt_nn_pos.py | ebanalyse/ScandEval | ecdacaf176c42e5f9078ea586315fdf5bc8e2015 | [
"MIT"
] | null | null | null | """POS evaluation of a language model on the Nynorsk part of the NDT dataset"""
import logging
from .abstract import PosBenchmark
logger = logging.getLogger(__name__)
class NdtNNPosBenchmark(PosBenchmark):
"""Benchmark of language models on the Nynorsk POS part of the NDT dataset.
Args:
cache_dir... | 35.942308 | 79 | 0.647405 |
7565bb536b722cc6e845a1351b00dbe1801bbec2 | 457 | py | Python | core/wsgi.py | rijkerd/Smart-Class | c72ef9c140f722b110d841e0ad03938485803758 | [
"MIT"
] | 4 | 2020-05-22T10:29:43.000Z | 2022-03-17T07:24:03.000Z | core/wsgi.py | rijkerd/Smart-Class | c72ef9c140f722b110d841e0ad03938485803758 | [
"MIT"
] | 8 | 2020-04-01T22:29:42.000Z | 2021-09-29T08:43:09.000Z | core/wsgi.py | rijkerd/Smart-Class | c72ef9c140f722b110d841e0ad03938485803758 | [
"MIT"
] | null | null | null | """
WSGI config for core 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/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise import WhiteNoise
os.e... | 24.052632 | 78 | 0.794311 |
5c2788a122c4f1b13c58a148d257e94de33bdea8 | 2,769 | py | Python | oblib/taxonomy_types.py | dfcoffin/core | 11efb163a84698961fe624d964ef5b921f7e58a9 | [
"Apache-2.0"
] | null | null | null | oblib/taxonomy_types.py | dfcoffin/core | 11efb163a84698961fe624d964ef5b921f7e58a9 | [
"Apache-2.0"
] | null | null | null | oblib/taxonomy_types.py | dfcoffin/core | 11efb163a84698961fe624d964ef5b921f7e58a9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Wells Fargo
# 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, soft... | 28.84375 | 95 | 0.622246 |
d73ca2ddfbfa1a6f2fc4c1dc2673932feaadd8f1 | 876 | py | Python | birdwatch.py | antithalian/birdwatch | d1067faa7ee942862453e69db0a22df9e94cac49 | [
"MIT"
] | null | null | null | birdwatch.py | antithalian/birdwatch | d1067faa7ee942862453e69db0a22df9e94cac49 | [
"MIT"
] | null | null | null | birdwatch.py | antithalian/birdwatch | d1067faa7ee942862453e69db0a22df9e94cac49 | [
"MIT"
] | null | null | null | # birdwatch.py
# downloads images on Tweet link provided by user
import tweepy
import json
import argparse
import os, sys
# takes url of tweet and a tweepy twitter api instance as inputs
# returns a list with all media urls or integer -1 if no images on linked tweet
def get_fullres(tweet_url, api_instance):
pass... | 25.028571 | 101 | 0.703196 |
bc5ab96cf4ff79a6879ba7f9e730c5a7c305574c | 5,200 | py | Python | zsparse/core.py | ryan-williams/zsparse | 7f3ec59481e64357eb8e195656cfeaeaff58322a | [
"MIT"
] | 5 | 2019-06-06T03:29:47.000Z | 2022-02-10T22:32:27.000Z | zsparse/core.py | ryan-williams/zsparse | 7f3ec59481e64357eb8e195656cfeaeaff58322a | [
"MIT"
] | null | null | null | zsparse/core.py | ryan-williams/zsparse | 7f3ec59481e64357eb8e195656cfeaeaff58322a | [
"MIT"
] | 1 | 2021-04-06T13:49:09.000Z | 2021-04-06T13:49:09.000Z | import numpy as np
import scipy.sparse as ss
import zarr
import os
import pickle
import operator
from functools import reduce
from .indexing import getitem
from .utils import html_table, human_readable_size
FORMATS = {'coo': ss.coo_matrix,
'csr': ss.csr_matrix,
'csc': ss.csc_matr... | 36.363636 | 118 | 0.574808 |
491e9effd555b5cf0da2adbe52e7109375a33ac2 | 6,244 | py | Python | accenv/lib/python3.4/site-packages/IPython/utils/_process_win32.py | adamshamsudeen/clubdin-dj | eb48c67dab3a4ae7c4032544eb4d64e0b1d7e15a | [
"MIT"
] | null | null | null | accenv/lib/python3.4/site-packages/IPython/utils/_process_win32.py | adamshamsudeen/clubdin-dj | eb48c67dab3a4ae7c4032544eb4d64e0b1d7e15a | [
"MIT"
] | null | null | null | accenv/lib/python3.4/site-packages/IPython/utils/_process_win32.py | adamshamsudeen/clubdin-dj | eb48c67dab3a4ae7c4032544eb4d64e0b1d7e15a | [
"MIT"
] | null | null | null | """Windows-specific implementation of process utilities.
This file is only meant to be imported by process.py, not by end-users.
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2010-2011 The IPython Development Team
#
# Distributed under the terms of the BSD Licen... | 33.212766 | 110 | 0.599455 |
a547e1af3d087392b10fdc56bbb1fe77b1609af2 | 1,176 | py | Python | flsim/utils/simple_batch_metrics.py | JohnlNguyen/FLSim | a5ed7c0b84499cd9dbc5fe95f8bcb4ba8ab5a5cb | [
"BSD-3-Clause"
] | 79 | 2021-12-09T18:05:09.000Z | 2022-03-23T20:43:46.000Z | flsim/utils/simple_batch_metrics.py | JohnlNguyen/FLSim | a5ed7c0b84499cd9dbc5fe95f8bcb4ba8ab5a5cb | [
"BSD-3-Clause"
] | 11 | 2021-12-30T17:54:04.000Z | 2022-03-23T17:23:00.000Z | flsim/utils/simple_batch_metrics.py | JohnlNguyen/FLSim | a5ed7c0b84499cd9dbc5fe95f8bcb4ba8ab5a5cb | [
"BSD-3-Clause"
] | 9 | 2021-12-09T19:55:22.000Z | 2022-03-15T00:02:08.000Z | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from typing import Any
import torch
from flsim.interfaces.batch_metrics import IFLBatch... | 24 | 71 | 0.657313 |
bfb09e9f45067c8c5427c66252a7c28a3c391a73 | 51,599 | py | Python | dask/dataframe/io/tests/test_csv.py | JayjeetAtGithub/dask | ee9d64a98193f67567fc289b2306199b0bcf5b59 | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/io/tests/test_csv.py | JayjeetAtGithub/dask | ee9d64a98193f67567fc289b2306199b0bcf5b59 | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/io/tests/test_csv.py | JayjeetAtGithub/dask | ee9d64a98193f67567fc289b2306199b0bcf5b59 | [
"BSD-3-Clause"
] | null | null | null | import gzip
import os
from io import BytesIO
from time import sleep
from unittest import mock
import pytest
pd = pytest.importorskip("pandas")
dd = pytest.importorskip("dask.dataframe")
from fsspec.compression import compr
from tlz import partition_all, valmap
import dask
import dask.dataframe as dd
from dask.base ... | 31.234262 | 106 | 0.586484 |
0796ab2d599a8af8c406546a4a3881a9c5d9bbc3 | 45 | py | Python | tests/__init__.py | wasilukm/hoymiles_modbus | 00fbb9a31a8dcc8d3d8714214d8774dfea7745a6 | [
"MIT"
] | null | null | null | tests/__init__.py | wasilukm/hoymiles_modbus | 00fbb9a31a8dcc8d3d8714214d8774dfea7745a6 | [
"MIT"
] | 3 | 2022-03-12T08:12:47.000Z | 2022-03-15T20:39:01.000Z | tests/__init__.py | wasilukm/hoymiles_modbus | 00fbb9a31a8dcc8d3d8714214d8774dfea7745a6 | [
"MIT"
] | 1 | 2022-03-11T11:56:21.000Z | 2022-03-11T11:56:21.000Z | """Unit test package for hoymiles_modbus."""
| 22.5 | 44 | 0.733333 |
29fcf7d8a215204e9a1f422ad12a694afbe74e78 | 15,540 | py | Python | clif/testing/python/extend_methods_test.py | timgates42/clif | b865c88beff70b31068889926d1184d5ddc0b9eb | [
"Apache-2.0"
] | null | null | null | clif/testing/python/extend_methods_test.py | timgates42/clif | b865c88beff70b31068889926d1184d5ddc0b9eb | [
"Apache-2.0"
] | null | null | null | clif/testing/python/extend_methods_test.py | timgates42/clif | b865c88beff70b31068889926d1184d5ddc0b9eb | [
"Apache-2.0"
] | null | null | null | # Lint-as: python3
# Copyright 2020 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 ag... | 33.134328 | 79 | 0.72027 |
7569ba0b0c8f33b5404cafb7e2d90cb439630a01 | 1,353 | py | Python | 05_draw_bbox.py | worldbank/ml4dev | d91f1b2a08067da31364dee60f07274d66929fa5 | [
"MIT"
] | 49 | 2017-03-06T21:34:03.000Z | 2022-01-16T05:10:12.000Z | 05_draw_bbox.py | HKCaesar/ml4dev | d91f1b2a08067da31364dee60f07274d66929fa5 | [
"MIT"
] | 3 | 2016-12-21T20:39:15.000Z | 2017-08-18T06:30:30.000Z | 05_draw_bbox.py | HKCaesar/ml4dev | d91f1b2a08067da31364dee60f07274d66929fa5 | [
"MIT"
] | 16 | 2017-06-20T15:14:36.000Z | 2021-04-19T00:52:26.000Z | '''
We're gonna use the bbox info from OSM to draw a box around the pitch, we
will use this box to better train our ML algo.
'''
from utils.geo import get_rectangle
from utils.geo import WAYS_DATA_FILENAME
import cv2
import json
import os
# We need the elements
# print 'Loading %s...' % WAYS_DATA_FILENAME
# with open... | 33 | 73 | 0.68884 |
28a5072c2dc154a12ddf556f4abb8c0dccacf337 | 662 | py | Python | packages/sqlmap-master/plugins/dbms/h2/filesystem.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | null | null | null | packages/sqlmap-master/plugins/dbms/h2/filesystem.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | null | null | null | packages/sqlmap-master/plugins/dbms/h2/filesystem.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Copyright (c) 2006-2021 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
from lib.core.exception import SqlmapUnsupportedFeatureException
from plugins.generic.filesystem import Filesystem as GenericFilesystem
class Filesystem(GenericFilesystem):
d... | 34.842105 | 80 | 0.756798 |
c432900101e388047353c502028714f97adcebf3 | 142 | py | Python | ch08/08_26.py | leeseedong/book-cryptocurrency | 58c0bb3f5a80f8cc73ba47c4839be3bd33c9d67c | [
"Apache-2.0"
] | 121 | 2019-03-23T13:53:06.000Z | 2022-03-28T15:15:03.000Z | ch08/08_26.py | leeseedong/book-cryptocurrency | 58c0bb3f5a80f8cc73ba47c4839be3bd33c9d67c | [
"Apache-2.0"
] | 3 | 2021-04-14T14:31:26.000Z | 2021-05-09T13:46:14.000Z | ch08/08_26.py | leeseedong/book-cryptocurrency | 58c0bb3f5a80f8cc73ba47c4839be3bd33c9d67c | [
"Apache-2.0"
] | 114 | 2019-03-21T13:43:03.000Z | 2022-03-31T18:42:11.000Z | import ccxt
binance = ccxt.binance()
orderbook = binance.fetch_order_book('ETH/BTC')
for ask in orderbook['asks']:
print(ask[0], ask[1])
| 20.285714 | 47 | 0.704225 |
f32dea13737b0d207891264af6b1e263f67cbdca | 3,076 | py | Python | Section_04_code/PyQT4/Lib/site-packages/PyQt4/uic/pyuic.py | PacktPublishing/Python-Machine-Learning-Solutions-V- | 8bb80a43a7c64032c25c1023faaa29bbfbd39d45 | [
"MIT"
] | 1 | 2022-03-16T02:10:30.000Z | 2022-03-16T02:10:30.000Z | Section_04_code/PyQT4/Lib/site-packages/PyQt4/uic/pyuic.py | wensincai/Python-Machine-Learning-Solutions-V- | 130c9881757fa90bbb124d48ddd0c6c1136fa20c | [
"MIT"
] | null | null | null | Section_04_code/PyQT4/Lib/site-packages/PyQt4/uic/pyuic.py | wensincai/Python-Machine-Learning-Solutions-V- | 130c9881757fa90bbb124d48ddd0c6c1136fa20c | [
"MIT"
] | 2 | 2019-05-28T11:58:59.000Z | 2020-09-23T17:21:19.000Z | #############################################################################
##
## Copyright (c) 2013 Riverbank Computing Limited <info@riverbankcomputing.com>
##
## This file is part of PyQt.
##
## This file may be used under the terms of the GNU General Public
## License versions 2.0 or 3.0 as published by the Fre... | 41.013333 | 114 | 0.679454 |
21c3af041ed5642a15fef9056abd9380ed27f77a | 33,912 | py | Python | view-recipes/parse-recipes-p2.py | kbrohkahn/kevin.broh-kahn.com | e6b6427bd745cdf011adb8cf67a7395472f25c20 | [
"Apache-2.0"
] | null | null | null | view-recipes/parse-recipes-p2.py | kbrohkahn/kevin.broh-kahn.com | e6b6427bd745cdf011adb8cf67a7395472f25c20 | [
"Apache-2.0"
] | null | null | null | view-recipes/parse-recipes-p2.py | kbrohkahn/kevin.broh-kahn.com | e6b6427bd745cdf011adb8cf67a7395472f25c20 | [
"Apache-2.0"
] | null | null | null | # encoding=utf8
#!/usr/bin/env python
import urllib2
import json
import re
from bs4 import BeautifulSoup
from nltk.tokenize import sent_tokenize
from socket import error as SocketError
#
# checks whether the first argument is the same word as a plural string, checking plurals
#
def equalCheckingPlurals(string, plura... | 40.085106 | 178 | 0.673744 |
b549aca55475496f51e360d4ae4c2b14de615b08 | 5,250 | py | Python | Cthulhu.py | Mr-Xcoder/Cthulhu | 9847bab9a31a542479d86148151262d620e1a51a | [
"MIT"
] | 6 | 2017-07-16T18:26:11.000Z | 2021-08-12T04:34:31.000Z | Cthulhu.py | Mr-Xcoder/Cthulhu | 9847bab9a31a542479d86148151262d620e1a51a | [
"MIT"
] | 3 | 2017-07-16T19:31:44.000Z | 2017-08-18T15:36:12.000Z | Cthulhu.py | Mr-Xcoder/Cthulhu | 9847bab9a31a542479d86148151262d620e1a51a | [
"MIT"
] | null | null | null | import sympy
import math
import sys
pause = 0
stack = []
STDIN = []
register_1 = []
register_2 = []
digits = "0123456789"
if "--input" in sys.argv[1:]:
STDIN = open("input.txt", "r").read().split("\n")
else:
STDIN = sys.stdin.read().split("\n")
class Command:
global stack
arity: int = 0
func: c... | 35.714286 | 119 | 0.563429 |
728daf07077b630f32f3fcf4550e08f4371c4da7 | 11,577 | py | Python | fanficfare/adapters/adapter_fanfictionjunkiesde.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | 1 | 2019-06-13T11:20:33.000Z | 2019-06-13T11:20:33.000Z | fanficfare/adapters/adapter_fanfictionjunkiesde.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | null | null | null | fanficfare/adapters/adapter_fanfictionjunkiesde.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2011 Fanficdownloader team, 2015 FanFicFare team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 39.783505 | 157 | 0.609398 |
d2624bfee5cfba25486d5d6c459131c5c6121c28 | 567 | py | Python | test_setup/urls.py | raratiru/django-letsagree | 3b11e55b44eb421789155b491a244985acc9fe26 | [
"BSD-3-Clause"
] | 12 | 2019-04-11T11:41:06.000Z | 2021-09-28T15:29:48.000Z | test_setup/urls.py | raratiru/django-letsagree | 3b11e55b44eb421789155b491a244985acc9fe26 | [
"BSD-3-Clause"
] | 16 | 2019-04-14T20:55:58.000Z | 2021-03-12T15:42:02.000Z | test_setup/urls.py | raratiru/django-letsagree | 3b11e55b44eb421789155b491a244985acc9fe26 | [
"BSD-3-Clause"
] | 3 | 2019-05-12T19:51:32.000Z | 2020-10-19T13:52:09.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ==============================================================================
#
# File Name : test_setup.urls.py
#
# Creation Date : Tue 09 Apr 2019 03:25:45 AM EEST (03:25)
#
# Last Modified : Tue 09 Apr 2019 03:27:15 AM EEST (03:27)
#
# ============... | 24.652174 | 80 | 0.447972 |
01d713246d778e6d3f978801015e3f9ee90eeac9 | 1,597 | py | Python | plant_vs_zoomie_game_normal02.py | ChengzhuLi/plantwarzombie | d9cb018d04df241846c49dbeabd52df688de5e5f | [
"MIT"
] | 4 | 2020-08-09T00:25:13.000Z | 2021-05-08T09:42:45.000Z | plant_vs_zoomie_game_normal02.py | ChengzhuLi/plantwarzombie | d9cb018d04df241846c49dbeabd52df688de5e5f | [
"MIT"
] | null | null | null | plant_vs_zoomie_game_normal02.py | ChengzhuLi/plantwarzombie | d9cb018d04df241846c49dbeabd52df688de5e5f | [
"MIT"
] | 2 | 2021-01-16T10:18:17.000Z | 2021-04-15T12:01:04.000Z | import pygame
import os
from Peashooter import Peashooter
from SunFlower import SunFlower
from WallNut import WallNut
from Sun import Sun
pygame.init()
backgd_size = (1200, 600)
screen = pygame.display.set_mode(backgd_size)
pygame.display.set_caption('plant_vs_zoomie')
bg_img_path = 'material/images/background1.jpg'... | 23.144928 | 69 | 0.657483 |
ea92e4ed2236e531804c563cb71058ac319dfdc4 | 4,899 | py | Python | grr/server/grr_response_server/authorization/client_approval_auth.py | JiYonG-Lee/grr | 57fef67080ac6b8fd3de3ba0adfca064d34b7689 | [
"Apache-2.0"
] | 1 | 2020-06-25T14:25:51.000Z | 2020-06-25T14:25:51.000Z | grr/server/grr_response_server/authorization/client_approval_auth.py | JiYonG-Lee/grr | 57fef67080ac6b8fd3de3ba0adfca064d34b7689 | [
"Apache-2.0"
] | 3 | 2021-05-11T20:18:38.000Z | 2022-03-02T09:33:56.000Z | grr/server/grr_response_server/authorization/client_approval_auth.py | JiYonG-Lee/grr | 57fef67080ac6b8fd3de3ba0adfca064d34b7689 | [
"Apache-2.0"
] | 1 | 2020-06-25T14:25:54.000Z | 2020-06-25T14:25:54.000Z | #!/usr/bin/env python
# Lint as: python3
"""Client label approvals authorization manager."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import io
from grr_response_core import config
from grr_response_core.lib import utils
from grr_response_core.lib... | 30.811321 | 80 | 0.729333 |
c4cfca965c8f1079088ef3ceeae11898de7fefa0 | 1,633 | py | Python | CSV2Paper/base_window.py | jcedmiston/CSV2PAPER | b57533f49bd2585615356e14973c227a7c59be96 | [
"MIT"
] | 1 | 2021-12-23T00:58:32.000Z | 2021-12-23T00:58:32.000Z | CSV2Paper/base_window.py | jcedmiston/CSV2Paper | b57533f49bd2585615356e14973c227a7c59be96 | [
"MIT"
] | null | null | null | CSV2Paper/base_window.py | jcedmiston/CSV2Paper | b57533f49bd2585615356e14973c227a7c59be96 | [
"MIT"
] | null | null | null | from os.path import join
from files import __location__
from user_settings import UserSettings
class BaseWindow:
def __init__(self, user_settings: UserSettings):
self.user_settings = user_settings
self.window_bg = None
self.widget_bg = None
self.fg = None
self.insert_bg = None
self.disabled_bg = 'gray8... | 37.976744 | 122 | 0.748928 |
45da506627fe573e4b27013fe366a130fe8bef07 | 87,974 | py | Python | src/python/tests/appengine/handlers/cron/cleanup_test.py | mukundv-chrome/clusterfuzz | 5e232f9d8e55bd7b11e706cad04963c20bac1d0e | [
"Apache-2.0"
] | null | null | null | src/python/tests/appengine/handlers/cron/cleanup_test.py | mukundv-chrome/clusterfuzz | 5e232f9d8e55bd7b11e706cad04963c20bac1d0e | [
"Apache-2.0"
] | 1 | 2019-06-07T21:29:28.000Z | 2019-06-07T21:29:28.000Z | src/python/tests/appengine/handlers/cron/cleanup_test.py | mukundv-chrome/clusterfuzz | 5e232f9d8e55bd7b11e706cad04963c20bac1d0e | [
"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, ... | 42.3359 | 80 | 0.70098 |
d3f1cf12437889a91276a931211d95204f42e5f3 | 1,179 | py | Python | asyncrpc/handler.py | cosminbasca/asyncrpc | 49f2b4b5c686e19e9b314189720ed105fda0bb9f | [
"Apache-2.0"
] | 1 | 2015-04-14T14:41:08.000Z | 2015-04-14T14:41:08.000Z | asyncrpc/handler.py | cosminbasca/asyncrpc | 49f2b4b5c686e19e9b314189720ed105fda0bb9f | [
"Apache-2.0"
] | null | null | null | asyncrpc/handler.py | cosminbasca/asyncrpc | 49f2b4b5c686e19e9b314189720ed105fda0bb9f | [
"Apache-2.0"
] | null | null | null | #
# author: Cosmin Basca
#
# Copyright 2010 University of Zurich
#
# 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... | 31.026316 | 83 | 0.68363 |
75ffeb2c4651b4fc26d9f8056eb3435433f744b0 | 68 | py | Python | python-for-data-science/week_1/np.py | assassinen/coursera_mfti_python | eee7b3c55256f391c1be32924fa1ad3364b307f2 | [
"Apache-2.0"
] | null | null | null | python-for-data-science/week_1/np.py | assassinen/coursera_mfti_python | eee7b3c55256f391c1be32924fa1ad3364b307f2 | [
"Apache-2.0"
] | null | null | null | python-for-data-science/week_1/np.py | assassinen/coursera_mfti_python | eee7b3c55256f391c1be32924fa1ad3364b307f2 | [
"Apache-2.0"
] | null | null | null | import numpy as np
x = np.array([1,2,3,4], dtype=np.int64)
print(x) | 17 | 39 | 0.661765 |
ba362cb76017ad8e993be41ba3cec48b2ec2e664 | 6,896 | py | Python | finetune.py | haroldNLP/Distiller | f3ab5f94a9092fca1e2bdb9f486e66fd0b24bcfd | [
"MIT"
] | 2 | 2022-03-21T08:02:02.000Z | 2022-03-21T08:29:07.000Z | finetune.py | haroldNLP/Distiller | f3ab5f94a9092fca1e2bdb9f486e66fd0b24bcfd | [
"MIT"
] | null | null | null | finetune.py | haroldNLP/Distiller | f3ab5f94a9092fca1e2bdb9f486e66fd0b24bcfd | [
"MIT"
] | null | null | null |
import os
import json
import torch
import numpy as np
import argparse
from Distiller.glue_preprocess import load_and_cache_examples, glue_compute_metrics
from transformers import AutoTokenizer, AutoModelForSequenceClassification, AutoConfig, AdamW
from torch.utils.data import DataLoader, RandomSampler, SequentialSampl... | 45.668874 | 122 | 0.645447 |
6b1a34de235aa949f9f66888ab1e1085806053f4 | 37,115 | py | Python | psutil/_pswindows.py | dothebart/psutil | dccf8bedf34fced63f1962dd77b58f0da339759c | [
"BSD-3-Clause"
] | 2 | 2021-09-25T20:26:39.000Z | 2022-02-09T13:22:58.000Z | psutil/_pswindows.py | dothebart/psutil | dccf8bedf34fced63f1962dd77b58f0da339759c | [
"BSD-3-Clause"
] | null | null | null | psutil/_pswindows.py | dothebart/psutil | dccf8bedf34fced63f1962dd77b58f0da339759c | [
"BSD-3-Clause"
] | 1 | 2021-03-04T19:46:31.000Z | 2021-03-04T19:46:31.000Z | # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows platform implementation."""
import contextlib
import errno
import functools
import os
import signal
import sys
import time
from collections imp... | 33.316876 | 78 | 0.592725 |
c6e474e3a6630ecb66498bcfa91fd498dfc28bb5 | 22,763 | py | Python | sdk/python/pulumi_google_native/bigtableadmin/v2/instance_cluster_backup_iam_policy.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/bigtableadmin/v2/instance_cluster_backup_iam_policy.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/bigtableadmin/v2/instance_cluster_backup_iam_policy.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... | 76.130435 | 1,118 | 0.704257 |
70bf91f6c1a4f4e543e0c338a13fa7d73fa29fe7 | 2,297 | py | Python | pytype/overlay.py | mraarif/pytype | 546e8b8114c9af54a409985a036398c4f6955677 | [
"Apache-2.0"
] | null | null | null | pytype/overlay.py | mraarif/pytype | 546e8b8114c9af54a409985a036398c4f6955677 | [
"Apache-2.0"
] | null | null | null | pytype/overlay.py | mraarif/pytype | 546e8b8114c9af54a409985a036398c4f6955677 | [
"Apache-2.0"
] | null | null | null | """Base class for module overlays."""
from pytype import abstract
from pytype import datatypes
class Overlay(abstract.Module):
"""A layer between pytype and a module's pytd definition.
An overlay pretends to be a module, but provides members that generate extra
typing information that cannot be expressed in a ... | 37.048387 | 80 | 0.719634 |
b6a2528a96636cd0dd5fc67e59ad8fefa42223c0 | 1,374 | py | Python | gcpdiag/lint/gke/bp_2021_002_groups_enabled.py | taylorjstacey/gcpdiag | 84ba1725cd3ed326b8da3e64bdd6569ed7ef20a4 | [
"Apache-2.0"
] | null | null | null | gcpdiag/lint/gke/bp_2021_002_groups_enabled.py | taylorjstacey/gcpdiag | 84ba1725cd3ed326b8da3e64bdd6569ed7ef20a4 | [
"Apache-2.0"
] | null | null | null | gcpdiag/lint/gke/bp_2021_002_groups_enabled.py | taylorjstacey/gcpdiag | 84ba1725cd3ed326b8da3e64bdd6569ed7ef20a4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 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, ... | 36.157895 | 76 | 0.750364 |
4fab4e4cca7981a309f274724815ca7feea31147 | 7,607 | py | Python | bokeh/charts/utils.py | rothnic/bokeh | 8da5e16b260a75caa8e7ef4caf215bb93dd784db | [
"BSD-3-Clause"
] | 1 | 2015-07-17T13:57:01.000Z | 2015-07-17T13:57:01.000Z | bokeh/_legacy_charts/utils.py | evidation-health/bokeh | 2c580d93419033b962d36e3c46d7606cc2f24606 | [
"BSD-3-Clause"
] | null | null | null | bokeh/_legacy_charts/utils.py | evidation-health/bokeh | 2c580d93419033b962d36e3c46d7606cc2f24606 | [
"BSD-3-Clause"
] | 1 | 2016-03-18T03:01:59.000Z | 2016-03-18T03:01:59.000Z | """ This is the utils module that collects convenience functions and code that are
useful for charts ecosystem.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# Th... | 33.511013 | 87 | 0.589194 |
0c5ce4ea3e5c6dd8f7c189c90fd97255b19afd30 | 3,226 | py | Python | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/errors/types/query_error.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/errors/types/query_error.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/errors/types/query_error.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 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... | 35.065217 | 74 | 0.700868 |
c9d275b86334259bb549224d0f76e900a7357ceb | 358 | py | Python | yt_dlp/__main__.py | olipfei/yt-dlp | 7879e79d11a2e5855167820518df49caf623fe48 | [
"Unlicense"
] | 11 | 2022-01-06T22:09:50.000Z | 2022-03-12T22:26:22.000Z | yt_dlp/__main__.py | olipfei/yt-dlp | 7879e79d11a2e5855167820518df49caf623fe48 | [
"Unlicense"
] | 4 | 2022-02-25T08:20:18.000Z | 2022-03-17T16:16:20.000Z | yt_dlp/__main__.py | olipfei/yt-dlp | 7879e79d11a2e5855167820518df49caf623fe48 | [
"Unlicense"
] | 3 | 2022-02-19T08:59:13.000Z | 2022-03-06T16:11:21.000Z | #!/usr/bin/env python3
# Execute with
# $ python -m yt_dlp
import sys
if __package__ is None and not hasattr(sys, 'frozen'):
# direct call of __main__.py
import os.path
path = os.path.realpath(os.path.abspath(__file__))
sys.path.insert(0, os.path.dirname(os.path.dirname(path)))
import yt_dlp
if __na... | 21.058824 | 62 | 0.689944 |
b13b79fff3d36491a2b8458cfcd8b64373d00757 | 1,170 | py | Python | tests/augmentation/test_augmentation_utils.py | techthiyanes/textacy | c7a5e1f881a3df63a89991accefcbd375ede5353 | [
"Apache-2.0"
] | null | null | null | tests/augmentation/test_augmentation_utils.py | techthiyanes/textacy | c7a5e1f881a3df63a89991accefcbd375ede5353 | [
"Apache-2.0"
] | null | null | null | tests/augmentation/test_augmentation_utils.py | techthiyanes/textacy | c7a5e1f881a3df63a89991accefcbd375ede5353 | [
"Apache-2.0"
] | null | null | null | import pytest
from textacy.augmentation import utils
from textacy.types import AugTok
def test_aug_tok():
aug_tok = AugTok(text="text", ws=" ", pos="pos", is_word=True, syns=["doc"])
assert isinstance(aug_tok, tuple)
with pytest.raises(AttributeError):
aug_tok.foo = "bar"
def test_to_aug_toks(d... | 33.428571 | 82 | 0.681197 |
25b88d7f8a15ee56b44131fddfbffd907256561d | 1,082 | py | Python | gen/sample/background.py | thuanvh/pico | 6900d1401ffbc862b0f95bf4708990800735b63f | [
"MIT"
] | 595 | 2015-01-21T16:00:10.000Z | 2022-03-29T19:17:42.000Z | gen/sample/background.py | thuanvh/pico | 6900d1401ffbc862b0f95bf4708990800735b63f | [
"MIT"
] | 25 | 2015-02-06T02:55:54.000Z | 2021-01-07T19:59:36.000Z | gen/sample/background.py | thuanvh/pico | 6900d1401ffbc862b0f95bf4708990800735b63f | [
"MIT"
] | 210 | 2015-01-14T22:30:38.000Z | 2021-11-29T09:05:20.000Z | #
#
#
#
import sys
import os
import numpy
import cv2
import struct
#
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('src')
args = parser.parse_args()
#
def write_rid_to_stdout(im):
#
# raw intensity data
#
#
h = im.shape[0]
w = im.shape[1]
#
hw = struct.pack('ii', h, w)
pixels = st... | 17.451613 | 119 | 0.643253 |
89538d0d4b1a6d7f9df5010dd59a39611f435c4c | 2,884 | py | Python | sorl/thumbnail/parsers.py | apahomov/sorl-thumbnail | b6358d234d7de3927a2666a2a5ab3d7870c0e1d3 | [
"BSD-3-Clause"
] | 3 | 2020-03-30T13:11:57.000Z | 2020-04-22T13:55:31.000Z | sorl/thumbnail/parsers.py | apahomov/sorl-thumbnail | b6358d234d7de3927a2666a2a5ab3d7870c0e1d3 | [
"BSD-3-Clause"
] | 22 | 2020-02-12T01:21:10.000Z | 2022-03-11T23:55:13.000Z | sorl/thumbnail/parsers.py | apahomov/sorl-thumbnail | b6358d234d7de3927a2666a2a5ab3d7870c0e1d3 | [
"BSD-3-Clause"
] | 2 | 2021-01-06T19:25:07.000Z | 2021-05-14T02:00:19.000Z | # coding=utf-8
import re
from django.utils import six
from sorl.thumbnail.helpers import ThumbnailError, toint
bgpos_pat = re.compile(r'^(?P<value>\d+)(?P<unit>%|px)$')
geometry_pat = re.compile(r'^(?P<x>\d+)?(?:x(?P<y>\d+))?$')
class ThumbnailParseError(ThumbnailError):
pass
def parse_geometry(geometry, ra... | 26.953271 | 80 | 0.568655 |
9544c7b06592486b9890e4ad0d8bb714ae7977c9 | 367 | py | Python | __init__.py | psifertex/bn-goloader | f3945aa7759f09e9dd8ccd38de87186c17d47e08 | [
"MIT"
] | 21 | 2017-08-12T12:07:09.000Z | 2022-03-08T04:01:06.000Z | __init__.py | psifertex/bn-goloader | f3945aa7759f09e9dd8ccd38de87186c17d47e08 | [
"MIT"
] | 2 | 2019-05-16T07:44:10.000Z | 2021-02-02T21:28:23.000Z | __init__.py | psifertex/bn-goloader | f3945aa7759f09e9dd8ccd38de87186c17d47e08 | [
"MIT"
] | 12 | 2017-06-28T08:59:52.000Z | 2022-03-08T04:01:05.000Z | from binaryninja import PluginCommand
from .gohelpers import rename_functions, rename_newproc_fptrs
PluginCommand.register(
"golang\\auto-rename functions",
"Automatically rename go functions based on symbol table",
rename_functions)
PluginCommand.register("golang\\rename fptrs passed to newproc", "...."... | 30.583333 | 72 | 0.741144 |
be044f9b660cedf2757d010746b999a43e199935 | 106,416 | py | Python | helloworld.py | TheKingR09/HelloWorld2018 | ba1b920d302d20e887428f75a07134007033a10e | [
"MIT",
"BSD-3-Clause"
] | 11 | 2018-10-14T14:46:46.000Z | 2019-03-01T17:52:28.000Z | helloworld.py | TheKingR09/HelloWorld2018 | ba1b920d302d20e887428f75a07134007033a10e | [
"MIT",
"BSD-3-Clause"
] | 2 | 2021-04-30T20:44:37.000Z | 2021-06-01T23:51:08.000Z | helloworld.py | TheKingR09/HelloWorld2018 | ba1b920d302d20e887428f75a07134007033a10e | [
"MIT",
"BSD-3-Clause"
] | 7 | 2018-10-14T14:46:46.000Z | 2019-11-13T14:53:02.000Z | # -*- coding: utf-8 -*-
'''
Free to use, all credits belong to me, Zero Cool.
Do not sell or rent it!
© 2018 Hello World
'''
from important import *
# Setup Argparse
parser = argparse.ArgumentParser(description='Selfbot Hello World')
parser.add_argument('-t', '--token', type=str, metavar='', required=False, help='Toke... | 48.747595 | 216 | 0.495499 |
175c439f1c9f06c783d5ee7ecca69fd522bebe45 | 1,800 | py | Python | 借来的plugins/OPQ-SetuBot/plugins/bot_eventMonitor.py | njjjay/IOTQQPlugins_selfuse | 23bda39647c14256e6366bf49d72bb71ba68cbd7 | [
"MIT"
] | 19 | 2020-06-16T03:36:24.000Z | 2022-01-30T07:46:29.000Z | 借来的plugins/OPQ-SetuBot/plugins/bot_eventMonitor.py | njjjay/IOTQQPlugins_selfuse | 23bda39647c14256e6366bf49d72bb71ba68cbd7 | [
"MIT"
] | 1 | 2020-08-01T18:20:10.000Z | 2020-08-03T10:42:04.000Z | 借来的plugins/OPQ-SetuBot/plugins/bot_eventMonitor.py | njjjay/IOTQQPlugins_selfuse | 23bda39647c14256e6366bf49d72bb71ba68cbd7 | [
"MIT"
] | 5 | 2020-08-12T02:02:20.000Z | 2021-06-09T08:38:33.000Z | from botoy import EventMsg
from botoy.refine import refine_group_admin_event_msg, refine_group_join_event_msg
# from botoy import decorators as deco
from module import database, config
from loguru import logger
def receive_events(ctx: EventMsg):
if admin_info := refine_group_admin_event_msg(ctx):
if data_... | 50 | 101 | 0.652222 |
4e2a34ea074064288976537a4e74b039521a36e9 | 4,857 | py | Python | src/sentry/api/endpoints/team_details.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 2 | 2019-03-04T12:45:54.000Z | 2019-03-04T12:45:55.000Z | src/sentry/api/endpoints/team_details.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 196 | 2019-06-10T08:34:10.000Z | 2022-02-22T01:26:13.000Z | src/sentry/api/endpoints/team_details.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 1 | 2020-07-03T00:52:19.000Z | 2020-07-03T00:52:19.000Z | from __future__ import absolute_import
import logging
from uuid import uuid4
from rest_framework import serializers, status
from rest_framework.response import Response
from sentry.api.base import DocSection
from sentry.api.bases.team import TeamEndpoint
from sentry.api.decorators import sudo_required
from sentry.ap... | 31.745098 | 93 | 0.597076 |
62ab5bc50ab12a960f299994eca779c93b81342c | 346 | py | Python | apps/order/migrations/0003_alter_order_table.py | xxcfun/mes_api | b694533f1bb7b7d79a01e949730a4fba7cece528 | [
"Apache-2.0"
] | null | null | null | apps/order/migrations/0003_alter_order_table.py | xxcfun/mes_api | b694533f1bb7b7d79a01e949730a4fba7cece528 | [
"Apache-2.0"
] | null | null | null | apps/order/migrations/0003_alter_order_table.py | xxcfun/mes_api | b694533f1bb7b7d79a01e949730a4fba7cece528 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2 on 2022-01-10 09:47
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('order', '0002_alter_order_produce'),
]
operations = [
migrations.AlterModelTable(
name='order',
table='master_or... | 19.222222 | 47 | 0.566474 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.