hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0e5efbf488bea2086cd3d3d62901e7b0824c5f12 | 136 | py | Python | exercicios/exe012/exe0012.py | tiagolsouza/exercicios-Curso-em-video-PYTHON | e4e6975fac7e4883aeab58b970c6ca72895564e4 | [
"MIT"
] | null | null | null | exercicios/exe012/exe0012.py | tiagolsouza/exercicios-Curso-em-video-PYTHON | e4e6975fac7e4883aeab58b970c6ca72895564e4 | [
"MIT"
] | null | null | null | exercicios/exe012/exe0012.py | tiagolsouza/exercicios-Curso-em-video-PYTHON | e4e6975fac7e4883aeab58b970c6ca72895564e4 | [
"MIT"
] | null | null | null | n = float(input('Digite o preço atual do produto: R$'))
a = n * 0.95
print('O preço do produto com disconto sera: R$ {:.2f}'.format(a))
| 34 | 66 | 0.647059 |
70f01f93e70ac89be37cfa50afe428b32919dcc9 | 10,644 | py | Python | SCanalyzer/SCanalyzer.py | tylerharter/simulator | 75a77b458b10a9fd3f524ece6438f5e22ab19f2b | [
"Apache-2.0"
] | null | null | null | SCanalyzer/SCanalyzer.py | tylerharter/simulator | 75a77b458b10a9fd3f524ece6438f5e22ab19f2b | [
"Apache-2.0"
] | null | null | null | SCanalyzer/SCanalyzer.py | tylerharter/simulator | 75a77b458b10a9fd3f524ece6438f5e22ab19f2b | [
"Apache-2.0"
] | null | null | null | from .busSim.manager import managerFactory
from .result.searchResult import SearchResult
from .util import gen_start_time, transform
from .gtfs_edit import copy_with_edits
from .service.yelp import get_results
from .census import Census
import numpy as np
import pandas as pd
import geopandas as gpd
from shapely.geometr... | 39.422222 | 119 | 0.611988 |
80763c23c48650f0e1759925e5321a618629afc3 | 946 | py | Python | kubernetes/test/test_v1_volume_device.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | 1 | 2019-02-17T15:28:39.000Z | 2019-02-17T15:28:39.000Z | kubernetes/test/test_v1_volume_device.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_volume_device.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 21.022222 | 105 | 0.704017 |
f22644cb5ec37609b4cf110a1003d7a71d2b59b2 | 467 | py | Python | cobrakbase/core/kbasefbafba.py | cshenry/cobrakbase | 9ab3db059171e7532082646302db22338ab61a55 | [
"MIT"
] | 3 | 2018-11-28T12:48:54.000Z | 2022-02-28T22:20:32.000Z | cobrakbase/core/kbasefbafba.py | cshenry/cobrakbase | 9ab3db059171e7532082646302db22338ab61a55 | [
"MIT"
] | 2 | 2020-06-26T20:13:16.000Z | 2020-10-27T05:10:34.000Z | cobrakbase/core/kbasefbafba.py | cshenry/cobrakbase | 9ab3db059171e7532082646302db22338ab61a55 | [
"MIT"
] | 1 | 2020-09-02T17:40:34.000Z | 2020-09-02T17:40:34.000Z | from cobrakbase.core.kbaseobject import KBaseObjectBase
from cobrakbase.core.utils import get_id_from_ref
class KBaseFBA(KBaseObjectBase):
def get_reaction_variable_by_id(self, rxn_id):
for v in self.data['FBAReactionVariables']:
v_id = v['modelreaction_ref'].split('/')[-1]
if rxn... | 27.470588 | 56 | 0.665953 |
da824f8e3c4116c21554ddfbef3b2a04a3fbe691 | 38,251 | py | Python | PyU4V/tools/openstack/migrate_utils.py | SiSTm1/PyU4V | ce9784fc5f8192024cfa42509b8d45583b83f01d | [
"MIT"
] | 19 | 2020-01-06T12:02:25.000Z | 2021-12-14T06:50:04.000Z | PyU4V/tools/openstack/migrate_utils.py | SiSTm1/PyU4V | ce9784fc5f8192024cfa42509b8d45583b83f01d | [
"MIT"
] | 53 | 2019-12-17T17:26:44.000Z | 2022-02-03T12:28:34.000Z | PyU4V/tools/openstack/migrate_utils.py | SiSTm1/PyU4V | ce9784fc5f8192024cfa42509b8d45583b83f01d | [
"MIT"
] | 13 | 2019-01-24T17:10:05.000Z | 2019-12-09T06:33:21.000Z | # Copyright (c) 2020 Dell Inc. or its subsidiaries.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 41.53203 | 79 | 0.584691 |
b1772ccdf901bf788cf83538e1c29b5fc967e602 | 41,008 | py | Python | resolwe/process/fields.py | AnzeLovse/resolwe | 3b3d9466363fcd189c581bd581e594cb9e621606 | [
"Apache-2.0"
] | null | null | null | resolwe/process/fields.py | AnzeLovse/resolwe | 3b3d9466363fcd189c581bd581e594cb9e621606 | [
"Apache-2.0"
] | null | null | null | resolwe/process/fields.py | AnzeLovse/resolwe | 3b3d9466363fcd189c581bd581e594cb9e621606 | [
"Apache-2.0"
] | null | null | null | """Process input or output fields."""
import collections
import glob
import gzip
import os
import re
import shlex
import shutil
import subprocess
import tarfile
import zlib
from itertools import zip_longest
from pathlib import Path
from typing import Dict, Iterable, List, Optional, Set, Tuple, Type, Union
import reque... | 32.391785 | 100 | 0.564695 |
5fa2369d1e2d165a4e0ec7696d8bd2417f276b66 | 2,411 | py | Python | tests/airflow/providers/teradata/hooks/new_test_ttu.py | RUalexeyusman/apache-airflow-providers-teradata | 08fc77595209f1d9220f3c9301f4fecc45a7c6e0 | [
"MIT"
] | 2 | 2021-11-26T21:38:30.000Z | 2022-03-30T12:38:53.000Z | tests/airflow/providers/teradata/hooks/new_test_ttu.py | RUalexeyusman/apache-airflow-providers-teradata | 08fc77595209f1d9220f3c9301f4fecc45a7c6e0 | [
"MIT"
] | null | null | null | tests/airflow/providers/teradata/hooks/new_test_ttu.py | RUalexeyusman/apache-airflow-providers-teradata | 08fc77595209f1d9220f3c9301f4fecc45a7c6e0 | [
"MIT"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 33.486111 | 70 | 0.592285 |
7d2c75aac5f2e6427ca823970487d4b06cc95e5b | 596 | py | Python | day6/main.py | thiagowfx/adventofcode | 27b50075b86761f995a60d5b8be24cf253c13968 | [
"BSD-2-Clause"
] | 5 | 2021-12-02T16:54:04.000Z | 2022-02-28T04:26:38.000Z | day6/main.py | thiagowfx/adventofcode | 27b50075b86761f995a60d5b8be24cf253c13968 | [
"BSD-2-Clause"
] | null | null | null | day6/main.py | thiagowfx/adventofcode | 27b50075b86761f995a60d5b8be24cf253c13968 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
from collections import Counter
import sys
with open(sys.argv[1]) as input:
numbers = list(map(int, input.read().split(',')))
def simulation(days):
fish = Counter(numbers)
for _ in range(days):
next_fish = Counter()
for timer, count in fish.items():
if t... | 21.285714 | 53 | 0.565436 |
a6116359e5e1449b17317d330ca14acafd652057 | 2,762 | py | Python | scripts/compare_masks.py | plaplant/SSINS | 6840fe277862d6bb5b76bbad2d4dcbd2604eaf36 | [
"BSD-2-Clause"
] | 4 | 2018-10-04T00:58:15.000Z | 2019-07-12T04:12:17.000Z | scripts/compare_masks.py | plaplant/SSINS | 6840fe277862d6bb5b76bbad2d4dcbd2604eaf36 | [
"BSD-2-Clause"
] | 67 | 2018-09-18T20:14:12.000Z | 2022-03-14T20:09:03.000Z | scripts/compare_masks.py | plaplant/SSINS | 6840fe277862d6bb5b76bbad2d4dcbd2604eaf36 | [
"BSD-2-Clause"
] | 5 | 2019-07-31T22:47:53.000Z | 2021-06-24T14:03:06.000Z | import argparse
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import colors
from pyuvdata import UVFlag
from astropy.time import Time
"""
A script for comparing masks from the same obsid with different settings.
"""
parser = argparse.ArgumentParser()
parser.add_argument("-o", "--obsid", help="The... | 40.028986 | 116 | 0.691528 |
2318d1d4d5c12c158e5e3e7bc5439598c585e4c4 | 173 | py | Python | configs/visdrone/resnet50_b32x8_imagenet.py | w-sugar/mmclassification | 2ebc873948144df18feca5c5b11df16a55316723 | [
"Apache-2.0"
] | null | null | null | configs/visdrone/resnet50_b32x8_imagenet.py | w-sugar/mmclassification | 2ebc873948144df18feca5c5b11df16a55316723 | [
"Apache-2.0"
] | null | null | null | configs/visdrone/resnet50_b32x8_imagenet.py | w-sugar/mmclassification | 2ebc873948144df18feca5c5b11df16a55316723 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/resnet50_visdrone.py', '../_base_/datasets/visdrone_bs32.py',
'../_base_/schedules/visdrone_bs256.py', '../_base_/default_runtime.py'
]
| 34.6 | 83 | 0.693642 |
f5278f5ecadbea799c57b6264870f6221229dc36 | 1,783 | py | Python | DroneV2.py | Discordmodsbers/Drone.py | d55933c11894960e7db65bb30d6d545feb2287db | [
"Apache-2.0"
] | null | null | null | DroneV2.py | Discordmodsbers/Drone.py | d55933c11894960e7db65bb30d6d545feb2287db | [
"Apache-2.0"
] | null | null | null | DroneV2.py | Discordmodsbers/Drone.py | d55933c11894960e7db65bb30d6d545feb2287db | [
"Apache-2.0"
] | null | null | null | import random
import socket
import struct
import sys
import os
print("Place Device Under Drone-")
import time
time.sleep(3)
print("-Injecting Maliware")
print("Closing injector file")
print("DONE!")
time.sleep(10)
os.system ('clear')
print("paid key")
k = input("")
if k == '1980':
os.system ('clear')
print("tha... | 19.380435 | 52 | 0.661806 |
86e388f83c92f985dd8990f5da608c5e67ea944c | 48,965 | py | Python | src/dashd_intf.py | muteio/ghostnode-tool | c42868ed6c009c47482d23ebac0d101adbd8c103 | [
"MIT"
] | 1 | 2019-11-02T01:39:52.000Z | 2019-11-02T01:39:52.000Z | src/dashd_intf.py | muteio/ghostnode-tool | c42868ed6c009c47482d23ebac0d101adbd8c103 | [
"MIT"
] | null | null | null | src/dashd_intf.py | muteio/ghostnode-tool | c42868ed6c009c47482d23ebac0d101adbd8c103 | [
"MIT"
] | 1 | 2021-03-05T13:34:53.000Z | 2021-03-05T13:34:53.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: Bertrand256
# Created on: 2017-03
import bitcoin
import os
import re
import socket
import sqlite3
import ssl
import threading
import time
import datetime
import logging
import simplejson
from PyQt5.QtCore import QThread
from bitcoinrpc.authproxy import AuthServic... | 42.284111 | 131 | 0.549637 |
85086400e571cf100b31cb67df8b0fa08a63b920 | 503 | py | Python | test_stream/udp_opencv_server.py | alphaciel/Balancing-Robot-Raspberry-Pi-DIY | 8a61acf688ea0915017c40eaff3841a9b219f9b7 | [
"MIT"
] | null | null | null | test_stream/udp_opencv_server.py | alphaciel/Balancing-Robot-Raspberry-Pi-DIY | 8a61acf688ea0915017c40eaff3841a9b219f9b7 | [
"MIT"
] | null | null | null | test_stream/udp_opencv_server.py | alphaciel/Balancing-Robot-Raspberry-Pi-DIY | 8a61acf688ea0915017c40eaff3841a9b219f9b7 | [
"MIT"
] | null | null | null | #Server prog
import socket
import numpy
import time
import cv2
UDP_IP="127.0.0.1"
UDP_PORT = 999
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((UDP_IP, UDP_PORT))
s=""
while True:
data, addr = sock.recvfrom(46080)
s+= data
if len(s) == (46080*20):
frame = numpy.fromst... | 19.346154 | 57 | 0.59841 |
836bfec3cfb4efb4ef4c247055649bdd1c4e1afa | 9,384 | py | Python | ispyb/sp/core.py | rjgildea/ispyb-api | 24e76c79ef06c7cc8edc35066aa1021dee20d67a | [
"Apache-2.0"
] | null | null | null | ispyb/sp/core.py | rjgildea/ispyb-api | 24e76c79ef06c7cc8edc35066aa1021dee20d67a | [
"Apache-2.0"
] | null | null | null | ispyb/sp/core.py | rjgildea/ispyb-api | 24e76c79ef06c7cc8edc35066aa1021dee20d67a | [
"Apache-2.0"
] | null | null | null | # core.py
#
# Copyright (C) 2016 Diamond Light Source, Karl Levik
#
# 2016-11-30
#
# Methods to store and retrieve data in the core tables
#
import copy
import ispyb.interface.core
from ispyb.strictordereddict import StrictOrderedDict
class Core(ispyb.interface.core.IF):
"""Core provides methods to store and... | 37.536 | 194 | 0.641624 |
2d1a8d3504ff08205aaf11ac135173dac86e01fd | 29,760 | py | Python | pnacl/driver/pnacl-driver.py | yantrabuddhi/nativeclient | 3462f030ad4a8fc19e446a95ac312e70db8a0444 | [
"BSD-3-Clause"
] | null | null | null | pnacl/driver/pnacl-driver.py | yantrabuddhi/nativeclient | 3462f030ad4a8fc19e446a95ac312e70db8a0444 | [
"BSD-3-Clause"
] | null | null | null | pnacl/driver/pnacl-driver.py | yantrabuddhi/nativeclient | 3462f030ad4a8fc19e446a95ac312e70db8a0444 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import re
import subprocess
from driver_tools import AddHostBinarySearchPath, DefaultOutputName, \
DefaultPCHOutputName, Driv... | 37.014925 | 84 | 0.583199 |
ea5ce7cc5b6e740ea6de5f526c9f8c03dd0ed5b8 | 885 | py | Python | test/test_pipeline/components/classification/test_gaussian_nb.py | Louquinze/auto-sklearn | b2ac331c500ebef7becf372802493a7b235f7cec | [
"BSD-3-Clause"
] | 6,390 | 2015-07-11T07:59:51.000Z | 2022-03-31T16:45:15.000Z | test/test_pipeline/components/classification/test_gaussian_nb.py | Louquinze/auto-sklearn | b2ac331c500ebef7becf372802493a7b235f7cec | [
"BSD-3-Clause"
] | 1,276 | 2015-07-29T02:11:29.000Z | 2022-03-31T17:31:34.000Z | test/test_pipeline/components/classification/test_gaussian_nb.py | Louquinze/auto-sklearn | b2ac331c500ebef7becf372802493a7b235f7cec | [
"BSD-3-Clause"
] | 1,313 | 2015-07-20T14:11:39.000Z | 2022-03-25T18:22:48.000Z | import sklearn.naive_bayes
from autosklearn.pipeline.components.classification.gaussian_nb import \
GaussianNB
from .test_base import BaseClassificationComponentTest
class GaussianNBComponentTest(BaseClassificationComponentTest):
__test__ = True
res = dict()
res["default_iris"] = 0.959999999999999... | 31.607143 | 72 | 0.761582 |
ceed04a687d3af77e3837eaac61586446d74cc12 | 4,457 | py | Python | legacy/dx/simulator/simulator_diagnoser/io/db_client.py | GaloisInc/adapt | 2ccff778d3e77505899266572f8f7caacb5b630f | [
"BSD-3-Clause"
] | 2 | 2020-04-09T13:04:25.000Z | 2021-09-24T14:17:26.000Z | legacy/dx/simulator/simulator_diagnoser/io/db_client.py | GaloisInc/adapt | 2ccff778d3e77505899266572f8f7caacb5b630f | [
"BSD-3-Clause"
] | null | null | null | legacy/dx/simulator/simulator_diagnoser/io/db_client.py | GaloisInc/adapt | 2ccff778d3e77505899266572f8f7caacb5b630f | [
"BSD-3-Clause"
] | 3 | 2019-09-20T20:49:54.000Z | 2021-09-02T17:33:47.000Z | import asyncio
import aiogremlin
import logging
import uuid
class DBClient(object):
def __init__(self, url='http://localhost:8182/'):
self.loop = asyncio.get_event_loop()
self.client = aiogremlin.GremlinClient(url=url, loop=self.loop)
self.log = logging.getLogger('dx-logger')
def __del... | 36.834711 | 80 | 0.528607 |
358f539cab695fe354af56785a148c8784d6e869 | 1,922 | py | Python | PyTests/RustPython/attr.py | LiarPrincess/Violet | 0a4268649b0eec3ab631d19015d7043394c6571e | [
"MIT"
] | null | null | null | PyTests/RustPython/attr.py | LiarPrincess/Violet | 0a4268649b0eec3ab631d19015d7043394c6571e | [
"MIT"
] | 6 | 2021-10-14T15:55:16.000Z | 2022-03-31T14:04:02.000Z | PyTests/RustPython/attr.py | LiarPrincess/Violet | 0a4268649b0eec3ab631d19015d7043394c6571e | [
"MIT"
] | null | null | null | from testutils import assert_raises
class A:
pass
class B:
x = 50
a = A()
a.b = 10
assert hasattr(a, 'b')
assert a.b == 10
assert B.x == 50
# test delete class attribute with del keyword
del B.x
with assert_raises(AttributeError):
_ = B.x
# test override attribute
setattr(a, 'b', 12)
assert a.b == 12... | 18.660194 | 57 | 0.665453 |
e13ae30073666da184c4423dd856359982d80803 | 1,423 | py | Python | lexicon/tests/test_parser.py | 1500cloud/lexicon | 8fa65a4e8c844d5d7c33f55ac6e66242f7d415d9 | [
"MIT"
] | 1 | 2019-08-17T23:09:24.000Z | 2019-08-17T23:09:24.000Z | lexicon/tests/test_parser.py | 1500cloud/lexicon | 8fa65a4e8c844d5d7c33f55ac6e66242f7d415d9 | [
"MIT"
] | null | null | null | lexicon/tests/test_parser.py | 1500cloud/lexicon | 8fa65a4e8c844d5d7c33f55ac6e66242f7d415d9 | [
"MIT"
] | 1 | 2021-01-06T16:04:36.000Z | 2021-01-06T16:04:36.000Z | """Unit tests for the Lexicon CLI parser"""
# pylint: disable=missing-docstring
from __future__ import absolute_import
import pytest
from lexicon.parser import (
generate_base_provider_parser,
generate_cli_main_parser,
)
def test_base_provider_parser():
baseparser = generate_base_provider_parser()
pa... | 29.040816 | 68 | 0.722417 |
89638ce6ced20de1374c46368f2ddd6fe0a057b6 | 15,673 | py | Python | page/privacy.py | moorer2k/pinylib-rtc | a4dfe70ce7fbba4f41b140bb15349747d060a34a | [
"MIT"
] | null | null | null | page/privacy.py | moorer2k/pinylib-rtc | a4dfe70ce7fbba4f41b140bb15349747d060a34a | [
"MIT"
] | null | null | null | page/privacy.py | moorer2k/pinylib-rtc | a4dfe70ce7fbba4f41b140bb15349747d060a34a | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import util.web
class Privacy:
"""
This class represents tinychat's privacy page for a room,
it contains methods to change a rooms privacy settings.
"""
def __init__(self, proxy):
""" Create a instance of the Privacy class.
:param proxy: A proxy in th... | 38.603448 | 113 | 0.56256 |
fc120c41dd5fc086d52c8c65662b4d4195162951 | 27,020 | py | Python | statsmodels/graphics/mosaicplot.py | haribharadwaj/statsmodels | 8675b890607fe6f116b1186dcba4c387c5e3778a | [
"BSD-3-Clause"
] | 4 | 2019-02-18T20:35:02.000Z | 2019-04-09T03:02:58.000Z | statsmodels/graphics/mosaicplot.py | haribharadwaj/statsmodels | 8675b890607fe6f116b1186dcba4c387c5e3778a | [
"BSD-3-Clause"
] | null | null | null | statsmodels/graphics/mosaicplot.py | haribharadwaj/statsmodels | 8675b890607fe6f116b1186dcba4c387c5e3778a | [
"BSD-3-Clause"
] | 1 | 2022-02-25T02:59:14.000Z | 2022-02-25T02:59:14.000Z | """Create a mosaic plot from a contingency table.
It allows to visualize multivariate categorical data in a rigorous
and informative way.
see the docstring of the mosaic function for more informations.
"""
# Author: Enrico Giampieri - 21 Jan 2013
from __future__ import division
from statsmodels.compat.python import ... | 41.001517 | 87 | 0.632531 |
553e3f9b7e6a4e4a9a08269d77f5e346a7330b5e | 1,951 | py | Python | code/old/mollweide_creator.py | andrewbowen19/ClusterEclipsingBinaries | e554cb6bb613e0d3703314e50fcf5289f50bf572 | [
"MIT"
] | null | null | null | code/old/mollweide_creator.py | andrewbowen19/ClusterEclipsingBinaries | e554cb6bb613e0d3703314e50fcf5289f50bf572 | [
"MIT"
] | null | null | null | code/old/mollweide_creator.py | andrewbowen19/ClusterEclipsingBinaries | e554cb6bb613e0d3703314e50fcf5289f50bf572 | [
"MIT"
] | null | null | null | # OLD mollweide creator -- deprecated do not cuse
# Script to generate Nobs mollweides for colossus and baseline strategies
import pandas as pd
import numpy as np
import os
from astropy.coordinates import Angle, SkyCoord
import astropy.units as u
from OpSim import OpSim
from TRILEGAL import TRILEGAL
from matplotlib im... | 30.484375 | 103 | 0.718606 |
e96b14b8ca8839b12c8d319791a9515519707aca | 4,074 | py | Python | bot/cogs/Config/__init__.py | abindent/Utility-Bot | a11b790e7930a035fdca2b153950e624e3abafe4 | [
"MIT"
] | 2 | 2022-03-20T13:12:35.000Z | 2022-03-27T08:52:37.000Z | bot/cogs/Config/__init__.py | abindent/Nextcord-Utility-Bot | a11b790e7930a035fdca2b153950e624e3abafe4 | [
"MIT"
] | 2 | 2022-03-07T01:10:21.000Z | 2022-03-08T07:33:06.000Z | bot/cogs/Config/__init__.py | abindent/Utility-Bot | a11b790e7930a035fdca2b153950e624e3abafe4 | [
"MIT"
] | 1 | 2022-03-08T07:41:46.000Z | 2022-03-08T07:41:46.000Z | import random, asyncio, nextcord
from nextcord.ext import commands
from util.databases.config import Blacklist_DB
class Configuration(commands.Cog, description="Configure the bot."):
COG_EMOJI = "<:config:956526378008846437>"
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
... | 35.736842 | 109 | 0.614384 |
ee4d5ad35c2e2a8c71c1f9cff65573a7fa34bc55 | 6,882 | py | Python | git_stalk/stalk.py | NefixEstrada/git-stalk-cli | 8ce85cbfd450b54f71ca3055c80460b6bda1e6c7 | [
"MIT"
] | null | null | null | git_stalk/stalk.py | NefixEstrada/git-stalk-cli | 8ce85cbfd450b54f71ca3055c80460b6bda1e6c7 | [
"MIT"
] | null | null | null | git_stalk/stalk.py | NefixEstrada/git-stalk-cli | 8ce85cbfd450b54f71ca3055c80460b6bda1e6c7 | [
"MIT"
] | null | null | null | import json
import requests
import datetime
import sys
import re
import os
import datetime
import argparse
from dateutil import tz
from prettytable import PrettyTable
def jft(user):
user_link = "https://api.github.com/users/" + str(user)
response = requests.get(user_link)
return response.status_code
def... | 32.616114 | 166 | 0.588928 |
9ecdba9c2814f25b33623f1e2d6b2f78e78c5f71 | 541 | py | Python | coord2vec/common/geographic/tests/flask_example_app.py | jonzarecki/coord2vec | 4f267fdd87af7b3d3558ca834b88e9ab7c309c18 | [
"Apache-2.0"
] | null | null | null | coord2vec/common/geographic/tests/flask_example_app.py | jonzarecki/coord2vec | 4f267fdd87af7b3d3558ca834b88e9ab7c309c18 | [
"Apache-2.0"
] | null | null | null | coord2vec/common/geographic/tests/flask_example_app.py | jonzarecki/coord2vec | 4f267fdd87af7b3d3558ca834b88e9ab7c309c18 | [
"Apache-2.0"
] | 1 | 2021-01-25T09:21:17.000Z | 2021-01-25T09:21:17.000Z | """ flask_example.py
Required packages:
- flask
- folium
Usage:
Start the flask server by running:
$ python flask_example.py
And then head to http://127.0.0.1:5000/ in your browser to see the map displayed
"""
from flask import Flask
import folium
app = Flask(__name__)
@app.ro... | 16.90625 | 84 | 0.669131 |
77fc43181b550fdc77e418558ffb30b4f06e141c | 8,766 | py | Python | src/wallet/trading/trade_store.py | 13767849/chia-blockchain | ad7d7e0cced7f2f6deddc9e006dbaeee6dab8f66 | [
"Apache-2.0"
] | 1 | 2021-05-28T01:38:23.000Z | 2021-05-28T01:38:23.000Z | src/wallet/trading/trade_store.py | 13767849/chia-blockchain | ad7d7e0cced7f2f6deddc9e006dbaeee6dab8f66 | [
"Apache-2.0"
] | null | null | null | src/wallet/trading/trade_store.py | 13767849/chia-blockchain | ad7d7e0cced7f2f6deddc9e006dbaeee6dab8f66 | [
"Apache-2.0"
] | null | null | null | from typing import List, Optional
import aiosqlite
from src.types.blockchain_format.sized_bytes import bytes32
from src.types.mempool_inclusion_status import MempoolInclusionStatus
from src.util.errors import Err
from src.util.ints import uint8, uint32
from src.wallet.trade_record import TradeRecord
from src.wallet.t... | 32.708955 | 118 | 0.606548 |
8163184bea4450d8faedd6f3d068c99c6560b188 | 2,814 | py | Python | tests/test_temperature_system.py | SmartSleepIoT/SmartSleepCoding | 21c19489f0c477cbfbabd3a1d232f526f84a9e49 | [
"BSD-3-Clause"
] | null | null | null | tests/test_temperature_system.py | SmartSleepIoT/SmartSleepCoding | 21c19489f0c477cbfbabd3a1d232f526f84a9e49 | [
"BSD-3-Clause"
] | 41 | 2021-10-20T17:54:59.000Z | 2022-02-02T20:43:53.000Z | tests/test_temperature_system.py | SmartSleepIoT/SmartSleepCoding | 21c19489f0c477cbfbabd3a1d232f526f84a9e49 | [
"BSD-3-Clause"
] | null | null | null | import time
import pytest
from flask import g
from flask import session
import paho.mqtt.client as paho
from SmartSleep.db import get_db
from flask import json
import runpy
msg_nr = 0
messages = [""]
broker = 'broker.emqx.io'
port = 1883
def update_contor():
global msg_nr
msg_nr += 1
def on_message(client... | 29.621053 | 105 | 0.646411 |
3bef32f6cc3c85d8deff531c8001d0c964461c54 | 12,138 | py | Python | sdk/python/pulumi_azure_native/network/v20181201/vpn_site.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20181201/vpn_site.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20181201/vpn_site.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"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... | 51.21519 | 2,840 | 0.670456 |
61b59bf4c29481c32b18986d982dc1617da676bd | 5,744 | py | Python | Client-Code-2018/CurrentFlipperCode/Sensors/Hazmat2.py | Max-Godfrey-2018/RoboCup-2018-Driving-Code | a39dc01f7c1213c8079216d49d376b317efbf5f3 | [
"MIT"
] | 1 | 2018-11-27T05:11:04.000Z | 2018-11-27T05:11:04.000Z | Client-Code-2018/CurrentFlipperCode/Sensors/Hazmat2.py | Max-Godfrey-2018/RoboCup-2018-Driving-Code | a39dc01f7c1213c8079216d49d376b317efbf5f3 | [
"MIT"
] | 1 | 2017-06-14T11:08:38.000Z | 2017-06-14T11:08:38.000Z | Old Laptop Desktop/Code_Files/Driving_Code/Flipperes/Sensors/Hazmat2.py | CCGSRobotics/Archive-Code | a963926984bb1abb9a457ea2cf6212d8362f4642 | [
"Apache-2.0"
] | null | null | null | from collections import deque
import numpy as np
import argparse
import imutils
import cv2
import time as t
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-v", "--video",
help="path to the (optional) video file")
ap.add_argument("-r", "--real", type=str, default... | 30.553191 | 124 | 0.705258 |
e31998ffe4ed7aaa8b1dc1abf59ac03b6a5a935d | 292 | py | Python | common/gl.py | quentin-xia/Maticv | 76d599b68ef5bdab10e8dbc0c120657610933ad8 | [
"MIT"
] | null | null | null | common/gl.py | quentin-xia/Maticv | 76d599b68ef5bdab10e8dbc0c120657610933ad8 | [
"MIT"
] | null | null | null | common/gl.py | quentin-xia/Maticv | 76d599b68ef5bdab10e8dbc0c120657610933ad8 | [
"MIT"
] | null | null | null | #!/usr/bin/evn python
#-*- coding:utf-8 -*-
import tempfile
color = [
[(0,0,255),0.7,0.5],
[(214,112,218),0.8,0.4],
[(238,104,123),0.8,0.3]
]
ADB_CMD = ""
AAPT_CMD = ""
MOBILE_WIDTH = 0
MOBILE_HEIGHT = 0
WINDOW = 0
TEMP_IMAGE_PATH = "%s/screenshot.png" % tempfile.gettempdir()
| 16.222222 | 61 | 0.599315 |
84020dbd8fe9eeab2cf5561b927ce0c224046b48 | 4,655 | py | Python | tests/churn_script_logging_and_tests.py | digitalemerge/clean_churn | b97bdeff4ab6169dcffd8d3bfc4529c5e9d58b46 | [
"MIT"
] | null | null | null | tests/churn_script_logging_and_tests.py | digitalemerge/clean_churn | b97bdeff4ab6169dcffd8d3bfc4529c5e9d58b46 | [
"MIT"
] | null | null | null | tests/churn_script_logging_and_tests.py | digitalemerge/clean_churn | b97bdeff4ab6169dcffd8d3bfc4529c5e9d58b46 | [
"MIT"
] | null | null | null | """
Script to perform tests by use of the pytest suite
"""
import os
from os import path
import logging
import pandas as pd
import joblib
import churn_library as cl
import constants
def test_import(test_dataframe):
"""
tests data import - Uses the test_dataframe fixture to read in the csv
"""
try:
... | 28.734568 | 99 | 0.588829 |
4575dd98344ae988fee86e5bf0774cf08e8fa242 | 16,168 | py | Python | tests/api/test_auth.py | TheJJ/synapse | 1032393dfb0c865fc540539dfe649e7b1a32037a | [
"Apache-2.0"
] | 2 | 2021-05-14T19:05:03.000Z | 2021-05-26T23:00:43.000Z | tests/api/test_auth.py | TheJJ/synapse | 1032393dfb0c865fc540539dfe649e7b1a32037a | [
"Apache-2.0"
] | null | null | null | tests/api/test_auth.py | TheJJ/synapse | 1032393dfb0c865fc540539dfe649e7b1a32037a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2015 - 2016 OpenMarket 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 applic... | 40.828283 | 86 | 0.670584 |
20f053203283451b7664cb0acdb5c6694b0960f8 | 17,556 | py | Python | test_suite/generic/test_generic.py | narmaku/cloud-image-val | 5ec65df72799915f92d0a42108d22d50fd6322c1 | [
"Apache-2.0"
] | null | null | null | test_suite/generic/test_generic.py | narmaku/cloud-image-val | 5ec65df72799915f92d0a42108d22d50fd6322c1 | [
"Apache-2.0"
] | null | null | null | test_suite/generic/test_generic.py | narmaku/cloud-image-val | 5ec65df72799915f92d0a42108d22d50fd6322c1 | [
"Apache-2.0"
] | null | null | null | import pytest
from lib import test_lib
class TestsGeneric:
@pytest.mark.run_on(['all'])
def test_bash_history_is_empty(self, host):
users = [host.user().name, 'root']
for u in users:
file_path = f'/home/{u}/.bash_history'
bash_history_file = host.file(file_path)
... | 37.836207 | 116 | 0.59877 |
6b4ff617c175f65779567fe4ac46dfa2ab53c4d5 | 2,761 | py | Python | data_preprocess.py | Chenrj233/bert_pratice | 8dab98d1670ecddb3febc0d087b5f99cc07fb7f9 | [
"Apache-2.0"
] | null | null | null | data_preprocess.py | Chenrj233/bert_pratice | 8dab98d1670ecddb3febc0d087b5f99cc07fb7f9 | [
"Apache-2.0"
] | null | null | null | data_preprocess.py | Chenrj233/bert_pratice | 8dab98d1670ecddb3febc0d087b5f99cc07fb7f9 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
import os
import sys
import logging
import re
import nltk
import gensim
import pickle
import numpy as np
import pandas as pd
from bs4 import BeautifulSoup
from collections import defaultdict
from sklearn.model_selection import train_test_sp... | 27.336634 | 145 | 0.613546 |
2498296886cec23f9957b725ff1874db9d26e1c3 | 7,515 | py | Python | Computer-vision/@PeterChenYijie yolo-tensorflow/test.py | PeterChenYijie/DeepLearningZeroToALL | 8f629e326a84a4272e66f34ba5f918576a595c70 | [
"MIT"
] | 12 | 2018-03-07T00:44:56.000Z | 2019-01-25T11:07:43.000Z | Computer-vision/@PeterChenYijie yolo-tensorflow/test.py | PeterChenYijie/DeepLearning | 8f629e326a84a4272e66f34ba5f918576a595c70 | [
"MIT"
] | 3 | 2018-03-02T03:38:41.000Z | 2018-03-20T00:45:06.000Z | Computer-vision/@PeterChenYijie yolo-tensorflow/test.py | PeterChenYijie/DeepLearning | 8f629e326a84a4272e66f34ba5f918576a595c70 | [
"MIT"
] | 7 | 2018-03-02T07:14:53.000Z | 2019-01-04T08:06:47.000Z | import tensorflow as tf
import numpy as np
import os
import cv2
import argparse
import yolo.config as cfg
from yolo.yolo_net import YOLONet
from utils.timer import Timer
class Detector(object):
def __init__(self, net, weight_file):
self.net = net
self.weights_file = weight_file
self.clas... | 39.140625 | 151 | 0.589754 |
bc10b3a754b1e07f5391ee346cb0afda2918b4d2 | 1,580 | py | Python | data_files/PROGRAMS/MEDIUM/0018_4Sum.py | sudhirrd007/LeetCode-scraper | de87ff17fff2c73e67392321df1107cce7cbf883 | [
"MIT"
] | null | null | null | data_files/PROGRAMS/MEDIUM/0018_4Sum.py | sudhirrd007/LeetCode-scraper | de87ff17fff2c73e67392321df1107cce7cbf883 | [
"MIT"
] | null | null | null | data_files/PROGRAMS/MEDIUM/0018_4Sum.py | sudhirrd007/LeetCode-scraper | de87ff17fff2c73e67392321df1107cce7cbf883 | [
"MIT"
] | null | null | null | # ID : 18
# Title : 4Sum
# Difficulty : MEDIUM
# Acceptance_rate : 35.2%
# Runtime : 72 ms
# Memory : 12.7 MB
# Tags : Array , Hash Table , Two Pointers
# Language : python3
# Problem_link : https://leetcode.com/problems/4sum
# Premium : 0
# Notes : -
###
def fourSum(self, nums: List[int], target: int) -> List[Lis... | 31.6 | 86 | 0.401899 |
56614e3ac5c943faa110d8320e2d7880650db82d | 2,274 | py | Python | tests/fixtures/test_references_json/content_42_expected.py | elifesciences/elife-tools | ee345bf0e6703ef0f7e718355e85730abbdfd117 | [
"MIT"
] | 9 | 2015-04-16T08:13:31.000Z | 2020-05-18T14:03:06.000Z | tests/fixtures/test_references_json/content_42_expected.py | elifesciences/elife-tools | ee345bf0e6703ef0f7e718355e85730abbdfd117 | [
"MIT"
] | 310 | 2015-02-11T00:30:09.000Z | 2021-07-14T23:58:50.000Z | tests/fixtures/test_references_json/content_42_expected.py | elifesciences/elife-tools | ee345bf0e6703ef0f7e718355e85730abbdfd117 | [
"MIT"
] | 9 | 2015-02-04T01:21:28.000Z | 2021-06-15T12:50:47.000Z | from collections import OrderedDict
expected = [
OrderedDict(
[
("type", u"data"),
("id", u"bib105"),
("date", u"2015"),
(
"authors",
[
OrderedDict(
[
("ty... | 34.454545 | 98 | 0.207124 |
1275c2a33b28bd60b07402c1e758790b1ee5bc96 | 12,799 | py | Python | neo4j/api.py | neo4j/neo4j-python-driver | 1c009476710ab451e55e75d28d372664253fda4e | [
"Apache-2.0"
] | 739 | 2015-05-29T21:53:27.000Z | 2022-03-24T00:13:53.000Z | aws_cloudformation/DoctorAI_Lambda_Main/neo4j/api.py | dgg32/transfer_kg | b72d2ecbb3be0543dcd1edbb6def0bf25cd20c77 | [
"MIT"
] | 264 | 2015-08-26T13:45:33.000Z | 2022-03-17T17:26:50.000Z | neo4j/api.py | neo4j/neo4j-python-driver | 1c009476710ab451e55e75d28d372664253fda4e | [
"Apache-2.0"
] | 178 | 2015-05-21T08:10:54.000Z | 2022-03-31T11:49:08.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright (c) "Neo4j"
# Neo4j Sweden AB [http://neo4j.com]
#
# This file is part of Neo4j.
#
# 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
#... | 32.320707 | 176 | 0.645519 |
e7fd172132ee7727a5060aa43e5d3216cb533e52 | 246 | py | Python | longest_palindrome_substring.py | Chansazm/Project_25_LeetCode | 703c5b54b2070f234b1b0ddfd2c452083a698e9d | [
"MIT"
] | null | null | null | longest_palindrome_substring.py | Chansazm/Project_25_LeetCode | 703c5b54b2070f234b1b0ddfd2c452083a698e9d | [
"MIT"
] | null | null | null | longest_palindrome_substring.py | Chansazm/Project_25_LeetCode | 703c5b54b2070f234b1b0ddfd2c452083a698e9d | [
"MIT"
] | null | null | null | def longestpalindrome(s):
if len(s) == 1: return None
reverse = s[::-1]
result = ""
for i in s:
print(i,s[i])
#Driver function
print(longestpalindrome("babad"))
def foo(s):
n = len(s)
table = [n*0]
| 15.375 | 33 | 0.520325 |
386f84f52dd0394484ff1e625188e6b13b8f51e3 | 7,663 | py | Python | torch_geometric/data/batch.py | shashank-rv/pytorch_geometric | 3df768c4e523f5158fc10b4264ab08bc730aa61d | [
"MIT"
] | 1 | 2019-10-31T07:43:07.000Z | 2019-10-31T07:43:07.000Z | torch_geometric/data/batch.py | sdxshuai/pytorch_geometric | c066f4e515a96853c59ff82b9732eba2a25d247f | [
"MIT"
] | null | null | null | torch_geometric/data/batch.py | sdxshuai/pytorch_geometric | c066f4e515a96853c59ff82b9732eba2a25d247f | [
"MIT"
] | 1 | 2021-11-11T13:23:16.000Z | 2021-11-11T13:23:16.000Z | import torch
from torch import Tensor
from torch_sparse import SparseTensor, cat
import torch_geometric
from torch_geometric.data import Data
class Batch(Data):
r"""A plain old python object modeling a batch of graphs as one big
(disconnected) graph. With :class:`torch_geometric.data.Data` being the
base ... | 40.331579 | 79 | 0.527861 |
66dd532f48d3ae447268ee737c0f2b6dc162250e | 19,519 | py | Python | utils/fairseq_mod/tests/speech_recognition/asr_test_base.py | saidineshpola/Knowledge-Distillation-Toolkit | b05ebc28ae1385c9caa1c4c1c93db2d67356e85f | [
"MIT"
] | 69 | 2021-03-27T10:28:27.000Z | 2022-03-29T07:32:02.000Z | utils/fairseq_mod/tests/speech_recognition/asr_test_base.py | saidineshpola/Knowledge-Distillation-Toolkit | b05ebc28ae1385c9caa1c4c1c93db2d67356e85f | [
"MIT"
] | 5 | 2021-05-24T08:56:59.000Z | 2021-11-19T09:21:31.000Z | utils/fairseq_mod/tests/speech_recognition/asr_test_base.py | saidineshpola/Knowledge-Distillation-Toolkit | b05ebc28ae1385c9caa1c4c1c93db2d67356e85f | [
"MIT"
] | 20 | 2021-03-27T10:30:32.000Z | 2022-03-17T17:13:41.000Z | #!/usr/bin/env python3
import argparse
import os
import unittest
from inspect import currentframe, getframeinfo
import numpy as np
import torch
from fairseq_mod.data import data_utils as fairseq_data_utils
from fairseq_mod.data.dictionary import Dictionary
from fairseq_mod.models import (
BaseFairseqModel,
Fa... | 34.980287 | 92 | 0.637533 |
f43cfcccac2fa24aaad7d37b8e1627fbe274769b | 5,464 | py | Python | idaes/core/phases.py | xiangao1/idaes-pse | 96315b109b3d0d753d681c47db06fff1adb5e035 | [
"RSA-MD"
] | null | null | null | idaes/core/phases.py | xiangao1/idaes-pse | 96315b109b3d0d753d681c47db06fff1adb5e035 | [
"RSA-MD"
] | 3 | 2021-07-20T20:12:59.000Z | 2022-03-09T21:06:40.000Z | idaes/core/phases.py | xiangao1/idaes-pse | 96315b109b3d0d753d681c47db06fff1adb5e035 | [
"RSA-MD"
] | 1 | 2021-08-13T15:20:31.000Z | 2021-08-13T15:20:31.000Z | #################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... | 33.317073 | 81 | 0.654832 |
f8cb3e325960c6f09f22f110723b17c370c3bb01 | 46,364 | py | Python | scripts/vk_validation_stats.py | cforfang/Vulkan-ValidationLayers | 5f00f84a15f6263f50798db23f764601ae9a5a93 | [
"Apache-2.0"
] | null | null | null | scripts/vk_validation_stats.py | cforfang/Vulkan-ValidationLayers | 5f00f84a15f6263f50798db23f764601ae9a5a93 | [
"Apache-2.0"
] | null | null | null | scripts/vk_validation_stats.py | cforfang/Vulkan-ValidationLayers | 5f00f84a15f6263f50798db23f764601ae9a5a93 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2021 The Khronos Group Inc.
# Copyright (c) 2015-2021 Valve Corporation
# Copyright (c) 2015-2021 LunarG, Inc.
# Copyright (c) 2015-2021 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the L... | 47.310204 | 247 | 0.570356 |
6ad899978a522a349b2c7324559f511e268d671e | 2,040 | py | Python | src/pykeen/stoppers/__init__.py | sunny1401/pykeen | ad449ecc753eb603670de67cfa5f49020c61db12 | [
"MIT"
] | null | null | null | src/pykeen/stoppers/__init__.py | sunny1401/pykeen | ad449ecc753eb603670de67cfa5f49020c61db12 | [
"MIT"
] | null | null | null | src/pykeen/stoppers/__init__.py | sunny1401/pykeen | ad449ecc753eb603670de67cfa5f49020c61db12 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Early stoppers.
The following code will create a scenario in which training will stop
(quite) early when training :class:`pykeen.models.TransE` on the
:class:`pykeen.datasets.Nations` dataset.
>>> from pykeen.pipeline import pipeline
>>> pipeline_result = pipeline(
... dataset='nations... | 31.384615 | 106 | 0.693137 |
82f873f563cb9c5260eaa6acd488d2d3eb7efef0 | 1,287 | py | Python | setup.py | bressanmarcos/deirokay | defa86174a913ae1ae944bd7e976fee12824eaee | [
"MIT"
] | 3 | 2022-03-03T12:56:19.000Z | 2022-03-03T18:38:22.000Z | setup.py | bressanmarcos/deirokay | defa86174a913ae1ae944bd7e976fee12824eaee | [
"MIT"
] | 12 | 2022-03-02T22:45:19.000Z | 2022-03-18T20:28:08.000Z | setup.py | bigdatabr/Deirokay | defa86174a913ae1ae944bd7e976fee12824eaee | [
"MIT"
] | null | null | null | from os.path import dirname, join
from setuptools import find_packages, setup
with open(join(dirname(__file__), 'deirokay', '__version__.py')) as v:
__version__ = None
exec(v.read().strip())
with open('README.md') as f:
long_description = f.read()
with open('requirements.txt') as f:
requirements = [... | 29.25 | 70 | 0.684538 |
68ec0612508f918347000751e2733e595d09d689 | 150 | py | Python | Hackerrank-Solutions/Hackerrank-Python-Solutions/Introduction/Arithmetic Operators.py | HetDaftary/Competitive-Coding-Solutions | a683fa11895410c6eef07b1a68054f3e90aa596b | [
"MIT"
] | null | null | null | Hackerrank-Solutions/Hackerrank-Python-Solutions/Introduction/Arithmetic Operators.py | HetDaftary/Competitive-Coding-Solutions | a683fa11895410c6eef07b1a68054f3e90aa596b | [
"MIT"
] | null | null | null | Hackerrank-Solutions/Hackerrank-Python-Solutions/Introduction/Arithmetic Operators.py | HetDaftary/Competitive-Coding-Solutions | a683fa11895410c6eef07b1a68054f3e90aa596b | [
"MIT"
] | null | null | null | if __name__ == '__main__':
a = int(input())
b = int(input())
print (a + b)
print (a - b if (a > b) else b - a)
print (a * b)
| 18.75 | 39 | 0.446667 |
cb3c847dd2646b86a17bf99ba3b5a570bedaabe0 | 901 | py | Python | splunk_otel/distro.py | slernersplunk/splunk-otel-python | 6eddff4e62e2e7baa79acc99c79a261f7a503585 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | splunk_otel/distro.py | slernersplunk/splunk-otel-python | 6eddff4e62e2e7baa79acc99c79a261f7a503585 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | splunk_otel/distro.py | slernersplunk/splunk-otel-python | 6eddff4e62e2e7baa79acc99c79a261f7a503585 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright Splunk 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, softw... | 34.653846 | 75 | 0.766926 |
3b409e4c0472a4bedd9614158c3baced729edc1c | 3,608 | py | Python | groupdocs_conversion_cloud/models/msg_load_options.py | groupdocs-conversion-cloud/groupdocs-conversion-cloud-python | 841d06ad3205e10e8f2726517779ac2d7c33a02a | [
"MIT"
] | 5 | 2019-11-21T04:58:45.000Z | 2021-02-05T05:22:37.000Z | groupdocs_conversion_cloud/models/msg_load_options.py | groupdocs-conversion-cloud/groupdocs-conversion-cloud-python | 841d06ad3205e10e8f2726517779ac2d7c33a02a | [
"MIT"
] | null | null | null | groupdocs_conversion_cloud/models/msg_load_options.py | groupdocs-conversion-cloud/groupdocs-conversion-cloud-python | 841d06ad3205e10e8f2726517779ac2d7c33a02a | [
"MIT"
] | null | null | null | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose Pty Ltd" file="MsgLoadOptions.py">
# Copyright (c) 2003-2021 Aspose Pty Ltd
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# ... | 34.692308 | 85 | 0.596452 |
7d1c17bbcb337a1d7517cdb457bc69e7624bffc2 | 205 | py | Python | beneficiaries/beneficiaries/doctype/the_base/test_the_base.py | baidalala/beneficiaries | b7299e0a7da91e90c607e70d76994ec0aebae402 | [
"MIT"
] | null | null | null | beneficiaries/beneficiaries/doctype/the_base/test_the_base.py | baidalala/beneficiaries | b7299e0a7da91e90c607e70d76994ec0aebae402 | [
"MIT"
] | null | null | null | beneficiaries/beneficiaries/doctype/the_base/test_the_base.py | baidalala/beneficiaries | b7299e0a7da91e90c607e70d76994ec0aebae402 | [
"MIT"
] | 1 | 2021-08-31T18:47:58.000Z | 2021-08-31T18:47:58.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2021, Baida and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestTheBase(unittest.TestCase):
pass
| 18.636364 | 44 | 0.756098 |
a1142bff0976308426be3fcae97ca767febf8f6e | 87 | py | Python | src/lib/parameters/px4params/__init__.py | WeRobotics/Firmware | 96443b3cf3e3adaec8b2ebb6c83a19a92d40a13f | [
"BSD-3-Clause"
] | 15 | 2017-07-21T07:26:56.000Z | 2022-01-11T17:51:02.000Z | src/lib/parameters/px4params/__init__.py | WeRobotics/Firmware | 96443b3cf3e3adaec8b2ebb6c83a19a92d40a13f | [
"BSD-3-Clause"
] | 4 | 2016-04-06T09:03:29.000Z | 2017-01-22T20:16:08.000Z | src/lib/parameters/px4params/__init__.py | WeRobotics/Firmware | 96443b3cf3e3adaec8b2ebb6c83a19a92d40a13f | [
"BSD-3-Clause"
] | 17 | 2016-04-15T11:55:51.000Z | 2021-12-21T12:41:29.000Z | __all__ = ["srcscanner", "srcparser", "xmlout", "dokuwikiout", "dokuwikirpc", "scope"]
| 43.5 | 86 | 0.678161 |
c8678208102daa9c0a2e3db6e2f24ca2e48a917f | 8,583 | py | Python | tests/pool/conftest.py | Losik/toloka-kit | 1e707b17bcaa8a570f0479445906d9afbdf737ae | [
"Apache-2.0"
] | null | null | null | tests/pool/conftest.py | Losik/toloka-kit | 1e707b17bcaa8a570f0479445906d9afbdf737ae | [
"Apache-2.0"
] | 1 | 2021-07-02T13:56:34.000Z | 2021-07-02T14:32:10.000Z | tests/pool/conftest.py | Losik/toloka-kit | 1e707b17bcaa8a570f0479445906d9afbdf737ae | [
"Apache-2.0"
] | 1 | 2021-06-09T09:32:33.000Z | 2021-06-09T09:32:33.000Z | import pytest
@pytest.fixture
def pool_map():
return {
'type': 'REGULAR',
'project_id': '10',
'private_name': 'pool_v12_231',
'public_description': '42',
'may_contain_adult_content': True,
'will_expire': '2016-03-23T12:59:00',
'auto_close_after_complete_dela... | 35.032653 | 74 | 0.346149 |
a64d34b1b21ced54db0001edc1922a6c5bca08e9 | 2,400 | py | Python | class/super..py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | class/super..py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | class/super..py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
@ Author : Max_Pengjb
@ date : 2018/9/25 17:31
@ IDE : PyCharm
@ GitHub : https://github.com/JackyPJB
@ Contact : pengjianbiao@hotmail.com
-----------... | 16 | 51 | 0.444583 |
b8f468194b3400fd65c3154700957fead3f05f60 | 484 | py | Python | tools/smoothstep_lut.py | evanbowman/Red | 85735269a46757305a81ad39f47034bc6cd97846 | [
"BSD-2-Clause"
] | 5 | 2021-08-30T16:18:55.000Z | 2021-10-30T20:23:32.000Z | tools/smoothstep_lut.py | evanbowman/gbc-project | 85735269a46757305a81ad39f47034bc6cd97846 | [
"BSD-2-Clause"
] | null | null | null | tools/smoothstep_lut.py | evanbowman/gbc-project | 85735269a46757305a81ad39f47034bc6cd97846 | [
"BSD-2-Clause"
] | null | null | null | def smoothstep(edge0, edge1, x):
x2 = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0)
return x2 * x2 * (3 - 2 * x2);
def clamp(x, lower, upper):
if x < lower:
return lower
elif x > upper:
return upper
return x
count = 0
print("DB ", end="")
for i in range(0, 256):
print('$... | 17.925926 | 77 | 0.489669 |
c2c23f546226db6500860e30f9860ebfa470d276 | 30,910 | py | Python | boto/sns/connection.py | adastreamer/boto | ce472cbbcffd06298fdd0c980d5bfcdcee875498 | [
"MIT"
] | null | null | null | boto/sns/connection.py | adastreamer/boto | ce472cbbcffd06298fdd0c980d5bfcdcee875498 | [
"MIT"
] | null | null | null | boto/sns/connection.py | adastreamer/boto | ce472cbbcffd06298fdd0c980d5bfcdcee875498 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 wit... | 42.517194 | 127 | 0.624393 |
19db9d3ddcffc742f3c317dcc225446465ee3624 | 9,418 | py | Python | src/chapter_03/code/ch3_fig4.py | gchure/phd | cf5941e467ee57c6c93c78dda151335cb320f831 | [
"MIT"
] | 4 | 2020-01-14T01:12:53.000Z | 2021-11-29T10:33:20.000Z | src/chapter_03/code/ch3_fig4.py | gchure/phd | cf5941e467ee57c6c93c78dda151335cb320f831 | [
"MIT"
] | 1 | 2021-10-13T03:30:26.000Z | 2021-11-11T18:21:43.000Z | src/chapter_03/code/ch3_fig4.py | gchure/phd | cf5941e467ee57c6c93c78dda151335cb320f831 | [
"MIT"
] | null | null | null | # -*- coding; utf-8 -*-
#%%
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import phd.thermo
import phd.viz
import seaborn as sns
constants = phd.thermo.load_constants()
colors, palette = phd.viz.phd_style()
# Load and restrict the various data sets
data = pd.read_csv('../../data/ch3_mutants/C... | 39.738397 | 99 | 0.513272 |
0d5ee1de5730eac65522a7536fd750e9fd5b01c2 | 3,232 | py | Python | update-modified-keywords.py | shen390s/git-keywords | ed5cebf68509e66005c6c44214f2e97ce1c0c2eb | [
"MIT"
] | 2 | 2018-06-28T07:15:08.000Z | 2018-10-19T03:06:44.000Z | update-modified-keywords.py | doggy8088/git-keywords | e3f75b99359060e1b5e4cf0a021e25e774c08600 | [
"MIT"
] | 1 | 2021-08-20T16:09:09.000Z | 2021-08-20T16:09:09.000Z | update-modified-keywords.py | doggy8088/git-keywords | e3f75b99359060e1b5e4cf0a021e25e774c08600 | [
"MIT"
] | 6 | 2017-10-06T15:19:29.000Z | 2021-08-19T15:54:18.000Z | #!/usr/bin/env python3
# file: update-modified-keywords.py
# vim:fileencoding=utf-8:fdm=marker:ft=python
#
# Copyright © 2013-2015 R.F. Smith <rsmith@xs4all.nl>.
# SPDX-License-Identifier: MIT
# Created: 2013-07-17T18:58:42+02:00
# Last modified: 2019-07-27T21:01:32+0200
"""Remove and check out those files that that co... | 29.117117 | 75 | 0.593441 |
43ddab997f618bf97075a978e2a0bca8e57cd85b | 825 | py | Python | setup.py | AlexandruValeanu/yoda | e6b4325737b877488af4d1bf0b86eb1d98b88aed | [
"MIT"
] | 747 | 2017-06-28T04:58:53.000Z | 2022-02-14T21:40:52.000Z | setup.py | dude-cli/dude | e6b4325737b877488af4d1bf0b86eb1d98b88aed | [
"MIT"
] | 235 | 2017-06-30T12:58:02.000Z | 2019-05-02T02:56:18.000Z | setup.py | dude-cli/dude | e6b4325737b877488af4d1bf0b86eb1d98b88aed | [
"MIT"
] | 237 | 2017-06-12T21:03:03.000Z | 2021-09-16T14:48:59.000Z | from setuptools import setup, find_packages
setup(
name="yoda",
version="1.0.0",
py_modules=["yoda"],
packages=find_packages(),
include_package_data=True,
install_requires=[
"Click",
"Pillow",
"pychalk",
"apiai",
"emoji",
"pyyaml",
... | 21.153846 | 44 | 0.467879 |
5a5f06c8711267a10666a65e6cb4fbf154a7e3b4 | 7,128 | py | Python | paasta_tools/cli/cmds/push_to_registry.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 1,711 | 2015-11-10T18:04:56.000Z | 2022-03-23T08:53:16.000Z | paasta_tools/cli/cmds/push_to_registry.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 1,689 | 2015-11-10T17:59:04.000Z | 2022-03-31T20:46:46.000Z | paasta_tools/cli/cmds/push_to_registry.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 267 | 2015-11-10T19:17:16.000Z | 2022-02-08T20:59:52.000Z | #!/usr/bin/env python
# Copyright 2015-2016 Yelp 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 ... | 35.64 | 107 | 0.642536 |
4b839f2606f7582e9926ca2f486db6bf63f09af3 | 1,046 | py | Python | oh/migrations/versions/680b44ae9515_support_ticket_sort_key.py | akshitdewan/cs61a-apps | 155f2afe98b238fb4b1c4ca1c79610ec55e826e6 | [
"MIT"
] | 5 | 2020-09-10T01:45:09.000Z | 2022-01-10T23:24:03.000Z | oh/migrations/versions/680b44ae9515_support_ticket_sort_key.py | akshitdewan/cs61a-apps | 155f2afe98b238fb4b1c4ca1c79610ec55e826e6 | [
"MIT"
] | 424 | 2020-08-24T06:22:59.000Z | 2021-10-10T02:36:11.000Z | oh/migrations/versions/680b44ae9515_support_ticket_sort_key.py | akshitdewan/cs61a-apps | 155f2afe98b238fb4b1c4ca1c79610ec55e826e6 | [
"MIT"
] | 7 | 2020-08-28T22:05:10.000Z | 2022-03-04T12:47:05.000Z | """support ticket sort_key
Revision ID: 680b44ae9515
Revises: c2365b4ad424
Create Date: 2021-02-11 11:14:35.398091
"""
# revision identifiers, used by Alembic.
revision = "680b44ae9515"
down_revision = "c2365b4ad424"
from alembic import op
import sqlalchemy as sa
import oh_queue.models
from oh_queue.models import *... | 24.904762 | 85 | 0.661568 |
e390242ce069fd97053244bcdf7832c9cf8a9eb9 | 4,647 | py | Python | test/functional/sapling_fillblock.py | TransFastCore/pivx533 | b2168d6c2b447c9bf9c7175ffdfc8342b2861179 | [
"MIT"
] | 15 | 2019-08-28T13:34:30.000Z | 2021-12-15T22:01:08.000Z | test/functional/sapling_fillblock.py | TransFastCore/pivx533 | b2168d6c2b447c9bf9c7175ffdfc8342b2861179 | [
"MIT"
] | 9 | 2019-07-17T22:42:46.000Z | 2022-03-02T12:41:27.000Z | test/functional/sapling_fillblock.py | TransFastCore/pivx533 | b2168d6c2b447c9bf9c7175ffdfc8342b2861179 | [
"MIT"
] | 13 | 2019-06-30T22:44:30.000Z | 2022-02-19T16:07:54.000Z | #!/usr/bin/env python3
# Copyright (c) 2020 The TrumpCoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
import time
from test_framework.test_framework import TrumpCoinTestFramework
from test_framework.util import (... | 38.725 | 100 | 0.646223 |
da9b1fffa646bcc404f3f3c4ee10d85467ae026c | 2,374 | py | Python | tests/V1/test_sale_view.py | kmwangemi/Store-Manager-App | fc7c39dae0da9f62b7fd22353f1374b94646d2c5 | [
"MIT"
] | null | null | null | tests/V1/test_sale_view.py | kmwangemi/Store-Manager-App | fc7c39dae0da9f62b7fd22353f1374b94646d2c5 | [
"MIT"
] | 14 | 2018-10-08T15:45:19.000Z | 2021-06-02T00:41:43.000Z | tests/V1/test_sale_view.py | kmwangemi/Store-Manager-App | fc7c39dae0da9f62b7fd22353f1374b94646d2c5 | [
"MIT"
] | null | null | null | import unittest
import json
from run import app
from app.api.V1.views.sale_views import sale_info
class SalestestCase(unittest.TestCase):
def setUp(self):
"""will be called before every test"""
self.client = app.test_client
self.sale = {
"product" : "product",
... | 40.237288 | 133 | 0.552233 |
54022cb32c0c638e3eb2e72aeb220665dfa020f5 | 22,533 | py | Python | Cirq/CirqNonOracles/qft_tests.py | jclapis/qsfe | 941488f8f8a81a4b7d7fe28414ce14fa478a692a | [
"Apache-2.0"
] | 11 | 2019-06-02T01:47:24.000Z | 2021-08-10T14:54:35.000Z | Cirq/CirqNonOracles/qft_tests.py | jclapis/qsfe | 941488f8f8a81a4b7d7fe28414ce14fa478a692a | [
"Apache-2.0"
] | null | null | null | Cirq/CirqNonOracles/qft_tests.py | jclapis/qsfe | 941488f8f8a81a4b7d7fe28414ce14fa478a692a | [
"Apache-2.0"
] | 2 | 2020-04-19T17:39:23.000Z | 2021-03-08T12:35:55.000Z | # ========================================================================
# Copyright (C) 2019 The MITRE 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.apa... | 44.182353 | 103 | 0.610571 |
ece2386269fbd02795d16f10f1ea1d1e4e8476a7 | 471 | py | Python | bisection_method.py | FlorianMarcon/105torus | 361c5c982f849642207aa2ed7fb10529c176b734 | [
"MIT"
] | null | null | null | bisection_method.py | FlorianMarcon/105torus | 361c5c982f849642207aa2ed7fb10529c176b734 | [
"MIT"
] | null | null | null | bisection_method.py | FlorianMarcon/105torus | 361c5c982f849642207aa2ed7fb10529c176b734 | [
"MIT"
] | null | null | null | from torus import *
from math import trunc
def bisection_method(torus, size):
var1 = 0
var2 = 1
result = 0.5
while round(torus.calcul(result) + (5 * pow(10, -size - 2)), size) != 0:
# print ("x =", trunc_float(result, size + 1))
display_torus(result, size)
if torus.calcul(result) > 0 and torus.calcul(var2) < ... | 26.166667 | 73 | 0.643312 |
a583e82fd051cddb3026951dcf24bd092c680782 | 749 | py | Python | fulllenguajes/migrations/0001_initial.py | JoinBugs/lenguajes | c062691a430f393b4b2f6d68f16879f86aa76c17 | [
"Apache-2.0"
] | null | null | null | fulllenguajes/migrations/0001_initial.py | JoinBugs/lenguajes | c062691a430f393b4b2f6d68f16879f86aa76c17 | [
"Apache-2.0"
] | null | null | null | fulllenguajes/migrations/0001_initial.py | JoinBugs/lenguajes | c062691a430f393b4b2f6d68f16879f86aa76c17 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-16 21:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Lenguaj... | 27.740741 | 114 | 0.58745 |
a0f9d672aec7f5a6d0f34777d3bc3de53923ea18 | 1,902 | py | Python | venv/Lib/site-packages/pyrogram/raw/base/phone_call_protocol.py | iamgeorgiy/heroku-userbot | 5a92417d16f8ead949d88cb38da213fc2da5d3a4 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/base/phone_call_protocol.py | iamgeorgiy/heroku-userbot | 5a92417d16f8ead949d88cb38da213fc2da5d3a4 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/base/phone_call_protocol.py | iamgeorgiy/heroku-userbot | 5a92417d16f8ead949d88cb38da213fc2da5d3a4 | [
"Apache-2.0"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2020 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 38.04 | 97 | 0.646162 |
9814242dab2611f84ad6d187bdd76aeeee007c4b | 3,173 | py | Python | dotaCrawler/dotaCrawler/settings.py | aadityachapagain/DotaCalc | b6903bc07d7e2270d05a92dfca430364178644ab | [
"MIT"
] | 1 | 2019-01-24T08:40:15.000Z | 2019-01-24T08:40:15.000Z | dotaCrawler/dotaCrawler/settings.py | aadityachapagain/DotaCalc | b6903bc07d7e2270d05a92dfca430364178644ab | [
"MIT"
] | null | null | null | dotaCrawler/dotaCrawler/settings.py | aadityachapagain/DotaCalc | b6903bc07d7e2270d05a92dfca430364178644ab | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for dotaCrawler project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/t... | 34.48913 | 102 | 0.775922 |
10b11cb735350ee2ec999ce0bcea2777e80a8928 | 2,722 | py | Python | src/modules/generate_DoS.py | Yasushi-Shinohara/Scripts4Elk | dd7a6604813684cefbac08b1dc3c96bf7b5b7bf3 | [
"MIT"
] | null | null | null | src/modules/generate_DoS.py | Yasushi-Shinohara/Scripts4Elk | dd7a6604813684cefbac08b1dc3c96bf7b5b7bf3 | [
"MIT"
] | null | null | null | src/modules/generate_DoS.py | Yasushi-Shinohara/Scripts4Elk | dd7a6604813684cefbac08b1dc3c96bf7b5b7bf3 | [
"MIT"
] | null | null | null | # coding: UTF-8
# This is created 2021/12/24 by Y. Shinohara
# This is lastly modified 2021/xx/yy by Y. Shinohara
import sys
from modules.constants import pi, Hartree
import numpy as np
class GenerateDoS:
def __init__(self):
self.DoS = None #Density of States
self.omega = None
self.NoS = No... | 49.490909 | 158 | 0.590375 |
eb1a5b47bab8e9866d600307aa357686ca981bd4 | 1,149 | py | Python | twurl.py | ipopovych/apitter | cd95dffee38c37f279183591d9088ab3305ae7df | [
"MIT"
] | null | null | null | twurl.py | ipopovych/apitter | cd95dffee38c37f279183591d9088ab3305ae7df | [
"MIT"
] | null | null | null | twurl.py | ipopovych/apitter | cd95dffee38c37f279183591d9088ab3305ae7df | [
"MIT"
] | null | null | null | import urllib.request, urllib.parse, urllib.error
import oauth
import hidden
# https://apps.twitter.com/
# Create App and get the four strings, put them in hidden.py
def augment(url, parameters):
secrets = hidden.oauth()
consumer = oauth.OAuthConsumer(secrets['consumer_key'],
... | 35.90625 | 77 | 0.630983 |
ec92d718eccb4601e9b356b60150f309e28893b2 | 6,005 | py | Python | config/settings/production.py | Kenan7/labrin-task | ffc3f156cf0675733e1fb2b4bc4477da8a1a2d5a | [
"MIT"
] | null | null | null | config/settings/production.py | Kenan7/labrin-task | ffc3f156cf0675733e1fb2b4bc4477da8a1a2d5a | [
"MIT"
] | null | null | null | config/settings/production.py | Kenan7/labrin-task | ffc3f156cf0675733e1fb2b4bc4477da8a1a2d5a | [
"MIT"
] | null | null | null | from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env("DJANGO_SECRET_KEY")
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED... | 39.506579 | 87 | 0.581515 |
1ace0b39fcef4c4d274fdba3ed0e5602afc4864c | 12,797 | py | Python | old/InterfaceTest.py | Faralaks/the-game | cd08f1f0222eee71916763a11f99ea631dbad578 | [
"MIT"
] | null | null | null | old/InterfaceTest.py | Faralaks/the-game | cd08f1f0222eee71916763a11f99ea631dbad578 | [
"MIT"
] | null | null | null | old/InterfaceTest.py | Faralaks/the-game | cd08f1f0222eee71916763a11f99ea631dbad578 | [
"MIT"
] | null | null | null | #UTF-8
# загрузка библиотек
import pygame, webbrowser
from pygame import *
from stoper import stoper # функция отвечающая за колизию объектов
# инициализация
pygame.init() # инициализация библиотеки
window = pygame.display.set_mode((1280, 720), pygame.FULLSCREEN) # создание окна
pygame.display.set_caption('Test') # из... | 45.379433 | 332 | 0.587481 |
501cb577e52d38eb6c01febb1ecc23b54c636e40 | 1,501 | py | Python | tools/json_to_struct/struct_generator.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 231 | 2015-01-08T09:04:44.000Z | 2021-12-30T03:03:10.000Z | tools/json_to_struct/struct_generator.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2018-02-10T21:00:08.000Z | 2018-03-20T05:09:50.000Z | tools/json_to_struct/struct_generator.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 268 | 2015-01-21T05:53:28.000Z | 2022-03-25T22:09:01.000Z | # Copyright (c) 2012 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.
def _GenerateArrayField(field_info):
"""Generate a string defining an array field in a C structure.
"""
contents = field_info['contents']
content... | 34.113636 | 78 | 0.662891 |
528340496580768a90831780d7fcf4d19adb5354 | 29,579 | py | Python | ant_tracker/labeler/classes.py | ChortJulio/AntTracker | a89fb7fedbb7a8f7d12b024387f6330180fa010f | [
"MIT"
] | null | null | null | ant_tracker/labeler/classes.py | ChortJulio/AntTracker | a89fb7fedbb7a8f7d12b024387f6330180fa010f | [
"MIT"
] | null | null | null | ant_tracker/labeler/classes.py | ChortJulio/AntTracker | a89fb7fedbb7a8f7d12b024387f6330180fa010f | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from enum import Enum
import cv2 as cv
import itertools
import numpy as np
import ujson
from packaging.version import Version
from pathlib import Path
from typing import ClassVar, List, NoReturn, Tuple, Dict, Union, Optional, NewType, TypedDict
from ..tracker.ant_labeler_info ... | 41.427171 | 115 | 0.600629 |
4e861329630c4a7948bccf329c5d4294e468ab3f | 991 | py | Python | backend-project/small_eod/events/migrations/0001_initial.py | WlodzimierzKorza/small_eod | 027022bd71122a949a2787d0fb86518df80e48cd | [
"MIT"
] | 64 | 2019-12-30T11:24:03.000Z | 2021-06-24T01:04:56.000Z | backend-project/small_eod/events/migrations/0001_initial.py | WlodzimierzKorza/small_eod | 027022bd71122a949a2787d0fb86518df80e48cd | [
"MIT"
] | 465 | 2018-06-13T21:43:43.000Z | 2022-01-04T23:33:56.000Z | backend-project/small_eod/events/migrations/0001_initial.py | WlodzimierzKorza/small_eod | 027022bd71122a949a2787d0fb86518df80e48cd | [
"MIT"
] | 72 | 2018-12-02T19:47:03.000Z | 2022-01-04T22:54:49.000Z | # Generated by Django 3.0.1 on 2020-01-09 13:48
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('cases', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Eve... | 30.96875 | 114 | 0.565086 |
6bbb285f02d3581199534d3b9cdca118bcb0dfdf | 2,007 | py | Python | api/calendars/migrations/0001_initial.py | anjaekk/CRM-internship- | 94eab9401a7336ebbb11046a77c59b1d07e2bf68 | [
"MIT"
] | 1 | 2021-09-10T09:11:08.000Z | 2021-09-10T09:11:08.000Z | api/calendars/migrations/0001_initial.py | anjaekk/CRM-site-project | 94eab9401a7336ebbb11046a77c59b1d07e2bf68 | [
"MIT"
] | null | null | null | api/calendars/migrations/0001_initial.py | anjaekk/CRM-site-project | 94eab9401a7336ebbb11046a77c59b1d07e2bf68 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-09-13 06:43
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('companies', '0001_initial'),
migrations.swappable_dependency(se... | 39.352941 | 130 | 0.594918 |
26d738f0628eede79ffbeea1d4a71e1bf46da8a7 | 1,935 | py | Python | setup.py | yutonogami/cta-lstchain | d234471e3da25f7408571628b2cf5bfe2e8331b3 | [
"BSD-3-Clause"
] | null | null | null | setup.py | yutonogami/cta-lstchain | d234471e3da25f7408571628b2cf5bfe2e8331b3 | [
"BSD-3-Clause"
] | 1 | 2020-09-29T22:33:53.000Z | 2020-09-29T22:33:53.000Z | setup.py | yutonogami/cta-lstchain | d234471e3da25f7408571628b2cf5bfe2e8331b3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# import sys
from setuptools import setup, find_packages
import os
import sys
# Add lstchain folder to path (contains version.py)
# this is needed as lstchain/__init__.py imports dependencies
# that might not be installed before setu... | 26.148649 | 74 | 0.629974 |
c1f27cd0c301361098f80d7f83e69c13ac0061c0 | 15,701 | py | Python | bitbake/lib/bb/data.py | prakhya/luv_sai | 91d7d83a3e71b63164f683274dcf2392d64892e7 | [
"MIT"
] | null | null | null | bitbake/lib/bb/data.py | prakhya/luv_sai | 91d7d83a3e71b63164f683274dcf2392d64892e7 | [
"MIT"
] | null | null | null | bitbake/lib/bb/data.py | prakhya/luv_sai | 91d7d83a3e71b63164f683274dcf2392d64892e7 | [
"MIT"
] | null | null | null | # ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
"""
BitBake 'Data' implementations
Functions for interacting with the data structure used by the
BitBake build tools.
The expandKeys and update_data are the most expensive
operations. At night the cookie monster came by and
sugge... | 34.813747 | 150 | 0.594484 |
c675d125d213ade3aa35b8ddb513354e9326334c | 715 | py | Python | ddtrace/contrib/pyramid/__init__.py | pelotoncycle/dd-trace-py | b5254016dc42185eebfadce8dc634003408439d7 | [
"BSD-3-Clause"
] | null | null | null | ddtrace/contrib/pyramid/__init__.py | pelotoncycle/dd-trace-py | b5254016dc42185eebfadce8dc634003408439d7 | [
"BSD-3-Clause"
] | null | null | null | ddtrace/contrib/pyramid/__init__.py | pelotoncycle/dd-trace-py | b5254016dc42185eebfadce8dc634003408439d7 | [
"BSD-3-Clause"
] | 2 | 2017-05-27T05:58:36.000Z | 2019-02-07T13:38:53.000Z | """To trace requests from a Pyramid application, trace your application
config::
from pyramid.config import Configurator
from ddtrace.contrib.pyramid import trace_pyramid
settings = {
'datadog_trace_service' : 'my-web-app-name',
}
config = Configurator(settings=settings)
trace_pyrami... | 23.833333 | 71 | 0.682517 |
6698991d3c2ce04eaf99b3f5d821a7f3fa907417 | 5,112 | py | Python | configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark.py | nightfuryyy/mmpose | 910d9e31dd9d46e3329be1b7567e6309d70ab64c | [
"Apache-2.0"
] | 1,775 | 2020-07-10T01:20:01.000Z | 2022-03-31T16:31:50.000Z | configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark.py | KHB1698/mmpose | 93c3a742c540dfb4ca515ad545cef705a07d90b4 | [
"Apache-2.0"
] | 1,021 | 2020-07-11T11:40:24.000Z | 2022-03-31T14:32:26.000Z | configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark.py | KHB1698/mmpose | 93c3a742c540dfb4ca515ad545cef705a07d90b4 | [
"Apache-2.0"
] | 477 | 2020-07-11T11:27:51.000Z | 2022-03-31T09:42:25.000Z | _base_ = ['../../../../_base_/datasets/coco_wholebody.py']
log_level = 'INFO'
load_from = None
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=10)
evaluation = dict(interval=10, metric='mAP', save_best='AP')
optimizer = dict(
type='Adam',
lr=5e-... | 29.211429 | 79 | 0.600743 |
740dcf5593cdb29791251f65e4a974a00d3c6610 | 15,353 | py | Python | src/oci/tenant_manager_control_plane/models/domain_governance.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/tenant_manager_control_plane/models/domain_governance.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/tenant_manager_control_plane/models/domain_governance.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 33.017204 | 245 | 0.645086 |
2a26668fdad847dc9b7884e5962e8b530b7dbeeb | 3,765 | py | Python | a2c/envs.py | WeiChengTseng/DL_final_project | bbe61592a3d85c00731e254edcd1108075c49b6f | [
"Apache-2.0"
] | 7 | 2019-05-09T13:43:19.000Z | 2022-01-11T06:00:05.000Z | a2c/envs.py | pohanchi/DL_final_project | 8ade422f61a2e8bd4256523ebda56e19b189fe91 | [
"Apache-2.0"
] | null | null | null | a2c/envs.py | pohanchi/DL_final_project | 8ade422f61a2e8bd4256523ebda56e19b189fe91 | [
"Apache-2.0"
] | 4 | 2019-05-10T16:57:37.000Z | 2019-06-05T14:43:27.000Z | import numpy as np
import gym
from gym import spaces
from baselines.common.atari_wrappers import make_atari, wrap_deepmind
from baselines.common.vec_env import VecEnv
from multiprocessing import Process, Pipe
# cf https://github.com/openai/baselines
def make_env(env_name, rank, seed):
env = make_atari(env_name)
... | 29.880952 | 94 | 0.591766 |
4260b2616c3faecf56121480bfb1b0e87fa232d5 | 953 | py | Python | userAuth/admin.py | dahyorr/ticket-system-api | 767fc949b5cdb7ec2a55da981993846ad0d26386 | [
"MIT"
] | null | null | null | userAuth/admin.py | dahyorr/ticket-system-api | 767fc949b5cdb7ec2a55da981993846ad0d26386 | [
"MIT"
] | null | null | null | userAuth/admin.py | dahyorr/ticket-system-api | 767fc949b5cdb7ec2a55da981993846ad0d26386 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .forms import CustomUserCreationForm, CustomUserChangeForm
from .models import User
class CustomUserAdmin(UserAdmin):
add_form = CustomUserCreationForm
form = CustomUserChangeForm
model = User
list_displa... | 32.862069 | 109 | 0.612802 |
e44926bafd2b22ea070a74440800e3904e462f89 | 3,329 | py | Python | locations/spiders/farmboy.py | davidchiles/alltheplaces | 6f35f6cd652e7462107ead0a77f322caff198653 | [
"MIT"
] | 297 | 2017-12-07T01:29:14.000Z | 2022-03-29T06:58:01.000Z | locations/spiders/farmboy.py | davidchiles/alltheplaces | 6f35f6cd652e7462107ead0a77f322caff198653 | [
"MIT"
] | 2,770 | 2017-11-28T04:20:21.000Z | 2022-03-31T11:29:16.000Z | locations/spiders/farmboy.py | davidchiles/alltheplaces | 6f35f6cd652e7462107ead0a77f322caff198653 | [
"MIT"
] | 111 | 2017-11-27T21:40:02.000Z | 2022-01-22T01:21:52.000Z | # -*- coding: utf-8 -*-
import scrapy
import re
from locations.items import GeojsonPointItem
class FarmBoySpider(scrapy.Spider):
name = "farmboy"
item_attributes = { 'brand': "Farmboy" }
allowed_domains = ["www.farmboy.ca"]
start_urls = (
'https://www.farmboy.ca/about-us/stores/',
)
... | 37.829545 | 201 | 0.473415 |
03659ce77a14d555656f1117989ce822caa49645 | 6,115 | py | Python | map.py | haihala/generators | e5d41eedba0837589bdb16c9e37c4b5b1743cf9f | [
"MIT"
] | null | null | null | map.py | haihala/generators | e5d41eedba0837589bdb16c9e37c4b5b1743cf9f | [
"MIT"
] | null | null | null | map.py | haihala/generators | e5d41eedba0837589bdb16c9e37c4b5b1743cf9f | [
"MIT"
] | null | null | null | import pygame, argparse, os, math
from random import random
DEEP_SEA = (0, 0, 100)
SHALLOW_SEA = (80, 80, 200)
MOUNTAIN = (151,124,83)
GRASS = (40, 150, 40)
BEACH = (223,193,99)
SUMMIT = (240, 240, 240)
def smooth(source, window, power):
for i in range(window, len(source)-window):
for j in range(window, ... | 36.616766 | 126 | 0.590842 |
c1613094a3b53c171fdffafa7de957fe0614048b | 895 | py | Python | py/libga_gat/fitnessplot.py | jimmycao/libga_mpi | 39f223891b1474b1b190a0033576f30723051f17 | [
"MIT"
] | 1 | 2020-06-14T08:28:01.000Z | 2020-06-14T08:28:01.000Z | py/libga_gat/fitnessplot.py | jimmycao/libga_mpi | 39f223891b1474b1b190a0033576f30723051f17 | [
"MIT"
] | null | null | null | py/libga_gat/fitnessplot.py | jimmycao/libga_mpi | 39f223891b1474b1b190a0033576f30723051f17 | [
"MIT"
] | null | null | null | from canvasbase import CanvasBase2D
import numpy as np
from operator import itemgetter
class Fitnessplot(CanvasBase2D):
def __init__(self):
CanvasBase2D.__init__(self)
self.filter_pareto_front = False
def customize(self):
self.axes.set_title("Fittest solution")
self.axes.set... | 33.148148 | 89 | 0.675978 |
8998f0cbd0f6b419f40a7cac470b38512197f63f | 3,466 | py | Python | huaweicloud-sdk-ces/huaweicloudsdkces/v1/model/update_alarm_template_request.py | githubmilesma/huaweicloud-sdk-python-v3 | 9d9449ed68a609ca65f0aa50b5b2a1c28445bf03 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-ces/huaweicloudsdkces/v1/model/update_alarm_template_request.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-ces/huaweicloudsdkces/v1/model/update_alarm_template_request.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
class UpdateAlarmTemplateRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and t... | 26.06015 | 79 | 0.564051 |
8efe6b1d0ee25b34657e9eb18d86d7677eb11512 | 955 | py | Python | lojaPy/products/views.py | Guiamba1/site | 4f9b3f50e80e7f55da573bce7b120df96b622396 | [
"MIT"
] | null | null | null | lojaPy/products/views.py | Guiamba1/site | 4f9b3f50e80e7f55da573bce7b120df96b622396 | [
"MIT"
] | null | null | null | lojaPy/products/views.py | Guiamba1/site | 4f9b3f50e80e7f55da573bce7b120df96b622396 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.shortcuts import get_object_or_404
from django.views.generic import DetailView, ListView
# from cart.forms import CartAddProductForm
from .models import Category, Product
class ProductDetailView(DetailView):
queryset = Product.available.all()
#extra_context = ... | 28.088235 | 75 | 0.703665 |
8642db0c431fde8fc3a8bd35249c5ae3857f9727 | 3,449 | py | Python | readthedocs/restapi/urls.py | agarwalrounak/readthedocs.org | 4911600c230809bd6fb3585d1903121db2928ad6 | [
"MIT"
] | null | null | null | readthedocs/restapi/urls.py | agarwalrounak/readthedocs.org | 4911600c230809bd6fb3585d1903121db2928ad6 | [
"MIT"
] | 12 | 2019-12-05T04:47:01.000Z | 2022-01-09T00:56:58.000Z | readthedocs/restapi/urls.py | agarwalrounak/readthedocs.org | 4911600c230809bd6fb3585d1903121db2928ad6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Define routes between URL paths and views/endpoints."""
from django.conf import settings
from django.conf.urls import include, url
from rest_framework import routers
from readthedocs.constants import pattern_opts
from readthedocs.restapi.views import (
core_views,
footer_views,
... | 26.945313 | 81 | 0.676428 |
704598dbfb4f1e7b6c4e1f6dfff113bf643e5667 | 422 | py | Python | config/api_router.py | todd-sudo/mailing | 722827e373a4190698669f5787c2b8619773371d | [
"MIT"
] | null | null | null | config/api_router.py | todd-sudo/mailing | 722827e373a4190698669f5787c2b8619773371d | [
"MIT"
] | null | null | null | config/api_router.py | todd-sudo/mailing | 722827e373a4190698669f5787c2b8619773371d | [
"MIT"
] | null | null | null | from django.conf import settings
from django.urls import include, path
from rest_framework.routers import DefaultRouter, SimpleRouter
from mailing.users.api.views import UserViewSet
if settings.DEBUG:
router = DefaultRouter()
else:
router = SimpleRouter()
router.register("users", UserViewSet)
urlpatterns =... | 19.181818 | 62 | 0.753555 |
478aa04735763b6c3b8851a346d290b08b888a45 | 416 | py | Python | setup.py | guitarparty/django-spreedly | 532e594d5163bf177141ce1e6a4b349c714e4e6d | [
"MIT"
] | null | null | null | setup.py | guitarparty/django-spreedly | 532e594d5163bf177141ce1e6a4b349c714e4e6d | [
"MIT"
] | null | null | null | setup.py | guitarparty/django-spreedly | 532e594d5163bf177141ce1e6a4b349c714e4e6d | [
"MIT"
] | null | null | null | from distutils.core import setup
from spreedly import __version__ as version
setup(name='django-spreedly',
version=version,
description="Spreedly hook-ins for Django, forked from shelfworthy/django-spreedly",
author="Jon Smelquist",
author_email="jon.smelquist@gmail.com",
url="http://gith... | 34.666667 | 90 | 0.713942 |
274b72fc6c80767cb3ffd1f960da98812d186bb3 | 13,149 | py | Python | tests/test_memoryfile.py | nmandery/rasterio | ba5e90c487bd1930f52e57dba999e889b4df9ade | [
"BSD-3-Clause"
] | 1,479 | 2015-01-10T12:35:07.000Z | 2021-10-18T16:17:15.000Z | tests/test_memoryfile.py | nmandery/rasterio | ba5e90c487bd1930f52e57dba999e889b4df9ade | [
"BSD-3-Clause"
] | 1,819 | 2015-01-06T21:56:25.000Z | 2021-10-20T02:28:27.000Z | tests/test_memoryfile.py | nmandery/rasterio | ba5e90c487bd1930f52e57dba999e889b4df9ade | [
"BSD-3-Clause"
] | 509 | 2015-01-06T20:59:12.000Z | 2021-10-18T14:14:57.000Z | """MemoryFile tests. MemoryFile requires GDAL 2.0+.
Tests in this file will ONLY run for GDAL >= 2.x"""
from io import BytesIO
import logging
import os.path
from affine import Affine
import numpy
import pytest
import rasterio
from rasterio.io import MemoryFile, ZipMemoryFile
from rasterio.enums import MaskFlags
fro... | 38.00289 | 236 | 0.63906 |
13c68b896949d0eefa0c9ab203b12a14d367842e | 401 | py | Python | Lib/idlelib/idlever.py | tyagi-prashant/cpython | a83d8a8b297deefc0893893446460265fc6dd149 | [
"PSF-2.0"
] | 1 | 2015-10-04T20:13:04.000Z | 2015-10-04T20:13:04.000Z | Lib/idlelib/idlever.py | tyagi-prashant/cpython | a83d8a8b297deefc0893893446460265fc6dd149 | [
"PSF-2.0"
] | null | null | null | Lib/idlelib/idlever.py | tyagi-prashant/cpython | a83d8a8b297deefc0893893446460265fc6dd149 | [
"PSF-2.0"
] | null | null | null | """
The separate Idle version was eliminated years ago;
idlelib.idlever is no longer used by Idle
and will be removed in 3.6 or later. Use
from sys import version
IDLE_VERSION = version[:version.index(' ')]
"""
# Kept for now only for possible existing extension use
import warnings as w
w.warn(__doc__, Depreca... | 30.846154 | 55 | 0.750623 |
0e78ab749c9cc051e2e649f8a8e9bd00faddb1a7 | 10,417 | py | Python | azure-mgmt-batchai/tests/test_mgmt_batchai_clusters.py | jafreck/azure-sdk-for-python | 8fc953a0a9e214e2963d5e4d06d5b92b6f56e614 | [
"MIT"
] | null | null | null | azure-mgmt-batchai/tests/test_mgmt_batchai_clusters.py | jafreck/azure-sdk-for-python | 8fc953a0a9e214e2963d5e4d06d5b92b6f56e614 | [
"MIT"
] | null | null | null | azure-mgmt-batchai/tests/test_mgmt_batchai_clusters.py | jafreck/azure-sdk-for-python | 8fc953a0a9e214e2963d5e4d06d5b92b6f56e614 | [
"MIT"
] | null | null | null | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | 56.923497 | 120 | 0.673322 |
c392ba79c51499c48aa630ea5f5f3f730709e830 | 12,108 | py | Python | test/functional/mining_basic.py | Nugetzrul3/eqpay | 03e0388e98a2f3624e4e94ae9bc6119e1bd48be6 | [
"MIT"
] | 1 | 2021-09-13T13:48:47.000Z | 2021-09-13T13:48:47.000Z | test/functional/mining_basic.py | Nugetzrul3/eqpay | 03e0388e98a2f3624e4e94ae9bc6119e1bd48be6 | [
"MIT"
] | null | null | null | test/functional/mining_basic.py | Nugetzrul3/eqpay | 03e0388e98a2f3624e4e94ae9bc6119e1bd48be6 | [
"MIT"
] | 1 | 2021-09-04T12:46:23.000Z | 2021-09-04T12:46:23.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mining RPCs
- getmininginfo
- getblocktemplate proposal mode
- submitblock"""
import copy
from d... | 48.047619 | 163 | 0.690287 |
61201d701a13c99c4208b23fda08108af9c35378 | 1,066 | py | Python | blender/arm/logicnode/deprecated/LN_set_mouse_lock.py | Lykdraft/armory | da1cf33930ce9a8b1865d35c128fe4842bef2933 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/deprecated/LN_set_mouse_lock.py | Lykdraft/armory | da1cf33930ce9a8b1865d35c128fe4842bef2933 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/deprecated/LN_set_mouse_lock.py | Lykdraft/armory | da1cf33930ce9a8b1865d35c128fe4842bef2933 | [
"Zlib"
] | null | null | null | from arm.logicnode.arm_nodes import *
class SetMouseLockNode(ArmLogicTreeNode):
"""Deprecated. It is recommended to use the 'Set Cursor State' node instead."""
bl_idname = 'LNSetMouseLockNode'
bl_label = 'Set Mouse Lock (Deprecated)'
bl_description = "Please use the \"Set Cursor State\" node instead"
... | 38.071429 | 83 | 0.670732 |
ed5d6517ce001f9e52649461851c96d2ce0583a1 | 9,533 | py | Python | intus/utils.py | mtbossa/intus | 2eda3685a019afba069ea05a1d4c974aa767c912 | [
"MIT"
] | null | null | null | intus/utils.py | mtbossa/intus | 2eda3685a019afba069ea05a1d4c974aa767c912 | [
"MIT"
] | null | null | null | intus/utils.py | mtbossa/intus | 2eda3685a019afba069ea05a1d4c974aa767c912 | [
"MIT"
] | null | null | null | """ Generic functions"""
import datetime
import errno
import os
import pathlib
import platform
from os import listdir
from os.path import isfile, join
def get_open_command(file_name: str) -> str:
"""
Return the command for opening either Chrome or Chromium based
on the OS and file name.
:param file_na... | 36.949612 | 115 | 0.662541 |
4e00ec4c6b8dd0cf9023cb4e4415a401640b1283 | 15,127 | py | Python | app/engine/ovr.py | minggli/rainforest-tagging | 5a68298ebd7b0020c49b697f4738646e508d3c5b | [
"MIT"
] | 13 | 2017-04-28T20:05:13.000Z | 2020-12-15T01:19:32.000Z | app/engine/ovr.py | minggli/rainforest-tagging | 5a68298ebd7b0020c49b697f4738646e508d3c5b | [
"MIT"
] | null | null | null | app/engine/ovr.py | minggli/rainforest-tagging | 5a68298ebd7b0020c49b697f4738646e508d3c5b | [
"MIT"
] | 4 | 2017-06-29T03:54:38.000Z | 2019-07-18T08:25:39.000Z | # -*- coding: utf-8 -*-
"""
ovr
One-versus-Rest approach for multi-label classification, predicting each label
independently using Convolutional Neural Network similar architecture to VGG-32
VERY DEEP CONVOLUTIONAL NETWORKS FOR LARGE-SCALE IMAGE RECOGNITION
Simonyan K. & Zisserman A. (2015)
Densely Connected Convolu... | 46.832817 | 81 | 0.547233 |
163af4c8a8629f58364d088549a071793dd31b49 | 5,765 | py | Python | im2mesh/eval.py | hummat/occupancy_networks | c7b89d58f3839fb56df53c37288d22c33529aeac | [
"MIT"
] | null | null | null | im2mesh/eval.py | hummat/occupancy_networks | c7b89d58f3839fb56df53c37288d22c33529aeac | [
"MIT"
] | null | null | null | im2mesh/eval.py | hummat/occupancy_networks | c7b89d58f3839fb56df53c37288d22c33529aeac | [
"MIT"
] | null | null | null | # from im2mesh import icp
import logging
import numpy as np
import trimesh
from im2mesh.common import compute_iou
# from scipy.spatial import cKDTree
from im2mesh.utils.libkdtree import KDTree
from im2mesh.utils.libmesh import check_mesh_contains
# Maximum values for bounding box [-0.5, 0.5]^3
EMPTY_PCL_DICT = {
... | 32.942857 | 77 | 0.629488 |
ca4ea001a847d3c41cc11550a2581044368a9ca2 | 28,366 | py | Python | pyCHX/chx_correlationp2.py | NSLS-II/pyCHX | e82e343903e477c4359b03c4d079eb1e5202c25f | [
"BSD-3-Clause"
] | 2 | 2021-07-21T02:07:11.000Z | 2022-02-18T02:57:49.000Z | pyCHX/chx_correlationp2.py | NSLS-II/pyCHX | e82e343903e477c4359b03c4d079eb1e5202c25f | [
"BSD-3-Clause"
] | 5 | 2021-06-16T20:31:45.000Z | 2022-02-04T21:24:45.000Z | pyCHX/chx_correlationp2.py | NSLS-II/pyCHX | e82e343903e477c4359b03c4d079eb1e5202c25f | [
"BSD-3-Clause"
] | 2 | 2022-02-04T21:51:28.000Z | 2022-03-22T04:11:19.000Z | """
Aug 10, Developed by Y.G.@CHX
yuzhang@bnl.gov
This module is for parallel computation of time correlation
Feb 20, 2018
The chx_correlationp2 is for dedug g2
"""
from __future__ import absolute_import, division, print_function
from skbeam.core.utils import multi_tau_lags
from skbeam.core.roi import extract_label_in... | 38.964286 | 113 | 0.538391 |
3b0efcc2aaba55df8a5346e1170132a786c5e507 | 1,533 | py | Python | FTSensor/pybind11-master/tests/test_docstring_options.py | yanglh14/InteractiveGrasping | b5bc1866a1847e7b0c11616fd6cbe949c64a355b | [
"MIT"
] | 3 | 2021-04-14T08:24:40.000Z | 2021-11-04T04:10:19.000Z | FTSensor/pybind11-master/tests/test_docstring_options.py | yanglh14/InteractiveGrasping | b5bc1866a1847e7b0c11616fd6cbe949c64a355b | [
"MIT"
] | null | null | null | FTSensor/pybind11-master/tests/test_docstring_options.py | yanglh14/InteractiveGrasping | b5bc1866a1847e7b0c11616fd6cbe949c64a355b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from pybind11_tests import docstring_options as m
def test_docstring_options():
# options.disable_function_signatures()
assert not m.test_function1.__doc__
assert m.test_function2.__doc__ == "A custom docstring"
# docstring specified on just the first overload defin... | 38.325 | 90 | 0.727332 |
eb63d587a289267ad958cdae3912bd3e28edced7 | 3,983 | py | Python | src/plots/acc_mgr.py | hyunghunny/tf-hpo | f6ec54480dd0cad9e24fddc050e88ee7b7843cfa | [
"MIT"
] | 8 | 2016-07-22T06:58:16.000Z | 2019-10-23T06:10:46.000Z | src/plots/acc_mgr.py | hyunghunny/tf-hpo | f6ec54480dd0cad9e24fddc050e88ee7b7843cfa | [
"MIT"
] | 6 | 2016-07-15T14:05:18.000Z | 2020-10-27T09:27:20.000Z | src/plots/acc_mgr.py | hyunghunny/tf-hpo | f6ec54480dd0cad9e24fddc050e88ee7b7843cfa | [
"MIT"
] | 1 | 2019-08-06T12:42:34.000Z | 2019-08-06T12:42:34.000Z | # import required libraries to munge data
import pandas as pd
import numpy as np
from mpl_toolkits.mplot3d.axes3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib import cm
# define log function
from math import log
def log_scale(list, base=2):
"""apply log2 function to all list item"""
for i in... | 32.382114 | 125 | 0.611599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.