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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b5ec5b3c5325c6647257558f508d48973873aa8c | 10,505 | py | Python | collector_center_sdk/model/cmdb/object_basic_info_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | collector_center_sdk/model/cmdb/object_basic_info_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | collector_center_sdk/model/cmdb/object_basic_info_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: object_basic_info.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.pr... | 50.504808 | 1,051 | 0.741456 |
f85127ede3f6ee28b3566ad6faef9e6312b99853 | 2,010 | py | Python | flexget/plugins/sites/eztv.py | tarzasai/Flexget | e5822874b2ee088b508390ff02c4eda9785596bc | [
"MIT"
] | 1 | 2018-05-02T21:14:50.000Z | 2018-05-02T21:14:50.000Z | flexget/plugins/sites/eztv.py | tarzasai/Flexget | e5822874b2ee088b508390ff02c4eda9785596bc | [
"MIT"
] | null | null | null | flexget/plugins/sites/eztv.py | tarzasai/Flexget | e5822874b2ee088b508390ff02c4eda9785596bc | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
from future.moves.urllib.parse import urlparse, urlunparse
import re
import logging
from requests import RequestException
from flexget import plugin
from flexget.event import ... | 31.40625 | 87 | 0.629851 |
f4a2dfb67a560cfc4f6d08ba7ec4ab8fdddaafb3 | 828 | py | Python | setup.py | neonnnnn/pyrfm | e88fe8cb7bf3062616d33826e955e828fc6d8ba6 | [
"BSD-2-Clause"
] | 7 | 2020-05-31T01:47:27.000Z | 2021-12-26T03:45:14.000Z | setup.py | neonnnnn/pyrfm | e88fe8cb7bf3062616d33826e955e828fc6d8ba6 | [
"BSD-2-Clause"
] | 2 | 2019-12-01T01:18:38.000Z | 2020-08-27T12:07:26.000Z | setup.py | neonnnnn/pyrfm | e88fe8cb7bf3062616d33826e955e828fc6d8ba6 | [
"BSD-2-Clause"
] | 3 | 2021-03-17T13:46:56.000Z | 2022-03-18T21:43:45.000Z | from __future__ import print_function
import os.path
import sys
import setuptools
from numpy.distutils.core import setup
DISTNAME = 'pyrfm'
DESCRIPTION = 'A python library for random feature maps.'
VERSION = '1.0.0'
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Config... | 23.657143 | 62 | 0.699275 |
a1b9baadc91d848aad06a02f583218ba7cb78fd3 | 4,462 | py | Python | ui/flask_ui/app.py | Smithsonian/Mass-Georeferencing | bb7d81cd82684900003d3049764cd2d243325248 | [
"Apache-2.0"
] | 5 | 2020-06-24T16:12:48.000Z | 2021-11-08T09:46:02.000Z | ui/flask_ui/app.py | Smithsonian/Mass-Georeferencing | bb7d81cd82684900003d3049764cd2d243325248 | [
"Apache-2.0"
] | 8 | 2020-07-06T21:11:58.000Z | 2020-07-22T13:10:48.000Z | ui/flask_ui/app.py | Smithsonian/Mass-Georeferencing | bb7d81cd82684900003d3049764cd2d243325248 | [
"Apache-2.0"
] | null | null | null | #!flask/bin/python
#
# Flask test app
#
from flask import Flask, jsonify, request
from flask import Response
from flask import render_template
import simplejson as json
import logging
import locale
app_ver = "0.1"
# logging.basicConfig(stream=sys.stderr)
logging.basicConfig(filename='app.log',
le... | 29.355263 | 116 | 0.621022 |
9fce93a38fbe46e5e48b88c77f26cf8b35d8447c | 4,676 | py | Python | pipeline/benchmark.py | Atrus619/DeckOfCards | bf0668ea26041e7faab2b88a03d42ba6887d054a | [
"MIT"
] | 1 | 2019-06-27T12:14:38.000Z | 2019-06-27T12:14:38.000Z | pipeline/benchmark.py | Atrus619/DeckOfCards | bf0668ea26041e7faab2b88a03d42ba6887d054a | [
"MIT"
] | 18 | 2019-07-14T17:40:22.000Z | 2019-11-11T01:54:07.000Z | pipeline/benchmark.py | Atrus619/DeckOfCards | bf0668ea26041e7faab2b88a03d42ba6887d054a | [
"MIT"
] | null | null | null | from config import Config as cfg
from pinochle.Game import Game
from util import db
from classes.Agent import Agent
from classes.Epsilon import Epsilon
import logging
import util.util as util
from classes.Human import Human
from util.Constants import Constants as cs
import matplotlib.pyplot as plt
from collections impo... | 36.818898 | 147 | 0.673225 |
1e71964b744d46f34bb0ed3f9b9c9cae6fdb2a9a | 3,092 | py | Python | connectionManager.py | DanijelMi/ChuckTesta | 0fbee58691f2b72b3400af4f993c8956dffe6762 | [
"MIT"
] | null | null | null | connectionManager.py | DanijelMi/ChuckTesta | 0fbee58691f2b72b3400af4f993c8956dffe6762 | [
"MIT"
] | null | null | null | connectionManager.py | DanijelMi/ChuckTesta | 0fbee58691f2b72b3400af4f993c8956dffe6762 | [
"MIT"
] | null | null | null | import network # For WiFI connection
from robust import MQTTClient
from ubinascii import hexlify
from machine import unique_id
# Change the file names from where to read configuration parameters
AP_FILENAME = "ap.txt"
WIFI_FILENAME = "wifi.txt"
MQTT_FILENAME = "mqtt.txt"
info = None
ID = hexlify(unique_i... | 32.208333 | 102 | 0.573739 |
f534fb1b0f1ee9f55bd8cdf65d71c31dd0e0dc93 | 40,948 | py | Python | restapi/flask_ext/flask_irods/client.py | beetleman/http-api | 6839e57543cf492e1f281ca9f5604c0058a17f81 | [
"MIT"
] | null | null | null | restapi/flask_ext/flask_irods/client.py | beetleman/http-api | 6839e57543cf492e1f281ca9f5604c0058a17f81 | [
"MIT"
] | null | null | null | restapi/flask_ext/flask_irods/client.py | beetleman/http-api | 6839e57543cf492e1f281ca9f5604c0058a17f81 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from functools import lru_cache
from flask import request, stream_with_context, Response
from utilities import htmlcodes as hcodes
from irods.access import iRODSAccess
from irods.rule import Rule
from irods.ticket import Ticket
from irods.models import User, UserGroup, UserAuth
from ... | 33.426939 | 87 | 0.537242 |
a97adecdf0a8f6ae3f59c4da2cdf1a1c4839ef71 | 579 | py | Python | Playground/bubble_sort.py | jonasluz/mia-cana | 834550622a2968c5c3f8a2a90f6e9cd41603ee57 | [
"Unlicense"
] | null | null | null | Playground/bubble_sort.py | jonasluz/mia-cana | 834550622a2968c5c3f8a2a90f6e9cd41603ee57 | [
"Unlicense"
] | null | null | null | Playground/bubble_sort.py | jonasluz/mia-cana | 834550622a2968c5c3f8a2a90f6e9cd41603ee57 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Mar 19 15:38:56 2017
@author: Jonas Luz Jr. <unifor@jonasluz.com>
Implementação do algoritmo de ordenação do método da bolha... bubblesort.
"""
def bubbleSort(values: list) -> list:
"""
Método de ordenação da bolha (ineficiente).
"""
for i in range(0, ... | 22.269231 | 73 | 0.568221 |
a36e3cae1c05271d7f3d6e7c6b2c3b8c5a5156c5 | 547 | py | Python | 6 kyu/Reverse polish notation calculator.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 6 | 2020-09-03T09:32:25.000Z | 2020-12-07T04:10:01.000Z | 6 kyu/Reverse polish notation calculator.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 1 | 2021-12-13T15:30:21.000Z | 2021-12-13T15:30:21.000Z | 6 kyu/Reverse polish notation calculator.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | null | null | null | def calc(expr):
try:
return eval(expr)
except:
if not expr:
return 0
res=expr.split()
while "+" in res or "-" in res or "*" in res or "/" in res:
for i,j in enumerate(res):
if j in "+-*/":
index=i
br... | 30.388889 | 67 | 0.429616 |
da7b89012f14c71b389a8a9f21dc9cd04d1c2e25 | 18,946 | py | Python | installCLI.py | oksanagit/installSynApps | fe1c774661901d28c05f4b5791b9821c06f666b7 | [
"BSD-3-Clause"
] | null | null | null | installCLI.py | oksanagit/installSynApps | fe1c774661901d28c05f4b5791b9821c06f666b7 | [
"BSD-3-Clause"
] | null | null | null | installCLI.py | oksanagit/installSynApps | fe1c774661901d28c05f4b5791b9821c06f666b7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Python script for running the installSynApps module through the CLI
usage: installCLI.py [-h] [-y] [-d] [-c CUSTOMCONFIGURE] [-t THREADS] [-s]
[-i INSTALLPATH] [-n] [-p] [-v]
installSynApps for CLI EPICS and synApps auto-compilation
optional arguments:
-h, --help ... | 42.961451 | 175 | 0.650744 |
1bc8887e723c6fac70e3bee53d64daacc71f8fa1 | 160,003 | py | Python | peeringdb_server/models.py | jlamanna/peeringdb | 1eda45ffeb6dbaf5d37545305b57beb16c02653d | [
"BSD-2-Clause"
] | 224 | 2016-10-13T10:32:33.000Z | 2022-03-23T13:08:48.000Z | peeringdb_server/models.py | jlamanna/peeringdb | 1eda45ffeb6dbaf5d37545305b57beb16c02653d | [
"BSD-2-Clause"
] | 1,063 | 2016-06-07T02:57:11.000Z | 2022-03-31T00:08:07.000Z | peeringdb_server/models.py | jlamanna/peeringdb | 1eda45ffeb6dbaf5d37545305b57beb16c02653d | [
"BSD-2-Clause"
] | 92 | 2016-10-22T14:59:40.000Z | 2022-03-26T11:30:12.000Z | """
Django model definitions (database schema).
## django-peeringdb
peeringdb_server uses the abstract models from django-peeringdb.
Often, it makes the most sense for a field to be added to the abstraction
in django-peeringdb, so it can be available for people using local snapshots of the databases.
Generally spea... | 30.160792 | 170 | 0.597701 |
88d539daef626bd71f775af32c6056e5c89f330a | 3,018 | py | Python | src/compas/geometry/trimesh/remesh.py | ricardoavelino/compas | e3c7f004b8839f96bf01f9f6b21a75786c3f59fa | [
"MIT"
] | null | null | null | src/compas/geometry/trimesh/remesh.py | ricardoavelino/compas | e3c7f004b8839f96bf01f9f6b21a75786c3f59fa | [
"MIT"
] | null | null | null | src/compas/geometry/trimesh/remesh.py | ricardoavelino/compas | e3c7f004b8839f96bf01f9f6b21a75786c3f59fa | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from compas.plugins import pluggable
__all__ = [
'trimesh_remesh',
'trimesh_remesh_constrained',
'trimesh_remesh_along_isoline',
]
@pluggable(category='trimesh')
def trimesh_remesh(mesh, target_... | 30.18 | 116 | 0.674288 |
6315a92cd94ac708da1f2ba23a28f482f560bc04 | 19,181 | py | Python | tests/unit/test_http_session.py | vemel/botocore | 72039648c2880379e512824332c76eb5bf73ed34 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_http_session.py | vemel/botocore | 72039648c2880379e512824332c76eb5bf73ed34 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_http_session.py | vemel/botocore | 72039648c2880379e512824332c76eb5bf73ed34 | [
"Apache-2.0"
] | null | null | null | import socket
import pytest
from urllib3.exceptions import NewConnectionError, ProtocolError, ProxyError
from botocore.awsrequest import (
AWSHTTPConnectionPool,
AWSHTTPSConnectionPool,
AWSRequest,
)
from botocore.exceptions import (
ConnectionClosedError,
EndpointConnectionError,
ProxyConnect... | 37.24466 | 83 | 0.621918 |
cc64b4e3383c365e49e6cbc66ea7a56cd15880eb | 5,658 | py | Python | myprojectenv/lib/python3.5/site-packages/ansible/modules/cloud/amazon/ec2_win_password.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | myprojectenv/lib/python3.5/site-packages/ansible/modules/cloud/amazon/ec2_win_password.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | myprojectenv/lib/python3.5/site-packages/ansible/modules/cloud/amazon/ec2_win_password.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# This is a 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) any later version.
#
# This Ansible library is distributed in the hope that i... | 30.918033 | 144 | 0.675327 |
97fc5d8ad783829f502455952a3941648669ed71 | 98,061 | py | Python | Lib/test/test_pathlib.py | xuchanglong/Python-3.8.2-comments | f873f0b45b086c40a704c802e93e9a9c571aba83 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/test/test_pathlib.py | xuchanglong/Python-3.8.2-comments | f873f0b45b086c40a704c802e93e9a9c571aba83 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/test/test_pathlib.py | xuchanglong/Python-3.8.2-comments | f873f0b45b086c40a704c802e93e9a9c571aba83 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | import collections.abc
import io
import os
import sys
import errno
import pathlib
import pickle
import socket
import stat
import tempfile
import unittest
from unittest import mock
from test import support
from test.support import TESTFN, FakePath
try:
import grp, pwd
except ImportError:
grp = pwd = None
cla... | 40.537826 | 96 | 0.539124 |
610664a3f36b9bba58a4ce2cbc6724c50bd4196a | 11,430 | py | Python | interactive.py | ghchen18/acl22_sixtp | 445f1711f0ca7fff1abace00bdca3151b56dc769 | [
"MIT"
] | null | null | null | interactive.py | ghchen18/acl22_sixtp | 445f1711f0ca7fff1abace00bdca3151b56dc769 | [
"MIT"
] | null | null | null | interactive.py | ghchen18/acl22_sixtp | 445f1711f0ca7fff1abace00bdca3151b56dc769 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3 -u
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Translate raw text with a trained model. Batches data on-the-fly.
"""
import ast
import fileinput
import logging... | 36.170886 | 90 | 0.595626 |
bbacc9b957d305d91b30bc0bb0a470e2c953dc6c | 6,289 | py | Python | examples/bnp_competition/scripts/bnp_model.py | machinebrains/neat-society | 395c092083aa62ac8ad2a93a9afde659ecbd85fd | [
"BSD-3-Clause"
] | 2 | 2018-03-03T16:30:09.000Z | 2022-01-02T17:02:22.000Z | examples/bnp_competition/scripts/bnp_model.py | machinebrains/neat-society | 395c092083aa62ac8ad2a93a9afde659ecbd85fd | [
"BSD-3-Clause"
] | null | null | null | examples/bnp_competition/scripts/bnp_model.py | machinebrains/neat-society | 395c092083aa62ac8ad2a93a9afde659ecbd85fd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
###################################################################################################################
### This code is developed by HighEnergyDataScientests Team.
### Do not copy or modify without written approval from one of the team members.
############################################... | 35.331461 | 140 | 0.63778 |
036d2a3bcc4407671d720f7ee3eed816815b8a55 | 6,808 | py | Python | ros/src/tl_detector/tl_detector.py | GitHubChuanYu/T3Project4_SystemIntegration | 1cd2224c5b94292927441e46df137749a0520f09 | [
"MIT"
] | null | null | null | ros/src/tl_detector/tl_detector.py | GitHubChuanYu/T3Project4_SystemIntegration | 1cd2224c5b94292927441e46df137749a0520f09 | [
"MIT"
] | 8 | 2020-01-28T22:44:30.000Z | 2022-02-10T01:24:18.000Z | ros/src/tl_detector/tl_detector.py | GitHubChuanYu/T3Project4_SystemIntegration | 1cd2224c5b94292927441e46df137749a0520f09 | [
"MIT"
] | 1 | 2019-05-29T01:41:18.000Z | 2019-05-29T01:41:18.000Z | #!/usr/bin/env python
import rospy
from std_msgs.msg import Int32
from geometry_msgs.msg import PoseStamped, Pose
from styx_msgs.msg import TrafficLightArray, TrafficLight
from styx_msgs.msg import Lane, Waypoint
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
from light_classification.tl_classifier im... | 35.831579 | 132 | 0.64292 |
cf0cb877a1bab452b37fa092d6bb284bfd5051d8 | 3,791 | py | Python | src/docker_merger.py | wct-devops/compact | 0403ebe8c9bbfb8051b64a89993e6298e2c32d75 | [
"MIT"
] | 2 | 2019-10-27T07:11:05.000Z | 2020-02-19T05:34:19.000Z | src/docker_merger.py | wct-devops/compact | 0403ebe8c9bbfb8051b64a89993e6298e2c32d75 | [
"MIT"
] | 2 | 2020-02-19T10:03:22.000Z | 2021-04-08T02:35:24.000Z | src/docker_merger.py | wct-devops/compact | 0403ebe8c9bbfb8051b64a89993e6298e2c32d75 | [
"MIT"
] | 1 | 2021-04-07T14:44:20.000Z | 2021-04-07T14:44:20.000Z | import os
import sys
import json
UNFOLD_DIR = "unfold"
SHARED_DIR = os.path.join(UNFOLD_DIR, "shared" )
os.path.exists(UNFOLD_DIR) or os.makedirs(UNFOLD_DIR)
os.path.exists(SHARED_DIR) or os.makedirs(SHARED_DIR)
SHAID_EXISTS = {}
RESTORE_LAYERS = {}
merge_res_list=[]
if len(os.sys.argv) > 1 :
for line in op... | 37.166667 | 156 | 0.593775 |
036bc5af479029d3fa2e4e6a937bca7f78146171 | 16,211 | py | Python | gs_api_client/swagger/models/snapshot_schedule_get_response.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | 7 | 2019-07-12T13:59:45.000Z | 2021-03-16T08:46:20.000Z | gs_api_client/swagger/models/snapshot_schedule_get_response.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | 13 | 2020-01-23T07:50:29.000Z | 2022-03-21T14:32:40.000Z | gs_api_client/swagger/models/snapshot_schedule_get_response.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | null | null | null | # coding: utf-8
"""
API Specification
# Introduction Welcome to gridscales API documentation. A REST API is a programming interface that allows you to access and send data directly to our systems using HTTPS requests, without the need to use a web GUI. All the functionality you are already familiar with in y... | 137.381356 | 12,787 | 0.714515 |
3ce8afc6083763666bd9cdeb0210a0a7ae52bea3 | 144 | py | Python | flaskprediction/__init__.py | killswitchh/flask-prediction-app | a8bdff96fa2dc05544991a705970d1550ac9a034 | [
"MIT"
] | null | null | null | flaskprediction/__init__.py | killswitchh/flask-prediction-app | a8bdff96fa2dc05544991a705970d1550ac9a034 | [
"MIT"
] | 1 | 2020-08-29T18:39:05.000Z | 2020-08-30T09:43:47.000Z | flaskprediction/__init__.py | killswitchh/flask-prediction-app | a8bdff96fa2dc05544991a705970d1550ac9a034 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
app.config['SECRET_KEY'] = '5791628bb0b13ce0c676dfde280ba245'
from flaskprediction import routes | 24 | 61 | 0.819444 |
1764e879c1686e889d32c2a5373dd9a6b30d0cca | 1,222 | py | Python | emsapi/models/adi_ems_web_api_v2_dto_trajectory_configuration_py3.py | ge-flight-analytics/emsapi-python | 2e3a53529758f1bd7a2a850119b1cc1b5ac552e3 | [
"MIT"
] | null | null | null | emsapi/models/adi_ems_web_api_v2_dto_trajectory_configuration_py3.py | ge-flight-analytics/emsapi-python | 2e3a53529758f1bd7a2a850119b1cc1b5ac552e3 | [
"MIT"
] | 2 | 2020-01-16T00:04:35.000Z | 2021-05-26T21:04:06.000Z | emsapi/models/adi_ems_web_api_v2_dto_trajectory_configuration_py3.py | ge-flight-analytics/emsapi-python | 2e3a53529758f1bd7a2a850119b1cc1b5ac552e3 | [
"MIT"
] | 1 | 2021-02-23T08:25:12.000Z | 2021-02-23T08:25:12.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | 38.1875 | 92 | 0.618658 |
e170d133600dd4617b205e2d1c75a446829ed0d2 | 6,796 | py | Python | AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-13T00:01:12.000Z | 2021-09-13T00:01:12.000Z | AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | null | null | null | AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-07-20T11:07:25.000Z | 2021-07-20T11:07:25.000Z | """
Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import azlmbr
import azlmbr.l... | 49.246377 | 155 | 0.672013 |
1343e54bd73e19babd16c4cf6bb7b37271364629 | 5,189 | py | Python | arcade/examples/sprite_bullets.py | janscas/arcade | d83dda946563429c8ee7d1a036bc0407758c638f | [
"MIT"
] | 824 | 2016-01-07T19:27:57.000Z | 2020-08-01T03:15:47.000Z | arcade/examples/sprite_bullets.py | janscas/arcade | d83dda946563429c8ee7d1a036bc0407758c638f | [
"MIT"
] | 646 | 2016-01-08T02:42:31.000Z | 2020-08-03T14:13:27.000Z | arcade/examples/sprite_bullets.py | janscas/arcade | d83dda946563429c8ee7d1a036bc0407758c638f | [
"MIT"
] | 221 | 2016-01-07T22:36:33.000Z | 2020-07-24T23:30:08.000Z | """
Sprite Bullets
Simple program to show basic sprite usage.
Artwork from https://kenney.nl
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_bullets
"""
import random
import arcade
import os
SPRITE_SCALING_PLAYER = 0.5
SPRITE_SCALING_COIN = 0.... | 29.151685 | 103 | 0.621507 |
97cdac24f052deec3cde2cddb5ed058de2028756 | 19,496 | py | Python | PyRoute/Galaxy.py | elsiehupp/traveller_pyroute | 32a43665910894896b807576125acee56ef02797 | [
"MIT"
] | 12 | 2017-02-09T08:58:16.000Z | 2021-09-04T22:12:57.000Z | PyRoute/Galaxy.py | elsiehupp/traveller_pyroute | 32a43665910894896b807576125acee56ef02797 | [
"MIT"
] | 23 | 2017-07-14T05:04:30.000Z | 2022-03-27T02:20:06.000Z | PyRoute/Galaxy.py | elsiehupp/traveller_pyroute | 32a43665910894896b807576125acee56ef02797 | [
"MIT"
] | 4 | 2016-12-31T06:23:47.000Z | 2022-03-03T19:36:43.000Z | """
Created on Mar 2, 2014
@author: tjoneslo
"""
import logging
import re
import codecs
import os
import ast
import itertools
import math
import networkx as nx
from Star import Star
from TradeCalculation import TradeCalculation, NoneCalculation, CommCalculation, XRouteCalculation, \
OwnedWorldCalculation
from St... | 39.706721 | 130 | 0.559756 |
ac3c8483acd685187bb1fae82a7cebd6feee8f8f | 6,195 | py | Python | kmeans.py | sylvarant/learn-to-hash | 1acd92935fe4f1c508d35c9822d591a1a25ab749 | [
"MIT"
] | 58 | 2019-10-30T05:25:46.000Z | 2022-03-01T05:07:23.000Z | kmeans.py | sylvarant/learn-to-hash | 1acd92935fe4f1c508d35c9822d591a1a25ab749 | [
"MIT"
] | 7 | 2019-12-23T13:51:48.000Z | 2021-01-20T05:26:32.000Z | kmeans.py | sylvarant/learn-to-hash | 1acd92935fe4f1c508d35c9822d591a1a25ab749 | [
"MIT"
] | 10 | 2019-11-02T07:24:39.000Z | 2021-08-06T14:08:46.000Z | import numpy as np
import torch
import random
import sys
import utils
import pdb
'''
Class for running Lloyd iterations for k-means and associated utility functions.
'''
chunk_size = 8192
num_iterations = 60
k = 10
device = utils.device
device_cpu = torch.device('cpu')
class FastKMeans:
def __init__(self, data... | 35.603448 | 116 | 0.60226 |
1e0de00f03477c636154dbcb3a44f30607f55686 | 9,050 | py | Python | built-in/TensorFlow/Official/nlp/Transformer_for_TensorFlow/noahnmt/utils/quantize_utils.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 12 | 2020-12-13T08:34:24.000Z | 2022-03-20T15:17:17.000Z | built-in/TensorFlow/Official/nlp/Transformer_for_TensorFlow/noahnmt/utils/quantize_utils.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 1 | 2022-01-20T03:11:05.000Z | 2022-01-20T06:53:39.000Z | built-in/TensorFlow/Official/nlp/Transformer_for_TensorFlow/noahnmt/utils/quantize_utils.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 2 | 2021-07-10T12:40:46.000Z | 2021-12-17T07:55:15.000Z | # coding=utf-8
# Copyright Huawei Noah's Ark Lab.
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/l... | 34.942085 | 106 | 0.629392 |
3eb3a13f687ffe28bd2d89272f0f31cfc11b4323 | 100 | py | Python | tests/pip/data/stpkg/stpkg/submod.py | mrshu/stash | 773d15b8fb3853a65c15fe160bf5584c99437170 | [
"MIT"
] | 1,822 | 2015-01-10T21:46:31.000Z | 2022-03-28T13:07:15.000Z | tests/pip/data/stpkg/stpkg/submod.py | geoffrey777/stash | 2cbe1d494e62af1d98cd4f1fcaca20e894b249d0 | [
"MIT"
] | 362 | 2015-01-01T11:06:17.000Z | 2022-03-29T14:54:13.000Z | tests/pip/data/stpkg/stpkg/submod.py | geoffrey777/stash | 2cbe1d494e62af1d98cd4f1fcaca20e894b249d0 | [
"MIT"
] | 261 | 2015-01-10T21:45:17.000Z | 2022-03-28T11:27:21.000Z | # -*- coding: utf-8 -*-
"""submodule test"""
def main():
print("local pip test successfull!")
| 14.285714 | 40 | 0.58 |
fb00bf0516332122a499f01330c65e012f2ae15a | 2,565 | py | Python | tools/external/amitools/amitools/tools/fdtool.py | pararaum/-alpine-amiga_examples | fd81af3cca204ba543dac8ef697aa41839b80155 | [
"BSD-2-Clause"
] | 84 | 2016-04-12T02:00:32.000Z | 2022-02-22T04:51:17.000Z | tools/external/amitools/amitools/tools/fdtool.py | pararaum/-alpine-amiga_examples | fd81af3cca204ba543dac8ef697aa41839b80155 | [
"BSD-2-Clause"
] | 1 | 2021-06-27T09:59:04.000Z | 2021-06-27T09:59:04.000Z | tools/external/amitools/amitools/tools/fdtool.py | pararaum/-alpine-amiga_examples | fd81af3cca204ba543dac8ef697aa41839b80155 | [
"BSD-2-Clause"
] | 16 | 2016-09-22T14:44:05.000Z | 2021-12-25T08:03:56.000Z | #!/usr/bin/env python2.7
#
# fdtool <file.fd> ...
#
import sys
import argparse
import amitools.fd.FDFormat as FDFormat
# ----- dump -----
def dump(fname, fd, add_private):
print(fname)
print(" base: %s" % fd.get_base_name())
funcs = fd.get_funcs()
num = 1
for f in funcs:
if add_private or not f.is_pr... | 29.147727 | 118 | 0.604288 |
da8d695c59b9ebe83ef564dbf9e0d4e0d7a2f0a6 | 11,447 | py | Python | venv/Lib/site-packages/pandas/core/arrays/sparse/accessor.py | itsAbdulKhadar/Machine-Learning-with-Streamlit | c8a0c7ca5a1bcf2730ae9587bcddfebe323965a3 | [
"MIT"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | venv/Lib/site-packages/pandas/core/arrays/sparse/accessor.py | itsAbdulKhadar/Machine-Learning-with-Streamlit | c8a0c7ca5a1bcf2730ae9587bcddfebe323965a3 | [
"MIT"
] | 37 | 2020-10-20T08:30:53.000Z | 2020-12-22T13:15:45.000Z | venv/Lib/site-packages/pandas/core/arrays/sparse/accessor.py | itsAbdulKhadar/Machine-Learning-with-Streamlit | c8a0c7ca5a1bcf2730ae9587bcddfebe323965a3 | [
"MIT"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | """Sparse accessor"""
import numpy as np
from pandas.compat._optional import import_optional_dependency
from pandas.core.dtypes.cast import find_common_type
from pandas.core.accessor import PandasDelegate, delegate_names
from pandas.core.arrays.sparse.array import SparseArray
from pandas.core.arrays.sparse.dtype im... | 30.444149 | 86 | 0.545208 |
781e3f61481bb330956ed86d4f1b0335f6e98e22 | 3,633 | py | Python | utils/spike-push-file-to-slot.py | SpudGunMan/spikedev | ab1860b6c85239c96172b3a4a4b96d13c9a65d3d | [
"MIT"
] | 23 | 2020-01-12T02:59:03.000Z | 2022-03-16T14:00:56.000Z | utils/spike-push-file-to-slot.py | SpudGunMan/spikedev | ab1860b6c85239c96172b3a4a4b96d13c9a65d3d | [
"MIT"
] | 2 | 2020-04-20T02:16:59.000Z | 2021-11-28T22:08:31.000Z | utils/spike-push-file-to-slot.py | SpudGunMan/spikedev | ab1860b6c85239c96172b3a4a4b96d13c9a65d3d | [
"MIT"
] | 11 | 2020-06-17T11:44:15.000Z | 2022-01-29T20:39:52.000Z | #!/usr/bin/env python3
"""
Push a micropython file to one of SPIKE's program slots
"""
# standard libraries
import argparse
import logging
import os
import random
import string
import subprocess
import sys
from pprint import pformat
log = logging.getLogger(__name__)
MIN_SLOT = 0
MAX_SLOT = 19
def spike_push_file_... | 31.318966 | 111 | 0.657859 |
b89d4a22d52d6d572fe535f3a05c1f120e0e2da9 | 712 | py | Python | functions/name_columns.py | kaymal/price-project | 20c9166c65b10da6e9ecd0475172a30483853781 | [
"MIT"
] | 2 | 2019-06-15T18:49:23.000Z | 2019-06-20T12:21:42.000Z | functions/name_columns.py | kaymal/price-project | 20c9166c65b10da6e9ecd0475172a30483853781 | [
"MIT"
] | null | null | null | functions/name_columns.py | kaymal/price-project | 20c9166c65b10da6e9ecd0475172a30483853781 | [
"MIT"
] | 2 | 2020-11-27T20:36:12.000Z | 2020-12-09T23:10:28.000Z | def name_columns(data):
'''
Name columns with underscore(_) convention.
'''
# Clean "\n"s from the column names
data.columns = data.columns.str.strip("\n")
# Make lowercase
data.columns = data.columns.str.lower()
# Replace space with underscore(_)
data.columns = data.columns.st... | 27.384615 | 55 | 0.578652 |
6af136f59ad9e3c9611efeb048e889d3d37900f6 | 97 | py | Python | tests/integration/testing_project/apps/polls/apps.py | swiatekm/django-test-migrations | 628f650d2c076ce8ad44222d1a6c674ded90a48a | [
"MIT"
] | 4 | 2019-07-26T12:42:42.000Z | 2020-01-27T07:45:09.000Z | tests/integration/testing_project/apps/polls/apps.py | swiatekm/django-test-migrations | 628f650d2c076ce8ad44222d1a6c674ded90a48a | [
"MIT"
] | 37 | 2019-10-18T18:10:14.000Z | 2020-01-31T07:46:23.000Z | tests/integration/testing_project/apps/polls/apps.py | swiatekm/django-test-migrations | 628f650d2c076ce8ad44222d1a6c674ded90a48a | [
"MIT"
] | 1 | 2019-08-03T15:54:50.000Z | 2019-08-03T15:54:50.000Z | from django.apps.config import AppConfig
class PollsConfig(AppConfig):
name = 'apps.polls'
| 16.166667 | 40 | 0.752577 |
ccdb6cf55b33aee80abcb8c333a4c8c6b1edad70 | 44,110 | py | Python | python/ccxt/async_support/hitbtc.py | xCuri0/ccxt | bf3d10e0d3c1defb9aba9e81caa57cad0187fa5c | [
"MIT"
] | 4 | 2019-03-18T04:07:18.000Z | 2019-09-15T07:31:56.000Z | python/ccxt/async_support/hitbtc.py | xCuri0/ccxt | bf3d10e0d3c1defb9aba9e81caa57cad0187fa5c | [
"MIT"
] | 1 | 2019-05-16T07:49:46.000Z | 2019-05-16T07:49:46.000Z | python/ccxt/async_support/hitbtc.py | xCuri0/ccxt | bf3d10e0d3c1defb9aba9e81caa57cad0187fa5c | [
"MIT"
] | 2 | 2021-01-03T07:55:47.000Z | 2021-04-16T11:10:53.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import A... | 40.95636 | 189 | 0.503786 |
084d6cc25738cbc9633ef6817e4763ca23ce8676 | 3,724 | py | Python | tests/test_models/test_dense_heads/test_sam_reppoints_head.py | williamcorsel/mmrotate | 00a3b9af34c4e36c82616d98fdb91b468d4cfb34 | [
"Apache-2.0"
] | 449 | 2022-02-18T08:26:58.000Z | 2022-03-31T11:58:32.000Z | tests/test_models/test_dense_heads/test_sam_reppoints_head.py | williamcorsel/mmrotate | 00a3b9af34c4e36c82616d98fdb91b468d4cfb34 | [
"Apache-2.0"
] | 162 | 2022-02-18T09:54:46.000Z | 2022-03-31T15:40:46.000Z | tests/test_models/test_dense_heads/test_sam_reppoints_head.py | williamcorsel/mmrotate | 00a3b9af34c4e36c82616d98fdb91b468d4cfb34 | [
"Apache-2.0"
] | 98 | 2022-02-18T08:28:48.000Z | 2022-03-31T08:52:11.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import mmcv
import pytest
import torch
from mmrotate.models.dense_heads import SAMRepPointsHead
@pytest.mark.skipif(
not torch.cuda.is_available(), reason='requires CUDA support')
@pytest.mark.parametrize('reassign', [True, False])
def test_sam_head_loss(reassign):... | 38 | 79 | 0.615199 |
870902ab628d69425b587b76762dc224382e3a24 | 629 | py | Python | tests/unit/expression/test_quantified.py | rinslow/regene | b1aa6cf9dcd436d547e9d4276bb850644dfc53aa | [
"MIT"
] | 2 | 2018-02-23T23:12:44.000Z | 2019-04-28T03:20:17.000Z | tests/unit/expression/test_quantified.py | rinslow/regene | b1aa6cf9dcd436d547e9d4276bb850644dfc53aa | [
"MIT"
] | 2 | 2018-02-27T21:36:24.000Z | 2018-03-09T11:28:44.000Z | tests/unit/expression/test_quantified.py | rinslow/regene | b1aa6cf9dcd436d547e9d4276bb850644dfc53aa | [
"MIT"
] | null | null | null | from unittest import TestCase
from regene.expression import Exactly
from regene.expression.quantified import Quantified
from regene.expression.string import String
class QuantifiedTest(TestCase):
def test_str(self):
assert Quantified(String("1"), Exactly(1)) == "1"
def test_quantifiers(self):
... | 28.590909 | 70 | 0.664547 |
df5eb74500ffa3f50a4e462387522948d72bf0eb | 304,872 | py | Python | pysnmp-with-texts/StorageManagement-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/StorageManagement-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/StorageManagement-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module StorageManagement-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/StorageManagement-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:14:44 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (def... | 186.466055 | 12,885 | 0.788931 |
ff81588e22ef7aae1d9d90c995f2630aee117891 | 114 | py | Python | tests/version_test.py | plumerai/zoo | 55e8ce9a42fb8806503e16fc2340f0fd27948d09 | [
"Apache-2.0"
] | 89 | 2019-07-12T17:40:55.000Z | 2022-03-27T03:08:31.000Z | tests/version_test.py | plumerai/zoo | 55e8ce9a42fb8806503e16fc2340f0fd27948d09 | [
"Apache-2.0"
] | 99 | 2019-07-12T17:54:04.000Z | 2022-03-17T23:01:43.000Z | tests/version_test.py | plumerai/zoo | 55e8ce9a42fb8806503e16fc2340f0fd27948d09 | [
"Apache-2.0"
] | 17 | 2019-08-30T08:38:57.000Z | 2022-02-08T08:41:38.000Z | import larq_zoo
def test_version():
assert hasattr(larq_zoo, "__version__") and "." in larq_zoo.__version__
| 19 | 75 | 0.745614 |
1d8118b4f91f7018bd524a811d16e7cf6d3e957a | 655 | py | Python | geovoronoi/__init__.py | mjziebarth/geovoronoi | 40c65aefa1c754975c41bda57279e289c6b04222 | [
"Apache-2.0"
] | null | null | null | geovoronoi/__init__.py | mjziebarth/geovoronoi | 40c65aefa1c754975c41bda57279e289c6b04222 | [
"Apache-2.0"
] | null | null | null | geovoronoi/__init__.py | mjziebarth/geovoronoi | 40c65aefa1c754975c41bda57279e289c6b04222 | [
"Apache-2.0"
] | null | null | null | """
geovoronoi – main module
Imports all necessary functions to calculate Voronoi regions from a set of coordinates on a geographic shape.
Addtionally imports some helper funcitons.
Author: Markus Konrad <markus.konrad@wzb.eu>
"""
from ._voronoi import (coords_to_points, points_to_coords, voronoi_regions_from_coord... | 31.190476 | 115 | 0.766412 |
75c8c117e3e3da22609c5e9e2ec9f22e91dfadf9 | 17 | py | Python | tests/unit/test_modulegraph/testpkg-relimport/pkg/sub2/__init__.py | hawkhai/pyinstaller | 016a24479b34de161792c72dde455a81ad4c78ae | [
"Apache-2.0"
] | 9,267 | 2015-01-01T04:08:45.000Z | 2022-03-31T11:42:38.000Z | tests/unit/test_modulegraph/testpkg-relimport/pkg/sub2/__init__.py | jeremysanders/pyinstaller | 321b24f9a9a5978337735816b36ca6b4a90a2fb4 | [
"Apache-2.0"
] | 5,150 | 2015-01-01T12:09:56.000Z | 2022-03-31T18:06:12.000Z | tests/unit/test_modulegraph/testpkg-relimport/pkg/sub2/__init__.py | jeremysanders/pyinstaller | 321b24f9a9a5978337735816b36ca6b4a90a2fb4 | [
"Apache-2.0"
] | 2,101 | 2015-01-03T10:25:27.000Z | 2022-03-30T11:04:42.000Z | """ pkg.sub2 """
| 8.5 | 16 | 0.411765 |
2da74eb26a0d832e031e4c30ed6e0a68731e4ab2 | 20,837 | py | Python | ocrd_anybaseocr/cli/ocrd_anybaseocr_cropping.py | wrznr/OCR-D-LAYoutERkennung | e94ee3b462e21f66b79e6cbebd959c03d631c52b | [
"Apache-2.0"
] | null | null | null | ocrd_anybaseocr/cli/ocrd_anybaseocr_cropping.py | wrznr/OCR-D-LAYoutERkennung | e94ee3b462e21f66b79e6cbebd959c03d631c52b | [
"Apache-2.0"
] | null | null | null | ocrd_anybaseocr/cli/ocrd_anybaseocr_cropping.py | wrznr/OCR-D-LAYoutERkennung | e94ee3b462e21f66b79e6cbebd959c03d631c52b | [
"Apache-2.0"
] | null | null | null | # ======================================================================
# ====================================
# README file for Page Cropping component
# ====================================
# Filename : ocrd-anyBaseOCR-pagecropping.py
# Author: Syed Saqib Bukhari, Mohammad Mohsin Reza, Md. Ajraf Rakib
# Responsible... | 41.179842 | 366 | 0.51279 |
e6ddc7e807df3e9ed66f05e57398519f7640921e | 1,939 | py | Python | User.py | lilian-2021/passwordLocker | d641adc3b3ffc3d720f5db6e0bef1ffa310a71f0 | [
"Unlicense"
] | null | null | null | User.py | lilian-2021/passwordLocker | d641adc3b3ffc3d720f5db6e0bef1ffa310a71f0 | [
"Unlicense"
] | null | null | null | User.py | lilian-2021/passwordLocker | d641adc3b3ffc3d720f5db6e0bef1ffa310a71f0 | [
"Unlicense"
] | null | null | null | class User:
"""
Class that generates new instances of User
"""
listOfUser=[]
def __init__(self,first_name,last_name,password,email):
'''
__init__ method that helps us define properties for our objects.
Args:
first_name: New user first name.... | 26.561644 | 83 | 0.532749 |
bee3e21a239b85df128a726bf9d09de88e4a9df0 | 1,682 | py | Python | kolejka/server/blob/migrations/0001_initial.py | dtracz/kolejka | ff62bd242b2a3f64f44c3b8e6379e083a67f211d | [
"MIT"
] | 11 | 2018-03-16T08:27:17.000Z | 2021-11-14T23:48:47.000Z | kolejka/server/blob/migrations/0001_initial.py | dtracz/kolejka | ff62bd242b2a3f64f44c3b8e6379e083a67f211d | [
"MIT"
] | 1 | 2021-08-18T18:05:37.000Z | 2021-08-18T18:05:37.000Z | kolejka/server/blob/migrations/0001_initial.py | dtracz/kolejka | ff62bd242b2a3f64f44c3b8e6379e083a67f211d | [
"MIT"
] | 3 | 2018-01-10T13:57:19.000Z | 2021-07-24T09:54:27.000Z | # Generated by Django 3.0.5 on 2020-04-22 09:25
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 40.047619 | 118 | 0.601665 |
55f04180479359fe2ac14b3f09cec572cfeeca4d | 3,179 | py | Python | Tools/px4params/xmlout.py | dzett/PX4-Firmware | 9919ba1581c24ddd5d10d6b7530929df843537c8 | [
"BSD-3-Clause"
] | null | null | null | Tools/px4params/xmlout.py | dzett/PX4-Firmware | 9919ba1581c24ddd5d10d6b7530929df843537c8 | [
"BSD-3-Clause"
] | null | null | null | Tools/px4params/xmlout.py | dzett/PX4-Firmware | 9919ba1581c24ddd5d10d6b7530929df843537c8 | [
"BSD-3-Clause"
] | null | null | null | import xml.etree.ElementTree as ET
import codecs
def indent(elem, level=0):
i = "\n" + level*" "
if len(elem):
if not elem.text or not elem.text.strip():
elem.text = i + " "
if not elem.tail or not elem.tail.strip():
elem.tail = i
for elem in elem:
... | 44.774648 | 127 | 0.540422 |
b9a49fc80c70c0fc66633d334f44594312854068 | 20,608 | py | Python | src/generic.py | Hailecho/LocusTreeInference | cb275e70e4ee4feb333fcac7405da856ca2f6324 | [
"MIT"
] | null | null | null | src/generic.py | Hailecho/LocusTreeInference | cb275e70e4ee4feb333fcac7405da856ca2f6324 | [
"MIT"
] | null | null | null | src/generic.py | Hailecho/LocusTreeInference | cb275e70e4ee4feb333fcac7405da856ca2f6324 | [
"MIT"
] | null | null | null | """
Methods to handle decomposition results regardless of algorithm used
"""
from warnings import warn
import re
def assign_ranks(tree):
"""
Assings taxonomic ranks (depths of a node) to a tree.
Modifies the tree in situ.
:param tree: ete2.Tree
:return: None
"""
T = tree
for n in T.trav... | 42.844075 | 148 | 0.516498 |
36045d94a333a1e1fe3ce9f967dc126079a3eb3b | 58,355 | py | Python | plim/lexer.py | spollard/Plim | 7689de85364691063ed5c43a891c433f9ebef5b9 | [
"MIT"
] | 85 | 2015-01-08T20:15:54.000Z | 2022-03-12T21:51:27.000Z | plim/lexer.py | spollard/Plim | 7689de85364691063ed5c43a891c433f9ebef5b9 | [
"MIT"
] | 18 | 2015-02-27T14:59:08.000Z | 2021-09-24T10:27:19.000Z | plim/lexer.py | spollard/Plim | 7689de85364691063ed5c43a891c433f9ebef5b9 | [
"MIT"
] | 14 | 2015-02-26T07:20:42.000Z | 2022-02-01T17:52:16.000Z | # -*- coding: utf-8 -*-
"""Plim lexer"""
import functools
import re
import markdown2
from . import errors
from .util import StringIO, MAXSIZE, joined, space_separated, u
from .extensions import rst_to_html
from .extensions import coffee_to_js
from .extensions import scss_to_css
from .extensions import stylus_to_css
... | 35.778663 | 144 | 0.593694 |
8041a08171342152c767fff59a851e1c8f438a8f | 5,247 | py | Python | build/test_packages.py | eunchong/infra | ce3728559112bfb3e8b32137eada517aec6d22f9 | [
"BSD-3-Clause"
] | null | null | null | build/test_packages.py | eunchong/infra | ce3728559112bfb3e8b32137eada517aec6d22f9 | [
"BSD-3-Clause"
] | null | null | null | build/test_packages.py | eunchong/infra | ce3728559112bfb3e8b32137eada517aec6d22f9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Tests generated CIPD packages.
Supposed to be invoked after build.py has run. Uses packages from out/*.cipd and
tests from tests/*.... | 30.32948 | 80 | 0.662664 |
38e605892d4cac3ba9d85cecbd98c0b34a69e492 | 6,700 | py | Python | pyscf/scf/__init__.py | zc62/pyscf | 4ed05044d44d49c3ffd4d2e098e9031478fb39e7 | [
"Apache-2.0"
] | null | null | null | pyscf/scf/__init__.py | zc62/pyscf | 4ed05044d44d49c3ffd4d2e098e9031478fb39e7 | [
"Apache-2.0"
] | null | null | null | pyscf/scf/__init__.py | zc62/pyscf | 4ed05044d44d49c3ffd4d2e098e9031478fb39e7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2014-2020 The PySCF Developers. 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
#
# U... | 29.385965 | 83 | 0.652687 |
c733c04b501fb23898b824654bd498c63815b5aa | 604 | py | Python | class4/exercise8.py | agonzo777/pynet | 8b2c2bbd71ea001ba0dc2acb20a4d46c7ddeaa12 | [
"Apache-2.0"
] | null | null | null | class4/exercise8.py | agonzo777/pynet | 8b2c2bbd71ea001ba0dc2acb20a4d46c7ddeaa12 | [
"Apache-2.0"
] | null | null | null | class4/exercise8.py | agonzo777/pynet | 8b2c2bbd71ea001ba0dc2acb20a4d46c7ddeaa12 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import netmiko
from netmiko import ConnectHandler
password = '88newclass'
pynet1 = {
'device_type': 'cisco_ios',
'ip': '50.76.53.27',
'username': 'pyclass',
'password': password,
}
pynet2 = {
'device_type': 'cisco_ios',
'ip': '50.76.53.27',
'username': 'pyclass',
... | 16.324324 | 63 | 0.607616 |
459d13738f398aa632faa8691524cb2781971f5f | 207 | py | Python | run.py | AhsanAliLodhi/VideoSyncBackend | c5cae2ac0a8d281d05b3c86f376212dda16a21d4 | [
"MIT"
] | null | null | null | run.py | AhsanAliLodhi/VideoSyncBackend | c5cae2ac0a8d281d05b3c86f376212dda16a21d4 | [
"MIT"
] | null | null | null | run.py | AhsanAliLodhi/VideoSyncBackend | c5cae2ac0a8d281d05b3c86f376212dda16a21d4 | [
"MIT"
] | null | null | null | import os
import config
from app.app import vs_app
if __name__ == '__main__':
vs_app.run(
host='0.0.0.0',
port=int(os.getenv('FLASK_PORT')),
debug=os.getenv('FLASK_DEBUG')
)
| 18.818182 | 42 | 0.608696 |
14f102d29f2548d0edd01422215c39e9124d541f | 556 | py | Python | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/handy-for-mechanics-31080 | b9b31e61a6c270257c67e293690d0aacb59929ab | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/handy-for-mechanics-31080 | b9b31e61a6c270257c67e293690d0aacb59929ab | [
"FTL",
"AML",
"RSA-MD"
] | 45 | 2021-10-11T06:11:52.000Z | 2022-03-28T06:14:55.000Z | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/handy-for-mechanics-31080 | b9b31e61a6c270257c67e293690d0aacb59929ab | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.db import migrations
def create_site(apps, schema_editor):
Site = apps.get_model("sites", "Site")
custom_domain = "handy-for-mechanics-31080.botics.co"
site_params = {
"name": "Handy for mechanics",
}
if custom_domain:
site_params["domain"] = custom_domain
Site.ob... | 21.384615 | 61 | 0.661871 |
8f12be9fc8cbe7706feef4e33703db7073c5ec3e | 3,207 | py | Python | Financial Projects/LeakyGANLongTextGeneration/target_lstm.py | Lingesh2311/Python-Projects | 9916cf580dff165a7348f52efd274c743961381d | [
"Apache-2.0"
] | null | null | null | Financial Projects/LeakyGANLongTextGeneration/target_lstm.py | Lingesh2311/Python-Projects | 9916cf580dff165a7348f52efd274c743961381d | [
"Apache-2.0"
] | null | null | null | Financial Projects/LeakyGANLongTextGeneration/target_lstm.py | Lingesh2311/Python-Projects | 9916cf580dff165a7348f52efd274c743961381d | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class TargetLSTM(nn.Module):
""" Target LSTM """
def __init__(self, vocab_size, embedding_dim, hidden_dim, use_cuda):
super(TargetLSTM, self).__init__()
self.hidden_dim = hidden_dim
self.use_cuda = use_cuda
... | 41.649351 | 120 | 0.573745 |
60b6658bf2ce4e35b9f3e7d43f58479c3bd03f44 | 292 | py | Python | Problem_2/main.py | jdalzatec/EulerProject | 2f2f4d9c009be7fd63bb229bb437ea75db77d891 | [
"MIT"
] | 1 | 2022-03-28T05:32:58.000Z | 2022-03-28T05:32:58.000Z | Problem_2/main.py | jdalzatec/EulerProject | 2f2f4d9c009be7fd63bb229bb437ea75db77d891 | [
"MIT"
] | null | null | null | Problem_2/main.py | jdalzatec/EulerProject | 2f2f4d9c009be7fd63bb229bb437ea75db77d891 | [
"MIT"
] | null | null | null | def fibonacci(maximum):
sequence = [1, 2]
n = 1
while sequence[n] < maximum:
sequence.append(sequence[n] + sequence[n-1])
n += 1
return sequence[:-1]
numbers = fibonacci(4e6)
total = 0
for n in numbers:
if n % 2 == 0:
total += n
print(total)
| 14.6 | 52 | 0.55137 |
d23dfeb5d558a8c4376a8bdb4e465321fc9c40e7 | 388 | py | Python | reviews/migrations/0005_auto_20191122_2326.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | null | null | null | reviews/migrations/0005_auto_20191122_2326.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | 9 | 2020-01-10T14:10:02.000Z | 2022-03-12T00:08:19.000Z | reviews/migrations/0005_auto_20191122_2326.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.5 on 2019-11-22 14:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('reviews', '0004_auto_20191122_2319'),
]
operations = [
migrations.AlterField(
model_name='review',
name='text',
... | 20.421053 | 54 | 0.595361 |
7bd559ed955c1cd04e6a2d1dbf95247bd8899b3e | 797 | py | Python | tests/test_application.py | z86961027/pycatia | 5dd9b7eb5d21f2261198d6a2af489abafb2f5f32 | [
"MIT"
] | null | null | null | tests/test_application.py | z86961027/pycatia | 5dd9b7eb5d21f2261198d6a2af489abafb2f5f32 | [
"MIT"
] | null | null | null | tests/test_application.py | z86961027/pycatia | 5dd9b7eb5d21f2261198d6a2af489abafb2f5f32 | [
"MIT"
] | null | null | null | #! /usr/bin/python3.6
from pycatia import CATIAApplication
catia = CATIAApplication()
cat_part = r'tests/CF_catia_measurable_part.CATPart'
def test_application():
assert 'CATIAApplication' in catia.__repr__()
def test_refresh():
documents = catia.documents()
documents.open(cat_part)
document = ca... | 19.439024 | 52 | 0.716437 |
5739f7f93670c253bce5dd8e6153b72f8b79cb0a | 7,090 | py | Python | smbscraper.py | jpsenior/smbscraper | 7fe9b7f7cf5419b559a5db8216d9aa8ad63a38e7 | [
"MIT"
] | 5 | 2015-02-27T01:39:47.000Z | 2021-09-24T12:53:27.000Z | smbscraper.py | jpsenior/smbscraper | 7fe9b7f7cf5419b559a5db8216d9aa8ad63a38e7 | [
"MIT"
] | 3 | 2015-02-27T01:56:41.000Z | 2015-02-27T01:57:00.000Z | smbscraper.py | jpsenior/smbscraper | 7fe9b7f7cf5419b559a5db8216d9aa8ad63a38e7 | [
"MIT"
] | 1 | 2017-01-04T16:51:27.000Z | 2017-01-04T16:51:27.000Z | #!/usr/bin/python
# Grab credentials from a second credentials store.
# The MIT License (MIT)
#
# Copyright (c) 2015 JP Senior jp.senior@gmail.com
#
# 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 Sof... | 39.608939 | 165 | 0.620592 |
6e93c9351fc377ebffae811c42c6bc6084ad2baa | 11,963 | py | Python | build.py | NatureGeorge/pyRMSD | 9b45fcad944596a021823c9d5a5b73fcddbcd1fc | [
"MIT"
] | 1 | 2021-02-18T19:15:58.000Z | 2021-02-18T19:15:58.000Z | build.py | NatureGeorge/pyRMSD | 9b45fcad944596a021823c9d5a5b73fcddbcd1fc | [
"MIT"
] | null | null | null | build.py | NatureGeorge/pyRMSD | 9b45fcad944596a021823c9d5a5b73fcddbcd1fc | [
"MIT"
] | 2 | 2020-12-11T14:57:48.000Z | 2021-08-03T12:22:44.000Z | from __future__ import print_function
from build_utils import compile_a_file_collection, Link
import optparse
import collections
import os
from build_config import get_config_options_for
if __name__ == '__main__':
parser = optparse.OptionParser(usage='%prog [--build-conf] [--cuda] [--build] [--clean] [--clean-all]... | 48.044177 | 232 | 0.545181 |
53098a6cf5f7c1a3499b6c070bf611f918a2e7d4 | 24,657 | py | Python | filebeat/tests/system/test_crawler.py | siye1982/packetbeat-finagle-thrift | 53a87097b09455d55c14e72189cbc22481546e45 | [
"Apache-2.0"
] | 3 | 2017-08-08T20:08:53.000Z | 2021-09-16T14:38:00.000Z | filebeat/tests/system/test_crawler.py | siye1982/packetbeat-finagle-thrift | 53a87097b09455d55c14e72189cbc22481546e45 | [
"Apache-2.0"
] | 1 | 2016-07-19T09:33:37.000Z | 2016-07-19T10:29:54.000Z | vendor/github.com/elastic/beats/filebeat/tests/system/test_crawler.py | radoondas/logstashbeat | d3cbf2b0d6bcb6bd199cd5f0fece879783b2ad62 | [
"Apache-2.0"
] | 7 | 2017-11-24T23:58:46.000Z | 2020-03-31T15:57:07.000Z | # -*- coding: utf-8 -*-
from filebeat import BaseTest
import codecs
import os
import time
from nose.plugins.skip import Skip, SkipTest
import shutil
# Additional tests to be added:
# * Check what happens when file renamed -> no recrawling should happen
# * Check if file descriptor is "closed" when file disappears
... | 30.032887 | 99 | 0.560003 |
9a140c090b6f9c8db1423477d3fb76354eada7f5 | 9,862 | py | Python | test/new_tests/test_query_predexp.py | mcoberly2/aerospike-client-python | d405891f0d6d8b2fc14f78841370bc6a1d302494 | [
"Apache-2.0"
] | null | null | null | test/new_tests/test_query_predexp.py | mcoberly2/aerospike-client-python | d405891f0d6d8b2fc14f78841370bc6a1d302494 | [
"Apache-2.0"
] | null | null | null | test/new_tests/test_query_predexp.py | mcoberly2/aerospike-client-python | d405891f0d6d8b2fc14f78841370bc6a1d302494 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
import sys
from .test_base_class import TestBaseClass
from .as_status_codes import AerospikeStatus
from aerospike import exception as e
from aerospike import predicates as p
from aerospike import predexp as as_predexp
from threading import Lock
aerospike = pytest.importorskip("ae... | 30.722741 | 125 | 0.502231 |
3b93df794c0218674bff1af2cfca7742e39ed940 | 1,056 | py | Python | pyxel/ui/text_button.py | roliveira/pyxel | 7725639172cf29861b6e924a5b0103d66277086f | [
"MIT"
] | 1 | 2019-10-18T01:54:10.000Z | 2019-10-18T01:54:10.000Z | pyxel/ui/text_button.py | Shiozaki-s21/pyxel | 8938d656fccf1c87d56fa4187e9d6b242b132c75 | [
"MIT"
] | null | null | null | pyxel/ui/text_button.py | Shiozaki-s21/pyxel | 8938d656fccf1c87d56fa4187e9d6b242b132c75 | [
"MIT"
] | null | null | null | import pyxel
from pyxel.constants import FONT_HEIGHT, FONT_WIDTH
from .button import Button
from .constants import (
BUTTON_DISABLED_COLOR,
BUTTON_ENABLED_COLOR,
BUTTON_PRESSED_COLOR,
BUTTON_TEXT_COLOR,
)
class TextButton(Button):
"""
Events:
__on_press()
__on_release()
""... | 24.55814 | 85 | 0.586174 |
f13805aab996de9a24d316b9b92683a7fd905bdc | 5,690 | py | Python | PREPROCESSING/gaussian_multivariate.py | Vicomtech/STDG-evaluation-metrics | 4662c2cc60f7941723a876a6032b411e40f5ec62 | [
"MIT"
] | 4 | 2021-08-20T18:21:09.000Z | 2022-01-12T09:30:29.000Z | PREPROCESSING/gaussian_multivariate.py | Vicomtech/STDG-evaluation-metrics | 4662c2cc60f7941723a876a6032b411e40f5ec62 | [
"MIT"
] | null | null | null | PREPROCESSING/gaussian_multivariate.py | Vicomtech/STDG-evaluation-metrics | 4662c2cc60f7941723a876a6032b411e40f5ec62 | [
"MIT"
] | null | null | null | #Load libraries
import warnings
warnings.filterwarnings("ignore")
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
class DataPreProcessor :
"""
A class used to preprocess train data and transform generated data from GM ap... | 39.79021 | 148 | 0.648506 |
c9472a5e5f1e300a3d492658b1898aa1a0d23b71 | 36,455 | py | Python | moi/views.py | UmakantKulkarni/free5gmano | 1772bf64f5882435090f0419307ba2e3fa730794 | [
"Apache-2.0"
] | null | null | null | moi/views.py | UmakantKulkarni/free5gmano | 1772bf64f5882435090f0419307ba2e3fa730794 | [
"Apache-2.0"
] | null | null | null | moi/views.py | UmakantKulkarni/free5gmano | 1772bf64f5882435090f0419307ba2e3fa730794 | [
"Apache-2.0"
] | null | null | null | import ast
import threading
import datetime
import base64
import requests
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.decorators import action
from rest_framework.parsers import JSONParser
from rest_framework.viewsets import ModelViewSet, GenericViewSet... | 46.797176 | 230 | 0.531751 |
3d330abf56e025d08920aa71431c0e86b461b87d | 1,712 | py | Python | applied_python/applied_python/lib/python2.7/site-packages/pyeapi/__init__.py | mith1979/ansible_automation | 013dfa67c6d91720b787fadb21de574b6e023a26 | [
"Apache-2.0"
] | null | null | null | applied_python/applied_python/lib/python2.7/site-packages/pyeapi/__init__.py | mith1979/ansible_automation | 013dfa67c6d91720b787fadb21de574b6e023a26 | [
"Apache-2.0"
] | null | null | null | applied_python/applied_python/lib/python2.7/site-packages/pyeapi/__init__.py | mith1979/ansible_automation | 013dfa67c6d91720b787fadb21de574b6e023a26 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2014, Arista Networks, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# Redistributions of source code must retain the above copyright notice,
# this list of condit... | 43.897436 | 74 | 0.773949 |
faa20962e7312a7f6da1557733d0d24548d43575 | 1,520 | py | Python | geba_website/apps/forum/migrations/0001_initial.py | GeoffBarrett/geba_website | a8b520f6540200b4d085e93a3ac9ec766fd82af5 | [
"MIT"
] | null | null | null | geba_website/apps/forum/migrations/0001_initial.py | GeoffBarrett/geba_website | a8b520f6540200b4d085e93a3ac9ec766fd82af5 | [
"MIT"
] | 15 | 2020-02-12T00:00:38.000Z | 2022-03-11T23:43:44.000Z | geba_website/apps/forum/migrations/0001_initial.py | GeoffBarrett/geba_website | a8b520f6540200b4d085e93a3ac9ec766fd82af5 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.6 on 2018-09-28 02:22
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 40 | 131 | 0.601974 |
97381fd044ba5b1042987956aa91365e7f1643c0 | 54 | py | Python | etabotsite/etabotapp/__init__.py | koykub333/pmp | b92d81da5f572cba868ebe7fe36b277138467bfc | [
"Apache-2.0"
] | 3 | 2018-07-05T00:04:59.000Z | 2021-03-08T03:04:44.000Z | etabotsite/etabotapp/__init__.py | koykub333/pmp | b92d81da5f572cba868ebe7fe36b277138467bfc | [
"Apache-2.0"
] | 53 | 2018-06-04T06:09:23.000Z | 2020-06-05T18:25:39.000Z | etabotsite/etabotapp/__init__.py | koykub333/pmp | b92d81da5f572cba868ebe7fe36b277138467bfc | [
"Apache-2.0"
] | 9 | 2018-04-15T19:42:35.000Z | 2021-03-08T02:51:47.000Z | default_app_config = 'etabotapp.apps.EtabotappConfig'
| 27 | 53 | 0.851852 |
b95b059c5ec40bbb0515cd88920cf377200e9e02 | 339 | py | Python | simp-py-code/max_num.py | Michaeloye/python-journey | ff8ce0e8796a129994f9a9a9dbb80340fa5790dc | [
"MIT"
] | null | null | null | simp-py-code/max_num.py | Michaeloye/python-journey | ff8ce0e8796a129994f9a9a9dbb80340fa5790dc | [
"MIT"
] | null | null | null | simp-py-code/max_num.py | Michaeloye/python-journey | ff8ce0e8796a129994f9a9a9dbb80340fa5790dc | [
"MIT"
] | null | null | null | num1=int(input("Enter a number:"))
num2=int(input("Enter a number:"))
num3=int(input("Enter a number:"))
def max_num(num1, num2, num3):
if num1>=num2 and num1>=num3:
print(num1)
elif num2>=num1 and num2>=num3:
print(num2)
elif num3>=num1 and num3>=num2:
print(num3)
max_num(num1, nu... | 24.214286 | 35 | 0.610619 |
f2b5b88e8fe89da14eb90a81ffe9e34d1bfb05c7 | 2,161 | py | Python | data/migrations/versions/67f0abd172ae_add_tagtorepositorytag_table.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 2,027 | 2019-11-12T18:05:48.000Z | 2022-03-31T22:25:04.000Z | data/migrations/versions/67f0abd172ae_add_tagtorepositorytag_table.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 496 | 2019-11-12T18:13:37.000Z | 2022-03-31T10:43:45.000Z | data/migrations/versions/67f0abd172ae_add_tagtorepositorytag_table.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 249 | 2019-11-12T18:02:27.000Z | 2022-03-22T12:19:19.000Z | """
Add TagToRepositoryTag table.
Revision ID: 67f0abd172ae
Revises: 10f45ee2310b
Create Date: 2018-10-30 11:31:06.615488
"""
# revision identifiers, used by Alembic.
revision = "67f0abd172ae"
down_revision = "10f45ee2310b"
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrade(op, tables, teste... | 32.742424 | 97 | 0.64137 |
12fbc31f51bba1dd741ddcb8e7d41feee016ab05 | 976 | bzl | Python | closure/closure_proto_library.bzl | kalbasit/rules_proto_grpc | 7e0a97adc8801df1cd74ee435d74bbd857c98a36 | [
"Apache-2.0"
] | 1 | 2020-08-15T06:02:47.000Z | 2020-08-15T06:02:47.000Z | closure/closure_proto_library.bzl | kalbasit/rules_proto_grpc | 7e0a97adc8801df1cd74ee435d74bbd857c98a36 | [
"Apache-2.0"
] | null | null | null | closure/closure_proto_library.bzl | kalbasit/rules_proto_grpc | 7e0a97adc8801df1cd74ee435d74bbd857c98a36 | [
"Apache-2.0"
] | null | null | null | load("//closure:closure_proto_compile.bzl", "closure_proto_compile")
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
def closure_proto_library(**kwargs):
# Compile protos
name_pb = kwargs.get("name") + "_pb"
closure_proto_compile(
name = name_pb,
**{k: v for (k, v) i... | 30.5 | 88 | 0.620902 |
60fd13a4d084b2af13fc729f02aa11dafa5ae06d | 5,444 | py | Python | steam/client/builtins/user.py | XronoZ-create/steam | 3330d37cc2670faaaaf4d3e14c7c2b20712f0853 | [
"MIT"
] | 1 | 2022-01-11T20:35:05.000Z | 2022-01-11T20:35:05.000Z | steam/client/builtins/user.py | XronoZ-create/steam | 3330d37cc2670faaaaf4d3e14c7c2b20712f0853 | [
"MIT"
] | null | null | null | steam/client/builtins/user.py | XronoZ-create/steam | 3330d37cc2670faaaaf4d3e14c7c2b20712f0853 | [
"MIT"
] | null | null | null | from weakref import WeakValueDictionary
from steam.client.user import SteamUser
from steam.enums import EPersonaState, EChatEntryType, EType, EClientUIMode
from steam.enums.emsg import EMsg
from steam.core.msg import MsgProto
from steam.utils.proto import proto_fill_from_dict
class User(object):
EVENT_CHAT_MESSAGE... | 36.536913 | 98 | 0.650073 |
82cb29a4f09284b9aa216298d7389de3f483c9e8 | 1,479 | py | Python | vqe.py | HPQC-LABS/Quantum-Graph-Spectra | b897d94dd03c48ffec5735b3dc5b86f8c3ab5a8f | [
"MIT"
] | 1 | 2020-07-29T06:42:32.000Z | 2020-07-29T06:42:32.000Z | vqe.py | HPQC-LABS/Quantum-Graph-Spectra | b897d94dd03c48ffec5735b3dc5b86f8c3ab5a8f | [
"MIT"
] | null | null | null | vqe.py | HPQC-LABS/Quantum-Graph-Spectra | b897d94dd03c48ffec5735b3dc5b86f8c3ab5a8f | [
"MIT"
] | 2 | 2021-03-29T13:40:47.000Z | 2021-03-29T13:41:00.000Z | '''
@author: Josh Payne
Description: Implements VQE algorithm.
'''
import numpy as np
from scipy.optimize import minimize
from pyquil import Program, get_qc
from pyquil.gates import RX, RZ, CNOT
from pyquil.api import WavefunctionSimulator
from pyquil.paulis import PauliSum
sim = WavefunctionSimulator()
### QC/QVM... | 32.866667 | 122 | 0.701149 |
4c6acdaac74e98b2945e442de531f93a4b9041f8 | 2,538 | py | Python | Python/word-search-ii.py | bssrdf/LeetCode-5 | 746df5cff523361145a74d9d429dc541a7b99910 | [
"MIT"
] | 68 | 2018-01-13T07:15:37.000Z | 2022-02-20T12:58:24.000Z | Python/word-search-ii.py | ambershen/LeetCode | 0c53580697b05fadb3981d97bd25f1d9da65fd2f | [
"MIT"
] | 2 | 2021-12-10T01:43:37.000Z | 2021-12-14T21:48:53.000Z | Python/word-search-ii.py | ambershen/LeetCode | 0c53580697b05fadb3981d97bd25f1d9da65fd2f | [
"MIT"
] | 63 | 2017-04-10T03:38:25.000Z | 2022-03-17T23:24:51.000Z | # Time: O(m * n * l)
# Space: O(l)
#
# Given a 2D board and a list of words from the dictionary, find all words in the board.
#
# Each word must be constructed from letters of sequentially adjacent cell, where "adjacent" cells
# are those horizontally or vertically neighboring. The same letter cell may not be used mo... | 32.538462 | 114 | 0.553586 |
8f06d2dc0d768dbc99e7cc4b8d13a8cf7bc2d68b | 3,688 | py | Python | DQNPongExperiment.py | bosqmode/DQNPongExperiment | 0f62780de7c210e63a01f26e47731e795eb7391f | [
"MIT"
] | null | null | null | DQNPongExperiment.py | bosqmode/DQNPongExperiment | 0f62780de7c210e63a01f26e47731e795eb7391f | [
"MIT"
] | null | null | null | DQNPongExperiment.py | bosqmode/DQNPongExperiment | 0f62780de7c210e63a01f26e47731e795eb7391f | [
"MIT"
] | null | null | null | from DQNAgent import DQN
import numpy as np
import gym
import gym.spaces
import cv2
ACTIONS = 3
MAX_EPISODES = 99999999
TRAIN = True
WEIGHTS_NAME = "PONGW"
INPUT_SHAPE = (50,50,1)
CROPPING = (30, 45)
EXPREPLAY_CAPACITY = 20000
OBSERVEPERIOD = 100000
START_EPSILON = 1
MIN_EPSILON = 0.05
BATCH_SIZE = 64
GAMMA = 0.99... | 29.741935 | 255 | 0.588666 |
1f17c00f13129561a5790b6393f3c9e23574dad9 | 119 | py | Python | python-basic/logic.py | puppyhang/bash-collections | e105e55ae772d5d95ded98c72e49ebea6d6b8824 | [
"Apache-2.0"
] | null | null | null | python-basic/logic.py | puppyhang/bash-collections | e105e55ae772d5d95ded98c72e49ebea6d6b8824 | [
"Apache-2.0"
] | null | null | null | python-basic/logic.py | puppyhang/bash-collections | e105e55ae772d5d95ded98c72e49ebea6d6b8824 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
a = 1099
b = 109
if a == b:
print("a==b")
elif a > b:
print("a>b")
else:
print("a!=b")
| 10.818182 | 18 | 0.478992 |
8d9ca4713e16fef6d93add250add0478bae80913 | 472 | py | Python | tests/test_news.py | rochi88/dshare | 9dc46baff822be2ae7a7541fa10535a0299fbb5e | [
"MIT"
] | 10 | 2020-04-09T06:34:48.000Z | 2022-02-07T09:39:22.000Z | tests/test_news.py | rochi88/dshare | 9dc46baff822be2ae7a7541fa10535a0299fbb5e | [
"MIT"
] | null | null | null | tests/test_news.py | rochi88/dshare | 9dc46baff822be2ae7a7541fa10535a0299fbb5e | [
"MIT"
] | 5 | 2020-08-06T06:54:04.000Z | 2021-09-06T12:28:23.000Z | # _*_ coding:utf-8 _*_
'''
Created on 2021-May-28
@author: Raisul Islam
'''
import unittest
import datetime as dt
from bdshare import get_agm_news, get_all_news
class Test(unittest.TestCase):
def test_get_agm_news(self):
df = get_agm_news()
print(df.to_string())
def test_get_all_news(self):
... | 19.666667 | 46 | 0.65678 |
285e1418ce54e36d6e329e2587c831a7054fcbd2 | 1,499 | py | Python | temp.py | abdallahabusedo/LinearRegressionEX | e58078e04eec78b7af7bac2f38bcf3ec28c6d3de | [
"MIT"
] | null | null | null | temp.py | abdallahabusedo/LinearRegressionEX | e58078e04eec78b7af7bac2f38bcf3ec28c6d3de | [
"MIT"
] | null | null | null | temp.py | abdallahabusedo/LinearRegressionEX | e58078e04eec78b7af7bac2f38bcf3ec28c6d3de | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize']= (20.0,10.0)
#reading data
data=pd.read_csv("headbrain.csv")
print(data.shape)
data.head()
#Callecting X & Y
X =data["Head Size(cm^3)"].values
Y =data["Brain Weight(grams)"].values
# Mean X & Y
MeanX = np.mean(X)
... | 19.986667 | 54 | 0.687125 |
c2972cbee4ec49496a22c9f97ac8883d9d7c9989 | 439 | py | Python | enaml/enaml/web/item.py | ContinuumIO/ashiba | a93e7785d1fcf397baeb8a0b687a162a2b2aef3d | [
"BSD-3-Clause"
] | 11 | 2015-03-14T14:30:51.000Z | 2022-03-15T13:01:44.000Z | enaml/enaml/web/item.py | ContinuumIO/ashiba | a93e7785d1fcf397baeb8a0b687a162a2b2aef3d | [
"BSD-3-Clause"
] | 3 | 2015-01-31T11:12:56.000Z | 2022-03-14T00:53:25.000Z | enaml/enaml/web/item.py | ContinuumIO/ashiba | a93e7785d1fcf397baeb8a0b687a162a2b2aef3d | [
"BSD-3-Clause"
] | 4 | 2015-01-27T01:56:14.000Z | 2021-02-23T07:21:20.000Z |
from atom.api import Unicode
from enaml.core.declarative import d_
from html_object import HTMLObject
from lxml.html import builder as E
class Item(HTMLObject):
tag = E.LI
text = d_(Unicode())
def initialize(self):
super(Item, self).initialize()
def buildHTML(self, *args):
self.ad... | 19.954545 | 49 | 0.665148 |
caf2f1d459fef77b39d8cdd82823304674a777cb | 6,001 | py | Python | p4a-cloud/master/web/table.py | WeilerWebServices/Kivy | 54e3438156eb0c853790fd3cecc593f09123f892 | [
"MIT"
] | null | null | null | p4a-cloud/master/web/table.py | WeilerWebServices/Kivy | 54e3438156eb0c853790fd3cecc593f09123f892 | [
"MIT"
] | null | null | null | p4a-cloud/master/web/table.py | WeilerWebServices/Kivy | 54e3438156eb0c853790fd3cecc593f09123f892 | [
"MIT"
] | null | null | null | '''
DataTable: a flask/sqlachemy module to generate HTML with server side data.
The project use datatable from http://www.datatables.net/
'''
__all__ = ('Table', 'Column')
import simplejson
from flask import url_for, request
from sqlalchemy import asc, desc
class Column(object):
def __init__(self, name, field, d... | 31.751323 | 80 | 0.543576 |
a63498c987c88ec707f507487aded691c63828d2 | 9,533 | py | Python | CIM14/IEC61968/PaymentMetering/AuxiliaryAgreement.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 58 | 2015-04-22T10:41:03.000Z | 2022-03-29T16:04:34.000Z | CIM14/IEC61968/PaymentMetering/AuxiliaryAgreement.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 12 | 2015-08-26T03:57:23.000Z | 2020-12-11T20:14:42.000Z | CIM14/IEC61968/PaymentMetering/AuxiliaryAgreement.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 35 | 2015-01-10T12:21:03.000Z | 2020-09-09T08:18:16.000Z | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 75.062992 | 759 | 0.755271 |
49a8563ba7202a9bce2aae775f7187474ee07241 | 4,557 | py | Python | Tools/N++replaytolibTAS.py | EuniverseCat/NPlusPlusTAS | cf1289449a46754f4984acd307745689d5df1044 | [
"MIT"
] | 1 | 2020-01-01T01:24:32.000Z | 2020-01-01T01:24:32.000Z | Tools/N++replaytolibTAS.py | EuniverseCat/NPlusPlusTAS | cf1289449a46754f4984acd307745689d5df1044 | [
"MIT"
] | null | null | null | Tools/N++replaytolibTAS.py | EuniverseCat/NPlusPlusTAS | cf1289449a46754f4984acd307745689d5df1044 | [
"MIT"
] | null | null | null | from urllib.request import urlopen
from urllib.error import HTTPError
import json
import time
import zlib
IGNORED_PLAYERS = [
"Kronogenics",
"BlueIsTrue",
"fiordhraoi",
"cheeseburgur101",
"Jey",
"jungletek",
"Hedgy",
"ᕈᘎᑕᒎᗩn ᙡiᗴᒪḰi",
"Venom",
"EpicGamer10075",
"Altii",
"Puςe",
"Floof The Goof... | 30.38 | 101 | 0.519421 |
b89c43c75e3d0614d010d597350956ef7aa2a956 | 410 | py | Python | codeforces/div3/1203/B/B.py | mathemage/CompetitiveProgramming | fe39017e3b017f9259f9c1e6385549270940be64 | [
"MIT"
] | 2 | 2015-08-18T09:51:19.000Z | 2019-01-29T03:18:10.000Z | codeforces/div3/1203/B/B.py | mathemage/CompetitiveProgramming | fe39017e3b017f9259f9c1e6385549270940be64 | [
"MIT"
] | null | null | null | codeforces/div3/1203/B/B.py | mathemage/CompetitiveProgramming | fe39017e3b017f9259f9c1e6385549270940be64 | [
"MIT"
] | null | null | null | q = int(input())
for _ in range(q):
n = int(input())
a = list(map(int, input().split()))
a.sort()
a2 = [a[i] for i in range(0, len(a), 2)]
a3 = [a[i+1] for i in range(0, len(a), 2)]
if a2 != a3:
print("NO")
continue
a3.reverse()
areas = [ai * aj for ai, aj in zip(a2, a3... | 21.578947 | 47 | 0.458537 |
267b435d6c0ca6ba932e44bde6d895441bc21867 | 3,139 | py | Python | raven/processors.py | alex/raven | 28227282891d7eb7e3600a458d0d8c7164f63dcb | [
"BSD-3-Clause"
] | 1 | 2015-11-08T12:45:40.000Z | 2015-11-08T12:45:40.000Z | raven/processors.py | openlabs/raven | c065a96456c4e99a3726a599630dfe7fee9d29e6 | [
"BSD-3-Clause"
] | null | null | null | raven/processors.py | openlabs/raven | c065a96456c4e99a3726a599630dfe7fee9d29e6 | [
"BSD-3-Clause"
] | null | null | null | """
raven.core.processors
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import re
from raven.utils import varmap
class Processor(object):
def __init__(self, client):
self.client = client
def get_data(se... | 28.026786 | 80 | 0.553998 |
d012f82a21e40f36678f5d3ac1df9f2d87cfe167 | 2,048 | py | Python | d2ff.py | LeoZ100/D2FFConverter | f36f2c64f5f5981ae0d5edba0ded9ce19878bb0b | [
"MIT"
] | 1 | 2020-07-13T13:33:58.000Z | 2020-07-13T13:33:58.000Z | d2ff.py | LeoZ100/d2ff | f36f2c64f5f5981ae0d5edba0ded9ce19878bb0b | [
"MIT"
] | null | null | null | d2ff.py | LeoZ100/d2ff | f36f2c64f5f5981ae0d5edba0ded9ce19878bb0b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import csv
import json
def transform_to_importable_firefox_file(input_file, output_file):
with open(input_file) as dashlane_file, open(output_file, 'w+') as firefox_file:
password_section = get_password_section(dashlane_file)
firefox_csv = initialize_firefox... | 34.711864 | 114 | 0.666992 |
4f70d6e47e106da0fa234fc4d3a99e207fb714e7 | 7,939 | py | Python | xdagtool/xdu.py | rulerson/xdagtool | 1eb7fb352dd7cadcd6611279720210e04a5ec3f6 | [
"MIT"
] | null | null | null | xdagtool/xdu.py | rulerson/xdagtool | 1eb7fb352dd7cadcd6611279720210e04a5ec3f6 | [
"MIT"
] | null | null | null | xdagtool/xdu.py | rulerson/xdagtool | 1eb7fb352dd7cadcd6611279720210e04a5ec3f6 | [
"MIT"
] | null | null | null | import click
from dateutil import parser
from pathlib import Path
import shutil
g_verbose: bool = False
def time_slice(time_start, time_end):
time_start_ts = int(time_start.timestamp())
time_end_ts = int(time_end.timestamp())
time_start_slice = time_start_ts >> 6
time_end_slice = time_end_ts >> 6
... | 37.098131 | 120 | 0.641517 |
f41f88e5bdc64ed1e1aa716b6b3cf67248dd7d9d | 1,493 | py | Python | Classification Based Machine Learning for Algorithmic Trading/Predict Next Day Return/spyder_QDA.py | gopalm-ai/Machine-Learning-For-Finance | ae5527bf5b808c4be3c280823387256af88b5b04 | [
"MIT"
] | 227 | 2017-07-20T11:25:50.000Z | 2022-03-13T18:05:01.000Z | Classification Based Machine Learning for Algorithmic Trading/Predict Next Day Return/spyder_QDA.py | xaviergoby/Machine-Learning-For-Finance | 2a07f9190cc58c1e540899ad97597a5bd9172b1c | [
"MIT"
] | null | null | null | Classification Based Machine Learning for Algorithmic Trading/Predict Next Day Return/spyder_QDA.py | xaviergoby/Machine-Learning-For-Finance | 2a07f9190cc58c1e540899ad97597a5bd9172b1c | [
"MIT"
] | 128 | 2017-07-26T05:54:55.000Z | 2022-03-28T05:35:40.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 5 16:51:39 2017
@author: AnthonyN
https://www.quantstart.com/articles/Forecasting-Financial-Time-Series-Part-1
Predicting Price Returns
"""
import numpy as np
import pandas as pd
lags = 5
start_test = pd.to_datetime('2017-06-18')
from sklearn.discrimi... | 21.955882 | 88 | 0.656397 |
9c35ad480bb7634ffca9fa97a21654d15ae43ca7 | 14,967 | py | Python | run.py | BoldingBruggeman/nemo-medusa-cssm | 8e3a3a1bdfcd8c7d2e536a64c653a600b98b865e | [
"CC-BY-4.0"
] | null | null | null | run.py | BoldingBruggeman/nemo-medusa-cssm | 8e3a3a1bdfcd8c7d2e536a64c653a600b98b865e | [
"CC-BY-4.0"
] | null | null | null | run.py | BoldingBruggeman/nemo-medusa-cssm | 8e3a3a1bdfcd8c7d2e536a64c653a600b98b865e | [
"CC-BY-4.0"
] | null | null | null | from __future__ import annotations
import sys
import os
import glob
import datetime
import argparse
import re
import shutil
from typing import Optional
import yaml
import numpy
from matplotlib import pyplot
from matplotlib.dates import datestr2num, date2num, num2date
import netCDF4
start_time = None #datetime.datet... | 48.911765 | 194 | 0.627714 |
f3397a81a2ff09432fd29180f196d5a4bd12708d | 3,535 | py | Python | tempest/api/compute/v3/admin/test_hypervisor.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/v3/admin/test_hypervisor.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/v3/admin/test_hypervisor.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 IBM Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 36.071429 | 78 | 0.672702 |
b6352c3c05a7c60ba699dbbf803458fed69c80f8 | 1,130 | py | Python | user/migrations/0058_auto_20190503_1026.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 1 | 2020-05-20T08:42:49.000Z | 2020-05-20T08:42:49.000Z | user/migrations/0058_auto_20190503_1026.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 14 | 2020-03-24T17:31:08.000Z | 2022-03-11T23:59:30.000Z | user/migrations/0058_auto_20190503_1026.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 1 | 2020-04-13T12:37:37.000Z | 2020-04-13T12:37:37.000Z | # Generated by Django 2.1.5 on 2019-05-03 09:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('user', '0057_auto_20190503_1015'),
]
operations = [
migrations.AlterField(
model_name='monetization',
name='account_... | 33.235294 | 221 | 0.578761 |
0c0623a6f3f63322be25009558b8a60e99d1f038 | 46,876 | py | Python | tests/test_iot/test_iot.py | moseb/moto | d596560971ae289f102b9aecb9939b3c49a56ac5 | [
"Apache-2.0"
] | 1 | 2020-01-13T21:45:21.000Z | 2020-01-13T21:45:21.000Z | tests/test_iot/test_iot.py | moseb/moto | d596560971ae289f102b9aecb9939b3c49a56ac5 | [
"Apache-2.0"
] | 1 | 2016-02-11T14:54:01.000Z | 2016-02-12T14:11:05.000Z | tests/test_iot/test_iot.py | moseb/moto | d596560971ae289f102b9aecb9939b3c49a56ac5 | [
"Apache-2.0"
] | 2 | 2017-03-02T05:59:52.000Z | 2020-09-03T13:25:44.000Z | from __future__ import unicode_literals
import json
import sure # noqa
import boto3
from moto import mock_iot
from botocore.exceptions import ClientError
from nose.tools import assert_raises
@mock_iot
def test_things():
client = boto3.client("iot", region_name="ap-northeast-1")
name = "my-thing"
type_n... | 41.593611 | 100 | 0.71463 |
ccbfa75e4b65257a227efc6f6cc0b3b95a4ca9c4 | 1,855 | py | Python | ch_11/src/dice_server.py | real-slim-chadi/Python-Object-Oriented-Programming---4th-edition | 7c486866171786b620795fa33a79ec9ac9a8ba1b | [
"MIT"
] | 43 | 2021-06-03T18:39:09.000Z | 2022-03-29T20:32:13.000Z | ch_11/src/dice_server.py | real-slim-chadi/Python-Object-Oriented-Programming---4th-edition | 7c486866171786b620795fa33a79ec9ac9a8ba1b | [
"MIT"
] | 9 | 2022-03-12T01:04:07.000Z | 2022-03-12T01:05:01.000Z | ch_11/src/dice_server.py | real-slim-chadi/Python-Object-Oriented-Programming---4th-edition | 7c486866171786b620795fa33a79ec9ac9a8ba1b | [
"MIT"
] | 36 | 2021-06-19T07:14:09.000Z | 2022-03-12T22:17:09.000Z | """
Python 3 Object-Oriented Programming
Chapter 11. Common Design Patterns
"""
import contextlib
import dice
import gzip
import io
import socket
from typing import cast, Callable, Tuple
class ZipRoller:
def __init__(self, dice: Callable[[bytes], bytes]) -> None:
self.dice_roller = dice
def __call__... | 25.763889 | 85 | 0.657682 |
07f07429e7a9732a21447b74c7d94d5ba497971f | 5,533 | py | Python | BlazeRAT/core/messages.py | swagkarna/BlazeRAT | fa711ebabde6b1bfa6b78480ac68212ded6deff5 | [
"Apache-2.0"
] | 116 | 2020-09-01T16:55:24.000Z | 2022-03-25T02:35:10.000Z | BlazeRAT/core/messages.py | MLX15/BlazeRAT | 95b8fd903b553c2b2ad8c92907f993e33227d4e7 | [
"Apache-2.0"
] | 1 | 2021-06-13T15:04:03.000Z | 2021-06-13T15:05:51.000Z | BlazeRAT/core/messages.py | MLX15/BlazeRAT | 95b8fd903b553c2b2ad8c92907f993e33227d4e7 | [
"Apache-2.0"
] | 43 | 2020-09-02T14:42:30.000Z | 2022-03-16T03:45:06.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Author : LimerBoy
github.com/LimerBoy/BlazeRAT
Notes :
The file is needed to store the text and,
if necessary, quickly translate it into other languages.
"""
""" Authorization messages """
class auth:
incorrect_token = "⛔️ Incorrect token, attempts left %i"... | 40.094203 | 109 | 0.706488 |
73be33e24384a63c06a8597a2196de806f066b80 | 13,483 | py | Python | sdk/python/pulumi_google_native/cloudidentity/v1beta1/_inputs.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 44 | 2021-04-18T23:00:48.000Z | 2022-02-14T17:43:15.000Z | sdk/python/pulumi_google_native/cloudidentity/v1beta1/_inputs.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 354 | 2021-04-16T16:48:39.000Z | 2022-03-31T17:16:39.000Z | sdk/python/pulumi_google_native/cloudidentity/v1beta1/_inputs.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 8 | 2021-04-24T17:46:51.000Z | 2022-01-05T10:40:21.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 46.174658 | 583 | 0.680857 |
77936992548baca400e4bd814a2829fd8b1ccb05 | 7,922 | py | Python | marge/single_merge_job.py | bgamari/marge-bot | 9297e21d07e32b4bdad08e1df3b41cdae78930f1 | [
"BSD-3-Clause"
] | null | null | null | marge/single_merge_job.py | bgamari/marge-bot | 9297e21d07e32b4bdad08e1df3b41cdae78930f1 | [
"BSD-3-Clause"
] | 1 | 2019-02-06T21:54:55.000Z | 2019-02-06T21:56:29.000Z | marge/single_merge_job.py | bgamari/marge-bot | 9297e21d07e32b4bdad08e1df3b41cdae78930f1 | [
"BSD-3-Clause"
] | 1 | 2019-02-06T21:23:53.000Z | 2019-02-06T21:23:53.000Z | # pylint: disable=too-many-locals,too-many-branches,too-many-statements
import logging as log
import time
from datetime import datetime
from . import git, gitlab
from .commit import Commit
from .job import CannotMerge, MergeJob, SkipMerge
from .project import Project
class SingleMergeJob(MergeJob):
def __init__... | 49.204969 | 109 | 0.606917 |
549641fb37dc6b79358740c1dd3565defc3bb858 | 7,483 | py | Python | core/source/ruattitudes/reader.py | nicolay-r/attitudes-extraction-ds | 49a82843e6adbca35321aaaa08d05532e953a0fc | [
"MIT"
] | 3 | 2019-11-05T19:42:55.000Z | 2021-02-25T12:14:17.000Z | core/source/ruattitudes/reader.py | nicolay-r/attitudes-extraction-ds | 49a82843e6adbca35321aaaa08d05532e953a0fc | [
"MIT"
] | 1 | 2021-03-30T07:41:22.000Z | 2021-03-30T07:41:22.000Z | core/source/ruattitudes/reader.py | nicolay-r/attitudes-extraction-ds | 49a82843e6adbca35321aaaa08d05532e953a0fc | [
"MIT"
] | 1 | 2019-08-18T18:33:11.000Z | 2019-08-18T18:33:11.000Z | # -*- coding: utf-8 -*-
from core.evaluation.labels import Label
from core.processing.lemmatization.base import Stemmer
from core.runtime.object import TextObject
from core.runtime.parser import TextParser
from core.runtime.ref_opinon import RefOpinion
from core.source.ruattitudes.news import ProcessedNews
from core.so... | 37.603015 | 110 | 0.555927 |
876a6b29f51914860343a931c850722c1331f9a1 | 62,353 | py | Python | src/gitchangelog/gitchangelog.py | dfugate/gitchangelog | 7da12ad2efd0bbac412cf6ea75c08a1c9c9f1ab2 | [
"BSD-3-Clause"
] | null | null | null | src/gitchangelog/gitchangelog.py | dfugate/gitchangelog | 7da12ad2efd0bbac412cf6ea75c08a1c9c9f1ab2 | [
"BSD-3-Clause"
] | null | null | null | src/gitchangelog/gitchangelog.py | dfugate/gitchangelog | 7da12ad2efd0bbac412cf6ea75c08a1c9c9f1ab2 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import absolute_import
import locale
import re
import os
import os.path
import sys
import glob
import textwrap
import datetime
import collections
import traceback
import contextlib
import itertools
import errno
from s... | 31.067763 | 101 | 0.563501 |
a25e5d7428206757618f754a08f661586532e871 | 1,467 | py | Python | fight.py | JayPrakash916/KBC-CLI-Game | 500087cfc75b4909b6210474b3925260990aba51 | [
"MIT"
] | 1 | 2022-03-08T15:11:42.000Z | 2022-03-08T15:11:42.000Z | fight.py | jaypatel149/KBC-CLI-Game | 500087cfc75b4909b6210474b3925260990aba51 | [
"MIT"
] | null | null | null | fight.py | jaypatel149/KBC-CLI-Game | 500087cfc75b4909b6210474b3925260990aba51 | [
"MIT"
] | null | null | null | # from random import randint
# alive = True
# stamina = 10
# def report(stamina):
# if stamina > 8:
# print ("The alien is strong! It resists your pathetic attack!")
# elif stamina > 5:
# print ("With a loud grunt, the alien stands firm.")
# elif stamina > 3:
# print ("Your attac... | 31.891304 | 81 | 0.57396 |
937e08a44a0c1180c61a3e5e90cf21ee74fd10f7 | 170 | py | Python | content/example/math_numba_gpu.py | qianglise/HPDA-Python | 93eefae38569bce35e82586c17ed4a164c3db1c4 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | content/example/math_numba_gpu.py | qianglise/HPDA-Python | 93eefae38569bce35e82586c17ed4a164c3db1c4 | [
"CC-BY-4.0",
"MIT"
] | 17 | 2022-03-01T13:12:11.000Z | 2022-03-31T09:55:45.000Z | content/example/math_numba_gpu.py | qianglise/HPDA-Python | 93eefae38569bce35e82586c17ed4a164c3db1c4 | [
"CC-BY-4.0",
"MIT"
] | 2 | 2022-03-01T16:33:10.000Z | 2022-03-07T07:48:03.000Z | import math
import numba
@numba.vectorize([numba.float64(numba.float64, numba.float64)], target='cuda')
def f_numba_gpu(x,y):
return math.pow(x,3.0) + 4*math.sin(y)
| 24.285714 | 78 | 0.717647 |
b47bfbbe9ed3491cb2001cae1d52b114063a6755 | 3,321 | py | Python | assignments/A6/A6/agent3.py | jajayongjia/366 | 6389723638cef07adbe28a9c7116bc4f71b0e29c | [
"MIT"
] | null | null | null | assignments/A6/A6/agent3.py | jajayongjia/366 | 6389723638cef07adbe28a9c7116bc4f71b0e29c | [
"MIT"
] | null | null | null | assignments/A6/A6/agent3.py | jajayongjia/366 | 6389723638cef07adbe28a9c7116bc4f71b0e29c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Author: Adam White, Matthew Schlegel, Mohammad M. Ajallooeian, Sina Ghiassian
Purpose: Skeleton code for Monte Carlo Exploring Starts Control Agent
for use on A3 of Reinforcement learning course University of Alberta Fall 2017
"""
from utils import *
import numpy as np
impor... | 25.351145 | 107 | 0.657934 |
91f674f0d43eac3d2cbd3b74bde4ac98c01d1c07 | 1,459 | py | Python | venv/lib/python3.6/site-packages/examples/example_dnssec_settings.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 465 | 2016-05-07T00:22:59.000Z | 2022-03-31T08:36:24.000Z | venv/lib/python3.6/site-packages/examples/example_dnssec_settings.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 129 | 2016-05-17T08:00:15.000Z | 2022-03-31T23:09:36.000Z | venv/lib/python3.6/site-packages/examples/example_dnssec_settings.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 167 | 2016-05-09T16:19:27.000Z | 2022-03-31T07:19:18.000Z | #!/usr/bin/env python
"""Cloudflare API code - example"""
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
import CloudFlare
def main():
"""Cloudflare API code - example"""
# Grab the first argument, if there is one
try:
zone_name = sys.argv[1]
params = {'name':zone_name, '... | 26.053571 | 70 | 0.566141 |
d81024c9a2a76620ab66416314477f99560e3429 | 36,455 | py | Python | pydevices/RfxDevices/CAENDT5720.py | orozda/mdsplus | 101265b0f94554e06c0e461b59862a6d3b656f8c | [
"BSD-2-Clause"
] | null | null | null | pydevices/RfxDevices/CAENDT5720.py | orozda/mdsplus | 101265b0f94554e06c0e461b59862a6d3b656f8c | [
"BSD-2-Clause"
] | null | null | null | pydevices/RfxDevices/CAENDT5720.py | orozda/mdsplus | 101265b0f94554e06c0e461b59862a6d3b656f8c | [
"BSD-2-Clause"
] | null | null | null | #
# Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list o... | 40.10451 | 248 | 0.600521 |
ee269436a0a76c7351b420811a929b16e0ed781d | 772 | py | Python | EngLearner/users/migrations/0007_auto_20200330_2201.py | jiangyifan123/EngLearner | a54c205a6e6bf3b2af366b56a7b7f97344fa1466 | [
"bzip2-1.0.6"
] | null | null | null | EngLearner/users/migrations/0007_auto_20200330_2201.py | jiangyifan123/EngLearner | a54c205a6e6bf3b2af366b56a7b7f97344fa1466 | [
"bzip2-1.0.6"
] | null | null | null | EngLearner/users/migrations/0007_auto_20200330_2201.py | jiangyifan123/EngLearner | a54c205a6e6bf3b2af366b56a7b7f97344fa1466 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2 on 2020-03-30 14:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0006_auto_20200330_2200'),
]
operations = [
migrations.AlterField(
model_name='boughtproduct',
name='quantity... | 26.62069 | 70 | 0.586788 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.