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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1e2f745b1c09777ad708383a909a606bf11d79 | 23,608 | py | Python | server/www/teleport/webroot/app/model/policy.py | tinygg/teleport | 5ac759c707d355767a209e29becaadf250b0e366 | [
"Apache-2.0"
] | 640 | 2018-09-12T03:14:13.000Z | 2022-03-30T04:38:09.000Z | server/www/teleport/webroot/app/model/policy.py | tinygg/teleport | 5ac759c707d355767a209e29becaadf250b0e366 | [
"Apache-2.0"
] | 175 | 2018-09-10T19:52:20.000Z | 2022-03-30T04:37:30.000Z | server/www/teleport/webroot/app/model/policy.py | tinygg/teleport | 5ac759c707d355767a209e29becaadf250b0e366 | [
"Apache-2.0"
] | 230 | 2018-09-13T02:40:49.000Z | 2022-03-29T11:53:58.000Z | # -*- coding: utf-8 -*-
from app.const import *
from app.base.logger import log
from app.base.db import get_db, SQL
from app.model import syslog
from app.base.utils import AttrDict, tp_timestamp_sec
def rebuild_ops_auz_map():
_users = {}
_hosts = {}
_accs = {}
_gusers = {}
_ghosts =... | 39.021488 | 192 | 0.432862 |
4a1e30b861e4b677179f33310783146a2cfa3ca6 | 184 | py | Python | DataLoader/_load_polarity_file.py | vd1371/CBSA | f2b3f03c91ccd9ec02c2331f43573d7d6e72fd47 | [
"MIT"
] | null | null | null | DataLoader/_load_polarity_file.py | vd1371/CBSA | f2b3f03c91ccd9ec02c2331f43573d7d6e72fd47 | [
"MIT"
] | null | null | null | DataLoader/_load_polarity_file.py | vd1371/CBSA | f2b3f03c91ccd9ec02c2331f43573d7d6e72fd47 | [
"MIT"
] | null | null | null | import os
import pandas as pd
def load_polarity_file():
df = None
if os.path.exists("./Data/Polarities.csv"):
df = pd.read_csv("./Data/Polarities.csv", index_col = 0)
return df | 18.4 | 58 | 0.701087 |
4a1e3102e54eca6489dbed7e77be1985ccff63a1 | 348 | py | Python | test/unit/test_handlers.py | Spendency/cw-logs-to-lambda | 24dcd104ddbae159f2568d0672d05731b9884504 | [
"MIT"
] | 2 | 2019-04-17T17:44:31.000Z | 2020-08-04T02:49:40.000Z | test/unit/test_handlers.py | Spendency/cw-logs-to-lambda | 24dcd104ddbae159f2568d0672d05731b9884504 | [
"MIT"
] | null | null | null | test/unit/test_handlers.py | Spendency/cw-logs-to-lambda | 24dcd104ddbae159f2568d0672d05731b9884504 | [
"MIT"
] | 1 | 2021-03-24T08:27:26.000Z | 2021-03-24T08:27:26.000Z | import pytest
import handlers
import lambdahelpers
import requests
import test_constants
def test_logs_to_lambda(mocker):
mocker.patch.object(lambdahelpers, 'send_message_array')
handlers.logs_to_lambda(test_constants.AWS_LOG_EVENT, None)
lambdahelpers.send_message_array.assert_called_with(test_constants... | 26.769231 | 97 | 0.850575 |
4a1e319d1efb2ef1996f7531a9497c34260b3a08 | 22,062 | py | Python | Cinder/Wallaby/huawei_conf.py | bingyanh/OpenStack_Driver | 8c94f6f86a5ebb1e663aa73df0847cfad09d2960 | [
"Apache-2.0"
] | 14 | 2019-05-25T01:55:50.000Z | 2021-02-23T06:54:06.000Z | Cinder/Wallaby/huawei_conf.py | bingyanh/OpenStack_Driver | 8c94f6f86a5ebb1e663aa73df0847cfad09d2960 | [
"Apache-2.0"
] | 4 | 2019-12-31T08:46:30.000Z | 2021-10-30T09:27:58.000Z | Cinder/Wallaby/huawei_conf.py | bingyanh/OpenStack_Driver | 8c94f6f86a5ebb1e663aa73df0847cfad09d2960 | [
"Apache-2.0"
] | 17 | 2019-07-31T03:13:07.000Z | 2022-02-21T08:09:15.000Z | # Copyright (c) 2016 Huawei Technologies Co., Ltd.
# 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
#
# ... | 38.910053 | 80 | 0.573339 |
4a1e31a3749acfbe9a253cef39f3e601664ff42c | 896 | py | Python | WikiScraper/WikiScraper/pipelines.py | TobiOnabolu/WebScrapers | 1ff55e6c756303f265917274c16638af4cde5d05 | [
"MIT"
] | null | null | null | WikiScraper/WikiScraper/pipelines.py | TobiOnabolu/WebScrapers | 1ff55e6c756303f265917274c16638af4cde5d05 | [
"MIT"
] | null | null | null | WikiScraper/WikiScraper/pipelines.py | TobiOnabolu/WebScrapers | 1ff55e6c756303f265917274c16638af4cde5d05 | [
"MIT"
] | null | null | null | # Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
# useful for handling different item types with a single interface
from itemadapter import ItemAdapter
from scrapy.exceptions import DropItem
#pipe... | 35.84 | 96 | 0.741071 |
4a1e321d24f9266ba328c1020e565d9f0c014761 | 5,446 | py | Python | model.py | Adversarial-dropout-rnn/adversarial_dropout_lm | e08ff9aa51765fff6cfac4c2576e58bee3fcd173 | [
"BSD-3-Clause"
] | null | null | null | model.py | Adversarial-dropout-rnn/adversarial_dropout_lm | e08ff9aa51765fff6cfac4c2576e58bee3fcd173 | [
"BSD-3-Clause"
] | null | null | null | model.py | Adversarial-dropout-rnn/adversarial_dropout_lm | e08ff9aa51765fff6cfac4c2576e58bee3fcd173 | [
"BSD-3-Clause"
] | null | null | null | import torch
import torch.nn as nn
from torch.autograd import Variable
from embed_regularize import embedded_dropout_mask
from locked_dropout import LockedDropoutMask
from weight_drop import WeightDropMask
from pytorch_LSTM import LSTM, LSTMCell, BNLSTMCell
class RNNModel(nn.Module):
"""Container modu... | 46.547009 | 219 | 0.598972 |
4a1e322073ecd5b9ab934106b3ebd6678898f2f9 | 2,685 | py | Python | mlbapi/data/league.py | trevor-viljoen/mlbapi | f674e6ee0cf4d148e491ebac60382f2461ec4397 | [
"MIT"
] | 9 | 2020-02-25T15:51:00.000Z | 2021-12-30T05:22:06.000Z | mlbapi/data/league.py | trevor-viljoen/mlbapi | f674e6ee0cf4d148e491ebac60382f2461ec4397 | [
"MIT"
] | 1 | 2020-07-26T16:00:48.000Z | 2020-07-26T16:05:00.000Z | mlbapi/data/league.py | trevor-viljoen/mlbapi | f674e6ee0cf4d148e491ebac60382f2461ec4397 | [
"MIT"
] | 1 | 2021-02-21T17:29:48.000Z | 2021-02-21T17:29:48.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""mlbapi functions for the league API endpoints.
This module's functions get the JSON payloads for the mlb.com games API
endpoints.
.. _Google Python Style Guide:
http://google.github.io/styleguide/pyguide.html
"""
from mlbapi.data import request
from mlbapi import ... | 29.505495 | 80 | 0.649534 |
4a1e322c5fdd41b58eb5449d8251c9bf556a1966 | 5,733 | py | Python | coverage/tomlconfig.py | timofurrer/coveragepy | 72e9761ee79eb2f5b61b21a5427e07fff6acd400 | [
"Apache-2.0"
] | 2,254 | 2015-01-05T01:28:03.000Z | 2022-03-29T10:37:10.000Z | coverage/tomlconfig.py | mgorny/coveragepy | 73ca4596fc8eed9c76714e7a5c80dd61d71fe1b1 | [
"Apache-2.0"
] | 707 | 2015-02-07T01:32:02.000Z | 2022-03-31T18:00:14.000Z | coverage/tomlconfig.py | sitedata/coveragepy | e4f0f9ee71a1ade66b51ec53d0061f462e3838cb | [
"Apache-2.0"
] | 439 | 2015-01-16T15:06:08.000Z | 2022-03-30T06:19:12.000Z | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""TOML configuration support for coverage.py"""
import configparser
import os
import re
from coverage.exceptions import CoverageException
from coverage.misc impo... | 34.745455 | 97 | 0.60771 |
4a1e3262e21baf5ae4bb27052fd91b8c3a2f70e8 | 1,943 | py | Python | profiles/constants.py | mitodl/bootcamp-ecommerce | ba7d6aefe56c6481ae2a5afc84cdd644538b6d50 | [
"BSD-3-Clause"
] | 2 | 2018-06-20T19:37:03.000Z | 2021-01-06T09:51:40.000Z | profiles/constants.py | mitodl/bootcamp-ecommerce | ba7d6aefe56c6481ae2a5afc84cdd644538b6d50 | [
"BSD-3-Clause"
] | 1,226 | 2017-02-23T14:52:28.000Z | 2022-03-29T13:19:54.000Z | profiles/constants.py | mitodl/bootcamp-ecommerce | ba7d6aefe56c6481ae2a5afc84cdd644538b6d50 | [
"BSD-3-Clause"
] | 3 | 2017-03-20T03:51:27.000Z | 2021-03-19T15:54:31.000Z | """User constants"""
import pycountry
USERNAME_MAX_LEN = 30
# Defined in edX Profile model
MALE = "m"
FEMALE = "f"
OTHER = "o"
GENDER_CHOICES = (
(MALE, "Male"),
(FEMALE, "Female"),
(OTHER, "Other/Prefer Not to Say"),
)
COMPANY_SIZE_CHOICES = (
(None, "----"),
(1, "Small/Start-up (1+ employees)... | 26.616438 | 75 | 0.640762 |
4a1e3290c3678e81940752e2311113d781615683 | 179 | py | Python | concrete/common/values/__init__.py | iciac/concrete-numpy | debf888e9281263b731cfc4b31feb5de7ec7f47a | [
"FTL"
] | 96 | 2022-01-12T15:07:50.000Z | 2022-03-16T04:00:09.000Z | concrete/common/values/__init__.py | iciac/concrete-numpy | debf888e9281263b731cfc4b31feb5de7ec7f47a | [
"FTL"
] | 10 | 2022-02-04T16:26:37.000Z | 2022-03-25T14:08:01.000Z | concrete/common/values/__init__.py | iciac/concrete-numpy | debf888e9281263b731cfc4b31feb5de7ec7f47a | [
"FTL"
] | 8 | 2022-01-12T15:07:55.000Z | 2022-03-05T00:46:16.000Z | """Module for value structures."""
from . import tensors
from .base import BaseValue
from .tensors import ClearScalar, ClearTensor, EncryptedScalar, EncryptedTensor, TensorValue
| 29.833333 | 92 | 0.804469 |
4a1e3357d3d11268d8d321aa700bf68d47d3e163 | 366 | py | Python | python-spider/selenium-demo/cookies_demo.py | meteor1993/python-learning | 4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40 | [
"MIT"
] | 83 | 2019-10-15T06:54:06.000Z | 2022-03-28T14:08:21.000Z | python-spider/selenium-demo/cookies_demo.py | wenxuefeng3930/python-learning | 4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40 | [
"MIT"
] | 1 | 2020-04-16T08:13:19.000Z | 2020-07-14T01:52:46.000Z | python-spider/selenium-demo/cookies_demo.py | wenxuefeng3930/python-learning | 4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40 | [
"MIT"
] | 74 | 2019-11-02T08:10:36.000Z | 2022-02-19T12:23:36.000Z | from selenium import webdriver
browser = webdriver.Chrome()
browser.get('https://www.geekdigging.com/')
# 获取 cookies
print(browser.get_cookies())
# 添加一个 cookie
browser.add_cookie({'name': 'name', 'domain': 'www.geekdigging.com', 'value': 'geekdigging'})
print(browser.get_cookies())
# 删除所有 cookie
browser.dele... | 30.5 | 94 | 0.73224 |
4a1e33b5fe9f89c1d74c47c4ab205543493541df | 6,228 | py | Python | deb_dist/bulkwhois-0.2.1/debian/python-bulkwhois/usr/share/pyshared/bulkwhois/__init__.py | csirtfoundry/BulkWhois | b0ac5ae340d582fed67e75214350cf2702529c5a | [
"MIT"
] | 5 | 2017-05-13T22:51:01.000Z | 2020-12-13T14:01:17.000Z | deb_dist/bulkwhois-0.2.1/build/lib.linux-x86_64-2.6/bulkwhois/__init__.py | csirtfoundry/BulkWhois | b0ac5ae340d582fed67e75214350cf2702529c5a | [
"MIT"
] | 1 | 2020-02-26T10:27:12.000Z | 2020-02-26T10:27:12.000Z | deb_dist/bulkwhois-0.2.1/debian/python-bulkwhois/usr/share/pyshared/bulkwhois/__init__.py | csirtfoundry/BulkWhois | b0ac5ae340d582fed67e75214350cf2702529c5a | [
"MIT"
] | 3 | 2017-07-07T15:59:20.000Z | 2022-01-23T11:09:11.000Z | __all__ = ('BulkWhois')
import telnetlib
import socket
import logging
class BulkWhois(object):
"""
Query a list of IP addresses from a bulk whois server. This is an
efficient way to query a large number of IP addresses. It sends all
the IP addresses at once, and receives all whois result... | 34.793296 | 127 | 0.581728 |
4a1e33cbb1d94b8d8f563aa9996d50c6e85a125e | 149 | py | Python | tests/integration/omnicore_types.py | johng/obd | 1d1ef45adc2e6cec82afc6d03efcf2cd53751c2a | [
"MIT"
] | 29 | 2020-03-26T08:25:14.000Z | 2022-03-14T08:44:39.000Z | tests/integration/omnicore_types.py | johng/obd | 1d1ef45adc2e6cec82afc6d03efcf2cd53751c2a | [
"MIT"
] | 35 | 2020-05-12T06:21:03.000Z | 2022-03-04T10:32:19.000Z | tests/integration/omnicore_types.py | johng/obd | 1d1ef45adc2e6cec82afc6d03efcf2cd53751c2a | [
"MIT"
] | 12 | 2020-05-18T21:02:13.000Z | 2022-03-25T13:44:46.000Z | from dataclasses import dataclass
@dataclass(frozen=False)
class Address:
public_key: str
private_key: str
address: str
index: int
| 14.9 | 33 | 0.718121 |
4a1e33cea933d5c3a1089d13cc6ee90e4658a5ba | 553 | py | Python | server/lib/python/cartodb_services/cartodb_services/refactor/backend/server_config.py | digideskio/dataservices-api | 246ec135dbeaa3f9a52717fdac50a4ab040ce22b | [
"BSD-3-Clause"
] | 22 | 2016-03-11T17:33:31.000Z | 2021-02-22T04:00:43.000Z | server/lib/python/cartodb_services/cartodb_services/refactor/backend/server_config.py | digideskio/dataservices-api | 246ec135dbeaa3f9a52717fdac50a4ab040ce22b | [
"BSD-3-Clause"
] | 338 | 2016-02-16T16:13:13.000Z | 2022-03-30T15:50:17.000Z | server/lib/python/cartodb_services/cartodb_services/refactor/backend/server_config.py | CartoDB/dataservices-api | d0f28cc002ef11df9f371d5d1fd2d0901c245f97 | [
"BSD-3-Clause"
] | 14 | 2016-09-22T15:29:33.000Z | 2021-02-08T03:46:40.000Z | from cartodb_services.refactor.storage.server_config import InDbServerConfigStorage
class ServerConfigBackendFactory(object):
"""
This class creates a backend to retrieve server configurations (implementing the ConfigBackendInterface).
At this moment it will always return an InDbServerConfigStorage, but ... | 39.5 | 109 | 0.777577 |
4a1e33ee5ed0739a445e4048fcddce18aac6d4c7 | 631 | py | Python | gazoo_device/_version.py | dedsec-9/gazoo-device | 5ed2867c258da80e53b6aae07ec7a65efe473a28 | [
"Apache-2.0"
] | null | null | null | gazoo_device/_version.py | dedsec-9/gazoo-device | 5ed2867c258da80e53b6aae07ec7a65efe473a28 | [
"Apache-2.0"
] | null | null | null | gazoo_device/_version.py | dedsec-9/gazoo-device | 5ed2867c258da80e53b6aae07ec7a65efe473a28 | [
"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, ... | 37.117647 | 74 | 0.751189 |
4a1e3430abe789126ea345c97d4cde1997f8ab5d | 1,107 | py | Python | src/robotide/context/coreplugins.py | nbbull/RIDE | e6496f0b1b6dc454b9479de48b6949bce29b53df | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-25T03:22:52.000Z | 2017-11-25T03:22:52.000Z | src/robotide/context/coreplugins.py | nbbull/RIDE | e6496f0b1b6dc454b9479de48b6949bce29b53df | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robotide/context/coreplugins.py | nbbull/RIDE | e6496f0b1b6dc454b9479de48b6949bce29b53df | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2012 Nokia Siemens Networks Oyj
#
# 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... | 41 | 75 | 0.769648 |
4a1e344baa9d52ad1255402d81c02e71a023d18a | 337 | py | Python | cradmin_legacy/demo/no_role_demo/views/dashboard.py | appressoas/cradmin_legacy | b9d024299333dd04c87c1031bd5be5778aa7f1f1 | [
"BSD-3-Clause"
] | null | null | null | cradmin_legacy/demo/no_role_demo/views/dashboard.py | appressoas/cradmin_legacy | b9d024299333dd04c87c1031bd5be5778aa7f1f1 | [
"BSD-3-Clause"
] | 17 | 2018-03-07T15:52:42.000Z | 2022-03-12T01:07:06.000Z | cradmin_legacy/demo/no_role_demo/views/dashboard.py | appressoas/cradmin_legacy | b9d024299333dd04c87c1031bd5be5778aa7f1f1 | [
"BSD-3-Clause"
] | 1 | 2018-07-23T22:13:45.000Z | 2018-07-23T22:13:45.000Z | from __future__ import unicode_literals
from django.views.generic import TemplateView
from cradmin_legacy import crapp
class DashboardView(TemplateView):
template_name = 'no_role_demo/dashboard.django.html'
class App(crapp.App):
appurls = [
crapp.Url(r'^$', DashboardView.as_view(), name=crapp.INDEX... | 22.466667 | 76 | 0.753709 |
4a1e355ecd84746004ec1d71828260fe8319de29 | 8,053 | py | Python | src/library/bigip_irule_bigsuds.py | SpringerPE/ansible-bigiplb-boshrelease | 44835946c3513cbf1a975a895eb652261deffbba | [
"Apache-2.0"
] | 2 | 2016-11-11T21:46:23.000Z | 2016-11-14T08:06:38.000Z | src/library/bigip_irule_bigsuds.py | SpringerPE/ansible-bigiplb-boshrelease | 44835946c3513cbf1a975a895eb652261deffbba | [
"Apache-2.0"
] | null | null | null | src/library/bigip_irule_bigsuds.py | SpringerPE/ansible-bigiplb-boshrelease | 44835946c3513cbf1a975a895eb652261deffbba | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
DOCUMENTATION = '''
---
module: bigip_irule_bigsuds
short_description: Manage iRules on a BIG-IP.
description:
- Manage iRules on a BIG-IP.
version_added: "2.2"
notes:
- "Requires BIG-IP software version >= 9"
- "F5 developed module 'bigsuds' required (see http://de... | 32.603239 | 166 | 0.594934 |
4a1e365eb6623694467025066d11c95f56a7bafe | 2,523 | py | Python | service/strings.py | BetssonGroup/georef-ar-api | 15a408912633c802f6d67a357c92a26dd3537396 | [
"MIT"
] | 92 | 2018-08-29T12:35:55.000Z | 2022-03-21T01:18:57.000Z | service/strings.py | BetssonGroup/georef-ar-api | 15a408912633c802f6d67a357c92a26dd3537396 | [
"MIT"
] | 111 | 2018-08-15T12:17:44.000Z | 2022-03-09T19:31:33.000Z | service/strings.py | BetssonGroup/georef-ar-api | 15a408912633c802f6d67a357c92a26dd3537396 | [
"MIT"
] | 20 | 2018-08-23T17:19:09.000Z | 2021-12-15T19:36:54.000Z | """Módulo 'strings' de georef-ar-api
Contiene mensajes de error en forma de texto para usuarios.
"""
ADDRESS_FORMAT = 'La dirección debe seguir alguno de los formatos listados \
bajo la clave \'ayuda\'.'
ADDRESS_FORMAT_HELP = [
'<nombre de calle>',
'<nombre de calle> <altura>'
]
STRING_EMPTY = 'El campo no ti... | 45.872727 | 78 | 0.742767 |
4a1e3679a683cb0391108e789817e80e75de1b93 | 8,270 | py | Python | tools/browser.py | adelsonllima/djangoplus | a4ce50bf8231a0d9a4a40751f0d076c2e9931f44 | [
"BSD-3-Clause"
] | 21 | 2017-10-08T23:19:47.000Z | 2020-01-16T20:02:08.000Z | tools/browser.py | adelsonllima/djangoplus | a4ce50bf8231a0d9a4a40751f0d076c2e9931f44 | [
"BSD-3-Clause"
] | 6 | 2020-06-03T05:30:52.000Z | 2022-01-13T00:44:26.000Z | tools/browser.py | adelsonllima/djangoplus | a4ce50bf8231a0d9a4a40751f0d076c2e9931f44 | [
"BSD-3-Clause"
] | 9 | 2017-10-09T22:58:31.000Z | 2021-11-20T15:20:18.000Z | # -*- coding: utf-8 -*-
import time
import datetime
import traceback
import djangoplus
from selenium import webdriver
from django.conf import settings
from django.utils.translation import ugettext as _
from selenium.webdriver.firefox.options import Options
from selenium.common.exceptions import WebDriverException
cl... | 32.948207 | 114 | 0.542443 |
4a1e372600e415f6c95a0a392afb3a06743da406 | 2,345 | py | Python | scout/build/genes/exon.py | szilvajuhos/scout | 2f4a03fb3192a57c99fd62be626e8c22051e81af | [
"BSD-3-Clause"
] | null | null | null | scout/build/genes/exon.py | szilvajuhos/scout | 2f4a03fb3192a57c99fd62be626e8c22051e81af | [
"BSD-3-Clause"
] | null | null | null | scout/build/genes/exon.py | szilvajuhos/scout | 2f4a03fb3192a57c99fd62be626e8c22051e81af | [
"BSD-3-Clause"
] | null | null | null | from scout.models.hgnc_map import Exon
def build_exon(exon_info, build='37'):
"""Build a Exon object object
Args:
exon_info(dict): Exon information
Returns:
exon_obj(Exon)
"exon_id": str, # str(chrom-start-end)
"chrom": str,
"start": int,... | 25.769231 | 61 | 0.575267 |
4a1e372775f4def9dca81077b789373539d19ef5 | 384 | py | Python | languages/python/1.learn_py_the_hard_way/ex10.py | banminkyoz/learn | fde05b0e2f075ebffe77a9d085ed63412d8a9ff9 | [
"MIT"
] | 4 | 2022-01-18T00:57:20.000Z | 2022-03-31T02:41:54.000Z | languages/python/1.learn_py_the_hard_way/ex10.py | kyoz/learn | fde05b0e2f075ebffe77a9d085ed63412d8a9ff9 | [
"MIT"
] | null | null | null | languages/python/1.learn_py_the_hard_way/ex10.py | kyoz/learn | fde05b0e2f075ebffe77a9d085ed63412d8a9ff9 | [
"MIT"
] | null | null | null | print("I am 6'2\" tall.") # escape double-quote inside string
print('I am 6\'2" tall.') # escape single-quote inside string
tabby_cat = "\tI'm tabbed in."
persian_cat = "I'm split\non a line."
backslash_cat = "I'm \\ a \\ cat."
fat_cat = """
I'll do a list:
\t* Cat food
\t* Fishies
\t* Catnip\n\t* Grass
"""
print(ta... | 20.210526 | 61 | 0.671875 |
4a1e372f4ac45d55da35c2f37f647db6c5887eae | 1,600 | py | Python | app/core/filters.py | samgans/Recipe-API | 47f9566cef60c45f0b57c032d19d7238f6e88e07 | [
"MIT"
] | null | null | null | app/core/filters.py | samgans/Recipe-API | 47f9566cef60c45f0b57c032d19d7238f6e88e07 | [
"MIT"
] | null | null | null | app/core/filters.py | samgans/Recipe-API | 47f9566cef60c45f0b57c032d19d7238f6e88e07 | [
"MIT"
] | null | null | null | from rest_framework import filters
class IsOwnerFilterBackend(filters.BaseFilterBackend):
'''Filters objects which were created by the request user'''
def filter_queryset(self, request, queryset, view):
return queryset.filter(owner=request.user)
class RecipeTagsFilterBackend(filters.BaseFilterBacken... | 37.209302 | 77 | 0.69 |
4a1e375bbf8ed093e6c3be533314b03509139695 | 2,711 | py | Python | vector_dbc/comment.py | kdschlosser/vector_dbc | c49efa538ed9683d6257182fa7515cd40a0ff5a1 | [
"MIT"
] | 8 | 2021-02-18T07:16:16.000Z | 2022-03-23T11:55:52.000Z | vector_dbc/comment.py | kdschlosser/vector_dbc | c49efa538ed9683d6257182fa7515cd40a0ff5a1 | [
"MIT"
] | null | null | null | vector_dbc/comment.py | kdschlosser/vector_dbc | c49efa538ed9683d6257182fa7515cd40a0ff5a1 | [
"MIT"
] | 3 | 2021-02-19T14:27:34.000Z | 2022-03-23T11:55:53.000Z |
class Comment(str):
_fmt = 'CM_ "{comment}" ;'
def format(self, *args, **kwargs):
return self._fmt.format(comment=self.replace('"', '\\"'))
class NodeComment(Comment):
_fmt = 'CM_ BU_ {name} "{comment}" ;'
def __init__(self, value):
self._node = None
try:
super... | 23.99115 | 67 | 0.586868 |
4a1e3906025e5d5a9b26ab847bd9ca06719be68a | 2,239 | py | Python | observations/r/wage1.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 199 | 2017-07-24T01:34:27.000Z | 2022-01-29T00:50:55.000Z | observations/r/wage1.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 46 | 2017-09-05T19:27:20.000Z | 2019-01-07T09:47:26.000Z | observations/r/wage1.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 45 | 2017-07-26T00:10:44.000Z | 2022-03-16T20:44:59.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def wage1(path):
"""wage1
Data loads lazily. Type data(wage1) into the... | 22.846939 | 77 | 0.669049 |
4a1e39bb30b04c3f1890319344b39508fb54a017 | 56,308 | py | Python | venv/lib/python2.7/site-packages/ansible/plugins/strategy/__init__.py | aburan28/ansible-devops-pipeline | 50aa801632ca0828c16faac55732f1e79085f932 | [
"Apache-2.0"
] | 1 | 2019-04-16T21:23:15.000Z | 2019-04-16T21:23:15.000Z | venv/lib/python2.7/site-packages/ansible/plugins/strategy/__init__.py | aburan28/ansible-devops-pipeline | 50aa801632ca0828c16faac55732f1e79085f932 | [
"Apache-2.0"
] | 5 | 2020-02-26T20:10:50.000Z | 2021-09-23T23:23:18.000Z | venv/lib/python2.7/site-packages/ansible/plugins/strategy/__init__.py | aburan28/ansible-devops-pipeline | 50aa801632ca0828c16faac55732f1e79085f932 | [
"Apache-2.0"
] | null | null | null | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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 version 3 of the License, or
# (at your option) an... | 45.483037 | 156 | 0.590662 |
4a1e39eb24df3b0b9023e350d44c980fb3d1fc3e | 6,455 | py | Python | tests/integration_tests/test_keyfile.py | AltaverseDAO/bittensor | ce0e6887d7e2b279b168949d4e7730981db8de6f | [
"MIT"
] | null | null | null | tests/integration_tests/test_keyfile.py | AltaverseDAO/bittensor | ce0e6887d7e2b279b168949d4e7730981db8de6f | [
"MIT"
] | null | null | null | tests/integration_tests/test_keyfile.py | AltaverseDAO/bittensor | ce0e6887d7e2b279b168949d4e7730981db8de6f | [
"MIT"
] | null | null | null | # The MIT License (MIT)
# Copyright © 2021 Yuma Rao
# 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... | 47.814815 | 298 | 0.757242 |
4a1e3a8041bc9d758c1e79b2e21d6938c4decc6f | 24,167 | py | Python | lib/loop_fix.py | Titorat/SSrehab | 6691ee1ed442073bfa00a51f0d9ab74b9252d302 | [
"MIT"
] | null | null | null | lib/loop_fix.py | Titorat/SSrehab | 6691ee1ed442073bfa00a51f0d9ab74b9252d302 | [
"MIT"
] | null | null | null | lib/loop_fix.py | Titorat/SSrehab | 6691ee1ed442073bfa00a51f0d9ab74b9252d302 | [
"MIT"
] | null | null | null | # standard library
import io
import sys
import re
from typing import Dict, Literal
import os
import time
from math import isnan
import gzip
# third-party libraries
from liftover import ChainFile as get_lifter_from_ChainFile # type: ignore # pylance mistakenly doesn't recognize ChainFile
# local
from math_utils import... | 32.17976 | 166 | 0.59304 |
4a1e3b0ee813805b2a38a496f99da1499f3f0f4b | 205 | py | Python | projects/01_hello_world/01_hello_world.py | NJannasch/TechLabs-FlaskIntro | 24fadedd42ba2bfddbc40b0f939a47dfcf85867f | [
"MIT"
] | null | null | null | projects/01_hello_world/01_hello_world.py | NJannasch/TechLabs-FlaskIntro | 24fadedd42ba2bfddbc40b0f939a47dfcf85867f | [
"MIT"
] | null | null | null | projects/01_hello_world/01_hello_world.py | NJannasch/TechLabs-FlaskIntro | 24fadedd42ba2bfddbc40b0f939a47dfcf85867f | [
"MIT"
] | null | null | null | from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/', methods=['GET'])
def home():
return "Hello World"
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8080, debug=True) | 20.5 | 50 | 0.64878 |
4a1e3b40091fbe8dcd64af3b667eddb979f993b2 | 393,419 | py | Python | nova/compute/manager.py | mariusleu/nova | b19e37cbfddfce0839dbeeb0d556ed1ffae664ad | [
"Apache-2.0"
] | null | null | null | nova/compute/manager.py | mariusleu/nova | b19e37cbfddfce0839dbeeb0d556ed1ffae664ad | [
"Apache-2.0"
] | null | null | null | nova/compute/manager.py | mariusleu/nova | b19e37cbfddfce0839dbeeb0d556ed1ffae664ad | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... | 48.001342 | 79 | 0.59046 |
4a1e3b77278c5b95b991a9d6df99b3b643fd65e0 | 2,288 | py | Python | epyc/scope.py | auscompgeek/perfectgift | 1c49a628ad17da151dfa9bfac7b3be857c143920 | [
"MIT"
] | 2 | 2016-12-11T21:58:13.000Z | 2018-01-31T02:43:48.000Z | epyc/scope.py | auscompgeek/perfectgift | 1c49a628ad17da151dfa9bfac7b3be857c143920 | [
"MIT"
] | null | null | null | epyc/scope.py | auscompgeek/perfectgift | 1c49a628ad17da151dfa9bfac7b3be857c143920 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# epyc: python-like templating langauge (Embedded PYthon Code)
# Copyright (C) 2014 Cyphar
# 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, includi... | 30.918919 | 82 | 0.736451 |
4a1e3bcc14bbbfc5433c1012703fd242abc72cfe | 1,487 | py | Python | jobs/send_email_job.py | heavenbeing/stockleeks | e4b33d22a288d068db00770562d3b752fe4a6a58 | [
"Apache-2.0"
] | 4 | 2020-09-25T16:16:32.000Z | 2021-07-07T09:39:16.000Z | jobs/send_email_job.py | heavenbeing/stockleeks | e4b33d22a288d068db00770562d3b752fe4a6a58 | [
"Apache-2.0"
] | null | null | null | jobs/send_email_job.py | heavenbeing/stockleeks | e4b33d22a288d068db00770562d3b752fe4a6a58 | [
"Apache-2.0"
] | null | null | null | # smtplib 用于邮件的发信动作
import smtplib
import requests
from email.mime.text import MIMEText
# email 用于构建邮件内容
from email.header import Header
# 用于构建邮件头
# 发信方的信息:发信邮箱,QQ 邮箱授权码
from_addr = 'heavenbeing@foxmail.com'
password = 'vxmovadvviffbgbj'
# 收信方邮箱
# to_addr = '1257358834@qq.com,heavenbeing@outlook.com,603331215@qq.com... | 29.156863 | 126 | 0.706792 |
4a1e3c5abfe94061b52c4e967ca044e6c2332e11 | 2,753 | py | Python | ldap2html/ldap2html/convert.py | nonylene/ldap2html | 99a0d012e50d1aaa96ebd0ae49240befe6bff858 | [
"MIT"
] | 4 | 2019-11-02T10:53:56.000Z | 2021-12-10T14:40:20.000Z | ldap2html/ldap2html/convert.py | nonylene/ldap2html | 99a0d012e50d1aaa96ebd0ae49240befe6bff858 | [
"MIT"
] | 1 | 2021-09-03T15:36:53.000Z | 2021-09-03T15:36:53.000Z | ldap2html/ldap2html/convert.py | nonylene/ldap2html | 99a0d012e50d1aaa96ebd0ae49240befe6bff858 | [
"MIT"
] | null | null | null | import ldap3
from operator import itemgetter
import itertools
from ..ldap.model import LdapHtmlText, LdapHtmlElement, LdapHtmlParticle, LdapHtmlFile, LdapHtmlVoidElement, ELEMENT_ATTR_DICT
from ..ldap import model as ldap_model
from ..ldap.utils import search
from ..html.model import HtmlElement, HtmlText, HtmlFile,... | 36.706667 | 139 | 0.748275 |
4a1e3c7eae557a2b14d00f775477270cfca2c27a | 522 | py | Python | shaneleblancnet/users/admin.py | shaneleblanc/portfolio-django | 9d3a0cebdc072f0536e1be39fa28fd71c1138fe1 | [
"BSD-3-Clause"
] | 1 | 2020-09-08T21:21:29.000Z | 2020-09-08T21:21:29.000Z | shaneleblancnet/users/admin.py | shaneleblanc/portfolio-django | 9d3a0cebdc072f0536e1be39fa28fd71c1138fe1 | [
"BSD-3-Clause"
] | 4 | 2021-03-18T21:08:11.000Z | 2021-09-08T00:16:23.000Z | shaneleblancnet/users/admin.py | shaneleblanc/portfolio-django | 9d3a0cebdc072f0536e1be39fa28fd71c1138fe1 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from django.contrib.auth import get_user_model
from shaneleblancnet.users.forms import UserChangeForm, UserCreationForm
User = get_user_model()
@admin.register(User)
class UserAdmin(auth_admin.UserAdmin):
form = UserChangeForm... | 29 | 83 | 0.750958 |
4a1e3db5df47115354cd0badb41806fa17246bbc | 2,161 | py | Python | Scripts/classifier_metrics.py | MathewTWilliams/News-Category-Classifiers | eddbc87919ff7de08ff5c42b05b5b35177ddb12e | [
"MIT"
] | null | null | null | Scripts/classifier_metrics.py | MathewTWilliams/News-Category-Classifiers | eddbc87919ff7de08ff5c42b05b5b35177ddb12e | [
"MIT"
] | null | null | null | Scripts/classifier_metrics.py | MathewTWilliams/News-Category-Classifiers | eddbc87919ff7de08ff5c42b05b5b35177ddb12e | [
"MIT"
] | null | null | null | #Author: Matt Williams
#Version: 12/08/2021
from sklearn.metrics import classification_report, hamming_loss, jaccard_score
from save_load_json import save_json
from utils import make_result_path
from numpy import NINF, PINF
from utils import get_result_path
from save_load_json import load_json
import os
def cal... | 43.22 | 111 | 0.701527 |
4a1e3dd16d61b3810a629f1fd8bfdf19b93ba52f | 4,563 | py | Python | tests/test_pypirc.py | bibby/pypi-uploader | 2adbe84542042d479618e5d6bc55a4453fda7d0a | [
"MIT"
] | null | null | null | tests/test_pypirc.py | bibby/pypi-uploader | 2adbe84542042d479618e5d6bc55a4453fda7d0a | [
"MIT"
] | 1 | 2019-10-24T16:57:02.000Z | 2019-10-28T15:03:43.000Z | tests/test_pypirc.py | bibby/pypi-uploader | 2adbe84542042d479618e5d6bc55a4453fda7d0a | [
"MIT"
] | 1 | 2018-12-19T18:35:51.000Z | 2018-12-19T18:35:51.000Z | """Tests for :mod:`pypiuploader.pypirc`."""
try:
import configparser
except ImportError:
import ConfigParser as configparser
import io
import tempfile
import types
import pytest
from pypiuploader import exceptions
from pypiuploader import pypirc
from . import utils
def test_read_config():
"""Test :clas... | 31.6875 | 79 | 0.656147 |
4a1e3dd980592dc1142988e581b8b077dab317c7 | 2,641 | py | Python | sweng/proto/stateexpect.py | AlwaysTraining/bbot | 0b907a426db89b9862b68e0af0894f4ee683ee2d | [
"MIT"
] | null | null | null | sweng/proto/stateexpect.py | AlwaysTraining/bbot | 0b907a426db89b9862b68e0af0894f4ee683ee2d | [
"MIT"
] | null | null | null | sweng/proto/stateexpect.py | AlwaysTraining/bbot | 0b907a426db89b9862b68e0af0894f4ee683ee2d | [
"MIT"
] | null | null | null |
import pexpect
import sys
import time
import os
switch_ip_address = "shenks.synchro.net"
print 'ip address is: ', switch_ip_address
t = pexpect.spawn('telnet ' + switch_ip_address,logfile=sys.stdout)
t.delaybeforesend=1
class state:
def __init__(self):
pass
def get_tokens(self):
return ... | 22.767241 | 104 | 0.615297 |
4a1e3dea150468b22591d06c8acfc694868cede1 | 512 | py | Python | alienspoilers/subs/migrations/0009_auto_20150223_2311.py | astonshane/Alien-Spoilers | a84c2eff921bc260f192085129c6891d38594926 | [
"MIT"
] | null | null | null | alienspoilers/subs/migrations/0009_auto_20150223_2311.py | astonshane/Alien-Spoilers | a84c2eff921bc260f192085129c6891d38594926 | [
"MIT"
] | 1 | 2015-04-12T20:17:46.000Z | 2015-04-12T20:17:46.000Z | alienspoilers/subs/migrations/0009_auto_20150223_2311.py | astonshane/Alien-Spoilers | a84c2eff921bc260f192085129c6891d38594926 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('subs', '0008_auto_20150223_2218'),
]
operations = [
migrations.AlterField(
mode... | 23.272727 | 92 | 0.638672 |
4a1e3e429be6cd06ca0680362f2ddc546e70e4a9 | 6,254 | py | Python | library/oneview_server_profile_template_facts.py | soodpr/oneview-ansible | f4f07062eda3f6dc17f4c306f376ddebb7313fbb | [
"Apache-2.0"
] | null | null | null | library/oneview_server_profile_template_facts.py | soodpr/oneview-ansible | f4f07062eda3f6dc17f4c306f376ddebb7313fbb | [
"Apache-2.0"
] | null | null | null | library/oneview_server_profile_template_facts.py | soodpr/oneview-ansible | f4f07062eda3f6dc17f4c306f376ddebb7313fbb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
###
# Copyright (2016-2020) Hewlett Packard Enterprise Development LP
#
# 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/licen... | 32.572917 | 129 | 0.712504 |
4a1e3e995f0b2f8cac292df77867cb37ac4ac1f7 | 6,596 | py | Python | env/lib/python3.8/site-packages/plotly/graph_objs/carpet/aaxis/_title.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | env/lib/python3.8/site-packages/plotly/graph_objs/carpet/aaxis/_title.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | env/lib/python3.8/site-packages/plotly/graph_objs/carpet/aaxis/_title.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Title(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "carpet.aaxis"
_path_str = "carpet.aaxis.title"
_valid_props = {"font", "offset", "text"}
... | 32.333333 | 82 | 0.535476 |
4a1e4094a0880d8af24f95f088063e362ebbed08 | 24,507 | py | Python | omg/lump.py | Xymph/omgifol | 0c8001dae2bff00824ecd49343ba9ae21066e2b2 | [
"MIT"
] | null | null | null | omg/lump.py | Xymph/omgifol | 0c8001dae2bff00824ecd49343ba9ae21066e2b2 | [
"MIT"
] | null | null | null | omg/lump.py | Xymph/omgifol | 0c8001dae2bff00824ecd49343ba9ae21066e2b2 | [
"MIT"
] | null | null | null | # Import the Python Imaging Library if it is available. On error, ignore
# the problem and continue. PIL being absent should only affect the
# graphic lump loading/saving methods and the user may not be interested
# in installing PIL just to pass this line if not interested in using the
# graphics functionality at all.... | 37.995349 | 97 | 0.559718 |
4a1e418b9fc87bf51981b5f409d58091e44be32a | 2,097 | py | Python | Detection/fcn_detector.py | Akira-sxf/mtcnn | 9e9c1a32f2d3374aa1f0287587a2a211c56a40ac | [
"MIT"
] | null | null | null | Detection/fcn_detector.py | Akira-sxf/mtcnn | 9e9c1a32f2d3374aa1f0287587a2a211c56a40ac | [
"MIT"
] | null | null | null | Detection/fcn_detector.py | Akira-sxf/mtcnn | 9e9c1a32f2d3374aa1f0287587a2a211c56a40ac | [
"MIT"
] | null | null | null |
import tensorflow as tf
import sys
sys.path.append("../")
from train_models.MTCNN_config import config
class FcnDetector(object):
#net_factory: which net
#model_path: where the params'file is
def __init__(self, net_factory, model_path):
#create a graph
graph = tf.Graph()
with grap... | 45.586957 | 130 | 0.59752 |
4a1e41b0f40965d7ba3dc21b559b4a258e7b277f | 2,754 | py | Python | pymc3/tests/test_hdf5_backend.py | cowirihy/pymc3 | f0b95773047af12f3c0ded04d707f02ddc4d4f6b | [
"Apache-2.0"
] | 3 | 2020-10-06T21:07:30.000Z | 2021-03-04T11:40:17.000Z | pymc3/tests/test_hdf5_backend.py | cowirihy/pymc3 | f0b95773047af12f3c0ded04d707f02ddc4d4f6b | [
"Apache-2.0"
] | null | null | null | pymc3/tests/test_hdf5_backend.py | cowirihy/pymc3 | f0b95773047af12f3c0ded04d707f02ddc4d4f6b | [
"Apache-2.0"
] | 3 | 2019-09-09T13:09:32.000Z | 2021-09-12T14:37:51.000Z | # Copyright 2020 The PyMC Developers
#
# 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... | 22.390244 | 76 | 0.696805 |
4a1e42ce0a3a5c616db1c84e9f6010d3aece863f | 936 | py | Python | leads/data.py | leomenezessz/leads-diff | 1b2fb35441f5a8816d825bc839c23fcbd691651f | [
"MIT"
] | null | null | null | leads/data.py | leomenezessz/leads-diff | 1b2fb35441f5a8816d825bc839c23fcbd691651f | [
"MIT"
] | null | null | null | leads/data.py | leomenezessz/leads-diff | 1b2fb35441f5a8816d825bc839c23fcbd691651f | [
"MIT"
] | null | null | null | import pandas
from pandas import Series
pandas.set_option("display.max_rows", None)
def _remove_series_whitespace(series: Series, field: str = "Email"):
return series[field].str.strip()
class DataFormatter:
def __init__(
self, excel_file_path: str, new_leads_sheet: str, old_leads_sheet: str
):
... | 33.428571 | 83 | 0.713675 |
4a1e4335bd62722be9639d891546cf6d85969620 | 2,686 | py | Python | liveSidewalk.py | berkott/NavigationAssistant | 1363bface88c1d7e0734cfed67646dbc11ebc90c | [
"MIT"
] | 1 | 2019-12-09T23:20:24.000Z | 2019-12-09T23:20:24.000Z | liveSidewalk.py | berkott/NavigationAssistant | 1363bface88c1d7e0734cfed67646dbc11ebc90c | [
"MIT"
] | null | null | null | liveSidewalk.py | berkott/NavigationAssistant | 1363bface88c1d7e0734cfed67646dbc11ebc90c | [
"MIT"
] | 2 | 2021-04-03T13:52:07.000Z | 2021-04-04T11:58:16.000Z | import sys
import cv2
import numpy as np
sys.path.append("..")
from learningModels import vgg
sys.path.remove("..")
def warpImage(img):
dst_size = (960, 720)
src = np.float32([(200, 300), (760, 300), (0, 720), (960, 720)])
dst = np.float32([(0, 0), (960, 0), (0, 720), (960, 720)])
M = cv2.getPerspe... | 26.333333 | 105 | 0.567759 |
4a1e4395a11f9d40dad6331a50e5d6a499575617 | 27,580 | py | Python | TSSSF_CardGen.py | BitokuOokami/CardMachine | d927b062ca96af1313ec94de70053a1e069c20d0 | [
"MIT"
] | null | null | null | TSSSF_CardGen.py | BitokuOokami/CardMachine | d927b062ca96af1313ec94de70053a1e069c20d0 | [
"MIT"
] | 3 | 2016-01-12T01:42:31.000Z | 2016-03-28T23:31:53.000Z | TSSSF_CardGen.py | BitokuOokami/CardMachine | d927b062ca96af1313ec94de70053a1e069c20d0 | [
"MIT"
] | 4 | 2015-12-27T01:48:34.000Z | 2019-10-19T03:42:51.000Z | import os, glob, shutil, traceback, random
import PIL_Helper
TYPE, PICTURE, SYMBOLS, TITLE, KEYWORDS, BODY, FLAVOR, EXPANSION, CLIENT = range(9)
DIRECTORY = "TSSSF"
ARTIST = "Pixel Prism"
Expansion_Icon = None
LegacySymbolMode = False
PAGE_WIDTH = 3
PAGE_HEIGHT = 3
TOTAL_CARDS = PAGE_WIDTH * PAGE_HEIGHT
workspace_p... | 38.954802 | 254 | 0.660334 |
4a1e4517221b3683f57f42f71b6525a011c60093 | 15,748 | py | Python | mysubmission/model_manager.py | 279632990/AutoSpeech2020 | 0b4c035dac937638c18dd34d842b18f6534b2bab | [
"Apache-2.0"
] | 4 | 2020-05-19T03:48:35.000Z | 2020-08-21T00:56:53.000Z | mysubmission/model_manager.py | 279632990/AutoSpeech2020 | 0b4c035dac937638c18dd34d842b18f6534b2bab | [
"Apache-2.0"
] | null | null | null | mysubmission/model_manager.py | 279632990/AutoSpeech2020 | 0b4c035dac937638c18dd34d842b18f6534b2bab | [
"Apache-2.0"
] | 1 | 2020-06-02T11:57:35.000Z | 2020-06-02T11:57:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by HazzaCheng on 2019-09-22
import gc
import numpy as np
from sklearn.metrics import roc_auc_score, accuracy_score
from tensorflow.python.keras import backend as K
from CONSTANT import CLASS_NUM, MODEL_FIRST_MAX_RUN_LOOP, FIRST_ROUND_DURATION, SECOND_ROUND_DURATI... | 44.112045 | 138 | 0.540767 |
4a1e4524728a0939102446bd86307c02279f077f | 392 | py | Python | gia/gia/doctype/gia_sector/gia_sector.py | alkuhlani/gia | 9af9737cef7b0b947baa21f46c7be381c4fc9d98 | [
"MIT"
] | null | null | null | gia/gia/doctype/gia_sector/gia_sector.py | alkuhlani/gia | 9af9737cef7b0b947baa21f46c7be381c4fc9d98 | [
"MIT"
] | null | null | null | gia/gia/doctype/gia_sector/gia_sector.py | alkuhlani/gia | 9af9737cef7b0b947baa21f46c7be381c4fc9d98 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Ahmed Mohammed Alkuhlani and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, throw
from frappe.model.document import Document
class GIASector(Document):
def validate(self):
if no... | 28 | 63 | 0.772959 |
4a1e46a7f54e2a95801606c48bddb681c93163be | 8,726 | py | Python | gluon/storage.py | gitoni/web2py | 76cfba704716b2314c28ee8bcb5b09fca34163d8 | [
"BSD-3-Clause"
] | null | null | null | gluon/storage.py | gitoni/web2py | 76cfba704716b2314c28ee8bcb5b09fca34163d8 | [
"BSD-3-Clause"
] | null | null | null | gluon/storage.py | gitoni/web2py | 76cfba704716b2314c28ee8bcb5b09fca34163d8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
| This file is part of the web2py Web Framework
| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Provides:
- List; like list but returns None instead of IndexOutOfBounds
- Storage; like dictionary ... | 26.932099 | 125 | 0.54011 |
4a1e482706b0fe2f57851f6ade703b686afe5de9 | 1,456 | py | Python | sims/ac.py | joshua-hampton/phue-racing-flags | 4a4247fba591f120c8be74418c915d791855f757 | [
"MIT"
] | 50 | 2021-06-04T21:30:55.000Z | 2022-01-07T15:31:32.000Z | sims/ac.py | joshua-hampton/phue-racing-flags | 4a4247fba591f120c8be74418c915d791855f757 | [
"MIT"
] | 11 | 2021-06-05T07:40:53.000Z | 2022-02-16T08:37:41.000Z | sims/ac.py | joshua-hampton/phue-racing-flags | 4a4247fba591f120c8be74418c915d791855f757 | [
"MIT"
] | 3 | 2021-06-07T19:55:33.000Z | 2021-12-23T05:27:25.000Z | from ctypes import Structure, sizeof, c_float, c_wchar, c_int
import mmap
from enum import Enum
class SPageFileGraphic(Structure):
_fields_ = [
("packetId", c_int),
("AC_STATUS", c_int),
("AC_SESSION_TYPE", c_int),
("currentTime", c_wchar * 15),
("lastTime", c_wchar * 15),
... | 28.54902 | 75 | 0.584478 |
4a1e490f80b1432729bd1da24476ec9af71e1ac7 | 7,012 | py | Python | tests/integration/generate_fixtures/common.py | kseikyo/web3.py | 8bc987e8ec2089133fbaf870dd0daa71e7447584 | [
"MIT"
] | 2 | 2019-09-27T09:33:10.000Z | 2019-10-09T10:34:04.000Z | tests/integration/generate_fixtures/common.py | kseikyo/web3.py | 8bc987e8ec2089133fbaf870dd0daa71e7447584 | [
"MIT"
] | null | null | null | tests/integration/generate_fixtures/common.py | kseikyo/web3.py | 8bc987e8ec2089133fbaf870dd0daa71e7447584 | [
"MIT"
] | 2 | 2019-02-26T23:01:31.000Z | 2019-03-03T02:10:57.000Z | import contextlib
import os
import shutil
import signal
import socket
import subprocess
import tempfile
import time
from eth_utils import (
is_checksum_address,
to_text,
)
from web3.exceptions import (
TransactionNotFound,
)
COINBASE = '0xdc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd'
COINBASE_PK = '0x58d23b5... | 29.216667 | 522 | 0.642042 |
4a1e494b1e8cf4a5039ef6a43c0f89346ada670b | 22,339 | py | Python | detectron2/data/transforms/augmentation_impl.py | sourcery-ai-bot/detectron2 | fd0c5c59afbdc43f7005fb1a8c0c39ac5dc44039 | [
"Apache-2.0"
] | null | null | null | detectron2/data/transforms/augmentation_impl.py | sourcery-ai-bot/detectron2 | fd0c5c59afbdc43f7005fb1a8c0c39ac5dc44039 | [
"Apache-2.0"
] | null | null | null | detectron2/data/transforms/augmentation_impl.py | sourcery-ai-bot/detectron2 | fd0c5c59afbdc43f7005fb1a8c0c39ac5dc44039 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates.
"""
Implement many useful :class:`Augmentation`.
"""
import numpy as np
import sys
from typing import Tuple
from fvcore.transforms.transform import (
BlendTransform,
CropTransform,
HFlipTransform,
NoOpTransform,
PadTransform,... | 37.671164 | 101 | 0.613501 |
4a1e499539aa3c940c600a26cfdaa4668138ff20 | 3,695 | py | Python | jobs/pyspark_job_2.py | blnwrly/cdsw-training | ace71ece16bb9108ad38d426a5ab41955011f2c4 | [
"Apache-2.0"
] | null | null | null | jobs/pyspark_job_2.py | blnwrly/cdsw-training | ace71ece16bb9108ad38d426a5ab41955011f2c4 | [
"Apache-2.0"
] | null | null | null | jobs/pyspark_job_2.py | blnwrly/cdsw-training | ace71ece16bb9108ad38d426a5ab41955011f2c4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Cloudera, 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, s... | 24.966216 | 75 | 0.707442 |
4a1e4997c8f99c301b78532e6e6ac79f8e9dde27 | 5,480 | py | Python | twitterAuthorization/main.py | actlaboratory/twitter-authorization | aa78fd569576d6d81fbf1ace55ad0511e8498b56 | [
"MIT"
] | null | null | null | twitterAuthorization/main.py | actlaboratory/twitter-authorization | aa78fd569576d6d81fbf1ace55ad0511e8498b56 | [
"MIT"
] | null | null | null | twitterAuthorization/main.py | actlaboratory/twitter-authorization | aa78fd569576d6d81fbf1ace55ad0511e8498b56 | [
"MIT"
] | null | null | null | import threading
import wsgiref.util
from wsgiref.simple_server import make_server
import http.server
import socketserver
import socket
import tweepy
import urllib.parse
def server_bind(self):
"""Override server_bind to fix UnicodeDecodeError when computer name has non-ascii characters."""
socketserver.TCPServer.ser... | 30.444444 | 174 | 0.722628 |
4a1e4ae4db84af55f455ef3dadbda5811961549a | 5,607 | py | Python | pyatv/protocols/airplay/channels.py | Jacobs4/pyatv | 52956adf3b79198be52cc03649f3ddeee19f9e6c | [
"MIT"
] | 532 | 2017-02-01T19:23:28.000Z | 2022-03-29T09:57:39.000Z | pyatv/protocols/airplay/channels.py | Jacobs4/pyatv | 52956adf3b79198be52cc03649f3ddeee19f9e6c | [
"MIT"
] | 1,639 | 2017-02-01T19:22:04.000Z | 2022-03-31T17:26:40.000Z | pyatv/protocols/airplay/channels.py | bdraco/pyatv | 9541d21e6101c60866d832626be97bf962774cd5 | [
"MIT"
] | 102 | 2017-02-02T01:42:13.000Z | 2022-02-26T08:49:34.000Z | """Logic related to logical AirPlay channels.
This module only deals with AirPlay 2 related channels right now.
"""
from abc import ABC
import logging
import plistlib
from random import randrange
from typing import Optional
from pyatv.auth.hap_channel import AbstractHAPChannel
from pyatv.protocols.mrp import protobuf... | 35.487342 | 86 | 0.582665 |
4a1e4b99343e69f8139d521978ee690c9bc50c23 | 1,975 | py | Python | Python/memory.py | RALE0/TC1001S.100-202211 | 5b7f1868729ca092bb3ec347e7eaca40d02976cb | [
"MIT"
] | null | null | null | Python/memory.py | RALE0/TC1001S.100-202211 | 5b7f1868729ca092bb3ec347e7eaca40d02976cb | [
"MIT"
] | null | null | null | Python/memory.py | RALE0/TC1001S.100-202211 | 5b7f1868729ca092bb3ec347e7eaca40d02976cb | [
"MIT"
] | 1 | 2022-03-25T00:09:14.000Z | 2022-03-25T00:09:14.000Z | """Memory, puzzle game of number pairs.
Exercises:
1. Count and print how many taps occur.
2. Decrease the number of tiles to a 4x4 grid.
3. Detect when all tiles are revealed.
4. Center single-digit tile.
5. Use letters instead of tiles.
"""
from random import *
from turtle import *
from freegames import path
"""... | 19.949495 | 66 | 0.567089 |
4a1e4dfac54e64272a2e2d8d84e7f7381649cbf0 | 2,606 | py | Python | tests/cli/test_cli_ethpm_release.py | ETCCooperative/brownie | 72701c0810058c769412294d4d557af52c9d9932 | [
"MIT"
] | null | null | null | tests/cli/test_cli_ethpm_release.py | ETCCooperative/brownie | 72701c0810058c769412294d4d557af52c9d9932 | [
"MIT"
] | null | null | null | tests/cli/test_cli_ethpm_release.py | ETCCooperative/brownie | 72701c0810058c769412294d4d557af52c9d9932 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import json
import pytest
from brownie._cli import ethpm as cli_ethpm
from brownie.exceptions import UnknownAccount
from brownie.project import ethpm
ETHPM_CONFIG = {
"package_name": "testpackage",
"version": "1.0.0",
"settings": {"deployment_networks": False, "include_dependencies": ... | 32.987342 | 99 | 0.734459 |
4a1e4e32758d82fc47be67fa4fded8b1d2e59097 | 49,837 | py | Python | src/BiG-MAP.analyse.py | medema-group/BiG-MAP | 5a11f63e9484c25e254ccfd2dc96cbbf79f0f9e0 | [
"MIT"
] | 12 | 2020-05-06T14:42:08.000Z | 2022-02-18T15:19:16.000Z | src/BiG-MAP.analyse.py | medema-group/BiG-MAP | 5a11f63e9484c25e254ccfd2dc96cbbf79f0f9e0 | [
"MIT"
] | 13 | 2020-11-02T15:47:51.000Z | 2022-02-06T12:10:03.000Z | src/BiG-MAP.analyse.py | medema-group/BiG-MAP | 5a11f63e9484c25e254ccfd2dc96cbbf79f0f9e0 | [
"MIT"
] | 5 | 2020-03-03T14:33:27.000Z | 2021-09-29T10:22:04.000Z | #!/usr/bin/env python3
"""
--------------- Analyse module ---------------
Authors: Hannah Augustijn, Koen van den Berg, Victoria Pascal Andreu
University: Wageningen University and Research
Department: Department of Bioinformatics
Date: 09/03/2020
----------------------------------------------
This script performs a s... | 42.021079 | 107 | 0.61051 |
4a1e4e6652844572d646069d018da79840be98ab | 20,320 | py | Python | test/functional/test_framework/test_framework.py | aravinth-elangovan/likemeshare | fe97a92a3516c63f3feddad2b9462362a3178f16 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_framework.py | aravinth-elangovan/likemeshare | fe97a92a3516c63f3feddad2b9462362a3178f16 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_framework.py | aravinth-elangovan/likemeshare | fe97a92a3516c63f3feddad2b9462362a3178f16 | [
"MIT"
] | 1 | 2021-03-02T12:51:18.000Z | 2021-03-02T12:51:18.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
from collections import deque
from enum import Enum
import logging
impo... | 42.157676 | 310 | 0.617569 |
4a1e4ea245c9e51a35ab7f088a0150366bf5f840 | 2,849 | py | Python | grr/core/grr_response_core/lib/parsers/osx_launchd.py | khanhgithead/grr | 8ad8a4d2c5a93c92729206b7771af19d92d4f915 | [
"Apache-2.0"
] | 4,238 | 2015-01-01T15:34:50.000Z | 2022-03-31T08:18:05.000Z | grr/core/grr_response_core/lib/parsers/osx_launchd.py | khanhgithead/grr | 8ad8a4d2c5a93c92729206b7771af19d92d4f915 | [
"Apache-2.0"
] | 787 | 2015-01-02T21:34:24.000Z | 2022-03-02T13:26:38.000Z | grr/core/grr_response_core/lib/parsers/osx_launchd.py | khanhgithead/grr | 8ad8a4d2c5a93c92729206b7771af19d92d4f915 | [
"Apache-2.0"
] | 856 | 2015-01-02T02:50:11.000Z | 2022-03-31T11:11:53.000Z | #!/usr/bin/env python
# Copyright 2012 Google Inc. All Rights Reserved.
"""Parser for OSX launchd jobs."""
import re
from typing import Iterator
from grr_response_core.lib import parsers
from grr_response_core.lib import rdfvalue
from grr_response_core.lib.rdfvalues import client as rdf_client
from grr_response_cor... | 31.655556 | 80 | 0.726571 |
4a1e4f1063e437dcb47dac87415467184385880d | 409 | bzl | Python | bazel/ray.bzl | FieldMrFive/ray | a22d6ef95594a3b95fac5b2eb17f7f21be2888e8 | [
"Apache-2.0"
] | 3 | 2019-05-01T04:31:20.000Z | 2021-03-01T09:25:36.000Z | bazel/ray.bzl | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | 2 | 2019-01-28T00:31:25.000Z | 2019-11-26T16:57:06.000Z | bazel/ray.bzl | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | 2 | 2020-03-26T16:32:08.000Z | 2021-02-05T17:04:11.000Z | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_library_public")
def flatbuffer_py_library(name, srcs, outs, out_prefix, includes = [], include_paths = []):
flatbuffer_library_public(
name = name,
srcs = srcs,
outs = outs,
language_flag = "-p",
out_prefix... | 31.461538 | 91 | 0.643032 |
4a1e4f489d4286312d9f8c34644e531a8a6981a9 | 2,237 | py | Python | os_ken/tests/unit/cmd/test_manager.py | rolaya/os-ken | 10009e41539c737c7c423f13e4f5bc5f46d219ff | [
"Apache-2.0"
] | 1 | 2019-04-24T04:01:07.000Z | 2019-04-24T04:01:07.000Z | os_ken/tests/unit/cmd/test_manager.py | anlaneg/os-ken | 379a7694c3129cc0156343af71f4fca8830d9de5 | [
"Apache-2.0"
] | null | null | null | os_ken/tests/unit/cmd/test_manager.py | anlaneg/os-ken | 379a7694c3129cc0156343af71f4fca8830d9de5 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2013,2014 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2013,2014 YAMAMOTO Takashi <yamamoto at valinux co jp>
#
# 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
#
... | 28.679487 | 77 | 0.664283 |
4a1e4f530d76885c544a70687c8b26c8ff21048d | 5,058 | py | Python | EXP/dir_645_rce.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2019-05-19T11:54:26.000Z | 2019-05-19T12:03:49.000Z | EXP/dir_645_rce.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 1 | 2020-11-27T07:55:15.000Z | 2020-11-27T07:55:15.000Z | EXP/dir_645_rce.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2021-09-06T18:06:12.000Z | 2021-12-31T07:44:43.000Z | #coding: utf-8
'''
@Test list:
DIR 645 A1 1.01
DIR 815 1.01
'''
import string
import random
import datetime
import struct
from routelib import *
from exp_template import *
class dir_645_rce(Exploit):
def __init__(self, url, taskid=0, targetid=0, cmd_connect='', data_redirect='', dns_server='', proxies={}):
... | 35.619718 | 148 | 0.580071 |
4a1e500d72f09c964cd9388bb3ea947106d64d3c | 739 | py | Python | tools/paconn-cli/paconn/completer.py | amoedo/PowerPlatformConnectors | dbf436b3a2cc02a4231b60b232a696e734d81c55 | [
"MIT"
] | 454 | 2019-05-07T17:58:24.000Z | 2022-03-31T23:20:04.000Z | tools/paconn-cli/paconn/completer.py | amoedo/PowerPlatformConnectors | dbf436b3a2cc02a4231b60b232a696e734d81c55 | [
"MIT"
] | 830 | 2019-05-11T10:32:44.000Z | 2022-03-31T18:23:42.000Z | tools/paconn-cli/paconn/completer.py | amoedo/PowerPlatformConnectors | dbf436b3a2cc02a4231b60b232a696e734d81c55 | [
"MIT"
] | 753 | 2019-05-11T09:49:56.000Z | 2022-03-31T15:53:52.000Z | # -----------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
""... | 29.56 | 79 | 0.525034 |
4a1e55336c7da63d00b8583a50dfebd634cf3238 | 2,390 | py | Python | lerp_finger_from_serial.py | LittleNyanCat/pygloves | d5881bf3eaf90a185243abe3e366005066c656cd | [
"MIT"
] | 2 | 2021-12-30T18:30:56.000Z | 2022-03-09T10:48:57.000Z | lerp_finger_from_serial.py | LittleNyanCat/pygloves | d5881bf3eaf90a185243abe3e366005066c656cd | [
"MIT"
] | null | null | null | lerp_finger_from_serial.py | LittleNyanCat/pygloves | d5881bf3eaf90a185243abe3e366005066c656cd | [
"MIT"
] | 1 | 2022-03-26T13:46:54.000Z | 2022-03-26T13:46:54.000Z | import multiprocessing
import re
import serial
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import animation
import bone
import serial_utils as s
# Use device manager to find the Arduino's serial port.
COM_PORT = "COM4"
MAX_SERIAL_VALUE = 4095 #maximum expected value coming from serial. set to 1... | 27.471264 | 124 | 0.707531 |
4a1e56c1f83b33a761fc2ea39cf6735e926d2346 | 8,962 | py | Python | couchbase/transcoder.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 189 | 2015-01-07T18:34:31.000Z | 2022-03-21T17:41:56.000Z | couchbase/transcoder.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 24 | 2015-05-19T14:00:16.000Z | 2022-03-16T22:01:30.000Z | couchbase/transcoder.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 60 | 2015-03-10T22:12:50.000Z | 2022-03-07T21:57:40.000Z | import json
import pickle
from typing import Any, Tuple, Union
from abc import ABC, abstractmethod
from couchbase.exceptions import ValueFormatException
from couchbase_core._libcouchbase import (Transcoder, FMT_JSON,
FMT_BYTES, FMT_UTF8, FMT_PICKLE,
... | 33.818868 | 89 | 0.564048 |
4a1e575e18ccd76104a0fbd3f3120e8d4a2705b7 | 6,039 | py | Python | mlx/od/archive/fastai/train.py | lewfish/mlx | 027decf72bf9d96de3b4de13dcac7b352b07fd63 | [
"Apache-2.0"
] | null | null | null | mlx/od/archive/fastai/train.py | lewfish/mlx | 027decf72bf9d96de3b4de13dcac7b352b07fd63 | [
"Apache-2.0"
] | null | null | null | mlx/od/archive/fastai/train.py | lewfish/mlx | 027decf72bf9d96de3b4de13dcac7b352b07fd63 | [
"Apache-2.0"
] | null | null | null | import json
import uuid
from os.path import join, isdir, dirname
import shutil
import tempfile
import os
import numpy as np
import click
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import fastai
from fastai.vision import (
get_annotations, ObjectItemList, get_transforms,
bb_pad_coll... | 37.04908 | 94 | 0.688028 |
4a1e57a062b4bb92b933636cacd35d81e6f8a6a3 | 4,171 | py | Python | airflow/utils/cli.py | abhishek-ch/incubator-airflow | 3358551c8e73d9019900f7a85f18ebfd88591450 | [
"Apache-2.0"
] | 4 | 2015-11-12T10:58:54.000Z | 2017-08-05T06:41:36.000Z | airflow/utils/cli.py | abhishek-ch/incubator-airflow | 3358551c8e73d9019900f7a85f18ebfd88591450 | [
"Apache-2.0"
] | 9 | 2016-01-14T18:06:48.000Z | 2018-10-02T16:32:51.000Z | airflow/utils/cli.py | abhishek-ch/incubator-airflow | 3358551c8e73d9019900f7a85f18ebfd88591450 | [
"Apache-2.0"
] | 2 | 2015-12-14T11:38:49.000Z | 2018-03-26T15:03:07.000Z | # -*- coding: utf-8 -*-
#
# 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
#... | 34.758333 | 85 | 0.686166 |
4a1e58c1c0de2e7ffa5b90d81b1ff5ff32677e8e | 7,968 | py | Python | models.py | Sriram-Ravula/CLIP_Decoder | 33e07cee1fa1cc41395b8cd027b8e24222ef59e3 | [
"MIT"
] | 2 | 2021-06-04T17:39:46.000Z | 2022-03-26T02:55:01.000Z | models.py | Sriram-Ravula/CLIP_Decoder | 33e07cee1fa1cc41395b8cd027b8e24222ef59e3 | [
"MIT"
] | null | null | null | models.py | Sriram-Ravula/CLIP_Decoder | 33e07cee1fa1cc41395b8cd027b8e24222ef59e3 | [
"MIT"
] | null | null | null | import torch.nn as nn
from non_local import NLBlockND
class Generator(nn.Module):
def __init__(self, ngf, nz, nc = 3):
super(Generator, self).__init__()
self.ngf = ngf
self.nz = nz
self.nc = nc
first_chans = nz // 49 + 1 #The number of channels to reshape t... | 32.92562 | 102 | 0.507781 |
4a1e58c998353f10f30995d425a978cd90b2eea7 | 1,787 | py | Python | src/gateau_api/routers/admin_authed.py | k2bd/gateau-api | b7fb1db8a9b6346b3ee7ebf4500d923996990e8b | [
"MIT"
] | null | null | null | src/gateau_api/routers/admin_authed.py | k2bd/gateau-api | b7fb1db8a9b6346b3ee7ebf4500d923996990e8b | [
"MIT"
] | 12 | 2022-02-03T20:36:05.000Z | 2022-03-27T11:29:06.000Z | src/gateau_api/routers/admin_authed.py | k2bd/gateau-api | b7fb1db8a9b6346b3ee7ebf4500d923996990e8b | [
"MIT"
] | null | null | null | """
Routes that you need to be logged in to use
"""
import logging
from typing import List
from fastapi import APIRouter, Depends
from firebase_admin import auth
from gateau_api.dependencies import get_user_uid
from gateau_api.dependencies.service import get_service
from gateau_api.dependencies.user import require_a... | 24.819444 | 69 | 0.705652 |
4a1e59700d52c988a0846ccb63714f3e5423a759 | 903 | py | Python | ex19_1.py | DexHunter/Think-Python-book-exercise-solutions | d0abae261eda1dca99043e17e8a1e614caad2140 | [
"CC-BY-4.0"
] | 24 | 2019-05-07T15:11:28.000Z | 2022-03-02T04:50:28.000Z | ex19_1.py | Dekzu/Think-Python-book-exercise-solutions | d0abae261eda1dca99043e17e8a1e614caad2140 | [
"CC-BY-4.0"
] | null | null | null | ex19_1.py | Dekzu/Think-Python-book-exercise-solutions | d0abae261eda1dca99043e17e8a1e614caad2140 | [
"CC-BY-4.0"
] | 19 | 2019-08-05T20:59:04.000Z | 2022-03-07T05:13:32.000Z | def binomial_coeff(n, k):
'''Compute the binomial coefficient
n: number of trials
k: number of successes
returns: int
'''
if k==0:
return 1
if n==0:
return 0
res = binomial_coeff(n-1, k) + binomial_coeff(n-1, k-1)
return res
def b(n,k):
'''rewrite the function in a compact way
I failed to rewr... | 18.8125 | 56 | 0.545958 |
4a1e5a8405cd4fbe2e12131fc49aba8a2f400c23 | 12,973 | py | Python | grr/client/grr_response_client/client_utils_windows.py | nickamon/grr | ad1936c74728de00db90f6fafa47892b54cfc92d | [
"Apache-2.0"
] | null | null | null | grr/client/grr_response_client/client_utils_windows.py | nickamon/grr | ad1936c74728de00db90f6fafa47892b54cfc92d | [
"Apache-2.0"
] | 1 | 2018-05-08T21:15:51.000Z | 2018-05-08T21:15:51.000Z | grr/client/grr_response_client/client_utils_windows.py | nickamon/grr | ad1936c74728de00db90f6fafa47892b54cfc92d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Windows specific utils."""
import ctypes
import exceptions
import logging
import os
import re
import time
import _winreg
import ntsecuritycon
import pywintypes
import win32api
import win32file
import win32security
from google.protobuf import message
from grr import config
from grr_response_c... | 29.152809 | 80 | 0.663147 |
4a1e5b812ffc515ba7602fa347e67023898a6a25 | 12,269 | py | Python | merge_vcf_files.py | martynaut/mirnome-mutations | 2bcee735a3620a0ae6fc91a57500f19b8851ff60 | [
"MIT"
] | null | null | null | merge_vcf_files.py | martynaut/mirnome-mutations | 2bcee735a3620a0ae6fc91a57500f19b8851ff60 | [
"MIT"
] | 1 | 2021-09-10T12:07:49.000Z | 2021-09-24T07:04:02.000Z | merge_vcf_files.py | martynaut/mirnome-mutations | 2bcee735a3620a0ae6fc91a57500f19b8851ff60 | [
"MIT"
] | null | null | null | import click
import gzip
import pandas as pd
import os
import shutil
from prepare_vcf_files_helpers import update_dict_with_file, change_format, change_info
pd.options.mode.chained_assignment = None
def make_unique_files(input_folder, output_folder, copy_input):
if not os.path.exists(output_folder):
os... | 54.048458 | 118 | 0.482109 |
4a1e5bcca3f2c77d50129d61870bb330f4ce996a | 1,319 | py | Python | tdl/migrations/0004_auto_20181214_0633.py | chrstsrs/ToDoList | 8e13c5a8f6cabad0cf3f715ba9134dd82a46cc3e | [
"MIT"
] | 1 | 2019-01-18T07:47:04.000Z | 2019-01-18T07:47:04.000Z | tdl/migrations/0004_auto_20181214_0633.py | chrstsrs/ToDoList | 8e13c5a8f6cabad0cf3f715ba9134dd82a46cc3e | [
"MIT"
] | 6 | 2020-02-11T23:33:32.000Z | 2022-03-11T23:38:01.000Z | tdl/migrations/0004_auto_20181214_0633.py | chrstsrs/todolist | 8e13c5a8f6cabad0cf3f715ba9134dd82a46cc3e | [
"MIT"
] | null | null | null | # Generated by Django 2.1.2 on 2018-12-14 06:33
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('tdl', '0003_a... | 37.685714 | 153 | 0.621683 |
4a1e5c6ee93184e15a30a113dee8b425f896e8bf | 460 | py | Python | bikes/bikes.py | sethmenghi/cosc288-machine-learning | 4f17a3fe7229ded4c0fc42e9ee3595e6a07f26eb | [
"0BSD"
] | null | null | null | bikes/bikes.py | sethmenghi/cosc288-machine-learning | 4f17a3fe7229ded4c0fc42e9ee3595e6a07f26eb | [
"0BSD"
] | null | null | null | bikes/bikes.py | sethmenghi/cosc288-machine-learning | 4f17a3fe7229ded4c0fc42e9ee3595e6a07f26eb | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Name: Seth menghi
# E-mail Address: swm36@georgetown.edu
# Platform: MacOS
# Language/Environment: python
#
# In accordance with the class policies and Georgetown's Honor Code,
# I certify that, with the exceptions of the class resources and those
# items noted below, I have neither given no... | 25.555556 | 70 | 0.741304 |
4a1e5cee3eceb4983d254273b0dd51c5133a7099 | 4,046 | py | Python | netmiko/vyos/vyos_ssh.py | AAm-kun/netmiko | 1c5d2e4c345778ee46e5e487f62c66d02f297625 | [
"MIT"
] | null | null | null | netmiko/vyos/vyos_ssh.py | AAm-kun/netmiko | 1c5d2e4c345778ee46e5e487f62c66d02f297625 | [
"MIT"
] | null | null | null | netmiko/vyos/vyos_ssh.py | AAm-kun/netmiko | 1c5d2e4c345778ee46e5e487f62c66d02f297625 | [
"MIT"
] | null | null | null | from typing import Optional
import time
import warnings
from netmiko.no_enable import NoEnable
from netmiko.base_connection import DELAY_FACTOR_DEPR_SIMPLE_MSG
from netmiko.cisco_base_connection import CiscoSSHConnection
class VyOSSSH(NoEnable, CiscoSSHConnection):
"""Implement methods for interacting with VyOS n... | 35.182609 | 98 | 0.640386 |
4a1e5edddb7b8d4c19426221dbf55bbdcaa6d341 | 8,995 | py | Python | test/images/spot_info.py | sbutler/spotseeker_server | 02bd2d646eab9f26ddbe8536b30e391359796c9c | [
"Apache-2.0"
] | null | null | null | test/images/spot_info.py | sbutler/spotseeker_server | 02bd2d646eab9f26ddbe8536b30e391359796c9c | [
"Apache-2.0"
] | null | null | null | test/images/spot_info.py | sbutler/spotseeker_server | 02bd2d646eab9f26ddbe8536b30e391359796c9c | [
"Apache-2.0"
] | null | null | null | """ Copyright 2012, 2013 UW Information Technology, University of Washington
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 r... | 55.184049 | 138 | 0.620678 |
4a1e5fa2efe368abaf7fb13c3717a6508d3b391b | 8,441 | py | Python | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/staging/models/rough/nmt/utils/iterator_utils_test.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-07T18:52:33.000Z | 2019-07-06T12:48:18.000Z | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/staging/models/rough/nmt/utils/iterator_utils_test.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 12 | 2018-12-13T18:04:36.000Z | 2019-06-14T20:49:33.000Z | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/staging/models/rough/nmt/utils/iterator_utils_test.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-09T21:04:52.000Z | 2019-06-24T07:40:28.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 35.766949 | 80 | 0.610473 |
4a1e5fd75e599e33491447311f40163454632598 | 258 | py | Python | myia/lib.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 222 | 2019-02-13T07:56:28.000Z | 2022-03-28T07:07:54.000Z | myia/lib.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 107 | 2019-02-12T21:56:39.000Z | 2022-03-12T01:08:03.000Z | myia/lib.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 27 | 2017-11-14T17:58:15.000Z | 2019-01-14T01:36:09.000Z | """Consolidate all Myia functions in a single module."""
from .abstract import *
from .classes import *
from .grad import *
from .hypermap import *
from .info import *
from .ir import *
from .operations import *
from .pipeline import *
from .utils import *
| 21.5 | 56 | 0.728682 |
4a1e5fe6d5ba1a68b80ac7ab82b269878a45be20 | 11,894 | py | Python | PaddleCV/face_detection/reader.py | suytingwan/models | ccdbfe77d071cc19b55fb9f4b738912e35d982ef | [
"Apache-2.0"
] | 5 | 2021-09-28T13:28:01.000Z | 2021-12-21T07:25:44.000Z | PaddleCV/face_detection/reader.py | suytingwan/models | ccdbfe77d071cc19b55fb9f4b738912e35d982ef | [
"Apache-2.0"
] | 1 | 2019-11-18T03:03:37.000Z | 2019-11-18T03:03:37.000Z | PaddleCV/face_detection/reader.py | suytingwan/models | ccdbfe77d071cc19b55fb9f4b738912e35d982ef | [
"Apache-2.0"
] | 4 | 2021-08-11T08:25:10.000Z | 2021-10-16T07:41:59.000Z | # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 35.085546 | 79 | 0.552211 |
4a1e61b58e1cc25fec37e8b55deca9375084b422 | 1,299 | py | Python | solving/lists/clouds/clouds.py | williamlagos/chess | 7470479e352bf6fa28215e745af8c42dc20d7a1f | [
"MIT"
] | null | null | null | solving/lists/clouds/clouds.py | williamlagos/chess | 7470479e352bf6fa28215e745af8c42dc20d7a1f | [
"MIT"
] | 4 | 2020-04-23T23:17:54.000Z | 2021-07-06T17:44:45.000Z | solving/lists/clouds/clouds.py | williamlagos/chess | 7470479e352bf6fa28215e745af8c42dc20d7a1f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import math
import os
import random
import re
import sys
# Complete the jumpingOnClouds function below.
def jumpingOnClouds(c):
jumps = 0
# Constraints check
clouds_quantity = len(c)
if clouds_quantity < 2 or clouds_quantity > 100:
return jumps
if c[0] == 0 and c[-1... | 23.196429 | 58 | 0.555812 |
4a1e62d375f8e57f33e2d021881a807aa2b7a7ba | 2,851 | py | Python | manage_app/consumers.py | radekska/django-network-controller | 6bcb847cbe1efa7dee118974de5e49b4f411e5da | [
"MIT"
] | null | null | null | manage_app/consumers.py | radekska/django-network-controller | 6bcb847cbe1efa7dee118974de5e49b4f411e5da | [
"MIT"
] | null | null | null | manage_app/consumers.py | radekska/django-network-controller | 6bcb847cbe1efa7dee118974de5e49b4f411e5da | [
"MIT"
] | null | null | null | import json
import logging
import asyncio
from django.contrib.auth.models import User
from asgiref.sync import sync_to_async
from channels.consumer import AsyncConsumer
from manage_app.backend.ConnectionHandler import SSHConnectionHandler
from config_app.models import ConfigParameters
from manage_app.models import ... | 37.513158 | 144 | 0.69765 |
4a1e63488537d4a13902eef2374eae9a66ed55ce | 59,334 | py | Python | tests/test_process.py | davidszotten/coveragepy | c09c2c203286db3cae1148bd02b1db9a9d524af1 | [
"Apache-2.0"
] | null | null | null | tests/test_process.py | davidszotten/coveragepy | c09c2c203286db3cae1148bd02b1db9a9d524af1 | [
"Apache-2.0"
] | null | null | null | tests/test_process.py | davidszotten/coveragepy | c09c2c203286db3cae1148bd02b1db9a9d524af1 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""Tests for process behavior of coverage.py."""
import distutils.sysconfig
import glob
import os
import os.path
import re
import sys
import textwr... | 37.246704 | 100 | 0.595072 |
4a1e635c0d5b4f0916f074d0d7c878c7dea7b5b7 | 18,648 | py | Python | qa/rpc-tests/wallet.py | GamingMad101/dogecoin | 768718dabadf9a9d9b1e178531f8c5f83fdca73c | [
"MIT"
] | 1 | 2021-02-13T21:59:46.000Z | 2021-02-13T21:59:46.000Z | qa/rpc-tests/wallet.py | GamingMad101/dogecoin | 768718dabadf9a9d9b1e178531f8c5f83fdca73c | [
"MIT"
] | null | null | null | qa/rpc-tests/wallet.py | GamingMad101/dogecoin | 768718dabadf9a9d9b1e178531f8c5f83fdca73c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin 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 BitcoinTestFramework
from test_framework.util import *
class ... | 46.044444 | 181 | 0.643018 |
4a1e638e35ad1773516ea44bd40d7edc98cee85f | 2,509 | py | Python | src/javaproperties_cli/tojson.py | jwodder/javaproperties-cli | e1bbe04bbb961bf0832a591bdb8edc6f240cc950 | [
"MIT"
] | 4 | 2017-04-27T02:11:05.000Z | 2021-12-14T14:53:30.000Z | src/javaproperties_cli/tojson.py | jwodder/javaproperties-cli | e1bbe04bbb961bf0832a591bdb8edc6f240cc950 | [
"MIT"
] | null | null | null | src/javaproperties_cli/tojson.py | jwodder/javaproperties-cli | e1bbe04bbb961bf0832a591bdb8edc6f240cc950 | [
"MIT"
] | 2 | 2017-06-11T02:13:53.000Z | 2019-02-07T22:15:54.000Z | """
.. program:: properties2json
:program:`properties2json`
--------------------------
NAME
^^^^
:program:`properties2json` — Convert a Java ``.properties`` file to JSON
SYNOPSIS
^^^^^^^^
.. code-block:: shell
properties2json [<OPTIONS>] [<infile> [<outfile>]]
DESCRIPTION
^^^^^^^^^^^
Convert a ``.properties... | 25.09 | 86 | 0.648466 |
4a1e647e258314f5f330905773490873897de808 | 3,979 | py | Python | uboone/run_uboone.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | uboone/run_uboone.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | uboone/run_uboone.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | import os,sys,time
#os.environ['PYOPENCL_CTX']='0:0'
#os.environ['PYOPENCL_COMPILER_OUTPUT'] = '0'
#os.environ['CUDA_PROFILE'] = '1'
import chroma.api as api
#api.use_opencl()
api.use_cuda()
import numpy as np
try:
from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph as pg
import pyqtgraph.opengl as gl
... | 33.720339 | 147 | 0.636341 |
4a1e64e42e8bbba554876e2ae0e49f0347fc0328 | 278 | py | Python | desafios/desafio38.py | ravisousag/python2 | 36ec19b40aba543764285caf2de02893a528d4d2 | [
"MIT"
] | null | null | null | desafios/desafio38.py | ravisousag/python2 | 36ec19b40aba543764285caf2de02893a528d4d2 | [
"MIT"
] | null | null | null | desafios/desafio38.py | ravisousag/python2 | 36ec19b40aba543764285caf2de02893a528d4d2 | [
"MIT"
] | null | null | null | a = int(input('Insira primeiro número: '))
b = int(input('Insira segundo número: '))
if a>b:
print('O número A({}) é maior que o número B({})'.format(a,b))
elif b>a:
print('O número B({}) é maior que o número A({})'.format(b,a))
else:
print('Os números são iguais') | 30.888889 | 66 | 0.611511 |
4a1e6581577d9051981961daae7265c54974a413 | 3,304 | py | Python | Classifier/MSE_COS_accuracy.py | climate-ai/truebranch | 79345260540b250f6a0f99103df98cf45df2caff | [
"MIT"
] | 2 | 2020-06-30T02:56:17.000Z | 2020-11-09T16:32:41.000Z | Classifier/MSE_COS_accuracy.py | climate-ai/truebranch | 79345260540b250f6a0f99103df98cf45df2caff | [
"MIT"
] | 6 | 2021-02-02T22:59:46.000Z | 2022-03-12T00:46:53.000Z | Classifier/MSE_COS_accuracy.py | climate-ai/truebranch | 79345260540b250f6a0f99103df98cf45df2caff | [
"MIT"
] | null | null | null | #import modules
from torchvision import datasets, transforms
import numpy as np
import scipy
from sklearn import metrics
val_transform = transforms.Compose([transforms.Resize(224),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.... | 37.977011 | 113 | 0.665254 |
4a1e662a4706bf0e0ff99f55d0cceb49f507f6cf | 676 | py | Python | 3_advanced/chapter17/solutions/compute_similarity.py | code4tomorrow/Python | 035b6f5d8fd635a16caaff78bcd3f582663dadc3 | [
"MIT"
] | 4 | 2021-03-01T00:32:45.000Z | 2021-05-21T22:01:52.000Z | 3_advanced/chapter17/solutions/compute_similarity.py | code4tomorrow/Python | 035b6f5d8fd635a16caaff78bcd3f582663dadc3 | [
"MIT"
] | 29 | 2020-09-12T22:56:04.000Z | 2021-09-25T17:08:42.000Z | 3_advanced/chapter17/solutions/compute_similarity.py | code4tomorrow/Python | 035b6f5d8fd635a16caaff78bcd3f582663dadc3 | [
"MIT"
] | 7 | 2021-02-25T01:50:55.000Z | 2022-02-28T00:00:42.000Z | # Given two sets of integers A and B (each element in these sets are
# between 1 and 1000 inclusive), find the similarity of the two sets
# (the sets are guaranteed to be nonempty). The similarity is a number
# which is computed by dividing the size of the intersection of the
# two sets by their union size.
# Note: the... | 35.578947 | 76 | 0.713018 |
4a1e680fb36f88a118527f72e6d01b3e3fb11a6f | 9,794 | py | Python | userbot/modules/system_stats.py | huhugh221/ProjectFizilionFork | 9af2d6219b5e4a461f465964f38c3062b38c3a01 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2021-08-24T15:48:13.000Z | 2021-09-20T23:20:07.000Z | userbot/modules/system_stats.py | Pewdeadcake/ProjectFizilionFork | 5599e6797781a96df37f302520bb3c5571bd54e0 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/system_stats.py | Pewdeadcake/ProjectFizilionFork | 5599e6797781a96df37f302520bb3c5571bd54e0 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 18 | 2021-07-03T15:12:28.000Z | 2021-08-13T07:27:24.000Z | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
""" Userbot module for getting information about the server. """
import platform
import shutil
import sys
import os
im... | 35.357401 | 227 | 0.579743 |
4a1e69ae6e725f280320173c69ef8334b2385a95 | 4,272 | py | Python | ferrox/controllers/news.py | hsuaz/ferrox | ac89b698e6c12c57c7a3128b6a25a3dc100bfc15 | [
"MIT"
] | 3 | 2017-01-03T20:55:16.000Z | 2022-03-01T15:21:53.000Z | ferrox/controllers/news.py | hsuaz/ferrox | ac89b698e6c12c57c7a3128b6a25a3dc100bfc15 | [
"MIT"
] | null | null | null | ferrox/controllers/news.py | hsuaz/ferrox | ac89b698e6c12c57c7a3128b6a25a3dc100bfc15 | [
"MIT"
] | 4 | 2017-01-03T20:48:09.000Z | 2022-03-01T15:21:58.000Z | from ferrox.lib.base import *
from ferrox.lib.formgen import FormGenerator
from ferrox.model import form
import formencode
import logging
import sqlalchemy
log = logging.getLogger(__name__)
class NewsController(BaseController):
def index(self):
"""Paged list of all news."""
page_link_var = 'p'
... | 36.512821 | 135 | 0.593165 |
4a1e69bc25964f24b4d397ecc265e017b6cfec0c | 404 | py | Python | versionSystem/wsgi.py | kasper190/versionSystem | d5f1df4c226e604c1cecb01ef1c2fa2673934c9c | [
"MIT"
] | null | null | null | versionSystem/wsgi.py | kasper190/versionSystem | d5f1df4c226e604c1cecb01ef1c2fa2673934c9c | [
"MIT"
] | null | null | null | versionSystem/wsgi.py | kasper190/versionSystem | d5f1df4c226e604c1cecb01ef1c2fa2673934c9c | [
"MIT"
] | null | null | null | """
WSGI config for versionSystem 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/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANG... | 23.764706 | 78 | 0.792079 |
4a1e6e092db1bc844b45ddf8390e5b4ac89f4867 | 3,271 | py | Python | yhsite/yhsite/settings.py | yuheng19981212/python-Django-mysite-study | ba1c747d84f5ae926f564f890524ca499c9f988b | [
"MIT"
] | null | null | null | yhsite/yhsite/settings.py | yuheng19981212/python-Django-mysite-study | ba1c747d84f5ae926f564f890524ca499c9f988b | [
"MIT"
] | null | null | null | yhsite/yhsite/settings.py | yuheng19981212/python-Django-mysite-study | ba1c747d84f5ae926f564f890524ca499c9f988b | [
"MIT"
] | null | null | null | """
Django settings for yhsite project.
Generated by 'django-admin startproject' using Django 3.0.
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 os
# Bu... | 26.811475 | 91 | 0.697952 |
4a1e6f4b812fd2e84e0875d65fcf8e460f752fa2 | 877 | py | Python | test/functional/create_cache.py | Deimoscoin/deimos | c03a65c72ffe6fadb840bc87e6fd6b4e012def08 | [
"MIT"
] | null | null | null | test/functional/create_cache.py | Deimoscoin/deimos | c03a65c72ffe6fadb840bc87e6fd6b4e012def08 | [
"MIT"
] | null | null | null | test/functional/create_cache.py | Deimoscoin/deimos | c03a65c72ffe6fadb840bc87e6fd6b4e012def08 | [
"MIT"
] | 1 | 2018-06-12T00:50:01.000Z | 2018-06-12T00:50:01.000Z | #!/usr/bin/env python3
# Copyright (c) 2009-2019 The Bitcoin Core developers
# Copyright (c) 2014-2019 The DeimOS Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Create a blockchain cache.
Creating a cache of th... | 29.233333 | 86 | 0.743444 |
4a1e7032170e3b0812a444de4232bb975f765aec | 1,110 | py | Python | key_store/tests/test_helpers.py | rimaddo/key-store | 7003c8425ea3139c2ddb47414a0a5be51aa5cde9 | [
"MIT"
] | null | null | null | key_store/tests/test_helpers.py | rimaddo/key-store | 7003c8425ea3139c2ddb47414a0a5be51aa5cde9 | [
"MIT"
] | null | null | null | key_store/tests/test_helpers.py | rimaddo/key-store | 7003c8425ea3139c2ddb47414a0a5be51aa5cde9 | [
"MIT"
] | null | null | null | from collections import namedtuple
from typing import List, Type
import pytest
from key_store.helpers import T, get_keys
from key_store.tests.conftest import EXAMPLE_DICT_1, EXAMPLE_OBJ_1, ExampleObj
class ClassicClass(object):
def __init__(self, name: str, value: int) -> None:
self.name = name
... | 25.813953 | 88 | 0.665766 |
4a1e704650ee69833173030caa929f7affddb82f | 435 | py | Python | utils/gen.py | Ko-oK-OS/Rix | f2949aadfff23a27da9c771282a4c0d8804a1f65 | [
"MIT"
] | 44 | 2021-03-20T02:14:58.000Z | 2022-03-31T03:40:52.000Z | utils/gen.py | Ko-oK-OS/Rix | f2949aadfff23a27da9c771282a4c0d8804a1f65 | [
"MIT"
] | 10 | 2021-05-28T17:00:00.000Z | 2022-02-06T03:14:50.000Z | utils/gen.py | Ko-oK-OS/Rix | f2949aadfff23a27da9c771282a4c0d8804a1f65 | [
"MIT"
] | 4 | 2021-04-28T08:43:35.000Z | 2022-03-18T01:34:28.000Z | import os
import shutil
output_dir = "../bin/"
bin_dir = "../user/target/riscv64gc-unknown-none-elf/debug/"
user_programes = [
"init",
"hello_world",
"sh"
]
for (root, dirs, files) in os.walk(bin_dir):
for f in files:
if f in user_programes:
shutil.copy(src = bin_dir + f, dst = ou... | 22.894737 | 82 | 0.588506 |
4a1e70d147363004a038345bac41ef92ae04c01c | 1,118 | py | Python | sendsms.py | belelaritra/W-ambulance | ecda7e7789143e4b72b1393a15a035f33cf85474 | [
"MIT"
] | 4 | 2021-09-03T07:30:29.000Z | 2021-12-10T10:54:57.000Z | sendsms.py | belelaritra/W-ambulance | ecda7e7789143e4b72b1393a15a035f33cf85474 | [
"MIT"
] | null | null | null | sendsms.py | belelaritra/W-ambulance | ecda7e7789143e4b72b1393a15a035f33cf85474 | [
"MIT"
] | 5 | 2021-09-03T07:01:30.000Z | 2022-02-24T09:58:30.000Z | # Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client
# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = "__________YOUR ACCOUNT SID___________"
auth_token = "________... | 31.942857 | 77 | 0.661896 |
4a1e7193614b6d0b555ffbe65c6655b9140e0332 | 5,810 | py | Python | event_log.py | sambacha/repo | e4d8f5a2f332854acb140b22f1b96fd06c42b66e | [
"Apache-2.0"
] | 1 | 2021-12-11T01:57:58.000Z | 2021-12-11T01:57:58.000Z | event_log.py | sambacha/repo | e4d8f5a2f332854acb140b22f1b96fd06c42b66e | [
"Apache-2.0"
] | null | null | null | event_log.py | sambacha/repo | e4d8f5a2f332854acb140b22f1b96fd06c42b66e | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
#
# Copyright (C) 2017 The Android Open Source Project
#
# 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 re... | 30.904255 | 76 | 0.641997 |
4a1e731233b26454551744b1ec12e32b8e19cd47 | 2,671 | py | Python | pytorch_keras_converter/utility/t2k_equivalents/container.py | sonibla/pytorch_keras_converter | 21925b67b6eb3cbbfa8eb6d33f682d57dafd357d | [
"MIT"
] | 17 | 2019-10-01T14:14:18.000Z | 2021-04-25T13:32:24.000Z | pytorch_keras_converter/utility/t2k_equivalents/container.py | sonibla/pytorch_keras_converter | 21925b67b6eb3cbbfa8eb6d33f682d57dafd357d | [
"MIT"
] | null | null | null | pytorch_keras_converter/utility/t2k_equivalents/container.py | sonibla/pytorch_keras_converter | 21925b67b6eb3cbbfa8eb6d33f682d57dafd357d | [
"MIT"
] | 2 | 2019-10-01T14:02:43.000Z | 2019-10-01T14:14:19.000Z | try:
import tensorflow.keras as keras
except ImportError:
try:
import keras
except ImportError:
keras = None
def Sequential(model, file=False):
"""
Converts a torch.nn.Sequential layer
Arguments:
-model:
A LayerRepresentation object of the layer Sequential ... | 27.822917 | 75 | 0.557844 |
4a1e737062c9cce9a9f96e4cae44dd0c4aacd107 | 1,369 | py | Python | scripts/examples/OpenMV/20-Frame-Differencing/on_disk_structural_similarity.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 1,761 | 2015-07-10T23:14:17.000Z | 2022-03-30T07:49:49.000Z | scripts/examples/OpenMV/20-Frame-Differencing/on_disk_structural_similarity.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 487 | 2015-07-07T23:21:20.000Z | 2022-03-30T17:13:22.000Z | scripts/examples/OpenMV/20-Frame-Differencing/on_disk_structural_similarity.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 882 | 2015-08-01T08:34:19.000Z | 2022-03-30T07:36:23.000Z | # Structural Similarity (SSIM) Example
#
# Note: You will need an SD card to run this example.
#
# This example shows off how to use the SSIM algorithm on your OpenMV Cam
# to detect differences between two images. The SSIM algorithm compares
# 8x8 blocks of pixels between two images to determine a similarity
# score b... | 38.027778 | 83 | 0.734112 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.