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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3975e522eae96a6443ccb6146ef3bb31b2d6df06 | 1,320 | py | Python | examples/bruker_processed_1d/bruker_processed_1d.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 150 | 2015-01-16T12:24:13.000Z | 2022-03-03T18:01:18.000Z | examples/bruker_processed_1d/bruker_processed_1d.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 129 | 2015-01-13T04:58:56.000Z | 2022-03-02T13:39:16.000Z | examples/bruker_processed_1d/bruker_processed_1d.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 88 | 2015-02-16T20:04:12.000Z | 2022-03-10T06:50:30.000Z | #! /usr/bin/env python
"""
Compare bruker read_pdata to read.
"""
import nmrglue as ng
import matplotlib.pyplot as plt
# read in the data
data_dir = "data/bruker_exp/1/pdata/1"
# From pre-procced data.
dic, data = ng.bruker.read_pdata(data_dir, scale_data=True)
udic = ng.bruker.guess_udic(dic, data)
uc = ng.fileiob... | 28.085106 | 71 | 0.712121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 481 | 0.364394 |
397645cb5f3148b59ab74fb77253d9299c79d101 | 4,404 | py | Python | tests/unit/test_posts_get_logic.py | claranet-ch/aws-sam-application-template-python | b835ef9295e4820110fd53f50619e4fea7493155 | [
"CC-BY-4.0"
] | null | null | null | tests/unit/test_posts_get_logic.py | claranet-ch/aws-sam-application-template-python | b835ef9295e4820110fd53f50619e4fea7493155 | [
"CC-BY-4.0"
] | null | null | null | tests/unit/test_posts_get_logic.py | claranet-ch/aws-sam-application-template-python | b835ef9295e4820110fd53f50619e4fea7493155 | [
"CC-BY-4.0"
] | null | null | null | import io
import os
import unittest
import boto3
from botocore.response import StreamingBody
from botocore.stub import Stubber
from functions.posts_get.posts_get_logic import posts_get_logic
class GetSomethingLogicTest(unittest.TestCase):
def setUp(self):
# https://docs.python.org/3/library/unittest.htm... | 35.516129 | 84 | 0.449818 | 4,208 | 0.955495 | 0 | 0 | 0 | 0 | 0 | 0 | 1,613 | 0.366258 |
3978056ea17d8290a8897ffe9ef1bc60af963d5f | 21,050 | py | Python | firepy/model/geometry.py | KBeno/firefly-lca | a081b05f5d66951792bd00d2bb6ae1f8e43235e0 | [
"MIT"
] | 3 | 2020-06-16T13:39:31.000Z | 2022-01-10T09:34:52.000Z | firepy/model/geometry.py | KBeno/boblica | a081b05f5d66951792bd00d2bb6ae1f8e43235e0 | [
"MIT"
] | null | null | null | firepy/model/geometry.py | KBeno/boblica | a081b05f5d66951792bd00d2bb6ae1f8e43235e0 | [
"MIT"
] | null | null | null | from typing import Union, List
import copy
import math
import numpy as np
"""
Principles:
- geometry objects are defined by the minimum required information
- Points are made of coordinates (floats), everything else is based on Points except for Vectors
"""
class Point:
def __init__(self, x: float, y: float, ... | 34.850993 | 113 | 0.526366 | 18,744 | 0.890409 | 0 | 0 | 0 | 0 | 0 | 0 | 3,782 | 0.179659 |
3978db58ab61262a3273d3565d293223c2d9c041 | 556 | py | Python | danmu/log.py | awesome-archive/danmu | 2f4e943d859cecd31b289e21984e35a34515b71f | [
"WTFPL"
] | null | null | null | danmu/log.py | awesome-archive/danmu | 2f4e943d859cecd31b289e21984e35a34515b71f | [
"WTFPL"
] | null | null | null | danmu/log.py | awesome-archive/danmu | 2f4e943d859cecd31b289e21984e35a34515b71f | [
"WTFPL"
] | null | null | null | import os, logging
if not os.path.exists('config'): os.mkdir('config')
log = logging.getLogger('danmu')
log.setLevel(logging.DEBUG)
fileHandler = logging.FileHandler(os.path.join('config', 'run.log'), encoding = 'utf8')
fileHandler.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)-17s <%(message... | 34.75 | 101 | 0.690647 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.307554 |
3978e2b002dc50ec5e34788e51f2d661aefcb01f | 2,016 | py | Python | vector_env_comparison.py | neuroevolution-ai/NaturalNets-PerformanceTests | de7d99424cc9ab29fdc3691c12d20d0a35afe0fe | [
"MIT"
] | null | null | null | vector_env_comparison.py | neuroevolution-ai/NaturalNets-PerformanceTests | de7d99424cc9ab29fdc3691c12d20d0a35afe0fe | [
"MIT"
] | 1 | 2021-02-13T18:55:40.000Z | 2021-02-13T18:55:40.000Z | vector_env_comparison.py | neuroevolution-ai/NaturalNets-PerformanceTests | de7d99424cc9ab29fdc3691c12d20d0a35afe0fe | [
"MIT"
] | null | null | null | import multiprocessing
import time
import gym
import gym3
import numpy as np
from gym.vector import make as make_vec_env
from procgen import ProcgenGym3Env
population_size = 112
number_env_steps = 1000
def run_episode_full(u):
env = gym.make('procgen:procgen-heist-v0')
obs = env.reset()
reward = 0
... | 22.651685 | 98 | 0.671627 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.125 |
397b7ca45c3f9235af0d2fa52c9c29634429cebe | 1,641 | py | Python | raiden_api/model/requests.py | kelsos/test-enviroment-scripts | ab8d9f1e9a1deed048dcc93ec9d014bf6b58252d | [
"MIT"
] | 1 | 2019-03-28T00:24:48.000Z | 2019-03-28T00:24:48.000Z | raiden_api/model/requests.py | kelsos/test-enviroment-scripts | ab8d9f1e9a1deed048dcc93ec9d014bf6b58252d | [
"MIT"
] | 4 | 2019-03-26T15:27:20.000Z | 2019-04-29T10:46:08.000Z | raiden_api/model/requests.py | kelsos/test-enviroment-scripts | ab8d9f1e9a1deed048dcc93ec9d014bf6b58252d | [
"MIT"
] | 2 | 2019-03-26T14:27:24.000Z | 2019-03-29T10:28:40.000Z | import time
import typing
class PaymentRequest:
def __init__(self, amount: int, identifier: int = None):
self.amount = amount
self.identifier = identifier
if identifier is None:
self.identifier = int(time.time())
def to_dict(self) -> typing.Dict[str, typing.Any]:
... | 26.467742 | 69 | 0.597806 | 1,606 | 0.978672 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.06886 |
397c69961dfa90f232f4ac9c29a73bc3e9510c76 | 823 | py | Python | Dynamic/KnapNoRep.py | mladuke/Algorithms | eab5d89c5f496b2849f0646dbfa3a4db93a0b391 | [
"MIT"
] | null | null | null | Dynamic/KnapNoRep.py | mladuke/Algorithms | eab5d89c5f496b2849f0646dbfa3a4db93a0b391 | [
"MIT"
] | null | null | null | Dynamic/KnapNoRep.py | mladuke/Algorithms | eab5d89c5f496b2849f0646dbfa3a4db93a0b391 | [
"MIT"
] | null | null | null | def zeroOneKnapsack(v, w, W):
c = []
n = len(v)
c = [[0 for x in range(W+1)] for x in range(n)]
for i in range(0,n):
for j in range(0,W+1):
if (w[i] > j):
c[i][j] = c[i-1][j]
else:
c[i][j] = max(c[i-1][j],v[i] +c[i-1][j-w[i]])
retur... | 24.939394 | 90 | 0.509113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.109356 |
397c6d5c141c7b6d17cf9a8f120d47ea7101ea9f | 587 | py | Python | tasks/migrations/0002_auto_20201008_2236.py | milenakowalska/todolist | 5b5208b952e88334453935652424f8168ecf9113 | [
"MIT"
] | null | null | null | tasks/migrations/0002_auto_20201008_2236.py | milenakowalska/todolist | 5b5208b952e88334453935652424f8168ecf9113 | [
"MIT"
] | null | null | null | tasks/migrations/0002_auto_20201008_2236.py | milenakowalska/todolist | 5b5208b952e88334453935652424f8168ecf9113 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.2 on 2020-10-08 22:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tasks', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='user',
name='background',
fie... | 24.458333 | 112 | 0.575809 | 494 | 0.841567 | 0 | 0 | 0 | 0 | 0 | 0 | 149 | 0.253833 |
397e9f0c2652f385de08911a9951e3eb07c5c86a | 874 | py | Python | tools/one-offs/convert-genres.py | DrDos0016/z2 | b63e77129fefcb4f990ee1cb9952f4f708ee3a2b | [
"MIT"
] | 3 | 2017-05-01T19:53:57.000Z | 2018-08-27T20:14:43.000Z | tools/one-offs/convert-genres.py | DrDos0016/z2 | b63e77129fefcb4f990ee1cb9952f4f708ee3a2b | [
"MIT"
] | null | null | null | tools/one-offs/convert-genres.py | DrDos0016/z2 | b63e77129fefcb4f990ee1cb9952f4f708ee3a2b | [
"MIT"
] | 1 | 2018-08-27T20:14:46.000Z | 2018-08-27T20:14:46.000Z | import os
import sys
import django
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "museum.settings")
django.setup()
from django.contrib.auth.models import User # noqa: E402
from museum_site.models import * # noqa: E402
def main():
... | 23.621622 | 98 | 0.639588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.231121 |
397ee9d80cbe93ca71977088ed64acae351304fd | 553 | py | Python | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 04/ch04_rec03_plot_with_table.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | 26 | 2016-08-25T01:33:36.000Z | 2022-03-20T11:33:31.000Z | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 04/ch04_rec03_plot_with_table.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | null | null | null | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 04/ch04_rec03_plot_with_table.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | 31 | 2016-08-16T15:32:46.000Z | 2021-01-26T19:16:48.000Z | import matplotlib.pylab as plt
import numpy as np
plt.figure()
axes=plt.gca()
y= np.random.randn(9)
col_labels=['col1','col2','col3']
row_labels=['row1','row2','row3']
table_vals=[[11,12,13],[21,22,23],[28,29,30]]
row_colors=['red','gold','green']
the_table = plt.table(cellText=table_vals,
colWidth... | 24.043478 | 45 | 0.593128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.144665 |
3980310409feb9f0ac71dbf46448b126022d5366 | 1,258 | py | Python | support.py | ipascual1/spootnik_bot | ad7658f49705b1ce57bcc5ed84006ef658f63fa3 | [
"Unlicense"
] | null | null | null | support.py | ipascual1/spootnik_bot | ad7658f49705b1ce57bcc5ed84006ef658f63fa3 | [
"Unlicense"
] | null | null | null | support.py | ipascual1/spootnik_bot | ad7658f49705b1ce57bcc5ed84006ef658f63fa3 | [
"Unlicense"
] | null | null | null | import re
import os
def extract(regularE : str, init : str, stop : str, string : str):
"""
regularE: RE to catch string
init: First string to replace
stop: Last string to replace
string: String to apply the RE
With a regular expression and init and stop t... | 29.255814 | 83 | 0.612878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 851 | 0.676471 |
39806196aae9564f8e399df05393bb7226dec4f7 | 1,054 | py | Python | steam.py | iganeshk/alfred-totp | f9c17fe83025c99cbfaf5413d20212aa63d7e0d5 | [
"MIT"
] | 7 | 2020-04-12T21:16:41.000Z | 2022-01-09T08:55:22.000Z | steam.py | iganeshk/alfred-totp | f9c17fe83025c99cbfaf5413d20212aa63d7e0d5 | [
"MIT"
] | null | null | null | steam.py | iganeshk/alfred-totp | f9c17fe83025c99cbfaf5413d20212aa63d7e0d5 | [
"MIT"
] | 1 | 2022-03-26T16:04:53.000Z | 2022-03-26T16:04:53.000Z | #!/usr/env/python3
# coding=utf-8
#
# Generate Steamguard OTP with the shared secret passed as an argument
# Ganesh Velu
import hmac
import base64
import hashlib
import codecs
import time
import sys
STEAM_DECODE_CHARS = ['2', '3', '4', '5', '6', '7', '8', '9',
'B', 'C', 'D', 'F', 'G', 'H', 'J',... | 29.277778 | 90 | 0.586338 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.209677 |
39812282916a91f854eceaec095dab9dd29955a6 | 1,783 | py | Python | igvc_ws/src/igvc_nav/src/path_planner/node.py | SoonerRobotics/igvc_software_2022 | 906e6a4fca22d2b0c06ef1b8a4a3a9df7f1d17dd | [
"MIT"
] | 4 | 2020-07-07T14:56:56.000Z | 2021-08-13T23:31:07.000Z | igvc_ws/src/igvc_nav/src/path_planner/node.py | pradumn203/igvc-winners-2021 | 658233609054eafac59603a77b2a092dc002e145 | [
"MIT"
] | 13 | 2019-11-12T02:57:54.000Z | 2020-03-17T17:04:22.000Z | igvc_ws/src/igvc_nav/src/path_planner/node.py | pradumn203/igvc-winners-2021 | 658233609054eafac59603a77b2a092dc002e145 | [
"MIT"
] | 3 | 2021-06-29T05:21:18.000Z | 2021-08-23T05:03:27.000Z | """
"""
class Node:
INFINITY = 1000000000
def __init__(self, row, col, cost = 0):
self.row = row
self.col = col
# Default node value
self.G = self.INFINITY
self.rhs = self.INFINITY
self.par = None
self.key = (None, None)
# Cost (for obstacles... | 22.858974 | 68 | 0.528884 | 1,772 | 0.993831 | 0 | 0 | 0 | 0 | 0 | 0 | 198 | 0.111049 |
3982bd3c6134c4bd9c5526d9392f74c9c724e7ab | 556 | py | Python | makahiki/apps/widgets/energy_power_meter/views.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | 1 | 2015-07-22T11:31:20.000Z | 2015-07-22T11:31:20.000Z | makahiki/apps/widgets/energy_power_meter/views.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | null | null | null | makahiki/apps/widgets/energy_power_meter/views.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | null | null | null | """Handle rendering of the Energy Power Meter widget."""
from apps.widgets.resource_goal import resource_goal
def supply(request, page_name):
"""Return the view_objects content, which in this case is empty."""
_ = page_name
team = request.user.get_profile().team
if team:
interval = resource_... | 26.47619 | 91 | 0.645683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.280576 |
3982edd57b175c1d224315f35831e37d04e0c726 | 1,408 | py | Python | tools/generatekeypair.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 2,027 | 2019-11-12T18:05:48.000Z | 2022-03-31T22:25:04.000Z | tools/generatekeypair.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 496 | 2019-11-12T18:13:37.000Z | 2022-03-31T10:43:45.000Z | tools/generatekeypair.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 249 | 2019-11-12T18:02:27.000Z | 2022-03-22T12:19:19.000Z | import argparse
import json
from authlib.jose import JsonWebKey
from cryptography.hazmat.primitives import serialization
def generate_key_pair(filename, kid=None):
"""
'kid' will default to the jwk thumbprint if not set explicitly.
Reference: https://tools.ietf.org/html/rfc7638
"""
options = {}
... | 30.608696 | 87 | 0.648438 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 359 | 0.254972 |
3983bdef6c20e9a6ac20cbeb01a996a5e1766f34 | 4,855 | py | Python | hkpy/hkpyo/reasoners/simple_reasoner.py | renan-souza/hkpy | 1fdcd3da3520e876f95295bf6d15e40581b2bb49 | [
"MIT"
] | 7 | 2019-12-23T17:59:36.000Z | 2022-02-17T19:35:32.000Z | hkpy/hkpyo/reasoners/simple_reasoner.py | renan-souza/hkpy | 1fdcd3da3520e876f95295bf6d15e40581b2bb49 | [
"MIT"
] | 9 | 2019-12-30T13:34:41.000Z | 2021-07-16T22:46:06.000Z | hkpy/hkpyo/reasoners/simple_reasoner.py | renan-souza/hkpy | 1fdcd3da3520e876f95295bf6d15e40581b2bb49 | [
"MIT"
] | 2 | 2020-03-14T21:34:02.000Z | 2021-06-12T00:10:43.000Z | ###
# Copyright (c) 2019-present, IBM Research
# Licensed under The MIT License [see LICENSE for details]
###
from collections import defaultdict
from hkpy.hkpyo.model import HKOContext, HKOContextManager, HKOConcept, HKOSubConceptAxiom, HKOConjunctionExpression, \
HKODisjunctionExpression, HKOConceptAssertion, H... | 45.801887 | 119 | 0.65829 | 4,435 | 0.913491 | 0 | 0 | 0 | 0 | 0 | 0 | 563 | 0.115963 |
39846d963efc3c25f62f763940ae6d00481112ea | 237 | py | Python | coffeebar/admin.py | viktor-yakubiv/django-coffee | 0a7d62a53db6af48fdc852fbb4dae43a0fc2b2ef | [
"MIT"
] | null | null | null | coffeebar/admin.py | viktor-yakubiv/django-coffee | 0a7d62a53db6af48fdc852fbb4dae43a0fc2b2ef | [
"MIT"
] | null | null | null | coffeebar/admin.py | viktor-yakubiv/django-coffee | 0a7d62a53db6af48fdc852fbb4dae43a0fc2b2ef | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Account, Product, Drink, Topping, Order
admin.site.register(Account)
admin.site.register(Product)
admin.site.register(Drink)
admin.site.register(Topping)
admin.site.register(Order)
| 21.545455 | 59 | 0.805907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
398508cf7b96c7a53317b86338d3ac80d4ac69c4 | 106 | py | Python | influxdb_client/client/__init__.py | rhajek/influxdb-client-python | 852e6f1b1161df4d67eabc19cdb6b323a46b88e2 | [
"MIT"
] | null | null | null | influxdb_client/client/__init__.py | rhajek/influxdb-client-python | 852e6f1b1161df4d67eabc19cdb6b323a46b88e2 | [
"MIT"
] | null | null | null | influxdb_client/client/__init__.py | rhajek/influxdb-client-python | 852e6f1b1161df4d67eabc19cdb6b323a46b88e2 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from influxdb_client.client.influxdb_client import InfluxDBClient
| 26.5 | 65 | 0.896226 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
398533491570a42901637e1afb785d157af6a86a | 809 | py | Python | accounts/forms.py | mohsenamoon1160417237/Social_app | 79fa0871f7b83648894941f9010f1d99f1b27ab3 | [
"MIT"
] | null | null | null | accounts/forms.py | mohsenamoon1160417237/Social_app | 79fa0871f7b83648894941f9010f1d99f1b27ab3 | [
"MIT"
] | null | null | null | accounts/forms.py | mohsenamoon1160417237/Social_app | 79fa0871f7b83648894941f9010f1d99f1b27ab3 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django import forms
from .models import UserProfile
class UserRegistrationForm(forms.ModelForm):
password = forms.CharField(max_length=20 , widget=forms.PasswordInput , label='Password')
password2 = forms.CharField(max_length=20 , widget=forms.PasswordInput , label... | 17.212766 | 98 | 0.721879 | 696 | 0.860321 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.1644 |
3985a0d08f66c16279006e5cf92a0a215003522a | 8,031 | py | Python | prediction-experiments/python-nb/ov-predict/src/api/model_loader.py | ouyangzhiping/Info-extract | d8a7ca47201dad4d28b9b96861b0b1b3fc27c63a | [
"Apache-2.0"
] | 15 | 2019-02-25T09:53:37.000Z | 2022-03-22T05:13:24.000Z | prediction-experiments/python-nb/ov-predict/src/api/model_loader.py | ouyangzhiping/Info-extract | d8a7ca47201dad4d28b9b96861b0b1b3fc27c63a | [
"Apache-2.0"
] | 8 | 2019-06-12T10:14:58.000Z | 2021-08-15T08:04:10.000Z | prediction-experiments/python-nb/ov-predict/src/api/model_loader.py | ouyangzhiping/Info-extract | d8a7ca47201dad4d28b9b96861b0b1b3fc27c63a | [
"Apache-2.0"
] | 1 | 2022-03-15T16:45:35.000Z | 2022-03-15T16:45:35.000Z | import sys
import numpy as np
import os
import requests
import json
import logging
from json import JSONEncoder
from keras.models import model_from_json
sys.path.append('..')
from preprocessing.InputHelper import InputHelper
from model.lstm import rmse
from model.lstm import buildModel
from keras.preprocessing.sequenc... | 32.383065 | 115 | 0.707757 | 387 | 0.048188 | 0 | 0 | 0 | 0 | 0 | 0 | 1,643 | 0.204582 |
3986c0e0bd792870f8eee7d99d0e2fa5761fa22e | 1,429 | py | Python | blueprints/accounts/manage/config.py | GetmeUK/h51 | 17d4003336857514765a42a0853995fbe3da6525 | [
"MIT"
] | null | null | null | blueprints/accounts/manage/config.py | GetmeUK/h51 | 17d4003336857514765a42a0853995fbe3da6525 | [
"MIT"
] | 4 | 2021-06-08T22:58:13.000Z | 2022-03-12T00:53:18.000Z | blueprints/accounts/manage/config.py | GetmeUK/h51 | 17d4003336857514765a42a0853995fbe3da6525 | [
"MIT"
] | null | null | null | from manhattan.manage import config
from manhattan.nav import Nav, NavItem
from blueprints.accounts.manage import blueprint
from blueprints.accounts.models import Account
__all__ = ['AccountConfig']
class AccountConfig(config.ManageConfig):
frame_cls = Account
blueprint = blueprint
@classmethod
de... | 26.462963 | 70 | 0.491952 | 1,225 | 0.857243 | 0 | 0 | 1,127 | 0.788663 | 0 | 0 | 165 | 0.115465 |
3986fe60405cf4775e3e7c28b77f8afe1fba2cf3 | 599 | py | Python | tests/test_fails.py | Alviner/wsrpc-aiohttp | 12387f68b74587e52ae4b10f28892dbbb2afc32f | [
"MIT"
] | null | null | null | tests/test_fails.py | Alviner/wsrpc-aiohttp | 12387f68b74587e52ae4b10f28892dbbb2afc32f | [
"MIT"
] | null | null | null | tests/test_fails.py | Alviner/wsrpc-aiohttp | 12387f68b74587e52ae4b10f28892dbbb2afc32f | [
"MIT"
] | null | null | null | from aiohttp import ClientConnectionError
from wsrpc_aiohttp.testing import BaseTestCase, async_timeout
class TestDisconnect(BaseTestCase):
@async_timeout
async def test_call_error(self):
class DataStore:
def get_data(self, _):
return 1000
self.WebSocketHandler.add... | 28.52381 | 73 | 0.689482 | 492 | 0.821369 | 0 | 0 | 452 | 0.754591 | 433 | 0.722871 | 68 | 0.113523 |
398a3a700f8b78eced80ede2546a27f9c162d1aa | 2,325 | py | Python | devops/python/issuebot/applog.py | simahao/lily | c22ec37cb02374e94b41822eccc5e6d6aa7d0d25 | [
"MIT"
] | 4 | 2020-11-16T06:24:19.000Z | 2021-05-19T02:10:01.000Z | devops/python/issuebot/applog.py | simahao/lily | c22ec37cb02374e94b41822eccc5e6d6aa7d0d25 | [
"MIT"
] | 5 | 2021-05-05T14:17:27.000Z | 2021-09-30T08:47:23.000Z | devops/python/issuebot/applog.py | simahao/lily | c22ec37cb02374e94b41822eccc5e6d6aa7d0d25 | [
"MIT"
] | 3 | 2021-02-22T01:38:49.000Z | 2021-06-03T08:52:37.000Z | import logging
import logging.config
import os
LOG_DIR = os.path.dirname(os.path.abspath(__file__))
log_config = {
'version': 1,
'formatters': {
'verbose': {
'class': 'logging.Formatter',
'format': '%(asctime)s [%(name)s] %(levelname)-8s %(pathname)s:%(lineno)d - %(message)s',
... | 29.43038 | 101 | 0.455054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,196 | 0.514409 |
398adc2cec18c8f88eebd57e5b5cd30a4eaccd31 | 5,280 | py | Python | basket/BasketGlobals.py | Hartman-/Basket | 7b9c174b031c9ffac2de886f5e149adcd5f7c83f | [
"BSD-3-Clause"
] | 2 | 2017-02-07T11:28:58.000Z | 2017-12-01T05:41:36.000Z | basket/BasketGlobals.py | Hartman-/Basket | 7b9c174b031c9ffac2de886f5e149adcd5f7c83f | [
"BSD-3-Clause"
] | 25 | 2016-08-18T01:16:59.000Z | 2017-02-11T03:57:20.000Z | basket/BasketGlobals.py | Hartman-/Basket | 7b9c174b031c9ffac2de886f5e149adcd5f7c83f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import platform
from glob import glob
import utils.appconfig as appconfig
# GLOBAL CONSTANTS
# --- File Structure Constants ---
BASE_DIRS = {
'delivery': [
'CritiqueArchive'
],
'docs': [],
'frames': [],
... | 27.076923 | 115 | 0.595455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,608 | 0.304545 |
398d56540cd3fb4efa42ef33aee42fa70cf89afe | 3,024 | py | Python | datasets/thuc_news/thuc_news.py | jhxu-org/datasets | e78e81ff2aec2928506a42c3312799acd6c5e807 | [
"Apache-2.0"
] | null | null | null | datasets/thuc_news/thuc_news.py | jhxu-org/datasets | e78e81ff2aec2928506a42c3312799acd6c5e807 | [
"Apache-2.0"
] | null | null | null | datasets/thuc_news/thuc_news.py | jhxu-org/datasets | e78e81ff2aec2928506a42c3312799acd6c5e807 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
#
# 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/LI... | 33.977528 | 114 | 0.638889 | 1,527 | 0.430626 | 370 | 0.104343 | 0 | 0 | 0 | 0 | 2,128 | 0.600113 |
3990560a6bff336fd21ff88b51780152f5105716 | 1,215 | py | Python | mundo3/ex115/lib/arquivo/__init__.py | dilsonm/CeV | 8043be36b2da187065691d23ed5cb40fd65f806f | [
"MIT"
] | null | null | null | mundo3/ex115/lib/arquivo/__init__.py | dilsonm/CeV | 8043be36b2da187065691d23ed5cb40fd65f806f | [
"MIT"
] | null | null | null | mundo3/ex115/lib/arquivo/__init__.py | dilsonm/CeV | 8043be36b2da187065691d23ed5cb40fd65f806f | [
"MIT"
] | null | null | null | from lib.interface import cabecalho
def arquivoExiste(arq):
try:
a = open(arq, 'rt')
a.close()
except FileNotFoundError:
return False
else:
return True
def criarArquivo(arq):
try:
a = open(arq, 'wt+')
a.close()
except:
print('Houve um erro ... | 23.365385 | 57 | 0.516872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 385 | 0.315574 |
399279cf633bc710b68c85b8b7d375ff1f8fa454 | 2,626 | py | Python | path-sum-four-ways/solution.py | ALB37/project-euler-problems | c3fb4213e150805bfe45b15847bc6449eb907c7a | [
"MIT"
] | null | null | null | path-sum-four-ways/solution.py | ALB37/project-euler-problems | c3fb4213e150805bfe45b15847bc6449eb907c7a | [
"MIT"
] | null | null | null | path-sum-four-ways/solution.py | ALB37/project-euler-problems | c3fb4213e150805bfe45b15847bc6449eb907c7a | [
"MIT"
] | null | null | null | from graph import Graph
matrix = []
with open('p083_matrix.txt') as file:
for line in file.readlines():
currentline = [int(n) for n in line.split(',')]
matrix.append(currentline)
numGraph = Graph()
# add each node first
for i in range(len(matrix)):
for j in range(len(matrix[i])):
num... | 38.617647 | 75 | 0.485149 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.021706 |
39965ea3888f463b999a6106ce07def8d9adf4ac | 4,010 | py | Python | carts/views.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | null | null | null | carts/views.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | 9 | 2020-01-10T14:10:02.000Z | 2022-03-12T00:08:19.000Z | carts/views.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | null | null | null | from django.core.exceptions import ObjectDoesNotExist
from django.shortcuts import render, redirect, get_object_or_404
from designs import models as design_models
from feet import models as foot_models
from products import models as product_models
from .models import Cart, CartItem
# 現在のセッション宛にカートを生成するための関数
def _sess... | 33.983051 | 86 | 0.672319 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,513 | 0.3139 |
3996a072b5270c64e9a774f3c2758ba1336ec30d | 13,515 | py | Python | deploy.py | j-benson/Deploy | 9fb2bd1c383949521967a672ac76fcdcaced503f | [
"MIT"
] | null | null | null | deploy.py | j-benson/Deploy | 9fb2bd1c383949521967a672ac76fcdcaced503f | [
"MIT"
] | null | null | null | deploy.py | j-benson/Deploy | 9fb2bd1c383949521967a672ac76fcdcaced503f | [
"MIT"
] | null | null | null | """
Script to deploy a website to the server by ftp.
- Compares local directory with remote directory
- Updates modified files
- Adds new files
- Optionally, removes deleted files from remote
Requires: python 3.3+
Due to use of ftplib.mlsd()
The MIT License (... | 35.565789 | 129 | 0.592379 | 2,350 | 0.173881 | 0 | 0 | 0 | 0 | 0 | 0 | 4,295 | 0.317795 |
39972511fba92d415fe55b1c71b33e08a7f6d99e | 6,079 | py | Python | pythorn/data_structures/queue.py | Gourav-KP/pythorn | f7130721c02292af0e23bd8bcf31d41990c0d48b | [
"MIT"
] | 5 | 2020-11-23T14:10:28.000Z | 2021-05-07T16:25:38.000Z | pythorn/data_structures/queue.py | Gourav-KP/pythorn | f7130721c02292af0e23bd8bcf31d41990c0d48b | [
"MIT"
] | null | null | null | pythorn/data_structures/queue.py | Gourav-KP/pythorn | f7130721c02292af0e23bd8bcf31d41990c0d48b | [
"MIT"
] | 3 | 2020-11-25T11:00:14.000Z | 2021-10-01T12:16:30.000Z | """
Author : Robin Singh
Programs List:
1.Queue
2.Circular Queue
3.Double Ended Queue
"""
import inspect
class Queue(object):
def __init__(self, length=5):
"""
:param length: pass queue length while making object otherwise default value will be 5
"""
self.items = []
self.... | 22.853383 | 204 | 0.497779 | 5,963 | 0.980918 | 0 | 0 | 1,173 | 0.192959 | 0 | 0 | 2,288 | 0.376378 |
3997e398937ee03af443d926f755e2d9046ee9c6 | 1,740 | py | Python | wataru/commands/models/project.py | risuoku/wataru | 63be36d15454abd0636f67eaf1e80728b8c5a9bd | [
"MIT"
] | null | null | null | wataru/commands/models/project.py | risuoku/wataru | 63be36d15454abd0636f67eaf1e80728b8c5a9bd | [
"MIT"
] | null | null | null | wataru/commands/models/project.py | risuoku/wataru | 63be36d15454abd0636f67eaf1e80728b8c5a9bd | [
"MIT"
] | null | null | null | from wataru.commands.models.base import CommandBase
from wataru.logging import getLogger
import wataru.rules.models as rmodels
import os
import sys
logger = getLogger(__name__)
class Create(CommandBase):
def apply_arguments(self, parser):
parser.add_argument('--name', action='store', dest='projectname')... | 32.222222 | 114 | 0.65977 | 1,558 | 0.895402 | 0 | 0 | 0 | 0 | 0 | 0 | 301 | 0.172989 |
3998894acc2c2f5b50a8cd1451c55bffb80880f7 | 2,914 | py | Python | UnityExamples/Assets/StreamingAssets/Python/BlockLibraries/UnityExamples/FingerTrace.py | 6henrykim/UnityExamples | 3d4d782e6e67fee1ede902998c2df1b5b90b074a | [
"Apache-2.0"
] | 9 | 2020-04-02T10:33:37.000Z | 2021-12-03T17:14:40.000Z | UnityExamples/Assets/StreamingAssets/Python/BlockLibraries/UnityExamples/FingerTrace.py | ultrahaptics/UnityExamples | 3d4d782e6e67fee1ede902998c2df1b5b90b074a | [
"Apache-2.0"
] | 2 | 2019-11-06T10:37:18.000Z | 2021-09-20T14:31:13.000Z | UnityExamples/Assets/StreamingAssets/Python/BlockLibraries/UnityExamples/FingerTrace.py | ultrahaptics/UnityExamples | 3d4d782e6e67fee1ede902998c2df1b5b90b074a | [
"Apache-2.0"
] | 1 | 2022-02-25T16:38:52.000Z | 2022-02-25T16:38:52.000Z | # A Sensation which creates a Polyline of 35 points of the finger joints, along which a Circle Path is animated.
from pysensationcore import *
import sensation_helpers as sh
import HandOperations
# We will use the joint positions of the fingers to animate a Circle along a PolylinePath
fingers = ["thumb", "indexFinger"... | 42.231884 | 112 | 0.710707 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,080 | 0.370625 |
3998e8576c81d8620613973a3fcb28ca0f349137 | 2,053 | py | Python | scripts/extarct_from_videos.py | corenel/yt8m-feature-extractor | 3f658749fd365478f1f26daa78b3e7b8d4844047 | [
"MIT"
] | 18 | 2017-09-12T07:02:28.000Z | 2021-06-07T13:38:51.000Z | scripts/extarct_from_videos.py | corenel/yt8m-feature-extractor | 3f658749fd365478f1f26daa78b3e7b8d4844047 | [
"MIT"
] | 1 | 2017-10-19T13:51:41.000Z | 2017-12-30T08:49:08.000Z | scripts/extarct_from_videos.py | corenel/yt8m-feature-extractor | 3f658749fd365478f1f26daa78b3e7b8d4844047 | [
"MIT"
] | 3 | 2017-09-07T07:07:22.000Z | 2018-09-18T15:49:29.000Z | """Extract inception_v3_feats from videos for Youtube-8M feature extractor."""
import os
import torch
import init_path
import misc.config as cfg
from misc.utils import (concat_feat_var, get_dataloader, make_cuda,
make_variable)
from models import inception_v3
if __name__ == '__main__':
#... | 40.254902 | 78 | 0.560156 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 410 | 0.199708 |
399fd36bf8e08b05046794370fe69a0ebbb1e2b1 | 4,208 | py | Python | wc_rules/simulator/simulator.py | KarrLab/wc_rules | 5c6d8ec7f3152f2d234107d6fec3e2bc8d9ff518 | [
"MIT"
] | 5 | 2018-12-24T16:20:27.000Z | 2022-02-12T23:07:42.000Z | wc_rules/simulator/simulator.py | KarrLab/wc_rules | 5c6d8ec7f3152f2d234107d6fec3e2bc8d9ff518 | [
"MIT"
] | 7 | 2019-01-14T23:08:52.000Z | 2021-06-03T02:38:43.000Z | wc_rules/simulator/simulator.py | KarrLab/wc_rules | 5c6d8ec7f3152f2d234107d6fec3e2bc8d9ff518 | [
"MIT"
] | 3 | 2018-12-15T00:51:56.000Z | 2020-04-29T14:12:34.000Z | from collections import deque
from ..utils.collections import DictLike
from ..matcher.core import ReteNet
from ..matcher.actions import make_node_token, make_edge_token, make_attr_token
from .sampler import NextReactionMethod
class SimulationState:
def __init__(self,nodes=[],**kwargs):
self.cache = DictLike(nodes)... | 34.491803 | 140 | 0.736217 | 3,972 | 0.943916 | 0 | 0 | 0 | 0 | 0 | 0 | 586 | 0.139259 |
39a05a3ae20bd7b9b573cc3402d91e45b4b3aa9a | 594 | py | Python | samples/module_snapcheck.py | luislezcair/jsnapy | 86381aa389cf19394a6165fe34bcfd95ee8a7f67 | [
"Apache-2.0",
"BSD-3-Clause"
] | 101 | 2016-07-04T13:18:48.000Z | 2022-02-11T19:18:15.000Z | samples/module_snapcheck.py | luislezcair/jsnapy | 86381aa389cf19394a6165fe34bcfd95ee8a7f67 | [
"Apache-2.0",
"BSD-3-Clause"
] | 187 | 2016-07-06T14:58:03.000Z | 2022-03-15T09:19:11.000Z | samples/module_snapcheck.py | luislezcair/jsnapy | 86381aa389cf19394a6165fe34bcfd95ee8a7f67 | [
"Apache-2.0",
"BSD-3-Clause"
] | 70 | 2016-07-12T15:20:58.000Z | 2022-03-25T05:14:40.000Z | ### performing function similar to --snapcheck option in command line ######
from jnpr.jsnapy import SnapAdmin
from pprint import pprint
from jnpr.junos import Device
js = SnapAdmin()
config_file = "/etc/jsnapy/testfiles/config_single_snapcheck.yml"
snapvalue = js.snapcheck(config_file, "snap")
for snapcheck in snap... | 33 | 76 | 0.720539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.380471 |
39a0dad5efbaf0ea7f66987d69ed3575a2e7b7d0 | 1,068 | py | Python | python/easy/1342_Number_of_Steps_to_Reduce_a_Number_to_Zero.py | JackWang0107/leetcode | c02932190b639ef87a8d0fcd07d9cd6ec7344a67 | [
"MIT"
] | 1 | 2021-05-22T03:27:33.000Z | 2021-05-22T03:27:33.000Z | python/easy/1342_Number_of_Steps_to_Reduce_a_Number_to_Zero.py | JackWang0107/leetcode | c02932190b639ef87a8d0fcd07d9cd6ec7344a67 | [
"MIT"
] | null | null | null | python/easy/1342_Number_of_Steps_to_Reduce_a_Number_to_Zero.py | JackWang0107/leetcode | c02932190b639ef87a8d0fcd07d9cd6ec7344a67 | [
"MIT"
] | null | null | null | from typing import *
class Solution:
# 32 ms, faster than 53.97% of Python3 online submissions for Number of Steps to Reduce a Number to Zero.
# 14.2 MB, less than 35.20% of Python3 online submissions for Number of Steps to Reduce a Number to Zero.
def numberOfSteps(self, num: int) -> int:
ans = 0
... | 34.451613 | 110 | 0.553371 | 964 | 0.902622 | 0 | 0 | 0 | 0 | 0 | 0 | 429 | 0.401685 |
39a16a05ac36a9db042c0bce00dc04a5a657ef37 | 1,370 | py | Python | __private__/temp_dev/testshapefile.py | karimbahgat/PyA | 4d62a0850ba1dca93f7362ef23e18a13938fce4f | [
"MIT"
] | 16 | 2016-02-26T15:24:28.000Z | 2021-06-16T21:00:22.000Z | __private__/temp_dev/testshapefile.py | karimbahgat/PyA | 4d62a0850ba1dca93f7362ef23e18a13938fce4f | [
"MIT"
] | 5 | 2016-02-27T20:13:26.000Z | 2018-09-12T23:08:36.000Z | __private__/temp_dev/testshapefile.py | karimbahgat/PyA | 4d62a0850ba1dca93f7362ef23e18a13938fce4f | [
"MIT"
] | 7 | 2015-07-08T12:51:57.000Z | 2019-12-05T19:07:27.000Z |
import Tkinter as tk
from PIL import Image, ImageTk
import aggdraw
window = tk.Tk()
label = tk.Label(window)
label.pack()
# schedule changing images
import itertools, random, time
def agg2tkimg(aggimage):
t = time.clock()
img = aggimage
colorlength = len(img.mode)
width,height = img.size
imgb... | 22.096774 | 98 | 0.674453 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.124088 |
39a902062ca7512880d1818276ec6c8f4ed11b57 | 693 | py | Python | aoc10.py | roscroft/aoc-2020 | 3f37f6b29ec66bac5610bccd6de5ebb000bde312 | [
"MIT"
] | 1 | 2020-12-07T22:16:17.000Z | 2020-12-07T22:16:17.000Z | aoc10.py | roscroft/aoc-2020 | 3f37f6b29ec66bac5610bccd6de5ebb000bde312 | [
"MIT"
] | null | null | null | aoc10.py | roscroft/aoc-2020 | 3f37f6b29ec66bac5610bccd6de5ebb000bde312 | [
"MIT"
] | null | null | null | from utils import utils
def part_1(data):
count_1 = sum([1 if data[i] - data[i-1] == 1 else 0 for i in range(len(data))])
count_3 = sum([1 if data[i] - data[i-1] == 3 else 0 for i in range(len(data))])
return count_1*count_3
def part_2(data):
dynm = [1] + [0]*(len(data)-1)
for i in range(1, len(da... | 34.65 | 90 | 0.588745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.148629 |
39a92e95003cf25b12c9d62aa465b8c0ddd75afb | 5,510 | py | Python | HyperGui.py | MIC-Surgery-Heidelberg/HyperGUI_1.0 | 0ee8e0da85049076bb22a542d15d6c3adf6ea106 | [
"MIT"
] | null | null | null | HyperGui.py | MIC-Surgery-Heidelberg/HyperGUI_1.0 | 0ee8e0da85049076bb22a542d15d6c3adf6ea106 | [
"MIT"
] | null | null | null | HyperGui.py | MIC-Surgery-Heidelberg/HyperGUI_1.0 | 0ee8e0da85049076bb22a542d15d6c3adf6ea106 | [
"MIT"
] | null | null | null | """
@author: Alexander Studier-Fischer, Jan Odenthal, Berkin Oezdemir, Isabella Camplisson, University of Heidelberg
"""
from HyperGuiModules import *
import logging
import os
#logging.basicConfig(level=logging.DEBUG)
xSize=None
ySize=None
def main():
(window, introduction, input_output, image_diagram, hist_cal... | 36.979866 | 162 | 0.741561 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 660 | 0.119782 |
39a9bf645816b1c506dcc188750ce0f86697bf35 | 241 | py | Python | 8. The Prisoner.py | Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers | 231d17ad2224fc616c022b515bc14e78ec5822f9 | [
"MIT"
] | 1 | 2021-02-25T16:43:08.000Z | 2021-02-25T16:43:08.000Z | 8. The Prisoner.py | Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers | 231d17ad2224fc616c022b515bc14e78ec5822f9 | [
"MIT"
] | null | null | null | 8. The Prisoner.py | Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers | 231d17ad2224fc616c022b515bc14e78ec5822f9 | [
"MIT"
] | null | null | null | # Free the prisoner, defeat the guard and grab the gem.
hero.moveRight()
# Free Patrick from behind the "Weak Door".
hero.attack("Weak Door")
hero.moveRight(2)
# Defeat the guard, named "Two".
# Get the gem.
hero.moveRight()
hero.moveDown(3) | 26.777778 | 55 | 0.73029 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.643154 |
39ab4f35e7e866e763852b3e23d066d864569549 | 1,120 | py | Python | conti_wc.py | saturn99/cleaks | c826c973d9695c3bfc31bf580b470267792807e7 | [
"MIT"
] | 6 | 2022-03-01T10:33:52.000Z | 2022-03-05T22:26:27.000Z | conti_wc.py | saturn99/cleaks | c826c973d9695c3bfc31bf580b470267792807e7 | [
"MIT"
] | 1 | 2022-03-01T13:40:29.000Z | 2022-03-01T13:40:29.000Z | conti_wc.py | saturn99/cleaks | c826c973d9695c3bfc31bf580b470267792807e7 | [
"MIT"
] | 2 | 2022-03-01T10:40:57.000Z | 2022-03-01T13:21:23.000Z | # -*- coding: utf-8 -*-
# import libraries
import os
from PIL import Image
import nltk
import numpy as np
import matplotlib.pyplot as plt
import random
from scipy.ndimage import gaussian_gradient_magnitude
from wordcloud import WordCloud, ImageColorGenerator, STOPWORDS
# import mask image. Search for stencil image... | 25.454545 | 103 | 0.738393 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 394 | 0.351786 |
39ab88cab3f3527e44f2aa4992feac019e41f3f0 | 2,120 | py | Python | PA2_Optical_Flow.py | tianzixie/CAP5415PA2 | 6a7f4b1f178f10b37d588e698eddd013ce193544 | [
"MIT"
] | null | null | null | PA2_Optical_Flow.py | tianzixie/CAP5415PA2 | 6a7f4b1f178f10b37d588e698eddd013ce193544 | [
"MIT"
] | null | null | null | PA2_Optical_Flow.py | tianzixie/CAP5415PA2 | 6a7f4b1f178f10b37d588e698eddd013ce193544 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 26 08:19:16 2017
@author: 0
"""
from scipy.misc import imresize
from scipy.signal import convolve,convolve2d
import scipy
from PIL import Image
import cv2
import numpy as np
img = cv2.imread("C://Users/0/Downloads/basketball1.png",0)
img2 = cv2.imread("C://Users/0/Downloa... | 20.784314 | 78 | 0.618868 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,314 | 0.619811 |
39ab9e369da24d4871a1bbc5c6f073cf0d4fed1f | 743 | py | Python | Test_data/database.py | mayowak/SQLite_test | a1185650dffe360d033e0691567ec2b2e075cae5 | [
"MIT"
] | null | null | null | Test_data/database.py | mayowak/SQLite_test | a1185650dffe360d033e0691567ec2b2e075cae5 | [
"MIT"
] | null | null | null | Test_data/database.py | mayowak/SQLite_test | a1185650dffe360d033e0691567ec2b2e075cae5 | [
"MIT"
] | null | null | null | #!usr/bin/env python3
#import dependecies
import sqlite3
import csv
#connect to test_data
conn = sqlite3.connect('test_data.db')
#create a cursor
c = conn.cursor()
c.execute("DROP TABLE test_data")
#create a test_data table
c.execute("""CREATE TABLE test_data(age integer,
sex te... | 22.515152 | 78 | 0.549125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 529 | 0.711978 |
39abb2ca3dacb04c99f9108d126a09ef92f5c7d4 | 1,824 | py | Python | swift_cloud_py/validate_safety_restrictions/validate.py | stijnfleuren/swift_cloud_api | 30f3b6c1fd80e5cfa5ce11e1daa08a09ab1e4e9b | [
"MIT"
] | 3 | 2021-05-25T18:29:38.000Z | 2021-08-03T17:04:29.000Z | swift_cloud_py/validate_safety_restrictions/validate.py | stijnfleuren/swift_cloud_api | 30f3b6c1fd80e5cfa5ce11e1daa08a09ab1e4e9b | [
"MIT"
] | null | null | null | swift_cloud_py/validate_safety_restrictions/validate.py | stijnfleuren/swift_cloud_api | 30f3b6c1fd80e5cfa5ce11e1daa08a09ab1e4e9b | [
"MIT"
] | null | null | null | from swift_cloud_py.entities.control_output.fixed_time_schedule import FixedTimeSchedule
from swift_cloud_py.entities.intersection.intersection import Intersection
from swift_cloud_py.validate_safety_restrictions.validate_bounds import validate_bounds
from swift_cloud_py.validate_safety_restrictions.validate_completene... | 67.555556 | 111 | 0.838268 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 537 | 0.294408 |
39ac7cdc9dcc48e4f5e6e8db36ab648730a99cc2 | 20,366 | py | Python | source/python/brick_characterizer/CellRiseFall_Char.py | electronicvisions/brick | 9ad14f9d2912e70191f4711f359e3912c8cef837 | [
"BSD-3-Clause"
] | 1 | 2016-08-02T15:23:16.000Z | 2016-08-02T15:23:16.000Z | source/python/brick_characterizer/CellRiseFall_Char.py | ahartel/brick | 9ad14f9d2912e70191f4711f359e3912c8cef837 | [
"BSD-3-Clause"
] | null | null | null | source/python/brick_characterizer/CellRiseFall_Char.py | ahartel/brick | 9ad14f9d2912e70191f4711f359e3912c8cef837 | [
"BSD-3-Clause"
] | 1 | 2016-05-27T21:22:14.000Z | 2016-05-27T21:22:14.000Z | from timingsignal import TimingSignal
from brick_characterizer.CharBase import CharBase
class CellRiseFall_Char(CharBase):
def __init__(self,toplevel,output_filename,temperature,use_spectre=False):
self.toplevel = toplevel
self.output_filename = output_filename
self.load_capacitance = 0... | 50.78803 | 402 | 0.584847 | 20,275 | 0.995532 | 0 | 0 | 0 | 0 | 0 | 0 | 4,075 | 0.200088 |
39ad13fb0f9312898dcd01e19fe49f2a734c1783 | 58 | py | Python | pyjpboatrace/utils/__init__.py | miyamamoto/pyjpboatrace | fbc4a794d1f03e2ed7dfcafcb20c43098c1434a6 | [
"MIT"
] | null | null | null | pyjpboatrace/utils/__init__.py | miyamamoto/pyjpboatrace | fbc4a794d1f03e2ed7dfcafcb20c43098c1434a6 | [
"MIT"
] | null | null | null | pyjpboatrace/utils/__init__.py | miyamamoto/pyjpboatrace | fbc4a794d1f03e2ed7dfcafcb20c43098c1434a6 | [
"MIT"
] | null | null | null | from .str2num import str2num
__all__ = [
'str2num'
]
| 9.666667 | 28 | 0.655172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.155172 |
39ae3c36550302817294c61764f3350d2f47cf3d | 2,168 | py | Python | snippets/integers.py | rhishi/python-snippets | 60020d3a187d7687b38b6b58f74ceb03a37983b9 | [
"Apache-2.0"
] | null | null | null | snippets/integers.py | rhishi/python-snippets | 60020d3a187d7687b38b6b58f74ceb03a37983b9 | [
"Apache-2.0"
] | null | null | null | snippets/integers.py | rhishi/python-snippets | 60020d3a187d7687b38b6b58f74ceb03a37983b9 | [
"Apache-2.0"
] | null | null | null | import sys
# First: to understand the uses of "format" below, read these:
# Format String Syntax https://docs.python.org/2/library/string.html#formatstrings
# Format Specification Mini-Language https://docs.python.org/2/library/string.html#formatspec
# In Python 2, there are two integer types: int, long.
# int i... | 38.714286 | 95 | 0.652675 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,634 | 0.75369 |
39aefe4ed5c77eadc14e52071c40e7bf0197d590 | 332 | py | Python | covid mail/main.py | rahul263-stack/PROJECT-Dump | d8b1cfe0da8cad9fe2f3bbd427334b979c7d2c09 | [
"MIT"
] | 1 | 2020-04-06T04:41:56.000Z | 2020-04-06T04:41:56.000Z | covid mail/main.py | rahul263-stack/quarantine | d8b1cfe0da8cad9fe2f3bbd427334b979c7d2c09 | [
"MIT"
] | null | null | null | covid mail/main.py | rahul263-stack/quarantine | d8b1cfe0da8cad9fe2f3bbd427334b979c7d2c09 | [
"MIT"
] | null | null | null | import os
from sendDetailedEmail.email import MailAttachment
def sendMail(clientEmail):
try:
sender = MailAttachment(clientEmail=clientEmail)
sender.send()
except Exception as e:
raise e
if __name__=="__main__":
clientEmail = input("input a valid client email ID: ")
sendMail(c... | 22.133333 | 58 | 0.698795 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.129518 |
39af2956611d454e6abd79bee5b3ec4243b86cd1 | 2,933 | py | Python | pyodide_importer/api.py | ryanking13/pyodide-importer | fb9f83e54eb307fcdb2590588f0b75db1c87ca97 | [
"MIT"
] | 1 | 2021-11-16T11:55:54.000Z | 2021-11-16T11:55:54.000Z | pyodide_importer/api.py | ryanking13/pyodide-importer | fb9f83e54eb307fcdb2590588f0b75db1c87ca97 | [
"MIT"
] | null | null | null | pyodide_importer/api.py | ryanking13/pyodide-importer | fb9f83e54eb307fcdb2590588f0b75db1c87ca97 | [
"MIT"
] | null | null | null | from contextlib import contextmanager
import pathlib
import sys
from typing import Union, List
from .import_hook import PyFinder, PyHTTPFinder
# Singleton instance of PyFinder
pyfinder: PyFinder = None
def _update_syspath(path: str):
"""
Append `path` to sys.path so that files in path can be imported
"""... | 31.880435 | 142 | 0.699284 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,652 | 0.563246 |
39af8dcb80c383fcd4bfdd52b3cd4d36dce1df8f | 1,982 | py | Python | rastervision/new_version/batch_submit.py | carderne/raster-vision | 915fbcd3263d8f2193e65c2cd0eb53e050a47a01 | [
"Apache-2.0"
] | 1 | 2019-11-07T10:02:23.000Z | 2019-11-07T10:02:23.000Z | rastervision/new_version/batch_submit.py | carderne/raster-vision | 915fbcd3263d8f2193e65c2cd0eb53e050a47a01 | [
"Apache-2.0"
] | null | null | null | rastervision/new_version/batch_submit.py | carderne/raster-vision | 915fbcd3263d8f2193e65c2cd0eb53e050a47a01 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import uuid
import click
from rastervision.rv_config import RVConfig
def _batch_submit(cmd,
debug=False,
profile=False,
attempts=5,
parent_job_ids=None,
num_array_jobs=None,
use_gpu=Fa... | 26.783784 | 79 | 0.589808 | 0 | 0 | 0 | 0 | 318 | 0.160444 | 0 | 0 | 428 | 0.215943 |
39b0985dcd907af2111c10e4b763175f9a26f8fe | 311 | py | Python | app/api/item.py | peterentroprise/entro-tad | b074d4810bcc7fb71b467da8dfaa19be66a41fa2 | [
"MIT"
] | null | null | null | app/api/item.py | peterentroprise/entro-tad | b074d4810bcc7fb71b467da8dfaa19be66a41fa2 | [
"MIT"
] | null | null | null | app/api/item.py | peterentroprise/entro-tad | b074d4810bcc7fb71b467da8dfaa19be66a41fa2 | [
"MIT"
] | null | null | null |
from fastapi import APIRouter
from models.item_model import Payload
from service import item_service
router = APIRouter()
@router.get("/")
async def read_root():
return {"Hello": "Universe"}
@router.post("/indexitem")
async def index_item(payload: Payload):
return item_service.index_item(payload) | 19.4375 | 43 | 0.752412 | 0 | 0 | 0 | 0 | 182 | 0.585209 | 138 | 0.44373 | 32 | 0.102894 |
39b1dd9a2298bcc4fe7df8fe5dd5e695bcdaca18 | 6,867 | py | Python | scripts/docker_configurator/docker_configurator.py | PlenusPyramis/dockerfiles | 0c1b19faa33e944c66f3762fe49d7f954aa60b12 | [
"MIT"
] | 1 | 2020-01-10T16:26:32.000Z | 2020-01-10T16:26:32.000Z | scripts/docker_configurator/docker_configurator.py | PlenusPyramis/dockerfiles | 0c1b19faa33e944c66f3762fe49d7f954aa60b12 | [
"MIT"
] | null | null | null | scripts/docker_configurator/docker_configurator.py | PlenusPyramis/dockerfiles | 0c1b19faa33e944c66f3762fe49d7f954aa60b12 | [
"MIT"
] | 2 | 2020-02-22T23:25:24.000Z | 2020-11-04T05:09:48.000Z | """
Docker Configurator
http://www.github.com/EnigmaCurry/docker-configurator
This tool creates self-configuring docker containers given a single
YAML file.
Run this script before your main docker CMD. It will write fresh
config files on every startup of the container, based off of Mako
templates embedded in the doc... | 39.24 | 114 | 0.663026 | 1,450 | 0.211155 | 0 | 0 | 0 | 0 | 0 | 0 | 3,697 | 0.538372 |
39b39323fb50875fc0c540df3d833adc6f094d24 | 2,583 | py | Python | definition.example.py | JoshData/represent-boundaries | 0a77bad99758bc77140c6c6def4f8d5e68810367 | [
"MIT"
] | 2 | 2016-07-05T06:10:21.000Z | 2016-10-20T17:55:13.000Z | definition.example.py | JoshData/represent-boundaries | 0a77bad99758bc77140c6c6def4f8d5e68810367 | [
"MIT"
] | null | null | null | definition.example.py | JoshData/represent-boundaries | 0a77bad99758bc77140c6c6def4f8d5e68810367 | [
"MIT"
] | 2 | 2016-07-05T06:10:25.000Z | 2020-03-04T02:22:24.000Z | from datetime import date
import boundaries
boundaries.register('federal-electoral-districts', # The slug of the boundary set
# The name of the boundary set for display.
name='Federal electoral districts',
# Generic singular name for a boundary from this set. Optional if the
# boundary set's name ends... | 52.714286 | 139 | 0.722416 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,122 | 0.821525 |
39b549fc5da98ce81d958623dcf67a57d0a50eec | 2,962 | py | Python | tyo_mq_client/publisher.py | e-tang/tyo-mq-client-python | 82ea47bf8cf8a924b515149456eaecb5557a0f3e | [
"MIT"
] | null | null | null | tyo_mq_client/publisher.py | e-tang/tyo-mq-client-python | 82ea47bf8cf8a924b515149456eaecb5557a0f3e | [
"MIT"
] | 1 | 2018-06-19T23:42:27.000Z | 2018-06-20T07:06:25.000Z | tyo_mq_client/publisher.py | e-tang/tyo-mq-client-python | 82ea47bf8cf8a924b515149456eaecb5557a0f3e | [
"MIT"
] | null | null | null | #
#
from .subscriber import Subscriber
from .logger import Logger
from .constants import Constants
from .events import Events
#
import json
class Publisher(Subscriber):
def __init__(self, name, eventDefault=None, host=None, port=None, protocol=None):
super(Publisher, self).__init__(name, host, port, proto... | 33.280899 | 105 | 0.641458 | 2,819 | 0.951722 | 0 | 0 | 0 | 0 | 0 | 0 | 336 | 0.113437 |
39b57868be76cc021f5f1127464558d697a138df | 3,560 | py | Python | app/authenticate.py | directedbyshawn/Secure-Login | 15f2a6168986b11ffbde318333415671fb62578f | [
"MIT"
] | null | null | null | app/authenticate.py | directedbyshawn/Secure-Login | 15f2a6168986b11ffbde318333415671fb62578f | [
"MIT"
] | null | null | null | app/authenticate.py | directedbyshawn/Secure-Login | 15f2a6168986b11ffbde318333415671fb62578f | [
"MIT"
] | null | null | null | '''
Authentication methods for cs166 final project.
'''
import random, hashlib
from .db import retrieve_accounts
lower_case = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
upper_case = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', '... | 28.709677 | 156 | 0.589045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,169 | 0.328371 |
39b6bd6353821651a0a01cf687e78a807a34d494 | 337 | py | Python | tests/base_test_case.py | caoziyao/orm | 24121b8b10910c121a5dff19c6fd9f25ec7f425c | [
"MIT"
] | 1 | 2016-10-30T14:41:39.000Z | 2016-10-30T14:41:39.000Z | tests/base_test_case.py | caoziyao/orm | 24121b8b10910c121a5dff19c6fd9f25ec7f425c | [
"MIT"
] | null | null | null | tests/base_test_case.py | caoziyao/orm | 24121b8b10910c121a5dff19c6fd9f25ec7f425c | [
"MIT"
] | null | null | null | # coding: utf-8
"""
@author: csy
@license: (C) Copyright 2017-2018
@contact: wyzycao@gmail.com
@time: 2018/11/22
@desc:
"""
import unittest
from orm.data_base import Database
class BaseTestCase(unittest.TestCase):
def setUp(self):
url = 'mysql://root:zy123456@localhost/wiki?charset=utf8'
self.db... | 18.722222 | 65 | 0.688427 | 158 | 0.468843 | 0 | 0 | 0 | 0 | 0 | 0 | 174 | 0.51632 |
39b8f43a4fc39e9ee986451845affe8860e4df82 | 381 | py | Python | setup.py | kervi/kervi-hal-win | adb0d93f63b3ed36fd6527c69dc301a63a30138f | [
"MIT"
] | null | null | null | setup.py | kervi/kervi-hal-win | adb0d93f63b3ed36fd6527c69dc301a63a30138f | [
"MIT"
] | null | null | null | setup.py | kervi/kervi-hal-win | adb0d93f63b3ed36fd6527c69dc301a63a30138f | [
"MIT"
] | null | null | null | import distutils
from setuptools import setup
try:
from kervi.platforms.windows.version import VERSION
except:
VERSION = "0.0"
try:
distutils.dir_util.remove_tree("dist")
except:
pass
setup(
name='kervi-hal-win',
version=VERSION,
packages=[
"kervi/platforms/windows",
],
in... | 15.24 | 55 | 0.627297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.175853 |
39b9562e1c7649e5f232cd655226d45528bdfb68 | 877 | py | Python | examples/minimize_koopman_error.py | kijanac/Materia | b49af518c8eff7d3a8c6caff39783e3daf80a7a0 | [
"MIT"
] | null | null | null | examples/minimize_koopman_error.py | kijanac/Materia | b49af518c8eff7d3a8c6caff39783e3daf80a7a0 | [
"MIT"
] | null | null | null | examples/minimize_koopman_error.py | kijanac/Materia | b49af518c8eff7d3a8c6caff39783e3daf80a7a0 | [
"MIT"
] | null | null | null | import argparse
import materia as mtr
import dask.distributed
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--qcenv", type=str)
parser.add_argument("--scratch", type=str)
parser.add_argument("--dask_scratch", type=str)
parser.add_argument("--num_evals", type=int... | 31.321429 | 65 | 0.698974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.140251 |
39ba8a8ab31258dd5face8cc99e1f8cec294b091 | 300 | py | Python | simple/__init__.py | jbrid867/SIMPLE | 56e88c8271c22f7c41bd5d6b148b01e11a9e3713 | [
"Apache-2.0"
] | 1 | 2019-01-19T06:44:29.000Z | 2019-01-19T06:44:29.000Z | simple/__init__.py | jbrid867/SIMPLE | 56e88c8271c22f7c41bd5d6b148b01e11a9e3713 | [
"Apache-2.0"
] | 179 | 2018-10-02T21:07:19.000Z | 2020-09-08T17:38:44.000Z | simple/__init__.py | johnbridstrup/simple | 56e88c8271c22f7c41bd5d6b148b01e11a9e3713 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for simple."""
__author__ = """John Bridstrup"""
__email__ = 'john.bridstrup@gmail.com'
__version__ = '0.1.8'
# import Data
# import data_analysis
# import kernels
# import KMC
# import running
# import simple
# import simulations
# import statevector
| 17.647059 | 38 | 0.703333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 245 | 0.816667 |
39baf90e3f5d1892dbfa7337958aae37f41a76bf | 13,482 | py | Python | emarket/views.py | MerlinEmris/eBazar | f159314183a8a95afd97d36b0d3d8cf22015a512 | [
"MIT"
] | null | null | null | emarket/views.py | MerlinEmris/eBazar | f159314183a8a95afd97d36b0d3d8cf22015a512 | [
"MIT"
] | null | null | null | emarket/views.py | MerlinEmris/eBazar | f159314183a8a95afd97d36b0d3d8cf22015a512 | [
"MIT"
] | null | null | null | # from traceback import TracebackException
from django.contrib.auth.forms import UserCreationForm
# from django.contrib.auth.models import User
from django.contrib.auth import login, authenticate
from django.contrib.auth.decorators import login_required
from django.core.paginator import Paginator, EmptyPage, PageNotAn... | 34.480818 | 130 | 0.641893 | 2,010 | 0.149043 | 0 | 0 | 3,461 | 0.256637 | 0 | 0 | 2,859 | 0.211998 |
39bdb6e5ac777c1dbb29e8d29b5d3a629b8f1d14 | 3,683 | py | Python | cogs/misc.py | DoggieLicc/doggie-bot | 31400a32916e08cd5b7909cce17db66ea927d2e3 | [
"MIT"
] | 3 | 2021-08-30T16:51:04.000Z | 2021-09-13T17:04:29.000Z | cogs/misc.py | DoggieLicc/doggie-bot | 31400a32916e08cd5b7909cce17db66ea927d2e3 | [
"MIT"
] | 1 | 2021-08-30T15:29:37.000Z | 2021-09-09T23:59:47.000Z | cogs/misc.py | DoggieLicc/doggie-bot | 31400a32916e08cd5b7909cce17db66ea927d2e3 | [
"MIT"
] | null | null | null | import discord
import utils
import inspect
from discord.ext import commands
from io import StringIO
class Misc(commands.Cog):
"""Commands that show info about the bot"""
def __init__(self, bot: utils.CustomBot):
self.bot: utils.CustomBot = bot
@commands.command(aliases=['i', 'ping'])
async ... | 29 | 103 | 0.555525 | 3,540 | 0.95961 | 0 | 0 | 3,362 | 0.911358 | 3,168 | 0.858769 | 870 | 0.235836 |
39bfed4c3b2ea966740de31f26fe83daafbdbab5 | 171 | py | Python | setup.py | andribas404/splay_benchmark | 1ba2fe4d715b25db806c0b241c6adadd8d442a77 | [
"MIT"
] | null | null | null | setup.py | andribas404/splay_benchmark | 1ba2fe4d715b25db806c0b241c6adadd8d442a77 | [
"MIT"
] | null | null | null | setup.py | andribas404/splay_benchmark | 1ba2fe4d715b25db806c0b241c6adadd8d442a77 | [
"MIT"
] | null | null | null | """
Setup.
python setup.py build_ext --inplace
"""
from distutils.core import setup
from Cython.Build import cythonize
setup(ext_modules=cythonize('splay_tree.pyx'))
| 13.153846 | 46 | 0.760234 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.391813 |
39c13236092aa20981aa814b36bf7e898a69daef | 343 | py | Python | app.py | victorathanasio/KPI-test | cbc24ebc9b6e9304c7ff0428458c827d09bd99aa | [
"MIT"
] | null | null | null | app.py | victorathanasio/KPI-test | cbc24ebc9b6e9304c7ff0428458c827d09bd99aa | [
"MIT"
] | null | null | null | app.py | victorathanasio/KPI-test | cbc24ebc9b6e9304c7ff0428458c827d09bd99aa | [
"MIT"
] | null | null | null | from WebApp.mainapp import app
import dash_html_components as html
import flask
from REST_API.rest_api import API
from WebApp.Layout import Layout
app.layout = Layout()
app.server.register_blueprint(API)
server = app.server
if __name__ == '__main__':
# app.run_server(debug=False, host='0.0.0.0', port=90)
app.... | 24.5 | 58 | 0.766764 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.186589 |
39c16bfed4316959a8bb44396e89b0248bfc5ee5 | 719 | py | Python | URI/multiplicador.py | LuccasTraumer/pythonRepositorio | 52d4455cea0615c8eba7ab4c6224ce3350bbcf47 | [
"MIT"
] | null | null | null | URI/multiplicador.py | LuccasTraumer/pythonRepositorio | 52d4455cea0615c8eba7ab4c6224ce3350bbcf47 | [
"MIT"
] | null | null | null | URI/multiplicador.py | LuccasTraumer/pythonRepositorio | 52d4455cea0615c8eba7ab4c6224ce3350bbcf47 | [
"MIT"
] | null | null | null | '''
Leia 2 valores inteiros (A e B). Após, o programa deve mostrar uma mensagem "Sao Multiplos" ou
"Nao sao Multiplos", indicando se os valores lidos são múltiplos entre si.
'''
data = str(input())
values = data.split(' ')
first_value = int(values[0])
second_value = int(values[1])
if(second_value > first_value):
... | 27.653846 | 94 | 0.673157 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 251 | 0.347645 |
39c247e8b1fdf8e3efae1a8994e7cba05bbc1477 | 2,767 | py | Python | app/listeners.py | seratch/slack_learning_app_ja | 9552489b1d5d3adc61a7c73645a1ae09abc9d933 | [
"MIT"
] | 11 | 2020-10-28T08:04:16.000Z | 2022-03-18T09:12:29.000Z | app/listeners.py | seratch/slack_learning_app_ja | 9552489b1d5d3adc61a7c73645a1ae09abc9d933 | [
"MIT"
] | 1 | 2020-10-29T23:10:52.000Z | 2020-10-29T23:37:00.000Z | app/listeners.py | seratch/slack_learning_app_ja | 9552489b1d5d3adc61a7c73645a1ae09abc9d933 | [
"MIT"
] | null | null | null | import re
from slack_bolt import App
from app.onboarding import (
message_multi_users_select,
message_multi_users_select_lazy,
)
from app.tutorials import (
tutorial_page_transition,
tutorial_page_transition_lazy,
app_home_opened,
app_home_opened_lazy,
page1_home_tab_button_click,
page... | 30.744444 | 88 | 0.734731 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 514 | 0.185761 |
39c310b2a22377850644e8e3e7bb4274bb90e2dd | 1,213 | py | Python | project2/redactor.py | m-harikiran/cs5293sp21-project2 | 48547543001813aee17731399f617f82043e4a8f | [
"MIT"
] | null | null | null | project2/redactor.py | m-harikiran/cs5293sp21-project2 | 48547543001813aee17731399f617f82043e4a8f | [
"MIT"
] | null | null | null | project2/redactor.py | m-harikiran/cs5293sp21-project2 | 48547543001813aee17731399f617f82043e4a8f | [
"MIT"
] | null | null | null | import nltk
import re
from nltk.corpus import wordnet
# This method reads the file and redacts names in it and writes redacted data to file with extension python3.redacted
def redactNames(path):
data = open(path).read() # Reading the file to be redacted
tokenized_data = nltk.word_tokenize(data) # Sp... | 32.783784 | 117 | 0.660346 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 537 | 0.442704 |
39c3360de5ed5436c13f0b5c11ff3ff8f4c1e5e8 | 935 | py | Python | python3/max_area_of_island.py | joshiaj7/CodingChallenges | f95dd79132f07c296e074d675819031912f6a943 | [
"MIT"
] | 1 | 2020-10-08T09:17:40.000Z | 2020-10-08T09:17:40.000Z | python3/max_area_of_island.py | joshiaj7/CodingChallenges | f95dd79132f07c296e074d675819031912f6a943 | [
"MIT"
] | null | null | null | python3/max_area_of_island.py | joshiaj7/CodingChallenges | f95dd79132f07c296e074d675819031912f6a943 | [
"MIT"
] | null | null | null | # Space : O(n)
# Time : O(m*n)
class Solution:
def crawl(self, grid, x, y):
def bfs(dx, dy):
nonlocal area
if grid[dy][dx] == 1:
area += 1
grid[dy][dx] = 0
elif grid[dy][dx] == 0:
return
for ax, ay in c... | 25.972222 | 61 | 0.37754 | 894 | 0.95615 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.040642 |
39c42e302788d37384d6aba69dfd98df2d11d258 | 1,000 | py | Python | datasets/linear/parking/lr.py | diego1q2w/lregret | 823c7f609559d1012ed52f619b1aa1297d5f2517 | [
"Apache-2.0"
] | null | null | null | datasets/linear/parking/lr.py | diego1q2w/lregret | 823c7f609559d1012ed52f619b1aa1297d5f2517 | [
"Apache-2.0"
] | null | null | null | datasets/linear/parking/lr.py | diego1q2w/lregret | 823c7f609559d1012ed52f619b1aa1297d5f2517 | [
"Apache-2.0"
] | null | null | null | import os
from datetime import datetime
import time
import pandas as pd
from datasets.linear import LinearProblem
from regresion.linear.feature import PolFeatures
from regresion.linear.linear import LinearRegression
class ParkingProblem(LinearProblem):
def dataset_title(self) -> str:
return "Parking"
... | 29.411765 | 100 | 0.678 | 708 | 0.708 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.167 |
39c714143377ff9b1982f6d7182df1f2ee8d4c39 | 244 | py | Python | output/models/nist_data/atomic/name/schema_instance/nistschema_sv_iv_atomic_name_max_length_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/atomic/name/schema_instance/nistschema_sv_iv_atomic_name_max_length_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/atomic/name/schema_instance/nistschema_sv_iv_atomic_name_max_length_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.atomic.name.schema_instance.nistschema_sv_iv_atomic_name_max_length_1_xsd.nistschema_sv_iv_atomic_name_max_length_1 import NistschemaSvIvAtomicNameMaxLength1
__all__ = [
"NistschemaSvIvAtomicNameMaxLength1",
]
| 40.666667 | 186 | 0.889344 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.147541 |
39c80db6883ae8bab680917b15a4a104eed100d2 | 4,888 | py | Python | vl/h5/mg_genome/norm_h5.py | hurwitzlab/viral-learning | 8d7aebc0d58fa32a429f4a47593452ee2722ba82 | [
"MIT"
] | 1 | 2018-02-23T16:49:30.000Z | 2018-02-23T16:49:30.000Z | vl/h5/mg_genome/norm_h5.py | hurwitzlab/viral-learning | 8d7aebc0d58fa32a429f4a47593452ee2722ba82 | [
"MIT"
] | null | null | null | vl/h5/mg_genome/norm_h5.py | hurwitzlab/viral-learning | 8d7aebc0d58fa32a429f4a47593452ee2722ba82 | [
"MIT"
] | null | null | null | """
1. Normalizing the entire dataset with mean and variance, shuffle, compression=9 runs for more than 8 hours on
ocelote and results in a file of more than 150GB.
2. Try normalizing with only variance and without shuffle.
"""
import os.path
import sys
import time
import h5py
import numpy as np
def calculate_... | 35.678832 | 110 | 0.557897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,301 | 0.266162 |
39c9516fadde5be713c7c8c8f3a12e5d1178fce7 | 780 | py | Python | app/controller/api/fields/comment.py | Arianxx/LoniceraBlog | 1f13d336f42c7041b16293dc8f1af62cc98ce2f4 | [
"MIT"
] | 8 | 2018-09-08T04:41:01.000Z | 2018-09-08T13:15:59.000Z | app/controller/api/fields/comment.py | Arianxx/LoniceraBlog | 1f13d336f42c7041b16293dc8f1af62cc98ce2f4 | [
"MIT"
] | null | null | null | app/controller/api/fields/comment.py | Arianxx/LoniceraBlog | 1f13d336f42c7041b16293dc8f1af62cc98ce2f4 | [
"MIT"
] | 6 | 2018-09-08T08:51:50.000Z | 2018-09-11T00:29:20.000Z | from flask_restful import fields
from .custom import Num, EdgeUrl, PaginateUrl
getCommentField = {
"id": fields.Integer,
"time": fields.DateTime(attribute="timestamp"),
"author_name": fields.String(attribute="username"),
"article_id": fields.Integer(attribute="postid"),
"body": fields.String,
"... | 31.2 | 72 | 0.65 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.307692 |
39cc957ec5fbf6dc9322a11520c340004afd7af2 | 1,132 | py | Python | faq/templatetags/faq_tags.py | HerbyDE/jagdreisencheck-webapp | 9af5deda2423b787da88a0c893f3c474d8e4f73f | [
"BSD-3-Clause"
] | null | null | null | faq/templatetags/faq_tags.py | HerbyDE/jagdreisencheck-webapp | 9af5deda2423b787da88a0c893f3c474d8e4f73f | [
"BSD-3-Clause"
] | null | null | null | faq/templatetags/faq_tags.py | HerbyDE/jagdreisencheck-webapp | 9af5deda2423b787da88a0c893f3c474d8e4f73f | [
"BSD-3-Clause"
] | null | null | null | from django import template
from faq.forms import FaqInstanceForm, FaqAnswerForm
from faq.models import FaqInstance, FaqAnswer
register = template.Library()
@register.inclusion_tag('faq/jagdreisencheck/create-question-form.html', takes_context=True)
def create_question_form(context, model, identifier):
form = ... | 28.3 | 104 | 0.754417 | 0 | 0 | 0 | 0 | 964 | 0.85159 | 0 | 0 | 232 | 0.204947 |
39cd092c9896194e7d5884416a86b0b247f8dee4 | 486 | py | Python | markflow/detectors/__init__.py | jmholla/markflow | 1accc4a23f9c06d9ab77d6c180c586da3d9ec69b | [
"Apache-2.0"
] | 14 | 2020-08-14T03:09:53.000Z | 2022-03-22T22:46:50.000Z | markflow/detectors/__init__.py | jmholla/markflow | 1accc4a23f9c06d9ab77d6c180c586da3d9ec69b | [
"Apache-2.0"
] | 6 | 2020-08-19T18:13:24.000Z | 2021-02-11T03:56:34.000Z | markflow/detectors/__init__.py | jmholla/markflow | 1accc4a23f9c06d9ab77d6c180c586da3d9ec69b | [
"Apache-2.0"
] | 3 | 2020-08-13T16:40:13.000Z | 2022-01-18T12:31:37.000Z | # flake8: noqa
"""
MarkFlow MarkDown Section Detection Library
This library provide this functions MarkFlow uses to split a document into it's
individual text types.
"""
from .atx_heading import *
from .blank_line import *
from .block_quote import *
from .fenced_code_block import *
from .indented_code_block import *
f... | 25.578947 | 79 | 0.788066 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.347737 |
39cd57d3e96930bf2512f61084f0ec5dbd909936 | 2,129 | py | Python | django_project/apps/qfauth/forms.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | django_project/apps/qfauth/forms.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | django_project/apps/qfauth/forms.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from django import forms
from apps.forms import FormMixin
from django.core import validators
from .models import User
from django.core.cache import cache
class LoginForm(forms.Form,FormMixin):
telephone = forms.CharField(max_length=11,min_length=11)
password = forms.CharField(max_length=30,min_length=6,error_me... | 43.44898 | 136 | 0.716768 | 2,255 | 0.933747 | 0 | 0 | 0 | 0 | 0 | 0 | 613 | 0.25383 |
39cf488b67a5b1e7312e55ca067c9bf0bfbe9c6e | 156 | py | Python | receives/pytest.py | felixsch/receives | 0d149e3a24c0377ac60d502736299c9f4348244a | [
"MIT"
] | null | null | null | receives/pytest.py | felixsch/receives | 0d149e3a24c0377ac60d502736299c9f4348244a | [
"MIT"
] | null | null | null | receives/pytest.py | felixsch/receives | 0d149e3a24c0377ac60d502736299c9f4348244a | [
"MIT"
] | null | null | null |
import pytest
from receives.receiver import Receiver
@pytest.fixture
def receive():
receiver = Receiver()
yield receiver
receiver.finalize()
| 14.181818 | 38 | 0.730769 | 0 | 0 | 83 | 0.532051 | 99 | 0.634615 | 0 | 0 | 0 | 0 |
39cfddaaca78d75a0a19c8026c9b58cbdca9cec8 | 18,099 | py | Python | contracts/crawler.py | waldyrious/public-contracts | 3107ddc007f3574ce19aaa2223399484bc6b1382 | [
"BSD-3-Clause"
] | 25 | 2015-03-05T00:15:11.000Z | 2021-04-04T18:50:43.000Z | contracts/crawler.py | waldyrious/public-contracts | 3107ddc007f3574ce19aaa2223399484bc6b1382 | [
"BSD-3-Clause"
] | 36 | 2015-03-21T17:04:54.000Z | 2017-07-06T10:35:51.000Z | contracts/crawler.py | waldyrious/public-contracts | 3107ddc007f3574ce19aaa2223399484bc6b1382 | [
"BSD-3-Clause"
] | 7 | 2015-03-24T16:18:02.000Z | 2019-05-29T11:51:01.000Z | import json
import logging
from django.core.exceptions import ValidationError
from django.db import transaction
from django.forms import DateField, CharField
import requests
import requests.exceptions
from . import models
from contracts.crawler_forms import EntityForm, ContractForm, \
TenderForm, clean_place, Pr... | 35.627953 | 82 | 0.560749 | 17,711 | 0.978562 | 0 | 0 | 3,896 | 0.215261 | 0 | 0 | 5,006 | 0.27659 |
39d2a63c210e03ad35c58e5b3b5e1afaa5b2db56 | 36,251 | py | Python | com/precisely/apis/model/validate_mailing_address_uscanapi_options.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | com/precisely/apis/model/validate_mailing_address_uscanapi_options.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | com/precisely/apis/model/validate_mailing_address_uscanapi_options.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | """
Precisely APIs
Enhance & enrich your data, applications, business processes, and workflows with rich location, information, and identify APIs. # noqa: E501
The version of the OpenAPI document: 11.9.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F4... | 83.914352 | 290 | 0.670354 | 35,547 | 0.980418 | 0 | 0 | 30,771 | 0.848691 | 0 | 0 | 30,710 | 0.847009 |
39d42321cd5a87223e9348e07673ab77d3799ca1 | 105 | py | Python | serverless/aws/features/__init__.py | captain-fox/serverless-builder | d79d120578d692dd34dd2f0a3bb75cc8ec719c81 | [
"MIT"
] | 3 | 2022-03-16T14:25:03.000Z | 2022-03-24T15:04:55.000Z | serverless/aws/features/__init__.py | captain-fox/serverless-builder | d79d120578d692dd34dd2f0a3bb75cc8ec719c81 | [
"MIT"
] | 3 | 2022-01-24T20:11:15.000Z | 2022-01-26T19:33:20.000Z | serverless/aws/features/__init__.py | epsyhealth/serverless-builder | 6a1f943b5cabc4c4748234b1623a9ced6464043a | [
"MIT"
] | 1 | 2022-02-15T13:54:29.000Z | 2022-02-15T13:54:29.000Z | from .api_handler import DefaultFourHundredResponse
from .api_keys import ApiKeys
from .xray import XRay
| 26.25 | 51 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
39d50b087b533ec75540f6aeefa21a97dbda7cfa | 7,392 | py | Python | tests/unit/test_resources.py | butla/PyDAS | 39df5abbe9563b58da7caaa191b89852fb122ab7 | [
"MIT"
] | 13 | 2016-06-29T13:35:05.000Z | 2021-05-25T09:47:31.000Z | tests/unit/test_resources.py | butla/PyDAS | 39df5abbe9563b58da7caaa191b89852fb122ab7 | [
"MIT"
] | 1 | 2016-07-11T23:11:33.000Z | 2016-07-11T23:11:33.000Z | tests/unit/test_resources.py | butla/PyDAS | 39df5abbe9563b58da7caaa191b89852fb122ab7 | [
"MIT"
] | 3 | 2017-10-17T15:54:25.000Z | 2022-03-24T01:11:37.000Z | import copy
import json
import os
from unittest.mock import MagicMock, call
from bravado.client import SwaggerClient
import bravado.exception
from bravado_falcon import FalconHttpClient
import falcon
import pytest
import pytest_falcon.plugin
import responses
import yaml
from data_acquisition.acquisition_request impor... | 38.103093 | 97 | 0.759199 | 0 | 0 | 0 | 0 | 2,697 | 0.364854 | 0 | 0 | 653 | 0.088339 |
39d5975250cb33441f80fb188d15a624f07f6415 | 4,216 | py | Python | GraphOfDocs.py | NC0DER/GraphOfDocs | 16603de9d8695ae8205117aa7123707d1dcbe0e0 | [
"Apache-2.0"
] | 12 | 2020-01-27T20:26:08.000Z | 2022-03-10T14:45:09.000Z | GraphOfDocs.py | NC0DER/GraphOfDocs | 16603de9d8695ae8205117aa7123707d1dcbe0e0 | [
"Apache-2.0"
] | 1 | 2021-11-17T11:45:55.000Z | 2021-11-17T11:45:55.000Z | GraphOfDocs.py | NC0DER/GraphOfDocs | 16603de9d8695ae8205117aa7123707d1dcbe0e0 | [
"Apache-2.0"
] | 2 | 2020-01-27T13:17:11.000Z | 2020-01-29T09:35:22.000Z | import sys
import platform
from neo4j import ServiceUnavailable
from GraphOfDocs.neo4j_wrapper import Neo4jDatabase
from GraphOfDocs.utils import generate_words, read_dataset, clear_screen
from GraphOfDocs.parse_args import parser
from GraphOfDocs.create import *
def graphofdocs(create, initialize, dirpath, wi... | 43.916667 | 95 | 0.64777 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,854 | 0.439753 |
39d61db6e252ece16991b4c554bc384accb4d908 | 27,144 | py | Python | line/f_MessageService.py | winbotscript/LineService | 4c79029648e858e567378485e75276f865c1f73f | [
"Apache-2.0"
] | 1 | 2020-08-20T08:00:23.000Z | 2020-08-20T08:00:23.000Z | line/f_MessageService.py | winbotscript/LineService | 4c79029648e858e567378485e75276f865c1f73f | [
"Apache-2.0"
] | null | null | null | line/f_MessageService.py | winbotscript/LineService | 4c79029648e858e567378485e75276f865c1f73f | [
"Apache-2.0"
] | null | null | null | #
# Autogenerated by Frugal Compiler (3.4.3)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
from threading import Lock
from frugal.middleware import Method
from frugal.exceptions import TApplicationExceptionType
from frugal.exceptions import TTransportExceptionType
from frugal.processor impo... | 35.57536 | 171 | 0.597222 | 26,053 | 0.959807 | 0 | 0 | 0 | 0 | 0 | 0 | 2,997 | 0.110411 |
39d6297dad17364278641be6d1ed6ea276348300 | 886 | py | Python | Medium/279. Perfect Squares/solution (2).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 3 | 2020-05-09T12:55:09.000Z | 2022-03-11T18:56:05.000Z | Medium/279. Perfect Squares/solution (2).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | null | null | null | Medium/279. Perfect Squares/solution (2).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 1 | 2022-03-11T18:56:16.000Z | 2022-03-11T18:56:16.000Z | # 279. Perfect Squares
# Runtime: 60 ms, faster than 96.81% of Python3 online submissions for Perfect Squares.
# Memory Usage: 14.7 MB, less than 42.95% of Python3 online submissions for Perfect Squares.
class Solution:
# Greedy Enumeration
def numSquares(self, n: int) -> int:
square_nums = set([i *... | 30.551724 | 97 | 0.555305 | 678 | 0.765237 | 0 | 0 | 0 | 0 | 0 | 0 | 338 | 0.38149 |
39d67d232e49de41fe6fece39a3376037a1fe5cc | 1,650 | py | Python | simulator/card_defs.py | NewLordVile/alphasheep | 2a86cf0009b686edafee8c80aa961d7075a5bd46 | [
"MIT"
] | 8 | 2019-11-25T22:05:58.000Z | 2022-01-19T23:48:39.000Z | simulator/card_defs.py | NewLordVile/alphasheep | 2a86cf0009b686edafee8c80aa961d7075a5bd46 | [
"MIT"
] | 5 | 2019-12-23T12:43:40.000Z | 2020-03-19T19:16:46.000Z | simulator/card_defs.py | NewLordVile/alphasheep | 2a86cf0009b686edafee8c80aa961d7075a5bd46 | [
"MIT"
] | 4 | 2020-03-14T21:25:29.000Z | 2022-01-27T22:59:31.000Z | """
Definitions for Card, Suit, Pip, etc.
WARN: DO NOT CHANGE THE ENUMS IN THIS FILE!
Changing the values might affect the ordering of the state/action space of agents, and will break compatibility with previously
saved model checkpoints.
"""
from enum import IntEnum
class Suit(IntEnum):
schellen = 0
herz =... | 23.571429 | 129 | 0.633333 | 1,096 | 0.664242 | 0 | 0 | 0 | 0 | 0 | 0 | 602 | 0.364848 |
39d6fc42a60ee57ea74155e98d6216d785fa855c | 2,720 | py | Python | server/perform_action/common.py | darrenfoong/battleships | 2866207b3a55d24fc085beedbd735d489990e487 | [
"MIT"
] | 11 | 2020-01-15T14:25:48.000Z | 2021-11-25T04:21:18.000Z | server/perform_action/common.py | darrenfoong/battleships | 2866207b3a55d24fc085beedbd735d489990e487 | [
"MIT"
] | 8 | 2021-02-04T16:41:57.000Z | 2022-03-29T21:57:15.000Z | esp8266/common.py | pythings/PythingsOS | 276b41a32af7fa0d5395b2bb308e611f784f9711 | [
"Apache-2.0"
] | null | null | null |
MAX_COPIES = 2
RECV_SIZE = 1024
SEND_SIZE = 1024
SERVER_IP = "172.24.1.107"
SERVER_PORT = 10000
def recv_line(conn):
data = ""
data += conn.recv(RECV_SIZE)
# data += conn.recv(RECV_SIZE).decode("utf-8")
return data
def make_request(entity_type, type, filename = None, auth = None, filesize = None, ip ... | 28.93617 | 190 | 0.683824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,010 | 0.371324 |
39da37adde81c90589b9c7e68358e7bc3b53628e | 1,361 | py | Python | repeat_samples.py | xiz675/OpenNMT-py | eaee466437d6a2f7c06a2401f9a8ef6c7757cabd | [
"MIT"
] | null | null | null | repeat_samples.py | xiz675/OpenNMT-py | eaee466437d6a2f7c06a2401f9a8ef6c7757cabd | [
"MIT"
] | null | null | null | repeat_samples.py | xiz675/OpenNMT-py | eaee466437d6a2f7c06a2401f9a8ef6c7757cabd | [
"MIT"
] | null | null | null | def repeat(srcs, convs, tags):
new_src = []
new_conv = []
new_tag = []
print("size before repeat: " + str(len(srcs)))
for i in zip(srcs, convs, tags):
tag_list = i[2].split(";")
for j in range(len(tag_list)):
new_src.append(i[0])
new_conv.append(i[1])
... | 28.957447 | 64 | 0.603968 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 181 | 0.13299 |
39daa2204b3c5436de83103da0b269b9aadad179 | 1,540 | py | Python | tests/test_movies.py | dipakgupta12/taste_dive | 37df3f67e6efdf961cca230a4b2c8cfe23a38984 | [
"MIT"
] | null | null | null | tests/test_movies.py | dipakgupta12/taste_dive | 37df3f67e6efdf961cca230a4b2c8cfe23a38984 | [
"MIT"
] | null | null | null | tests/test_movies.py | dipakgupta12/taste_dive | 37df3f67e6efdf961cca230a4b2c8cfe23a38984 | [
"MIT"
] | null | null | null | import mock
def test_index_template(app, client, db, captured_templates):
res = client.get('/')
assert res.status_code == 200
template, context = captured_templates[0]
assert template.name == "index.html"
@mock.patch("taste_dive.main.routes.get_movies", mock.MagicMock(return_value=[{"Title": "Fast &... | 42.777778 | 114 | 0.701948 | 0 | 0 | 0 | 0 | 1,306 | 0.848052 | 0 | 0 | 459 | 0.298052 |
39dce94f390b2bc845f4a4548517b2bf61e50466 | 5,711 | py | Python | CiscoWebAuthManager.py | darizotas/ciscowebauth | aaac65b5e78fe3246f0d4dedaf44eea4d8d293cb | [
"BSD-3-Clause"
] | 1 | 2018-01-22T04:43:39.000Z | 2018-01-22T04:43:39.000Z | CiscoWebAuthManager.py | darizotas/ciscowebauth | aaac65b5e78fe3246f0d4dedaf44eea4d8d293cb | [
"BSD-3-Clause"
] | null | null | null | CiscoWebAuthManager.py | darizotas/ciscowebauth | aaac65b5e78fe3246f0d4dedaf44eea4d8d293cb | [
"BSD-3-Clause"
] | null | null | null | """Script that establishes a session in a wireless network managed by Cisco Web Authentication.
This script requests for re-establishing a session in a wireless network managed by Cisco Web
Authentication.
Copyright 2013 Dario B. darizotas at gmail dot com
This software is licensed under a new BSD License.
Unported... | 34.823171 | 102 | 0.615654 | 3,582 | 0.627211 | 0 | 0 | 0 | 0 | 0 | 0 | 1,958 | 0.342847 |
39dee2f2383aa49564e67055109a18b1b7a24546 | 192 | py | Python | qr_code/urls.py | mapreri/django-qr-code | 4792dcc19f04b0915dc715ba83ae22372aa78ce9 | [
"BSD-3-Clause"
] | null | null | null | qr_code/urls.py | mapreri/django-qr-code | 4792dcc19f04b0915dc715ba83ae22372aa78ce9 | [
"BSD-3-Clause"
] | null | null | null | qr_code/urls.py | mapreri/django-qr-code | 4792dcc19f04b0915dc715ba83ae22372aa78ce9 | [
"BSD-3-Clause"
] | null | null | null | from django.urls import path
from qr_code import views
app_name = 'qr_code'
urlpatterns = [
path('images/serve-qr-code-image/', views.serve_qr_code_image, name='serve_qr_code_image')
]
| 19.2 | 94 | 0.755208 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.307292 |
39df74f7e7ea40de0f014c2a1bd6b468baf99ae0 | 974 | py | Python | matching.py | siweiwang24/marriage | d0f041ef380562885177418944791491949d024e | [
"MIT"
] | null | null | null | matching.py | siweiwang24/marriage | d0f041ef380562885177418944791491949d024e | [
"MIT"
] | null | null | null | matching.py | siweiwang24/marriage | d0f041ef380562885177418944791491949d024e | [
"MIT"
] | null | null | null | """
Stable Marriage Problem solution using Gale-Shapley.
Copyright 2020. Siwei Wang.
"""
# pylint: disable=no-value-for-parameter
from typing import Optional
from click import command, option, Path
from read_validate import get_smp
from marriage import compute_smp
from write import print_results
@command()
@option('... | 32.466667 | 69 | 0.724846 | 0 | 0 | 0 | 0 | 633 | 0.649897 | 0 | 0 | 333 | 0.341889 |
39e0cfb770931442146ef89aab0fb46b52dd6602 | 7,908 | py | Python | chimeric_blacklist.py | regnveig/juicer1.6_compact | 21cd24f4c711640584965704f4fa72e5a25b76e3 | [
"MIT"
] | null | null | null | chimeric_blacklist.py | regnveig/juicer1.6_compact | 21cd24f4c711640584965704f4fa72e5a25b76e3 | [
"MIT"
] | null | null | null | chimeric_blacklist.py | regnveig/juicer1.6_compact | 21cd24f4c711640584965704f4fa72e5a25b76e3 | [
"MIT"
] | null | null | null | import pysam
import json
import bisect
import subprocess
def LoadFragmentMap(RestrSitesMap):
FragmentMap = {}
with open(RestrSitesMap, 'rt') as MapFile:
for Contig in MapFile:
List = Contig[:-1].split(' ')
FragmentMap[List[0]] = [int(item) for item in List[1:]]
return FragmentMap
def CalcDist(Item1, Item2)... | 55.300699 | 386 | 0.661861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,284 | 0.288821 |
39e1251d560049f22f859dac5fed8e5ec4b4ca80 | 95 | py | Python | solutions/carrots.py | dx-dt/Kattis | 62856999ae2ac43dab81f87beeac5bf8979528f5 | [
"Unlicense"
] | null | null | null | solutions/carrots.py | dx-dt/Kattis | 62856999ae2ac43dab81f87beeac5bf8979528f5 | [
"Unlicense"
] | null | null | null | solutions/carrots.py | dx-dt/Kattis | 62856999ae2ac43dab81f87beeac5bf8979528f5 | [
"Unlicense"
] | null | null | null | # https://open.kattis.com/problems/carrots
import sys
print sys.stdin.read().split()[1]
| 15.833333 | 43 | 0.684211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.452632 |
39e14dad20bbe0a515df5d2bbdc11d428ec81e56 | 1,799 | py | Python | yacht/data/transforms.py | IusztinPaul/yacht | c68ab7c66bde860bb91534c29e97772ba328adb5 | [
"Apache-2.0"
] | 5 | 2021-09-03T10:16:50.000Z | 2022-02-28T07:32:43.000Z | yacht/data/transforms.py | IusztinPaul/yacht | c68ab7c66bde860bb91534c29e97772ba328adb5 | [
"Apache-2.0"
] | null | null | null | yacht/data/transforms.py | IusztinPaul/yacht | c68ab7c66bde860bb91534c29e97772ba328adb5 | [
"Apache-2.0"
] | 1 | 2022-03-05T16:06:46.000Z | 2022-03-05T16:06:46.000Z | from abc import ABC, abstractmethod
from typing import Any, List, Optional
import pandas as pd
from yacht.config import Config
class Transform(ABC):
@abstractmethod
def __call__(self, sample: Any) -> Any:
pass
class Compose(Transform):
def __init__(self, transforms: List[Transform]):
s... | 27.676923 | 119 | 0.625347 | 1,112 | 0.618121 | 0 | 0 | 72 | 0.040022 | 0 | 0 | 274 | 0.152307 |
39e198255bc72ec3d147506eb38e23671a7f0cb4 | 4,088 | py | Python | bot.py | gilgamezh/registration_desk | 98303a6f96be78e0c1898a523db761f6d19866fc | [
"MIT"
] | null | null | null | bot.py | gilgamezh/registration_desk | 98303a6f96be78e0c1898a523db761f6d19866fc | [
"MIT"
] | null | null | null | bot.py | gilgamezh/registration_desk | 98303a6f96be78e0c1898a523db761f6d19866fc | [
"MIT"
] | null | null | null | import csv
import logging
import os
import discord
from discord.ext import commands, tasks
from discord.utils import get
# logging config
logging.basicConfig(
filename=".log/reg.log",
format="%(asctime)s - %(message)s",
level=logging.INFO,
datefmt="%d-%b-%y %H:%M:%S",
)
# set up channel ids and enviro... | 34.066667 | 315 | 0.613748 | 0 | 0 | 0 | 0 | 1,952 | 0.476563 | 1,911 | 0.466553 | 1,395 | 0.340576 |
39e1a049e695d46df354014950cf2221cf9cdc1c | 1,551 | py | Python | src/gameServer.py | LesGameDevToolsMagique/GameEditor | 06bed29845ded5cca35e57a3dd457dc72c2a2e8e | [
"MIT"
] | null | null | null | src/gameServer.py | LesGameDevToolsMagique/GameEditor | 06bed29845ded5cca35e57a3dd457dc72c2a2e8e | [
"MIT"
] | null | null | null | src/gameServer.py | LesGameDevToolsMagique/GameEditor | 06bed29845ded5cca35e57a3dd457dc72c2a2e8e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# skeleton from http://kmkeen.com/socketserver/2009-04-03-13-45-57-003.html
import socketserver, subprocess, sys
from threading import Thread
from pprint import pprint
import json
my_unix_command = ['bc']
HOST = 'localhost'
PORT = 12321
with open('storage.json') as data_file:
JSONdata = js... | 31.02 | 78 | 0.648614 | 816 | 0.526112 | 0 | 0 | 0 | 0 | 0 | 0 | 277 | 0.178594 |
39e3fc7a595793dc10754a5adbe8f528668e75d2 | 360 | py | Python | src/keycloakclient/aio/openid_connect.py | phoebebright/python-keycloak-client | 8590fbcdbda8edbe993a01bbff06d9d9be679c5e | [
"MIT"
] | null | null | null | src/keycloakclient/aio/openid_connect.py | phoebebright/python-keycloak-client | 8590fbcdbda8edbe993a01bbff06d9d9be679c5e | [
"MIT"
] | null | null | null | src/keycloakclient/aio/openid_connect.py | phoebebright/python-keycloak-client | 8590fbcdbda8edbe993a01bbff06d9d9be679c5e | [
"MIT"
] | null | null | null | from keycloakclient.aio.mixins import WellKnownMixin
from keycloakclient.openid_connect import (
KeycloakOpenidConnect as SyncKeycloakOpenidConnect,
PATH_WELL_KNOWN,
)
__all__ = (
'KeycloakOpenidConnect',
)
class KeycloakOpenidConnect(WellKnownMixin, SyncKeycloakOpenidConnect):
def get_path_well_know... | 24 | 71 | 0.8 | 137 | 0.380556 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.063889 |
39e4afc96a10bdb1d7dfe165b5b83d57bfbc7c47 | 9,987 | py | Python | multi_script_editor/jedi/evaluate/precedence.py | paulwinex/pw_multiScriptEditor | e447e99f87cb07e238baf693b7e124e50efdbc51 | [
"MIT"
] | 142 | 2015-03-21T12:56:21.000Z | 2022-02-08T04:42:46.000Z | jedi/evaluate/precedence.py | blueyed/jedi | a01e4c6b375795bb8c8ee0d4e86d4c535456f5b4 | [
"MIT"
] | 18 | 2015-05-06T21:14:14.000Z | 2015-08-29T18:24:43.000Z | jedi/evaluate/precedence.py | blueyed/jedi | a01e4c6b375795bb8c8ee0d4e86d4c535456f5b4 | [
"MIT"
] | 51 | 2016-05-07T14:27:42.000Z | 2022-02-10T05:55:11.000Z | """
Handles operator precedence.
"""
from jedi._compatibility import unicode
from jedi.parser import representation as pr
from jedi import debug
from jedi.common import PushBackIterator
from jedi.evaluate.compiled import CompiledObject, create, builtin
from jedi.evaluate import analysis
class PythonGrammar(object):
... | 33.513423 | 88 | 0.601382 | 2,624 | 0.262742 | 0 | 0 | 0 | 0 | 0 | 0 | 1,538 | 0.154 |
39e817d468144ef60c9cbbd969d60eec454c7689 | 1,967 | py | Python | search.py | manimaul/mxmcc | 923458b759c8daa74dd969e968bc72b17fdffe02 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2016-08-24T21:30:45.000Z | 2016-08-24T21:30:45.000Z | search.py | manimaul/mxmcc | 923458b759c8daa74dd969e968bc72b17fdffe02 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 5 | 2021-03-18T23:25:15.000Z | 2022-03-11T23:44:20.000Z | search.py | manimaul/mxmcc | 923458b759c8daa74dd969e968bc72b17fdffe02 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
__author__ = 'Will Kamp'
__copyright__ = 'Copyright 2013, Matrix Mariner Inc.'
__license__ = 'BSD'
__email__ = 'will@mxmariner.com'
__status__ = 'Development' # 'Prototype', 'Development', or 'Production'
import os
class MapPathSearch:
def __init__(self, directory, map_extensions=['kap', ... | 34.508772 | 120 | 0.56482 | 1,264 | 0.642603 | 0 | 0 | 0 | 0 | 0 | 0 | 924 | 0.469751 |
39e9b24961999fcc48a120276aefb45a23005614 | 1,585 | py | Python | ggui/style.py | arthur-hav/GGUI | b64495546541bafa168daa150a4de86569fe1242 | [
"MIT"
] | 1 | 2021-02-03T13:33:14.000Z | 2021-02-03T13:33:14.000Z | ggui/style.py | arthur-hav/GGUI | b64495546541bafa168daa150a4de86569fe1242 | [
"MIT"
] | null | null | null | ggui/style.py | arthur-hav/GGUI | b64495546541bafa168daa150a4de86569fe1242 | [
"MIT"
] | null | null | null |
class Style:
def __init__(self,
parent_styles=None,
color=(0, 0, 0, 0),
hover_color=None,
click_color=None,
disabled_color=None,
border_color=None,
border_line_w=0,
fade_in_time=0... | 38.658537 | 98 | 0.581073 | 1,583 | 0.998738 | 0 | 0 | 88 | 0.055521 | 0 | 0 | 159 | 0.100315 |
39ebe1a3f9b6deca1adc431db80e1a994f12644b | 5,041 | py | Python | fsh_validator/cli.py | glichtner/fsh-validator | c3b16546221c8d43c24bcee426ec7882938305bd | [
"BSD-3-Clause"
] | null | null | null | fsh_validator/cli.py | glichtner/fsh-validator | c3b16546221c8d43c24bcee426ec7882938305bd | [
"BSD-3-Clause"
] | 1 | 2022-03-01T16:06:09.000Z | 2022-03-01T16:06:09.000Z | fsh_validator/cli.py | glichtner/fsh-validator | c3b16546221c8d43c24bcee426ec7882938305bd | [
"BSD-3-Clause"
] | null | null | null | """Command line interface for fsh-validator."""
import os
import sys
import argparse
from pathlib import Path
import yaml
from .fsh_validator import (
print_box,
run_sushi,
validate_all_fsh,
validate_fsh,
download_validator,
bcolors,
VALIDATOR_BASENAME,
store_log,
assert_sushi_instal... | 26.671958 | 115 | 0.623686 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,225 | 0.243007 |
39ec0f238d1f205a702d9a13cc4aec9895df5afa | 475 | py | Python | core/util/read_input.py | SimoneABNto/Progetto_ASD_py | b415bcc3581121c5c39e044ac3fbb92420964e68 | [
"MIT"
] | null | null | null | core/util/read_input.py | SimoneABNto/Progetto_ASD_py | b415bcc3581121c5c39e044ac3fbb92420964e68 | [
"MIT"
] | null | null | null | core/util/read_input.py | SimoneABNto/Progetto_ASD_py | b415bcc3581121c5c39e044ac3fbb92420964e68 | [
"MIT"
] | null | null | null | def read_input():
try:
data = input().replace(" ", "") # take the input and remove the extra spaces
input_array = data.split(",") # split the sub substring
input_array[-1] = input_array[-1][:-1]
array = []
for el in input_array:
array.append(float(el)) # conv... | 26.388889 | 85 | 0.555789 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.286316 |