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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d9265bc8d9e395e0e1f4b2ccd82a397094568300 | 324 | py | Python | flask-portal/app/referral_api.py | TUMTICS-Dev/Talent-Pool | c51376453184e7a83d684ab5f9467535d49cc784 | [
"MIT"
] | null | null | null | flask-portal/app/referral_api.py | TUMTICS-Dev/Talent-Pool | c51376453184e7a83d684ab5f9467535d49cc784 | [
"MIT"
] | null | null | null | flask-portal/app/referral_api.py | TUMTICS-Dev/Talent-Pool | c51376453184e7a83d684ab5f9467535d49cc784 | [
"MIT"
] | null | null | null | from abc import ABC
class Refferal_API(ABC):
def __init__(self):
# TODO
pass
def NewVacancy():
# TODO
pass
def NewApplication():
# TODO
pass
def NotifyReferrer():
# TODO
pass
def NotifyApplicant():
# TODO
pass
... | 13.5 | 26 | 0.481481 | 298 | 0.919753 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.092593 |
d92747989c01c959e00977a548eb19a60491a46f | 502 | py | Python | sms_voting/migrations/0012_auto_20211110_0517.py | Fedor-Lyanguzov/Voting | 98f8fd958624fa9ba3835836c525fbb4abb6b5e5 | [
"MIT"
] | null | null | null | sms_voting/migrations/0012_auto_20211110_0517.py | Fedor-Lyanguzov/Voting | 98f8fd958624fa9ba3835836c525fbb4abb6b5e5 | [
"MIT"
] | 1 | 2021-12-04T11:43:25.000Z | 2021-12-04T11:43:25.000Z | sms_voting/migrations/0012_auto_20211110_0517.py | Fedor-Lyanguzov/Voting | 98f8fd958624fa9ba3835836c525fbb4abb6b5e5 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-11-10 05:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sms_voting', '0011_auto_20211110_0502'),
]
operations = [
migrations.RemoveField(
model_name='bulletin',
name='resul... | 21.826087 | 50 | 0.575697 | 409 | 0.814741 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.260956 |
d9299b500db19594cc491478d54c215f25629150 | 670 | py | Python | app/platform.py | edwarts/igenweb_supplier | 90e03b7acdedf65ae6b338d39b067bd4d1c0eaad | [
"MIT"
] | null | null | null | app/platform.py | edwarts/igenweb_supplier | 90e03b7acdedf65ae6b338d39b067bd4d1c0eaad | [
"MIT"
] | null | null | null | app/platform.py | edwarts/igenweb_supplier | 90e03b7acdedf65ae6b338d39b067bd4d1c0eaad | [
"MIT"
] | null | null | null | import os
from config import config
def getpath(path):
base_path = os.path.join(config.upload_path, 'app', 'static',
'upload')
UPLOAD_LICENCE_FOLDER = os.path.join(base_path, 'licence')
UPLOAD_COVER_FOLDER = os.path.join(base_path, 'cover')
UPLOAD_PIECE_FOLDER = os.path.jo... | 31.904762 | 65 | 0.658209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.129851 |
d92ba4c735d6a176f4e2696a38a3cab4031d7e30 | 5,551 | py | Python | csvfit/fitpt.py | hanKo91/csvfit | 0b07929235f0531ea3b21df2d550390f680edfcf | [
"MIT"
] | null | null | null | csvfit/fitpt.py | hanKo91/csvfit | 0b07929235f0531ea3b21df2d550390f680edfcf | [
"MIT"
] | null | null | null | csvfit/fitpt.py | hanKo91/csvfit | 0b07929235f0531ea3b21df2d550390f680edfcf | [
"MIT"
] | null | null | null | from click.exceptions import FileError
from scipy.optimize import curve_fit
import matplotlib.pyplot as plt
from . import util
import numpy as np
import click
import sys
import csv
import os
def pt1(t, K, T):
""" time-domain solution/formula for
a first-order/pt1 system
Args:
t (float): time
K (float): ... | 27.755 | 110 | 0.611421 | 0 | 0 | 0 | 0 | 2,747 | 0.494866 | 0 | 0 | 1,958 | 0.352729 |
d92be7a0a2a9418b2f005b72010bbabb90745df1 | 2,632 | py | Python | commands/Premium/premium.py | adl212/Lacan-NTSport-Source-Code | b5b01cbb5cc97b5cbd3a6ebcf90c2e6d82322968 | [
"MIT"
] | 1 | 2021-04-25T18:31:48.000Z | 2021-04-25T18:31:48.000Z | commands/Premium/premium.py | adl212/Lacan-NTSport-Source-Code | b5b01cbb5cc97b5cbd3a6ebcf90c2e6d82322968 | [
"MIT"
] | 6 | 2021-03-26T21:18:57.000Z | 2021-05-03T18:04:37.000Z | commands/Premium/premium.py | adl212/Lacan-NTSport-Source-Code | b5b01cbb5cc97b5cbd3a6ebcf90c2e6d82322968 | [
"MIT"
] | 4 | 2021-03-06T16:48:36.000Z | 2021-05-23T00:54:09.000Z | '''What is premium?'''
from discord.ext import commands
from packages.utils import Embed, ImproperType
class Command(commands.Cog):
def __init__(self, client):
self.client= client
@commands.command()
async def premium(self, ctx):
#return await ctx.send('This command is currently under... | 101.230769 | 1,054 | 0.720365 | 2,479 | 0.937949 | 0 | 0 | 2,380 | 0.900492 | 2,356 | 0.891411 | 2,095 | 0.79266 |
d92e5de5ecf3982b6bb7d90e259217262a07f9b5 | 4,435 | py | Python | wireless_emulator/cli.py | Melacon/OpenYuma_WE | f43a25cf99444c29d9fbadfe336182d60e1bc3f4 | [
"Apache-2.0"
] | 1 | 2017-02-24T09:30:21.000Z | 2017-02-24T09:30:21.000Z | wireless_emulator/cli.py | Melacon/OpenYuma_WE | f43a25cf99444c29d9fbadfe336182d60e1bc3f4 | [
"Apache-2.0"
] | null | null | null | wireless_emulator/cli.py | Melacon/OpenYuma_WE | f43a25cf99444c29d9fbadfe336182d60e1bc3f4 | [
"Apache-2.0"
] | 2 | 2018-06-21T13:23:08.000Z | 2021-04-01T06:35:16.000Z | from cmd import Cmd
import sys
from select import poll, POLLIN
import string
from subprocess import call
from wireless_emulator import *
from wireless_emulator.clean import cleanup
class CLI(Cmd):
prompt = 'WirelessTransportEmulator>'
identchars = string.ascii_letters + string.digits + '_' + '-'
def __in... | 39.247788 | 112 | 0.530778 | 4,251 | 0.958512 | 0 | 0 | 0 | 0 | 0 | 0 | 1,627 | 0.366855 |
d92fdd9690a161af17e354836da77242710c2f29 | 1,036 | py | Python | booking_app/models.py | alikhalilica/cilinic-temp | 5822879cda27bc121adbd2a8da947c881d88fbd3 | [
"MIT"
] | null | null | null | booking_app/models.py | alikhalilica/cilinic-temp | 5822879cda27bc121adbd2a8da947c881d88fbd3 | [
"MIT"
] | null | null | null | booking_app/models.py | alikhalilica/cilinic-temp | 5822879cda27bc121adbd2a8da947c881d88fbd3 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class HelthDepartment(models.Model):
name = models.CharField(max_length=100)
availability = models.DateTimeField()
def __str__(self):
return self.name
#helth_department = ((0,"daily task"),(1,"work jobs"),(2,"house needs"))
class Patient(mo... | 33.419355 | 93 | 0.725869 | 901 | 0.869691 | 0 | 0 | 0 | 0 | 0 | 0 | 299 | 0.28861 |
d9300939b02465cc95f8d69b6ff94ca1db4e605a | 1,647 | py | Python | vid/migrations/0003_auto_20211222_0019.py | timmyoder/covid_tracker | 88598043b595f3f63a28e43a732d2f854d4aca9d | [
"MIT"
] | null | null | null | vid/migrations/0003_auto_20211222_0019.py | timmyoder/covid_tracker | 88598043b595f3f63a28e43a732d2f854d4aca9d | [
"MIT"
] | null | null | null | vid/migrations/0003_auto_20211222_0019.py | timmyoder/covid_tracker | 88598043b595f3f63a28e43a732d2f854d4aca9d | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2021-12-22 00:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('vid', '0002_allnty'),
]
operations = [
migrations.CreateModel(
name='CountyMetrics',
fields=[
('id',... | 30.5 | 114 | 0.518519 | 1,554 | 0.943534 | 0 | 0 | 0 | 0 | 0 | 0 | 302 | 0.183364 |
d9305b2cad920233b9a78c2c2fa32100230f3dc5 | 101 | py | Python | BOJ/16000~16999/16500~16599/16515.py | shinkeonkim/today-ps | f3e5e38c5215f19579bb0422f303a9c18c626afa | [
"Apache-2.0"
] | 2 | 2020-01-29T06:54:41.000Z | 2021-11-07T13:23:27.000Z | BOJ/16000~16999/16500~16599/16515.py | shinkeonkim/Today_PS | bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44 | [
"Apache-2.0"
] | null | null | null | BOJ/16000~16999/16500~16599/16515.py | shinkeonkim/Today_PS | bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44 | [
"Apache-2.0"
] | null | null | null | import math
s = 0.0
k = 1
n = int(input())
for i in range(n+1):
k*=max(1,i)
s += 1/k
print(s) | 12.625 | 20 | 0.514851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d930bd7e55bef5a0a588be2aeede17fbaa44f754 | 745 | py | Python | exastolog/test/test_toy3.py | sysbio-curie/pyExaStoLog | a8474823c1b5ef1642339b022675e0d60e340073 | [
"BSD-3-Clause"
] | 2 | 2020-11-17T15:00:01.000Z | 2021-07-02T07:14:15.000Z | exastolog/test/test_toy3.py | sysbio-curie/pyExaStoLog | a8474823c1b5ef1642339b022675e0d60e340073 | [
"BSD-3-Clause"
] | null | null | null | exastolog/test/test_toy3.py | sysbio-curie/pyExaStoLog | a8474823c1b5ef1642339b022675e0d60e340073 | [
"BSD-3-Clause"
] | 1 | 2020-07-07T13:36:44.000Z | 2020-07-07T13:36:44.000Z | from unittest import TestCase
from ..Model import Model
from ..Simulation import Simulation
from os.path import dirname, join
import numpy as np
import math
class TestToy3(TestCase):
def test_toy3(self):
model = Model(join(dirname(__file__), "../../notebooks/model_files/toy3.bnet"))
... | 33.863636 | 87 | 0.632215 | 580 | 0.778523 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.088591 |
d931c71fea8c07e381405bd85803e56da95fcf53 | 755 | py | Python | azulejo/test/key_binder.py | johnteslade/azulejo | 3b1a35981360513b21f90d96afff10352b6363e6 | [
"MIT"
] | 3 | 2015-07-17T09:35:22.000Z | 2015-11-15T00:13:32.000Z | azulejo/test/key_binder.py | johnteslade/azulejo | 3b1a35981360513b21f90d96afff10352b6363e6 | [
"MIT"
] | 1 | 2015-07-17T09:36:45.000Z | 2015-07-22T20:20:53.000Z | azulejo/test/key_binder.py | johnteslade/azulejo | 3b1a35981360513b21f90d96afff10352b6363e6 | [
"MIT"
] | null | null | null |
class KeyBinderDummy(object):
"""Class used to allow keybindings to be caught and to be actioned."""
def __init__(self):
self.bindings = []
self.saved_obj = None
def bind(self, action, dispatcher, dispatcher_params):
""" Bind a key press """
self.bindings.append({
... | 23.59375 | 74 | 0.593377 | 749 | 0.992053 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.309934 |
d93384ace79fad1a67f4aac86155075e4bc1666a | 1,179 | py | Python | code/at_offer/dynamic_programming/coding_interview47.py | zhangrong1722/interview | 187a485de0774561eb843d8ee640236adda97b90 | [
"Apache-2.0"
] | 2 | 2020-01-05T07:46:20.000Z | 2020-04-17T02:58:13.000Z | code/at_offer/dynamic_programming/coding_interview47.py | zhangrong1722/interview | 187a485de0774561eb843d8ee640236adda97b90 | [
"Apache-2.0"
] | 1 | 2020-01-05T07:50:26.000Z | 2020-04-28T03:50:08.000Z | code/at_offer/dynamic_programming/coding_interview47.py | zhangrong1722/interview | 187a485de0774561eb843d8ee640236adda97b90 | [
"Apache-2.0"
] | 1 | 2020-04-18T03:58:26.000Z | 2020-04-18T03:58:26.000Z | """
题目:礼物的最大价值
在一个mxn的期盼的每一格都放有一个礼物 每个礼物有一定的价值(价值大于0) 你可以从棋盘的左上角开始拿格子里的礼物 并每次向右或者向下移动一格
直到达到棋盘的右下角 给定一个棋盘及其上面的礼物 请计算你最多能拿到多少价值的礼物
思路:动态规划 动态规划方程 dp[i][j]=max(dp[i-1][j],dp[i][j-1])+arr[i][j]
"""
class Solution:
def GetGiftMaxValue(self, arr):
if arr is None or len(arr) == 0:
return ... | 33.685714 | 89 | 0.47922 | 755 | 0.526867 | 0 | 0 | 0 | 0 | 0 | 0 | 459 | 0.320307 |
d933e1e2f9d405d172ef31e50f4cff727e9bd7de | 218 | py | Python | doubanRequest.py | speedsnail99/PythonDouban | c4a556311632c547162589220433ec59a962a2d6 | [
"MIT"
] | null | null | null | doubanRequest.py | speedsnail99/PythonDouban | c4a556311632c547162589220433ec59a962a2d6 | [
"MIT"
] | null | null | null | doubanRequest.py | speedsnail99/PythonDouban | c4a556311632c547162589220433ec59a962a2d6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : doubanRequest.py
# @Author: G
# @Date : 2018/8/5
import requests
url = 'https://movie.douban.com'
doubanText = requests.get(url).text
print(doubanText)
| 12.111111 | 35 | 0.642202 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.587156 |
d934ab92936dea1622b31e73b9513677a43d6b45 | 31,876 | py | Python | tests/shop/test_shop_views.py | Torniojaws/vortech-backend | f775a97eeae089fa720088d86fe92d40bc5d65bc | [
"MIT"
] | null | null | null | tests/shop/test_shop_views.py | Torniojaws/vortech-backend | f775a97eeae089fa720088d86fe92d40bc5d65bc | [
"MIT"
] | 93 | 2017-09-01T22:24:10.000Z | 2021-12-22T14:07:06.000Z | tests/shop/test_shop_views.py | Torniojaws/vortech-backend | f775a97eeae089fa720088d86fe92d40bc5d65bc | [
"MIT"
] | null | null | null | import json
import unittest
from flask_caching import Cache
from app import app, db
from apps.shop.models import (
ShopItems,
ShopCategories,
ShopItemsCategoriesMapping,
ShopItemLogos,
ShopItemsURLMapping
)
from apps.users.models import Users, UsersAccessTokens, UsersAccessLevels, Use... | 39.159705 | 99 | 0.513019 | 31,462 | 0.987012 | 0 | 0 | 0 | 0 | 0 | 0 | 7,573 | 0.237577 |
d935132553f2baab50f6ba2b6d58b4003ca7df5b | 3,728 | py | Python | pyinsar/data_import/uavsar.py | MITeaps/pyinsar | 4d22e3ef90ef842d6b390074a8b5deedc7658a2b | [
"MIT"
] | 8 | 2019-03-15T19:51:27.000Z | 2022-02-16T07:27:36.000Z | pyinsar/data_import/uavsar.py | MITeaps/pyinsar | 4d22e3ef90ef842d6b390074a8b5deedc7658a2b | [
"MIT"
] | 1 | 2022-02-08T03:48:56.000Z | 2022-02-09T01:33:27.000Z | pyinsar/data_import/uavsar.py | MITeaps/pyinsar | 4d22e3ef90ef842d6b390074a8b5deedc7658a2b | [
"MIT"
] | 2 | 2021-01-12T05:32:21.000Z | 2021-01-13T08:35:26.000Z | # The MIT License (MIT)
# Copyright (c) 2017 Massachusetts Institute of Technology
#
# Author: Cody Rude
# This software has been created in projects supported by the US National
# Science Foundation and NASA (PI: Pankratius)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this sof... | 36.54902 | 89 | 0.635193 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,040 | 0.54721 |
d936d9d6566232424e349431594f08f1e023591e | 1,964 | py | Python | api/utils/responses.py | cakedan/files.gg | 6d8fc06376a69809c0ae0a56ea2a842d6caddb98 | [
"MIT"
] | 8 | 2018-05-03T16:28:30.000Z | 2020-02-02T12:22:36.000Z | api/utils/responses.py | cakedan/files.gg | 6d8fc06376a69809c0ae0a56ea2a842d6caddb98 | [
"MIT"
] | null | null | null | api/utils/responses.py | cakedan/files.gg | 6d8fc06376a69809c0ae0a56ea2a842d6caddb98 | [
"MIT"
] | 1 | 2019-03-20T23:39:25.000Z | 2019-03-20T23:39:25.000Z | import json
from urllib.parse import urlencode
from flask import Response
from werkzeug.http import HTTP_STATUS_CODES
class ApiResponse(Response):
default_status = 200
default_mimetype = 'application/json'
def __init__(self, data=None, status=None, **kwargs):
if data is None:
if kwa... | 28.882353 | 104 | 0.59165 | 1,835 | 0.934318 | 0 | 0 | 0 | 0 | 0 | 0 | 228 | 0.11609 |
d937931645a0b4ee10a45ea07357635f954a0273 | 16,675 | py | Python | example/samgraph/multi_gpu/train_gcn.py | SJTU-IPADS/fgnn-artifacts | c96e7ec8204d767152958dc63a764466e90424fd | [
"Apache-2.0"
] | 23 | 2022-01-25T13:28:51.000Z | 2022-03-23T07:05:47.000Z | example/samgraph/multi_gpu/train_gcn.py | SJTU-IPADS/gnnlab | 5c73564e4a9bd5deeff7eed0b923c115ccba34d7 | [
"Apache-2.0"
] | null | null | null | example/samgraph/multi_gpu/train_gcn.py | SJTU-IPADS/gnnlab | 5c73564e4a9bd5deeff7eed0b923c115ccba34d7 | [
"Apache-2.0"
] | 1 | 2022-02-28T18:48:56.000Z | 2022-02-28T18:48:56.000Z | import argparse
import time
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import numpy as np
from dgl.nn.pytorch import GraphConv
import dgl.multiprocessing as mp
from torch.nn.parallel import DistributedDataParallel
import os
import sys
import samgraph.torch as sam
impo... | 36.891593 | 138 | 0.64054 | 1,007 | 0.06039 | 0 | 0 | 0 | 0 | 0 | 0 | 2,576 | 0.154483 |
d93b4251771b7cf7a6b382690dc7c24a823f2b1d | 1,445 | py | Python | Python-Arduino/Python-setter.py | TSG405/IOT | dc6f965baf3d0cc0a79e88bc9c3fd8d4ece3fa51 | [
"BSD-3-Clause"
] | 2 | 2020-10-29T07:28:26.000Z | 2021-04-25T05:33:54.000Z | Python-Arduino/Python-setter.py | TSG405/IOT | dc6f965baf3d0cc0a79e88bc9c3fd8d4ece3fa51 | [
"BSD-3-Clause"
] | null | null | null | Python-Arduino/Python-setter.py | TSG405/IOT | dc6f965baf3d0cc0a79e88bc9c3fd8d4ece3fa51 | [
"BSD-3-Clause"
] | null | null | null | import serial # Using SERIAL module to connect to comm ports via ARDUINO
Arduino_Serial = serial.Serial('/dev/ttyACM0',9600) # Connecting via ttyACM0 port (LINUX)
print (Arduino_Serial.readline()) # Status
print ("Please enter --------> 1 <------- to TURN... | 40.138889 | 131 | 0.467128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 689 | 0.476817 |
d93c3126662cf31eb885a0986f780983d532d782 | 3,453 | py | Python | src/AIC2018_iamai/ReID/ReID_CNN/logger.py | gordonjun2/CenterTrack | 358f94c36ef03b8ae7d15d8a48fbf70fff937e79 | [
"MIT"
] | 2 | 2020-04-13T14:06:23.000Z | 2020-06-10T08:41:28.000Z | src/AIC2018_iamai/ReID/ReID_CNN/logger.py | gordonjun2/CenterTrack | 358f94c36ef03b8ae7d15d8a48fbf70fff937e79 | [
"MIT"
] | null | null | null | src/AIC2018_iamai/ReID/ReID_CNN/logger.py | gordonjun2/CenterTrack | 358f94c36ef03b8ae7d15d8a48fbf70fff937e79 | [
"MIT"
] | null | null | null | import os
import pathlib
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import pandas as pd
from collections import OrderedDict
class Logger:
def __init__(self, save_dir, prefix=''):
#names = ['epoch',
# 'loss', 'loss... | 35.96875 | 94 | 0.56936 | 3,239 | 0.938025 | 0 | 0 | 0 | 0 | 0 | 0 | 725 | 0.209962 |
d93cdda3893693209b80cab60a21164807e0bd8b | 1,493 | py | Python | venv/lib/python2.7/site-packages/pychart/afm/ZapfDingbats.py | Christian-Castro/castro_odoo8 | 8247fdb20aa39e043b6fa0c4d0af509462ab3e00 | [
"Unlicense"
] | 1 | 2019-12-19T01:53:13.000Z | 2019-12-19T01:53:13.000Z | venv/lib/python2.7/site-packages/pychart/afm/ZapfDingbats.py | Christian-Castro/castro_odoo8 | 8247fdb20aa39e043b6fa0c4d0af509462ab3e00 | [
"Unlicense"
] | null | null | null | venv/lib/python2.7/site-packages/pychart/afm/ZapfDingbats.py | Christian-Castro/castro_odoo8 | 8247fdb20aa39e043b6fa0c4d0af509462ab3e00 | [
"Unlicense"
] | null | null | null | # AFM font ZapfDingbats (path: /usr/share/fonts/afms/adobe/pzdr.afm).
# Derived from Ghostscript distribution.
# Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code.
import dir
dir.afm["ZapfDingbats"] = (500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, ... | 248.833333 | 1,304 | 0.621567 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 188 | 0.125921 |
d93ce3e047e67035b0fc470f80c3e9659efed6a2 | 43,185 | py | Python | data/scripts/bsRunaround.py | starpirate2203/BROODY-S-LAST-SCRIPT | 7b5a9eab02c782ebf39b0f3edf69536fae8289c6 | [
"MIT"
] | 2 | 2021-09-07T16:04:30.000Z | 2021-09-16T03:30:16.000Z | data/scripts/bsRunaround.py | starpirate2203/BROODY-S-LAST-SCRIPT | 7b5a9eab02c782ebf39b0f3edf69536fae8289c6 | [
"MIT"
] | null | null | null | data/scripts/bsRunaround.py | starpirate2203/BROODY-S-LAST-SCRIPT | 7b5a9eab02c782ebf39b0f3edf69536fae8289c6 | [
"MIT"
] | 1 | 2021-09-21T12:42:28.000Z | 2021-09-21T12:42:28.000Z | import bs
import random
import math
class RunaroundGame(bs.CoopGameActivity):
tips = [
'Jump just as you\'re throwing to get bombs up to the highest levels.',
'No, you can\'t get up on the ledge. You have to throw bombs.',
'Whip back and forth to get more distance on your throws..']
... | 40.894886 | 80 | 0.481788 | 43,146 | 0.999097 | 0 | 0 | 172 | 0.003983 | 0 | 0 | 7,024 | 0.162649 |
d93e009b16961979c7713b17f8dc66060f79dd3b | 710 | py | Python | python/run.py | hguerrero/skupper-example-patient-portal | 326afb5c85fedf5e215e0e4f53ba558edba12c8e | [
"Apache-2.0"
] | 10 | 2020-01-22T07:17:46.000Z | 2021-11-15T11:12:53.000Z | python/run.py | hguerrero/skupper-example-patient-portal | 326afb5c85fedf5e215e0e4f53ba558edba12c8e | [
"Apache-2.0"
] | 3 | 2019-09-26T14:03:29.000Z | 2020-04-24T15:44:02.000Z | python/run.py | hguerrero/skupper-example-patient-portal | 326afb5c85fedf5e215e0e4f53ba558edba12c8e | [
"Apache-2.0"
] | 9 | 2019-10-08T19:46:34.000Z | 2022-03-17T12:13:01.000Z | #!/usr/bin/python3
from plano import *
ENV["BACKEND_SERVICE_HOST"] = "localhost"
ENV["BACKEND_SERVICE_PORT"] = backend_port = str(get_random_port())
ENV["FRONTEND_SERVICE_PORT"] = frontend_port = str(get_random_port())
backend_url = f"http://localhost:{backend_port}/api/hello"
frontend_url = f"http://localhost:{fron... | 28.4 | 69 | 0.695775 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.329577 |
d93e597ab6d0aecf326345fbe988189bcd506af5 | 14,492 | py | Python | cfractions/__init__.py | lycantropos/cfractions | 22ede26a22786f5480174e2306414ff38f7c7b77 | [
"MIT"
] | 3 | 2022-01-18T21:17:17.000Z | 2022-01-23T21:49:52.000Z | cfractions/__init__.py | lycantropos/cfractions | 22ede26a22786f5480174e2306414ff38f7c7b77 | [
"MIT"
] | 3 | 2021-06-28T13:30:58.000Z | 2022-01-16T19:05:00.000Z | cfractions/__init__.py | lycantropos/cfractions | 22ede26a22786f5480174e2306414ff38f7c7b77 | [
"MIT"
] | 1 | 2021-10-22T02:12:06.000Z | 2021-10-22T02:12:06.000Z | """Python C API alternative to `fractions` module."""
__version__ = '1.4.0'
try:
from _cfractions import Fraction
except ImportError:
import numbers as _numbers
from fractions import Fraction as _Fraction
from typing import (Any as _Any,
Dict as _Dict,
O... | 41.405714 | 79 | 0.50621 | 13,888 | 0.958322 | 0 | 0 | 3,844 | 0.26525 | 0 | 0 | 2,181 | 0.150497 |
d93f8a137f8c8b7524ee61b15619bc1ddd81fbf9 | 1,401 | py | Python | src/logistic/logistic_sklearn.py | wenfengand/machine_learning_tools | 7233e14ccb2cc32198ee5d73ee2c5952b5947443 | [
"MIT"
] | null | null | null | src/logistic/logistic_sklearn.py | wenfengand/machine_learning_tools | 7233e14ccb2cc32198ee5d73ee2c5952b5947443 | [
"MIT"
] | null | null | null | src/logistic/logistic_sklearn.py | wenfengand/machine_learning_tools | 7233e14ccb2cc32198ee5d73ee2c5952b5947443 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.preprocessing import LabelBinarizer
from sklearn.linear_model.logistic import LogisticRegression
from sklearn.model_selection import train_test_split, cross_val_score
from sklearn.metrics import classificat... | 35.923077 | 95 | 0.797288 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.098501 |
d941561113d1d4744ab96a504558e7c214535b01 | 1,289 | py | Python | code/curvature_and_offset.py | amoi9/advanced-lane-finding | 334ebcee8a232e62aa54ed88190dd2333026112c | [
"MIT"
] | null | null | null | code/curvature_and_offset.py | amoi9/advanced-lane-finding | 334ebcee8a232e62aa54ed88190dd2333026112c | [
"MIT"
] | null | null | null | code/curvature_and_offset.py | amoi9/advanced-lane-finding | 334ebcee8a232e62aa54ed88190dd2333026112c | [
"MIT"
] | null | null | null | import numpy as np
from lane_pixel_finder import find_lane_pixels
'''
Calculates the curvature of polynomial functions in meters.
'''
# Define conversions in x and y from pixels space to meters
ym_per_pix = 30/720 # meters per pixel in y dimension
xm_per_pix = 3.7/700 # meters per pixel in x dimension
def measure_cur... | 40.28125 | 101 | 0.699767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 470 | 0.364624 |
d941a0519c73ad134015de68bcfb2d050dd83e9d | 816 | py | Python | notes/23 - exceptions/basic-input-example.py | hSpiels/ICS3-Python-Notes | 5cb06623d6714a62ff20550d635c1fd3f7d27ea2 | [
"MIT"
] | 3 | 2022-02-10T19:06:28.000Z | 2022-03-25T17:55:56.000Z | notes/23 - exceptions/basic-input-example.py | hSpiels/ICS3-Python-Notes | 5cb06623d6714a62ff20550d635c1fd3f7d27ea2 | [
"MIT"
] | null | null | null | notes/23 - exceptions/basic-input-example.py | hSpiels/ICS3-Python-Notes | 5cb06623d6714a62ff20550d635c1fd3f7d27ea2 | [
"MIT"
] | 17 | 2020-09-15T16:40:23.000Z | 2022-03-22T17:52:32.000Z | #-----------------------------------------------------------------------------
# Name: Catching Exceptions (try-except.py)
# Purpose: To provide example of a simple input loop using try-catch
#
# Author: Mr. Brooks
# Created: 01-Oct-2020
# Updated: 01-March-2021
#--------------------------------... | 32.64 | 92 | 0.502451 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 609 | 0.746324 |
d942a04ced23f92091eda9000046982c5f7f347a | 306 | py | Python | routers/repo/tests/in/py/sample_projects/car/rear_suspension_assembly.py | fermiumlabs/gitea | 34b1f2546b306f15c65f21d8f9629507d3fdd798 | [
"MIT"
] | 1 | 2020-10-08T14:14:52.000Z | 2020-10-08T14:14:52.000Z | routers/repo/tests/in/py/sample_projects/car/rear_suspension_assembly.py | fermiumlabs/gitea | 34b1f2546b306f15c65f21d8f9629507d3fdd798 | [
"MIT"
] | null | null | null | routers/repo/tests/in/py/sample_projects/car/rear_suspension_assembly.py | fermiumlabs/gitea | 34b1f2546b306f15c65f21d8f9629507d3fdd798 | [
"MIT"
] | null | null | null | # coding: utf-8
r"""Tabby rear suspension assembly"""
from car_assemblies import make_rear_suspension_assembly
from osvcad.view import view_assembly, view_assembly_graph
assembly = make_rear_suspension_assembly()
if __name__ == "__main__":
view_assembly(assembly)
view_assembly_graph(assembly)
| 23.538462 | 58 | 0.803922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.202614 |
d944f0a9c7214dc418886b1718145909d59eb408 | 2,791 | py | Python | python_examples/example_truncated_normal.py | KristerSJakobsson/pygosolnp | 5a890d67782ff04f521644daeaef2f7708959e79 | [
"BSL-1.0"
] | null | null | null | python_examples/example_truncated_normal.py | KristerSJakobsson/pygosolnp | 5a890d67782ff04f521644daeaef2f7708959e79 | [
"BSL-1.0"
] | null | null | null | python_examples/example_truncated_normal.py | KristerSJakobsson/pygosolnp | 5a890d67782ff04f521644daeaef2f7708959e79 | [
"BSL-1.0"
] | null | null | null | ############################
# This example shows how to run pygosolnp with Truncated Normal distribution using Numpy and Scipy
############################
from typing import List, Optional
# Numpy random has the PCG64 generator which according to some research is better than Mersenne Twister
from numpy.random impor... | 36.723684 | 103 | 0.685776 | 772 | 0.276603 | 0 | 0 | 0 | 0 | 0 | 0 | 973 | 0.348621 |
d945a72b8bcb11f20ef8799e856a5654994ffaeb | 3,197 | py | Python | opengenomebrowser_tools/rename_custom_annotations.py | opengenomebrowser/opengenomebrowser-tools | b6ef2340b2fd67a61373d1d8a0f3ef71cc892d1e | [
"MIT"
] | null | null | null | opengenomebrowser_tools/rename_custom_annotations.py | opengenomebrowser/opengenomebrowser-tools | b6ef2340b2fd67a61373d1d8a0f3ef71cc892d1e | [
"MIT"
] | null | null | null | opengenomebrowser_tools/rename_custom_annotations.py | opengenomebrowser/opengenomebrowser-tools | b6ef2340b2fd67a61373d1d8a0f3ef71cc892d1e | [
"MIT"
] | null | null | null | from .utils import GenomeFile, split_locus_tag
class CustomAnnotationFile(GenomeFile):
def __init__(self, file: str, original_path: str = None, custom_annotation_type: str = None):
if custom_annotation_type:
self.custom_annotation_type = custom_annotation_type
else:
self.cu... | 38.059524 | 141 | 0.657804 | 2,402 | 0.751329 | 0 | 0 | 0 | 0 | 0 | 0 | 733 | 0.229277 |
d945b415451fdc9d37b82bd626b439e042bbaee1 | 11,757 | py | Python | SAM/Classifiers/classifier_svm.py | lucaspuvis/SAM | 159427d0b2a7fdd353b96c13085f926df096f309 | [
"CC-BY-4.0"
] | 3 | 2019-05-14T17:22:54.000Z | 2020-07-05T15:39:11.000Z | SAM/Classifiers/classifier_svm.py | lucaspuvis/SAM | 159427d0b2a7fdd353b96c13085f926df096f309 | [
"CC-BY-4.0"
] | null | null | null | SAM/Classifiers/classifier_svm.py | lucaspuvis/SAM | 159427d0b2a7fdd353b96c13085f926df096f309 | [
"CC-BY-4.0"
] | null | null | null | import argparse, joblib, csv, sys, os
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import pandas as pd
from mpl_toolkits.mplot3d import Axes3D
from yellowbrick.text import TSNEVisualizer
from sklearn.cluster import KMeans
from sklearn.svm import SVC, LinearSVC
from sklearn... | 34.377193 | 155 | 0.623969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,599 | 0.391171 |
d94612c9ae12b600bebba592477a727af83fa451 | 951 | py | Python | unityparser/composer.py | socialpoint-labs/unity-yaml-parser | 91c175140ed32aed301bc34d4311f370da69a8ba | [
"MIT"
] | 76 | 2019-06-17T13:17:59.000Z | 2022-03-11T19:39:24.000Z | unityparser/composer.py | socialpoint-labs/unity-yaml-parser | 91c175140ed32aed301bc34d4311f370da69a8ba | [
"MIT"
] | 17 | 2019-06-07T09:04:27.000Z | 2022-02-16T19:01:38.000Z | unityparser/composer.py | socialpoint-labs/unity-yaml-parser | 91c175140ed32aed301bc34d4311f370da69a8ba | [
"MIT"
] | 9 | 2019-10-08T16:07:35.000Z | 2021-12-08T15:27:00.000Z | from yaml.composer import Composer as YamlComposer, ComposerError
class Composer(YamlComposer):
def compose_document(self):
# Drop the DOCUMENT-START event.
self.get_event()
# UNITY: used to store data after the anchor
self.extra_anchor_data = {}
# Compose the root node.... | 28.818182 | 95 | 0.635121 | 882 | 0.927445 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.292324 |
d948e42d9fe9ba9b6716af9941792faae40da7f8 | 1,164 | py | Python | build.py | 2-propanol/BTF_extractor | 0ec5358504ab51aff6256b98f51d29e540012ce8 | [
"Zlib"
] | 1 | 2022-02-16T14:53:26.000Z | 2022-02-16T14:53:26.000Z | build.py | 2-propanol/BTF_extractor | 0ec5358504ab51aff6256b98f51d29e540012ce8 | [
"Zlib"
] | 1 | 2021-02-05T10:04:20.000Z | 2021-04-11T13:45:01.000Z | build.py | 2-propanol/BTF_extractor | 0ec5358504ab51aff6256b98f51d29e540012ce8 | [
"Zlib"
] | 1 | 2021-02-04T04:22:19.000Z | 2021-02-04T04:22:19.000Z | import platform
from setuptools import Extension
import numpy
from Cython.Build import cythonize
compile_args = []
link_args = []
pf = platform.system()
if pf == "Windows":
# for MSVC
compile_args = ["/std:c++14", "/DNOMINMAX", "/O2", "/openmp"]
elif pf == "Darwin":
# for clang
compile_args = ["-std=... | 24.25 | 87 | 0.617698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 425 | 0.36512 |
d948fa8ba6380df2f7107ace914fc0822327e5fa | 3,802 | py | Python | apps/users/views.py | fangMint/django_web | cf50df6c1a2358996620ac83ffa99b31472d3c07 | [
"AFL-3.0"
] | null | null | null | apps/users/views.py | fangMint/django_web | cf50df6c1a2358996620ac83ffa99b31472d3c07 | [
"AFL-3.0"
] | null | null | null | apps/users/views.py | fangMint/django_web | cf50df6c1a2358996620ac83ffa99b31472d3c07 | [
"AFL-3.0"
] | 1 | 2021-11-22T10:15:50.000Z | 2021-11-22T10:15:50.000Z | import logging
from django.views import View
from .models import Users, Tokens
from libs.response_extra import response_failure, response_success, user_does_not_exists, view_exception
from libs.tool_decorator import cvb_params
from .decorator import cvb_token_check
log = logging.getLogger(__name__)
class LoginView... | 33.946429 | 104 | 0.572593 | 3,443 | 0.86075 | 0 | 0 | 3,322 | 0.8305 | 0 | 0 | 971 | 0.24275 |
d94b812ea86c3f0c6f03bfe005b3691242fb682f | 1,871 | py | Python | src/compas_plotters/artists/circleartist.py | XingxinHE/compas | d2901dbbacdaf4694e5adae78ba8f093f10532bf | [
"MIT"
] | null | null | null | src/compas_plotters/artists/circleartist.py | XingxinHE/compas | d2901dbbacdaf4694e5adae78ba8f093f10532bf | [
"MIT"
] | null | null | null | src/compas_plotters/artists/circleartist.py | XingxinHE/compas | d2901dbbacdaf4694e5adae78ba8f093f10532bf | [
"MIT"
] | null | null | null | from compas_plotters.artists import Artist
from matplotlib.patches import Circle as CirclePatch
# from matplotlib.transforms import ScaledTranslation
__all__ = ['CircleArtist']
class CircleArtist(Artist):
""""""
zorder = 1000
def __init__(self, circle, linewidth=1.0, linestyle='solid', facecolor=(1.0, ... | 30.672131 | 135 | 0.611438 | 1,690 | 0.90326 | 0 | 0 | 395 | 0.211117 | 0 | 0 | 80 | 0.042758 |
d94bae590f7b253620b6f2a82a919c8745ff9eb2 | 1,044 | py | Python | SortedPriorityQueue.py | sidhu177/pythonprog | a75285e9e4d3cd6f1257b9a79dc39e49c68a695d | [
"MIT"
] | 2 | 2019-05-01T04:32:07.000Z | 2019-05-04T02:22:16.000Z | SortedPriorityQueue.py | sidhu177/pythonprog | a75285e9e4d3cd6f1257b9a79dc39e49c68a695d | [
"MIT"
] | null | null | null | SortedPriorityQueue.py | sidhu177/pythonprog | a75285e9e4d3cd6f1257b9a79dc39e49c68a695d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 18 21:06:14 2018
Taken from Data Structures and Algorithms using Python
"""
class SortedPriorityQueue(PriorityQueueBase):
def __init__(self):
self._data = PositionalList()
def __len__(self):
return len(self._data)
def add(self,ke... | 29 | 59 | 0.579502 | 919 | 0.880268 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.164751 |
d94bb0c3552420db1ae043fe4832aefa03e3c1f7 | 14,576 | py | Python | f5/utils/test/test_iapp_parser.py | jputrino/f5-common-python | 64cd019eb22b0e9a49e0c49ebb05f2a23ffa0e49 | [
"Apache-2.0"
] | null | null | null | f5/utils/test/test_iapp_parser.py | jputrino/f5-common-python | 64cd019eb22b0e9a49e0c49ebb05f2a23ffa0e49 | [
"Apache-2.0"
] | null | null | null | f5/utils/test/test_iapp_parser.py | jputrino/f5-common-python | 64cd019eb22b0e9a49e0c49ebb05f2a23ffa0e49 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 26.215827 | 79 | 0.64565 | 0 | 0 | 0 | 0 | 254 | 0.017426 | 0 | 0 | 8,778 | 0.602223 |
d94e7f4e72a48e860eb440b1515c225287560f3f | 2,284 | py | Python | z2npprocess.py | evandromr/python_scitools | afe8ad113245069af0ef2a05c69046938459ab2d | [
"MIT"
] | 2 | 2015-11-05T14:43:04.000Z | 2016-01-06T18:49:31.000Z | z2npprocess.py | evandromr/python_scitools | afe8ad113245069af0ef2a05c69046938459ab2d | [
"MIT"
] | null | null | null | z2npprocess.py | evandromr/python_scitools | afe8ad113245069af0ef2a05c69046938459ab2d | [
"MIT"
] | null | null | null | #!/usr/env python
import pprocess # parallel computing module
import os # os utilitites
import time # keep track of time
import astropy.io.fits as fits # FITS manipulating library
import matplotlib.pyplot as plt
import numpy as np # numeric python for array manipulation
import myscitools # my personal tools
... | 27.853659 | 72 | 0.684764 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 906 | 0.396673 |
d950b3d1717860b9f9b62454c2ec7519e0a1185c | 625 | py | Python | net/http_client.py | zengmeng1094/my_python_practice | 529e3ce592508b30d49dc6d4a005081789d0db44 | [
"Apache-2.0"
] | null | null | null | net/http_client.py | zengmeng1094/my_python_practice | 529e3ce592508b30d49dc6d4a005081789d0db44 | [
"Apache-2.0"
] | null | null | null | net/http_client.py | zengmeng1094/my_python_practice | 529e3ce592508b30d49dc6d4a005081789d0db44 | [
"Apache-2.0"
] | null | null | null | import requests
import urllib3
from urllib3 import HTTPConnectionPool
class HttpsClient:
def __init__(self):
pass
@staticmethod
def get(_url, _query_string={}, _header=None):
urllib3.disable_warnings()
_resp = requests.get(_url, _query_string, headers=_header, verify=False)
... | 24.038462 | 80 | 0.6752 | 466 | 0.7456 | 0 | 0 | 398 | 0.6368 | 0 | 0 | 38 | 0.0608 |
d9514413b1dc12beee51ba849953b233bcf53932 | 6,217 | py | Python | tests/test_redis.py | fedej/aio-rom | e84d55b84ca459b930d0cd86fd33f161cb26c7df | [
"MIT"
] | 6 | 2021-03-22T22:12:34.000Z | 2022-02-14T01:30:37.000Z | tests/test_redis.py | fedej/aio-rom | e84d55b84ca459b930d0cd86fd33f161cb26c7df | [
"MIT"
] | 52 | 2021-02-22T16:38:27.000Z | 2022-03-07T18:06:18.000Z | tests/test_redis.py | fedej/aio-rom | e84d55b84ca459b930d0cd86fd33f161cb26c7df | [
"MIT"
] | null | null | null | import os
import sys
from dataclasses import field
from typing import List, Optional, Set, cast
from unittest import skipUnless
from aio_rom import Model
from aio_rom.attributes import RedisModelSet
if sys.version_info >= (3, 8):
from unittest.async_case import IsolatedAsyncioTestCase as TestCase
ASYNCTEST =... | 33.605405 | 84 | 0.618144 | 5,683 | 0.914106 | 0 | 0 | 5,266 | 0.847032 | 4,945 | 0.7954 | 335 | 0.053885 |
d95365e9560d7743acef72009c98362dad09f3a4 | 1,514 | py | Python | data/transcoder_evaluation_gfg/python/DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( str ) :
n = len ( str )
C = [ [ 0 for i in range ( n ) ] for i in range ( n ) ]
P = [ [ False for i in ... | 29.115385 | 97 | 0.402246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 306 | 0.202114 |
d955563969d83170f71c06df9ab6aacad0658d81 | 787 | py | Python | timetappy/staff.py | ak9999/timetappy | 7429077b2a8f3e2f0b2b5ac26d9db713fd330a50 | [
"MIT"
] | null | null | null | timetappy/staff.py | ak9999/timetappy | 7429077b2a8f3e2f0b2b5ac26d9db713fd330a50 | [
"MIT"
] | null | null | null | timetappy/staff.py | ak9999/timetappy | 7429077b2a8f3e2f0b2b5ac26d9db713fd330a50 | [
"MIT"
] | null | null | null | from .utils import return_response, api_get_request
class StaffMixin():
TIMETAP_API_STAFF = '/staff'
api_get_request = api_get_request
@return_response
def get_staff(self):
return self.api_get_request(f'{self.TIMETAP_API_STAFF}')
@return_response
def get_staff_by_professionalId(self... | 32.791667 | 94 | 0.721728 | 732 | 0.930114 | 0 | 0 | 623 | 0.791614 | 0 | 0 | 202 | 0.256671 |
d955bd3b6a1f98f5c7cc4debf622f8e2f6c5f9cd | 104 | py | Python | goutdotcom/treatment/apps.py | Spiewart/goutdotcom | 0916155732a72fcb8c8a2fb0f4dd81efef618af8 | [
"MIT"
] | null | null | null | goutdotcom/treatment/apps.py | Spiewart/goutdotcom | 0916155732a72fcb8c8a2fb0f4dd81efef618af8 | [
"MIT"
] | null | null | null | goutdotcom/treatment/apps.py | Spiewart/goutdotcom | 0916155732a72fcb8c8a2fb0f4dd81efef618af8 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class TreatmentConfig(AppConfig):
name = 'goutdotcom.treatment'
| 17.333333 | 33 | 0.778846 | 67 | 0.644231 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.211538 |
d955de847bc6455510ab5fae7ec28c13dd87bbec | 1,201 | py | Python | Algorithms/0033_Search_in_Rotated_Sorted_Array/Python/Search_in_Rotated_Sorted_Array_Solution_1.py | lht19900714/Leetcode_Solutions | dac7a038329a5c1f8a78e86cc6f49116b963f1fb | [
"MIT"
] | null | null | null | Algorithms/0033_Search_in_Rotated_Sorted_Array/Python/Search_in_Rotated_Sorted_Array_Solution_1.py | lht19900714/Leetcode_Solutions | dac7a038329a5c1f8a78e86cc6f49116b963f1fb | [
"MIT"
] | null | null | null | Algorithms/0033_Search_in_Rotated_Sorted_Array/Python/Search_in_Rotated_Sorted_Array_Solution_1.py | lht19900714/Leetcode_Solutions | dac7a038329a5c1f8a78e86cc6f49116b963f1fb | [
"MIT"
] | null | null | null |
# Space: O(1)
# Time: O(logn)
class Solution:
def search(self, nums, target):
length = len(nums)
if length == 0: return -1
if length == 1: return 0 if nums[0] == target else -1
# First, find out the actual end point of sorted array
left, right = 0, length - 1
whil... | 27.930233 | 85 | 0.507077 | 1,165 | 0.970025 | 0 | 0 | 0 | 0 | 0 | 0 | 139 | 0.115737 |
d959215b82b03d107b269df9d66aba263c6dfe42 | 7,807 | py | Python | nxs_libs/interface/workload_manager/simple_policy.py | microsoft/nxs | b271c0637576084b36bd0bd397a673fb348913b3 | [
"MIT"
] | 5 | 2022-03-23T21:27:42.000Z | 2022-03-24T19:57:27.000Z | nxs_libs/interface/workload_manager/simple_policy.py | microsoft/nxs | b271c0637576084b36bd0bd397a673fb348913b3 | [
"MIT"
] | null | null | null | nxs_libs/interface/workload_manager/simple_policy.py | microsoft/nxs | b271c0637576084b36bd0bd397a673fb348913b3 | [
"MIT"
] | 1 | 2022-03-23T21:27:44.000Z | 2022-03-23T21:27:44.000Z | import time
import numpy as np
from typing import Dict, List, Tuple
from nxs_libs.interface.workload_manager import (
NxsBaseWorkloadManagerPolicy,
)
from nxs_types.frontend import FrontendModelPipelineWorkloadReport
from nxs_types.message import (
NxsMsgPinWorkload,
NxsMsgType,
NxsMsgReportInputWorkloa... | 35.811927 | 140 | 0.608685 | 7,396 | 0.947355 | 0 | 0 | 0 | 0 | 0 | 0 | 1,317 | 0.168695 |
d95e1a45cff563a0bc7667c6cb86319a45a18004 | 23,258 | py | Python | examples/grid_convergence.py | H0R5E/SNL-Delft3D-CEC-Verify | 234c0acead13c74bad2979b300671733c7b184f7 | [
"MIT"
] | null | null | null | examples/grid_convergence.py | H0R5E/SNL-Delft3D-CEC-Verify | 234c0acead13c74bad2979b300671733c7b184f7 | [
"MIT"
] | 2 | 2021-12-10T17:17:21.000Z | 2022-02-22T00:25:15.000Z | examples/grid_convergence.py | H0R5E/SNL-Delft3D-CEC-Verify | 234c0acead13c74bad2979b300671733c7b184f7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import uuid
import platform
import warnings
from pathlib import Path
from collections import defaultdict
from dataclasses import replace
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
from convergence import Convergence
from snl_d3d_cec_veri... | 36.003096 | 79 | 0.551896 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,110 | 0.262705 |
d95e400e7414be6bd28582167c1534a6fade0266 | 15,236 | py | Python | GLM/GLM_Model/GLM_Model_GP.py | ys7yoo/npglm | 98cc040fff8a861e2d7e210fef049207f1714b2a | [
"MIT"
] | 9 | 2020-11-20T17:43:36.000Z | 2021-02-26T22:18:59.000Z | GLM/GLM_Model/GLM_Model_GP.py | ys7yoo/npglm | 98cc040fff8a861e2d7e210fef049207f1714b2a | [
"MIT"
] | 1 | 2021-02-04T13:51:17.000Z | 2021-02-04T23:56:07.000Z | GLM/GLM_Model/GLM_Model_GP.py | ys7yoo/npglm | 98cc040fff8a861e2d7e210fef049207f1714b2a | [
"MIT"
] | 1 | 2020-11-22T19:36:35.000Z | 2020-11-22T19:36:35.000Z | import numpy as np
import matplotlib.pyplot as plt
import torch
import scipy
from GLM.GLM_Model import GLM_Model, PyTorchObj
from scipy.optimize import minimize, Bounds
from tqdm import tqdm
class GLM_Model_GP(GLM_Model.GLM_Model):
def __init__(self, params):
super().__init__(params)
self.kernel... | 46.169697 | 174 | 0.616894 | 15,036 | 0.986873 | 0 | 0 | 0 | 0 | 0 | 0 | 1,437 | 0.094316 |
d95eed5d862d9b62ea1af084b7b9d3c23fb6a1ce | 13,127 | py | Python | c-deps/krb5/src/tests/t_preauth.py | Yangjxxxxx/ZNBase | dcf993b73250dd5cb63041f4d9cf098941f67b2b | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-12-03T05:07:39.000Z | 2021-12-03T05:07:39.000Z | c-deps/krb5/src/tests/t_preauth.py | Yangjxxxxx/ZNBase | dcf993b73250dd5cb63041f4d9cf098941f67b2b | [
"MIT",
"BSD-3-Clause"
] | 9 | 2020-05-13T16:28:13.000Z | 2021-12-30T04:07:49.000Z | src/tests/t_preauth.py | frozencemetery/krb5 | bb8fa495d00ccd931eec87a01b8920636cf7903e | [
"MIT"
] | 4 | 2020-07-01T12:41:46.000Z | 2022-01-26T03:05:30.000Z | from k5test import *
# Test that the kdcpreauth client_keyblock() callback matches the key
# indicated by the etype info, and returns NULL if no key was selected.
testpreauth = os.path.join(buildtop, 'plugins', 'preauth', 'test', 'test.so')
conf = {'plugins': {'kdcpreauth': {'module': 'test:' + testpreauth},
... | 49.349624 | 79 | 0.665346 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,258 | 0.705264 |
d96094c005965d2c5403a91fbbccf6c6f031c21a | 4,303 | py | Python | src/coreclr/scripts/antigen_unique_issues.py | KirillOsenkov/runtime | 11742903dcc40a55e8688a1c61291459215f8ed0 | [
"MIT"
] | 1 | 2021-06-18T04:59:29.000Z | 2021-06-18T04:59:29.000Z | src/coreclr/scripts/antigen_unique_issues.py | KirillOsenkov/runtime | 11742903dcc40a55e8688a1c61291459215f8ed0 | [
"MIT"
] | 1 | 2021-11-11T02:02:54.000Z | 2021-11-13T00:05:50.000Z | src/coreclr/scripts/antigen_unique_issues.py | KirillOsenkov/runtime | 11742903dcc40a55e8688a1c61291459215f8ed0 | [
"MIT"
] | 1 | 2021-12-03T00:19:45.000Z | 2021-12-03T00:19:45.000Z | #!/usr/bin/env python3
#
## Licensed to the .NET Foundation under one or more agreements.
## The .NET Foundation licenses this file to you under the MIT license.
#
##
# Title: antigen_unique_issues.py
#
# Notes:
#
# Script to identify unique issues from all partitions and print them on console.
#
######################... | 36.466102 | 166 | 0.563096 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,577 | 0.366488 |
d9610b878d44c5a8266abce88c386c3e59afd553 | 1,448 | py | Python | src/secml/ml/peval/metrics/c_metric_test_error.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 63 | 2020-04-20T16:31:16.000Z | 2022-03-29T01:05:35.000Z | src/secml/ml/peval/metrics/c_metric_test_error.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 5 | 2020-04-21T11:31:39.000Z | 2022-03-24T13:42:56.000Z | src/secml/ml/peval/metrics/c_metric_test_error.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 8 | 2020-04-21T09:16:42.000Z | 2022-02-23T16:28:43.000Z | """
.. module:: CMetricTestError
:synopsis: Performance Metric: Test Error
.. moduleauthor:: Marco Melis <marco.melis@unica.it>
"""
import sklearn.metrics as skm
from secml.array import CArray
from secml.ml.peval.metrics import CMetric
class CMetricTestError(CMetric):
"""Performance evaluation metric: Test ... | 24.542373 | 82 | 0.600138 | 1,203 | 0.830801 | 0 | 0 | 0 | 0 | 0 | 0 | 1,068 | 0.737569 |
d96292f6031d95ffe48e989555808517308f5c23 | 35,592 | py | Python | titer_model/implementation-nextstrain-augur/base/process.py | blab/dengue | 5eacc47fbd77c59e7342d5be4aa81f7d3b4ff0bf | [
"CC-BY-4.0",
"MIT"
] | 4 | 2019-03-31T22:03:48.000Z | 2020-06-16T21:04:24.000Z | titer_model/implementation-nextstrain-augur/base/process.py | emmahodcroft/dengue-antigenic-dynamics | 5eacc47fbd77c59e7342d5be4aa81f7d3b4ff0bf | [
"CC-BY-4.0",
"MIT"
] | 4 | 2018-10-12T02:13:10.000Z | 2019-07-24T02:44:53.000Z | titer_model/implementation-nextstrain-augur/base/process.py | emmahodcroft/dengue-antigenic-dynamics | 5eacc47fbd77c59e7342d5be4aa81f7d3b4ff0bf | [
"CC-BY-4.0",
"MIT"
] | 5 | 2018-09-10T23:14:09.000Z | 2020-12-27T20:57:34.000Z | from __future__ import division, print_function
import argparse
import sys, os, time, gzip, glob
from collections import defaultdict
from base.config import combine_configs
from base.io_util import make_dir, remove_dir, tree_to_json, write_json, myopen
from base.sequences_process import sequence_set
from base.utils imp... | 46.464752 | 158 | 0.595274 | 34,064 | 0.957069 | 0 | 0 | 0 | 0 | 0 | 0 | 10,075 | 0.283069 |
d9629e18c5a751f1f05e83298b1aeab4711e6438 | 1,777 | py | Python | nodux_contabilidad/nodux_contabilidad/doctype/nodux_item_price/nodux_item_price.py | jessica-tandazo/nodux_contabilidad | a9f853e167160b1d883b937d2edbf354fd14d144 | [
"MIT"
] | null | null | null | nodux_contabilidad/nodux_contabilidad/doctype/nodux_item_price/nodux_item_price.py | jessica-tandazo/nodux_contabilidad | a9f853e167160b1d883b937d2edbf354fd14d144 | [
"MIT"
] | null | null | null | nodux_contabilidad/nodux_contabilidad/doctype/nodux_item_price/nodux_item_price.py | jessica-tandazo/nodux_contabilidad | a9f853e167160b1d883b937d2edbf354fd14d144 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, nodux and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import throw, _
class NoduxItemPrice(Document):
def validate(self):
self.validate_ite... | 36.265306 | 111 | 0.723692 | 1,530 | 0.861002 | 0 | 0 | 0 | 0 | 0 | 0 | 714 | 0.401801 |
d962f71ef696f9f1cf377a6a911132ae292fa62f | 799 | py | Python | main/email.py | BTulkas/Foster_Finder | b3de87ce3a253bec3296446f7138f8a16b32f9d7 | [
"MIT"
] | null | null | null | main/email.py | BTulkas/Foster_Finder | b3de87ce3a253bec3296446f7138f8a16b32f9d7 | [
"MIT"
] | 2 | 2021-09-12T08:31:22.000Z | 2021-09-12T09:08:47.000Z | main/email.py | BTulkas/Foster_Finder | b3de87ce3a253bec3296446f7138f8a16b32f9d7 | [
"MIT"
] | null | null | null | from flask import render_template
from flask_mail import Message
from main import mail, app
def send_email(subject, sender, recipients, text_body, html_body):
msg = Message(subject, sender=sender, recipients=recipients)
msg.body = text_body
msg.html = html_body
mail.send(msg)
def send_password_reset... | 38.047619 | 69 | 0.640801 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.121402 |
d966b6da1943e7fcc8c1aa8f39d2dde2c9b18bf1 | 779 | py | Python | objectModel/Python/cdm/persistence/cdmfolder/types/projections/operation_add_artifact_attribute.py | rt112000/CDM | 34bd34f9260140a8f8aa02bd87c23033f3daad4c | [
"CC-BY-4.0",
"MIT"
] | 884 | 2019-05-10T02:09:10.000Z | 2022-03-31T14:02:00.000Z | objectModel/Python/cdm/persistence/cdmfolder/types/projections/operation_add_artifact_attribute.py | rt112000/CDM | 34bd34f9260140a8f8aa02bd87c23033f3daad4c | [
"CC-BY-4.0",
"MIT"
] | 171 | 2019-06-10T11:34:37.000Z | 2022-03-31T22:50:12.000Z | objectModel/Python/cdm/persistence/cdmfolder/types/projections/operation_add_artifact_attribute.py | rt112000/CDM | 34bd34f9260140a8f8aa02bd87c23033f3daad4c | [
"CC-BY-4.0",
"MIT"
] | 340 | 2019-05-07T18:00:16.000Z | 2022-03-31T12:00:15.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
from typing import Union
from cdm.persistence.cdmfolder.types.projections.operation_base import OperationBase
from cdm.persistence.cdmfolder.types.type_attribute im... | 41 | 109 | 0.803594 | 292 | 0.37484 | 0 | 0 | 0 | 0 | 0 | 0 | 269 | 0.345315 |
d96823b574d707b8c5884043e9c5fc59a212d82c | 1,900 | py | Python | ebr_board/database/queries.py | eugene-davis/ebr-board | f592a752e17e869a6fd35ef82398f97748dbdc78 | [
"Apache-2.0"
] | null | null | null | ebr_board/database/queries.py | eugene-davis/ebr-board | f592a752e17e869a6fd35ef82398f97748dbdc78 | [
"Apache-2.0"
] | 4 | 2019-08-02T09:35:51.000Z | 2019-08-05T04:45:47.000Z | ebr_board/database/queries.py | LaudateCorpus1/ebr-board | f592a752e17e869a6fd35ef82398f97748dbdc78 | [
"Apache-2.0"
] | 1 | 2021-09-14T03:58:40.000Z | 2021-09-14T03:58:40.000Z | """
Query functions to run against ElasticSearch
"""
# pylint: disable=invalid-name
from ebr_connector.schema.build_results import BuildResults
detailed_build_info = {
"includes": [
"br_build_date_time",
"br_job_name",
"br_job_url_key",
"br_source",
"br_build_id_key",
... | 31.666667 | 113 | 0.647895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,069 | 0.562632 |
d96a378a19360aa836edef6494a1d0f976078638 | 4,714 | py | Python | src/scripts/vnet/uri/dummy_app.py | amithbraj/vpp | edf1da94dc099c6e2ab1d455ce8652fada3cdb04 | [
"Apache-2.0"
] | 751 | 2017-07-13T06:16:46.000Z | 2022-03-30T09:14:35.000Z | src/scripts/vnet/uri/dummy_app.py | amithbraj/vpp | edf1da94dc099c6e2ab1d455ce8652fada3cdb04 | [
"Apache-2.0"
] | 63 | 2018-06-11T09:48:35.000Z | 2021-01-05T09:11:03.000Z | src/scripts/vnet/uri/dummy_app.py | amithbraj/vpp | edf1da94dc099c6e2ab1d455ce8652fada3cdb04 | [
"Apache-2.0"
] | 479 | 2017-07-13T06:17:26.000Z | 2022-03-31T18:20:43.000Z | #!/usr/bin/env python3
import socket
import sys
import time
import argparse
# action can be reflect or drop
action = "drop"
test = 0
def test_data (data, n_rcvd):
n_read = len (data);
for i in range(n_read):
expected = (n_rcvd + i) & 0xff
byte_got = ord (data[i])
if (byte_got != expe... | 33.197183 | 83 | 0.591854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 835 | 0.177132 |
d96a84eccbdb4344152ec7775f2333ab5fdd6d60 | 2,806 | py | Python | getData.py | siddsax/WD-GAN | c5f7d68394ea60760db3eacb5f059ebebef6060d | [
"BSD-3-Clause"
] | null | null | null | getData.py | siddsax/WD-GAN | c5f7d68394ea60760db3eacb5f059ebebef6060d | [
"BSD-3-Clause"
] | null | null | null | getData.py | siddsax/WD-GAN | c5f7d68394ea60760db3eacb5f059ebebef6060d | [
"BSD-3-Clause"
] | null | null | null | import torch
from torch.utils import data
import numpy as np
import os
import cv2
import torchvision.transforms as transforms
from PIL import Image
import random
from PIL import ImageFile
def get_transform(opt):
transform_list = []
if opt.resize_or_crop == 'resize_and_crop':
osize = [opt.loadSize_1, op... | 35.075 | 104 | 0.63186 | 1,215 | 0.433001 | 0 | 0 | 0 | 0 | 0 | 0 | 427 | 0.152174 |
d96b52d758ea1e34f2a09afa20f1c461838affe8 | 6,290 | py | Python | bindings/python/test/time/test_time.py | verstaen/open-space-toolkit-physics | ca55011fd0de9aadacad84317fdce06985e5dbd8 | [
"Apache-2.0"
] | null | null | null | bindings/python/test/time/test_time.py | verstaen/open-space-toolkit-physics | ca55011fd0de9aadacad84317fdce06985e5dbd8 | [
"Apache-2.0"
] | null | null | null | bindings/python/test/time/test_time.py | verstaen/open-space-toolkit-physics | ca55011fd0de9aadacad84317fdce06985e5dbd8 | [
"Apache-2.0"
] | null | null | null | ################################################################################################################################################################
# @project Open Space Toolkit ▸ Physics
# @file bindings/python/test/time/test_time.py
# @author Lucas Brémond <lucas@loftorbital.com... | 35.337079 | 160 | 0.2531 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,066 | 0.646115 |
d96bfa9969aa7535edbc947eef5fd3836a546bc4 | 61,602 | py | Python | email_client.py | HideyoshiNakazone/duo-db-client | d847f59c4b4243cf359e2fca411f0e7a6864493b | [
"MIT"
] | null | null | null | email_client.py | HideyoshiNakazone/duo-db-client | d847f59c4b4243cf359e2fca411f0e7a6864493b | [
"MIT"
] | null | null | null | email_client.py | HideyoshiNakazone/duo-db-client | d847f59c4b4243cf359e2fca411f0e7a6864493b | [
"MIT"
] | null | null | null | from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
from datetime import datetime, timedelta
from email.mime.multipart import MIMEMultipart
from email.mime.image import MIMEImage
from email.mime.text import MIMEText
from email.header import Header
import psycopg2.extension... | 75.678133 | 493 | 0.65967 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57,580 | 0.934437 |
d96d94b8b61da641fde0216154cbe46da6d86b8e | 2,022 | py | Python | containers/api/api/models/user.py | yveso/supertoll | 0623c090ab97d5fb24dba6c18373c7cf8bc27e46 | [
"MIT"
] | null | null | null | containers/api/api/models/user.py | yveso/supertoll | 0623c090ab97d5fb24dba6c18373c7cf8bc27e46 | [
"MIT"
] | 8 | 2019-12-26T17:26:07.000Z | 2022-02-26T10:41:53.000Z | containers/api/api/models/user.py | yveso/supertoll | 0623c090ab97d5fb24dba6c18373c7cf8bc27e46 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from flask import current_app
import jwt
from api import db, bcrypt
class User(db.Model):
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
username = db.Column(db.String(128), unique=True, nullable=False)
email = db.Col... | 31.107692 | 79 | 0.573195 | 1,908 | 0.94362 | 0 | 0 | 366 | 0.181009 | 0 | 0 | 189 | 0.093472 |
d96f3eb5e590bbf34c05fb157cdbcbd239587353 | 522 | py | Python | examples/team.py | DarinMao/python-ccs | 73cf6319320b1e13acdce9f7b79128e213e6750b | [
"MIT"
] | null | null | null | examples/team.py | DarinMao/python-ccs | 73cf6319320b1e13acdce9f7b79128e213e6750b | [
"MIT"
] | null | null | null | examples/team.py | DarinMao/python-ccs | 73cf6319320b1e13acdce9f7b79128e213e6750b | [
"MIT"
] | null | null | null | import ccs
team = ccs.team(raw_input("Team Number: "))
summary = team.summary
print "Team {} ({} {}) - {} images ({} points) - {}/{} {}".format(
summary.number, summary.division, summary.location,
summary.images, summary.score, summary.playtime, summary.scoretime,
summary.warn)
for image in team.ima... | 43.5 | 74 | 0.637931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 121 | 0.231801 |
d96ff25d9d5722c19fe4236bed106b32c2d92cde | 10,795 | py | Python | nova/virt/powervm/tasks/network.py | zjzh/nova | 7bb21723171c59b93e28f5d508c2b6df39220f13 | [
"Apache-2.0"
] | 1,874 | 2015-01-04T05:18:34.000Z | 2022-03-31T03:30:28.000Z | nova/virt/powervm/tasks/network.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 132 | 2017-03-27T11:31:52.000Z | 2022-03-30T08:45:02.000Z | nova/virt/powervm/tasks/network.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 1,996 | 2015-01-04T15:11:51.000Z | 2022-03-31T11:03:13.000Z | # Copyright 2015, 2017 IBM Corp.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 41.519231 | 79 | 0.631774 | 9,693 | 0.897916 | 0 | 0 | 0 | 0 | 0 | 0 | 4,561 | 0.42251 |
d97012330ebae7c93600f55d0f782d19e5a41dae | 5,752 | py | Python | anti_sybil/graphs/generators/group_based.py | abramsymons/BrightID-AntiSybil | 86161afe654f46475944ebdb3b5453a1723180d9 | [
"ISC"
] | null | null | null | anti_sybil/graphs/generators/group_based.py | abramsymons/BrightID-AntiSybil | 86161afe654f46475944ebdb3b5453a1723180d9 | [
"ISC"
] | null | null | null | anti_sybil/graphs/generators/group_based.py | abramsymons/BrightID-AntiSybil | 86161afe654f46475944ebdb3b5453a1723180d9 | [
"ISC"
] | 1 | 2020-03-28T05:05:19.000Z | 2020-03-28T05:05:19.000Z | import random
import networkx as nx
from ..node import Node
def generate(input_data):
graph = nx.Graph()
groups_size = [random.choice(range(input_data['min_group_nodes'], input_data['max_group_nodes']+1))
for i in range(input_data['num_groups'])]
num_attacker = int(sum(groups_size) *
... | 42.607407 | 103 | 0.570932 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 742 | 0.128999 |
d9724df91f0d1e509249a814becdf43525ed1c7c | 182 | py | Python | Contest/ABC051/c/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | Contest/ABC051/c/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | Contest/ABC051/c/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
sx, sy, tx, ty = map(int, input().split())
x, y = tx - sx, ty - sy
print("R"*x + "U"*-~y + "L"*-~x + "D"*-~y + "R" + "U"*y + "R"*-~x + "D"*-~y + "L"*-~x + "U") | 45.5 | 92 | 0.401099 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.285714 |
d97307bce111d22165208da1309beb39d698985c | 92 | py | Python | problems/chapter12/mshibatatt/001.py | tokuma09/algorithm_problems | 58534620df73b230afbeb12de126174362625a78 | [
"CC0-1.0"
] | 1 | 2021-07-07T15:46:58.000Z | 2021-07-07T15:46:58.000Z | problems/chapter12/mshibatatt/001.py | tokuma09/algorithm_problems | 58534620df73b230afbeb12de126174362625a78 | [
"CC0-1.0"
] | 5 | 2021-06-05T14:16:41.000Z | 2021-07-10T07:08:28.000Z | problems/chapter12/mshibatatt/001.py | tokuma09/algorithm_problems | 58534620df73b230afbeb12de126174362625a78 | [
"CC0-1.0"
] | null | null | null | a = list(map(int, input().split()))
[i[0] for i in sorted(enumerate(a), key=lambda x:x[1])] | 30.666667 | 55 | 0.619565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d9733cb8ddf1ffbcfc514f4195c8b460a2b0fff8 | 560 | py | Python | typer-cli-python/source_code_step_2/rptodo/cli.py | syberflea/materials | 54f44725b40edf00c1b523d7a85b34a85014d7eb | [
"MIT"
] | 3,682 | 2018-05-07T19:45:24.000Z | 2022-03-31T15:19:10.000Z | typer-cli-python/source_code_step_2/rptodo/cli.py | sribarrow/materials | c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5 | [
"MIT"
] | 148 | 2018-05-15T21:18:49.000Z | 2022-03-21T11:25:39.000Z | typer-cli-python/source_code_step_2/rptodo/cli.py | sribarrow/materials | c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5 | [
"MIT"
] | 5,535 | 2018-05-25T23:36:08.000Z | 2022-03-31T16:55:52.000Z | """This module provides the RP To-Do CLI."""
from typing import Optional
import typer
from rptodo import __app_name__, __version__
app = typer.Typer()
def _version_callback(value: bool) -> None:
if value:
typer.echo(f"{__app_name__} v{__version__}")
raise typer.Exit()
@app.callback()
def mai... | 18.666667 | 56 | 0.623214 | 0 | 0 | 0 | 0 | 262 | 0.467857 | 0 | 0 | 133 | 0.2375 |
d97515b3fc95c50563dceea347d6cfbeb7c8f9bf | 4,629 | py | Python | surrortg/devices/relay.py | bn102/surrortg-sdk | 5f51515d0fd83741b3359b9a682c0a9afc38886f | [
"MIT"
] | 21 | 2020-11-03T23:41:56.000Z | 2022-03-21T04:11:46.000Z | surrortg/devices/relay.py | bn102/surrortg-sdk | 5f51515d0fd83741b3359b9a682c0a9afc38886f | [
"MIT"
] | 5 | 2021-02-11T14:36:03.000Z | 2021-07-20T11:45:07.000Z | surrortg/devices/relay.py | bn102/surrortg-sdk | 5f51515d0fd83741b3359b9a682c0a9afc38886f | [
"MIT"
] | 11 | 2020-11-13T11:14:33.000Z | 2022-03-21T04:11:51.000Z | import asyncio
import logging
import pigpio
class Relay:
"""Simple to use relay class implemented with pigpio
:param pin: GPIO pin number
:type pin: int
:param on_level_low: Determines the logic level of the on-state.
If set to True, the relay is on when the GPIO pin state is LOW.
De... | 28.054545 | 78 | 0.597969 | 3,741 | 0.808166 | 0 | 0 | 0 | 0 | 1,486 | 0.32102 | 2,016 | 0.435515 |
d976858493e0b3bdb11753531577c643cf5f3d49 | 8,322 | py | Python | voice.py | ImPurpl3/egg | 875f8105140544897e7b81af660e3da864b4cd54 | [
"MIT"
] | null | null | null | voice.py | ImPurpl3/egg | 875f8105140544897e7b81af660e3da864b4cd54 | [
"MIT"
] | null | null | null | voice.py | ImPurpl3/egg | 875f8105140544897e7b81af660e3da864b4cd54 | [
"MIT"
] | 1 | 2021-12-17T01:23:31.000Z | 2021-12-17T01:23:31.000Z | """
MIT License
Copyright (c) 2020 ValkyriaKing711
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge... | 32.76378 | 95 | 0.577866 | 6,057 | 0.727305 | 0 | 0 | 5,178 | 0.621758 | 5,093 | 0.611551 | 2,151 | 0.258285 |
d977def1eab47165344401c96a3e6718cbc8e63f | 689 | py | Python | solutions/Bulls and Cows/solution.py | nilax97/leetcode-solutions | d3c12f2b289662d199510e0431e177bbf3cda121 | [
"MIT"
] | 3 | 2021-06-06T22:03:15.000Z | 2021-06-08T08:49:04.000Z | solutions/Bulls and Cows/solution.py | nilax97/leetcode-solutions | d3c12f2b289662d199510e0431e177bbf3cda121 | [
"MIT"
] | null | null | null | solutions/Bulls and Cows/solution.py | nilax97/leetcode-solutions | d3c12f2b289662d199510e0431e177bbf3cda121 | [
"MIT"
] | null | null | null | class Solution:
def getHint(self, secret: str, guess: str) -> str:
bull = 0
cow = 0
values = dict()
for i in range(len(secret)):
if secret[i] == guess[i]:
bull += 1
elif secret[i] in values:
values[secret[i]] += 1
el... | 31.318182 | 54 | 0.37881 | 663 | 0.962264 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.008708 |
d97890969781912a2513be62820c2cd00f1b4a65 | 131 | py | Python | drf_gitlab_webhook/urls.py | Develatio/drf-gitlab-webhook | 34a90a979da1b004886620a89e916b88a61e0c85 | [
"MIT"
] | 1 | 2019-01-19T22:06:31.000Z | 2019-01-19T22:06:31.000Z | drf_gitlab_webhook/urls.py | Develatio/drf-gitlab-webhook | 34a90a979da1b004886620a89e916b88a61e0c85 | [
"MIT"
] | null | null | null | drf_gitlab_webhook/urls.py | Develatio/drf-gitlab-webhook | 34a90a979da1b004886620a89e916b88a61e0c85 | [
"MIT"
] | 1 | 2019-05-09T16:56:04.000Z | 2019-05-09T16:56:04.000Z | from django.conf.urls import url
from . import classviews
urlpatterns = [
url(r'^event/$', classviews.HookEvent.as_view()),
]
| 18.714286 | 53 | 0.709924 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.083969 |
d9789ea5dc5332d1b7a15a1afc6b61a382b8814b | 2,392 | py | Python | tap_parquet/streams.py | berenddeboer/tap-parquet | d9c50ea92a68b7777e31ca622468e1dadd86d9ce | [
"Apache-2.0"
] | null | null | null | tap_parquet/streams.py | berenddeboer/tap-parquet | d9c50ea92a68b7777e31ca622468e1dadd86d9ce | [
"Apache-2.0"
] | 4 | 2021-04-02T16:32:14.000Z | 2021-11-09T22:54:03.000Z | tap_parquet/streams.py | berenddeboer/tap-parquet | d9c50ea92a68b7777e31ca622468e1dadd86d9ce | [
"Apache-2.0"
] | 2 | 2021-11-09T06:44:46.000Z | 2021-12-01T12:28:29.000Z | """Stream class for tap-parquet."""
import requests
from copy import deepcopy
from pathlib import Path
from typing import Any, Dict, Optional, Union, List, Iterable
from singer_sdk.streams import Stream
from singer_sdk.typing import (
ArrayType,
BooleanType,
DateTimeType,
IntegerType,
NumberType,... | 31.473684 | 86 | 0.637542 | 1,467 | 0.613294 | 696 | 0.29097 | 681 | 0.284699 | 0 | 0 | 522 | 0.218227 |
d978a101e4eebb559e09fff2906b2a39d73becb8 | 3,851 | py | Python | ppt/app.py | fabioacarvalho/Projetos-Praticando | fa0b324c03a0b4bc5d0ed9d55bbc3ce48d67541b | [
"MIT"
] | null | null | null | ppt/app.py | fabioacarvalho/Projetos-Praticando | fa0b324c03a0b4bc5d0ed9d55bbc3ce48d67541b | [
"MIT"
] | null | null | null | ppt/app.py | fabioacarvalho/Projetos-Praticando | fa0b324c03a0b4bc5d0ed9d55bbc3ce48d67541b | [
"MIT"
] | null | null | null | import sys
import random
from design import *
from PyQt5.QtWidgets import QMainWindow, QApplication
from PyQt5 import QtGui
ppt = ['Rock', 'Paper', 'Scissors']
game = []
def aChoice():
esc = random.choice(ppt)
game.append(esc)
class App(QMainWindow, Ui_MainWindow):
def __init__(self, parent=None):
... | 36.67619 | 101 | 0.615684 | 3,501 | 0.909115 | 0 | 0 | 0 | 0 | 0 | 0 | 1,076 | 0.279408 |
d97defe4ab7d19c2df85621955ea08007777df4a | 354 | py | Python | test/test_format.py | gongso1st/geopy | 9252f4b12197ff3c5e3fae50d9bae74974d5d20f | [
"MIT"
] | 1 | 2019-07-17T14:38:52.000Z | 2019-07-17T14:38:52.000Z | test/test_format.py | gongso1st/geopy | 9252f4b12197ff3c5e3fae50d9bae74974d5d20f | [
"MIT"
] | null | null | null | test/test_format.py | gongso1st/geopy | 9252f4b12197ff3c5e3fae50d9bae74974d5d20f | [
"MIT"
] | 1 | 2020-06-03T01:42:17.000Z | 2020-06-03T01:42:17.000Z |
import unittest
from geopy.point import Point
from geopy.format import format_degrees
class TestFormat(unittest.TestCase):
@unittest.skip("")
def test_format(self):
"""
format_degrees
"""
self.assertEqual(
format_degrees(Point.parse_degrees('-13', '19', 0)),
... | 19.666667 | 64 | 0.584746 | 264 | 0.745763 | 0 | 0 | 222 | 0.627119 | 0 | 0 | 65 | 0.183616 |
d97e9bfb4e01d1a5a972e104691a2c436b4de3ca | 653 | py | Python | Sorts.py | marinajacks/nowcoder | 5fafb9b12f56f111737e56358016206023c8067c | [
"MIT"
] | null | null | null | Sorts.py | marinajacks/nowcoder | 5fafb9b12f56f111737e56358016206023c8067c | [
"MIT"
] | null | null | null | Sorts.py | marinajacks/nowcoder | 5fafb9b12f56f111737e56358016206023c8067c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 20 20:52:56 2019
@author: 陈彪,版权所有
这个是一个排序算法的总结,将所有的排序算法都重新写一遍,然后我们首先会分析算法的时间
复杂度,然后简单介绍一下这些算法的原理,最后使用python实现,然后我们会使用测试案例
来进行测试。
"""
import random
'''首先映入眼帘的就是冒泡排序,这是一个让人理解起来最简单的排序算法,这个算法的时间复
杂度是O(N^2),从下面的程序中也能看出来这个算法的时间复杂度确实是O(N^2).
'''
def bubble(a):
for i in... | 15.926829 | 44 | 0.580398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 621 | 0.635619 |
d97f0714641d6f4865c82aa054acf514505a58ff | 722 | py | Python | scripts/token.py | blockchain-jedi/erc20-contract-template | 4364d131e5046d0534f6b92304e6f91b5e8adb23 | [
"MIT"
] | null | null | null | scripts/token.py | blockchain-jedi/erc20-contract-template | 4364d131e5046d0534f6b92304e6f91b5e8adb23 | [
"MIT"
] | null | null | null | scripts/token.py | blockchain-jedi/erc20-contract-template | 4364d131e5046d0534f6b92304e6f91b5e8adb23 | [
"MIT"
] | null | null | null | #
# Usage:
#
# % brownie console
# >>> from scripts import token
# >>> green = token.main()
# >>> token.issue(green)
# >>> token.transfer(green, accounts[1], accounts[2], 1)
#
from brownie import Token, accounts
admin = accounts[0]
issuer = accounts[1]
holders = accounts[2:9]
max_supply... | 24.066667 | 89 | 0.624654 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 244 | 0.33795 |
d980d8c3ac914ab7b6744057703f0c8a2e3c1e3d | 2,711 | py | Python | nederlands.py | rec/neederlands | f5b71a768c9a51a06014a386ffafc8844943e4b2 | [
"Unlicense"
] | 1 | 2020-02-05T17:48:22.000Z | 2020-02-05T17:48:22.000Z | nederlands.py | rec/nederlands | f5b71a768c9a51a06014a386ffafc8844943e4b2 | [
"Unlicense"
] | null | null | null | nederlands.py | rec/nederlands | f5b71a768c9a51a06014a386ffafc8844943e4b2 | [
"Unlicense"
] | null | null | null | import string
WIKI_BESTAND = '/Users/tom/Downloads/\
nlwiktionary-20191020-pages-articles-multistream-index.txt'
WOORD_BESTAND = 'woord-frequenties.txt'
SLECHT_BESTAND = 'slechte-woorden.txt'
BLACKLIST = {i.strip() for i in open(SLECHT_BESTAND)}
AANTAL = 1000000000000000
MIN = 4
MIN_ACHTERVOEGSEL = 4
VOORVOEGSELS = ... | 20.231343 | 75 | 0.54408 | 0 | 0 | 283 | 0.10439 | 0 | 0 | 0 | 0 | 406 | 0.14976 |
d98213a54bed6fe63049234194f24aa16f814a04 | 384 | py | Python | ds_utils/config.py | dylanjcastillo/nlp-snippets | 1cb2a9d4ad5de72714a617ca223f5f822ca72aea | [
"MIT"
] | 9 | 2021-01-29T04:48:30.000Z | 2022-03-22T20:51:19.000Z | ds_utils/config.py | dylanjcastillo/nlp-snippets | 1cb2a9d4ad5de72714a617ca223f5f822ca72aea | [
"MIT"
] | null | null | null | ds_utils/config.py | dylanjcastillo/nlp-snippets | 1cb2a9d4ad5de72714a617ca223f5f822ca72aea | [
"MIT"
] | 1 | 2021-07-10T18:17:01.000Z | 2021-07-10T18:17:01.000Z | import os
import random
import numpy as np
import pandas as pd
def set_random_seed(seed=42):
random.seed(seed)
os.environ["PYTHONHASHSEED"] = str(seed)
np.random.seed(seed)
def set_display_options():
pd.set_option("max_colwidth", 1000)
pd.set_option("max_rows", 50)
pd.set_option("max_column... | 20.210526 | 54 | 0.700521 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.161458 |
d9829ca97d266ae282da297f5160c6bc599cfd00 | 158 | py | Python | whileloop.py | muhrizky/DSC-DataCamp | 3b8f8a7fd29f236a78e2330248d470403757d6b8 | [
"MIT"
] | null | null | null | whileloop.py | muhrizky/DSC-DataCamp | 3b8f8a7fd29f236a78e2330248d470403757d6b8 | [
"MIT"
] | null | null | null | whileloop.py | muhrizky/DSC-DataCamp | 3b8f8a7fd29f236a78e2330248d470403757d6b8 | [
"MIT"
] | null | null | null | offset = -8
while offset != 0 :
print('Benar')
if offset > 0 :
offset = offset -3
else:
offset = offset +2
print(offset) | 15.8 | 26 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.044304 |
d984472a164601e55d0346ed01540ed2b20dc88d | 832 | py | Python | config/tortoise.py | nythonore/fastapi-async | 82f34dd421e573f96af1953cc1f72be565743df8 | [
"MIT"
] | null | null | null | config/tortoise.py | nythonore/fastapi-async | 82f34dd421e573f96af1953cc1f72be565743df8 | [
"MIT"
] | null | null | null | config/tortoise.py | nythonore/fastapi-async | 82f34dd421e573f96af1953cc1f72be565743df8 | [
"MIT"
] | null | null | null | from tortoise.contrib.fastapi import register_tortoise as config_tortoise
from config.settings import settings
DB_URL = f'postgres://{settings.DB_USERNAME}:{settings.DB_PASSWORD}@{settings.DB_HOST}:{settings.DB_PORT}/{settings.DB_DATABASE}'
TORTOISE_MODULES = ['app.example.model']
TORTOISE_ORM_MODULES = TORTOISE_MOD... | 24.470588 | 129 | 0.638221 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 235 | 0.282452 |
d9863370e480b53bf264ca69904724291538c799 | 105 | py | Python | application/configuration/views.py | pernaess/ctrlpnl | e0636f3b19d4a5ec5e96120526f238888271391d | [
"MIT"
] | 34 | 2020-01-27T15:07:25.000Z | 2021-09-25T17:07:37.000Z | application/configuration/views.py | pernaess/ctrlpnl | e0636f3b19d4a5ec5e96120526f238888271391d | [
"MIT"
] | 26 | 2020-01-29T12:24:42.000Z | 2022-03-12T00:16:44.000Z | application/configuration/views.py | pernaess/ctrlpnl | e0636f3b19d4a5ec5e96120526f238888271391d | [
"MIT"
] | 7 | 2020-01-27T11:42:11.000Z | 2021-04-05T04:42:22.000Z | from django.shortcuts import redirect
def login_redirect(request):
return redirect('/account/login') | 26.25 | 37 | 0.790476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.152381 |
d986985c57ee93c51e109add53b8920f894727ed | 982 | py | Python | setup.py | orange-kao/rpm-s3-mirror | 4a08cdb47de33045c5e5bc8be1c5ee17bc169d56 | [
"Apache-2.0"
] | null | null | null | setup.py | orange-kao/rpm-s3-mirror | 4a08cdb47de33045c5e5bc8be1c5ee17bc169d56 | [
"Apache-2.0"
] | 4 | 2020-05-08T03:36:15.000Z | 2022-03-31T10:51:18.000Z | setup.py | aiven/rpm-s3-mirror | 55f049a92258eed3cc863135a964c10c25a3c25a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
from setuptools import setup
import version
version = version.get_project_version("rpm_s3_mirror/version.py")
setup(
name="rpm_s3_mirror",
packages=["rpm_s3_mirror"],
version=version,
description="Tool for syncing RPM repositories with ... | 26.540541 | 65 | 0.619145 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 544 | 0.553971 |
d9869f57875e2690d3cd90cc8428e4dc9378e706 | 2,074 | py | Python | tests/step_defs/test_search_steps.py | aura80/TAU_BDD_Reserved_Selenium_Python_New | cccaa437f1c8f4aa4f47f41ca2d5c0b1d3166035 | [
"MIT"
] | null | null | null | tests/step_defs/test_search_steps.py | aura80/TAU_BDD_Reserved_Selenium_Python_New | cccaa437f1c8f4aa4f47f41ca2d5c0b1d3166035 | [
"MIT"
] | null | null | null | tests/step_defs/test_search_steps.py | aura80/TAU_BDD_Reserved_Selenium_Python_New | cccaa437f1c8f4aa4f47f41ca2d5c0b1d3166035 | [
"MIT"
] | null | null | null | import time
from pytest_bdd import scenarios, when, then, given, parsers
from pages.search import SearchTests
from pages.register_page import RegisterPage
# Scenarios
scenarios('../features/test_register_search_scenario.feature')
@given('open the page')
def open_page(browser):
negative = SearchTests(browser)
... | 28.410959 | 98 | 0.750241 | 0 | 0 | 0 | 0 | 1,810 | 0.87271 | 0 | 0 | 596 | 0.287367 |
d987308ee279d5897c812d0ddad5761b6c09fe3e | 8,668 | py | Python | pendium/filesystem.py | LuRsT/Pendium | f71b3db987853df919c14f0be4238df00852a9a7 | [
"Apache-2.0"
] | 5 | 2015-05-07T21:26:06.000Z | 2016-07-27T11:41:49.000Z | pendium/filesystem.py | LuRsT/Pendium | f71b3db987853df919c14f0be4238df00852a9a7 | [
"Apache-2.0"
] | 9 | 2017-12-21T20:22:16.000Z | 2019-07-24T13:04:35.000Z | pendium/filesystem.py | LuRsT/Pendium | f71b3db987853df919c14f0be4238df00852a9a7 | [
"Apache-2.0"
] | null | null | null | import codecs
from logging import getLogger
import os
from pendium import app
from pendium.plugins import IRenderPlugin
from pendium.plugins import ISearchPlugin
from yapsy.PluginManager import PluginManager
log = getLogger(__name__)
# Populate plugins
lib_path = os.path.abspath(os.path.dirname(__file__))
manager =... | 27.782051 | 82 | 0.578565 | 8,134 | 0.938394 | 0 | 0 | 897 | 0.103484 | 0 | 0 | 820 | 0.094601 |
d988d23ea27ce8a2b5e3d30a08db96c282196fd0 | 3,957 | py | Python | sabcom/helpers.py | blackrhinoabm/sabcom | ec0d9c37e11a8bd49352539f3f16ef322e1b5cf8 | [
"MIT"
] | 6 | 2020-05-21T11:42:27.000Z | 2020-10-20T03:00:22.000Z | sabcom/helpers.py | blackrhinoabm/sabcom | ec0d9c37e11a8bd49352539f3f16ef322e1b5cf8 | [
"MIT"
] | 2 | 2020-04-08T17:45:37.000Z | 2020-09-22T16:13:27.000Z | sabcom/helpers.py | blackrhinoabm/sabcom | ec0d9c37e11a8bd49352539f3f16ef322e1b5cf8 | [
"MIT"
] | 4 | 2020-04-10T14:18:34.000Z | 2020-10-31T16:18:30.000Z | import random
import numpy as np
import pandas as pd
import math
from sklearn import preprocessing
import scipy.stats as stats
def edge_in_cliq(edge, nodes_in_cliq):
if edge[0] in nodes_in_cliq:
return True
else:
return False
def edges_to_remove_neighbourhood(all_edges, neighbourhood_density... | 39.57 | 120 | 0.645438 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,110 | 0.280516 |
d989087921d1b51a7238e387777319d8107f335c | 767 | py | Python | tests/io_test.py | wgfi110/speech | 59a3e2d8d2d99d31cf32e06c1a0751eb36a3c02b | [
"Apache-2.0"
] | 642 | 2017-09-27T01:11:16.000Z | 2022-03-29T11:02:08.000Z | tests/io_test.py | wgfi110/speech | 59a3e2d8d2d99d31cf32e06c1a0751eb36a3c02b | [
"Apache-2.0"
] | 54 | 2017-10-06T18:21:42.000Z | 2021-01-15T07:10:21.000Z | tests/io_test.py | wgfi110/speech | 59a3e2d8d2d99d31cf32e06c1a0751eb36a3c02b | [
"Apache-2.0"
] | 176 | 2017-09-27T16:10:08.000Z | 2022-03-15T03:43:07.000Z | import tempfile
import speech.models
import speech.loader
import shared
def test_save():
freq_dim = 120
model = speech.models.Model(freq_dim,
shared.model_config)
batch_size = 2
data_json = "test.json"
preproc = speech.loader.Preprocessor(data_json)
save_dir = tempfile.... | 23.96875 | 51 | 0.680574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.091265 |
d989c05c96298ca370a7889007b9e02fb326abb5 | 928 | py | Python | image_analyse/Image CDF and PDF.py | TheRockerfly/data_mining_portfolio | a84f1a1a9dc9fec668b81e012e9d130d91227598 | [
"MIT"
] | null | null | null | image_analyse/Image CDF and PDF.py | TheRockerfly/data_mining_portfolio | a84f1a1a9dc9fec668b81e012e9d130d91227598 | [
"MIT"
] | null | null | null | image_analyse/Image CDF and PDF.py | TheRockerfly/data_mining_portfolio | a84f1a1a9dc9fec668b81e012e9d130d91227598 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt # TODO: port away from matplotlib to a seaborn
# Probability Distribution Function (PDF).
# Cumulative Distribution Function (CDF)
# TODO: put all of these functions within a custom function
image = plt.imread('900px-Astronaut-EVA.jpg')
plt.subplot(2, 1, 1)
plt.imshow(image, cmap='gra... | 29.935484 | 79 | 0.693966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 462 | 0.497845 |
d98a64a68a68150c17a5ba9fa0b9485585e96dc4 | 35 | py | Python | yolo/model_zoo/__init__.py | ioangatop/yolo | c65a72337369572bc07090f39123e2bf6ff5f4a3 | [
"MIT"
] | 1 | 2021-06-28T01:22:38.000Z | 2021-06-28T01:22:38.000Z | yolo/model_zoo/__init__.py | ioangatop/yolo | c65a72337369572bc07090f39123e2bf6ff5f4a3 | [
"MIT"
] | null | null | null | yolo/model_zoo/__init__.py | ioangatop/yolo | c65a72337369572bc07090f39123e2bf6ff5f4a3 | [
"MIT"
] | null | null | null | from .model_zoo import load_weights | 35 | 35 | 0.885714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d98b62aa0fdb706a6f4cb4c830afcb3e8f4fca20 | 282 | py | Python | test_logger/demo.py | payalkutana/logging_logger | 7dc7ccaee63e922b7c7f699a5d0b4e1317a27502 | [
"MIT"
] | null | null | null | test_logger/demo.py | payalkutana/logging_logger | 7dc7ccaee63e922b7c7f699a5d0b4e1317a27502 | [
"MIT"
] | null | null | null | test_logger/demo.py | payalkutana/logging_logger | 7dc7ccaee63e922b7c7f699a5d0b4e1317a27502 | [
"MIT"
] | null | null | null | from logging_logger import loggerClass
import logging
loggerClass.WritetoScreen(loggerClass,logging.INFO,"testing...",
'%(levelname)s:%(message)s')
loggerClass.Writetofile(loggerClass,'sample.log',logging.WARNING,"testing...",
'%(levelname)s:%(message)s')
| 31.333333 | 78 | 0.70922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.319149 |
d98be932a3e4d84d93b13cf5f54ee3801d2adc54 | 111 | py | Python | LearnPython3TheHardWay/ex8.py | lanjing99/UsePython | 19a84e3ef65dc326cf9c4bfccbf2d99c22f858a4 | [
"MIT"
] | null | null | null | LearnPython3TheHardWay/ex8.py | lanjing99/UsePython | 19a84e3ef65dc326cf9c4bfccbf2d99c22f858a4 | [
"MIT"
] | null | null | null | LearnPython3TheHardWay/ex8.py | lanjing99/UsePython | 19a84e3ef65dc326cf9c4bfccbf2d99c22f858a4 | [
"MIT"
] | null | null | null | formatter = "{} {} {} {}"
print(formatter.format(1, 2, 3, 4))
print(formatter.format("a", "b", "c", "d", "r"))
| 27.75 | 48 | 0.522523 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.252252 |
d98cbe93e213130d35e4010a52b1592965b94b18 | 14,115 | py | Python | src/matching/games/hospital_resident.py | drvinceknight/matching | da18fc12c880a1292a04d06824b5c17e68349e83 | [
"MIT"
] | null | null | null | src/matching/games/hospital_resident.py | drvinceknight/matching | da18fc12c880a1292a04d06824b5c17e68349e83 | [
"MIT"
] | null | null | null | src/matching/games/hospital_resident.py | drvinceknight/matching | da18fc12c880a1292a04d06824b5c17e68349e83 | [
"MIT"
] | null | null | null | """ The HR solver and algorithm. """
from matching import Game, Matching
from matching import Player as Resident
from matching.players import Hospital
from .util import delete_pair, match_pair
class HospitalResident(Game):
""" A class for solving instances of the hospital-resident assignment
problem (HR).
... | 34.426829 | 80 | 0.616932 | 6,671 | 0.472618 | 0 | 0 | 403 | 0.028551 | 0 | 0 | 6,254 | 0.443075 |
d98e4516cf482bd1a8b30548c1119b56db7376b4 | 2,931 | py | Python | solutions/rank-1/prepare_data.py | mattmotoki/ashrae-great-energy-predictor-3-solution-analysis | 8a5260049d4537c57c37a78e77f2fba13c55177d | [
"MIT"
] | 48 | 2020-03-18T11:34:49.000Z | 2022-03-31T18:30:00.000Z | solutions/rank-1/prepare_data.py | mattmotoki/ashrae-great-energy-predictor-3-solution-analysis | 8a5260049d4537c57c37a78e77f2fba13c55177d | [
"MIT"
] | 40 | 2020-03-24T18:17:51.000Z | 2022-03-12T00:30:30.000Z | solutions/rank-1/prepare_data.py | mattmotoki/ashrae-great-energy-predictor-3-solution-analysis | 8a5260049d4537c57c37a78e77f2fba13c55177d | [
"MIT"
] | 24 | 2020-04-18T02:52:47.000Z | 2022-01-22T19:13:16.000Z | #!/usr/bin/env python
# coding: utf-8
# based on public kernel https://www.kaggle.com/corochann/ashrae-feather-format-for-fast-loading
import os
import random
import gc
import tqdm
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
def prepare(root, output):
train_df ... | 40.708333 | 145 | 0.716479 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 895 | 0.305357 |
d98fb88b15b7a7bd1330a40dd1ecdb89f69e5b99 | 23,531 | py | Python | models/triangular_lattice.py | macthecadillac/Interacting-Fermions | 6122d2a7e67533b28e581929995ce8e2a2ad41fc | [
"BSD-3-Clause"
] | 1 | 2020-07-29T06:06:12.000Z | 2020-07-29T06:06:12.000Z | models/triangular_lattice.py | macthecadillac/Interacting-Fermions | 6122d2a7e67533b28e581929995ce8e2a2ad41fc | [
"BSD-3-Clause"
] | null | null | null | models/triangular_lattice.py | macthecadillac/Interacting-Fermions | 6122d2a7e67533b28e581929995ce8e2a2ad41fc | [
"BSD-3-Clause"
] | null | null | null | import copy
import functools
import os
import numpy as np
from scipy import sparse
from spinsys import constructors, half, dmrg, exceptions
from cffi import FFI
class SiteVector(constructors.PeriodicBCSiteVector):
def __init__(self, ordered_pair, Nx, Ny):
super().__init__(ordered_pair, Nx, Ny)
def a... | 32.411846 | 88 | 0.537164 | 7,823 | 0.331343 | 0 | 0 | 3,535 | 0.149725 | 0 | 0 | 10,526 | 0.445828 |
d990ddde01350e477f961c78fce1ed2af6c8f78a | 16,528 | py | Python | stgelpDL/dev/edfiles.py | dmitryv56/stgelpDL | a3dbe9f1a4ff19586dfdfac01748634b47389a6e | [
"MIT"
] | null | null | null | stgelpDL/dev/edfiles.py | dmitryv56/stgelpDL | a3dbe9f1a4ff19586dfdfac01748634b47389a6e | [
"MIT"
] | null | null | null | stgelpDL/dev/edfiles.py | dmitryv56/stgelpDL | a3dbe9f1a4ff19586dfdfac01748634b47389a6e | [
"MIT"
] | null | null | null | import pandas as pd
import copy
from pathlib import Path
import pandas as pd
import numpy as np
import math
from datetime import datetime,timedelta
import matplotlib.pyplot as plt
from predictor.utility import msg2log
def Forcast_imbalance_edit():
ds = pd.read_csv("~/LaLaguna/stgelpDL/dataLaLaguna/ElHiero_240920... | 35.697624 | 130 | 0.647749 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,048 | 0.365924 |
d9913fd01e1b721da362c3a1ba14143f873c7a20 | 5,450 | py | Python | knoema/source_data/get_indic_id.py | zmmyc/ksh | 5869908714ea87a297a8fc19ecafd7d3cf15e889 | [
"MIT"
] | 1 | 2022-03-30T06:50:42.000Z | 2022-03-30T06:50:42.000Z | knoema/source_data/get_indic_id.py | zmmyc/ksh | 5869908714ea87a297a8fc19ecafd7d3cf15e889 | [
"MIT"
] | null | null | null | knoema/source_data/get_indic_id.py | zmmyc/ksh | 5869908714ea87a297a8fc19ecafd7d3cf15e889 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import requests, json
from bs4 import BeautifulSoup
from mspider.spider import MSpider
class Get_indic_idSpider(MSpider):
def __init__(self):
self.name = "get_count_id"
self.indics = ['GDP', 'GDP-based-on-PPP', 'Real-GDP-growth', 'GDP-per-capita', 'GDP-per-capita-based-on-P... | 147.297297 | 4,232 | 0.728807 | 5,214 | 0.956697 | 0 | 0 | 0 | 0 | 0 | 0 | 4,127 | 0.757248 |
d99172d582203a6c9d89885e87dc7fdf395331ed | 2,556 | py | Python | Programming Assignment 3/min Cut.py | TheRevanchist/Design-and-Analysis-of-Algorithms-Part-1 | e41e3a1117258fb6f635c3c734675215dbce5263 | [
"MIT"
] | 1 | 2020-08-02T12:01:56.000Z | 2020-08-02T12:01:56.000Z | Programming Assignment 3/min Cut.py | TheRevanchist/Design-and-Analysis-of-Algorithms-Part-1 | e41e3a1117258fb6f635c3c734675215dbce5263 | [
"MIT"
] | null | null | null | Programming Assignment 3/min Cut.py | TheRevanchist/Design-and-Analysis-of-Algorithms-Part-1 | e41e3a1117258fb6f635c3c734675215dbce5263 | [
"MIT"
] | null | null | null | from random import choice
from copy import deepcopy
def minCut(G):
# the function which randomly chooses the edges and fuses the nodes which are linked with that edge
# input: the graph G, represented by a dictionary
# output: the min cut
# while the graph has more than two nodes, randomly... | 40.571429 | 115 | 0.618153 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,495 | 0.584898 |
d99179f5f0c295d6288591b72b99cc96a11e545c | 5,223 | py | Python | python/tvm/tensor_graph/core2/nn/functional/convolution.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | 22 | 2022-03-18T07:29:31.000Z | 2022-03-23T14:54:32.000Z | python/tvm/tensor_graph/core2/nn/functional/convolution.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | null | null | null | python/tvm/tensor_graph/core2/nn/functional/convolution.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | 2 | 2022-03-18T08:26:34.000Z | 2022-03-20T06:02:48.000Z | import tvm
from tvm.tensor_graph.core2.graph.concrete import Compute, Tensor
from .padding import zero_pad2d
######################################################################
# for functional, all states are inputs, data from inside functionals
# can only be constants
##########################################... | 45.815789 | 107 | 0.551216 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 971 | 0.185908 |
d992c4a228423f90ecb2adf20087008d8ce1a6bc | 1,352 | py | Python | geneticalgorithm2/cache.py | its4avin/geneticalgorithm2 | 59663ce92a92a0278b5220c32a63a3a2b839d4b1 | [
"MIT"
] | 1 | 2021-04-14T18:11:34.000Z | 2021-04-14T18:11:34.000Z | geneticalgorithm2/cache.py | its4avin/geneticalgorithm2 | 59663ce92a92a0278b5220c32a63a3a2b839d4b1 | [
"MIT"
] | null | null | null | geneticalgorithm2/cache.py | its4avin/geneticalgorithm2 | 59663ce92a92a0278b5220c32a63a3a2b839d4b1 | [
"MIT"
] | null | null | null |
import numpy as np
from functools import lru_cache, wraps
#from fastcache import clru_cache
def np_lru_cache(*args, **kwargs):
"""
LRU cache implementation for functions whose FIRST parameter is a numpy array
forked from: https://gist.github.com/Susensio/61f4fee01150caaac1e10fc5f005eb75
"""
... | 23.719298 | 97 | 0.633136 | 0 | 0 | 0 | 0 | 347 | 0.256657 | 0 | 0 | 472 | 0.349112 |
d993489a11a177d4b9b259fdaaa7c8fc02befc02 | 4,951 | py | Python | tests/test_auto_scan_rnn.py | neonhuang/Paddle2ONNX | 96640ccbeea1ae4e628dde20b3dbb1c3b4ef2702 | [
"Apache-2.0"
] | 95 | 2019-09-27T14:26:59.000Z | 2020-12-08T01:20:28.000Z | tests/test_auto_scan_rnn.py | neonhuang/Paddle2ONNX | 96640ccbeea1ae4e628dde20b3dbb1c3b4ef2702 | [
"Apache-2.0"
] | 51 | 2018-04-04T22:39:30.000Z | 2019-08-28T20:19:14.000Z | tests/test_auto_scan_rnn.py | neonhuang/Paddle2ONNX | 96640ccbeea1ae4e628dde20b3dbb1c3b4ef2702 | [
"Apache-2.0"
] | 22 | 2019-09-03T08:50:04.000Z | 2020-12-02T11:05:42.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 29.470238 | 74 | 0.576045 | 4,097 | 0.82751 | 0 | 0 | 0 | 0 | 0 | 0 | 1,325 | 0.267623 |
d993b7be2006ba21a11c5f625ad4f43b0951e1e1 | 706 | py | Python | project_organizer/migrations/0009_project_manager_from_time_project_manager_until_time.py | c-Door-in/dvmn-project-organizer | 6e7ccdf6d0e6adfed83be8babd750d6c6f75a83e | [
"MIT"
] | null | null | null | project_organizer/migrations/0009_project_manager_from_time_project_manager_until_time.py | c-Door-in/dvmn-project-organizer | 6e7ccdf6d0e6adfed83be8babd750d6c6f75a83e | [
"MIT"
] | null | null | null | project_organizer/migrations/0009_project_manager_from_time_project_manager_until_time.py | c-Door-in/dvmn-project-organizer | 6e7ccdf6d0e6adfed83be8babd750d6c6f75a83e | [
"MIT"
] | null | null | null | # Generated by Django 4.0.1 on 2022-01-28 00:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('project_organizer', '0008_rename_tg_id_student_tg_user_project_manager_tg_user_and_more'),
]
operations = [
migrations.AddField(
... | 29.416667 | 100 | 0.643059 | 613 | 0.868272 | 0 | 0 | 0 | 0 | 0 | 0 | 238 | 0.33711 |
d996560fd986f9243110269ae81896011add1a35 | 842 | py | Python | tests/test_users_organizations.py | uilianries/bintray-python | ab06edcf33663a5095c6c2121c19fbe2c1409127 | [
"MIT"
] | 4 | 2019-07-02T14:37:55.000Z | 2022-01-20T13:37:01.000Z | tests/test_users_organizations.py | uilianries/bintray-python | ab06edcf33663a5095c6c2121c19fbe2c1409127 | [
"MIT"
] | 53 | 2019-07-02T17:13:47.000Z | 2022-03-15T11:55:41.000Z | tests/test_users_organizations.py | uilianries/bintray-python | ab06edcf33663a5095c6c2121c19fbe2c1409127 | [
"MIT"
] | null | null | null | from bintray.bintray import Bintray
def test_get_user():
bintray = Bintray()
response = bintray.get_user("uilianries")
assert response.get("name") == "uilianries"
assert response.get("error") == False
assert response.get("statusCode") == 200
def test_get_organization():
bintray = Bintray()
... | 28.066667 | 82 | 0.675772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.19715 |
793f2b848c3758a8f7dae311e7d721594f8e8f09 | 3,424 | py | Python | setup.py | HEmile/problog | 576b6fd305f72b12125111c8d4d62cf8a7bbda0f | [
"Apache-2.0"
] | 189 | 2019-05-27T08:20:10.000Z | 2022-03-28T09:29:22.000Z | setup.py | HEmile/problog | 576b6fd305f72b12125111c8d4d62cf8a7bbda0f | [
"Apache-2.0"
] | 60 | 2019-06-11T15:07:48.000Z | 2022-03-25T02:31:23.000Z | setup.py | HEmile/problog | 576b6fd305f72b12125111c8d4d62cf8a7bbda0f | [
"Apache-2.0"
] | 33 | 2019-07-03T13:14:24.000Z | 2022-02-20T01:07:15.000Z | #! /usr/bin/env python
import sys
import os
version_file = os.path.join(
os.path.abspath(os.path.dirname(__file__)), "problog/version.py"
)
version = {}
with open(version_file) as fp:
exec(fp.read(), version)
version = version["version"]
if __name__ == "__main__" and len(sys.argv) == 1:
from problog im... | 29.517241 | 88 | 0.561332 | 441 | 0.128797 | 0 | 0 | 0 | 0 | 0 | 0 | 1,197 | 0.349591 |