hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eb03e3a050ceea7bb9cd25f052a0aa3154068c30 | 1,830 | py | Python | run-length-encoding/run_length_encoding.py | geekmuse/exercism-python | 089efc0382147bd48f1e2d68c33ba4cbd58d3dfd | [
"MIT"
] | null | null | null | run-length-encoding/run_length_encoding.py | geekmuse/exercism-python | 089efc0382147bd48f1e2d68c33ba4cbd58d3dfd | [
"MIT"
] | null | null | null | run-length-encoding/run_length_encoding.py | geekmuse/exercism-python | 089efc0382147bd48f1e2d68c33ba4cbd58d3dfd | [
"MIT"
] | null | null | null | def decode(to_be_decoded):
"""
Decodes a run-length encoded string.
:param to_be_decoded: run-length encoded string
:return: run-length decoded string
"""
to_be_decoded_list = list(to_be_decoded)
decoded_str_as_list = list()
num_to_print_as_list = list()
for c in to_be_decoded_list:... | 30 | 89 | 0.595082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 311 | 0.169945 |
eb0791e28d8a88a76f9e3bcff8a0767061c1499e | 3,816 | py | Python | pytorch/benchmarks/operator_benchmark/pt/conv_test.py | raghavnauhria/whatmt | c20483a437c82936cb0fb8080925e37b9c4bba87 | [
"MIT"
] | null | null | null | pytorch/benchmarks/operator_benchmark/pt/conv_test.py | raghavnauhria/whatmt | c20483a437c82936cb0fb8080925e37b9c4bba87 | [
"MIT"
] | 1 | 2019-07-22T09:48:46.000Z | 2019-07-22T09:48:46.000Z | pytorch/benchmarks/operator_benchmark/pt/conv_test.py | raghavnauhria/whatmt | c20483a437c82936cb0fb8080925e37b9c4bba87 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import operator_benchmark as op_bench
import torch
import torch.nn as nn
"""
Microbenchmarks for Conv1d and ConvTranspose1d operators.
"""
# Configs for conv-1d ops
... | 27.453237 | 85 | 0.673742 | 2,097 | 0.549528 | 0 | 0 | 0 | 0 | 0 | 0 | 520 | 0.136268 |
eb083967d51239e917a7b39eeaa1d72f732ba81d | 1,605 | py | Python | local_test/course_search/nyuapi/request.py | NYUSHer/Widgets | b630d01331ca0101778fc7ca44fff7b65412f9ef | [
"MIT"
] | 1 | 2018-05-01T06:04:39.000Z | 2018-05-01T06:04:39.000Z | local_test/course_search/nyuapi/request.py | NYUSHer/Widgets | b630d01331ca0101778fc7ca44fff7b65412f9ef | [
"MIT"
] | null | null | null | local_test/course_search/nyuapi/request.py | NYUSHer/Widgets | b630d01331ca0101778fc7ca44fff7b65412f9ef | [
"MIT"
] | null | null | null | import requests as R
class reqNYU():
TOKEN = ""
BASEURI = "https://sandbox.api.it.nyu.edu/"
def __init__(self, token=""):
if not token:
raise Exception("[Error] Token can not be empty!")
self.TOKEN = token
self.ping()
def ping(self):
try:
... | 32.1 | 87 | 0.544548 | 1,581 | 0.985047 | 0 | 0 | 0 | 0 | 0 | 0 | 537 | 0.334579 |
eb0939a06759c9dcb9a5c2eda6614c361061cde9 | 857 | py | Python | pySINGLE/setup.py | piomonti/pySINGLE | 2eae0b31334d8eae08fd7f96f591262c4abcf3d9 | [
"MIT"
] | 3 | 2015-12-21T15:14:08.000Z | 2018-12-29T10:15:03.000Z | pySINGLE/setup.py | piomonti/pySINGLE | 2eae0b31334d8eae08fd7f96f591262c4abcf3d9 | [
"MIT"
] | null | null | null | pySINGLE/setup.py | piomonti/pySINGLE | 2eae0b31334d8eae08fd7f96f591262c4abcf3d9 | [
"MIT"
] | null | null | null | #from distutils.core import setup
#from distutils.extension import Extension
#from Cython.Distutils import build_ext
#import numpy
#setup(
#cmdclass = {'build_ext': build_ext},
#ext_modules = [Extension("Z_shooting", ["Z_shooting.c"],)],
#include_dirs=[numpy.get_include(),'.', ],
#)
from dist... | 27.645161 | 104 | 0.687281 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 524 | 0.611435 |
eb0a67e0dac6431fa8a950d7b99db76a91a069c7 | 11,877 | py | Python | cnnlstm/preprocessing.py | mingjiewong/Kaggle-M5-Forecasting-Accuracy-2020 | 6467a08640990f2d07e517adf7bacd566fb442c4 | [
"MIT"
] | null | null | null | cnnlstm/preprocessing.py | mingjiewong/Kaggle-M5-Forecasting-Accuracy-2020 | 6467a08640990f2d07e517adf7bacd566fb442c4 | [
"MIT"
] | null | null | null | cnnlstm/preprocessing.py | mingjiewong/Kaggle-M5-Forecasting-Accuracy-2020 | 6467a08640990f2d07e517adf7bacd566fb442c4 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import os
from sklearn.preprocessing import MinMaxScaler
from data_processing.helpers import Config
class Load:
def __init__(self,train_sales='',calendar=''):
"""
Read CSV files for daily sales and calendar input data respectively.
Args:
tra... | 46.214008 | 126 | 0.667088 | 11,730 | 0.987623 | 0 | 0 | 0 | 0 | 0 | 0 | 6,928 | 0.583312 |
eb0ac6a6f7fdd1cf17fa0a0d491c03fde96fdfc1 | 331 | py | Python | Physics250-ME3738/timeIntervalBlinks.py | illusion173/Physics250 | 69f2ffdb8af013e8b0739779861c1455b579ddaf | [
"MIT"
] | null | null | null | Physics250-ME3738/timeIntervalBlinks.py | illusion173/Physics250 | 69f2ffdb8af013e8b0739779861c1455b579ddaf | [
"MIT"
] | null | null | null | Physics250-ME3738/timeIntervalBlinks.py | illusion173/Physics250 | 69f2ffdb8af013e8b0739779861c1455b579ddaf | [
"MIT"
] | null | null | null | import math
speedofLight = 2.9979*pow(10,8)
def timeIntervalBlinks():
time = float(input('Input Time (sec): '))
speed = float(input('Speed: '))
speed = speed * pow(10,8)
gamma = math.sqrt(1/(1-pow((speed/speedofLight),2)))
answer = gamma * time
print(answer)
timeInterv... | 18.388889 | 56 | 0.592145 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.087613 |
eb1051fc036fc84c631af126f696c0417323ff9f | 419 | py | Python | daemons/area-deletion-daemon/app.py | sampierson/upload-service | b7c470706f729bdee34a4254555f798558877095 | [
"MIT"
] | 6 | 2018-01-31T19:44:17.000Z | 2020-02-20T13:03:09.000Z | daemons/area-deletion-daemon/app.py | sampierson/upload-service | b7c470706f729bdee34a4254555f798558877095 | [
"MIT"
] | 379 | 2018-03-21T21:29:15.000Z | 2020-01-28T14:20:48.000Z | daemons/area-deletion-daemon/app.py | HumanCellAtlas/staging-service | b7c470706f729bdee34a4254555f798558877095 | [
"MIT"
] | 5 | 2018-03-09T14:13:15.000Z | 2020-01-30T15:49:46.000Z | import json
from upload.common.upload_area import UploadArea
# This lambda function is invoked by messages in the the area_deletion_queue (AWS SQS).
# The queue and the lambda function are connected via aws_lambda_event_source_mapping
def delete_upload_area(event, context):
unwrapped_event = json.loads(event["Rec... | 38.090909 | 87 | 0.785203 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 198 | 0.472554 |
eb10a721ce3034d767a4ccb9040dc682a3ffb0b4 | 3,089 | py | Python | engine/geometry/tests/test_overlap_detection_2d.py | codehearts/pickles-fetch-quest | ca9b3c7fe26acb50e1e2d654d068f5bb953bc427 | [
"MIT"
] | 3 | 2017-12-07T19:17:36.000Z | 2021-07-29T18:24:25.000Z | engine/geometry/tests/test_overlap_detection_2d.py | codehearts/pickles-fetch-quest | ca9b3c7fe26acb50e1e2d654d068f5bb953bc427 | [
"MIT"
] | 41 | 2017-11-11T06:00:08.000Z | 2022-03-28T23:27:25.000Z | engine/geometry/tests/test_overlap_detection_2d.py | codehearts/pickles-fetch-quest | ca9b3c7fe26acb50e1e2d654d068f5bb953bc427 | [
"MIT"
] | 2 | 2018-08-31T23:49:00.000Z | 2021-09-21T00:42:48.000Z | from ..overlap_detection_2d import detect_overlap_2d
from unittest.mock import call, Mock, patch
import unittest
class TestOverlap2d(unittest.TestCase):
"""Test two dimensional overlap detection functions."""
def setUp(self):
"""Creates a ``self.first`` and ``self.second`` Mock object."""
sel... | 42.315068 | 76 | 0.642279 | 2,973 | 0.962447 | 0 | 0 | 2,645 | 0.856264 | 0 | 0 | 806 | 0.260926 |
eb10c1e56faa83018c15d8d04331071eb6bc524c | 786 | py | Python | PythonTest/Aula18A.py | MatthewsTomts/Python_Class | f326d521d62c45a4fcb429d2a22cf2ab958492cb | [
"MIT"
] | null | null | null | PythonTest/Aula18A.py | MatthewsTomts/Python_Class | f326d521d62c45a4fcb429d2a22cf2ab958492cb | [
"MIT"
] | null | null | null | PythonTest/Aula18A.py | MatthewsTomts/Python_Class | f326d521d62c45a4fcb429d2a22cf2ab958492cb | [
"MIT"
] | null | null | null | teste = list()
teste.append('Matheus')
teste.append(17)
galera = [teste[:]] # Cria uma copia de teste dentro de galera
teste[0] = 'Oliver'
teste[1] = 22
galera.append(teste) # Cria um vínculo entre teste e galera
print(galera)
pessoas = [['Harvey', 23], ['Madeleine', 19], ['Roger', 250], ['Mark', 20]]
print(pessoas... | 27.103448 | 84 | 0.624682 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 352 | 0.445006 |
eb15265b18824ec201a18ed59e673270072c7e83 | 756 | py | Python | src/bio2bel/exc.py | aman527/bio2bel | 631328261a8e7ebddf2eab6c271bc4bc42fbcba4 | [
"MIT"
] | 16 | 2018-05-18T13:25:44.000Z | 2022-03-15T02:32:28.000Z | src/bio2bel/exc.py | aman527/bio2bel | 631328261a8e7ebddf2eab6c271bc4bc42fbcba4 | [
"MIT"
] | 42 | 2017-09-13T20:16:46.000Z | 2021-05-08T19:24:30.000Z | src/bio2bel/exc.py | aman527/bio2bel | 631328261a8e7ebddf2eab6c271bc4bc42fbcba4 | [
"MIT"
] | 5 | 2020-03-14T17:08:12.000Z | 2021-04-13T20:19:19.000Z | # -*- coding: utf-8 -*-
"""Bio2BEL custom errors."""
class Bio2BELMissingNameError(TypeError):
"""Raised when an abstract manager is subclassed and instantiated without overriding the module name."""
class Bio2BELModuleCaseError(TypeError):
"""Raised when the module name in a subclassed and instantiated ma... | 31.5 | 111 | 0.747354 | 687 | 0.90873 | 0 | 0 | 0 | 0 | 0 | 0 | 500 | 0.661376 |
eb17d457b2e3da5e9c6ce129bda974e0910d6212 | 1,967 | py | Python | tencentcloud/cat/v20180409/errorcodes.py | HS-Gray/tencentcloud-sdk-python | b28b19c4beebc9f361aa3221afa36ad1ee047ccc | [
"Apache-2.0"
] | 37 | 2017-10-12T01:50:42.000Z | 2022-02-24T02:44:45.000Z | tencentcloud/cat/v20180409/errorcodes.py | HS-Gray/tencentcloud-sdk-python | b28b19c4beebc9f361aa3221afa36ad1ee047ccc | [
"Apache-2.0"
] | null | null | null | tencentcloud/cat/v20180409/errorcodes.py | HS-Gray/tencentcloud-sdk-python | b28b19c4beebc9f361aa3221afa36ad1ee047ccc | [
"Apache-2.0"
] | 12 | 2018-07-31T10:04:56.000Z | 2022-02-07T00:08:06.000Z | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... | 26.945205 | 82 | 0.804779 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,609 | 0.720555 |
eb198ab0970d6a0544631c5838cde74baffd6fdc | 8,851 | py | Python | Website/Ogre/points/tests.py | pringyy/OGRE | 26bd1bc06e1d14129b8922da8c9bb7f21b7ec457 | [
"MIT"
] | null | null | null | Website/Ogre/points/tests.py | pringyy/OGRE | 26bd1bc06e1d14129b8922da8c9bb7f21b7ec457 | [
"MIT"
] | null | null | null | Website/Ogre/points/tests.py | pringyy/OGRE | 26bd1bc06e1d14129b8922da8c9bb7f21b7ec457 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.test import TestCase
from django.contrib.staticfiles import finders
from django.urls import reverse
from .models import StudentProfileInfo, User
from .forms import UserForm, ContactForm, UserProfileInfoForm
class IndexPageTest(TestCase):
# Page can only ... | 35.979675 | 119 | 0.711219 | 8,549 | 0.96588 | 0 | 0 | 0 | 0 | 0 | 0 | 2,617 | 0.295673 |
eb1aab5b6a3a998c629d8d9ed3c85dc9531c3cbf | 6,248 | py | Python | py2.5/processing/reduction.py | geofft/multiprocess | d998ffea9e82d17662b12b94a236182e7fde46d5 | [
"BSD-3-Clause"
] | 356 | 2015-06-21T21:05:10.000Z | 2022-03-30T11:57:08.000Z | py2.5/processing/reduction.py | geofft/multiprocess | d998ffea9e82d17662b12b94a236182e7fde46d5 | [
"BSD-3-Clause"
] | 103 | 2015-06-22T01:44:14.000Z | 2022-03-01T03:44:25.000Z | py2.5/processing/reduction.py | geofft/multiprocess | d998ffea9e82d17662b12b94a236182e7fde46d5 | [
"BSD-3-Clause"
] | 72 | 2015-09-02T14:10:24.000Z | 2022-03-25T06:49:43.000Z | #
# Module to support the pickling of different types of connection
# objects and file objects so that they can be transferred between
# different processes.
#
# processing/reduction.py
#
# Copyright (c) 2006-2008, R Oudkerk --- see COPYING.txt
#
__all__ = []
import os
import sys
import socket
import t... | 28.52968 | 80 | 0.639725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 815 | 0.130442 |
eb1afd11fd2f6d89e9d5a3d5e84072981f86d593 | 570 | py | Python | data-structures/print-the-elements-of-a-linked-list-in-reverse.py | gajubadge11/HackerRank-1 | 7b136ccaa1ed47ae737467ace6b494c720ccb942 | [
"MIT"
] | 340 | 2018-06-17T19:45:56.000Z | 2022-03-22T02:26:15.000Z | data-structures/print-the-elements-of-a-linked-list-in-reverse.py | gajubadge11/HackerRank-1 | 7b136ccaa1ed47ae737467ace6b494c720ccb942 | [
"MIT"
] | 3 | 2021-02-02T17:17:29.000Z | 2021-05-18T10:06:04.000Z | data-structures/print-the-elements-of-a-linked-list-in-reverse.py | gajubadge11/HackerRank-1 | 7b136ccaa1ed47ae737467ace6b494c720ccb942 | [
"MIT"
] | 229 | 2019-04-20T08:28:49.000Z | 2022-03-31T04:23:52.000Z | """
Print elements of a linked list in reverse order as standard output
head could be None as well for empty list
Node is defined as
class Node(object):
def __init__(self, data=None, next_node=None):
self.data = data
self.next = next_node
"""
def ReversePrint(head):
if head is None:
... | 16.285714 | 68 | 0.522807 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.480702 |
eb1bfe5091ca2f0f84f38e9d762348c024630c00 | 9,088 | py | Python | cfd/cfd_rel_perms.py | lanetszb/vofpnm | 520544db894fb13e44a86e989bd17b4690e996d3 | [
"MIT"
] | null | null | null | cfd/cfd_rel_perms.py | lanetszb/vofpnm | 520544db894fb13e44a86e989bd17b4690e996d3 | [
"MIT"
] | null | null | null | cfd/cfd_rel_perms.py | lanetszb/vofpnm | 520544db894fb13e44a86e989bd17b4690e996d3 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2020 Aleksandr Zhuravlyov and Zakhar Lanets
#
# 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... | 36.943089 | 125 | 0.725682 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,959 | 0.215559 |
eb1c6dbf88d8c9f286de25fdab3e7030a01a795a | 10,209 | py | Python | python/gameduino/base.py | Godzil/gameduino | 3a9d04b9820ca7edb04df4583fa14300e913fdb9 | [
"BSD-3-Clause"
] | 17 | 2016-09-13T09:11:03.000Z | 2020-09-30T03:31:15.000Z | python/gameduino/base.py | lambdamikel/gameduino | 3a9d04b9820ca7edb04df4583fa14300e913fdb9 | [
"BSD-3-Clause"
] | null | null | null | python/gameduino/base.py | lambdamikel/gameduino | 3a9d04b9820ca7edb04df4583fa14300e913fdb9 | [
"BSD-3-Clause"
] | 12 | 2017-07-03T21:57:41.000Z | 2021-11-02T17:47:23.000Z | import struct
ascii_glyphs = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x00,
0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x7f, 0x36, 0x7f, 0x36, 0x36, 0x00,
0x0c, 0x3f, 0x68, 0x3e, 0x0b, 0x7e, 0x18, 0x00, 0x60, 0... | 49.081731 | 134 | 0.54687 | 4,680 | 0.458419 | 0 | 0 | 0 | 0 | 0 | 0 | 2,102 | 0.205897 |
eb1e1aaec21c57363587a62326c0cc891182c577 | 183 | py | Python | sdm/__init__.py | DarthNoxix/noxixcogs | 794571b7d155e40f6bfb6ba7c31b0a7f025e3d59 | [
"MIT"
] | null | null | null | sdm/__init__.py | DarthNoxix/noxixcogs | 794571b7d155e40f6bfb6ba7c31b0a7f025e3d59 | [
"MIT"
] | null | null | null | sdm/__init__.py | DarthNoxix/noxixcogs | 794571b7d155e40f6bfb6ba7c31b0a7f025e3d59 | [
"MIT"
] | null | null | null | from .sdm import Sdm
__red_end_user_data_statement__ = (
"This cog does not persistently store data or metadata about users."
)
async def setup(bot):
bot.add_cog(Sdm(bot))
| 18.3 | 72 | 0.73224 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.256831 | 68 | 0.371585 |
eb1e990c875a84c89463cedf50afc813143a16f2 | 1,330 | py | Python | GUI/WifiMonitor/UDP/Utils/gpio_mapping.py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | 1 | 2019-10-15T20:31:39.000Z | 2019-10-15T20:31:39.000Z | GUI/WifiMonitor/Utils/gpio_mapping.py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | null | null | null | GUI/WifiMonitor/Utils/gpio_mapping.py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
*************************************************
* @Project: Self Balance
* @Description: GPIO Mapping
* @Owner: Guilherme Chinellato
* @Email: [email protected]
*************************************************... | 18.472222 | 69 | 0.566165 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,252 | 0.941353 |
eb1fb044cf839bde93fe0d603ce5bba8c4e8cccd | 449 | py | Python | vks/vulkanglobals.py | geehalel/pyvk | 56737ee4547b3f12bf941dcda74305b739d09cbb | [
"MIT"
] | 1 | 2022-01-09T19:02:00.000Z | 2022-01-09T19:02:00.000Z | vks/vulkanglobals.py | geehalel/pyvk | 56737ee4547b3f12bf941dcda74305b739d09cbb | [
"MIT"
] | null | null | null | vks/vulkanglobals.py | geehalel/pyvk | 56737ee4547b3f12bf941dcda74305b739d09cbb | [
"MIT"
] | null | null | null | # Copyright (C) 2019 by [email protected]
# This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
import platform
_WIN32 = (platform.system() == 'Windows')
VK_USE_PLATFORM_WIN32_KHR = _WIN32
VK_USE_PLATFORM_ANDROID_KHR = False
VK_USE_PLATFORM_WAYLAND_KHR = False
_DIRECT2DISPLAY = Fal... | 29.933333 | 88 | 0.815145 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.378619 |
eb20be04422ba85fc708db252613db55adc1f7a9 | 359 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/scripts/vulture/whitelist.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/scripts/vulture/whitelist.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/scripts/vulture/whitelist.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | #!/bin/env python
# Vulture often detects false positives when analyzing a code
# base. If there are particular things you wish to ignore,
# add them below. This file is consumed by
# scripts/dead_code/find-dead-code.sh
from vulture.whitelist_utils import Whitelist
view_whitelilst = Whitelist()
# Example:
# view_w... | 23.933333 | 61 | 0.793872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 271 | 0.754875 |
eb212bcaed139e5c9db595186ee8e16677921512 | 8,088 | py | Python | mmdet/utils/memory.py | Youth-Got/mmdetection | 2e0a02599804da6e07650dde37b9df538e15d646 | [
"Apache-2.0"
] | 1 | 2021-12-10T15:08:22.000Z | 2021-12-10T15:08:22.000Z | mmdet/utils/memory.py | q3394101/mmdetection | ca11860f4f3c3ca2ce8340e2686eeaec05b29111 | [
"Apache-2.0"
] | null | null | null | mmdet/utils/memory.py | q3394101/mmdetection | ca11860f4f3c3ca2ce8340e2686eeaec05b29111 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import warnings
from collections import abc
from contextlib import contextmanager
from functools import wraps
import torch
from mmdet.utils import get_root_logger
def cast_tensor_type(inputs, src_type=None, dst_type=None):
"""Recursively convert Tensor in inputs f... | 37.794393 | 103 | 0.574679 | 5,451 | 0.673961 | 418 | 0.051682 | 3,569 | 0.441271 | 0 | 0 | 4,035 | 0.498887 |
eb213849d6f5cbf00a64871c3293e7fb777f9ff4 | 2,278 | py | Python | game.py | YeonjuKim05/Kim_Y_RPS_Fall2020 | 031bfeec09f663686ae2c9418185ab5070af3b7a | [
"MIT"
] | null | null | null | game.py | YeonjuKim05/Kim_Y_RPS_Fall2020 | 031bfeec09f663686ae2c9418185ab5070af3b7a | [
"MIT"
] | 1 | 2020-11-28T16:29:28.000Z | 2020-11-28T16:29:28.000Z | game.py | YeonjuKim05/Kim_Y_RPS_Fall2020 | 031bfeec09f663686ae2c9418185ab5070af3b7a | [
"MIT"
] | null | null | null | # import packages to extend python (just like we extend sublime, or Atom, or VSCode)
from random import randint
from gameComponents import gameVars, chooseWinner
while gameVars.player is False:
print("=======================*/ RPS CONTEST /*=======================")
print("Computer Lives: ", gameVars.ai_lives, "/"... | 26.183908 | 113 | 0.6295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,163 | 0.510536 |
eb21b87b5bc6c350c9c4db10e19ca1430b1bd7c2 | 1,227 | py | Python | dataset/utils.py | tarun-bisht/mlpipe | 0cd1f0b57a7788222228dc08f0c8a21ed51a7cc1 | [
"MIT"
] | null | null | null | dataset/utils.py | tarun-bisht/mlpipe | 0cd1f0b57a7788222228dc08f0c8a21ed51a7cc1 | [
"MIT"
] | null | null | null | dataset/utils.py | tarun-bisht/mlpipe | 0cd1f0b57a7788222228dc08f0c8a21ed51a7cc1 | [
"MIT"
] | null | null | null | import pandas as pd
import os
def df_from_image_dirs(directory, image_format="jpg",
relative_path=False, verbose=0):
dataframe_dict = {
"images":[],
"classes":[]
}
num_dirs = 0
num_images = 0
images_per_classes = []
classes = []
for dirs in os.listdir(directory):
... | 36.088235 | 109 | 0.597392 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.124694 |
eb2259b4263e5697783bf6849627924369449a0f | 1,222 | py | Python | THreading.py | asd86826/OpticalFlow_Test | f4d621994871b4913b95a18f59cb171526d786ae | [
"MIT"
] | null | null | null | THreading.py | asd86826/OpticalFlow_Test | f4d621994871b4913b95a18f59cb171526d786ae | [
"MIT"
] | null | null | null | THreading.py | asd86826/OpticalFlow_Test | f4d621994871b4913b95a18f59cb171526d786ae | [
"MIT"
] | null | null | null | import time
from threading import Timer
i = 0
class RepeatedTimer(object):
def __init__(self, interval, function, *args, **kwargs):
self._timer = None
self.interval = interval
self.function = function
self.args = args
self.kwargs = kwargs
... | 24.44 | 85 | 0.531097 | 778 | 0.636661 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.094926 |
eb22d571bce236b4e4b07269afd4c1273f92107f | 721 | py | Python | src/main/PyCodes/deep_versions.py | panditu2015/DL-Lab-7th-Semester | 59a64d9c219cbed8cc4a75517f46c7f551a95a5a | [
"MIT"
] | null | null | null | src/main/PyCodes/deep_versions.py | panditu2015/DL-Lab-7th-Semester | 59a64d9c219cbed8cc4a75517f46c7f551a95a5a | [
"MIT"
] | null | null | null | src/main/PyCodes/deep_versions.py | panditu2015/DL-Lab-7th-Semester | 59a64d9c219cbed8cc4a75517f46c7f551a95a5a | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[1]:
import keras
# In[2]:
# scipy
import scipy
print( ' scipy: %s ' % scipy.__version__)
# numpy
import numpy
print( ' numpy: %s ' % numpy.__version__)
# matplotlib
import matplotlib
print( ' matplotlib: %s ' % matplotlib.__version__)
# pandas
import pandas
print( ' pandas: %s ' % pandas.__... | 15.673913 | 53 | 0.694868 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 264 | 0.366158 |
eb2601a12ac399bfb0e416993c3a1b51cb79ad73 | 577 | py | Python | graph_help/colorschemes/DarkColorScheme.py | jgurhem/Graph_Generator | d60f4451feef0c530389bfc4bc6978bda3d4c0cb | [
"MIT"
] | null | null | null | graph_help/colorschemes/DarkColorScheme.py | jgurhem/Graph_Generator | d60f4451feef0c530389bfc4bc6978bda3d4c0cb | [
"MIT"
] | null | null | null | graph_help/colorschemes/DarkColorScheme.py | jgurhem/Graph_Generator | d60f4451feef0c530389bfc4bc6978bda3d4c0cb | [
"MIT"
] | null | null | null | from .DefaultColorScheme import DefaultColorScheme
class DarkColorScheme(DefaultColorScheme):
def __init__(self):
self.colors = dict()
self.colors['background'] = 'black'
self.colors['edge'] = 'white'
self.colors['fontcolor'] = 'black'
self.colors['initv'] = 'grey65'
self.colors['initm'] = 'g... | 30.368421 | 50 | 0.636049 | 523 | 0.906412 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.315425 |
eb266bf3b2f0517ce3d9501b3cfc011f8ded2d3e | 3,817 | bzl | Python | defs.bzl | attilaolah/bazel-tools | 823216936ee93ab6884c6111a8e60e9a836fa7cc | [
"Apache-2.0"
] | 2 | 2021-09-02T18:59:09.000Z | 2021-09-20T23:13:17.000Z | defs.bzl | attilaolah/bazel-tools | 823216936ee93ab6884c6111a8e60e9a836fa7cc | [
"Apache-2.0"
] | null | null | null | defs.bzl | attilaolah/bazel-tools | 823216936ee93ab6884c6111a8e60e9a836fa7cc | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 31.545455 | 79 | 0.556196 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,385 | 0.36285 |
eb26e6350d60cf3d97e04c6da4b6ad1b56768020 | 554 | py | Python | Psi_Phi/plot.py | Twinstar2/Phython_scripts | 19f88420bca64014585e87747d01737afe074400 | [
"MIT"
] | null | null | null | Psi_Phi/plot.py | Twinstar2/Phython_scripts | 19f88420bca64014585e87747d01737afe074400 | [
"MIT"
] | 1 | 2018-02-14T15:19:07.000Z | 2018-02-14T15:19:07.000Z | Psi_Phi/plot.py | TobiasJu/Python_Master_scripts | 19f88420bca64014585e87747d01737afe074400 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
plt.switch_backend('agg')
import seaborn as sns
sns_plot = \
(sns.jointplot(psi, phi, size=12, space=0, xlim=(-190, 190), ylim=(-190, 190)).plot_joint(sns.kdeplot, zorder=0,
n_levels=6))
# sns_pl... | 39.571429 | 112 | 0.617329 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 204 | 0.368231 |
eb289039ceb1e6cb9ff0bbb176aa1f763781e163 | 692 | py | Python | tests/test_instrumentation/test_base.py | cloudchacho/hedwig-python | 1e4ca5472fe661ffd9d3cedd10a9ddc2daa0926b | [
"Apache-2.0"
] | null | null | null | tests/test_instrumentation/test_base.py | cloudchacho/hedwig-python | 1e4ca5472fe661ffd9d3cedd10a9ddc2daa0926b | [
"Apache-2.0"
] | 3 | 2021-06-25T20:52:50.000Z | 2021-11-30T16:22:30.000Z | tests/test_instrumentation/test_base.py | cloudchacho/hedwig-python | 1e4ca5472fe661ffd9d3cedd10a9ddc2daa0926b | [
"Apache-2.0"
] | null | null | null | from unittest import mock
import pytest
get_tracer = pytest.importorskip('opentelemetry.trace.get_tracer')
@mock.patch('hedwig.backends.base.Message.exec_callback', autospec=True)
def test_message_handler_updates_span_name(mock_exec_callback, message, consumer_backend):
provider_metadata = mock.Mock()
trace... | 40.705882 | 99 | 0.789017 | 0 | 0 | 0 | 0 | 580 | 0.83815 | 0 | 0 | 76 | 0.109827 |
eb2a05506a2d5dac21a3a7230d334f572006e5b5 | 42 | py | Python | logic/start_game.py | sparkingdark/Project | fdd521407d788d1945275148337992a795ebdf0c | [
"MIT"
] | null | null | null | logic/start_game.py | sparkingdark/Project | fdd521407d788d1945275148337992a795ebdf0c | [
"MIT"
] | null | null | null | logic/start_game.py | sparkingdark/Project | fdd521407d788d1945275148337992a795ebdf0c | [
"MIT"
] | 5 | 2020-11-28T13:13:15.000Z | 2020-12-07T16:32:36.000Z | from logic import *
def game():
pass | 8.4 | 19 | 0.619048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eb2a6dfadfc03cbe4b08fd33a47e0c0b3e370224 | 1,184 | py | Python | Leetcode/SwapNodesInPairs.py | tswsxk/CodeBook | 01b976418d64f5f94257ae0e2b36751afb93c105 | [
"MIT"
] | null | null | null | Leetcode/SwapNodesInPairs.py | tswsxk/CodeBook | 01b976418d64f5f94257ae0e2b36751afb93c105 | [
"MIT"
] | 1 | 2019-09-24T22:04:03.000Z | 2019-09-24T22:04:03.000Z | Leetcode/SwapNodesInPairs.py | tswsxk/CodeBook | 01b976418d64f5f94257ae0e2b36751afb93c105 | [
"MIT"
] | null | null | null | # Definition for singly-linked list.
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
class Solution(object):
def swapPairs(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
nodeRec = []
check = head
pr... | 24.163265 | 44 | 0.47973 | 902 | 0.761824 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.097128 |
eb2b0a445ecc0e541307b4aff935b22d4cc3183d | 939 | py | Python | hello.py | ookcode/CodingSpider | eac57ef8b41be841a8366f3cc376ff259d01e27f | [
"MIT"
] | null | null | null | hello.py | ookcode/CodingSpider | eac57ef8b41be841a8366f3cc376ff259d01e27f | [
"MIT"
] | null | null | null | hello.py | ookcode/CodingSpider | eac57ef8b41be841a8366f3cc376ff259d01e27f | [
"MIT"
] | 1 | 2022-02-23T07:12:23.000Z | 2022-02-23T07:12:23.000Z | #!/usr/bin/python
#coding=utf-8
import os
from flask import Flask
from flask import Response
from flask import request
app = Flask(__name__)
@app.route('/')
def root():
return app.send_static_file('index.html')
@app.route('/env')
def env():
html = "System Environment:\n\n"
for env in os.environ.keys():
... | 30.290323 | 97 | 0.652822 | 0 | 0 | 0 | 0 | 751 | 0.799787 | 0 | 0 | 276 | 0.29393 |
eb2c8b8b8d777e9a0438515ac0aea6cd01f5301b | 2,696 | py | Python | chess-board-0.2.0/chessboard/pieces.py | fshelobolin/irohbot | 4ad4c554ecff1e1005fbecf26ee097c387bf357d | [
"MIT"
] | null | null | null | chess-board-0.2.0/chessboard/pieces.py | fshelobolin/irohbot | 4ad4c554ecff1e1005fbecf26ee097c387bf357d | [
"MIT"
] | null | null | null | chess-board-0.2.0/chessboard/pieces.py | fshelobolin/irohbot | 4ad4c554ecff1e1005fbecf26ee097c387bf357d | [
"MIT"
] | null | null | null | """
Ahira Justice, ADEFOKUN
[email protected]
"""
import os
import pygame
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
IMAGE_DIR = os.path.join(BASE_DIR, "images")
BLACK = "BLACK"
WHITE = "WHITE"
BISHOP = "BISHOP"
KING = "KING"
KNGHT = "KNIGHT"
PAWN = "PAWN"
QUEEN = "QUEEN"
ROOK = "ROOK"
c... | 29.304348 | 66 | 0.582715 | 2,376 | 0.881306 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.081973 |
eb2cab16d3d0736d863c283be6817d00ab5e890d | 3,993 | py | Python | stacks/XIAOMATECH/1.0/services/ROCKETMQ/package/scripts/namesrv.py | tvorogme/dataops | acfa21df42a20768c004c6630a064f4e38e280b2 | [
"Apache-2.0"
] | 3 | 2019-08-13T01:44:16.000Z | 2019-12-10T04:05:56.000Z | stacks/XIAOMATECH/1.0/services/ROCKETMQ/package/scripts/namesrv.py | tvorogme/dataops | acfa21df42a20768c004c6630a064f4e38e280b2 | [
"Apache-2.0"
] | null | null | null | stacks/XIAOMATECH/1.0/services/ROCKETMQ/package/scripts/namesrv.py | tvorogme/dataops | acfa21df42a20768c004c6630a064f4e38e280b2 | [
"Apache-2.0"
] | 7 | 2019-05-29T17:35:25.000Z | 2021-12-04T07:55:10.000Z | from resource_management.core.resources.system import Execute
from resource_management.libraries.script import Script
from resource_management.core.resources.system import Directory
from resource_management.core.resources.system import File
from resource_management.core.source import InlineTemplate
from resource_manag... | 35.651786 | 146 | 0.643877 | 998 | 0.249937 | 0 | 0 | 0 | 0 | 0 | 0 | 582 | 0.145755 |
eb361ceecffd166eeb0b6b3ee13b8be48e6f4d86 | 819 | py | Python | setup.py | ktvng/cue | 5f31c8898f3bc53a18956220f609489cd2bbe590 | [
"MIT"
] | null | null | null | setup.py | ktvng/cue | 5f31c8898f3bc53a18956220f609489cd2bbe590 | [
"MIT"
] | null | null | null | setup.py | ktvng/cue | 5f31c8898f3bc53a18956220f609489cd2bbe590 | [
"MIT"
] | null | null | null | """Cue: Script Orchestration for Data Analysis
Cue lets your package your data analysis into simple actions which can be connected
into a dynamic data analysis pipeline with coverage over even complex data sets.
"""
DOCLINES = (__doc__ or '').split('\n')
from setuptools import find_packages, setup
setup(... | 26.419355 | 85 | 0.616606 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 374 | 0.456654 |
eb3657629d59fdcbd7874c2822fc0707cfc70c45 | 1,689 | py | Python | tests/getz.py | deflax/steinvord | 709326ff219159a78f644c0adf3c5b224ed42804 | [
"Zlib"
] | 1 | 2021-06-02T19:51:26.000Z | 2021-06-02T19:51:26.000Z | tests/getz.py | deflax/steinvord | 709326ff219159a78f644c0adf3c5b224ed42804 | [
"Zlib"
] | null | null | null | tests/getz.py | deflax/steinvord | 709326ff219159a78f644c0adf3c5b224ed42804 | [
"Zlib"
] | null | null | null | #!/usr/bin/python3.2
#
# Zabbix API Python usage example
# Christoph Haas <[email protected]>
#
username=''
password='1'
hostgroup=''
item_name='system.cpu.load[,avg1]'
zabbix_url=''
import zabbix_api
import sys
# Connect to Zabbix server
z=zabbix_api.ZabbixAPI(server=zabbix_url)
z.login(user=username, passwor... | 23.788732 | 70 | 0.562463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 795 | 0.470693 |
eb3b035d6a2b960bc0d338d7dd3785c2208f99f5 | 11,813 | py | Python | server.py | uanthwal/starter-snake-python | 6eff23ac9b9b0cfb9dbbf6d756a92a677bbf0417 | [
"MIT"
] | null | null | null | server.py | uanthwal/starter-snake-python | 6eff23ac9b9b0cfb9dbbf6d756a92a677bbf0417 | [
"MIT"
] | null | null | null | server.py | uanthwal/starter-snake-python | 6eff23ac9b9b0cfb9dbbf6d756a92a677bbf0417 | [
"MIT"
] | null | null | null | import copy
import math
import os
import random
import cherrypy
"""
This is a simple Battlesnake server written in Python.
For instructions see https://github.com/BattlesnakeOfficial/starter-snake-python/README.md
"""
class Battlesnake(object):
global neighbours
@cherrypy.expose
@cherrypy.tools.json_out()
def... | 31.501333 | 108 | 0.632439 | 11,314 | 0.957758 | 0 | 0 | 2,904 | 0.245831 | 0 | 0 | 3,187 | 0.269788 |
eb3bba063d98bf83051c3973141cbbea653626d3 | 342 | py | Python | EventIntegrityLib.py | fermi-lat/EventIntegrity | 600c64c7b9be57e1008d12b7bd28ef0d260d7973 | [
"BSD-3-Clause"
] | null | null | null | EventIntegrityLib.py | fermi-lat/EventIntegrity | 600c64c7b9be57e1008d12b7bd28ef0d260d7973 | [
"BSD-3-Clause"
] | null | null | null | EventIntegrityLib.py | fermi-lat/EventIntegrity | 600c64c7b9be57e1008d12b7bd28ef0d260d7973 | [
"BSD-3-Clause"
] | null | null | null | # $Header: /nfs/slac/g/glast/ground/cvs/GlastRelease-scons/EventIntegrity/EventIntegrityLib.py,v 1.2 2008/08/28 21:50:54 ecephas Exp $
def generate(env, **kw):
if not kw.get('depsOnly', 0):
env.Tool('addLibrary', library = ['EventIntegrity'])
env.Tool('GlastSvcLib')
env.Tool('LdfEventLib')
def exist... | 38 | 134 | 0.681287 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 198 | 0.578947 |
eb3c0fe9fe75281912b7403d1e9af8679184f59d | 107 | py | Python | mr4mp/__init__.py | lapets/mr4mp | 3f3d6ec01272d4b450eda536b37bcd76851a57d2 | [
"MIT"
] | 5 | 2019-06-28T17:36:37.000Z | 2022-03-08T18:59:01.000Z | mr4mp/__init__.py | lapets/mr4mp | 3f3d6ec01272d4b450eda536b37bcd76851a57d2 | [
"MIT"
] | null | null | null | mr4mp/__init__.py | lapets/mr4mp | 3f3d6ec01272d4b450eda536b37bcd76851a57d2 | [
"MIT"
] | null | null | null | """Gives users direct access to class and functions."""
from mr4mp.mr4mp import pool, mapreduce, mapconcat
| 35.666667 | 55 | 0.775701 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.514019 |
eb3c1435400a880f8b3833ff6b37ef02c5237e11 | 59,098 | py | Python | google/devtools/testing/v1/devtools-testing-v1-py/google/devtools/testing_v1/types/test_execution.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/devtools/testing/v1/devtools-testing-v1-py/google/devtools/testing_v1/types/test_execution.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/devtools/testing/v1/devtools-testing-v1-py/google/devtools/testing_v1/types/test_execution.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 30.029472 | 108 | 0.619953 | 56,592 | 0.957596 | 0 | 0 | 0 | 0 | 0 | 0 | 39,512 | 0.668584 |
eb3c4ae70f222dd8a499b8678c9508db3922f5b5 | 1,457 | py | Python | CONTENT/Resources/guides/__UNSORTED/244_shortest_word_distance_ii/shortest.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 13 | 2021-03-11T00:25:22.000Z | 2022-03-19T00:19:23.000Z | CONTENT/Resources/guides/__UNSORTED/244_shortest_word_distance_ii/shortest.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 162 | 2021-03-09T01:52:11.000Z | 2022-03-12T01:09:07.000Z | CONTENT/Resources/guides/__UNSORTED/244_shortest_word_distance_ii/shortest.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 12 | 2021-04-26T19:43:01.000Z | 2022-01-31T08:36:29.000Z | from collections import defaultdict
class WordDistance(object):
def __init__(self, words):
"""
initialize your data structure here.
:type words: List[str]
"""
self.indice = defaultdict(list)
self.memo = {}
self.MAXLEN = len(words)
for i, word in enum... | 29.734694 | 67 | 0.539465 | 1,213 | 0.832533 | 0 | 0 | 0 | 0 | 0 | 0 | 420 | 0.288264 |
eb41c235a81322c2905a0154804ac4a18d5c346c | 1,060 | py | Python | src/sentimentClassification.py | MaxPowerScience/EnglishSentiment | 119eeb6e1ee9f24805fbad6650d1a9c3e305f952 | [
"Apache-2.0"
] | null | null | null | src/sentimentClassification.py | MaxPowerScience/EnglishSentiment | 119eeb6e1ee9f24805fbad6650d1a9c3e305f952 | [
"Apache-2.0"
] | null | null | null | src/sentimentClassification.py | MaxPowerScience/EnglishSentiment | 119eeb6e1ee9f24805fbad6650d1a9c3e305f952 | [
"Apache-2.0"
] | null | null | null | from perceptron import train_network, create_perceptron, test_network
from preprocessingData import get_ids_matrix, separate_test_and_training_data, read_word_list
from extractRawData import get_raw_data
from lstm import create_lstm, create_lstm_with_tensorflow
def main():
all_texts, pos_texts, neg_texts = get_raw... | 37.857143 | 93 | 0.766038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 378 | 0.356604 |
eb41c51ce9970b54d5b685bba4f5e3319c3b6398 | 33,225 | py | Python | Developer-Essentials-Capstone/Python/Includes/Capstone-Setup.py | databricks-academy/developer-essentials-capstone | 77e70b1eb5b49b5f6779495fac7d14f5fadded9d | [
"CC0-1.0"
] | 1 | 2022-02-08T03:56:32.000Z | 2022-02-08T03:56:32.000Z | Developer-Essentials-Capstone/Python/Includes/Capstone-Setup.py | databricks-academy/developer-essentials-capstone | 77e70b1eb5b49b5f6779495fac7d14f5fadded9d | [
"CC0-1.0"
] | null | null | null | Developer-Essentials-Capstone/Python/Includes/Capstone-Setup.py | databricks-academy/developer-essentials-capstone | 77e70b1eb5b49b5f6779495fac7d14f5fadded9d | [
"CC0-1.0"
] | 4 | 2022-01-01T09:41:31.000Z | 2022-02-17T09:48:05.000Z | # Databricks notebook source
import builtins as BI
# Setup the capstone
import re, uuid
from pyspark.sql.types import StructType, StringType, IntegerType, TimestampType, DoubleType
from pyspark.sql.functions import col, to_date, weekofyear
from pyspark.sql import DataFrame
static_tests = None
bronze_tests = None
silv... | 38.544084 | 408 | 0.669586 | 11,477 | 0.345433 | 0 | 0 | 1,173 | 0.035305 | 0 | 0 | 11,113 | 0.334477 |
eb424108a96bf604264def77319d83c190ad7040 | 12,658 | py | Python | scraper/Scraper.py | tiskutis/Capstone24Scraper | 3182463e129f37f0f895a440d2285a51e0cfb9a2 | [
"MIT"
] | null | null | null | scraper/Scraper.py | tiskutis/Capstone24Scraper | 3182463e129f37f0f895a440d2285a51e0cfb9a2 | [
"MIT"
] | null | null | null | scraper/Scraper.py | tiskutis/Capstone24Scraper | 3182463e129f37f0f895a440d2285a51e0cfb9a2 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup as bs, BeautifulSoup
import pandas as pd
import numpy as np
import re
import logging
class Scraper:
"""
This is a scraper class, which can scrape California housing information from https://www.point2homes.com/ website.
The flow:
- First, all California ar... | 38.241692 | 123 | 0.586902 | 12,524 | 0.989414 | 0 | 0 | 5,874 | 0.464054 | 0 | 0 | 5,903 | 0.466345 |
eb42e8c815ef79c9ee2b0e9d574f89c917610639 | 693 | py | Python | ArticleSpider/ArticleSpider/utils/selenium_spider.py | ms-wu/Scrapy_projects | 376eb5e1c6eca54bcfb781170513c8e9d3476fec | [
"MIT"
] | null | null | null | ArticleSpider/ArticleSpider/utils/selenium_spider.py | ms-wu/Scrapy_projects | 376eb5e1c6eca54bcfb781170513c8e9d3476fec | [
"MIT"
] | null | null | null | ArticleSpider/ArticleSpider/utils/selenium_spider.py | ms-wu/Scrapy_projects | 376eb5e1c6eca54bcfb781170513c8e9d3476fec | [
"MIT"
] | null | null | null | from selenium import webdriver
from scrapy.selector import Selector
import time
chrome_opt = webdriver.ChromeOptions()
prefs = {"profile.managed_default_content_settings.images": 2}
chrome_opt.add_experimental_option("prefs", prefs)
browser = webdriver.Chrome(executable_path="H:\chromedriver.exe", chrome_options=chrom... | 31.5 | 139 | 0.780664 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 417 | 0.601732 |
eb4407cbcc3f00735c03c065582c4a89413734d8 | 1,678 | py | Python | launcher.py | dlario/PyFlow | b53b9d14b37aa586426d85842c6cd9a9c35443f2 | [
"MIT"
] | null | null | null | launcher.py | dlario/PyFlow | b53b9d14b37aa586426d85842c6cd9a9c35443f2 | [
"MIT"
] | null | null | null | launcher.py | dlario/PyFlow | b53b9d14b37aa586426d85842c6cd9a9c35443f2 | [
"MIT"
] | null | null | null | from nine import str
from Qt.QtWidgets import QApplication, QStyleFactory
from Qt import QtGui
from Qt import QtCore
import sys
import os
from PyFlow.App import PyFlow
FILE_DIR = os.path.abspath(os.path.dirname(__file__))
SETTINGS_PATH = os.path.join(FILE_DIR, "PyFlow", "appConfig.ini")
STYLE_PATH = os.path.join(FILE... | 33.56 | 77 | 0.781883 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.033373 |
eb444f1d2f4c6079bc153578e3e68294eef319a0 | 4,344 | py | Python | src/gapminder_challenge/dashboard/dash_app2.py | UBC-MDS/gapminder_challenge | bbc8132a475d483e7c6c46572c8efca40b506afc | [
"MIT"
] | 1 | 2022-03-19T03:31:49.000Z | 2022-03-19T03:31:49.000Z | src/gapminder_challenge/dashboard/dash_app2.py | imtvwy/gapminder_challenge | 0f7d9816b0c5baf6422baff24e0413c800d6e62a | [
"MIT"
] | 39 | 2022-02-17T05:04:48.000Z | 2022-03-19T21:37:20.000Z | src/gapminder_challenge/dashboard/dash_app2.py | imtvwy/gapminder_challenge | 0f7d9816b0c5baf6422baff24e0413c800d6e62a | [
"MIT"
] | 1 | 2022-03-19T03:30:08.000Z | 2022-03-19T03:30:08.000Z | import pandas as pd
from dash import Dash, html, dcc, Input, Output
import altair as alt
df = pd.read_csv('../../data/raw/world-data-gapminder_raw.csv') # local run
# df = pd.read_csv('data/raw/world-data-gapminder_raw.csv') # heroku deployment
url = '/dash_app2/'
def add_dash(server):
"""
It creates a D... | 42.174757 | 113 | 0.575506 | 0 | 0 | 0 | 0 | 2,773 | 0.638352 | 0 | 0 | 1,781 | 0.409991 |
eb448a448b8928b4d93cd021756f058d5d672505 | 4,595 | py | Python | emulator/utils/common.py | Harry45/emuPK | c5cd8a4ab7ef593b196ee58d9df5d826d444a2b9 | [
"MIT"
] | 2 | 2021-05-10T16:59:34.000Z | 2021-05-19T16:10:24.000Z | emulator/utils/common.py | Harry45/emuPK | c5cd8a4ab7ef593b196ee58d9df5d826d444a2b9 | [
"MIT"
] | null | null | null | emulator/utils/common.py | Harry45/emuPK | c5cd8a4ab7ef593b196ee58d9df5d826d444a2b9 | [
"MIT"
] | 2 | 2021-04-16T23:55:16.000Z | 2021-09-09T12:48:41.000Z | # Author: Arrykrishna Mootoovaloo
# Collaborators: Alan Heavens, Andrew Jaffe, Florent Leclercq
# Email : [email protected]
# Affiliation : Imperial Centre for Inference and Cosmology
# Status : Under Development
'''
Perform all additional operations such as interpolations
'''
import os
import logging
im... | 24.972826 | 106 | 0.618498 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,141 | 0.465941 |
eb458b4c5c0f75854528fff96d2061d078c5cbe7 | 2,984 | py | Python | pypy/translator/microbench/pybench/Imports.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 12 | 2016-01-06T07:10:28.000Z | 2021-05-13T23:02:02.000Z | pypy/translator/microbench/pybench/Imports.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | null | null | null | pypy/translator/microbench/pybench/Imports.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | 2 | 2016-07-29T07:09:50.000Z | 2016-10-16T08:50:26.000Z | from pybench import Test
# First imports:
import os
import package.submodule
class SecondImport(Test):
version = 0.1
operations = 5 * 5
rounds = 20000
def test(self):
for i in xrange(self.rounds):
import os
import os
import os
import os
... | 21.314286 | 37 | 0.515416 | 2,862 | 0.959115 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.005362 |
de16d40373757db432c5c7a3e7d57eeddc1025cc | 1,745 | py | Python | tests/test_generators_rst.py | dbaty/soho | 3fe67d3dc52919751217d6e73be436c3e291ab04 | [
"BSD-3-Clause"
] | null | null | null | tests/test_generators_rst.py | dbaty/soho | 3fe67d3dc52919751217d6e73be436c3e291ab04 | [
"BSD-3-Clause"
] | 1 | 2015-10-11T10:34:08.000Z | 2015-10-11T10:34:08.000Z | tests/test_generators_rst.py | dbaty/soho | 3fe67d3dc52919751217d6e73be436c3e291ab04 | [
"BSD-3-Clause"
] | null | null | null | from unittest import TestCase
class TestRSTGenerator(TestCase):
def _make_one(self):
from soho.generators.rst import RSTGenerator
return RSTGenerator()
def _call_generate(self, filename):
import os.path
generator = self._make_one()
here = os.path.dirname(__file__)
... | 37.12766 | 79 | 0.581089 | 1,712 | 0.981089 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.330086 |
de170bec53f0702af41038f426ab0305ba516d45 | 206 | py | Python | wagtail_ab_testing/test/apps.py | alxbridge/wagtail-ab-testing | 1e959cc4ea1fa9b6d9adda2525fc3aae8e8b7807 | [
"BSD-3-Clause"
] | 14 | 2021-02-19T08:52:37.000Z | 2022-03-16T05:16:38.000Z | wagtail_ab_testing/test/apps.py | alxbridge/wagtail-ab-testing | 1e959cc4ea1fa9b6d9adda2525fc3aae8e8b7807 | [
"BSD-3-Clause"
] | 10 | 2021-04-09T16:16:17.000Z | 2022-03-31T17:30:18.000Z | wagtail_ab_testing/test/apps.py | alxbridge/wagtail-ab-testing | 1e959cc4ea1fa9b6d9adda2525fc3aae8e8b7807 | [
"BSD-3-Clause"
] | 11 | 2021-04-23T15:19:06.000Z | 2022-03-28T16:15:14.000Z | from django.apps import AppConfig
class WagtailAbTestingTestAppConfig(AppConfig):
label = "wagtail_ab_testing_test"
name = "wagtail_ab_testing.test"
verbose_name = "Wagtail A/B Testing tests"
| 25.75 | 47 | 0.771845 | 169 | 0.820388 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.373786 |
de188ec6c9675e889154db140be0ba41e013c1c2 | 835 | py | Python | shc/__init__.py | fabaff/smarthomeconnect | 611cd0f372d03b5fc5798a2a9a5f962d1da72799 | [
"Apache-2.0"
] | 5 | 2021-07-02T21:48:45.000Z | 2021-12-12T21:55:42.000Z | shc/__init__.py | fabaff/smarthomeconnect | 611cd0f372d03b5fc5798a2a9a5f962d1da72799 | [
"Apache-2.0"
] | 49 | 2020-09-18T20:05:55.000Z | 2022-03-05T19:51:33.000Z | shc/__init__.py | fabaff/smarthomeconnect | 611cd0f372d03b5fc5798a2a9a5f962d1da72799 | [
"Apache-2.0"
] | 1 | 2021-12-10T14:50:43.000Z | 2021-12-10T14:50:43.000Z | # Copyright 2020 Michael Thies <[email protected]>
#
# 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 agre... | 34.791667 | 120 | 0.777246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 579 | 0.693413 |
de189e363b7152e9b3189460e86a65764a35ef55 | 65 | py | Python | minicds/setup_package.py | NESSAN-PMO/miniCDS | 82f08dfbb9259c78286679a0be875a66e2bedfe8 | [
"BSD-3-Clause"
] | null | null | null | minicds/setup_package.py | NESSAN-PMO/miniCDS | 82f08dfbb9259c78286679a0be875a66e2bedfe8 | [
"BSD-3-Clause"
] | 1 | 2020-10-29T19:56:05.000Z | 2020-10-29T19:56:05.000Z | minicds/setup_package.py | NESSAN-PMO/miniCDS | 82f08dfbb9259c78286679a0be875a66e2bedfe8 | [
"BSD-3-Clause"
] | null | null | null |
def get_package_data():
return {"minicds":['minicds.cfg']}
| 13 | 38 | 0.646154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.338462 |
de1a03c3bf2d4b4418706f4fb2057bc7977a7251 | 777 | py | Python | client.py | juzejunior/HttpBasicServer | 7e77b49f693d9cfe0d782e93026d8f9261368b69 | [
"MIT"
] | null | null | null | client.py | juzejunior/HttpBasicServer | 7e77b49f693d9cfe0d782e93026d8f9261368b69 | [
"MIT"
] | null | null | null | client.py | juzejunior/HttpBasicServer | 7e77b49f693d9cfe0d782e93026d8f9261368b69 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Simple Http Client, to request html files
Modification: 11/09/2017
Author: J. Júnior
'''
import httplib
import sys
#get http server ip - pass in the command line
http_server = sys.argv[1]
#create a connection with the server
conn = httplib.HTTPConnection(ht... | 22.852941 | 58 | 0.679537 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 394 | 0.506427 |
de1d5ad5042762573fde2a3a38799da995504ae1 | 6,881 | py | Python | pyssh/crypto/asymmetric.py | beckjake/pyssh | d6b7a6cca7e38d0835f84386723ec10ac5ad621f | [
"CC0-1.0"
] | null | null | null | pyssh/crypto/asymmetric.py | beckjake/pyssh | d6b7a6cca7e38d0835f84386723ec10ac5ad621f | [
"CC0-1.0"
] | null | null | null | pyssh/crypto/asymmetric.py | beckjake/pyssh | d6b7a6cca7e38d0835f84386723ec10ac5ad621f | [
"CC0-1.0"
] | null | null | null | """Implement asymmetric cryptography.
"""
from __future__ import print_function, division, absolute_import
from __future__ import unicode_literals
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import rsa, dsa, utils, padding
from cryptography.hazmat.pri... | 31.277273 | 83 | 0.636826 | 5,786 | 0.840866 | 0 | 0 | 642 | 0.0933 | 0 | 0 | 1,360 | 0.197646 |
de1dfa963d73dc87e79e92fa3fe653f6462539c8 | 1,230 | py | Python | books/李航-统计学习/machine_learning_algorithm-master/naive_bayes/naive_bayes.py | haohonglin/DeepLearning-1 | c00eee4738d322f6eb5d61d5bafbcfa7b20152a0 | [
"Apache-2.0"
] | 1 | 2020-12-01T06:13:21.000Z | 2020-12-01T06:13:21.000Z | books/李航-统计学习/machine_learning_algorithm-master/naive_bayes/naive_bayes.py | idonashino/DeepLearning | c00eee4738d322f6eb5d61d5bafbcfa7b20152a0 | [
"Apache-2.0"
] | null | null | null | books/李航-统计学习/machine_learning_algorithm-master/naive_bayes/naive_bayes.py | idonashino/DeepLearning | c00eee4738d322f6eb5d61d5bafbcfa7b20152a0 | [
"Apache-2.0"
] | 1 | 2021-01-01T15:28:36.000Z | 2021-01-01T15:28:36.000Z | """
@ jetou
@ cart decision_tree
@ date 2017 10 31
"""
import numpy as np
class naive_bayes:
def __init__(self, feature, label):
self.feature = feature.transpose()
self.label = label.transpose().flatten(1)
self.positive = np.count_nonzero(self.label == 1) * 1.0
self.ne... | 28.604651 | 89 | 0.585366 | 1,139 | 0.926016 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.054472 |
de1e40b74da53919bbdc4c6c8dda38d5aba2c247 | 27 | py | Python | src/__init__.py | natrodrigues/face-recognition | 00c78bea55d2738913cf5475056c2faf05fe960e | [
"MIT"
] | null | null | null | src/__init__.py | natrodrigues/face-recognition | 00c78bea55d2738913cf5475056c2faf05fe960e | [
"MIT"
] | null | null | null | src/__init__.py | natrodrigues/face-recognition | 00c78bea55d2738913cf5475056c2faf05fe960e | [
"MIT"
] | null | null | null | from . import frame_manager | 27 | 27 | 0.851852 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
de1e4247762eb410a1475e5659c71d8d5fb3aa3a | 276 | py | Python | sparweltbitool/config.py | checkout-charlie/bitool | e41ce66ab2b88992dbfc08d79372bf3965724f3e | [
"MIT"
] | null | null | null | sparweltbitool/config.py | checkout-charlie/bitool | e41ce66ab2b88992dbfc08d79372bf3965724f3e | [
"MIT"
] | null | null | null | sparweltbitool/config.py | checkout-charlie/bitool | e41ce66ab2b88992dbfc08d79372bf3965724f3e | [
"MIT"
] | 1 | 2015-07-22T16:53:42.000Z | 2015-07-22T16:53:42.000Z | import os
import sys
if sys.version_info[:2] >= (3, 4):
import configparser
config = configparser.ConfigParser()
else:
import ConfigParser
config = ConfigParser.ConfigParser()
config.readfp(open('app/config/config_%s.cfg' % os.environ.get('APP_ENV', 'dev')))
| 25.090909 | 82 | 0.706522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.144928 |
de2067c1459291384093f5c6102e9ab0301ade68 | 3,164 | py | Python | src/rsa_decryption_125/app.py | seanballais/rsa-decryption-125 | df2ad27d055469e7c58a811f40cfc2c8a6171298 | [
"MIT"
] | null | null | null | src/rsa_decryption_125/app.py | seanballais/rsa-decryption-125 | df2ad27d055469e7c58a811f40cfc2c8a6171298 | [
"MIT"
] | null | null | null | src/rsa_decryption_125/app.py | seanballais/rsa-decryption-125 | df2ad27d055469e7c58a811f40cfc2c8a6171298 | [
"MIT"
] | null | null | null | import tkinter
from tkinter import *
from rsa_decryption_125 import decryptor
class AppWindow(Frame):
def __init__(self, master=None):
super().__init__(master)
self.master = master
self.init_window()
def init_window(self):
self.master.title('RSA Decryptor')
self.p... | 34.391304 | 102 | 0.631163 | 2,902 | 0.917193 | 0 | 0 | 0 | 0 | 0 | 0 | 397 | 0.125474 |
de207e25aa9bca185c57928c53cd749f04d47818 | 2,031 | py | Python | model.py | starinsun/multiagent-particle-envs | 23b1c47fad4d71347ba3de7a5e8cec910f08382d | [
"MIT"
] | null | null | null | model.py | starinsun/multiagent-particle-envs | 23b1c47fad4d71347ba3de7a5e8cec910f08382d | [
"MIT"
] | null | null | null | model.py | starinsun/multiagent-particle-envs | 23b1c47fad4d71347ba3de7a5e8cec910f08382d | [
"MIT"
] | null | null | null | import paddle.fluid as fluid
import parl
from parl import layers
class MAModel(parl.Model):
def __init__(self, act_dim):
self.actor_model = ActorModel(act_dim)
self.critic_model = CriticModel()
def policy(self, obs):
return self.actor_model.policy(obs)
def value(self, obs, act):
... | 27.445946 | 68 | 0.573609 | 1,958 | 0.964057 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.011817 |
de20802d519423344cda6384cb09a94946775ee1 | 724 | py | Python | src/fmWidgets/FmColorEdit.py | ComputerArchitectureGroupPWr/Floorplan-Maker | 8f2922cdab16501d3bb00f93c3130d3f2c593698 | [
"MIT"
] | null | null | null | src/fmWidgets/FmColorEdit.py | ComputerArchitectureGroupPWr/Floorplan-Maker | 8f2922cdab16501d3bb00f93c3130d3f2c593698 | [
"MIT"
] | null | null | null | src/fmWidgets/FmColorEdit.py | ComputerArchitectureGroupPWr/Floorplan-Maker | 8f2922cdab16501d3bb00f93c3130d3f2c593698 | [
"MIT"
] | null | null | null | from PyQt4.QtGui import QPalette, QColor
__author__ = 'pawel'
from PyQt4 import QtGui
from PyQt4.QtCore import Qt
class FmColorEdit(QtGui.QLineEdit):
def __init__(self, parent):
super(FmColorEdit, self).__init__(parent)
self.setReadOnly(True)
def mousePressEvent(self, event):
self.... | 25.857143 | 57 | 0.672652 | 606 | 0.837017 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.009669 |
de269b1d0a4fe87a69767fba8b3e00ccf68b4d65 | 6,543 | py | Python | admin.py | ericholscher/pypi | 4c7c13bd2061d99bbf11a803ac7a7afe3740e365 | [
"BSD-3-Clause"
] | 1 | 2015-11-08T11:31:07.000Z | 2015-11-08T11:31:07.000Z | admin.py | ericholscher/pypi | 4c7c13bd2061d99bbf11a803ac7a7afe3740e365 | [
"BSD-3-Clause"
] | null | null | null | admin.py | ericholscher/pypi | 4c7c13bd2061d99bbf11a803ac7a7afe3740e365 | [
"BSD-3-Clause"
] | null | null | null |
import sys, os, urllib, StringIO, traceback, cgi, binascii, getopt, shutil
import zipfile, gzip, tarfile
#sys.path.append('/usr/local/pypi/lib')
import store, config
def set_password(store, name, pw):
""" Reset the user's password and send an email to the address given.
"""
user = store.get_user(name.str... | 35.367568 | 97 | 0.599419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,850 | 0.282745 |
de26d7fc8c223d9eef08edc2aa50933adc8cafe1 | 1,777 | py | Python | scripts/geodata/address_expansions/equivalence.py | Fillr/libpostal | bce153188aff9fbe65aef12c3c639d8069e707fc | [
"MIT"
] | 3,489 | 2015-03-03T00:21:38.000Z | 2022-03-29T09:03:05.000Z | scripts/geodata/address_expansions/equivalence.py | StephenHildebrand/libpostal | d8c9847c5686a1b66056e65128e1774f060ff36f | [
"MIT"
] | 488 | 2015-05-29T23:04:28.000Z | 2022-03-29T11:20:24.000Z | scripts/geodata/address_expansions/equivalence.py | StephenHildebrand/libpostal | d8c9847c5686a1b66056e65128e1774f060ff36f | [
"MIT"
] | 419 | 2015-11-24T16:53:07.000Z | 2022-03-27T06:51:28.000Z | import random
import re
import six
from itertools import izip
from geodata.address_expansions.gazetteers import *
from geodata.encoding import safe_decode, safe_encode
from geodata.text.normalize import normalized_tokens
from geodata.text.tokenize import tokenize_raw, token_types
from geodata.text.utils import non_br... | 31.175439 | 85 | 0.68655 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 287 | 0.161508 |
de27afb959d2cb13e74aaad06b80a65da178a7e6 | 170 | py | Python | Language Skills/Python/Unit 08 Loops/01 Loops/Step Up 'For's/While Loops/3-While You're at it.py | rhyep/Python_tutorials | f5c8a64b91802b005dfe7dd9035f8d8daae8c3e3 | [
"MIT"
] | 346 | 2016-02-22T20:21:10.000Z | 2022-01-27T20:55:53.000Z | Language Skills/Python/Unit 8/1-Loops/While Loops/3-While You're at it.py | vpstudios/Codecademy-Exercise-Answers | ebd0ee8197a8001465636f52c69592ea6745aa0c | [
"MIT"
] | 55 | 2016-04-07T13:58:44.000Z | 2020-06-25T12:20:24.000Z | Language Skills/Python/Unit 8/1-Loops/While Loops/3-While You're at it.py | vpstudios/Codecademy-Exercise-Answers | ebd0ee8197a8001465636f52c69592ea6745aa0c | [
"MIT"
] | 477 | 2016-02-21T06:17:02.000Z | 2021-12-22T10:08:01.000Z | num = 1
while num <= 10: # Fill in the condition
x = num ** 2# Print num squared
num = num + 1# Increment num (make sure to do this!)
print x
print num
| 21.25 | 56 | 0.594118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.476471 |
de2838f69cfe04090e0142bb22b24b01a4243cd5 | 948 | py | Python | setup.py | povilasb/udptest | 3d16d2e6509e008b37775e7784af54b6edb6633e | [
"MIT"
] | 2 | 2017-11-17T09:10:41.000Z | 2019-09-20T21:50:08.000Z | setup.py | povilasb/udptest | 3d16d2e6509e008b37775e7784af54b6edb6633e | [
"MIT"
] | null | null | null | setup.py | povilasb/udptest | 3d16d2e6509e008b37775e7784af54b6edb6633e | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
def requirements() -> list:
return [
'click==6.7',
'curio==0.8',
]
setup(
name='udptest',
version='0.1.0',
description='UDP benchmarking/testing tool.',
long_description=open('README.rst').read(),
url='https://github.com/povilas... | 25.621622 | 49 | 0.582278 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 451 | 0.475738 |
de28f51f7fb4db9f4c4cfed3b53384caa7188918 | 3,200 | py | Python | ssanchors/utilities.py | IoSR-Surrey/source-separation-anchors | c2c73312bdc7f08f37c088fa3986168813f13799 | [
"MIT"
] | 4 | 2018-07-06T14:35:29.000Z | 2019-08-28T17:13:11.000Z | ssanchors/utilities.py | nd1511/source-separation-anchors | c2c73312bdc7f08f37c088fa3986168813f13799 | [
"MIT"
] | 1 | 2018-06-18T17:08:28.000Z | 2018-06-19T10:45:58.000Z | ssanchors/utilities.py | nd1511/source-separation-anchors | c2c73312bdc7f08f37c088fa3986168813f13799 | [
"MIT"
] | 1 | 2018-11-05T19:56:17.000Z | 2018-11-05T19:56:17.000Z | from __future__ import division
import numpy as np
from untwist import data
from untwist import transforms
def target_accompaniment(target, others, sample_rate=None):
"""
Given a target source and list of 'other' sources, this function returns
the target and accompaniment as untwist.data.audio.Wave objec... | 25.806452 | 78 | 0.64625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,819 | 0.568438 |
de296667231d2bd75b621d94c889fd2ea3b5afb5 | 812 | py | Python | bids_events/Events.py | InstitutoDOr/bids_events | c00d76e1f62e5b647f94609acbc9e173a356aef7 | [
"MIT"
] | null | null | null | bids_events/Events.py | InstitutoDOr/bids_events | c00d76e1f62e5b647f94609acbc9e173a356aef7 | [
"MIT"
] | null | null | null | bids_events/Events.py | InstitutoDOr/bids_events | c00d76e1f62e5b647f94609acbc9e173a356aef7 | [
"MIT"
] | null | null | null | import os
import re
class EventHandler:
def __init__(self, fname, suffix = '_events'):
# Removing extension and suffix (if present)
fname = re.sub( r'\.tsv$', '', fname )
fname = re.sub( suffix + '$', '', fname )
self.__filename = '{}{}.tsv'.format(fname, suffix)
self.trials ... | 31.230769 | 62 | 0.571429 | 792 | 0.975369 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.262315 |
de2bfdafb52bf7f86a472b4af4f49451d709be07 | 87 | py | Python | tests/fixtures/abcd_package/test_a.py | venmo/nose-randomly | 39db5db71a226ffdb6572d5785638e0a16379cfb | [
"BSD-3-Clause"
] | 19 | 2015-07-30T17:27:56.000Z | 2021-08-10T07:19:43.000Z | tests/fixtures/abcd_package/test_a.py | venmo/nose-randomly | 39db5db71a226ffdb6572d5785638e0a16379cfb | [
"BSD-3-Clause"
] | 11 | 2016-02-14T10:33:44.000Z | 2016-10-28T12:38:35.000Z | tests/fixtures/abcd_package/test_a.py | adamchainz/nose-randomly | 8a3fbeaf7cc5452c44da8c7e7573fe89391c8260 | [
"BSD-3-Clause"
] | 4 | 2016-06-01T06:04:46.000Z | 2016-10-26T11:41:53.000Z | from unittest import TestCase
class A(TestCase):
def test_it(self):
pass
| 12.428571 | 29 | 0.666667 | 54 | 0.62069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
de2d96eb9081272f5172b90d540db88b204c04b4 | 427 | py | Python | Python_Challenge_115/6/F.py | LIkelion-at-KOREATECH/LikeLion_Django_Study_Summary | c788182af5bcfd16bdd4b57235a48659758e494b | [
"MIT"
] | 28 | 2019-10-15T13:15:26.000Z | 2021-11-08T08:23:45.000Z | Python_Challenge_115/6/F.py | jhleed/LikeLion_Django_Study_Summary | c788182af5bcfd16bdd4b57235a48659758e494b | [
"MIT"
] | null | null | null | Python_Challenge_115/6/F.py | jhleed/LikeLion_Django_Study_Summary | c788182af5bcfd16bdd4b57235a48659758e494b | [
"MIT"
] | 17 | 2019-09-09T00:15:36.000Z | 2021-01-28T13:08:51.000Z | '''
Statement
Fibonacci numbers are the numbers in the integer sequence starting with 1, 1 where every number after the first two is the sum of the two preceding ones:
1, 1, 2, 3, 5, 8, 13, 21, 34, ...
Given a positive integer n, print the nth Fibonacci number.
Example input
6
Example output
8
'''
num = int(input()... | 18.565217 | 153 | 0.676815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 302 | 0.70726 |
de2edc2bbe1eee14e878fa5bd6b3104c3a6af8ad | 144 | py | Python | test/test_sum_up.py | marco-a-wagner/nirvana | 325756ec5f208994767b4909ed217ce716f5fcfb | [
"CC0-1.0"
] | null | null | null | test/test_sum_up.py | marco-a-wagner/nirvana | 325756ec5f208994767b4909ed217ce716f5fcfb | [
"CC0-1.0"
] | null | null | null | test/test_sum_up.py | marco-a-wagner/nirvana | 325756ec5f208994767b4909ed217ce716f5fcfb | [
"CC0-1.0"
] | null | null | null | from src.sum_up import *
def test_sum_up():
x = 1
y = 2
assert sum_up(x,y) == 3
def test_sum_up3():
assert sum_up3(1,2,3) == 6 | 16 | 30 | 0.583333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
de2ffb901bbfbc3af2061583ab91b8842066be1f | 1,376 | py | Python | cluster.py | YektaDmrc/UW_GEMSEC | b9e0c995e34f098fdb607fa35a3fe47663839086 | [
"MIT"
] | 1 | 2018-07-10T23:37:47.000Z | 2018-07-10T23:37:47.000Z | cluster.py | YektaDmrc/UW_GEMSEC | b9e0c995e34f098fdb607fa35a3fe47663839086 | [
"MIT"
] | null | null | null | cluster.py | YektaDmrc/UW_GEMSEC | b9e0c995e34f098fdb607fa35a3fe47663839086 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Jul 13 15:38:11 2018
@author: Yekta
"""
import csv
import numpy as np
from sklearn.cluster import KMeans
clon = list(csv.reader(open("C:/Users/Yekta/Desktop/stajvol3/MoS2BP Binding Characterization_07-11-17_DY.csv")))
for k in range(1,15):
fin=[]
for m i... | 32.761905 | 130 | 0.588663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 359 | 0.260901 |
de319a3d0a027f8b448c09d0528c44c359822d8e | 1,440 | py | Python | test_collision/test_discretedynamicsworld.py | Klumhru/boost-python-bullet | d9ffae09157280f60cb469d8c9c9fa4c1920e3ce | [
"MIT"
] | 2 | 2015-09-16T15:24:39.000Z | 2015-11-18T11:53:51.000Z | test_collision/test_discretedynamicsworld.py | Klumhru/boost-python-bullet | d9ffae09157280f60cb469d8c9c9fa4c1920e3ce | [
"MIT"
] | 1 | 2018-04-04T15:33:20.000Z | 2018-04-04T15:33:20.000Z | test_collision/test_discretedynamicsworld.py | Klumhru/boost-python-bullet | d9ffae09157280f60cb469d8c9c9fa4c1920e3ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_collision.test_discretedynamicsworld
"""
from __future__ import unicode_literals, print_function, absolute_import
import unittest
import bullet
from .test_worlds import WorldTestDataMixin
class DiscreteDynamicsWorldTestCase(WorldTestDataMixin,
... | 28.8 | 72 | 0.634028 | 1,191 | 0.827083 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.064583 |
de31e808778594864eecf61a23f3d4e16b0f2a4b | 820 | py | Python | force_wfmanager/notifications/tests/test_ui_notification_hooks_factory.py | force-h2020/force-wfmanager | bcd488cd37092cacd9d0c81b544ee8c1654d1d92 | [
"BSD-2-Clause"
] | 1 | 2019-08-19T16:02:20.000Z | 2019-08-19T16:02:20.000Z | force_wfmanager/notifications/tests/test_ui_notification_hooks_factory.py | force-h2020/force-wfmanager | bcd488cd37092cacd9d0c81b544ee8c1654d1d92 | [
"BSD-2-Clause"
] | 396 | 2017-07-18T15:19:55.000Z | 2021-05-03T06:23:06.000Z | force_wfmanager/notifications/tests/test_ui_notification_hooks_factory.py | force-h2020/force-wfmanager | bcd488cd37092cacd9d0c81b544ee8c1654d1d92 | [
"BSD-2-Clause"
] | 2 | 2019-03-05T16:23:10.000Z | 2020-04-16T08:59:11.000Z | # (C) Copyright 2010-2020 Enthought, Inc., Austin, TX
# All rights reserved.
import unittest
from force_wfmanager.notifications.ui_notification_hooks_manager \
import \
UINotificationHooksManager
from force_wfmanager.notifications.ui_notification_plugin import \
UINotificationPlugin
class TestUINotifi... | 31.538462 | 68 | 0.74878 | 517 | 0.630488 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.093902 |
de31ea78bbeb185adcdcced18fcb297d6af4dc71 | 447 | py | Python | phrasebook/middleware.py | DanCatchpole/phrasebook-django | 4f85ec40626cbb97c659448ee06f2291c8f2918b | [
"MIT"
] | 1 | 2020-11-10T17:31:56.000Z | 2020-11-10T17:31:56.000Z | phrasebook/middleware.py | DanCatchpole/phrasebook-django | 4f85ec40626cbb97c659448ee06f2291c8f2918b | [
"MIT"
] | null | null | null | phrasebook/middleware.py | DanCatchpole/phrasebook-django | 4f85ec40626cbb97c659448ee06f2291c8f2918b | [
"MIT"
] | null | null | null | from django.shortcuts import redirect
from .models import UserLanguage
class FirstLoginMiddleware(object):
def process_request(self, request):
if request.user.is_authenticated:
langs = UserLanguage.objects.filter(user=request.user)
if langs.__len__() == 0:
return r... | 27.9375 | 66 | 0.680089 | 372 | 0.832215 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.053691 |
de346180214f310ac4c427bc250a7eb3f75732e4 | 113 | py | Python | PROGATE/PYTHON_I_page07.py | vox256/Codes | c408ef0fbc25af46dacef93b3496985feb98dd5c | [
"MIT"
] | null | null | null | PROGATE/PYTHON_I_page07.py | vox256/Codes | c408ef0fbc25af46dacef93b3496985feb98dd5c | [
"MIT"
] | null | null | null | PROGATE/PYTHON_I_page07.py | vox256/Codes | c408ef0fbc25af46dacef93b3496985feb98dd5c | [
"MIT"
] | null | null | null | money = 2000
print(money)
# 変数moneyに5000を足して、変数moneyを上書きしてください
money += 5000
# 変数moneyの値を出力してください
print (money) | 14.125 | 36 | 0.787611 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.681564 |
de3486ad1b0724a14e6330a44ee92a956bf5ee2e | 380 | py | Python | quokka/modules/accounts/views.py | yencchen/quokka_epus | d64aeb9c5ca59ee4bdcd84381f9bb0504680f5f5 | [
"MIT"
] | null | null | null | quokka/modules/accounts/views.py | yencchen/quokka_epus | d64aeb9c5ca59ee4bdcd84381f9bb0504680f5f5 | [
"MIT"
] | null | null | null | quokka/modules/accounts/views.py | yencchen/quokka_epus | d64aeb9c5ca59ee4bdcd84381f9bb0504680f5f5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import redirect, request, url_for
from flask.views import MethodView
from flask.ext.security import current_user
class SwatchView(MethodView):
"""
change the bootswatch theme
"""
def post(self):
current_user.set_swatch(request.form.get... | 22.352941 | 59 | 0.692105 | 206 | 0.542105 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.284211 |
de34fea664d85474bd07e69ca7917ce3402fb32e | 142 | py | Python | nolina/__init__.py | JohnReid/nolina | 23894517ac60d27d167447871ef85a4a78cad630 | [
"MIT"
] | null | null | null | nolina/__init__.py | JohnReid/nolina | 23894517ac60d27d167447871ef85a4a78cad630 | [
"MIT"
] | null | null | null | nolina/__init__.py | JohnReid/nolina | 23894517ac60d27d167447871ef85a4a78cad630 | [
"MIT"
] | null | null | null | """Randomised linear algebra."""
import numpy.linalg as la
def normalise(v):
norm = la.norm(v)
return v if 0 == norm else v / norm
| 15.777778 | 39 | 0.640845 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.225352 |
de35289eea69e5ceb7febfc7fa32b43c5609a79c | 887 | py | Python | src/commands/reload.py | zaanposni/umfrageBot | 3e19dc0629cde394da2ae8706e6e043b4e87059d | [
"MIT"
] | 6 | 2019-08-15T20:19:38.000Z | 2021-02-28T21:33:19.000Z | src/commands/reload.py | zaanposni/umfrageBot | 3e19dc0629cde394da2ae8706e6e043b4e87059d | [
"MIT"
] | 31 | 2019-08-14T08:42:08.000Z | 2020-05-07T13:43:43.000Z | src/commands/reload.py | zaanposni/umfrageBot | 3e19dc0629cde394da2ae8706e6e043b4e87059d | [
"MIT"
] | 5 | 2019-08-17T13:39:53.000Z | 2020-04-01T07:25:51.000Z | from bt_utils.console import Console
from bt_utils.config import cfg
from bt_utils.embed_templates import SuccessEmbed, WarningEmbed
from bt_utils.handle_sqlite import DatabaseHandler
SHL = Console('BundestagsBot Reload')
DB = DatabaseHandler()
settings = {
'name': 'reload',
'channels': ['team'],
'mod_cmd... | 27.71875 | 92 | 0.713641 | 0 | 0 | 0 | 0 | 0 | 0 | 554 | 0.624577 | 278 | 0.313416 |
de3555aacf51f612d0e7cb4e5d614fc7db59f6c9 | 4,022 | py | Python | scanner.py | Darchiv/scambus | 0a81a67b76a5ec5117d56a4c05c4392696eb3f06 | [
"MIT"
] | 22 | 2015-08-21T11:58:20.000Z | 2021-12-28T04:50:05.000Z | scanner.py | Darchiv/scambus | 0a81a67b76a5ec5117d56a4c05c4392696eb3f06 | [
"MIT"
] | 5 | 2017-02-26T14:22:53.000Z | 2021-02-11T00:47:48.000Z | scanner.py | Darchiv/scambus | 0a81a67b76a5ec5117d56a4c05c4392696eb3f06 | [
"MIT"
] | 14 | 2015-04-13T08:02:18.000Z | 2021-12-16T14:08:54.000Z | #! /usr/bin/env python2.7
import getopt, sys, time, util
from wmbus import WMBusFrame
from Crypto.Cipher import AES
def main(argv):
samplefile = ''
interface = '/dev/ttyUSB3'
usagetext = 'scanner.py -hv -i <interface>'
verbosity = 0
# setup known keys dictionarry by their device id
... | 31.421875 | 92 | 0.458478 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,759 | 0.437345 |
de35b41f521bfe20dfbbf60f134cdbe2d7425715 | 2,080 | py | Python | pyy1/.pycharm_helpers/python_stubs/-1550516950/gi/_gi/BaseInfo.py | pyy1988/pyy_test1 | 6bea878409e658aa87441384419be51aaab061e7 | [
"Apache-2.0"
] | null | null | null | pyy1/.pycharm_helpers/python_stubs/-1550516950/gi/_gi/BaseInfo.py | pyy1988/pyy_test1 | 6bea878409e658aa87441384419be51aaab061e7 | [
"Apache-2.0"
] | null | null | null | pyy1/.pycharm_helpers/python_stubs/-1550516950/gi/_gi/BaseInfo.py | pyy1988/pyy_test1 | 6bea878409e658aa87441384419be51aaab061e7 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
# module gi._gi
# from /usr/lib/python3/dist-packages/gi/_gi.cpython-35m-x86_64-linux-gnu.so
# by generator 1.145
# no doc
# imports
import _gobject as _gobject # <module '_gobject'>
import _glib as _glib # <module '_glib'>
import gi as __gi
import gobject as __gobject
from .object import object
c... | 25.679012 | 76 | 0.610577 | 1,758 | 0.845192 | 0 | 0 | 0 | 0 | 0 | 0 | 831 | 0.399519 |
de3618687057494d918d8f6f783dfd78edbb7ce5 | 828 | py | Python | setup.py | ntamas/python-selecta | bc9a11f288df427ceb126aa994ac3810685e2d94 | [
"MIT"
] | 1 | 2019-02-21T14:47:40.000Z | 2019-02-21T14:47:40.000Z | setup.py | ntamas/python-selecta | bc9a11f288df427ceb126aa994ac3810685e2d94 | [
"MIT"
] | 2 | 2015-07-11T03:32:35.000Z | 2015-08-26T09:29:40.000Z | setup.py | ntamas/python-selecta | bc9a11f288df427ceb126aa994ac3810685e2d94 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from selecta import __version__
from setuptools import setup
options = dict(
name='python-selecta',
version=__version__,
url='http://github.com/ntamas/python-selecta',
description='Python port of @garybernhardt/selecta',
license='MIT',
author='T... | 20.195122 | 56 | 0.607488 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 405 | 0.48913 |
de37ff05a0046e06ac61cbc292e777a426c175fb | 525 | py | Python | graphsaint/setup.py | alexs131/GraphSAINT | 20ac0dce1bdad0505b98ab117aaca84d1aa0bcd8 | [
"MIT"
] | null | null | null | graphsaint/setup.py | alexs131/GraphSAINT | 20ac0dce1bdad0505b98ab117aaca84d1aa0bcd8 | [
"MIT"
] | null | null | null | graphsaint/setup.py | alexs131/GraphSAINT | 20ac0dce1bdad0505b98ab117aaca84d1aa0bcd8 | [
"MIT"
] | null | null | null | # cython: language_level=3
from distutils.core import setup, Extension
from Cython.Build import cythonize
import numpy
# import cython_utils
import os
os.environ["CC"] = "/opt/homebrew/Cellar/gcc/11.2.0_3/bin/g++-11"
os.environ["CXX"] = "/opt/homebrew/Cellar/gcc/11.2.0_3/bin/g++-11"
setup(ext_modules=cython... | 37.5 | 93 | 0.737143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 297 | 0.565714 |
de3854551e9e60f025c395d03bedb3f5b3cb6f38 | 4,958 | py | Python | models/get_networks.py | kingqiuol/pytorch-template | 8bc78f996fbbc15ae54a3055cd3d33199b4a96d8 | [
"MIT"
] | null | null | null | models/get_networks.py | kingqiuol/pytorch-template | 8bc78f996fbbc15ae54a3055cd3d33199b4a96d8 | [
"MIT"
] | null | null | null | models/get_networks.py | kingqiuol/pytorch-template | 8bc78f996fbbc15ae54a3055cd3d33199b4a96d8 | [
"MIT"
] | null | null | null | import sys
def get_network(args):
""" return given network
"""
if args.MODEL.NAME == 'vgg16':
from models.vgg import vgg16_bn
net = vgg16_bn()
elif args.MODEL.NAME == 'vgg13':
from models.vgg import vgg13_bn
net = vgg13_bn()
elif args.MODEL.NAME == 'vgg11':
from models.vgg import vgg11_bn
net = vgg11... | 32.834437 | 65 | 0.740621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 661 | 0.13332 |
de38b348a7c3f728ca43e602a33e53edfd8f033d | 10,812 | py | Python | tests/eth2/beacon/state_machines/forks/test_serenity_block_attestation_validation.py | hwwhww/trinity | 614b083a637c665f84b1af228541f37c25d9c665 | [
"MIT"
] | 2 | 2020-01-30T21:51:00.000Z | 2020-07-22T14:51:05.000Z | tests/eth2/beacon/state_machines/forks/test_serenity_block_attestation_validation.py | hwwhww/trinity | 614b083a637c665f84b1af228541f37c25d9c665 | [
"MIT"
] | null | null | null | tests/eth2/beacon/state_machines/forks/test_serenity_block_attestation_validation.py | hwwhww/trinity | 614b083a637c665f84b1af228541f37c25d9c665 | [
"MIT"
] | null | null | null | import pytest
from hypothesis import (
given,
settings,
strategies as st,
)
from eth_utils import (
ValidationError,
)
from eth.constants import (
ZERO_HASH32,
)
from eth2.beacon.committee_helpers import (
get_crosslink_committees_at_slot,
)
from eth2.beacon.state_machines.forks.serenity.block... | 31.068966 | 117 | 0.561321 | 0 | 0 | 0 | 0 | 9,976 | 0.922679 | 0 | 0 | 1,502 | 0.13892 |
de3966c1044750e98c8968c82831f55e24112044 | 13,679 | py | Python | SeqtaSDSBridge.py | jacobcurulli/SeqtaSDSBridge | 19b8da95462d1e0aa8a059c9f8075d8f7ce1b417 | [
"CC-BY-4.0"
] | null | null | null | SeqtaSDSBridge.py | jacobcurulli/SeqtaSDSBridge | 19b8da95462d1e0aa8a059c9f8075d8f7ce1b417 | [
"CC-BY-4.0"
] | 1 | 2021-05-21T04:52:28.000Z | 2021-05-21T05:00:10.000Z | SeqtaSDSBridge.py | jacobcurulli/SeqtaSDSBridge | 19b8da95462d1e0aa8a059c9f8075d8f7ce1b417 | [
"CC-BY-4.0"
] | 1 | 2021-04-07T13:50:43.000Z | 2021-04-07T13:50:43.000Z | ###########################################################################################################
###########################################################################################################
## SeqtaToSDS ... | 45.445183 | 185 | 0.635865 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,920 | 0.43278 |
de3b514aae1619036f4e6044f0e8e9c86052e8a3 | 457 | py | Python | Chapter 1/imtools.py | ai-distill/PythonVisionProgramming | 15a432b34d4ca43ab0a0bc765dbcaa9bc8de3d8e | [
"Apache-2.0"
] | null | null | null | Chapter 1/imtools.py | ai-distill/PythonVisionProgramming | 15a432b34d4ca43ab0a0bc765dbcaa9bc8de3d8e | [
"Apache-2.0"
] | null | null | null | Chapter 1/imtools.py | ai-distill/PythonVisionProgramming | 15a432b34d4ca43ab0a0bc765dbcaa9bc8de3d8e | [
"Apache-2.0"
] | null | null | null | """
存储一些经常使用的图像操作
"""
import os
from PIL import Image
from numpy import *
def get_imlist(path):
"""
返回目录中所有JPG图像的文件名列表
:param path:
:return:
"""
return [os.path.join(path, f) for f in os.listdir(path) if f.endswith('.jpg')]
def imresize(im, sz):
"""
图像缩放
:param im: 图像对应的数据
:pa... | 16.925926 | 82 | 0.610503 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.486388 |
de3ba9c03d6171d2fbdd34396181dfc69aedd8a7 | 5,190 | py | Python | cart/views.py | lbacon17/lb-fitness | 16f78841c834ca0e45317285b6c3b05ad97501f6 | [
"W3C"
] | null | null | null | cart/views.py | lbacon17/lb-fitness | 16f78841c834ca0e45317285b6c3b05ad97501f6 | [
"W3C"
] | null | null | null | cart/views.py | lbacon17/lb-fitness | 16f78841c834ca0e45317285b6c3b05ad97501f6 | [
"W3C"
] | 1 | 2021-03-31T10:55:51.000Z | 2021-03-31T10:55:51.000Z | from django.shortcuts import (
render, redirect, reverse, get_object_or_404, HttpResponse)
from django.contrib import messages
from shop.models import Product
from members.models import Member
def load_cart(request):
"""This view render's the user's cart contents"""
return render(request, 'cart/cart.html'... | 41.854839 | 79 | 0.559152 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,755 | 0.33815 |
de3d6c63aa40e3dc9ff43cbc7c4deca001d8d40e | 172 | py | Python | runserver.py | revalo/hush.mit.edu | e47c28c934dcfb94c52f6e12367869389e8ed7a8 | [
"MIT"
] | 21 | 2017-10-30T20:55:48.000Z | 2021-09-03T14:06:58.000Z | runserver.py | revalo/hush.mit.edu | e47c28c934dcfb94c52f6e12367869389e8ed7a8 | [
"MIT"
] | 1 | 2021-11-08T02:05:34.000Z | 2021-11-08T06:54:41.000Z | runserver.py | revalo/hush.mit.edu | e47c28c934dcfb94c52f6e12367869389e8ed7a8 | [
"MIT"
] | 3 | 2017-11-15T23:18:00.000Z | 2018-01-01T06:44:03.000Z | from confess import app
from confess.config import PORT, DEBUG
if __name__ == '__main__':
app.run(
host='0.0.0.0',
port=PORT,
debug=DEBUG
) | 19.111111 | 38 | 0.593023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.110465 |
de3daa1f9c197f223b8adf05ac9c7b5634367d5c | 5,945 | py | Python | bin/plot_examples/plot_vars_barchart.py | gonzalorodrigo/ScSFWorkload | 2301dacf486df8ed783c0ba33cbbde6e9978c17e | [
"BSD-3-Clause-LBNL"
] | 1 | 2019-03-18T18:27:49.000Z | 2019-03-18T18:27:49.000Z | bin/plot_examples/plot_vars_barchart.py | gonzalorodrigo/ScSFWorkload | 2301dacf486df8ed783c0ba33cbbde6e9978c17e | [
"BSD-3-Clause-LBNL"
] | 1 | 2020-12-17T21:33:15.000Z | 2020-12-17T21:35:41.000Z | bin/plot_examples/plot_vars_barchart.py | gonzalorodrigo/ScSFWorkload | 2301dacf486df8ed783c0ba33cbbde6e9978c17e | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-01-05T08:23:20.000Z | 2021-01-05T08:23:20.000Z | """ Plots analysis on the workflow variables for experiments with different
workflow types and different %of workflow core hours in the workload.
Resuls are plotted as barchars that show how much the vas deviate in
single and multi from aware.
"""
import matplotlib
from orchestration import get_central_db
from orches... | 36.030303 | 75 | 0.518923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,671 | 0.281077 |
de3df638310dcbe32c189284547dca83d1fe51a7 | 410 | py | Python | devpotato_bot/commands/daily_titles/models/inevitable_title.py | cl0ne/cryptopotato-bot | af62d794adffe186a4f6a4b0aa7ecd4f7e8700a1 | [
"MIT"
] | 1 | 2021-05-15T23:41:29.000Z | 2021-05-15T23:41:29.000Z | devpotato_bot/commands/daily_titles/models/inevitable_title.py | cl0ne/cryptopotato-bot | af62d794adffe186a4f6a4b0aa7ecd4f7e8700a1 | [
"MIT"
] | 1 | 2022-02-19T20:38:33.000Z | 2022-02-19T23:53:39.000Z | devpotato_bot/commands/daily_titles/models/inevitable_title.py | cl0ne/cryptopotato-bot | af62d794adffe186a4f6a4b0aa7ecd4f7e8700a1 | [
"MIT"
] | 1 | 2021-05-15T23:42:21.000Z | 2021-05-15T23:42:21.000Z | from __future__ import annotations
from .title import TitleFromGroupChat, Base
class InevitableTitle(TitleFromGroupChat):
__tablename__ = f'{Base.TABLENAME_PREFIX}inevitable_titles'
__group_chat_back_populates__ = 'inevitable_titles'
def __repr__(self):
return ('<InevitableTitle('
... | 27.333333 | 63 | 0.660976 | 327 | 0.797561 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.32439 |
de3e64921cbcc4e464aa3d32a70cc4b3179f2705 | 1,034 | py | Python | matplotlib/gas_price_overtime.py | MatveiAleksandrovich/Artificial-Intelligence | d3d6f253e7c2256f6f9d490b077bdb50ca1da229 | [
"MIT"
] | null | null | null | matplotlib/gas_price_overtime.py | MatveiAleksandrovich/Artificial-Intelligence | d3d6f253e7c2256f6f9d490b077bdb50ca1da229 | [
"MIT"
] | null | null | null | matplotlib/gas_price_overtime.py | MatveiAleksandrovich/Artificial-Intelligence | d3d6f253e7c2256f6f9d490b077bdb50ca1da229 | [
"MIT"
] | null | null | null | import requests
import pandas as pd
import matplotlib.pyplot as plt
url_gas_data = 'https://raw.githubusercontent.com/KeithGalli/matplotlib_tutorial/master/gas_prices.csv'
res1 = requests.get(url_gas_data, allow_redirects=True)
with open('gas_prices.csv', 'wb') as file:
file.write(res1.content)
plt.figure(figsiz... | 23.5 | 103 | 0.698259 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 511 | 0.494197 |
de40955063f239619674a2b5ecbf4dbaa910621e | 2,305 | py | Python | integration_tests/test_surveys.py | ONSdigital/sdx-tester | df193867c0d5e9dbf39790c85c41b07a9efed756 | [
"MIT"
] | null | null | null | integration_tests/test_surveys.py | ONSdigital/sdx-tester | df193867c0d5e9dbf39790c85c41b07a9efed756 | [
"MIT"
] | null | null | null | integration_tests/test_surveys.py | ONSdigital/sdx-tester | df193867c0d5e9dbf39790c85c41b07a9efed756 | [
"MIT"
] | null | null | null | import unittest
import uuid
from app import survey_loader
from app import message_manager
from app.tester import run_survey
class TestSurveys(unittest.TestCase):
@classmethod
def setUpClass(cls):
message_manager.start()
@classmethod
def tearDownClass(cls):
message_manager.stop()
... | 37.786885 | 109 | 0.572668 | 2,177 | 0.944469 | 0 | 0 | 140 | 0.060738 | 0 | 0 | 407 | 0.176573 |
de42aa506b54f4487685cb532dc908e5f790e4a5 | 509 | py | Python | shared/app_business_logic.py | c-w/python-loadtests | 3ffd3dc89780b9372a5d20a71b2becec121ff3d2 | [
"Apache-2.0"
] | 2 | 2020-02-12T23:03:09.000Z | 2020-02-12T23:09:42.000Z | shared/app_business_logic.py | c-w/python-loadtests | 3ffd3dc89780b9372a5d20a71b2becec121ff3d2 | [
"Apache-2.0"
] | null | null | null | shared/app_business_logic.py | c-w/python-loadtests | 3ffd3dc89780b9372a5d20a71b2becec121ff3d2 | [
"Apache-2.0"
] | null | null | null | from os import environ
from azure.storage.table import TableService
azure_account_name = environ['AZURE_ACCOUNT_NAME']
azure_account_key = environ['AZURE_ACCOUNT_KEY']
azure_table_name = environ['AZURE_TABLE_NAME']
table = TableService(azure_account_name, azure_account_key)
get_entity = table.get_entity
def fetch_v... | 28.277778 | 65 | 0.776031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.139489 |
de44446f8526c9f2e48dd37b76b2ac71ae33e71b | 3,424 | py | Python | csrank/dataset_reader/objectranking/letor_object_ranking_dataset_reader.py | hytsang/cs-ranking | 241626a6a100a27b96990b4f199087a6dc50dcc0 | [
"Apache-2.0"
] | null | null | null | csrank/dataset_reader/objectranking/letor_object_ranking_dataset_reader.py | hytsang/cs-ranking | 241626a6a100a27b96990b4f199087a6dc50dcc0 | [
"Apache-2.0"
] | null | null | null | csrank/dataset_reader/objectranking/letor_object_ranking_dataset_reader.py | hytsang/cs-ranking | 241626a6a100a27b96990b4f199087a6dc50dcc0 | [
"Apache-2.0"
] | 1 | 2018-10-30T08:57:14.000Z | 2018-10-30T08:57:14.000Z | import logging
import h5py
import numpy as np
from sklearn.utils import check_random_state
from csrank.constants import OBJECT_RANKING
from csrank.dataset_reader.letor_dataset_reader import LetorDatasetReader
from csrank.dataset_reader.objectranking.util import sub_sampling
NAME = "LetorObjectRankingDatasetReader"
... | 39.356322 | 104 | 0.629965 | 2,445 | 0.714077 | 0 | 0 | 0 | 0 | 0 | 0 | 761 | 0.222255 |
de44c06366bdb1cf83f5f3bb8ad925cefb959cf0 | 1,222 | py | Python | app/wqFull/dev/trans.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | null | null | null | app/wqFull/dev/trans.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | null | null | null | app/wqFull/dev/trans.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | 2 | 2021-04-04T02:45:59.000Z | 2022-03-19T09:41:39.000Z | from sklearn.preprocessing import QuantileTransformer, PowerTransformer
from hydroDL.data import usgs, gageII, gridMET, ntn, GLASS, transform, dbBasin
import numpy as np
import matplotlib.pyplot as plt
from hydroDL.post import axplot, figplot
from hydroDL import kPath
import json
import os
import importlib
importlib.re... | 25.458333 | 78 | 0.714403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.139116 |
de463062073e4c38b0ef746845b5c9b821ed145e | 659 | py | Python | pysad/statistics/__init__.py | selimfirat/pysad | dff2ff38258eb8a85c9d34cf5f0b876fc1dc9ede | [
"BSD-3-Clause"
] | 155 | 2020-08-17T12:52:38.000Z | 2022-03-19T02:59:26.000Z | pysad/statistics/__init__.py | shubhsoni/pysad | dff2ff38258eb8a85c9d34cf5f0b876fc1dc9ede | [
"BSD-3-Clause"
] | 2 | 2020-10-22T09:50:28.000Z | 2021-02-15T02:01:44.000Z | pysad/statistics/__init__.py | shubhsoni/pysad | dff2ff38258eb8a85c9d34cf5f0b876fc1dc9ede | [
"BSD-3-Clause"
] | 14 | 2020-10-09T17:08:23.000Z | 2022-03-25T11:30:12.000Z | """
The :mod:`pysad.statistics` module contains methods to keep track of statistics on streaming data.
"""
from .abs_statistic import AbsStatistic
from .average_meter import AverageMeter
from .count_meter import CountMeter
from .max_meter import MaxMeter
from .median_meter import MedianMeter
from .min_meter import MinM... | 41.1875 | 163 | 0.814871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 239 | 0.362671 |
de481c317eb312cc809e4b8eb2f8383abd96ba97 | 324 | py | Python | src/elrados/views.py | IamShobe/elrados | dd2523e1523591c7a3213dfd062b376f41bb9f18 | [
"MIT"
] | 2 | 2018-07-20T11:03:42.000Z | 2019-06-06T06:00:12.000Z | src/elrados/views.py | IamShobe/elrados | dd2523e1523591c7a3213dfd062b376f41bb9f18 | [
"MIT"
] | null | null | null | src/elrados/views.py | IamShobe/elrados | dd2523e1523591c7a3213dfd062b376f41bb9f18 | [
"MIT"
] | 2 | 2018-12-18T16:00:34.000Z | 2019-04-08T14:29:02.000Z | """Global index view."""
import pkg_resources
from django.shortcuts import render
def index(request):
"""Basic view."""
plugins = \
[plugin.load() for plugin in
pkg_resources.iter_entry_points(group='elrados.plugins')]
return render(request, "index.html", {
"plugins": plugins
... | 21.6 | 66 | 0.641975 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.243827 |
de48207667680d4095ac834e7b25417f0ab4f83a | 2,274 | py | Python | examples/old/zipline_momentun.py | sherrytp/TradingEvolved | 4bc9cc18244954bff37a80f67cce658bd0802b5d | [
"Apache-2.0"
] | null | null | null | examples/old/zipline_momentun.py | sherrytp/TradingEvolved | 4bc9cc18244954bff37a80f67cce658bd0802b5d | [
"Apache-2.0"
] | null | null | null | examples/old/zipline_momentun.py | sherrytp/TradingEvolved | 4bc9cc18244954bff37a80f67cce658bd0802b5d | [
"Apache-2.0"
] | 1 | 2022-03-26T07:11:18.000Z | 2022-03-26T07:11:18.000Z | import pandas as pd
import matplotlib.pyplot as plt
from zipline.finance.commission import PerShare
from zipline.api import set_commission, symbol, order_target_percent
import zipline
from models.live_momentum import LiveMomentum
with open('/Users/landey/Desktop/Eonum/live_model/eouniverse/stock_list.txt', 'r') as f... | 30.72973 | 95 | 0.647757 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 149 | 0.065523 |
de4860345de948d81c21b1062677ea640e28f033 | 10,120 | py | Python | packages/robotControl/scripts/intercept.py | Falcons-Robocup/code | 2281a8569e7f11cbd3238b7cc7341c09e2e16249 | [
"Apache-2.0"
] | 2 | 2021-01-15T13:27:19.000Z | 2021-08-04T08:40:52.000Z | packages/robotControl/scripts/intercept.py | Falcons-Robocup/code | 2281a8569e7f11cbd3238b7cc7341c09e2e16249 | [
"Apache-2.0"
] | null | null | null | packages/robotControl/scripts/intercept.py | Falcons-Robocup/code | 2281a8569e7f11cbd3238b7cc7341c09e2e16249 | [
"Apache-2.0"
] | 5 | 2018-05-01T10:39:31.000Z | 2022-03-25T03:02:35.000Z | # Copyright 2020 Jan Feitsma (Falcons)
# SPDX-License-Identifier: Apache-2.0
#!/usr/bin/env python3
# Jan Feitsma, March 2020
# Robot will continuously intercept around current position.
#
# For description and usage hints, execute with '-h'
import sys, os
import time
import logging, signal
logging.basicConfig(leve... | 42.700422 | 305 | 0.619368 | 7,154 | 0.706917 | 0 | 0 | 0 | 0 | 0 | 0 | 3,306 | 0.32668 |
de4f135b4907a9ad1ee036150f5775fba0b81256 | 4,859 | py | Python | arpym/tools/plc.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | 6 | 2021-04-10T13:24:30.000Z | 2022-03-26T08:20:42.000Z | arpym/tools/plc.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | null | null | null | arpym/tools/plc.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | 6 | 2019-08-13T22:02:17.000Z | 2022-02-09T17:49:12.000Z | # -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec, GridSpecFromSubplotSpec
from matplotlib.ticker import FuncFormatter
def tick_label_func(y, pos=None):
return '%1.f' % (5 * y * 1e-2 // 5)
def tick_label_func_1(y, pos=None):
return '%0.0f' ... | 35.210145 | 106 | 0.61844 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 791 | 0.162791 |