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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
029e0bfc2e4cbbb8148fbd64db58750bb974195c | 4,014 | py | Python | python/tests/test-crystal_diffraction.py | mschollmeier/xraylib | abf5005cd2a9c8d42d7d70a0f1ef21b6c6bd7ccd | [
"BSD-3-Clause"
] | 85 | 2015-03-10T07:21:36.000Z | 2022-03-15T18:08:13.000Z | python/tests/test-crystal_diffraction.py | mschollmeier/xraylib | abf5005cd2a9c8d42d7d70a0f1ef21b6c6bd7ccd | [
"BSD-3-Clause"
] | 107 | 2015-01-30T13:50:38.000Z | 2022-03-20T17:56:52.000Z | python/tests/test-crystal_diffraction.py | mschollmeier/xraylib | abf5005cd2a9c8d42d7d70a0f1ef21b6c6bd7ccd | [
"BSD-3-Clause"
] | 49 | 2015-01-06T20:14:34.000Z | 2022-02-05T18:02:15.000Z | import unittest
import xraylib
import math
class TestCrystalDiffraction(unittest.TestCase):
def test_crystal_diffraction(self):
crystals_list = xraylib.Crystal_GetCrystalsList()
self.assertEqual(len(crystals_list), 38)
for crystal_name in crystals_list:
cs = xraylib.Crystal_GetC... | 34.603448 | 98 | 0.64275 |
dcd276f7b519265600b14188f55104e6a831da2c | 6,799 | py | Python | torchvision/prototype/datasets/_builtin/caltech.py | mechaot/vision | 8dcb5b810d85bd42edf73280db1ece38c487004c | [
"BSD-3-Clause"
] | 2 | 2021-04-01T17:19:21.000Z | 2021-04-01T18:04:08.000Z | torchvision/prototype/datasets/_builtin/caltech.py | ejguan/vision | aedd39792d07af58e55ec028ed344d63debbd281 | [
"BSD-3-Clause"
] | null | null | null | torchvision/prototype/datasets/_builtin/caltech.py | ejguan/vision | aedd39792d07af58e55ec028ed344d63debbd281 | [
"BSD-3-Clause"
] | null | null | null | import io
import pathlib
import re
from typing import Any, Callable, Dict, List, Optional, Tuple
import numpy as np
import torch
from torchdata.datapipes.iter import (
IterDataPipe,
Mapper,
TarArchiveReader,
Shuffler,
Filter,
IterKeyZipper,
)
from torchvision.prototype.datasets.utils import (
... | 34.51269 | 100 | 0.639947 |
8caa85f62e8cdc3d5f65a7734dad58265e46a2e1 | 2,200 | py | Python | git/db.py | yarikoptic/GitPython | 7576b282013249a2b20ccda4acacefd5e625ea39 | [
"BSD-3-Clause"
] | 1 | 2020-10-15T06:16:48.000Z | 2020-10-15T06:16:48.000Z | git/db.py | yarikoptic/GitPython | 7576b282013249a2b20ccda4acacefd5e625ea39 | [
"BSD-3-Clause"
] | null | null | null | git/db.py | yarikoptic/GitPython | 7576b282013249a2b20ccda4acacefd5e625ea39 | [
"BSD-3-Clause"
] | null | null | null | """Module with our own gitdb implementation - it uses the git command"""
from exc import (
GitCommandError,
BadObject
)
from gitdb.base import (
OInfo,
OStream
)
from gi... | 35.483871 | 86 | 0.606818 |
a25e9c1e0f3ef758f86d24de8f9a827dccf79515 | 5,472 | py | Python | tests/apps/courses/test_templates_blogpost_detail.py | openfun/richie | 185b2be74ce75de8de1da159773afc43e365df3e | [
"MIT"
] | 174 | 2018-04-14T23:36:01.000Z | 2022-03-10T09:27:01.000Z | tests/apps/courses/test_templates_blogpost_detail.py | EDUlib/richie | 3f9b14b929641f9392e54ba9badbb7a9a9fe7d44 | [
"MIT"
] | 631 | 2018-04-04T11:28:53.000Z | 2022-03-31T11:18:31.000Z | tests/apps/courses/test_templates_blogpost_detail.py | EDUlib/richie | 3f9b14b929641f9392e54ba9badbb7a9a9fe7d44 | [
"MIT"
] | 64 | 2018-06-27T08:35:01.000Z | 2022-03-10T09:27:43.000Z | """
End-to-end tests for the blogpost detail view
"""
import re
from datetime import datetime
from unittest import mock
from django.utils import timezone
from cms.test_utils.testcases import CMSTestCase
from richie.apps.core.factories import UserFactory
from richie.apps.courses.factories import (
BlogPostFactory... | 35.076923 | 93 | 0.600694 |
85ff46e77ee7d9a888d38e84484db32234aac3bc | 184 | py | Python | quantecon/util/__init__.py | bbardoczy/QuantEcon.py | 2c3b081b3373183be5b4c5393e176ed66feec1e3 | [
"BSD-3-Clause"
] | 1 | 2022-03-09T14:43:35.000Z | 2022-03-09T14:43:35.000Z | quantecon/util/__init__.py | bbardoczy/QuantEcon.py | 2c3b081b3373183be5b4c5393e176ed66feec1e3 | [
"BSD-3-Clause"
] | null | null | null | quantecon/util/__init__.py | bbardoczy/QuantEcon.py | 2c3b081b3373183be5b4c5393e176ed66feec1e3 | [
"BSD-3-Clause"
] | null | null | null | """
API for QuantEcon Utilities
"""
from .array import searchsorted
from .external import jit, numba_installed
from .random import check_random_state
from .timing import tic, tac, toc | 23 | 42 | 0.793478 |
2fa9d45a8b2e41194d22b72c8dac9d7bffc393a8 | 3,198 | py | Python | homeassistant/components/no_ip/__init__.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 2 | 2019-10-19T15:07:32.000Z | 2022-01-29T10:33:20.000Z | homeassistant/components/no_ip/__init__.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 4 | 2021-02-08T21:05:14.000Z | 2021-09-08T02:57:03.000Z | homeassistant/components/no_ip/__init__.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 2 | 2019-01-21T05:49:23.000Z | 2019-02-19T16:30:48.000Z | """Integrate with NO-IP Dynamic DNS service."""
import asyncio
import base64
from datetime import timedelta
import logging
import aiohttp
from aiohttp.hdrs import USER_AGENT, AUTHORIZATION
import async_timeout
import voluptuous as vol
from homeassistant.const import CONF_DOMAIN, CONF_TIMEOUT, CONF_PASSWORD, CONF_USER... | 29.33945 | 87 | 0.676048 |
c77eecb59b15b1d2526750aff5e40a8f058a53a3 | 1,025 | py | Python | tango_with_django_project/tango_with_django_project/urls.py | shrishabh/rangoProject | 8ed4d46ecb546f1e3d6418a5d5a7b65421cfff6a | [
"MIT"
] | null | null | null | tango_with_django_project/tango_with_django_project/urls.py | shrishabh/rangoProject | 8ed4d46ecb546f1e3d6418a5d5a7b65421cfff6a | [
"MIT"
] | null | null | null | tango_with_django_project/tango_with_django_project/urls.py | shrishabh/rangoProject | 8ed4d46ecb546f1e3d6418a5d5a7b65421cfff6a | [
"MIT"
] | null | null | null | """tango_with_django_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name... | 36.607143 | 79 | 0.730732 |
ee335c8acb66a1269e23ef6d44e0f2708d5b2cbe | 11,394 | py | Python | hrl_dynamic_mpc/src/var_comp_optimize.py | gt-ros-pkg/hrl-haptic-manip | 6458187075033ecd3a22fbcdc1a632df39b0cba1 | [
"Apache-2.0"
] | 1 | 2017-07-13T14:58:35.000Z | 2017-07-13T14:58:35.000Z | hrl_dynamic_mpc/src/var_comp_optimize.py | gt-ros-pkg/hrl-haptic-manip | 6458187075033ecd3a22fbcdc1a632df39b0cba1 | [
"Apache-2.0"
] | null | null | null | hrl_dynamic_mpc/src/var_comp_optimize.py | gt-ros-pkg/hrl-haptic-manip | 6458187075033ecd3a22fbcdc1a632df39b0cba1 | [
"Apache-2.0"
] | 2 | 2017-03-08T14:44:22.000Z | 2019-07-15T23:46:35.000Z | #
# Copyright (c) 2013, Georgia Tech Research Corporation
# 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, th... | 43.159091 | 165 | 0.572494 |
10187b69a8a2227b118f111bf71bd21b001b5850 | 366 | py | Python | python/anyascii/_data/_302.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | python/anyascii/_data/_302.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | python/anyascii/_data/_302.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | b=' Lan Chang Dian Chen Lan Me Kwaak Za Mo Yan Za Wei Gang Xian Yi Jia Que Ye Jian Xi Zhi Zhan Qiang Xian Kui Man Yan Qian Lou ... | 366 | 366 | 0.297814 |
41368932968194fefeac4e68932a20d663219207 | 311 | py | Python | app.py | geekcell/geekle-api | 0264a67f9652de408af2c91acaada6980d86ab57 | [
"MIT"
] | null | null | null | app.py | geekcell/geekle-api | 0264a67f9652de408af2c91acaada6980d86ab57 | [
"MIT"
] | null | null | null | app.py | geekcell/geekle-api | 0264a67f9652de408af2c91acaada6980d86ab57 | [
"MIT"
] | null | null | null | import os
from flask import Flask
from geekle_api import api_blueprint, current_game
app = Flask(__name__)
app.register_blueprint(api_blueprint)
app.logger.info("Word of the day: " + current_game.get_word_of_the_day())
if __name__ == "__main__":
debug = os.environ.get("DEBUG", False)
app.run(debug)
| 23.923077 | 73 | 0.755627 |
1cb47fc283c10418d648fd970721350ac09a2227 | 3,070 | py | Python | L1TriggerConfig/L1GtConfigProducers/test/L1GtTriggerMenuOnlineTest_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | L1TriggerConfig/L1GtConfigProducers/test/L1GtTriggerMenuOnlineTest_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | L1TriggerConfig/L1GtConfigProducers/test/L1GtTriggerMenuOnlineTest_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | from __future__ import print_function
# cfg file to test the online producer of L1GtTriggerMenuRcd
import FWCore.ParameterSet.Config as cms
process = cms.Process("L1ConfigWritePayloadDummy")
###################### user choices ######################
useKey = 'ObjectKey'
#useKey = 'SubsystemKey'
#useKey = 'TscKey'
... | 35.287356 | 127 | 0.738436 |
ca1acf4b504aafa96a913959e256e428595fc9a4 | 28,412 | py | Python | test/functional/rpc_fundrawtransaction.py | SegHaxx/jokecoin | 5cbd75ff506f2197ad5ea6f9e04d31216ab98e80 | [
"MIT"
] | 8 | 2021-02-21T22:47:09.000Z | 2021-07-27T03:38:59.000Z | test/functional/rpc_fundrawtransaction.py | SegHaxx/jokecoin | 5cbd75ff506f2197ad5ea6f9e04d31216ab98e80 | [
"MIT"
] | 1 | 2021-02-24T03:58:10.000Z | 2021-02-24T06:05:21.000Z | test/functional/rpc_fundrawtransaction.py | clowncrew/jokecoin | 1547238819f85a76623fc1c356bc32a62a785075 | [
"MIT"
] | 6 | 2021-02-24T02:13:19.000Z | 2021-05-31T07:53:50.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.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
def ge... | 42.724812 | 223 | 0.562438 |
ee198718985b866b0210330bc030070a40d47e22 | 1,161 | py | Python | statping/statping.py | danielpalstra/pystatping | eb6325229d45cd452528007b440ca545bacc3e04 | [
"Apache-2.0"
] | null | null | null | statping/statping.py | danielpalstra/pystatping | eb6325229d45cd452528007b440ca545bacc3e04 | [
"Apache-2.0"
] | null | null | null | statping/statping.py | danielpalstra/pystatping | eb6325229d45cd452528007b440ca545bacc3e04 | [
"Apache-2.0"
] | null | null | null | import requests
# from . import exceptions
import statping.connection as connection
import statping.miscellaneous as miscellaneous
import statping.services as services
import statping.incidents as incidents
import statping.groups as groups
import statping.users as users
import statping.notifiers as notifiers
import st... | 38.7 | 73 | 0.761413 |
901e19d6478b4a59455b6153c9b92e362c98fc44 | 3,146 | py | Python | sdk/servicebus/azure-servicebus/samples/async_samples/mgmt_topic_async.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/servicebus/azure-servicebus/samples/async_samples/mgmt_topic_async.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/servicebus/azure-servicebus/samples/async_samples/mgmt_topic_async.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------... | 36.581395 | 111 | 0.723776 |
bc0622cbda68adc09182aac60b6b195b42802ce7 | 5,285 | py | Python | run.py | G4Y8u9/Auto-Lianliankan | 72cd5d7c28cbd344ea15cff44bfb7feacd18398e | [
"Apache-2.0"
] | 12 | 2018-06-23T00:42:08.000Z | 2020-03-05T08:12:56.000Z | run.py | G4Y8u9/Auto-Lianliankan | 72cd5d7c28cbd344ea15cff44bfb7feacd18398e | [
"Apache-2.0"
] | null | null | null | run.py | G4Y8u9/Auto-Lianliankan | 72cd5d7c28cbd344ea15cff44bfb7feacd18398e | [
"Apache-2.0"
] | 4 | 2018-06-08T16:33:34.000Z | 2019-04-09T10:04:12.000Z | import metching
import cv2
import numpy as np
import win32api
import win32gui
import win32con
from PIL import ImageGrab
import time
from config import *
import numpy
def getGameWindowPosition():
window = win32gui.FindWindow(None, WINDOW_TITLE)
while not window:
print('unable to find window, try in 3 s... | 34.096774 | 80 | 0.517124 |
95d24b56dd0285be47aed8e774f5acc321641730 | 3,628 | py | Python | Worker/models.py | mbilalshafiq9/DigitalWorkers | 6a204329ec97f5a3859ef7bf91a59164bdca5fbc | [
"MIT"
] | 1 | 2021-11-23T17:21:03.000Z | 2021-11-23T17:21:03.000Z | Worker/models.py | mbilalshafiq9/DigitalWorkers | 6a204329ec97f5a3859ef7bf91a59164bdca5fbc | [
"MIT"
] | null | null | null | Worker/models.py | mbilalshafiq9/DigitalWorkers | 6a204329ec97f5a3859ef7bf91a59164bdca5fbc | [
"MIT"
] | null | null | null | from django.db import models
# from django.contrib.auth.models import User
from django.conf import settings
from django.db.models.fields import BooleanField
from Buyer.models import Work, Buyer
# Create your models here.
class Worker(models.Model):
id = models.BigAutoField(primary_key=True)
user = models.Fore... | 42.682353 | 119 | 0.742558 |
9afae0cb326bb6219bfcd7837661dac7e686d8f7 | 55,219 | py | Python | mavsdk/mission_raw_pb2.py | potaito/MAVSDK-Python | 35a4b25c999b1864518ac16cb023a22014ad43e9 | [
"BSD-3-Clause"
] | null | null | null | mavsdk/mission_raw_pb2.py | potaito/MAVSDK-Python | 35a4b25c999b1864518ac16cb023a22014ad43e9 | [
"BSD-3-Clause"
] | null | null | null | mavsdk/mission_raw_pb2.py | potaito/MAVSDK-Python | 35a4b25c999b1864518ac16cb023a22014ad43e9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mission_raw/mission_raw.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
fro... | 40.483138 | 5,640 | 0.783987 |
f28f0fa75a8a96ec3f09620e838f8dd5572029d9 | 43,689 | py | Python | src/sardana/macroserver/macros/standard.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | null | null | null | src/sardana/macroserver/macros/standard.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | null | null | null | src/sardana/macroserver/macros/standard.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | null | null | null | ##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under the terms of the GNU Less... | 34.618859 | 79 | 0.546316 |
fa00a4d46d3516557377aaa4c9e520aa4070d1f5 | 3,836 | py | Python | lib/file_strip/comments.py | bitst0rm-st3/ScopeHunter | 0a3742785b3f4ae0d947fd3d333e779f8a0473b1 | [
"Unlicense",
"MIT"
] | 83 | 2015-01-05T03:16:38.000Z | 2022-02-11T13:25:28.000Z | lib/file_strip/comments.py | evandroforks/ScopeHunter | c33fcc7f1bf455bc02a1f9d00c91dcdda9aa784d | [
"Unlicense",
"MIT"
] | 47 | 2015-01-29T16:53:03.000Z | 2022-02-28T14:09:41.000Z | lib/file_strip/comments.py | evandroforks/ScopeHunter | c33fcc7f1bf455bc02a1f9d00c91dcdda9aa784d | [
"Unlicense",
"MIT"
] | 15 | 2015-01-29T16:36:37.000Z | 2021-11-26T13:28:56.000Z | """
File Strip.
Licensed under MIT
Copyright (c) 2012 - 2016 Isaac Muse <isaacmuse@gmail.com>
"""
import re
LINE_PRESERVE = re.compile(r"\r?\n", re.MULTILINE)
CSS_PATTERN = re.compile(
r'''(?x)
(?P<comments>
/\*[^*]*\*+(?:[^/*][^*]*\*+)*/ # multi-line comments
)
| (?P<code>
... | 24.589744 | 101 | 0.50756 |
d677191174db6c4cf681ea4f9a6d1fe9e623815d | 11,966 | py | Python | counter_attack/utils.py | samuelemarro/anti-attacks | f63829ee26e24d40aecdd2d6cc6bd7026d11a016 | [
"MIT"
] | null | null | null | counter_attack/utils.py | samuelemarro/anti-attacks | f63829ee26e24d40aecdd2d6cc6bd7026d11a016 | [
"MIT"
] | null | null | null | counter_attack/utils.py | samuelemarro/anti-attacks | f63829ee26e24d40aecdd2d6cc6bd7026d11a016 | [
"MIT"
] | null | null | null | import collections
import configparser
import csv
import datetime
import gzip
import itertools
import json
import logging
import pathlib
import pickle
import urllib.request
from typing import Tuple
import foolbox
import numpy as np
import sklearn.metrics as metrics
logger = logging.getLogger(__name__)
class Averag... | 31.572559 | 169 | 0.635801 |
06e53578d777f55a0bb0bbaba22d4f6a65960e65 | 938 | py | Python | clients/client/python/test/test_stripe_customer_response.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | null | null | null | clients/client/python/test/test_stripe_customer_response.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | null | null | null | clients/client/python/test/test_stripe_customer_response.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | null | null | null | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.42
Contact: support@ory.sh
Generated by: htt... | 25.351351 | 194 | 0.716418 |
9b68136bdd5c8c4ce0cbc2fbb7b51cb02d349a7b | 115,712 | py | Python | test/orm/test_froms.py | lelit/sqlalchemy | 55f930ef3d4e60bed02a2dad16e331fe42cfd12b | [
"MIT"
] | null | null | null | test/orm/test_froms.py | lelit/sqlalchemy | 55f930ef3d4e60bed02a2dad16e331fe42cfd12b | [
"MIT"
] | null | null | null | test/orm/test_froms.py | lelit/sqlalchemy | 55f930ef3d4e60bed02a2dad16e331fe42cfd12b | [
"MIT"
] | null | null | null | import sqlalchemy as sa
from sqlalchemy import and_
from sqlalchemy import asc
from sqlalchemy import cast
from sqlalchemy import desc
from sqlalchemy import exc as sa_exc
from sqlalchemy import exists
from sqlalchemy import ForeignKey
from sqlalchemy import func
from sqlalchemy import inspect
from sqlalchemy import In... | 31.859031 | 79 | 0.469027 |
79235df95643c3f2ffa5e402003bfa2fd04f10b1 | 424 | py | Python | io_scene_xray/ui/__init__.py | clayne/blender-xray | 84d5d52049ec9e22c85ba8544995bd39c3a83e55 | [
"BSD-2-Clause"
] | 93 | 2016-12-02T14:42:18.000Z | 2022-03-23T08:15:41.000Z | io_scene_xray/ui/__init__.py | clayne/blender-xray | 84d5d52049ec9e22c85ba8544995bd39c3a83e55 | [
"BSD-2-Clause"
] | 276 | 2018-07-04T20:13:22.000Z | 2022-03-31T09:13:37.000Z | io_scene_xray/ui/__init__.py | clayne/blender-xray | 84d5d52049ec9e22c85ba8544995bd39c3a83e55 | [
"BSD-2-Clause"
] | 31 | 2018-07-04T20:03:17.000Z | 2022-01-27T18:37:36.000Z | # addon modules
from . import base
from . import collapsible
from . import dynamic_menu
from . import edit_helper
from . import list_helper
from . import motion_list
modules = (
collapsible,
dynamic_menu,
edit_helper,
list_helper,
motion_list,
)
def register():
for module in modules:
... | 15.703704 | 36 | 0.691038 |
3cedda0174e7139d5e6ff7eaf9a748f7ebf0590e | 75,354 | py | Python | venv/lib/python3.9/site-packages/keri-0.1.4-py3.9.egg/keri/core/coring.py | ryanwwest/kademlia | e1e5b84db0a7710cf372663325041850802d55f1 | [
"MIT"
] | 2 | 2020-12-09T17:26:25.000Z | 2021-05-07T02:21:57.000Z | venv/lib/python3.9/site-packages/keri-0.1.4-py3.9.egg/keri/core/coring.py | ryanwwest/kademlia | e1e5b84db0a7710cf372663325041850802d55f1 | [
"MIT"
] | null | null | null | venv/lib/python3.9/site-packages/keri-0.1.4-py3.9.egg/keri/core/coring.py | ryanwwest/kademlia | e1e5b84db0a7710cf372663325041850802d55f1 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
keri.core.coring module
"""
import re
import json
import copy
from dataclasses import dataclass, astuple
from collections import namedtuple, deque
from base64 import urlsafe_b64encode as encodeB64
from base64 import urlsafe_b64decode as decodeB64
from math import ceil
import cbor2 as cb... | 33.05 | 115 | 0.586007 |
30d4ca8758e8f5e1ee387ec5e1b8a137209e67fa | 5,454 | py | Python | env.clearblockd/lib/python2.7/site-packages/strict_rfc3339.py | Organizational-Proof-Of-Work/clearinghoused_build | 7bab4ccb516015913bad41cfdc9eb15d3fbfcaf4 | [
"MIT"
] | null | null | null | env.clearblockd/lib/python2.7/site-packages/strict_rfc3339.py | Organizational-Proof-Of-Work/clearinghoused_build | 7bab4ccb516015913bad41cfdc9eb15d3fbfcaf4 | [
"MIT"
] | null | null | null | env.clearblockd/lib/python2.7/site-packages/strict_rfc3339.py | Organizational-Proof-Of-Work/clearinghoused_build | 7bab4ccb516015913bad41cfdc9eb15d3fbfcaf4 | [
"MIT"
] | null | null | null | # Copyright 2012 (C) Daniel Richman, Adam Greig
#
# This file is part of strict_rfc3339.
#
# strict_rfc3339 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... | 29.803279 | 79 | 0.673817 |
ebf1284fe505b0ca5ef58367e84a214bd816ff4e | 3,092 | py | Python | resource_monitor_sdk/model/flowable_service/bpmn_end_event_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | resource_monitor_sdk/model/flowable_service/bpmn_end_event_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | resource_monitor_sdk/model/flowable_service/bpmn_end_event_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: bpmn_end_event.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.proto... | 37.707317 | 355 | 0.787516 |
ce29fd3f463d50e3ffd1af4b29f333c3abf050df | 8,794 | py | Python | lib/modules/collection/inveigh.py | asmc/Empire-Win | af27f437ee919c9b65e3c2dd7c006f11ff5d5b2a | [
"BSD-3-Clause"
] | 1 | 2019-03-04T20:30:41.000Z | 2019-03-04T20:30:41.000Z | lib/modules/collection/inveigh.py | ninj4c0d3r/Empire | e07e7ca5398dce82f9ce10028355f909d102838b | [
"BSD-3-Clause"
] | null | null | null | lib/modules/collection/inveigh.py | ninj4c0d3r/Empire | e07e7ca5398dce82f9ce10028355f909d102838b | [
"BSD-3-Clause"
] | 5 | 2017-10-17T08:16:13.000Z | 2021-04-30T02:41:02.000Z | from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Invoke-Inveigh',
'Author': ['Kevin Robertson'],
'Description': ('Inveigh is a Windows PowerShell LLMNR/NBNS spoofer/man-in-the-middle tool.'),
'B... | 43.107843 | 226 | 0.461792 |
92ace722b516a8aebaa2ed8d1c2f5b62909aa4ae | 4,999 | py | Python | networkapi/ip/resource/SearchIPv6EnvironmentResource.py | vinicius-marinho/GloboNetworkAPI | 94651d3b4dd180769bc40ec966814f3427ccfb5b | [
"Apache-2.0"
] | 73 | 2015-04-13T17:56:11.000Z | 2022-03-24T06:13:07.000Z | networkapi/ip/resource/SearchIPv6EnvironmentResource.py | leopoldomauricio/GloboNetworkAPI | 3b5b2e336d9eb53b2c113977bfe466b23a50aa29 | [
"Apache-2.0"
] | 99 | 2015-04-03T01:04:46.000Z | 2021-10-03T23:24:48.000Z | networkapi/ip/resource/SearchIPv6EnvironmentResource.py | shildenbrand/GloboNetworkAPI | 515d5e961456cee657c08c275faa1b69b7452719 | [
"Apache-2.0"
] | 64 | 2015-08-05T21:26:29.000Z | 2022-03-22T01:06:28.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 "Lic... | 42.008403 | 115 | 0.665333 |
52eea582cf2767e9a75e96eca815bb9a1d8eb01d | 6,591 | py | Python | Star Wars Lite/structs/elements.py | shinozaki1595/hephaestus | f93dd0bddf432664cebaa2793d601b18387625bb | [
"Apache-2.0"
] | 6 | 2020-10-05T17:46:15.000Z | 2020-12-29T03:42:12.000Z | Star Wars Lite/structs/elements.py | shinozaki1595/hephaestus | f93dd0bddf432664cebaa2793d601b18387625bb | [
"Apache-2.0"
] | 20 | 2020-10-04T19:59:21.000Z | 2022-01-03T14:07:30.000Z | Star Wars Lite/structs/elements.py | shinozaki1595/hephaestus | f93dd0bddf432664cebaa2793d601b18387625bb | [
"Apache-2.0"
] | 14 | 2020-10-02T13:10:38.000Z | 2021-12-14T19:04:49.000Z | import pygame, sys
from pygame import mixer
import os
import main
from structs import root
sys.path.append(os.getcwd())
from structs import sprites
class Shuttle:
REST_TIME = 30
def __init__(self, posx, posy, health=100):
self.shuttle_image = None
self.laser_image = None
self.lasers... | 31.089623 | 90 | 0.570475 |
8d9017e92eee5163fc24782c6069e755e0abd799 | 962 | py | Python | stage1/thread_demo/demo2.py | kaixiang1992/python-review | 7f4f82b453f81b47af7ab1e8f3b3d07d1d75cbe4 | [
"MIT"
] | null | null | null | stage1/thread_demo/demo2.py | kaixiang1992/python-review | 7f4f82b453f81b47af7ab1e8f3b3d07d1d75cbe4 | [
"MIT"
] | null | null | null | stage1/thread_demo/demo2.py | kaixiang1992/python-review | 7f4f82b453f81b47af7ab1e8f3b3d07d1d75cbe4 | [
"MIT"
] | null | null | null | """
2019/12/12 22:11
150.【多线程】使用Thread类创建多线程(线程)
"""
"""
查看线程数:
使用`threading.enumerate()`函数可以看到当前线程的数量.
查看当前线程的名字:
使用`threading.currentThread()`可以看到当前线程的信息.
继承自`threading.Thread`类:
为了让线程代码更好的封装。可以使用threading模块下的Thread类,继承自这个类,
然后实现run方法,线程就会自动运行run方法中的代码。
"""
import threading
import time
class codingThread(thread... | 19.24 | 110 | 0.656965 |
cb3c49c02ea4d43945e27166ad8b16d366c097bb | 13,840 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20200401/virtual_hub.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20200401/virtual_hub.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20200401/virtual_hub.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 48.904594 | 1,370 | 0.675145 |
53de5ab78261eaf1c6d00bfe486291e32a8eb5c3 | 291 | py | Python | hit_me_please/hitters/tests/test_models.py | kittinan/hit-me-please | 8f4ec834dec99d7ce832dbe7565c04b0b5137a68 | [
"MIT"
] | 3 | 2019-06-04T02:51:50.000Z | 2019-12-26T13:58:51.000Z | hit_me_please/hitters/tests/test_models.py | kittinan/hit-me-please | 8f4ec834dec99d7ce832dbe7565c04b0b5137a68 | [
"MIT"
] | 13 | 2019-12-04T23:05:20.000Z | 2022-02-10T08:35:35.000Z | hit_me_please/hitters/tests/test_models.py | yothinix/hit-me-please | 8f4ec834dec99d7ce832dbe7565c04b0b5137a68 | [
"MIT"
] | 1 | 2019-06-04T04:21:54.000Z | 2019-06-04T04:21:54.000Z | from django.test import TestCase
from ..models import Hitter
class HitterTest(TestCase):
def test_hitter_model_should_have_email_field(self):
hitter = Hitter.objects.create(
email='m@yothinix.com'
)
self.assertEqual(hitter.email, 'm@yothinix.com')
| 24.25 | 56 | 0.690722 |
9208273a9973bab72ec6e9a2fcf4a24d6d95d45a | 4,122 | py | Python | dtree/random_forest.py | zhaoyan1117/DecisionTree | f1db94197abf0e4c2d6da8c547109a24ee89907a | [
"BSD-2-Clause"
] | null | null | null | dtree/random_forest.py | zhaoyan1117/DecisionTree | f1db94197abf0e4c2d6da8c547109a24ee89907a | [
"BSD-2-Clause"
] | null | null | null | dtree/random_forest.py | zhaoyan1117/DecisionTree | f1db94197abf0e4c2d6da8c547109a24ee89907a | [
"BSD-2-Clause"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from multiprocessing import cpu_count, Pool
import time, signal
import numpy as np
from .decision_tree import DecisionTree
from .util import iterate_with_progress
#################################
# Multi-process funcs & klasses #
##############... | 34.638655 | 83 | 0.604318 |
82c3dc4c9b70518ee5019118c7769d4579caf1a2 | 2,101 | py | Python | eventsrouter/views/events.py | The-Politico/django-slack-events-router | a838d94a55f7be7afeafa19dad093c29e77ebe67 | [
"MIT"
] | null | null | null | eventsrouter/views/events.py | The-Politico/django-slack-events-router | a838d94a55f7be7afeafa19dad093c29e77ebe67 | [
"MIT"
] | 6 | 2019-12-05T00:43:05.000Z | 2021-06-09T18:39:48.000Z | eventsrouter/views/events.py | The-Politico/django-slack-events-router | a838d94a55f7be7afeafa19dad093c29e77ebe67 | [
"MIT"
] | 1 | 2021-05-30T15:00:36.000Z | 2021-05-30T15:00:36.000Z | from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from toolbox.django.rest.authentication.slack import SlackSignedAuthentication
from ..models import Route
from ..celery import post_webhook
class Events(APIView):
authentication_classes = (Slack... | 30.449275 | 79 | 0.641123 |
7258727332089ea605aa06e83f3e108fc62dbf7a | 2,768 | py | Python | testCircuit1.py | aniabrown/QuEST-TN | 8e0c8686859531d670d537af5eec03b7232f6b26 | [
"MIT"
] | null | null | null | testCircuit1.py | aniabrown/QuEST-TN | 8e0c8686859531d670d537af5eec03b7232f6b26 | [
"MIT"
] | 1 | 2020-02-06T07:02:40.000Z | 2021-03-01T14:44:40.000Z | testCircuit1.py | aniabrown/QuEST-TN | 8e0c8686859531d670d537af5eec03b7232f6b26 | [
"MIT"
] | null | null | null | from QuESTPy.QuESTBase import init_QuESTLib
from TNPy.TNBase import init_TNLib
# If set up
QuESTPath = "build/TN/QuEST/"
TNPath = "build/TN/"
init_QuESTLib(QuESTPath)
init_TNLib(TNPath)
#!/usr/bin/env python3
from QuESTPy.QuESTFunc import *
from TNPy.TNFunc import *
from TNPy.TNAdditionalGates import *
print("-----... | 29.763441 | 107 | 0.672688 |
6cad63b0c711acd10cdbc520ef269baad27cd1c6 | 204 | py | Python | Task/N-queens-problem/Python/n-queens-problem-1.py | LaudateCorpus1/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 5 | 2021-01-29T20:08:05.000Z | 2022-03-22T06:16:05.000Z | Task/N-queens-problem/Python/n-queens-problem-1.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | null | null | null | Task/N-queens-problem/Python/n-queens-problem-1.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | from itertools import permutations
n = 8
cols = range(n)
for vec in permutations(cols):
if n == len(set(vec[i]+i for i in cols)) \
== len(set(vec[i]-i for i in cols)):
print ( vec )
| 22.666667 | 46 | 0.588235 |
55a25c46553f58e10de78129b27b0d5197386cbd | 5,986 | py | Python | db/models/student.py | matchd-ch/matchd-backend | 84be4aab1b4708cae50a8988301b15df877c8db0 | [
"Apache-2.0"
] | 1 | 2022-03-03T09:55:57.000Z | 2022-03-03T09:55:57.000Z | db/models/student.py | matchd-ch/matchd-backend | 84be4aab1b4708cae50a8988301b15df877c8db0 | [
"Apache-2.0"
] | 7 | 2022-02-09T10:44:53.000Z | 2022-03-28T03:29:43.000Z | db/models/student.py | matchd-ch/matchd-backend | 84be4aab1b4708cae50a8988301b15df877c8db0 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from django.apps import apps
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from django.core.validators import RegexValidator
from django.db import models
from django.db.models import Q
from wagtai... | 46.046154 | 117 | 0.595389 |
dd57ea994f6418583b09563b3e00378f1f60bf9a | 136 | py | Python | config.py | doug1043/InstaUnfollow | 5e0b90a8df6dc4a7c08f1fd50e38861710a5535e | [
"MIT"
] | 1 | 2021-12-11T20:55:24.000Z | 2021-12-11T20:55:24.000Z | config.py | doug1043/InstaUnfollow | 5e0b90a8df6dc4a7c08f1fd50e38861710a5535e | [
"MIT"
] | null | null | null | config.py | doug1043/InstaUnfollow | 5e0b90a8df6dc4a7c08f1fd50e38861710a5535e | [
"MIT"
] | null | null | null | import instaloader
BOT_TOKEN = "YOUR_BOT_TOKEN"
USER, PASS = range(2)
L = instaloader.Instaloader()
user_profiles = {
}
| 11.333333 | 30 | 0.661765 |
87cd9a604489be77468250a8a45e8680231c356c | 4,581 | py | Python | msda-src/model_utils/domain_critic.py | jiangfeng1124/transfer | e58291cafd0aa07017db371a22be2ecaf4a08dcd | [
"MIT"
] | 51 | 2018-09-18T06:41:44.000Z | 2022-03-21T00:45:04.000Z | msda-src/model_utils/domain_critic.py | zeinabbo/transfer | e58291cafd0aa07017db371a22be2ecaf4a08dcd | [
"MIT"
] | 3 | 2018-11-26T11:36:26.000Z | 2020-08-30T03:02:32.000Z | msda-src/model_utils/domain_critic.py | zeinabbo/transfer | e58291cafd0aa07017db371a22be2ecaf4a08dcd | [
"MIT"
] | 20 | 2018-10-01T09:08:52.000Z | 2022-01-12T03:53:41.000Z |
import numpy as np
import torch
import torch.nn as nn
import torch.autograd as autograd
from torch.autograd import Variable
import torch.nn.functional as F
from .flip_gradient import flip_gradient
from functools import partial
from .utils import gaussian_kernel_matrix, maximum_mean_discrepancy
class ClassificationD... | 32.721429 | 105 | 0.589828 |
5d8d54e4bc7f5a49bcfa3b7a94fc560274f23bb2 | 801 | py | Python | pylintplugins.py | magiskboy/instagram-clone | ed389438ad3c8a891f745311ba2f786aa1ccc2cc | [
"MIT"
] | null | null | null | pylintplugins.py | magiskboy/instagram-clone | ed389438ad3c8a891f745311ba2f786aa1ccc2cc | [
"MIT"
] | null | null | null | pylintplugins.py | magiskboy/instagram-clone | ed389438ad3c8a891f745311ba2f786aa1ccc2cc | [
"MIT"
] | null | null | null | import sys
from astroid import MANAGER, scoped_nodes
from astroid.builder import AstroidBuilder
from sqlalchemy.orm import Session
def register(_linter):
pass
def transform(cls):
if cls.name == 'scoped_session':
builder = AstroidBuilder(MANAGER)
module_node = builder.module_build(sys.modules... | 29.666667 | 81 | 0.644195 |
e11ce13d73f255e52909fdfa48a85613fcb79c7d | 8,036 | py | Python | multi_sokoban/searchclient.py | FjodBorg/Multi_Agent_AI | 471e1d62eab93d3d234feeabb53e1b90f13f8c26 | [
"OML"
] | 1 | 2020-05-27T17:59:14.000Z | 2020-05-27T17:59:14.000Z | multi_sokoban/searchclient.py | FjodBorg/Multi_Agent_AI | 471e1d62eab93d3d234feeabb53e1b90f13f8c26 | [
"OML"
] | null | null | null | multi_sokoban/searchclient.py | FjodBorg/Multi_Agent_AI | 471e1d62eab93d3d234feeabb53e1b90f13f8c26 | [
"OML"
] | null | null | null | """Client that receives messages from the server."""
import argparse
import re
import string
import sys
from typing import List
import numpy as np
from _io import TextIOWrapper
from multi_sokoban.actions import StateInit
from multi_sokoban.strategy import BestFirstSearch, aStarSearch, greedySearch
from multi_sokoban.... | 35.715556 | 81 | 0.573668 |
5778b88168b08c981026027cdd50a5efdfa982fe | 4,290 | py | Python | sleuth/tests/test_auditor.py | trussworks/aws-iam-sleuth | 8a3e570ca72331b032124edb22bcf1e1688251ee | [
"Apache-2.0"
] | 6 | 2020-05-25T18:58:39.000Z | 2021-11-22T21:36:56.000Z | sleuth/tests/test_auditor.py | trussworks/terraform-aws-iam-sleuth | 5c35c238e256c8cbf9f43d86a37114e4e1c3e7b3 | [
"Apache-2.0"
] | 58 | 2020-05-14T19:30:10.000Z | 2021-09-15T21:15:14.000Z | sleuth/tests/test_auditor.py | trussworks/aws-iam-sleuth | 8a3e570ca72331b032124edb22bcf1e1688251ee | [
"Apache-2.0"
] | 3 | 2020-05-19T20:30:32.000Z | 2021-08-18T06:15:45.000Z | from freezegun import freeze_time
import datetime
import pytest
from sleuth.auditor import Key
@freeze_time("2019-01-16")
class TestKey():
def test_normal(self):
"""Normal happy path, key is good"""
created = datetime.datetime(2019, 1, 1, tzinfo=datetime.timezone.utc)
last_used = datetime... | 48.202247 | 115 | 0.646387 |
3cd6cda8c1180dcb98231e7d91e1ae2f0e7bbc28 | 171 | py | Python | exercises/concept/inventory-management/dicts.py | gsilvapt/python | d675468b2437d4c09c358d023ef998a05a781f58 | [
"MIT"
] | 200 | 2019-12-12T13:50:59.000Z | 2022-02-20T22:38:42.000Z | exercises/concept/inventory-management/dicts.py | gsilvapt/python | d675468b2437d4c09c358d023ef998a05a781f58 | [
"MIT"
] | 1,938 | 2019-12-12T08:07:10.000Z | 2021-01-29T12:56:13.000Z | exercises/concept/inventory-management/dicts.py | gsilvapt/python | d675468b2437d4c09c358d023ef998a05a781f58 | [
"MIT"
] | 239 | 2019-12-12T14:09:08.000Z | 2022-03-18T00:04:07.000Z | def create_inventory(items):
pass
def add_items(inventory, items):
pass
def delete_items(inventory, items):
pass
def list_inventory(inventory):
pass
| 11.4 | 35 | 0.707602 |
ab2c186b0db95e3cb6b9f061be4420537fc69301 | 82,747 | py | Python | spyder/app/mainwindow.py | dan123456-eng/spyder | e57751e01d09a35b8f0583f9efd8dce318b17b4e | [
"MIT"
] | 1 | 2022-02-23T16:50:02.000Z | 2022-02-23T16:50:02.000Z | spyder/app/mainwindow.py | dan123456-eng/spyder | e57751e01d09a35b8f0583f9efd8dce318b17b4e | [
"MIT"
] | null | null | null | spyder/app/mainwindow.py | dan123456-eng/spyder | e57751e01d09a35b8f0583f9efd8dce318b17b4e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
"""
Spyder, the Scientific Python Development Environment
=====================================================
Developed and maintained by the Spyder Proj... | 40.542381 | 85 | 0.570111 |
1b4951b9a4059712d6b041ddd6946604dd5242b6 | 4,427 | py | Python | utils/io.py | LeftThink/deep_sort_pytorch | c84a117e3dc3c83a620b6ca49380ca9460a659d6 | [
"MIT"
] | null | null | null | utils/io.py | LeftThink/deep_sort_pytorch | c84a117e3dc3c83a620b6ca49380ca9460a659d6 | [
"MIT"
] | null | null | null | utils/io.py | LeftThink/deep_sort_pytorch | c84a117e3dc3c83a620b6ca49380ca9460a659d6 | [
"MIT"
] | null | null | null | import os
from typing import Dict
import numpy as np
# from utils.log import get_logger
def write_results(filename, results, data_type):
if data_type == 'mot':
save_format = '{frame},{id},{x1},{y1},{w},{h},-1,-1,-1,-1\n'
elif data_type == 'kitti':
save_format = '{frame} {id} pedestrian 0 0 -1... | 33.037313 | 121 | 0.500791 |
a7476e5349831eaaca0a7a46b5f59bc666bd2981 | 644 | py | Python | 8b.py | tavaresdu/PythonNetworkOS-Assessment | dd713fca815ff0dbe836ed8952b45923a68e479d | [
"MIT"
] | null | null | null | 8b.py | tavaresdu/PythonNetworkOS-Assessment | dd713fca815ff0dbe836ed8952b45923a68e479d | [
"MIT"
] | null | null | null | 8b.py | tavaresdu/PythonNetworkOS-Assessment | dd713fca815ff0dbe836ed8952b45923a68e479d | [
"MIT"
] | null | null | null | import threading
a = list(enumerate([183677, 186720, 176916, 186554, 113034,
193701, 131768, 142185, 131518, 105202]))
b = [0 for i in range(len(a))]
def fatorial(n):
fat = n
for i in range(n-1, 1, -1):
fat = fat * i
return fat
def main(thread):
while a:
entry = a... | 22.206897 | 67 | 0.56677 |
1457114d7427a190d9754d8e584e2ccbcfa65b78 | 4,417 | py | Python | audio_encoder/audio.py | Domhnall-Liopa/Lip2Wav | 236ae24cd7945da8a75ddea1cfdc3da271c3c59f | [
"MIT"
] | null | null | null | audio_encoder/audio.py | Domhnall-Liopa/Lip2Wav | 236ae24cd7945da8a75ddea1cfdc3da271c3c59f | [
"MIT"
] | null | null | null | audio_encoder/audio.py | Domhnall-Liopa/Lip2Wav | 236ae24cd7945da8a75ddea1cfdc3da271c3c59f | [
"MIT"
] | null | null | null | from scipy.ndimage.morphology import binary_dilation
from audio_encoder.params_data import *
from pathlib import Path
from typing import Optional, Union
import numpy as np
import webrtcvad
import librosa
import struct
int16_max = (2 ** 15) - 1
def preprocess_wav(fpath_or_wav: Union[str, Path, np.ndarray],
... | 40.154545 | 98 | 0.696174 |
6922dc3f892e2547a3e4e8a7e0feaf7cb0bf9a55 | 918 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/framebuffer_multisample.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/framebuffer_multisample.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/framebuffer_multisample.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
# End users want this...
from OpenGL.raw.GL._types import *
from OpenGL.raw.GL import _errors
from OpenGL.constant import Constant as _C
import... | 45.9 | 125 | 0.816993 |
4edd4b967cac8b5727ae2f3650cf87f0de35215b | 5,582 | py | Python | plipify/_deprecated.py | volkamerlab/plipify | c7b68bbf325aac904969867c7fbed5179f9670b7 | [
"MIT"
] | 6 | 2022-01-19T13:31:57.000Z | 2022-02-09T05:48:08.000Z | plipify/_deprecated.py | volkamerlab/plipify | c7b68bbf325aac904969867c7fbed5179f9670b7 | [
"MIT"
] | 4 | 2021-10-13T08:45:33.000Z | 2022-02-11T15:56:09.000Z | plipify/_deprecated.py | volkamerlab/plipify | c7b68bbf325aac904969867c7fbed5179f9670b7 | [
"MIT"
] | 2 | 2022-01-25T03:01:56.000Z | 2022-03-21T09:26:31.000Z | import csv
import os
import pandas as pd
from tqdm.auto import tqdm
from plip.structure.preparation import PDBComplex
from plip.exchange.report import BindingSiteReport
from IPython.display import display, Markdown
##### PREPARATION ######
# fixed for now
interaction_types = [
"hydrophobic",
"hbond",
"wate... | 31.184358 | 106 | 0.629703 |
83052e1afca2d962e560e396f8ff4b72430b7b0c | 907 | py | Python | tfc_client/models/notification_configuration.py | spiresystems/iwc-tfc-client | 15e86fef7a8090f6a8c3f792ba46c60d11f7b0ef | [
"MIT"
] | 9 | 2019-11-18T13:38:10.000Z | 2021-09-24T21:59:10.000Z | tfc_client/models/notification_configuration.py | spiresystems/iwc-tfc-client | 15e86fef7a8090f6a8c3f792ba46c60d11f7b0ef | [
"MIT"
] | 10 | 2019-11-10T23:46:54.000Z | 2022-03-30T15:46:56.000Z | tfc_client/models/notification_configuration.py | spiresystems/iwc-tfc-client | 15e86fef7a8090f6a8c3f792ba46c60d11f7b0ef | [
"MIT"
] | 4 | 2019-11-18T14:06:04.000Z | 2021-11-09T15:42:44.000Z | from datetime import datetime
from typing import Optional, List, Any, Dict
try:
from pydantic import HttpUrl
except ImportError:
from typing import AnyStr as HttpUrl
from . import KebabCaseBaseModel
from .data import AttributesModel
from ..enums import NotificationTrigger, NotificationsDestinationType
class... | 27.484848 | 69 | 0.76957 |
1d592159a84cfd86c0d34bfdf1ab9036d63f4b89 | 4,790 | py | Python | karesansui/gadget/hostby1iptablesstatus.py | GOMYWAY-NETWORKS-LLC/karesansui | f4ba1cf6f88cf76c3e4dbc444139d73134f7c9d1 | [
"MIT"
] | 54 | 2015-01-09T16:49:34.000Z | 2022-02-03T10:08:30.000Z | karesansui/gadget/hostby1iptablesstatus.py | GOMYWAY-NETWORKS-LLC/karesansui | f4ba1cf6f88cf76c3e4dbc444139d73134f7c9d1 | [
"MIT"
] | 2 | 2016-02-22T08:23:36.000Z | 2021-05-10T04:13:01.000Z | karesansui/gadget/hostby1iptablesstatus.py | GOMYWAY-NETWORKS-LLC/karesansui | f4ba1cf6f88cf76c3e4dbc444139d73134f7c9d1 | [
"MIT"
] | 27 | 2015-08-21T13:33:49.000Z | 2021-11-19T02:56:20.000Z | # -*- coding: utf-8 -*-
#
# This file is part of Karesansui.
#
# Copyright (C) 2009-2012 HDE, Inc.
#
# 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 lim... | 31.30719 | 96 | 0.630898 |
1a8a9dfaa17550c7fbc72f01c7a82fd81b97e67b | 6,877 | py | Python | robot/client_vision.py | cosmoharrigan/rc-nfq | 0b18d27d0b95644bded258d5a9fbb5cb4f895c91 | [
"MIT"
] | 15 | 2016-04-06T10:30:26.000Z | 2020-03-30T04:26:27.000Z | robot/client_vision.py | cosmoharrigan/rc-nfq | 0b18d27d0b95644bded258d5a9fbb5cb4f895c91 | [
"MIT"
] | null | null | null | robot/client_vision.py | cosmoharrigan/rc-nfq | 0b18d27d0b95644bded258d5a9fbb5cb4f895c91 | [
"MIT"
] | 8 | 2016-08-26T01:59:51.000Z | 2019-10-18T07:48:53.000Z | '''Implementation of a client for a custom LEGO Mindstorms EV3 robot.
This script runs on the EV3 and requires the following custom firmware:
- http://www.ev3dev.org/
- https://github.com/topikachu/python-ev3
'''
from time import sleep
import curses
import random
from ev3dev.auto import *
import urllib
import urllib2... | 36.775401 | 118 | 0.654501 |
254b655a3cf1e662f704872918fab5ac4affc678 | 2,129 | py | Python | abtest/settings.py | SchuylerGoodman/topicalguide | 7c26c8be8e1dddb7bf2be33ea9a7ba59034bf620 | [
"PostgreSQL"
] | null | null | null | abtest/settings.py | SchuylerGoodman/topicalguide | 7c26c8be8e1dddb7bf2be33ea9a7ba59034bf620 | [
"PostgreSQL"
] | null | null | null | abtest/settings.py | SchuylerGoodman/topicalguide | 7c26c8be8e1dddb7bf2be33ea9a7ba59034bf620 | [
"PostgreSQL"
] | null | null | null | # The Topical Guide
# Copyright 2010-2011 Brigham Young University
#
# This file is part of the Topical Guide <http://nlp.cs.byu.edu/topic_browser>.
#
# The Topical Guide is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by the
# Free Soft... | 39.425926 | 112 | 0.744481 |
2290e4b60991083c8ca8db3553f944d5cb115c84 | 126 | py | Python | tests/test_data/test_data_utils/test_adj_matrix.py | jvrana/caldera | a346324e77f20739e00a82f97530dda4906f59dd | [
"MIT"
] | 2 | 2021-12-13T17:52:17.000Z | 2021-12-13T17:52:18.000Z | tests/test_data/test_data_utils/test_adj_matrix.py | jvrana/caldera | a346324e77f20739e00a82f97530dda4906f59dd | [
"MIT"
] | 4 | 2020-10-06T21:06:15.000Z | 2020-10-10T01:18:23.000Z | tests/test_data/test_data_utils/test_adj_matrix.py | jvrana/caldera | a346324e77f20739e00a82f97530dda4906f59dd | [
"MIT"
] | null | null | null | from caldera.data.utils import adj_matrix
def test_adj_matrix(random_data_example):
M = adj_matrix(random_data_example)
| 21 | 41 | 0.81746 |
2af54c222a2d7e10b01408a78e2976cfb5c94ea3 | 204 | py | Python | tests/app/urls.py | gasman/wagtailmodelchooser | 1aef9c0f3589d9ad81fe04dadeacc90a27e315d8 | [
"BSD-2-Clause"
] | 49 | 2019-03-01T15:50:32.000Z | 2022-03-01T10:47:57.000Z | tests/app/urls.py | gasman/wagtailmodelchooser | 1aef9c0f3589d9ad81fe04dadeacc90a27e315d8 | [
"BSD-2-Clause"
] | 15 | 2019-08-08T11:47:27.000Z | 2022-02-15T06:18:48.000Z | tests/app/urls.py | gasman/wagtailmodelchooser | 1aef9c0f3589d9ad81fe04dadeacc90a27e315d8 | [
"BSD-2-Clause"
] | 18 | 2019-03-11T19:30:49.000Z | 2022-03-02T13:07:13.000Z | import wagtail.admin.urls
import wagtail.core.urls
from django.conf.urls import include, url
urlpatterns = [
url(r'^admin/', include(wagtail.admin.urls)),
url(r'', include(wagtail.core.urls)),
]
| 22.666667 | 49 | 0.715686 |
8c02c3283e50ade5af27c52730541e89a2f548c4 | 712 | py | Python | euchre/abstract/team.py | bradleycwojcik/euchre-cli | e4ffcdb16720d8dafe6b5b00b50eb923c1fcfe27 | [
"MIT"
] | 3 | 2020-10-07T08:23:12.000Z | 2021-11-20T16:33:40.000Z | euchre/abstract/team.py | bradleycwojcik/euchre-cli | e4ffcdb16720d8dafe6b5b00b50eb923c1fcfe27 | [
"MIT"
] | 28 | 2020-07-14T01:29:33.000Z | 2021-11-20T04:48:09.000Z | euchre/abstract/team.py | boldandbrad/euchre-cli | 6e03f76c5feb50d677ab2558707182fa7dd5d127 | [
"MIT"
] | 4 | 2020-09-07T04:25:04.000Z | 2021-11-11T07:20:01.000Z | class Team:
"""Representation of a team of players."""
def __init__(self, name: str) -> None:
self.name = name
self.game_score = 0
# reset every hand
self.called_trump = False
self.trick_score = 0
def won_hand(self, points: int) -> None:
"""Increment game_s... | 24.551724 | 59 | 0.566011 |
68df5b3d02c789002b5a9bdf336d6c4a321e780f | 6,684 | py | Python | bin/charts.py | grinchios/college_project-commented | 3cc5ccd6c1b946b625e1dcc0689c9273f6ba2178 | [
"MIT"
] | null | null | null | bin/charts.py | grinchios/college_project-commented | 3cc5ccd6c1b946b625e1dcc0689c9273f6ba2178 | [
"MIT"
] | null | null | null | bin/charts.py | grinchios/college_project-commented | 3cc5ccd6c1b946b625e1dcc0689c9273f6ba2178 | [
"MIT"
] | null | null | null | from PyQt5 import QtGui, QtWidgets
from matplotlib.backends.backend_qt5agg \
import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
from PyQt5.QtWidgets import *
from datetime import date, timedelta, datetime
'''
P1
Creating graphs for key data. The graphs on the managers panel will be the ... | 36.725275 | 315 | 0.605326 |
b7fcd02753024a6e184594a08694e410eeac6f79 | 8,488 | py | Python | generateattcks/generateattcks/generateattcks.py | randomaccess3/pyattck | 3837599df542456d8b788e0e7bea67ed34e130cc | [
"MIT"
] | null | null | null | generateattcks/generateattcks/generateattcks.py | randomaccess3/pyattck | 3837599df542456d8b788e0e7bea67ed34e130cc | [
"MIT"
] | null | null | null | generateattcks/generateattcks/generateattcks.py | randomaccess3/pyattck | 3837599df542456d8b788e0e7bea67ed34e130cc | [
"MIT"
] | null | null | null | import datetime, json, os
from .adversaryemulation import AdversaryEmulation
from .atomicredteam import AtomicRedTeam
from .stockpile import MitreStockpile
from .threathuntingtables import ThreatHuntingTables
from .sysmonhunter import SysmonHunter
from .blueteamlabs import BlueTeamLabs
from .atomicthreatcoverage impor... | 40.61244 | 116 | 0.564915 |
213b25286583edfcdcb6369ea84354111b229635 | 3,806 | py | Python | longaudio.py | catherine8224/Transcribe_Audio | 2f977b8e2eaeb45363c572d121692d38ce1c2cb8 | [
"Apache-2.0"
] | null | null | null | longaudio.py | catherine8224/Transcribe_Audio | 2f977b8e2eaeb45363c572d121692d38ce1c2cb8 | [
"Apache-2.0"
] | 1 | 2020-03-28T01:57:26.000Z | 2020-03-28T01:57:26.000Z | longaudio.py | catherine8224/Transcribe_Audio | 2f977b8e2eaeb45363c572d121692d38ce1c2cb8 | [
"Apache-2.0"
] | null | null | null | # importing libraries
import speech_recognition as sr; import os; from pydub import AudioSegment
import io; from scipy.io.wavfile import write; import numpy as np
#from pydub.silence import split_on_silence
from pydub.utils import make_chunks; import re; from google.cloud import storage
def length(fname): #finding ... | 44.776471 | 218 | 0.715975 |
17722e949df1e297e4d7f5264ecea08fc2049e11 | 12,656 | py | Python | pandas/tests/indexing/test_chaining_and_caching.py | garyteofanus/pandas | cc51219fad8add8f442b847ccdabd3f9e9077cb6 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 6 | 2020-09-10T15:03:25.000Z | 2021-04-01T22:48:33.000Z | pandas/tests/indexing/test_chaining_and_caching.py | garyteofanus/pandas | cc51219fad8add8f442b847ccdabd3f9e9077cb6 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 3 | 2020-03-09T13:15:03.000Z | 2020-03-20T10:07:10.000Z | pandas/tests/indexing/test_chaining_and_caching.py | garyteofanus/pandas | cc51219fad8add8f442b847ccdabd3f9e9077cb6 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2020-02-07T05:05:32.000Z | 2020-05-11T06:06:17.000Z | import numpy as np
import pytest
import pandas as pd
from pandas import DataFrame, Series, Timestamp, date_range, option_context
import pandas._testing as tm
import pandas.core.common as com
class TestCaching:
def test_slice_consolidate_invalidate_item_cache(self):
# this is chained assignment, but will... | 32.285714 | 114 | 0.521413 |
5cc03aa13b15c899d731e7f2e7bd81a78284709e | 155 | py | Python | scrape.py | hamesjan/SurfForecastBot | 83429cdbe0d569b75478f5318a7db84d993bdcb4 | [
"MIT"
] | null | null | null | scrape.py | hamesjan/SurfForecastBot | 83429cdbe0d569b75478f5318a7db84d993bdcb4 | [
"MIT"
] | null | null | null | scrape.py | hamesjan/SurfForecastBot | 83429cdbe0d569b75478f5318a7db84d993bdcb4 | [
"MIT"
] | null | null | null | class Scrapper:
# Class attribute
species = "Canis familiaris"
def __init__(self, name, age):
self.name = name
self.age = age
| 19.375 | 34 | 0.6 |
93e6b439ced8c788e5889e43f05a5693c6bbcd6d | 255,535 | py | Python | google_appengine/google/appengine/api/taskqueue/taskqueue_service_pb.py | iTrollYou/WEB_Spotify_Youtube | 5315cdf78361942bba0b52daa8b65d74998d2db5 | [
"MIT"
] | null | null | null | google_appengine/google/appengine/api/taskqueue/taskqueue_service_pb.py | iTrollYou/WEB_Spotify_Youtube | 5315cdf78361942bba0b52daa8b65d74998d2db5 | [
"MIT"
] | null | null | null | google_appengine/google/appengine/api/taskqueue/taskqueue_service_pb.py | iTrollYou/WEB_Spotify_Youtube | 5315cdf78361942bba0b52daa8b65d74998d2db5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 29.936153 | 1,501 | 0.687096 |
e7b873a2aa86a6288e062e6f88d37b12e199cf47 | 114 | py | Python | 1002.py | victorcaram/URI | df11f17033744a5c42eba718bdbe225b0f03a3af | [
"MIT"
] | null | null | null | 1002.py | victorcaram/URI | df11f17033744a5c42eba718bdbe225b0f03a3af | [
"MIT"
] | null | null | null | 1002.py | victorcaram/URI | df11f17033744a5c42eba718bdbe225b0f03a3af | [
"MIT"
] | null | null | null | import sys
pi = 3.14159;
raio = input();
area = raio * raio * pi
print("A=" + "{0:.4f}".format(round(area,4))) | 12.666667 | 45 | 0.570175 |
f5907776a9b2af8d524ce25b51d9360dcd92664a | 5,047 | py | Python | python/GafferUITest/TextWidgetTest.py | goddardl/gaffer | be7fca3a70d3cafab3c1ae800b4548cd248f80a1 | [
"BSD-3-Clause"
] | null | null | null | python/GafferUITest/TextWidgetTest.py | goddardl/gaffer | be7fca3a70d3cafab3c1ae800b4548cd248f80a1 | [
"BSD-3-Clause"
] | null | null | null | python/GafferUITest/TextWidgetTest.py | goddardl/gaffer | be7fca3a70d3cafab3c1ae800b4548cd248f80a1 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2011-2012, Image Engine Design 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:
#
# * Redi... | 30.77439 | 83 | 0.690311 |
abb249d7a620e5ed58487043500dd3f011740956 | 41,651 | py | Python | flintrock/flintrock.py | tvision-insights/flintrock | 1ac1dba5019a40f4e79c24ac0992cdd6130aceae | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | flintrock/flintrock.py | tvision-insights/flintrock | 1ac1dba5019a40f4e79c24ac0992cdd6130aceae | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | flintrock/flintrock.py | tvision-insights/flintrock | 1ac1dba5019a40f4e79c24ac0992cdd6130aceae | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import os
import posixpath
import errno
import json
import resource
import sys
import shutil
import textwrap
import urllib.parse
import urllib.request
import warnings
import logging
# External modules
import click
import yaml
# We import botocore here so we can catch when the user tries to
# access AWS without having ... | 34.507871 | 131 | 0.613503 |
ef58a83ec9c2a4b49671347c2a86b6c41f5fd08b | 11,014 | py | Python | scalyr_agent/tests/scalyr_monitor_test.py | slomo/scalyr-agent-2 | 8726d6c2483c9ceb19a37697f266261c31e00b0b | [
"Apache-2.0"
] | null | null | null | scalyr_agent/tests/scalyr_monitor_test.py | slomo/scalyr-agent-2 | 8726d6c2483c9ceb19a37697f266261c31e00b0b | [
"Apache-2.0"
] | null | null | null | scalyr_agent/tests/scalyr_monitor_test.py | slomo/scalyr-agent-2 | 8726d6c2483c9ceb19a37697f266261c31e00b0b | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Scalyr 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, so... | 37.719178 | 106 | 0.614309 |
6482c7a8679e06892962b658a517e9d877e869ca | 10,919 | py | Python | padpo.py | awecx/padpo | 82604c068cf57b398dec048c8e37484081b2086c | [
"BSD-3-Clause"
] | null | null | null | padpo.py | awecx/padpo | 82604c068cf57b398dec048c8e37484081b2086c | [
"BSD-3-Clause"
] | null | null | null | padpo.py | awecx/padpo | 82604c068cf57b398dec048c8e37484081b2086c | [
"BSD-3-Clause"
] | null | null | null | import argparse
import json
import re
import subprocess
import sys
import tempfile
from abc import ABC, abstractmethod
from pathlib import Path
import simplelogging
# log = simplelogging.get_logger(console_level=simplelogging.DEBUG)
log = simplelogging.get_logger()
class PoItem:
def __init__(self, path, lineno)... | 29.273458 | 138 | 0.53384 |
60024e33ac262c8b9a3060f731193c8285445ab9 | 1,004 | py | Python | youtubemanager/users/admin.py | Nihilistik/YoutubeManager | 3d227038f20cc36559122e9b2984323e14eb109b | [
"Apache-2.0"
] | null | null | null | youtubemanager/users/admin.py | Nihilistik/YoutubeManager | 3d227038f20cc36559122e9b2984323e14eb109b | [
"Apache-2.0"
] | null | null | null | youtubemanager/users/admin.py | Nihilistik/YoutubeManager | 3d227038f20cc36559122e9b2984323e14eb109b | [
"Apache-2.0"
] | 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 django.utils.translation import gettext_lazy as _
from youtubemanager.users.forms import UserChangeForm, UserCreationForm
User = get_user_model()
@admin.register(User)
class UserA... | 28.685714 | 74 | 0.558765 |
6bf5f0fb49729d4893a96459e3351306a4fd999c | 631 | py | Python | backend/manage.py | crowdbotics-apps/kylee-33250 | 3efa5ef5259c883c6f4c8057ba92dd54dd024e0c | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/kylee-33250 | 3efa5ef5259c883c6f4c8057ba92dd54dd024e0c | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/kylee-33250 | 3efa5ef5259c883c6f4c8057ba92dd54dd024e0c | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kylee_33250.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Im... | 28.681818 | 75 | 0.684628 |
16da57a93c10920c68398ae9dd1a5da2766ad4f4 | 267 | py | Python | tests/artificial/transf_BoxCox/trend_LinearTrend/cycle_5/ar_12/test_artificial_32_BoxCox_LinearTrend_5_12_0.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/artificial/transf_BoxCox/trend_LinearTrend/cycle_5/ar_12/test_artificial_32_BoxCox_LinearTrend_5_12_0.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/artificial/transf_BoxCox/trend_LinearTrend/cycle_5/ar_12/test_artificial_32_BoxCox_LinearTrend_5_12_0.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "LinearTrend", cycle_length = 5, transform = "BoxCox", sigma = 0.0, exog_count = 0, ar_order = 12); | 38.142857 | 162 | 0.730337 |
744cb870b0f85f2a4a9ff9749f880262af39a3e7 | 10,141 | py | Python | trixi/logger/message/slackmessagelogger.py | justusschock/trixi | 73886338888645f46594e4d9907f4d1cfc1cddac | [
"MIT"
] | 1 | 2018-11-30T21:53:36.000Z | 2018-11-30T21:53:36.000Z | trixi/logger/message/slackmessagelogger.py | justusschock/trixi | 73886338888645f46594e4d9907f4d1cfc1cddac | [
"MIT"
] | null | null | null | trixi/logger/message/slackmessagelogger.py | justusschock/trixi | 73886338888645f46594e4d9907f4d1cfc1cddac | [
"MIT"
] | null | null | null | import io
import matplotlib.pyplot as plt
import numpy as np
import torch
import torchvision
from PIL import Image
from slackclient import SlackClient
from trixi.util.util import figure_to_image, get_image_as_buffered_file
from trixi.logger.plt.numpyseabornimageplotlogger import NumpySeabornImagePlotLogger
class S... | 33.468647 | 116 | 0.57805 |
14a490f6fc59e451f1df582b0cf7075e7ded7ad8 | 1,046 | py | Python | tests/modules/test_utils.py | karenc/houston | 4eaaaf11d61394035e34b55bb847ea7eb4099c61 | [
"Apache-2.0"
] | 6 | 2021-04-06T19:50:52.000Z | 2022-01-19T17:42:33.000Z | tests/modules/test_utils.py | WildMeOrg/houston | 8102229421388e44234c07ee6cb73bf705b6fba0 | [
"Apache-2.0"
] | 491 | 2021-01-20T01:10:00.000Z | 2022-03-31T19:30:48.000Z | tests/modules/test_utils.py | karenc/houston | 4eaaaf11d61394035e34b55bb847ea7eb4099c61 | [
"Apache-2.0"
] | 2 | 2021-03-12T02:33:55.000Z | 2021-03-16T20:18:43.000Z | # -*- coding: utf-8 -*-
from unittest.mock import Mock
import pytest
from app.modules.utils import fail_on_missing_static_folder
class TestFailOnMissingStaticFolder:
def test_passing(self, tmp_path):
app = Mock()
app.static_folder = tmp_path
fail_on_missing_static_folder(app)
def te... | 30.764706 | 62 | 0.66826 |
bf60dff5c7c03f5c7a10c0a9afbcc99fb4d24f98 | 2,339 | py | Python | umlayer/model/project.py | selforthis/umlayer | 8679af2ec46d346bc1b4adbcb70e3ebc6a52604a | [
"MIT"
] | null | null | null | umlayer/model/project.py | selforthis/umlayer | 8679af2ec46d346bc1b4adbcb70e3ebc6a52604a | [
"MIT"
] | null | null | null | umlayer/model/project.py | selforthis/umlayer | 8679af2ec46d346bc1b4adbcb70e3ebc6a52604a | [
"MIT"
] | 1 | 2021-11-28T17:26:00.000Z | 2021-11-28T17:26:00.000Z | from uuid import UUID
from . import BaseItem
class Project:
"""Contains project data"""
def __init__(self):
self.project_items = {} # bad design
self._root = None
self._is_dirty = False
@property
def root(self):
return self._root
def setRoot(self, root: BaseIte... | 29.2375 | 94 | 0.61864 |
12e9f8f6f4f862cbe84b24cb325b7888df8517b1 | 22,080 | py | Python | fast_bert/data_cls.py | thinker-94/fast-bert | 337bb1331fa8aab83d34c895a9d6b64d18a4efc5 | [
"Apache-2.0"
] | 1 | 2020-10-19T06:14:10.000Z | 2020-10-19T06:14:10.000Z | fast_bert/data_cls.py | ak3ra/fast-bert | f32e12290c2c4e9fc6a104dba117bcf435492f80 | [
"Apache-2.0"
] | null | null | null | fast_bert/data_cls.py | ak3ra/fast-bert | f32e12290c2c4e9fc6a104dba117bcf435492f80 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import os
import torch
from pathlib import Path
import pickle
import logging
import shutil
from torch.utils.data import (
Dataset,
TensorDataset,
DataLoader,
RandomSampler,
SequentialSampler,
)
from torch.utils.data.distributed import DistributedSampler
from transformers impor... | 35.670436 | 106 | 0.573007 |
cfa413b95c04a222e85983e7b0753f386328ca1e | 1,465 | py | Python | src/python/nimbusml/ensemble/output_combiner/classifierstacking.py | michaelgsharp/NimbusML | 50031157265f49eec85d27fe67582d9ddaf01ef9 | [
"MIT"
] | 134 | 2018-11-01T22:15:24.000Z | 2019-05-04T11:30:08.000Z | src/python/nimbusml/ensemble/output_combiner/classifierstacking.py | michaelgsharp/NimbusML | 50031157265f49eec85d27fe67582d9ddaf01ef9 | [
"MIT"
] | 226 | 2019-05-07T19:00:44.000Z | 2021-01-06T07:59:48.000Z | src/python/nimbusml/ensemble/output_combiner/classifierstacking.py | michaelgsharp/NimbusML | 50031157265f49eec85d27fe67582d9ddaf01ef9 | [
"MIT"
] | 43 | 2019-05-15T20:19:42.000Z | 2022-03-30T10:26:07.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------------------------
# - Generated by tools/entrypoint_co... | 31.847826 | 193 | 0.593174 |
5bf3c1268a2bad898575c87a48dbd637dfcc1779 | 2,441 | py | Python | hs_composite_resource/page_processors.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | hs_composite_resource/page_processors.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | hs_composite_resource/page_processors.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import messages
from django.contrib.messages import get_messages
from django.http import HttpResponseRedirect
from mezzanine.pages.page_processors import processor_for
from hs_core import page_processors
from hs_core.views import add_generic_context
from .models import CompositeResource
@processo... | 38.140625 | 95 | 0.661204 |
d70e0e5292e3c28ab1c74cffd972822ee009cf5d | 391 | py | Python | myparts/myparts/asgi.py | edcodes/Django-Parts-Inventory | 49e41666d854bc79f0a65debb2fedb534f2e2d51 | [
"Apache-2.0"
] | null | null | null | myparts/myparts/asgi.py | edcodes/Django-Parts-Inventory | 49e41666d854bc79f0a65debb2fedb534f2e2d51 | [
"Apache-2.0"
] | null | null | null | myparts/myparts/asgi.py | edcodes/Django-Parts-Inventory | 49e41666d854bc79f0a65debb2fedb534f2e2d51 | [
"Apache-2.0"
] | 2 | 2022-02-10T21:14:02.000Z | 2022-03-31T00:51:38.000Z | """
ASGI config for myparts project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTI... | 23 | 78 | 0.785166 |
fda0d162f80a83dfb83f4f12fde4088ec6db52f8 | 2,929 | py | Python | qiskit/aqua/algorithms/classical/exact_ls_solver/exact_ls_solver.py | Nick-Singstock/qiskit-aqua | 8c2bc57b78dec447faec3adbc966471a3206c2ef | [
"Apache-2.0"
] | 1 | 2020-11-06T01:09:28.000Z | 2020-11-06T01:09:28.000Z | qiskit/aqua/algorithms/classical/exact_ls_solver/exact_ls_solver.py | Nick-Singstock/qiskit-aqua | 8c2bc57b78dec447faec3adbc966471a3206c2ef | [
"Apache-2.0"
] | null | null | null | qiskit/aqua/algorithms/classical/exact_ls_solver/exact_ls_solver.py | Nick-Singstock/qiskit-aqua | 8c2bc57b78dec447faec3adbc966471a3206c2ef | [
"Apache-2.0"
] | 1 | 2020-11-06T01:09:43.000Z | 2020-11-06T01:09:43.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM Corp. 2017 and later.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.... | 30.831579 | 81 | 0.616251 |
3592638e4b25908a0ee99d07580467244a7eab90 | 2,066 | py | Python | tests/test_codec.py | Chrisa142857/CompressAI | 75760096b9700a58d346351251d544050f3418fb | [
"Apache-2.0"
] | 62 | 2021-08-10T01:25:44.000Z | 2022-03-31T07:53:35.000Z | tests/test_codec.py | Chrisa142857/CompressAI | 75760096b9700a58d346351251d544050f3418fb | [
"Apache-2.0"
] | 6 | 2021-08-12T06:40:55.000Z | 2022-03-09T15:34:50.000Z | tests/test_codec.py | Chrisa142857/CompressAI | 75760096b9700a58d346351251d544050f3418fb | [
"Apache-2.0"
] | 8 | 2021-08-06T02:03:12.000Z | 2022-03-22T19:33:08.000Z | # Copyright 2020 InterDigital Communications, 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 ... | 31.30303 | 75 | 0.612294 |
60ca8977a15642dc37560e5e885d4c6ee6213fc4 | 6,578 | py | Python | controllers/dc.py | rommelsotto/eden | 0e7326c559aa8d72f2934803b040321f597f45c4 | [
"MIT"
] | 27 | 2015-01-13T23:52:49.000Z | 2016-01-11T08:08:45.000Z | controllers/dc.py | rommelsotto/eden | 0e7326c559aa8d72f2934803b040321f597f45c4 | [
"MIT"
] | 140 | 2015-01-01T07:38:10.000Z | 2016-03-01T10:51:54.000Z | controllers/dc.py | rommelsotto/eden | 0e7326c559aa8d72f2934803b040321f597f45c4 | [
"MIT"
] | 109 | 2015-01-02T17:36:17.000Z | 2016-02-07T14:49:28.000Z | # -*- coding: utf-8 -*-
"""
Data Collection:
- a front-end UI to manage Assessments which uses the Dynamic Tables back-end
"""
module = request.controller
if not settings.has_module(module):
raise HTTP(404, body="Module disabled: %s" % module)
# ----------------------------------------------------------... | 36.342541 | 110 | 0.467923 |
92f119992f8dd0a6aa8d915b607484b2bfa3e39e | 2,383 | py | Python | redis/commands/json/__init__.py | davidylee/redis-py | 8924504f9875d3c80733504d6f6923f5611ebf17 | [
"MIT"
] | null | null | null | redis/commands/json/__init__.py | davidylee/redis-py | 8924504f9875d3c80733504d6f6923f5611ebf17 | [
"MIT"
] | null | null | null | redis/commands/json/__init__.py | davidylee/redis-py | 8924504f9875d3c80733504d6f6923f5611ebf17 | [
"MIT"
] | null | null | null | # from typing import Optional
from json import JSONDecoder, JSONEncoder
# # from redis.client import Redis
from .helpers import bulk_of_jsons
from ..helpers import nativestr, delist
from .commands import JSONCommands
# from ..feature import AbstractFeature
class JSON(JSONCommands):
"""
Create a client for t... | 28.035294 | 63 | 0.572388 |
f2a51fcaf7b1df1860738170e6f3358ddcdce4de | 2,740 | py | Python | playwithmpv/server.py | playallinmpv/playinmpv | 49f2c8d2b04645e808d8780b0f2c9dd359d4f4ce | [
"MIT"
] | 9 | 2022-01-28T05:02:12.000Z | 2022-03-26T06:54:53.000Z | playwithmpv/server.py | playallinmpv/playinmpv | 49f2c8d2b04645e808d8780b0f2c9dd359d4f4ce | [
"MIT"
] | 4 | 2022-02-13T14:28:16.000Z | 2022-03-14T19:18:00.000Z | playwithmpv/server.py | playallinmpv/playinmpv | 49f2c8d2b04645e808d8780b0f2c9dd359d4f4ce | [
"MIT"
] | 1 | 2022-01-01T20:19:45.000Z | 2022-01-01T20:19:45.000Z | # coding: utf-8
import os, sys
from flask import Flask
from flask_cors import CORS
from webargs import fields
from webargs.flaskparser import use_args
# --http-header-fields=
DEFAULT_USER_AGENT = (
'"referer:https://www.bilibili.com/","user-agent: Mozil'
"la/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.3... | 29.148936 | 86 | 0.593796 |
56f25bc60969373cf93c21f91e309918ab7e6548 | 13,194 | py | Python | tools/check_format.py | mju/envoy | 93d96b52b47ac2f296379c15b03946cb33c58252 | [
"Apache-2.0"
] | null | null | null | tools/check_format.py | mju/envoy | 93d96b52b47ac2f296379c15b03946cb33c58252 | [
"Apache-2.0"
] | 1 | 2018-07-23T15:14:27.000Z | 2018-07-24T21:53:29.000Z | tools/check_format.py | mju/envoy | 93d96b52b47ac2f296379c15b03946cb33c58252 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import argparse
import common
import fileinput
import multiprocessing
import os
import os.path
import re
import subprocess
import sys
import traceback
EXCLUDED_PREFIXES = ("./generated/", "./thirdparty/", "./build", "./.git/",
"./bazel-", "./bazel/external", "./.cache",
... | 40.103343 | 101 | 0.695771 |
dfa9cf2de9bd9719b08e3fd434d2263678660af8 | 19,331 | py | Python | train_student.py | EricZsy/BalancedKnowledgeDistillation | 88a2de840a3fc6eb2ee881c729f293b8e78714aa | [
"MIT"
] | 22 | 2021-04-23T02:52:33.000Z | 2022-03-23T03:28:50.000Z | train_student.py | EricZsy/BalancedKnowledgeDistillation | 88a2de840a3fc6eb2ee881c729f293b8e78714aa | [
"MIT"
] | null | null | null | train_student.py | EricZsy/BalancedKnowledgeDistillation | 88a2de840a3fc6eb2ee881c729f293b8e78714aa | [
"MIT"
] | 3 | 2021-06-10T11:46:43.000Z | 2022-03-31T11:30:08.000Z | import argparse
import os
import random
import time
import warnings
import sys
import numpy as np
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim
import torch.multiprocessing as mp
import torch.utils.data
import torchvision.transforms as transforms
imp... | 42.485714 | 117 | 0.614971 |
512159974e3c492a1a46938cc73cd8f6afdb7960 | 1,491 | py | Python | tests/ut/python/nn/test_clip_by_norm.py | GuoSuiming/mindspore | 48afc4cfa53d970c0b20eedfb46e039db2a133d5 | [
"Apache-2.0"
] | 3,200 | 2020-02-17T12:45:41.000Z | 2022-03-31T20:21:16.000Z | tests/ut/python/nn/test_clip_by_norm.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 176 | 2020-02-12T02:52:11.000Z | 2022-03-28T22:15:55.000Z | tests/ut/python/nn/test_clip_by_norm.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 621 | 2020-03-09T01:31:41.000Z | 2022-03-30T03:43:19.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 33.133333 | 78 | 0.654594 |
72db131eb7bd4c2e4f925b590fb6a39beb9bb23c | 3,028 | py | Python | src/img_manipulation.py | gruunday/CURART | 6e4265be2450c575e2a421aa6e0c167de993e784 | [
"Apache-2.0"
] | null | null | null | src/img_manipulation.py | gruunday/CURART | 6e4265be2450c575e2a421aa6e0c167de993e784 | [
"Apache-2.0"
] | 2 | 2019-05-26T11:08:47.000Z | 2019-05-26T11:09:13.000Z | src/img_manipulation.py | gruunday/CURART | 6e4265be2450c575e2a421aa6e0c167de993e784 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import cv2
import time
import glob, os
def get_keypoints(img):
'''
Takes an image and returns its keypoints and descriptors
img: cv2.imread object
returns: (matrix of key points, matrix of descriptors)
'''
# Load the sift algorithm
sift = cv2.xfeatures2d.SIFT_creat... | 28.838095 | 94 | 0.667768 |
13243c662eaf1e83e96d19b7279580e0ac2b5b2d | 9,545 | py | Python | utest/model/test_statistics.py | MaciejWiczk/robotframework | 33468e7090f9a925715076905992f5abf965d8f4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-10-26T07:31:30.000Z | 2020-10-26T07:31:30.000Z | utest/model/test_statistics.py | MaciejWiczk/robotframework | 33468e7090f9a925715076905992f5abf965d8f4 | [
"ECL-2.0",
"Apache-2.0"
] | 40 | 2020-11-06T08:30:26.000Z | 2022-03-02T10:06:51.000Z | utest/model/test_statistics.py | MaciejWiczk/robotframework | 33468e7090f9a925715076905992f5abf965d8f4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-11-23T03:44:31.000Z | 2020-11-23T03:44:31.000Z | import unittest
from robot.utils.asserts import assert_equal
from robot.model.statistics import Statistics
from robot.result import TestCase, TestSuite
def verify_stat(stat, name, passed, failed, combined=None,
id=None, elapsed=0):
assert_equal(stat.name, name, 'stat.name')
assert_equal(stat.... | 42.995495 | 95 | 0.581037 |
838daf1bd86266e3dcc5bfa3fdbf979e1e4138cb | 2,965 | py | Python | tests/test_updatable.py | am610/firecrown | b5b73cd9f23bc64840ec47fd48d302f19dd533f9 | [
"BSD-3-Clause"
] | null | null | null | tests/test_updatable.py | am610/firecrown | b5b73cd9f23bc64840ec47fd48d302f19dd533f9 | [
"BSD-3-Clause"
] | null | null | null | tests/test_updatable.py | am610/firecrown | b5b73cd9f23bc64840ec47fd48d302f19dd533f9 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from firecrown.updatable import Updatable, UpdatableCollection
from firecrown.parameters import RequiredParameters, ParamsMap
class Missing_update(Updatable):
"""A type that is abstract because it does not implement _update."""
def required_parameters(self): # pragma: no cover
return s... | 27.453704 | 84 | 0.659359 |
242cdecd8fbc3444c5cbe872c293f34697544136 | 743 | py | Python | localization_service/venv/bin/rst2html4.py | vladbragoi/indoor_localization_system | b98d278cbd6a2ff8dcc093631eed0605e9e3a35f | [
"Apache-2.0"
] | null | null | null | localization_service/venv/bin/rst2html4.py | vladbragoi/indoor_localization_system | b98d278cbd6a2ff8dcc093631eed0605e9e3a35f | [
"Apache-2.0"
] | null | null | null | localization_service/venv/bin/rst2html4.py | vladbragoi/indoor_localization_system | b98d278cbd6a2ff8dcc093631eed0605e9e3a35f | [
"Apache-2.0"
] | null | null | null | #!/home/vlad/tesi/python server/venv/bin/python
# $Id: rst2html4.py 7994 2016-12-10 17:41:45Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing (X)HTML.
The output conforms to XHTML 1.0 tran... | 27.518519 | 78 | 0.74428 |
f5cb63dcad28ea7b8a7dce7f35dc482ab7956ab5 | 2,765 | py | Python | client/tests/logging_utils_test.py | maruel/swarming | 8ab7568635fcbfd85a01884b64704fc2a1ac13c7 | [
"Apache-2.0"
] | 74 | 2015-04-01T02:35:15.000Z | 2021-12-17T22:10:56.000Z | client/tests/logging_utils_test.py | maruel/swarming | 8ab7568635fcbfd85a01884b64704fc2a1ac13c7 | [
"Apache-2.0"
] | 123 | 2015-04-01T04:02:57.000Z | 2022-03-02T12:49:55.000Z | client/tests/logging_utils_test.py | maruel/swarming | 8ab7568635fcbfd85a01884b64704fc2a1ac13c7 | [
"Apache-2.0"
] | 32 | 2015-04-03T01:40:47.000Z | 2021-11-13T15:20:13.000Z | #!/usr/bin/env vpython3
# Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
import logging
import os
import subprocess
import sys
import tempfile
import unittest
import re
# Mutates sys.path.
impor... | 30.384615 | 80 | 0.651718 |
72d28cb8f5258ee592d2706a4bf9322adfa5e65e | 6,209 | py | Python | python/profilo/model/ttypes.py | amanjeetsingh150/profilo | a0d626d1c3889bdbaaa5c12ca2d2606f0fee45da | [
"Apache-2.0"
] | 1 | 2020-03-24T23:51:43.000Z | 2020-03-24T23:51:43.000Z | python/profilo/model/ttypes.py | amanjeetsingh150/profilo | a0d626d1c3889bdbaaa5c12ca2d2606f0fee45da | [
"Apache-2.0"
] | 4 | 2021-03-11T04:11:14.000Z | 2022-02-27T09:35:19.000Z | python/profilo/model/ttypes.py | amanjeetsingh150/profilo | a0d626d1c3889bdbaaa5c12ca2d2606f0fee45da | [
"Apache-2.0"
] | null | null | null | """
Copyright 2018-present, Facebook, 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,... | 16.735849 | 136 | 0.661298 |
44c4fb1098dbeac79f8fcc626471ada0947a32ea | 1,288 | py | Python | setup.py | korvyashka/pykongregate | 8f6874c8674fd00d7408a4e31ff7386d301a1d01 | [
"MIT"
] | null | null | null | setup.py | korvyashka/pykongregate | 8f6874c8674fd00d7408a4e31ff7386d301a1d01 | [
"MIT"
] | null | null | null | setup.py | korvyashka/pykongregate | 8f6874c8674fd00d7408a4e31ff7386d301a1d01 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
from setuptools import setup, find_packages
import os
import sys
py_version = sys.version_info
try:
version = ".".join(
[str(i) for i in __import__('pykongregate').__VERSION__]
)
except:
# Warning: used only for tox
version = "uknown"
readme = os.path.joi... | 24.301887 | 66 | 0.680901 |
67048705c88c65812a46cbcb6ea304de6b02a9b6 | 12,693 | py | Python | tests/unit/test_tf_layers.py | ita9naiwa/NVTabular | 69fd3f56fc10cf20d02f868578bcd7c736248604 | [
"Apache-2.0"
] | 1 | 2021-08-31T08:21:09.000Z | 2021-08-31T08:21:09.000Z | tests/unit/test_tf_layers.py | beingaryan/NVTabular | 126c8e38ffe77ce36a228079776410d97580f992 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_tf_layers.py | beingaryan/NVTabular | 126c8e38ffe77ce36a228079776410d97580f992 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 39.542056 | 100 | 0.667455 |
26dae0186243c37fa5d8270d946d32a60a8a9100 | 28,537 | py | Python | hydragnn/postprocess/visualizer.py | pzhanggit/HydraGNN | 0af9f4e567338d0104e631d69988ab062f425fe4 | [
"BSD-3-Clause"
] | null | null | null | hydragnn/postprocess/visualizer.py | pzhanggit/HydraGNN | 0af9f4e567338d0104e631d69988ab062f425fe4 | [
"BSD-3-Clause"
] | null | null | null | hydragnn/postprocess/visualizer.py | pzhanggit/HydraGNN | 0af9f4e567338d0104e631d69988ab062f425fe4 | [
"BSD-3-Clause"
] | null | null | null | ##############################################################################
# Copyright (c) 2021, Oak Ridge National Laboratory #
# All rights reserved. #
# #
# Th... | 38.773098 | 199 | 0.51428 |
fa706d8a2d41fde3ba277a1c2697224fcd405ebc | 2,321 | py | Python | examples/BeerDistributionProblem.py | betterhours/pulp | 0618ec018bb33b1b77e5ff868162f7ffde9f1566 | [
"MIT"
] | 4 | 2019-08-13T20:26:15.000Z | 2021-07-05T15:52:45.000Z | examples/BeerDistributionProblem.py | betterhours/pulp | 0618ec018bb33b1b77e5ff868162f7ffde9f1566 | [
"MIT"
] | null | null | null | examples/BeerDistributionProblem.py | betterhours/pulp | 0618ec018bb33b1b77e5ff868162f7ffde9f1566 | [
"MIT"
] | 1 | 2019-12-03T17:11:35.000Z | 2019-12-03T17:11:35.000Z | """
The Beer Distribution Problem for the PuLP Modeller
Authors: Antony Phillips, Dr Stuart Mitchell 2007
"""
# Import PuLP modeler functions
from pulp import *
# Creates a list of all the supply nodes
Warehouses = ["A", "B"]
# Creates a dictionary for the number of units of supply for each supply node
supply = {"... | 32.236111 | 97 | 0.686342 |
7f5ff4231f4b0d9373600e812fc0898e661da928 | 37,153 | py | Python | pybind/nos/v7_1_0/interface/tengigabitethernet/ipv6/vrrpv3_group/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/interface/tengigabitethernet/ipv6/vrrpv3_group/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/interface/tengigabitethernet/ipv6/vrrpv3_group/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 77.563674 | 999 | 0.738675 |
e258d2536b8f324ea16aa8e818ddb322ef30922e | 1,374 | py | Python | scene/util.py | jyf588/pytorch-rl-bullet | 3ac1835d01e658b2078126895ffa0eb11304abb4 | [
"MIT"
] | null | null | null | scene/util.py | jyf588/pytorch-rl-bullet | 3ac1835d01e658b2078126895ffa0eb11304abb4 | [
"MIT"
] | null | null | null | scene/util.py | jyf588/pytorch-rl-bullet | 3ac1835d01e658b2078126895ffa0eb11304abb4 | [
"MIT"
] | null | null | null | import copy
from typing import *
def convert_scene_for_placing(opt, scene: List) -> Tuple:
"""Converts the scene into a modified scene for placing, with the following steps:
1. Denote the (x, y) location of object index 0 as the placing destination (x, y).
2. Remove object index 0 from the scene l... | 39.257143 | 90 | 0.705968 |
2dfd548e03b5375d2580ca5731e5cbe1e6805e82 | 478 | py | Python | math_operation.py | Te020370/python_lesson_2 | 8f91f3784497091a5c618731fbbb7fea2c5ee6b9 | [
"MIT"
] | 1 | 2020-03-30T16:26:46.000Z | 2020-03-30T16:26:46.000Z | math_operation.py | Te020370/python_lesson_2 | 8f91f3784497091a5c618731fbbb7fea2c5ee6b9 | [
"MIT"
] | null | null | null | math_operation.py | Te020370/python_lesson_2 | 8f91f3784497091a5c618731fbbb7fea2c5ee6b9 | [
"MIT"
] | null | null | null | a = input('First number: ')
b = input('Second number: ')
a = int(a)
b = int(b)
print(a+b)
print(a-b)
print(a*b)
result = a/b
print(type(result))
print(result)
print(a**2)
# Логические операции
a_1 = True
b_2 = False
# Логическое отрицание
print('Ответ')
print(not a_1)
# Логическо И
print('Ответ')
print(a_1 and ... | 11.95 | 28 | 0.650628 |
673b661beac523be480b7c7316b53b919dde60a9 | 4,193 | py | Python | test/functional/feature_notifications.py | foxdproject/foxdcoin | 9db505f6f32bd3e51bd2b2da533744c98cee23af | [
"MIT"
] | 7 | 2020-06-19T20:49:02.000Z | 2022-01-31T09:12:18.000Z | test/functional/feature_notifications.py | foxdproject/foxdcoin | 9db505f6f32bd3e51bd2b2da533744c98cee23af | [
"MIT"
] | 1 | 2021-02-26T19:14:11.000Z | 2021-02-26T19:14:11.000Z | test/functional/feature_notifications.py | foxdproject/foxdcoin | 9db505f6f32bd3e51bd2b2da533744c98cee23af | [
"MIT"
] | 12 | 2020-05-02T20:01:44.000Z | 2022-03-03T11:02:13.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Copyright (c) 2017-2019 The Raven Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test the -alertnotify, -blocknotify and -walletno... | 46.076923 | 167 | 0.663487 |
d465025ae1279331eef7d3c008bd68144efa9088 | 4,646 | py | Python | optimization/rgbd/step2_sparse_fusion.py | AvatarWorld/hifi3dface | fc2a7294f916e5a097247a5dffeac73ae5d0898e | [
"Apache-2.0"
] | 2 | 2021-09-10T10:04:01.000Z | 2021-09-10T10:05:12.000Z | optimization/rgbd/step2_sparse_fusion.py | xieydd/hifi3dface | 39b7fef458458d95cb4f8c6679a1ce941cb191e4 | [
"Apache-2.0"
] | null | null | null | optimization/rgbd/step2_sparse_fusion.py | xieydd/hifi3dface | 39b7fef458458d95cb4f8c6679a1ce941cb191e4 | [
"Apache-2.0"
] | 1 | 2021-09-10T10:03:55.000Z | 2021-09-10T10:03:55.000Z | # -*- coding:utf8 -*-
"""
This file is part of the repo: https://github.com/tencent-ailab/hifi3dface
If you find the code useful, please cite our paper:
"High-Fidelity 3D Digital Human Creation from RGB-D Selfies."
Xiangkai Lin*, Yajing Chen*, Linchao Bao*, Haoxian Zhang, Sheng Wang, Xuefei Zhe, Xinwei Jiang, Jue Wa... | 32.263889 | 135 | 0.702109 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.