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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d84bc5b6f7292dc9f40fd92ef12317fa084962da | 2,731 | py | Python | mosquitto-1.5.4/test/broker/08-ssl-bridge.py | RainaWLK/mqtt-test | cb4175c8bd1e35deed45941ca61c88fdcc6ddeba | [
"MIT"
] | null | null | null | mosquitto-1.5.4/test/broker/08-ssl-bridge.py | RainaWLK/mqtt-test | cb4175c8bd1e35deed45941ca61c88fdcc6ddeba | [
"MIT"
] | null | null | null | mosquitto-1.5.4/test/broker/08-ssl-bridge.py | RainaWLK/mqtt-test | cb4175c8bd1e35deed45941ca61c88fdcc6ddeba | [
"MIT"
] | 1 | 2021-06-19T17:17:41.000Z | 2021-06-19T17:17:41.000Z | #!/usr/bin/env python
import subprocess
import socket
import ssl
import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
if cmd_subfol... | 31.390805 | 168 | 0.680337 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 487 | 0.178323 |
d84c3bb5b6974c0f95b489673269ce950a277333 | 8,658 | py | Python | models/architecture/vaegan/trainer.py | EmmaNguyen/feature_adversarial_with_topology_signatures | efa7db6d0fdf5b2505d67d4341dcdb2ab05a97a7 | [
"MIT"
] | 1 | 2018-10-08T09:29:51.000Z | 2018-10-08T09:29:51.000Z | models/architecture/vaegan/trainer.py | EmmaNguyen/feature_adversarial_with_topology_signatures | efa7db6d0fdf5b2505d67d4341dcdb2ab05a97a7 | [
"MIT"
] | 4 | 2018-06-30T18:06:47.000Z | 2018-08-16T02:01:59.000Z | models/architecture/vaegan/trainer.py | EmmaNguyen/feature_adversarial_with_topology_signatures | efa7db6d0fdf5b2505d67d4341dcdb2ab05a97a7 | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn.functional as F
from torch.autograd import Variable
from .distributions import rand_circle2d
from ot import gromov_wasserstein2, unif
def rand_projections(embedding_dim, num_samples=50):
"""This fn generates `L` random samples from the latent space's unit sphere.
... | 46.299465 | 195 | 0.71125 | 2,437 | 0.281474 | 0 | 0 | 0 | 0 | 0 | 0 | 3,628 | 0.419034 |
d84cdf2cbca845f67fc205a391078d2af1f1badc | 475 | py | Python | image_action.py | abhishekchetani/ML_18june | 4a6465259c7d0de0cbdc12c1c9f10dd6f925883d | [
"Apache-2.0"
] | null | null | null | image_action.py | abhishekchetani/ML_18june | 4a6465259c7d0de0cbdc12c1c9f10dd6f925883d | [
"Apache-2.0"
] | null | null | null | image_action.py | abhishekchetani/ML_18june | 4a6465259c7d0de0cbdc12c1c9f10dd6f925883d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import cv2
img = cv2.imread("/home/abhishek/Desktop/tracks.jpeg")
cv2.line(img,(0,0),(236,236),(100,54,255),3)
cv2.rectangle(img,(199,112),(325,238),(0,0,255),2)
cv2.circle(img,(262,175),60,(255,200,0),3)
font = cv2.FONT_HERSHEY_SIMPLEX
cv2.putText(img,'TRAIN',(210,270),font,1,(90,200,140),cv2.LIN... | 23.75 | 65 | 0.661053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.218947 |
d84e2e63426049e55a4ce07d524f85ba7b495330 | 14,662 | py | Python | GMM_nDim3.py | Sharut/My-Hybrid-GMM-SVM-Model | 68f0ab9b86dbb0ca3d1e63f2df0dcc4c7066e424 | [
"MIT"
] | 1 | 2019-06-07T13:22:57.000Z | 2019-06-07T13:22:57.000Z | GMM_nDim3.py | Sharut/My-Hybrid-GMM-SVM-Model | 68f0ab9b86dbb0ca3d1e63f2df0dcc4c7066e424 | [
"MIT"
] | null | null | null | GMM_nDim3.py | Sharut/My-Hybrid-GMM-SVM-Model | 68f0ab9b86dbb0ca3d1e63f2df0dcc4c7066e424 | [
"MIT"
] | 1 | 2020-08-30T06:49:25.000Z | 2020-08-30T06:49:25.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri May 24 09:08:48 2019
@author: uiet_mac1
"""
import numpy as np
import random as rd
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
#import hungarian as hg
def random_parameters(data, K):
""" K is the number of gaussians""... | 29.033663 | 103 | 0.559132 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,397 | 0.299891 |
d84e7b0326da78457b27f3f5b7fda50734903f66 | 775 | py | Python | Data-Structures/Stacks/stack.py | hussamEL-Hwary/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 18 | 2016-11-01T04:00:36.000Z | 2021-09-13T14:26:35.000Z | Data-Structures/Stacks/stack.py | JEERU/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 60 | 2016-10-11T14:50:47.000Z | 2016-10-31T11:05:01.000Z | Data-Structures/Stacks/stack.py | JEERU/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 87 | 2016-09-08T05:04:50.000Z | 2016-10-30T19:19:53.000Z | """Implementation of a stack in python."""
class Stack:
def __init__(self):
self.items = []
def push(self, item):
"""Add an item to the stack."""
self.items.append(item)
def pop(self):
"""Remove the most recent item from the stack."""
if len(self.items) > 0:
... | 24.21875 | 68 | 0.536774 | 729 | 0.940645 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.329032 |
d854e1572c3ce2b3c51dea839fbb388e61fd565b | 535 | py | Python | li_hang/test/test_knn.py | LucienShui/HelloMachineLearning | b00a4b3791808ace3b1e45112350c2b3c539995e | [
"Apache-2.0"
] | 2 | 2019-07-28T08:25:40.000Z | 2019-07-29T05:29:10.000Z | li_hang/test/test_knn.py | LucienShui/HelloMachineLearning | b00a4b3791808ace3b1e45112350c2b3c539995e | [
"Apache-2.0"
] | null | null | null | li_hang/test/test_knn.py | LucienShui/HelloMachineLearning | b00a4b3791808ace3b1e45112350c2b3c539995e | [
"Apache-2.0"
] | null | null | null | import unittest
import logging
import numpy
from knn import KNN
class MyTestCase(unittest.TestCase):
def test_something(self):
logging.basicConfig()
dataset = numpy.array([
[[5, 4], 1],
[[9, 6], 1],
[[4, 7], 1],
[[2, 3], -1],
[[8, 1], -1... | 18.448276 | 52 | 0.48785 | 419 | 0.783178 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.018692 |
d8560e6218ec99112b9cb038f1f87fe00535d31f | 2,130 | py | Python | src/taming.py | dwaybright/g729a_python | a9c78d9a6b2934c9742f63e3ade225fe4aee245e | [
"Unlicense"
] | null | null | null | src/taming.py | dwaybright/g729a_python | a9c78d9a6b2934c9742f63e3ade225fe4aee245e | [
"Unlicense"
] | null | null | null | src/taming.py | dwaybright/g729a_python | a9c78d9a6b2934c9742f63e3ade225fe4aee245e | [
"Unlicense"
] | null | null | null | from basic_op import *
from ld8a import *
from tab_ld8a import *
L_exc_err = [0] * 4
def Init_exc_err() -> None:
global L_exc_err
for i in range(0, 4):
L_exc_err[i] = MAX_INT_14 # Q14
def test_err(T0: int, T0_frac: int) -> int:
"""
# (o) flag set to 1 if taming is necessary
# ... | 21.958763 | 51 | 0.530047 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 232 | 0.10892 |
d85630288b52620b9339fd834ada73fb4075abbe | 558 | py | Python | PyObjCTest/test_nspagelayout.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | PyObjCTest/test_nspagelayout.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | PyObjCTest/test_nspagelayout.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | import AppKit
from PyObjCTools.TestSupport import TestCase
import objc
class TestNSPageLayout(TestCase):
def testMethods(self):
self.assertArgIsSEL(
AppKit.NSPageLayout.beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo_, # noqa: B950
3,
b"v@:@"... | 31 | 122 | 0.668459 | 484 | 0.867384 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.073477 |
d85641b37bef389ead174fd99408f2c24628f116 | 4,458 | py | Python | base_site/mainapp/models.py | ricardochaves/financeiro-bot | 2c48be4355e3c8630c36aa846c16042f22b88271 | [
"MIT"
] | 4 | 2020-01-21T00:21:44.000Z | 2021-06-15T19:38:36.000Z | base_site/mainapp/models.py | ricardochaves/financeiro-bot | 2c48be4355e3c8630c36aa846c16042f22b88271 | [
"MIT"
] | 173 | 2019-11-18T08:19:44.000Z | 2021-09-08T01:37:19.000Z | base_site/mainapp/models.py | ricardochaves/financeiro-bot | 2c48be4355e3c8630c36aa846c16042f22b88271 | [
"MIT"
] | 3 | 2020-01-28T19:19:35.000Z | 2021-05-01T02:33:36.000Z | from datetime import datetime
from django.db import models
class TypeEntry(models.Model):
name = models.CharField(max_length=70, verbose_name="Nome", default="", blank=False, null=False)
def __str__(self):
return self.name
class FamilyMember(models.Model):
name = models.CharField(max_length=70... | 44.138614 | 119 | 0.711306 | 4,398 | 0.982574 | 0 | 0 | 0 | 0 | 0 | 0 | 693 | 0.154826 |
d8587509c1aa42b6092003d2a561d39843b7a11a | 1,306 | bzl | Python | third_party/com_google_boringssl/workspace.bzl | stuarteberg/tensorstore | 2c22a3c9f798b0fbf023031633c58cc7c644235d | [
"Apache-2.0"
] | null | null | null | third_party/com_google_boringssl/workspace.bzl | stuarteberg/tensorstore | 2c22a3c9f798b0fbf023031633c58cc7c644235d | [
"Apache-2.0"
] | null | null | null | third_party/com_google_boringssl/workspace.bzl | stuarteberg/tensorstore | 2c22a3c9f798b0fbf023031633c58cc7c644235d | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The TensorStore 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/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 39.575758 | 120 | 0.725881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,044 | 0.799387 |
d85908aea84d7f7f730620a14ba03abbda1756ba | 45 | py | Python | common/__init__.py | weipeng/pyepi | 1af5eab78e20f55fadccef8cb7b7aad6d503b31b | [
"MIT"
] | 1 | 2020-03-28T06:29:28.000Z | 2020-03-28T06:29:28.000Z | common/__init__.py | weipeng/pyepi | 1af5eab78e20f55fadccef8cb7b7aad6d503b31b | [
"MIT"
] | null | null | null | common/__init__.py | weipeng/pyepi | 1af5eab78e20f55fadccef8cb7b7aad6d503b31b | [
"MIT"
] | 2 | 2020-03-29T16:12:52.000Z | 2020-04-28T22:53:33.000Z | __all__ = [
'stats', 'utils', 'linalg'
]
| 11.25 | 30 | 0.511111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.488889 |
d8593d6692d7d033994d2758b7537e9bd3034f63 | 45 | py | Python | skforecast/__init__.py | JavierEscobarOrtiz/skforecast | a3af4a1dd4201c582f159d4e3a1734ed6d29b6c5 | [
"MIT"
] | 1 | 2021-12-01T09:21:21.000Z | 2021-12-01T09:21:21.000Z | skforecast/__init__.py | JavierEscobarOrtiz/skforecast | a3af4a1dd4201c582f159d4e3a1734ed6d29b6c5 | [
"MIT"
] | null | null | null | skforecast/__init__.py | JavierEscobarOrtiz/skforecast | a3af4a1dd4201c582f159d4e3a1734ed6d29b6c5 | [
"MIT"
] | null | null | null | name = "skforecast"
__version__ = "0.5.dev1"
| 15 | 24 | 0.688889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.488889 |
d859f7d3fb379be25a76d21ab67ead4d433c1d6c | 777 | py | Python | src/weathair_backend/weathair_backend/api/migrations/0004_auto_20201004_0412.py | willson556/weathair | e2b988f216f81a55d32d432ed41a09bf19d909b2 | [
"MIT"
] | null | null | null | src/weathair_backend/weathair_backend/api/migrations/0004_auto_20201004_0412.py | willson556/weathair | e2b988f216f81a55d32d432ed41a09bf19d909b2 | [
"MIT"
] | null | null | null | src/weathair_backend/weathair_backend/api/migrations/0004_auto_20201004_0412.py | willson556/weathair | e2b988f216f81a55d32d432ed41a09bf19d909b2 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-04 04:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0003_auto_20201004_0401'),
]
operations = [
migrations.AlterField(
model_name='airnowreportingarea',
name='na... | 27.75 | 98 | 0.604891 | 684 | 0.880309 | 0 | 0 | 0 | 0 | 0 | 0 | 205 | 0.263835 |
d85ca52402346be7dfaf6277ede793e7a996a2e4 | 1,176 | py | Python | db_create.py | abmorton/stockhawk | b5f4d188a8f9420898f2390b01741c87a17ebbbd | [
"MIT"
] | 7 | 2015-11-11T22:55:49.000Z | 2021-06-03T17:23:59.000Z | db_create.py | abmorton/stockhawk | b5f4d188a8f9420898f2390b01741c87a17ebbbd | [
"MIT"
] | null | null | null | db_create.py | abmorton/stockhawk | b5f4d188a8f9420898f2390b01741c87a17ebbbd | [
"MIT"
] | 3 | 2016-01-19T02:23:14.000Z | 2018-08-03T12:20:07.000Z | from app import db
from models import *
import datetime
# create the db and tables
db.create_all()
# prepare data to insert
year = 1982
month = 4
day = 3
birthday = datetime.date(year, month, day)
now = datetime.datetime.now()
today = datetime.date(now.year, now.month, now.day)
yesterday = datetime.date(now.year, n... | 21.381818 | 98 | 0.706633 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 460 | 0.391156 |
d85d07c94c953c6ddb47057dd695b08ff1db7471 | 2,581 | py | Python | csv_uploader/views.py | treebohotels/treebo-csv-uploader | 6fad3c33e34627bf3be1365c4526ab2f7d385741 | [
"MIT"
] | null | null | null | csv_uploader/views.py | treebohotels/treebo-csv-uploader | 6fad3c33e34627bf3be1365c4526ab2f7d385741 | [
"MIT"
] | null | null | null | csv_uploader/views.py | treebohotels/treebo-csv-uploader | 6fad3c33e34627bf3be1365c4526ab2f7d385741 | [
"MIT"
] | null | null | null | import logging
from django.http import HttpResponse
from django.utils.datastructures import MultiValueDictKeyError
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework.renderers import TemplateHTMLRenderer
from .handler import CsvHandler
from .validator import Csv... | 44.5 | 120 | 0.665633 | 2,181 | 0.845021 | 0 | 0 | 0 | 0 | 0 | 0 | 334 | 0.129407 |
d85d2d19f951d9db76457ffec3892cff2c16064c | 2,979 | py | Python | Voltron/Voltron/Entrevue/LeetCode/Array-SingleNumber.py | ernestyalumni/HrdwCCppCUDA | 17ed937dea06431a4d5ca103f993ea69a6918734 | [
"MIT"
] | 1 | 2018-02-09T19:44:51.000Z | 2018-02-09T19:44:51.000Z | Voltron/Voltron/Entrevue/LeetCode/Array-SingleNumber.py | ernestyalumni/HrdwCCppCUDA | 17ed937dea06431a4d5ca103f993ea69a6918734 | [
"MIT"
] | null | null | null | Voltron/Voltron/Entrevue/LeetCode/Array-SingleNumber.py | ernestyalumni/HrdwCCppCUDA | 17ed937dea06431a4d5ca103f993ea69a6918734 | [
"MIT"
] | null | null | null | """
@file Array-SingleNumber.py
Log:
2020/10/13
8:31
9:07 working implementation
"""
example_input_1 = [2, 2, 1]
example_input_2 = [4, 1, 2, 1, 2]
example_input_3 = [1]
example_output_1 = 1
example_output_2 = 4
example_output_3 = 1
"""
Given a non-empty array of integers nums, every element appears twice except
for ... | 24.418033 | 79 | 0.631756 | 73 | 0.024505 | 0 | 0 | 0 | 0 | 0 | 0 | 1,240 | 0.416247 |
d85e74f89e6ba559f49b28f11f9fbb57d950463e | 2,910 | py | Python | new_h1st/my_ml_modeler.py | TgithubJ/h1st | 18c8ab2ca5e3a047aea255c636d27fd66bb80ec5 | [
"Apache-2.0"
] | null | null | null | new_h1st/my_ml_modeler.py | TgithubJ/h1st | 18c8ab2ca5e3a047aea255c636d27fd66bb80ec5 | [
"Apache-2.0"
] | null | null | null | new_h1st/my_ml_modeler.py | TgithubJ/h1st | 18c8ab2ca5e3a047aea255c636d27fd66bb80ec5 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Dict
from h1st_ml import MLModeler
import pandas as pd
from sklearn.linear_model import LogisticRegression
from sklearn.preprocessing import StandardScaler
from sklearn.metrics import r2_score
from my_ml_model import MyMLModel
class MyMLModeler(MLModeler):
def __init__(self):
sel... | 36.835443 | 83 | 0.631271 | 2,655 | 0.912371 | 0 | 0 | 0 | 0 | 0 | 0 | 535 | 0.183849 |
d85f295a43e1700c84c02249db04af993786f746 | 26 | py | Python | homeassistant/components/imap/__init__.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/imap/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | homeassistant/components/imap/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """The imap component."""
| 13 | 25 | 0.615385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.961538 |
d85fa73be967336630b8bccd9bd0353e0af7dd9d | 879 | py | Python | test/libraryData_BulkUpdates.py | masqu3rad3/tik_manager | 59821670e87a2af753a59cc70924c5f0aad8ad51 | [
"BSD-3-Clause"
] | 26 | 2019-05-05T04:52:38.000Z | 2022-01-27T19:25:27.000Z | test/libraryData_BulkUpdates.py | masqu3rad3/tik_manager | 59821670e87a2af753a59cc70924c5f0aad8ad51 | [
"BSD-3-Clause"
] | null | null | null | test/libraryData_BulkUpdates.py | masqu3rad3/tik_manager | 59821670e87a2af753a59cc70924c5f0aad8ad51 | [
"BSD-3-Clause"
] | 5 | 2020-02-14T06:43:07.000Z | 2021-08-13T09:58:44.000Z | from tik_manager import assetLibrary
reload(assetLibrary)
import pprint
import time
pathList = ["E:\\backup\\_CharactersLibrary", "E:\\backup\\_BalikKrakerAssetLibrary", "E:\\backup\\_AssetLibrary", "M:\\Projects\\_CharactersLibrary", "M:\\Projects\\_BalikKrakerAssetLibrary", "M:\\Projects\\_AssetLibrary"]
for path in... | 43.95 | 223 | 0.651877 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 516 | 0.587031 |
d860dd72da3f6f3d31741e148127e543434eba7d | 4,552 | py | Python | tests/pv_generation.py | Aloso/pv-simulator | daae4a00c4d7c759eedeffe39b6d60395e9a3ebf | [
"MIT"
] | null | null | null | tests/pv_generation.py | Aloso/pv-simulator | daae4a00c4d7c759eedeffe39b6d60395e9a3ebf | [
"MIT"
] | null | null | null | tests/pv_generation.py | Aloso/pv-simulator | daae4a00c4d7c759eedeffe39b6d60395e9a3ebf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys, os, random, unittest, itertools
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# pylint: disable=import-error
from libpv.pv_generation import PvGenerator, weather
from libpv.time_of_day import TimeOfDay
def generate_360_times():
t = TimeOfDay(0)
... | 47.915789 | 85 | 0.504174 | 4,083 | 0.896968 | 143 | 0.031415 | 0 | 0 | 0 | 0 | 61 | 0.013401 |
d8617eb30998d8220d39ad8ca6c7311751fdbf18 | 16,601 | py | Python | tests/tests.py | ipashchenko/uvmod | 5f81f9f621ccd2f83e99f22eb0c302ae8d8a218d | [
"MIT"
] | null | null | null | tests/tests.py | ipashchenko/uvmod | 5f81f9f621ccd2f83e99f22eb0c302ae8d8a218d | [
"MIT"
] | 5 | 2015-01-28T07:53:30.000Z | 2015-04-16T11:21:58.000Z | tests/tests.py | ipashchenko/uvmod | 5f81f9f621ccd2f83e99f22eb0c302ae8d8a218d | [
"MIT"
] | null | null | null | #!/usr/bin python
# -*- coding: utf-8 -*-
from __future__ import print_function
from unittest import (TestCase, skip, skipIf)
from uvmod.stats import LnLike, LS_estimates, LnPrior, LnPost, hdi_of_mcmc
from uvmod.models import Model_1d, Model_2d_isotropic, Model_2d_anisotropic
# TODO: Use ``np.random.uniform`` instead
... | 49.555224 | 80 | 0.575267 | 15,921 | 0.959039 | 0 | 0 | 10,642 | 0.641046 | 0 | 0 | 692 | 0.041684 |
d862604d092bad15f0b361b2e53da5ab2a37c8ae | 942 | py | Python | eegpy/formats/tests/TestLoc3dMarker.py | thorstenkranz/eegpy | 0f9461456999874abbb774896ca832eb27740a9d | [
"BSD-2-Clause-FreeBSD"
] | 10 | 2015-05-12T10:42:51.000Z | 2021-07-20T02:08:03.000Z | eegpy/formats/tests/TestLoc3dMarker.py | thorstenkranz/eegpy | 0f9461456999874abbb774896ca832eb27740a9d | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2015-11-19T11:36:30.000Z | 2018-03-21T05:00:09.000Z | eegpy/formats/tests/TestLoc3dMarker.py | thorstenkranz/eegpy | 0f9461456999874abbb774896ca832eb27740a9d | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-09-21T22:41:34.000Z | 2019-01-28T13:55:19.000Z | import os
import numpy as np
import time
from numpy.testing import (assert_array_almost_equal,
assert_array_equal)
from nose.tools import assert_true, assert_equal, assert_raises, raises
from tempfile import mktemp
from eegpy.formats.loc3dmarker import Loc3dMarkers
test_data = """A,-... | 24.789474 | 71 | 0.673036 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 232 | 0.246285 |
d862e5191af1e26ac32d9cdf7c011969df1241d6 | 997 | py | Python | video_reader.py | evgenevolkov/Automated-car-tracker-and-plates-reader | 5cee11b654bb8cfd20d081198af43b56811d2107 | [
"MIT"
] | 3 | 2020-10-15T14:32:36.000Z | 2022-03-08T20:56:58.000Z | video_reader.py | evgenevolkov/Automated-car-tracker-and-plates-reader | 5cee11b654bb8cfd20d081198af43b56811d2107 | [
"MIT"
] | 2 | 2022-02-09T23:51:20.000Z | 2022-02-10T02:25:10.000Z | video_reader.py | evgenevolkov/Automated-car-tracker-and-plates-reader | 5cee11b654bb8cfd20d081198af43b56811d2107 | [
"MIT"
] | 2 | 2021-04-07T11:56:20.000Z | 2022-01-28T22:25:36.000Z | # import nesessary packages
import cv2
import config
DEBUG = config.DEBUG
class Reader:
def __init__(self, source):
if DEBUG:
print('[INFO, reader]: reader module loaded')
# if source:
self.vs = None
self.set_source(source)
# else:
# print('[INFO, r... | 29.323529 | 84 | 0.594784 | 921 | 0.923771 | 0 | 0 | 0 | 0 | 0 | 0 | 352 | 0.353059 |
d863b2417d20fc0b71005243f57ab636233f418d | 2,605 | py | Python | Harry_Poter_Cloak/harry_potter_cloak.py | SusovanGithub/SusovanGithub-OpenCV_projects | bff292a976e0e48c8b4094607878133e70395029 | [
"MIT"
] | 1 | 2021-05-18T15:49:54.000Z | 2021-05-18T15:49:54.000Z | Harry_Poter_Cloak/harry_potter_cloak.py | SusovanGithub/SusovanGithub-OpenCV_projects | bff292a976e0e48c8b4094607878133e70395029 | [
"MIT"
] | null | null | null | Harry_Poter_Cloak/harry_potter_cloak.py | SusovanGithub/SusovanGithub-OpenCV_projects | bff292a976e0e48c8b4094607878133e70395029 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
# function for the empty work
def empty(a):
pass
# * creating the Window
windowName = 'Color Detection in HSV Space' # Window Name
cv2.namedWindow(windowName) # Window Creation
# * Adding the Track pad
cv2.createTrackbar('HUE min',windowName,0,179,empty)
cv2.... | 28.010753 | 70 | 0.664491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 656 | 0.251823 |
d863c07896bcb5f1642fe8d4a4e1720169611bc3 | 759 | py | Python | qset_core/configuration/environment.py | adragolov/qset-core | ca2beb9d1a530b75f8f93194649c9d9c3e8d6ac1 | [
"MIT"
] | null | null | null | qset_core/configuration/environment.py | adragolov/qset-core | ca2beb9d1a530b75f8f93194649c9d9c3e8d6ac1 | [
"MIT"
] | null | null | null | qset_core/configuration/environment.py | adragolov/qset-core | ca2beb9d1a530b75f8f93194649c9d9c3e8d6ac1 | [
"MIT"
] | null | null | null | import os
from threading import RLock
ENVIRONMENT_VAR_NAME: str = "QSET_ENVIRONMENT"
ENVIRONMENT_NAME_DEFAULT: str = 'Development'
ENVIRONMENT_NAME_PRODUCTION: str = 'Production'
class Environment:
__Default = None
__Lock = RLock()
def __init__(self, environment_name: str = None):
self._environ... | 26.172414 | 118 | 0.670619 | 576 | 0.758893 | 0 | 0 | 308 | 0.405797 | 0 | 0 | 43 | 0.056653 |
d8644fc985adc50f63489cffe3bfe8417550597e | 5,575 | py | Python | autosrc.py | pwnwikiorg/AutoSRC | 4cee92b2ae0e4f024059840a0b84d49f5e125e94 | [
"MIT"
] | 44 | 2021-07-12T05:45:47.000Z | 2021-09-24T13:49:39.000Z | autosrc.py | mama2100/AutoSRC | 4cee92b2ae0e4f024059840a0b84d49f5e125e94 | [
"MIT"
] | null | null | null | autosrc.py | mama2100/AutoSRC | 4cee92b2ae0e4f024059840a0b84d49f5e125e94 | [
"MIT"
] | 15 | 2021-07-12T05:48:25.000Z | 2021-09-10T07:56:55.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import subprocess
import requests
import argparse
import base64
import sys
import json
import codecs
def dec_data(byte_data: bytes):
try:
return byte_data.decode('UTF-8')
except UnicodeDecodeError:
return byte_data.decode('GB1... | 45.696721 | 136 | 0.411121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,985 | 0.525621 |
d86510c82b66f95dc50fd62936d72f29aeaa9999 | 360 | py | Python | pirates/creature/DistributedCreatureAI.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 81 | 2018-04-08T18:14:24.000Z | 2022-01-11T07:22:15.000Z | pirates/creature/DistributedCreatureAI.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 4 | 2018-09-13T20:41:22.000Z | 2022-01-08T06:57:00.000Z | pirates/creature/DistributedCreatureAI.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 26 | 2018-05-26T12:49:27.000Z | 2021-09-11T09:11:59.000Z | from direct.directnotify import DirectNotifyGlobal
from pirates.battle.DistributedBattleNPCAI import *
from pirates.pirate import AvatarTypes
class DistributedCreatureAI(DistributedBattleNPCAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCreatureAI')
def __init__(self, air):
Dist... | 32.727273 | 81 | 0.822222 | 215 | 0.597222 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.063889 |
d8681174b4934ada560118e7c8363f5ba24fcfa0 | 4,263 | py | Python | gym-kinova-gripper/Old Code/stuff.py | OSUrobotics/KinovaGrasping | f22af60d3683fdc4ffecf49ccff179fbc6750748 | [
"Linux-OpenIB"
] | 16 | 2020-05-16T00:40:31.000Z | 2022-02-22T11:59:03.000Z | gym-kinova-gripper/Old Code/stuff.py | OSUrobotics/KinovaGrasping | f22af60d3683fdc4ffecf49ccff179fbc6750748 | [
"Linux-OpenIB"
] | 9 | 2020-08-10T08:33:55.000Z | 2021-08-17T02:10:50.000Z | gym-kinova-gripper/Old Code/stuff.py | OSUrobotics/KinovaGrasping | f22af60d3683fdc4ffecf49ccff179fbc6750748 | [
"Linux-OpenIB"
] | 7 | 2020-07-27T09:45:05.000Z | 2021-06-21T21:42:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 13 09:59:13 2019
@author: orochi
"""
import numpy as np
import csv
from classifier_network import LinearNetwork
from classifier_network import ReducedLinearNetwork
import torch
import torch.nn as nn
import torch.nn.functional as F
import matplotlib.... | 31.577778 | 138 | 0.655407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,540 | 0.361248 |
d868e0721a8fe2dce25eaeb0e1b2ad04eea694ba | 5,144 | py | Python | src/main/nspawn/wrapper/sudo.py | Andrei-Pozolotin/nspawn | 9dd3926f1d1a3a0648f6ec14199cbf4069af1c98 | [
"Apache-2.0"
] | 15 | 2019-10-10T17:35:48.000Z | 2022-01-29T10:41:01.000Z | src/main/nspawn/wrapper/sudo.py | Andrei-Pozolotin/nspawn | 9dd3926f1d1a3a0648f6ec14199cbf4069af1c98 | [
"Apache-2.0"
] | null | null | null | src/main/nspawn/wrapper/sudo.py | Andrei-Pozolotin/nspawn | 9dd3926f1d1a3a0648f6ec14199cbf4069af1c98 | [
"Apache-2.0"
] | 2 | 2019-10-10T17:36:43.000Z | 2020-06-20T15:28:33.000Z | """
Wrapper for sudo
https://linux.die.net/man/8/sudo
"""
import os
import shlex
from typing import List, Mapping
from nspawn import CONFIG
from nspawn.wrapper.base import Base
from nspawn.support.parser import parse_text2dict
class Sudo(Base):
"""
Provide basic file system operations
"""
def __ini... | 35.232877 | 107 | 0.628888 | 4,896 | 0.951788 | 0 | 0 | 0 | 0 | 0 | 0 | 1,450 | 0.281882 |
d8693362b05650b4c1b31dbc4438c95cc27c7e7b | 3,052 | py | Python | src/app.py | davidkowalk/Kalaha | 2b00fce97f5559c0527ec1c8addf3c488c46fccf | [
"MIT"
] | 1 | 2021-06-19T16:08:52.000Z | 2021-06-19T16:08:52.000Z | src/app.py | davidkowalk/Kalaha | 2b00fce97f5559c0527ec1c8addf3c488c46fccf | [
"MIT"
] | null | null | null | src/app.py | davidkowalk/Kalaha | 2b00fce97f5559c0527ec1c8addf3c488c46fccf | [
"MIT"
] | null | null | null | from Board import Board, code_to_list
from sys import argv
def print_layout():
print("╔══╦══╦══╦══╦══╦══╦══╦══╗")
print("║ ║ 6║ 5║ 4║ 3║ 2║ 1║ ║ <- Player 2")
print("║ ╠══╬══╬══╬══╬══╬══╣ ║")
print("║ ║ 1║ 2║ 3║ 4║ 5║ 6║ ║ <- Player 1")
print("╚══╩══╩══╩══╩══╩══╩══╩══╝")
def lpad(str, length... | 28.259259 | 97 | 0.449541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,432 | 0.420188 |
d8693bfd84c89857d5a17510a59ef22ad4a7f847 | 4,346 | py | Python | collisionSat.py | vzayakov/satelliteprogram | 24c699215c44caff4ca793be3bb71890c4b41416 | [
"MIT"
] | null | null | null | collisionSat.py | vzayakov/satelliteprogram | 24c699215c44caff4ca793be3bb71890c4b41416 | [
"MIT"
] | null | null | null | collisionSat.py | vzayakov/satelliteprogram | 24c699215c44caff4ca793be3bb71890c4b41416 | [
"MIT"
] | null | null | null | from skyfield.api import Topos, load
from astropy import units as u
from astropy import time
import matplotlib.pyplot as plt
import numpy as np
from datetime import datetime
import sys
ts = load.timescale(builtin=True)
#This program is able to calculate the closest pass between two given satellites over the next 5 day... | 35.048387 | 142 | 0.736539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,425 | 0.557984 |
d869a760e43d690b730eb44ae5328a3cd8766067 | 3,738 | py | Python | webdev/fornecedores/tests/test_fornecedores_post.py | h-zanetti/jewelry-manager | 74166b89f492303b8ebf5ff8af058f394eb2a28b | [
"MIT"
] | null | null | null | webdev/fornecedores/tests/test_fornecedores_post.py | h-zanetti/jewelry-manager | 74166b89f492303b8ebf5ff8af058f394eb2a28b | [
"MIT"
] | 103 | 2021-04-25T21:28:11.000Z | 2022-03-15T01:36:31.000Z | webdev/fornecedores/tests/test_fornecedores_post.py | h-zanetti/jewelry-manager | 74166b89f492303b8ebf5ff8af058f394eb2a28b | [
"MIT"
] | null | null | null | import pytest
from pytest_django.asserts import assertRedirects
from django.urls import reverse
from django.contrib.auth.models import User
from webdev.fornecedores.models import Fornecedor, Fornecimento, Email, Telefone, Local, DadosBancarios
# Novo Fornecedor
@pytest.fixture
def fornecimento(db):
return Fornecim... | 32.224138 | 103 | 0.692616 | 0 | 0 | 0 | 0 | 2,712 | 0.724166 | 0 | 0 | 911 | 0.243258 |
d86dfa846b06600cb6626bf01cc13c4b4ba732dd | 1,656 | py | Python | humimp/urls.py | zain-Z/humimp | fd7e4e211dce62639e2fce2dd9f9506240a7a3d9 | [
"MIT"
] | null | null | null | humimp/urls.py | zain-Z/humimp | fd7e4e211dce62639e2fce2dd9f9506240a7a3d9 | [
"MIT"
] | null | null | null | humimp/urls.py | zain-Z/humimp | fd7e4e211dce62639e2fce2dd9f9506240a7a3d9 | [
"MIT"
] | null | null | null | """humimp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 37.636364 | 78 | 0.736715 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 835 | 0.504227 |
d8709d89acee40ccaac332ee9c01a0773827a0af | 499 | py | Python | python/arrays/0048-rotate-image.py | karolinyoliveira/leetcode-ebbinghaus-practice | 5149e06f1c187b87e280fd58541c11d8ab8626d3 | [
"MIT"
] | 2 | 2021-05-28T03:41:39.000Z | 2021-10-19T16:53:16.000Z | python/arrays/0048-rotate-image.py | karolinyoliveira/leetcode-ebbinghaus-practice | 5149e06f1c187b87e280fd58541c11d8ab8626d3 | [
"MIT"
] | null | null | null | python/arrays/0048-rotate-image.py | karolinyoliveira/leetcode-ebbinghaus-practice | 5149e06f1c187b87e280fd58541c11d8ab8626d3 | [
"MIT"
] | null | null | null | from typing import List
def rotate(matrix: List[List[int]]) -> None:
for layer in range(len(matrix) // 2):
first = layer
last = len(matrix) - layer - 1
for i in range(first, last):
offset = i - first
top = matrix[first][i]
matrix[first][i] = matrix[last -... | 35.642857 | 70 | 0.541082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d870d81902f0c3d976bb8c7ff8e74c4445f9877c | 6,176 | py | Python | siiptool/common/configparser.py | kdbarnes-intel/iotg-fbu | bf6c38240ef13c64d2776e48ec277b3c8bebce6f | [
"BSD-2-Clause"
] | 15 | 2020-03-21T03:19:46.000Z | 2022-03-02T07:12:57.000Z | siiptool/common/configparser.py | kdbarnes-intel/iotg-fbu | bf6c38240ef13c64d2776e48ec277b3c8bebce6f | [
"BSD-2-Clause"
] | 7 | 2020-03-10T03:17:24.000Z | 2021-06-08T17:47:34.000Z | siiptool/common/configparser.py | kdbarnes-intel/iotg-fbu | bf6c38240ef13c64d2776e48ec277b3c8bebce6f | [
"BSD-2-Clause"
] | 11 | 2020-02-28T19:52:22.000Z | 2022-03-02T07:15:51.000Z | from collections.abc import MutableMapping
import warnings
import json
from configparser import *
from configparser import __all__
__all__.append("JSONConfigParser")
_ConfigParser = ConfigParser
class ConfigParser:
"""Accepts extra keyword config_type and returns the instance based on it"""
def __new__(cls,... | 31.510204 | 81 | 0.599093 | 5,973 | 0.967131 | 0 | 0 | 69 | 0.011172 | 0 | 0 | 1,666 | 0.269754 |
d871d406a36eb042f0249d4cd661dbf2e8cf3a59 | 5,859 | py | Python | tests/test_validation.py | danielgis/invest | b9687d249361556b874750368e856ef049447b5a | [
"BSD-3-Clause"
] | null | null | null | tests/test_validation.py | danielgis/invest | b9687d249361556b874750368e856ef049447b5a | [
"BSD-3-Clause"
] | null | null | null | tests/test_validation.py | danielgis/invest | b9687d249361556b874750368e856ef049447b5a | [
"BSD-3-Clause"
] | 1 | 2021-04-21T10:46:17.000Z | 2021-04-21T10:46:17.000Z | import unittest
class ValidatorTest(unittest.TestCase):
def test_args_wrong_type(self):
"""Validation: check for error when args is the wrong type."""
from natcap.invest import validation
@validation.invest_validator
def validate(args, limit_to=None):
pass
wit... | 34.263158 | 78 | 0.640894 | 5,837 | 0.996245 | 0 | 0 | 1,054 | 0.179894 | 0 | 0 | 1,243 | 0.212152 |
d8720456fd135a7561fb3d2146537a8ebeb01212 | 77 | py | Python | vmaig_blog/uwsgi-2.0.14/plugins/zergpool/uwsgiplugin.py | StanYaha/Blog | 3cb38918e14ebe6ce2e2952ef272de116849910d | [
"BSD-3-Clause"
] | 1 | 2018-11-24T16:10:49.000Z | 2018-11-24T16:10:49.000Z | vmaig_blog/uwsgi-2.0.14/plugins/zergpool/uwsgiplugin.py | StanYaha/Blog | 3cb38918e14ebe6ce2e2952ef272de116849910d | [
"BSD-3-Clause"
] | null | null | null | vmaig_blog/uwsgi-2.0.14/plugins/zergpool/uwsgiplugin.py | StanYaha/Blog | 3cb38918e14ebe6ce2e2952ef272de116849910d | [
"BSD-3-Clause"
] | null | null | null |
NAME='zergpool'
CFLAGS = []
LDFLAGS = []
LIBS = []
GCC_LIST = ['zergpool']
| 9.625 | 23 | 0.584416 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.25974 |
d87268d377955c1f6efb88d6ef67f9df1b77d9d4 | 6,279 | py | Python | py-src/helper/img_transform.py | gabeoh/CarND-P01-LaneLines | 5a35a7698f5a2efeff70d5537fedae366c1e51a0 | [
"MIT"
] | null | null | null | py-src/helper/img_transform.py | gabeoh/CarND-P01-LaneLines | 5a35a7698f5a2efeff70d5537fedae366c1e51a0 | [
"MIT"
] | null | null | null | py-src/helper/img_transform.py | gabeoh/CarND-P01-LaneLines | 5a35a7698f5a2efeff70d5537fedae366c1e51a0 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import cv2
import math
def grayscale(img):
"""Applies the Grayscale transform
This will return an image with only one color channel
but NOTE: to see the returned image as grayscale
(assuming your grayscaled image is called 'gray')
you should call ... | 38.521472 | 104 | 0.672241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,243 | 0.515744 |
d8733f6f6015bbf69ccc3df24284440196f1074d | 1,314 | py | Python | src/zope/app/publication/publicationtraverse.py | zopefoundation/zope.app.publication | fd5cde576c4679aac1f7dc091d2fd6fb5ae51db4 | [
"ZPL-2.1"
] | 1 | 2021-02-01T06:13:49.000Z | 2021-02-01T06:13:49.000Z | src/zope/app/publication/publicationtraverse.py | zopefoundation/zope.app.publication | fd5cde576c4679aac1f7dc091d2fd6fb5ae51db4 | [
"ZPL-2.1"
] | 11 | 2015-08-03T07:40:13.000Z | 2020-12-17T06:54:55.000Z | src/zope/app/publication/publicationtraverse.py | zopefoundation/zope.app.publication | fd5cde576c4679aac1f7dc091d2fd6fb5ae51db4 | [
"ZPL-2.1"
] | 3 | 2015-04-03T07:58:39.000Z | 2016-11-04T06:00:03.000Z | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... | 37.542857 | 107 | 0.679604 | 185 | 0.140791 | 0 | 0 | 0 | 0 | 0 | 0 | 992 | 0.754947 |
d873c9d5b73ad6048ae3ed992ae54074f4373aad | 44 | py | Python | snowav/database/__init__.py | robertson-mark/SNOWAV | ef7a470dd45a342ee454d74b6476da5807f14301 | [
"CC0-1.0"
] | 1 | 2018-09-11T17:14:01.000Z | 2018-09-11T17:14:01.000Z | snowav/database/__init__.py | robertson-mark/SNOWAV | ef7a470dd45a342ee454d74b6476da5807f14301 | [
"CC0-1.0"
] | 15 | 2018-10-24T21:59:57.000Z | 2021-07-01T20:37:05.000Z | snowav/database/__init__.py | USDA-ARS-NWRC/snowav | ef7a470dd45a342ee454d74b6476da5807f14301 | [
"CC0-1.0"
] | null | null | null | from . import tables
from . import database
| 14.666667 | 22 | 0.772727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d87785dc3dfe82dc39a25b2fc439096204f29f6f | 158 | py | Python | distributions/admin.py | lueho/BRIT | 1eae630c4da6f072aa4e2139bc406db4f4756391 | [
"MIT"
] | null | null | null | distributions/admin.py | lueho/BRIT | 1eae630c4da6f072aa4e2139bc406db4f4756391 | [
"MIT"
] | 4 | 2022-03-29T20:52:31.000Z | 2022-03-29T20:52:31.000Z | distributions/admin.py | lueho/BRIT | 1eae630c4da6f072aa4e2139bc406db4f4756391 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Timestep, TemporalDistribution
admin.site.register(TemporalDistribution)
admin.site.register(Timestep)
| 22.571429 | 50 | 0.848101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8794c7745220a34124f93774d760cb2a2e49b5f | 1,581 | py | Python | src/prepare_train_valid.py | partham16/demo_classification | d756ab150a1913c220f1048eda552483e88c01c1 | [
"MIT"
] | null | null | null | src/prepare_train_valid.py | partham16/demo_classification | d756ab150a1913c220f1048eda552483e88c01c1 | [
"MIT"
] | null | null | null | src/prepare_train_valid.py | partham16/demo_classification | d756ab150a1913c220f1048eda552483e88c01c1 | [
"MIT"
] | null | null | null | from typing import List, Tuple
import h2o
import pandas as pd
from sklearn.model_selection import train_test_split
from .config import Config
def get_train_valid(df: pd.DataFrame) -> Tuple[pd.DataFrame]:
"""Get train - valid - test"""
full_train_df, test_df = train_test_split(
df,
test_size=... | 28.745455 | 73 | 0.674889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.067046 |
d87c366bf70803b5e5a62ba14bdd8953959d7029 | 419 | py | Python | generate-text-replacements.py | clrcrl/tech-name-fixer | 4d5ab36aa28a1e2912e02c5ea33a3f8af8d0e77b | [
"Apache-2.0"
] | null | null | null | generate-text-replacements.py | clrcrl/tech-name-fixer | 4d5ab36aa28a1e2912e02c5ea33a3f8af8d0e77b | [
"Apache-2.0"
] | null | null | null | generate-text-replacements.py | clrcrl/tech-name-fixer | 4d5ab36aa28a1e2912e02c5ea33a3f8af8d0e77b | [
"Apache-2.0"
] | null | null | null | import csv
import plistlib as plist
SOURCE_FILE = "tech-names.csv"
snippets_array = []
with open(SOURCE_FILE, "rt") as csvfile:
reader = csv.DictReader(csvfile)
firstline = True
for row in reader:
snippets_array.append(
{"phrase": row["correct_spelling"], "shortcut": row["common_missp... | 23.277778 | 86 | 0.661098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 98 | 0.23389 |
d87dbe03e3d17cde827cd192191f97d4763ebc9a | 4,524 | py | Python | cjax/continuation/_perturbed_arc_len_continuation.py | harsh306/continuation-jax | c1452604558764df9cd4770130b60035eea5c5b3 | [
"MIT"
] | 2 | 2022-01-26T18:02:51.000Z | 2022-02-15T01:36:39.000Z | cjax/continuation/_perturbed_arc_len_continuation.py | harsh306/continuation-jax | c1452604558764df9cd4770130b60035eea5c5b3 | [
"MIT"
] | null | null | null | cjax/continuation/_perturbed_arc_len_continuation.py | harsh306/continuation-jax | c1452604558764df9cd4770130b60035eea5c5b3 | [
"MIT"
] | 1 | 2022-02-15T01:37:50.000Z | 2022-02-15T01:37:50.000Z | from cjax.continuation._arc_len_continuation import PseudoArcLenContinuation
from cjax.continuation.states.state_variables import StateWriter
from cjax.continuation.methods.predictor.secant_predictor import SecantPredictor
from jax.experimental.optimizers import l2_norm
from cjax.continuation.methods.corrector.perturbe... | 36.192 | 100 | 0.600133 | 3,991 | 0.882184 | 0 | 0 | 3,348 | 0.740053 | 0 | 0 | 496 | 0.109637 |
d87e5d6a6c3a210e859a21073e4fe4f95aee7c09 | 1,345 | py | Python | dependencytrack/bom.py | dmuse89/dependency-track-python | 462d4a2b7ba5b1b1b0d0ea9066057872f5bd74bb | [
"CNRI-Python"
] | null | null | null | dependencytrack/bom.py | dmuse89/dependency-track-python | 462d4a2b7ba5b1b1b0d0ea9066057872f5bd74bb | [
"CNRI-Python"
] | null | null | null | dependencytrack/bom.py | dmuse89/dependency-track-python | 462d4a2b7ba5b1b1b0d0ea9066057872f5bd74bb | [
"CNRI-Python"
] | null | null | null | # SPDX-License-Identifier: GPL-2.0+
from .exceptions import DependencyTrackApiError
class Bom:
"""Class dedicated to all "bom" related endpoints"""
def upload_bom(
self,
file_name,
project_id=None,
project_name=None,
project_version=None,
auto_create=False,
... | 29.888889 | 67 | 0.613383 | 1,257 | 0.934572 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0.297398 |
d87f974916d2df6ce93e6643e73f56fff02c54aa | 1,895 | py | Python | Contributors/IanDavis/ValidSentence.py | FergusDevelopmentLLC/Coders-Workshop | 3513bd5f79eaa85b4d2a648c5f343a224842325d | [
"MIT"
] | 33 | 2019-12-02T23:29:47.000Z | 2022-03-24T02:40:36.000Z | Contributors/IanDavis/ValidSentence.py | FergusDevelopmentLLC/Coders-Workshop | 3513bd5f79eaa85b4d2a648c5f343a224842325d | [
"MIT"
] | 39 | 2020-01-15T19:28:12.000Z | 2021-11-26T05:13:29.000Z | Contributors/IanDavis/ValidSentence.py | FergusDevelopmentLLC/Coders-Workshop | 3513bd5f79eaa85b4d2a648c5f343a224842325d | [
"MIT"
] | 49 | 2019-12-02T23:29:53.000Z | 2022-03-03T01:11:37.000Z | """By Ian Davis for Bootcampers Collective Coders Workshop on 2/19/20"""
""" This program evaluates a string and determines if it its a real sentence """
validString = 'This is a valid sentence.'
twoSpaces = "This isn't valid"
firstCharacterNotCapitalized = 'not capitalized'
containsProperNoun = 'Only the firs charac... | 31.065574 | 80 | 0.624802 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 627 | 0.330871 |
d87fb2cf3d6c3c5eaead08973e95a1d7f892f80b | 1,269 | py | Python | MirrorMirror/theme/TextBox.py | RubanSeven/MirrorMirror | 47c7a1f458f87c536d068fcf249625f426920cc3 | [
"Apache-2.0"
] | 2 | 2021-07-07T13:21:11.000Z | 2021-09-24T06:57:16.000Z | MirrorMirror/theme/TextBox.py | RubanSeven/MirrorMirror | 47c7a1f458f87c536d068fcf249625f426920cc3 | [
"Apache-2.0"
] | null | null | null | MirrorMirror/theme/TextBox.py | RubanSeven/MirrorMirror | 47c7a1f458f87c536d068fcf249625f426920cc3 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
"""
@author: RubanSeven
@project: MirrorMirror
"""
from PyQt5.QtWidgets import *
class CodeTextEdit(QTextEdit):
def __init__(self, *__args):
super().__init__(*__args)
self.setStyleSheet(
"""
QTextEdit {
background-color: ... | 24.403846 | 51 | 0.408983 | 1,141 | 0.899133 | 0 | 0 | 0 | 0 | 0 | 0 | 763 | 0.601261 |
d8819ce394b5003e6d8376f1810f650835d534ec | 1,429 | py | Python | 012getLncRNA_PMID.py | qiufengdiewu/LPInsider | 92fcc2ad9e05cb634c4e3f1accd1220b984a027d | [
"Apache-2.0"
] | null | null | null | 012getLncRNA_PMID.py | qiufengdiewu/LPInsider | 92fcc2ad9e05cb634c4e3f1accd1220b984a027d | [
"Apache-2.0"
] | null | null | null | 012getLncRNA_PMID.py | qiufengdiewu/LPInsider | 92fcc2ad9e05cb634c4e3f1accd1220b984a027d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
from Bio import Entrez
import MySQLdb as mySQLDB
Entrez.email="A.N.Other@example.com"
def savePID():
returnCount=100000#每次可以最大返回十万条数据。
handle=Entrez.esearch(db="pubmed",term="lncRNA",RetMax=returnCount)
'''
这些参数值目前是够用的,但是不能保证以后一定可以。如果运行错误,则参照官网给出的... | 34.02381 | 222 | 0.590623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 969 | 0.569665 |
d8836803dce845ee19f76d28736903e2e7b8d35b | 11,867 | py | Python | scripts/generate_schema/worldbank/generate_worldbank_schema.py | liangmuxin/datamart | 495a21588db39c9ad239409208bec701dca07f30 | [
"MIT"
] | 7 | 2018-10-02T01:32:23.000Z | 2020-10-08T00:42:35.000Z | scripts/generate_schema/worldbank/generate_worldbank_schema.py | liangmuxin/datamart | 495a21588db39c9ad239409208bec701dca07f30 | [
"MIT"
] | 47 | 2018-10-02T05:41:13.000Z | 2021-02-02T21:50:31.000Z | scripts/generate_schema/worldbank/generate_worldbank_schema.py | liangmuxin/datamart | 495a21588db39c9ad239409208bec701dca07f30 | [
"MIT"
] | 19 | 2018-10-01T22:27:20.000Z | 2019-02-28T18:59:53.000Z | import os
from argparse import ArgumentParser
import requests
import json
import traceback
LOCATIONS = [
"Aruba",
"Afghanistan",
"Africa",
"Angola",
"Albania",
"Andorra",
"Andean Region",
"Arab World",
"United Arab Emirates",
"Argentina",
"Armenia",
"American Samoa",
"Antigua and Barbuda",
... | 27.469907 | 110 | 0.605292 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,652 | 0.644705 |
d88413a8c6025245623ff27f30f5b74590dab51a | 1,546 | py | Python | examples/lineplots/devol.py | aengelke/z-plot | 63e4e6656355b608487a3e4df5da13b7fad9b108 | [
"BSD-3-Clause"
] | 22 | 2016-10-19T15:02:22.000Z | 2021-12-23T12:40:37.000Z | examples/lineplots/devol.py | aengelke/z-plot | 63e4e6656355b608487a3e4df5da13b7fad9b108 | [
"BSD-3-Clause"
] | 4 | 2017-04-16T03:15:48.000Z | 2020-10-28T11:36:35.000Z | examples/lineplots/devol.py | aengelke/z-plot | 63e4e6656355b608487a3e4df5da13b7fad9b108 | [
"BSD-3-Clause"
] | 11 | 2017-01-18T02:41:57.000Z | 2021-12-28T02:21:30.000Z | #! /usr/bin/env python
from zplot import *
import sys
import sys
ctype = 'eps' if len(sys.argv) < 2 else sys.argv[1]
c = canvas(ctype, title='devol', dimensions=['400','340'])
t = table(file='devol.data')
t.addcolumns(['month','year'])
t.update(set='month = substr(date, 1, 2)')
t.update(set='year = substr(date, 4, 2... | 35.136364 | 80 | 0.666882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 376 | 0.243208 |
d88462214366d2d59a4aa76c3e990d20a7d331bd | 4,208 | py | Python | DLplatform/aggregating/geometric_median.py | chelseajohn/dlplatform | 429e42c598039d1e9fd1df3da4247f391915a31b | [
"Apache-2.0"
] | 5 | 2020-05-05T08:54:26.000Z | 2021-02-20T07:36:28.000Z | DLplatform/aggregating/geometric_median.py | zagazao/dlplatform | ab32af8f89cfec4b478203bd5d13ce2d30e89ba7 | [
"Apache-2.0"
] | 1 | 2020-11-16T14:15:53.000Z | 2020-11-16T14:15:53.000Z | DLplatform/aggregating/geometric_median.py | zagazao/dlplatform | ab32af8f89cfec4b478203bd5d13ce2d30e89ba7 | [
"Apache-2.0"
] | 4 | 2020-05-05T08:56:57.000Z | 2020-07-22T11:28:52.000Z | from DLplatform.aggregating import Aggregator
from DLplatform.parameters import Parameters
from typing import List
import numpy as np
from scipy.spatial.distance import cdist, euclidean
class GeometricMedian(Aggregator):
'''
Provides a method to calculate an averaged model from n individual models (using the ... | 31.402985 | 122 | 0.481939 | 2,352 | 0.558935 | 0 | 0 | 0 | 0 | 0 | 0 | 2,371 | 0.563451 |
d88610b31c7b5f25ebda49d4c2f961d36945c83b | 4,670 | py | Python | stock_price_predictor/app.py | abdullahtk/Stock-Market-Predictor | 1e97d5d2c647912447b9db8eb548e52c0ad1fe8a | [
"MIT"
] | 3 | 2019-07-25T22:41:38.000Z | 2021-04-06T04:37:05.000Z | stock_price_predictor/app.py | abdullahtk/Stock-Market-Predictor | 1e97d5d2c647912447b9db8eb548e52c0ad1fe8a | [
"MIT"
] | 2 | 2019-07-13T15:36:06.000Z | 2021-06-01T23:56:50.000Z | stock_price_predictor/app.py | abdullahtk/Stock-Market-Predictor | 1e97d5d2c647912447b9db8eb548e52c0ad1fe8a | [
"MIT"
] | 1 | 2019-07-25T22:42:03.000Z | 2019-07-25T22:42:03.000Z | from flask import Flask
from flask import render_template, request, jsonify
from source import StockPredictor as sp
from source import ModelsParametersTunning as mpt
from datetime import datetime
import json
from plotly.graph_objs import Scatter
from pandas.tseries.offsets import BDay
app = Flask(__name__)
def insta... | 33.357143 | 162 | 0.601927 | 0 | 0 | 0 | 0 | 4,012 | 0.859101 | 0 | 0 | 795 | 0.170236 |
d8861a99b9bc42b6ddf7bfddb993259aa9336913 | 720 | py | Python | generator/migrations/0001_initial.py | danielcoker/random-uuid | 0cf459eb2a838923e9ee5f17e20dbd9ece27a4ce | [
"MIT"
] | null | null | null | generator/migrations/0001_initial.py | danielcoker/random-uuid | 0cf459eb2a838923e9ee5f17e20dbd9ece27a4ce | [
"MIT"
] | null | null | null | generator/migrations/0001_initial.py | danielcoker/random-uuid | 0cf459eb2a838923e9ee5f17e20dbd9ece27a4ce | [
"MIT"
] | null | null | null | # Generated by Django 3.2.11 on 2022-01-18 12:43
from django.db import migrations, models
import generator.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Vault',
fields=[
(... | 26.666667 | 117 | 0.579167 | 602 | 0.836111 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.144444 |
d886d8c696a1ebb65d655949115462c4ca60e2a4 | 274 | py | Python | vmraid/patches/v6_0/document_type_rename.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | vmraid/patches/v6_0/document_type_rename.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | vmraid/patches/v6_0/document_type_rename.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import vmraid
def execute():
vmraid.db.sql("""update tabDocType set document_type='Document'
where document_type='Transaction'""")
vmraid.db.sql("""update tabDocType set document_type='Setup'
where document_type='Master'""")
| 30.444444 | 64 | 0.766423 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.613139 |
d88805a961c2bd2e72ffebe23a8679a83ce2e0f0 | 1,529 | py | Python | biostar/recipes/migrations/0008_label.py | Oribyne/biostar-central-fork | 89a459bc66d438518cf968c3f2e3ce1f50573b9e | [
"MIT"
] | 477 | 2015-01-01T00:18:54.000Z | 2022-03-21T10:29:29.000Z | biostar/recipes/migrations/0008_label.py | coreydipsy/biostar-central | 2b2f09199a6332877885ef54d9ac588ed0765770 | [
"MIT"
] | 247 | 2015-01-02T08:12:03.000Z | 2022-02-24T15:20:58.000Z | biostar/recipes/migrations/0008_label.py | coreydipsy/biostar-central | 2b2f09199a6332877885ef54d9ac588ed0765770 | [
"MIT"
] | 251 | 2015-01-01T16:05:57.000Z | 2022-03-25T21:32:44.000Z | # Generated by Django 3.0.2 on 2020-02-17 22:42
from django.db import migrations, models
import hjson
import toml
def init_toml(apps, schema_editor):
Recipes = apps.get_model('recipes', 'Analysis')
for recipe in Recipes.objects.all():
# Load the json data
json_data = hjson.loads(recipe.json_t... | 27.8 | 74 | 0.620013 | 777 | 0.508175 | 0 | 0 | 0 | 0 | 0 | 0 | 294 | 0.192283 |
d88917a3681f54f58e6f0236e05d538383e5fe13 | 1,100 | py | Python | src/unittest/python/modules/processing/filter_lt_tests.py | FHNW-CyberCaptain/CyberCaptain | 07c989190e997353fbf57eb7a386947d6ab8ffd5 | [
"MIT"
] | 1 | 2018-10-01T10:59:55.000Z | 2018-10-01T10:59:55.000Z | src/unittest/python/modules/processing/filter_lt_tests.py | FHNW-CyberCaptain/CyberCaptain | 07c989190e997353fbf57eb7a386947d6ab8ffd5 | [
"MIT"
] | null | null | null | src/unittest/python/modules/processing/filter_lt_tests.py | FHNW-CyberCaptain/CyberCaptain | 07c989190e997353fbf57eb7a386947d6ab8ffd5 | [
"MIT"
] | 1 | 2021-11-01T00:09:00.000Z | 2021-11-01T00:09:00.000Z | import unittest
from cybercaptain.processing.filter import processing_filter
class ProcessingFilterLTTest(unittest.TestCase):
"""
Test the filters for LT
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
arguments = {'src': '.',
'filterby':... | 32.352941 | 85 | 0.579091 | 1,020 | 0.927273 | 0 | 0 | 0 | 0 | 0 | 0 | 373 | 0.339091 |
d889b29c8ab7230fa4821ccc373f7fe3a359f78f | 6,129 | py | Python | src/data/clean.py | samatix/ml-asset-managers | 27c9c0b3f67fd0350e80c5fb2729e64a13dccbb8 | [
"Apache-2.0"
] | 2 | 2022-01-01T11:06:22.000Z | 2022-02-19T03:19:18.000Z | src/data/clean.py | samatix/ml-asset-managers | 27c9c0b3f67fd0350e80c5fb2729e64a13dccbb8 | [
"Apache-2.0"
] | null | null | null | src/data/clean.py | samatix/ml-asset-managers | 27c9c0b3f67fd0350e80c5fb2729e64a13dccbb8 | [
"Apache-2.0"
] | 2 | 2020-08-15T05:38:49.000Z | 2022-03-05T07:31:11.000Z | import logging
import numpy as np
import pandas as pd
from sklearn.neighbors.kde import KernelDensity
from scipy.optimize import minimize
from src.utils import cov2corr
class MarcenkoPastur:
def __init__(self, points=1000):
"""
Marcenko-Pastur
:param points:
:type points: int
... | 33.309783 | 79 | 0.586229 | 4,785 | 0.780715 | 0 | 0 | 0 | 0 | 0 | 0 | 1,772 | 0.289117 |
d88c5d3fd6e480648f2585b49ccf5181a7bd2748 | 803 | py | Python | flows/builtin/tests/unit/webserver/factory/test_simple_http_server_flow_factory.py | vdloo/jobrunner | a3a7b8f7fd4d879d398f1390db0611f9c626f6db | [
"Apache-2.0"
] | 1 | 2020-08-31T19:06:16.000Z | 2020-08-31T19:06:16.000Z | flows/builtin/tests/unit/webserver/factory/test_simple_http_server_flow_factory.py | vdloo/jobrunner | a3a7b8f7fd4d879d398f1390db0611f9c626f6db | [
"Apache-2.0"
] | null | null | null | flows/builtin/tests/unit/webserver/factory/test_simple_http_server_flow_factory.py | vdloo/jobrunner | a3a7b8f7fd4d879d398f1390db0611f9c626f6db | [
"Apache-2.0"
] | null | null | null | from flows.builtin.webserver.factory import simple_http_server_flow_factory
from jobrunner.utils import list_tasks_in_flow
from tests.testcase import TestCase
class TestSimpleHTTPServerFlowFactory(TestCase):
def test_simple_http_server_flow_factory_creates_flow_with_name(self):
flow = simple_http_server_f... | 33.458333 | 75 | 0.768369 | 641 | 0.798257 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.058531 |
d88d295ec1717480689aae0ec07ffd4cad0afd39 | 530 | py | Python | saleor/core/emails.py | cleobuck/krolocosmetics | 4ae97601a18461323606d6e22673bb38cbaa6272 | [
"CC-BY-4.0"
] | 2 | 2019-12-04T19:43:51.000Z | 2020-07-06T09:56:04.000Z | saleor/core/emails.py | cleobuck/krolocosmetics | 4ae97601a18461323606d6e22673bb38cbaa6272 | [
"CC-BY-4.0"
] | 11 | 2021-02-02T22:34:37.000Z | 2022-02-10T20:20:50.000Z | saleor/core/emails.py | cleobuck/krolocosmetics | 4ae97601a18461323606d6e22673bb38cbaa6272 | [
"CC-BY-4.0"
] | null | null | null | from django.contrib.sites.models import Site
from django.templatetags.static import static
from ..core.utils import build_absolute_uri
def get_email_context():
site: Site = Site.objects.get_current()
logo_url = build_absolute_uri(static("images/logo-light.jpg"))
send_email_kwargs = {"from_email": site.se... | 31.176471 | 72 | 0.732075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.120755 |
d88d675c24541241d384af1e5883cd0ed00a17c1 | 5,045 | py | Python | tests/test_views.py | acutexyz/monkeyideas | 062ffa16f3bdf1fa57338837b50bfddfebdecdac | [
"MIT"
] | null | null | null | tests/test_views.py | acutexyz/monkeyideas | 062ffa16f3bdf1fa57338837b50bfddfebdecdac | [
"MIT"
] | null | null | null | tests/test_views.py | acutexyz/monkeyideas | 062ffa16f3bdf1fa57338837b50bfddfebdecdac | [
"MIT"
] | null | null | null | from app.models import *
import pytest
from app.forms import *
from werkzeug.datastructures import MultiDict
from flask import url_for
import json
from flask.ext.login import current_user, login_user, logout_user
@pytest.fixture
def profession(session):
p = Profession(name='Software Engineer in Test')
session... | 27.71978 | 76 | 0.5556 | 3,183 | 0.630922 | 0 | 0 | 1,363 | 0.270168 | 0 | 0 | 701 | 0.138949 |
d88d8616334079599791ffad043f9440390cda86 | 482 | py | Python | src/views.py | DarFig/bLg0 | e8e570af13e977fe867f858c7247dfe16cc22488 | [
"MIT"
] | null | null | null | src/views.py | DarFig/bLg0 | e8e570af13e977fe867f858c7247dfe16cc22488 | [
"MIT"
] | null | null | null | src/views.py | DarFig/bLg0 | e8e570af13e977fe867f858c7247dfe16cc22488 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from src import app
from flask import render_template
from .controladores.blog import *
from .controladores.about import *
from .controladores.post import *
from .interpreter import get_all_proy, get_all_posts
@app.route('/')
@app.route('/', methods=['GET'])
def index():
title = "BLG0"
... | 20.083333 | 88 | 0.711618 | 0 | 0 | 0 | 0 | 238 | 0.493776 | 0 | 0 | 59 | 0.122407 |
d88e2fadb48418563200bc00bbc87d76d7edb36c | 447 | py | Python | src/L00_Entry_tasks/entry_task3.py | VeraVol42/EduNet | e24ef5f0bfe24df54da7d77f1e3b2164083b3331 | [
"CC0-1.0"
] | null | null | null | src/L00_Entry_tasks/entry_task3.py | VeraVol42/EduNet | e24ef5f0bfe24df54da7d77f1e3b2164083b3331 | [
"CC0-1.0"
] | null | null | null | src/L00_Entry_tasks/entry_task3.py | VeraVol42/EduNet | e24ef5f0bfe24df54da7d77f1e3b2164083b3331 | [
"CC0-1.0"
] | null | null | null | operand = input()
st1 = input().split(' ')
st2 = input().split(' ')
x1, y1, z1, x2, y2, z2 = float(st1[0]), float(st1[1]), float(st1[2]), float(st2[0]), float(st2[1]), float(st2[2])
if operand == "+":
res = (x1+x2, y1+y2, z1+z2)
elif operand == "-":
res = (x1-x2, y1-y2, z1-z2)
elif operand == "@":
res = (x1... | 31.928571 | 113 | 0.536913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.069351 |
d88fb1b1d25ac7b6d5954cd96c458c9d471fb3b6 | 4,109 | py | Python | inb/tests/test_linkedin/test_driver.py | JoshiAyush/LinkedIn-Automator | 6341867fb9bb974ecfe388d90d1860e9c85a3b3c | [
"MIT"
] | 1 | 2021-01-05T17:29:02.000Z | 2021-01-05T17:29:02.000Z | inb/tests/test_linkedin/test_driver.py | JoshiAyush/LinkedIn-Automator | 6341867fb9bb974ecfe388d90d1860e9c85a3b3c | [
"MIT"
] | null | null | null | inb/tests/test_linkedin/test_driver.py | JoshiAyush/LinkedIn-Automator | 6341867fb9bb974ecfe388d90d1860e9c85a3b3c | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2019 Creative Commons
#
# 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, me... | 40.683168 | 127 | 0.748601 | 2,585 | 0.629107 | 0 | 0 | 2,532 | 0.616208 | 0 | 0 | 1,500 | 0.365052 |
d894b0c0efe076de25e246895a699bb7e8b99808 | 417 | py | Python | app/__init__.py | 6ixBit/Personal-Website | 0f51563b06c1955775ba2ac4e78786cad21cdefa | [
"MIT"
] | null | null | null | app/__init__.py | 6ixBit/Personal-Website | 0f51563b06c1955775ba2ac4e78786cad21cdefa | [
"MIT"
] | 1 | 2021-06-02T00:29:28.000Z | 2021-06-02T00:29:28.000Z | app/__init__.py | 6ixBit/Personal-Website | 0f51563b06c1955775ba2ac4e78786cad21cdefa | [
"MIT"
] | null | null | null | from flask import Flask
from flask_bootstrap import Bootstrap
from flask_nav import Nav
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_mail import Mail
from Config import Config
app = Flask(__name__)
app.config.from_object(Config)
Bootstrap(app)
nav = Nav(app)
db = SQLAlchemy(app)... | 24.529412 | 51 | 0.805755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d895cb920f81b7b33316df8ee7c07eb1ad364352 | 3,037 | py | Python | example-tests/example_Grid.py | Indomerun/pyHiChi | fdceb238dfed6433ee350d5c593ca5e2cd4fbd2b | [
"MIT"
] | 11 | 2019-08-22T12:47:40.000Z | 2022-01-28T16:07:29.000Z | example-tests/example_Grid.py | Indomerun/pyHiChi | fdceb238dfed6433ee350d5c593ca5e2cd4fbd2b | [
"MIT"
] | 14 | 2019-09-02T08:24:55.000Z | 2022-02-14T11:40:43.000Z | example-tests/example_Grid.py | Indomerun/pyHiChi | fdceb238dfed6433ee350d5c593ca5e2cd4fbd2b | [
"MIT"
] | 9 | 2019-07-31T13:25:20.000Z | 2022-01-28T16:07:45.000Z | import sys
sys.path.append("../bin/")
import pyHiChi as hichi
import numpy as np
def valueE(x, y, z):
E = hichi.Vector3d(0, np.cos(z), 0) #sin(x)
return E
def valueEx(x, y, z):
Ex = 0
return Ex
def valueEy(x, y, z):
Ey = np.cos(z)
return Ey
def valueEz(x, y, z):
Ez = 0
return Ez
de... | 24.103175 | 94 | 0.622654 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.052354 |
d8965469242d4e72828c54c19635f40c52cf043e | 850 | py | Python | douyu/douyu/spiders/spider.py | smujm/ScrapyProjects | 04e9eb42c64805475893be595db4f3b6530ba597 | [
"MIT"
] | null | null | null | douyu/douyu/spiders/spider.py | smujm/ScrapyProjects | 04e9eb42c64805475893be595db4f3b6530ba597 | [
"MIT"
] | null | null | null | douyu/douyu/spiders/spider.py | smujm/ScrapyProjects | 04e9eb42c64805475893be595db4f3b6530ba597 | [
"MIT"
] | null | null | null | import scrapy
import json
from douyu.items import DouyuItem
class SpiderSpider(scrapy.Spider):
name = 'douyu'
allowed_domains = ['https://www.douyu.com']
base_url = 'http://capi.douyucdn.cn/api/v1/getVerticalRoom?limit=20&offset='
offset = 0
start_urls = [base_url + str(offset)]
def parse(sel... | 29.310345 | 80 | 0.611765 | 833 | 0.929688 | 588 | 0.65625 | 0 | 0 | 0 | 0 | 238 | 0.265625 |
d896eb0aaef01df589adcc60f76141166ae14cf0 | 1,716 | py | Python | corehq/ex-submodules/dimagi/utils/parsing.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 471 | 2015-01-10T02:55:01.000Z | 2022-03-29T18:07:18.000Z | corehq/ex-submodules/dimagi/utils/parsing.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 14,354 | 2015-01-01T07:38:23.000Z | 2022-03-31T20:55:14.000Z | corehq/ex-submodules/dimagi/utils/parsing.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 175 | 2015-01-06T07:16:47.000Z | 2022-03-29T13:27:01.000Z | from datetime import date, time, datetime
from dateutil.parser import parse
import dateutil.tz
TRUE_STRINGS = ("true", "t", "yes", "y", "1")
FALSE_STRINGS = ("false", "f", "no", "n", "0")
def string_to_boolean(val):
"""
A very dumb string to boolean converter. Will fail hard
if the conversion doesn't s... | 26.8125 | 77 | 0.654429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 512 | 0.298368 |
d897d34629e02e537f13d11f12451d99e9ab865b | 521 | py | Python | synonym.py | amber5634/Synonym-Generator-using-Word-Net | 5ce0f71d4639bbae39ee0d279103e576065c094a | [
"MIT"
] | null | null | null | synonym.py | amber5634/Synonym-Generator-using-Word-Net | 5ce0f71d4639bbae39ee0d279103e576065c094a | [
"MIT"
] | null | null | null | synonym.py | amber5634/Synonym-Generator-using-Word-Net | 5ce0f71d4639bbae39ee0d279103e576065c094a | [
"MIT"
] | null | null | null | import nltk
from nltk.corpus import wordnet
class Keyword:
def synonymn_generator(self):
synonyms = []
antonyms = []
word = input("enter the word : ")
for syn in wordnet.synsets(word):
for l in syn.lemmas():
synonyms.append(l.name()) ... | 26.05 | 60 | 0.520154 | 427 | 0.819578 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.036468 |
d89df34e44c6bfd5607bac84838a10b568961067 | 3,846 | py | Python | scripts/src/__main__.py | 9999years/dotfiles | 763c2ca5f8aeb3b64eb28262e6708135e6cd2005 | [
"MIT"
] | 1 | 2020-09-09T15:06:43.000Z | 2020-09-09T15:06:43.000Z | scripts/src/__main__.py | 9999years/dotfiles | 763c2ca5f8aeb3b64eb28262e6708135e6cd2005 | [
"MIT"
] | 2 | 2020-09-09T14:16:21.000Z | 2020-09-29T17:31:15.000Z | scripts/src/__main__.py | 9999years/dotfiles | 763c2ca5f8aeb3b64eb28262e6708135e6cd2005 | [
"MIT"
] | 2 | 2020-09-04T14:55:57.000Z | 2020-10-30T19:08:58.000Z | """Entry point for linking dotfiles.
"""
from __future__ import annotations
import argparse
import os
import subprocess
import sys
from dataclasses import dataclass
from pathlib import Path
from typing import Optional
from . import log
from .link import Linker
from .resolver import Resolver
from .scan import Scanner... | 26.524138 | 84 | 0.595684 | 529 | 0.137438 | 0 | 0 | 540 | 0.140296 | 0 | 0 | 1,042 | 0.27072 |
d89ebf9a6b581abb7634d793d29dd4afbd5a6f07 | 3,778 | py | Python | verified.py | tophersmith/veracode-verified-checker | f2f85dbb4b8039c9ccd9848367a37b9caab0c9aa | [
"MIT"
] | null | null | null | verified.py | tophersmith/veracode-verified-checker | f2f85dbb4b8039c9ccd9848367a37b9caab0c9aa | [
"MIT"
] | null | null | null | verified.py | tophersmith/veracode-verified-checker | f2f85dbb4b8039c9ccd9848367a37b9caab0c9aa | [
"MIT"
] | null | null | null | import sys
import json
import requests
from veracode_api_signing.plugin_requests import RequestsAuthPluginVeracodeHMAC
from pprint import pprint
from datetime import datetime
from app_definition import AppDefinition
from verified_check import VerifiedStandard, VerifiedTeam, VerifiedContinuous
from verified_report impor... | 32.568966 | 123 | 0.724722 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,205 | 0.318952 |
d8a1ec63d4e8397c65e7cf35b675ad0d08be473f | 3,850 | py | Python | pulsemeeter/EqPopover.py | dacid44/pulsemeeter | 5367fe910c8d1eea2a0523549c2c26c446547445 | [
"MIT"
] | null | null | null | pulsemeeter/EqPopover.py | dacid44/pulsemeeter | 5367fe910c8d1eea2a0523549c2c26c446547445 | [
"MIT"
] | null | null | null | pulsemeeter/EqPopover.py | dacid44/pulsemeeter | 5367fe910c8d1eea2a0523549c2c26c446547445 | [
"MIT"
] | null | null | null | import os
from .settings import LAYOUT_DIR
from gi import require_version as gi_require_version
gi_require_version('Gtk', '3.0')
from gi.repository import Gtk,Gdk
class EqPopover():
def __init__(self, button, pulse, index):
self.builder = Gtk.Builder()
self.pulse = pulse
self.layout = pu... | 37.378641 | 73 | 0.585714 | 3,684 | 0.956883 | 0 | 0 | 0 | 0 | 0 | 0 | 768 | 0.199481 |
d8a43b2abf45ed0ee34b929a0e82dda9a77e57e1 | 717 | py | Python | ModfiyImagesSizes.py | Idolized22/Coco-llike-dataset-creator- | f0aa95710fdb339e31788b366d7360f0f994b88e | [
"MIT"
] | null | null | null | ModfiyImagesSizes.py | Idolized22/Coco-llike-dataset-creator- | f0aa95710fdb339e31788b366d7360f0f994b88e | [
"MIT"
] | null | null | null | ModfiyImagesSizes.py | Idolized22/Coco-llike-dataset-creator- | f0aa95710fdb339e31788b366d7360f0f994b88e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: idolized22
"""
import PIL.Image
from matplotlib import pyplot
import numpy as np
def resize_image (Img, DesieredSize=[1300,1300]):
#desired size to be passed as [width , height ]
factor=1
while (Img.size[0] * Img.size[1])>( DesieredSize[0]* D... | 24.724138 | 82 | 0.659693 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.224547 |
d8a4ffb4de362b2f4a2070e30f28d8fd00e06627 | 206 | py | Python | try-except.py | arhue/python-learning | 058c93315fd5aa76584e32432e7c80cb3972478e | [
"MIT"
] | null | null | null | try-except.py | arhue/python-learning | 058c93315fd5aa76584e32432e7c80cb3972478e | [
"MIT"
] | null | null | null | try-except.py | arhue/python-learning | 058c93315fd5aa76584e32432e7c80cb3972478e | [
"MIT"
] | null | null | null | x=input("Enter a no. I will convert to integer")
z=1
try:
y=int(float(x))
z="float"
except:
z="wrong"
if z=="wrong":
print("fix your input")
else:
print("int of your input is:", y)
| 15.846154 | 48 | 0.57767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.480583 |
d8a6e96e4ea3e27e49331d747cf1b4b5f9ab87ec | 3,426 | py | Python | merge_vcfs_individual.py | AndersenLab/pyPipeline | 89af32c545f309686b6bbf2d1f0e9681136642ba | [
"MIT"
] | 5 | 2015-09-18T15:48:01.000Z | 2022-03-11T02:24:12.000Z | merge_vcfs_individual.py | AndersenLab/pyPipeline | 89af32c545f309686b6bbf2d1f0e9681136642ba | [
"MIT"
] | null | null | null | merge_vcfs_individual.py | AndersenLab/pyPipeline | 89af32c545f309686b6bbf2d1f0e9681136642ba | [
"MIT"
] | null | null | null | #!/usr/bin/python
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH --nodes=1
#SBATCH --mem=8192
#
# This script merges SNP and Indel Files called with Samtool and Freebayes that are called individually.
#
import sys
import os
from utils import *
from utils.configuration import *
from commands im... | 38.066667 | 131 | 0.585231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,545 | 0.450963 |
d8a7d33720089c11a74552c8c79ff625254ee85a | 769 | py | Python | cuhk03/init_env.py | cwpeng-cn/TorchReID | e6cf1d38bfc3100ea19e3e92aa4306b79fd3517b | [
"MIT"
] | null | null | null | cuhk03/init_env.py | cwpeng-cn/TorchReID | e6cf1d38bfc3100ea19e3e92aa4306b79fd3517b | [
"MIT"
] | null | null | null | cuhk03/init_env.py | cwpeng-cn/TorchReID | e6cf1d38bfc3100ea19e3e92aa4306b79fd3517b | [
"MIT"
] | null | null | null | import zipfile
import os
def download_and_prepare():
reid_path = "/content/drive/My Drive/Colab/datasets/reid.zip"
file_zip = zipfile.ZipFile(reid_path, 'r')
for file in file_zip.namelist():
file_zip.extract(file, r'.')
with open("/content/drive/My Drive/Colab/ReID works/CVPR fintuning/resnet... | 34.954545 | 118 | 0.559168 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 267 | 0.347204 |
d8a907f41af888797cb8bfb82d2555a46654432c | 2,109 | py | Python | myutils/dictionaries.py | joeledwardson/betfair-browser | b641f134e60307250a0e51bafa849422ecf5264b | [
"MIT"
] | 3 | 2021-11-23T19:03:02.000Z | 2021-11-24T08:44:23.000Z | myutils/dictionaries.py | joeledwardson/betfair-browser | b641f134e60307250a0e51bafa849422ecf5264b | [
"MIT"
] | 2 | 2021-11-23T18:47:31.000Z | 2021-12-08T15:36:11.000Z | myutils/dictionaries.py | joeledwardson/betfair-browser | b641f134e60307250a0e51bafa849422ecf5264b | [
"MIT"
] | null | null | null | from typing import Iterable, Dict
import copy
from collections.abc import Mapping
from .exceptions import DictException
def validate_config(cfg: Dict, cfg_spec: Dict):
_cfg = copy.deepcopy(cfg)
for k, spec in cfg_spec.items():
exist = k in _cfg
val = _cfg.pop(k, None)
if not spec.get('... | 31.954545 | 113 | 0.573732 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 629 | 0.298246 |
d8a962009dd9b86f4b5fe67a974e8bc3e24fe091 | 307 | py | Python | Test/test_main_methods.py | abualrubbaraa/Baraa-Validator | bff356f4e35ea7de66de799e7f063c383e298d1f | [
"MIT"
] | null | null | null | Test/test_main_methods.py | abualrubbaraa/Baraa-Validator | bff356f4e35ea7de66de799e7f063c383e298d1f | [
"MIT"
] | null | null | null | Test/test_main_methods.py | abualrubbaraa/Baraa-Validator | bff356f4e35ea7de66de799e7f063c383e298d1f | [
"MIT"
] | null | null | null | from BaraaValidator.transactionValidators import validateTransactionsFolder, validateTransactionsFile
import os
def test_mainMethods():
dirpath = os.path.dirname(__file__)
filepath = os.path.join(dirpath, 'transaction.json')
assert (validateTransactionsFile(filepath)) == True
test_mainMethods() | 43.857143 | 101 | 0.807818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.058632 |
d8aa198eaa6cbdf332e325c46c63a1a3c514ea9f | 2,020 | py | Python | linux-distro/package/nuxleus/Source/Vendor/Microsoft/IronPython-2.0.1/Lib/headstock/api/activity.py | mdavid/nuxleus | 653f1310d8bf08eaa5a7e3326c2349e56a6abdc2 | [
"BSD-3-Clause"
] | 1 | 2017-03-28T06:41:51.000Z | 2017-03-28T06:41:51.000Z | linux-distro/package/nuxleus/Source/Vendor/Microsoft/IronPython-2.0.1/Lib/headstock/api/activity.py | mdavid/nuxleus | 653f1310d8bf08eaa5a7e3326c2349e56a6abdc2 | [
"BSD-3-Clause"
] | null | null | null | linux-distro/package/nuxleus/Source/Vendor/Microsoft/IronPython-2.0.1/Lib/headstock/api/activity.py | mdavid/nuxleus | 653f1310d8bf08eaa5a7e3326c2349e56a6abdc2 | [
"BSD-3-Clause"
] | 1 | 2016-12-13T21:08:58.000Z | 2016-12-13T21:08:58.000Z | # -*- coding: utf-8 -*-
# supports for XEP 0012
__all__ = ['Activity']
from headstock.api import Entity
from headstock.api.jid import JID
from headstock.lib.utils import generate_unique
from bridge import Element as E
from bridge import Attribute as A
from bridge.common import XMPP_LAST_NS, XMPP_CLIENT_NS
class Ac... | 30.606061 | 73 | 0.578713 | 1,707 | 0.84505 | 0 | 0 | 1,265 | 0.626238 | 0 | 0 | 161 | 0.079703 |
d8aa39d9d29606bfc3d0bf3b107305b6d1c667aa | 3,406 | py | Python | metallic/metalearners/mbml/base.py | Renovamen/metallic | c3992e4b322f9d41d9b7997c472baf99c843046c | [
"MIT"
] | 5 | 2021-04-14T07:31:06.000Z | 2021-12-11T08:12:10.000Z | metallic/metalearners/mbml/base.py | Renovamen/metallic | c3992e4b322f9d41d9b7997c472baf99c843046c | [
"MIT"
] | 1 | 2021-04-14T07:44:36.000Z | 2021-04-15T14:01:52.000Z | metallic/metalearners/mbml/base.py | Renovamen/metallic | c3992e4b322f9d41d9b7997c472baf99c843046c | [
"MIT"
] | null | null | null | import os
from abc import ABC, abstractmethod
from typing import Callable, Optional, Tuple
import torch
from torch import nn, optim
from ..base import MetaLearner
class MBML(MetaLearner, ABC):
"""
A base class for metric-based meta-learning algorithms.
Parameters
----------
model : torch.nn.Modul... | 26.818898 | 75 | 0.579272 | 3,240 | 0.951262 | 0 | 0 | 654 | 0.192014 | 0 | 0 | 919 | 0.269818 |
d8aa62a69b511bd6fe8eb61dcb1de9e114c05f4a | 8,331 | py | Python | backend/app/settings.py | draihal/main-pr | 81814c5370b592963e91ad0683caa560b0ea9579 | [
"MIT"
] | 2 | 2021-01-28T08:23:15.000Z | 2021-03-09T06:06:58.000Z | backend/app/settings.py | draihal/main-pr | 81814c5370b592963e91ad0683caa560b0ea9579 | [
"MIT"
] | 9 | 2020-01-02T15:31:04.000Z | 2021-12-09T01:59:26.000Z | backend/app/settings.py | draihal/main-pr | 81814c5370b592963e91ad0683caa560b0ea9579 | [
"MIT"
] | 1 | 2021-03-09T06:11:16.000Z | 2021-03-09T06:11:16.000Z | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
from datetime im... | 31.79771 | 119 | 0.706638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,678 | 0.681387 |
d8aadfacb7f4de5abfc2dccb19ef5736e4d36538 | 593 | py | Python | python/sorting/group_0s_1s.py | amitsaha/playground | 82cb5ac02ac90d3fa858a5153b0a5705187c14ce | [
"Unlicense"
] | 4 | 2018-04-14T16:28:39.000Z | 2021-11-14T12:08:02.000Z | python/sorting/group_0s_1s.py | amitsaha/playground | 82cb5ac02ac90d3fa858a5153b0a5705187c14ce | [
"Unlicense"
] | 3 | 2022-02-14T10:38:51.000Z | 2022-02-27T16:01:16.000Z | python/sorting/group_0s_1s.py | amitsaha/playground | 82cb5ac02ac90d3fa858a5153b0a5705187c14ce | [
"Unlicense"
] | 4 | 2015-07-07T01:01:27.000Z | 2019-04-12T05:38:26.000Z | '''
Groups the 0s and 1s together from a random array
Reference: http://www.geeksforgeeks.org/segregate-0s-and-1s-in-an-array-by-traversing-array-once/
'''
from __future__ import print_function
def rearrange(arr):
p1 = 0
p2 = len(arr) - 1
while p1 < p2:
if arr[p1] == 0:
p1 += 1
... | 21.962963 | 97 | 0.548061 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.261383 |
d8ad33478b60fc223af35de65ba50412bd1bf355 | 3,039 | py | Python | GABClient/GAB.Client/wwwroot/ml/pipeline1/mu.py | intelequia/GAB2019ScienceLab.Client | 982bcfacc31c25201755eb2353aef2204923261b | [
"MIT"
] | null | null | null | GABClient/GAB.Client/wwwroot/ml/pipeline1/mu.py | intelequia/GAB2019ScienceLab.Client | 982bcfacc31c25201755eb2353aef2204923261b | [
"MIT"
] | null | null | null | GABClient/GAB.Client/wwwroot/ml/pipeline1/mu.py | intelequia/GAB2019ScienceLab.Client | 982bcfacc31c25201755eb2353aef2204923261b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from scipy.signal import savgol_filter
import sys
def Interpolate(time, mask, y):
yy = np.array(y)
t_ = np.delete(time, mask)
y_ = np.delete(y, mask, axis = 0)
if len(yy.shape) == 1:
yy[mask] = np.interp(time[mask], t_, y_)
e... | 29.504854 | 102 | 0.524844 | 0 | 0 | 329 | 0.108259 | 0 | 0 | 0 | 0 | 293 | 0.096413 |
d8ad658c4df19c485095900714b12cbc63dc40bd | 544 | py | Python | setup.py | farouk-muha/pav_bsc | f12e2365e97146d05a1e60f1a6112bb3e08295dd | [
"MIT"
] | null | null | null | setup.py | farouk-muha/pav_bsc | f12e2365e97146d05a1e60f1a6112bb3e08295dd | [
"MIT"
] | null | null | null | setup.py | farouk-muha/pav_bsc | f12e2365e97146d05a1e60f1a6112bb3e08295dd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('requirements.txt') as f:
install_requires = f.read().strip().split('\n')
# get version from __version__ variable in pav_bsc/__init__.py
from pav_bsc import __version__ as version
setup(
name='pav_bsc',
version=version,
description='Pa... | 25.904762 | 65 | 0.766544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.378676 |
d8adc735050a0fd5a61d2b42aa76a945a006c221 | 2,957 | py | Python | components/resnet-cmle/resnet/deploy.py | cbreuel/pipelines | 22a85b4af642b896b57293c0d15d0f20c995be99 | [
"Apache-2.0"
] | 9 | 2019-03-28T02:20:45.000Z | 2021-12-01T22:43:36.000Z | components/resnet-cmle/resnet/deploy.py | cbreuel/pipelines | 22a85b4af642b896b57293c0d15d0f20c995be99 | [
"Apache-2.0"
] | 2 | 2019-10-17T16:51:43.000Z | 2019-10-18T01:18:35.000Z | components/resnet-cmle/resnet/deploy.py | cbreuel/pipelines | 22a85b4af642b896b57293c0d15d0f20c995be99 | [
"Apache-2.0"
] | 4 | 2019-04-11T12:09:59.000Z | 2020-10-11T15:53:53.000Z | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 41.069444 | 131 | 0.600609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,261 | 0.426446 |
d8adf264910375ea507ebd88b7147dd9829ca904 | 3,506 | py | Python | tests/test_quickbooks_payroll.py | fulfilio/trytond-quickbooks-payroll | 18148e6f366025268b4335a89f07d2506ad5f446 | [
"BSD-3-Clause"
] | null | null | null | tests/test_quickbooks_payroll.py | fulfilio/trytond-quickbooks-payroll | 18148e6f366025268b4335a89f07d2506ad5f446 | [
"BSD-3-Clause"
] | null | null | null | tests/test_quickbooks_payroll.py | fulfilio/trytond-quickbooks-payroll | 18148e6f366025268b4335a89f07d2506ad5f446 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
tests/test_quickbooks_payroll.py
"""
import csv
import tempfile
class TestQuickBooksPayroll:
def test_views(self, install_module):
"Test all tryton views"
from trytond.tests.test_tryton import test_view
test_view('quickbooks_payroll')
def test_depend... | 31.303571 | 78 | 0.553622 | 3,406 | 0.971477 | 0 | 0 | 0 | 0 | 0 | 0 | 947 | 0.270108 |
d8aed52f5f4d4d6a14a346f71946749b037d0d84 | 4,284 | py | Python | general/cc12m.py | robvanvolt/DALLE-datasets | 527e54aeac879bc4da669fa5c5b64c9354890728 | [
"MIT"
] | 60 | 2021-05-09T02:51:10.000Z | 2022-03-27T06:36:04.000Z | general/cc12m.py | robvanvolt/DALLE-datasets | 527e54aeac879bc4da669fa5c5b64c9354890728 | [
"MIT"
] | 4 | 2021-07-07T21:24:33.000Z | 2021-11-17T21:54:17.000Z | general/cc12m.py | robvanvolt/DALLE-datasets | 527e54aeac879bc4da669fa5c5b64c9354890728 | [
"MIT"
] | 9 | 2021-05-20T14:38:59.000Z | 2022-02-18T11:51:20.000Z | import pandas as pd
import os
import requests
from pathlib import Path
from PIL import Image
from tqdm import tqdm
from multiprocessing import Pool
import gc
import glob
cc_url = 'https://storage.googleapis.com/conceptual_12m/cc12m.tsv'
root_folder = './'
total = 12423374
maxwidth = 256
maxheight = 256
thread_count = ... | 37.578947 | 137 | 0.635854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 719 | 0.167834 |
d8afbaf2b23594f1f8428b9469b3f739261f7278 | 518 | py | Python | jwtauthenticator/test_jwtauthenticator.py | YuanZhencai/jwtauthenticator | 0be5e45a3c63f479758ea2768035266d3de5ec41 | [
"Apache-2.0"
] | null | null | null | jwtauthenticator/test_jwtauthenticator.py | YuanZhencai/jwtauthenticator | 0be5e45a3c63f479758ea2768035266d3de5ec41 | [
"Apache-2.0"
] | null | null | null | jwtauthenticator/test_jwtauthenticator.py | YuanZhencai/jwtauthenticator | 0be5e45a3c63f479758ea2768035266d3de5ec41 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
from jose import jwt
class TestJSONWebTokenLoginHandler(TestCase):
def test_parse_jwt(self):
json_web_token = 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ5dWFuemhlbmNhaSIsImF1dGgiOiJST0xFX1VTRVIiLCJleHAiOjE1OTAyMjk5NTJ9.PcI6wGxXew-AASYqCKneUyW4ZUVHosgfE0qkWh0Y5pB4nNr1kneSC8yt8liJ31TSjhzt2VVA... | 37 | 207 | 0.835907 | 461 | 0.889961 | 0 | 0 | 0 | 0 | 0 | 0 | 253 | 0.488417 |
d8b00b965eee02af4b8f3676c77e8a154d98eecb | 5,707 | py | Python | src/itint/widget.py | ColorsWind/iTint | 48d18ed42d9ca44caa2c71104cf4f489fe54d98d | [
"MIT"
] | 1 | 2022-01-15T07:01:41.000Z | 2022-01-15T07:01:41.000Z | src/itint/widget.py | ColorsWind/iTint | 48d18ed42d9ca44caa2c71104cf4f489fe54d98d | [
"MIT"
] | null | null | null | src/itint/widget.py | ColorsWind/iTint | 48d18ed42d9ca44caa2c71104cf4f489fe54d98d | [
"MIT"
] | null | null | null | import numpy as np
from PySide2.QtCore import Qt, QUrl, QSize, QEventLoop
from PySide2.QtGui import QPixmap, QDropEvent, QDragEnterEvent, QMouseEvent, QResizeEvent, QHideEvent
from PySide2.QtWidgets import QApplication, QWidget, QHBoxLayout, QFileDialog, QWidgetItem
from itint.octree import Octree
from itint.ui_widge... | 39.909091 | 109 | 0.656913 | 5,198 | 0.906364 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.017611 |
d8b1c38d182c0ed927319fd435a35f4a6f89a701 | 162 | py | Python | saleor/webhook/observability/exceptions.py | DevPoke/saleor | ced3a2249a18031f9f593e71d1d18aa787ec1060 | [
"CC-BY-4.0"
] | null | null | null | saleor/webhook/observability/exceptions.py | DevPoke/saleor | ced3a2249a18031f9f593e71d1d18aa787ec1060 | [
"CC-BY-4.0"
] | null | null | null | saleor/webhook/observability/exceptions.py | DevPoke/saleor | ced3a2249a18031f9f593e71d1d18aa787ec1060 | [
"CC-BY-4.0"
] | null | null | null | class ObservabilityError(Exception):
pass
class ConnectionNotConfigured(ObservabilityError):
pass
class TruncationError(ObservabilityError):
pass
| 14.727273 | 50 | 0.790123 | 155 | 0.95679 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8b1d59e248305d321ae1893e6fe00d702a94519 | 4,480 | py | Python | public/PushPrices.py | efalken/OracleSwap | 4884cf06f809103a22e39486fcc83c0b956ca7f5 | [
"MIT"
] | 5 | 2020-03-11T07:18:36.000Z | 2020-09-14T23:57:21.000Z | public/PushPrices.py | efalken/OracleSwap | 4884cf06f809103a22e39486fcc83c0b956ca7f5 | [
"MIT"
] | null | null | null | public/PushPrices.py | efalken/OracleSwap | 4884cf06f809103a22e39486fcc83c0b956ca7f5 | [
"MIT"
] | 1 | 2020-08-18T00:01:46.000Z | 2020-08-18T00:01:46.000Z | import requests
from datetime import datetime, timedelta
import os
from pathlib import Path
from web3 import Web3, HTTPProvider
import time
import json
# put real private key and address here
wallet_private_key = "0x00000000000000000000000000000000"
wallet_address = "0x000000000000000000000000000000"
# put personal in... | 36.422764 | 114 | 0.707143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,084 | 0.241964 |
d8b41261c2c681fcdb62fde84ac5266ed078c65f | 816 | py | Python | hwtLib/examples/statements/constDriver_test.py | optical-o/hwtLib | edad621f5ad4cdbea20a5751ff4468979afe2f77 | [
"MIT"
] | null | null | null | hwtLib/examples/statements/constDriver_test.py | optical-o/hwtLib | edad621f5ad4cdbea20a5751ff4468979afe2f77 | [
"MIT"
] | null | null | null | hwtLib/examples/statements/constDriver_test.py | optical-o/hwtLib | edad621f5ad4cdbea20a5751ff4468979afe2f77 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from hwt.hdl.constants import Time
from hwt.simulator.simTestCase import SingleUnitSimTestCase
from hwtLib.examples.statements.constDriver import ConstDriverUnit
class ConstDriverTC(SingleUnitSimTestCase):
@classmethod
def getUnit(cls):
cls.u = ConstDri... | 26.322581 | 66 | 0.699755 | 342 | 0.419118 | 0 | 0 | 89 | 0.109069 | 0 | 0 | 104 | 0.127451 |
d8b43126c4341230aae3fa4c8b5aa73490e76164 | 356 | py | Python | uebung/bmi.py | wieerwill/Python-Intro | 6b6f1d8b1b5c95590ffe15b0b4ddf188b680b491 | [
"MIT"
] | 3 | 2019-03-02T16:34:53.000Z | 2021-11-15T11:43:53.000Z | uebung/bmi.py | wieerwill/Python-Intro | 6b6f1d8b1b5c95590ffe15b0b4ddf188b680b491 | [
"MIT"
] | null | null | null | uebung/bmi.py | wieerwill/Python-Intro | 6b6f1d8b1b5c95590ffe15b0b4ddf188b680b491 | [
"MIT"
] | null | null | null | # Calculate your Body-Mass-Index with Python
print("BMI - Calculator!")
weight_str = input("Please insert your weight (in kg): ")
height_str = input("Please insert your bodys height(in m): ")
weight = float(weight_str.replace(",", "."))
height = float(height_str.replace(",", "."))
bmi = weight / height ** 2
print("... | 29.666667 | 61 | 0.668539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.47191 |
d8b44009ab655e1119911f81cd812061c34aa19f | 491 | py | Python | tutorial_web_scraper.py | mariusciurea/webscraping-tutorials | 9fb53252c4cc08d5e2b8b0d46e67c2374e7c84c5 | [
"Unlicense"
] | null | null | null | tutorial_web_scraper.py | mariusciurea/webscraping-tutorials | 9fb53252c4cc08d5e2b8b0d46e67c2374e7c84c5 | [
"Unlicense"
] | null | null | null | tutorial_web_scraper.py | mariusciurea/webscraping-tutorials | 9fb53252c4cc08d5e2b8b0d46e67c2374e7c84c5 | [
"Unlicense"
] | null | null | null | import requests
from bs4 import BeautifulSoup
# with open('index.html', 'rb') as hf:
# soup = BeautifulSoup(hf, 'html.parser')
# print(soup.prettify())
# print(soup.head.title.text)
# print(soup.li.a.h2.text)
# print(soup.li.a.p.text)
source_code = requests.get('https://mariusciurea.github.io/links/')
... | 28.882353 | 83 | 0.684318 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 293 | 0.596741 |
d8b44da55092c3a84cde6a1b4d363471d58fc94a | 333 | py | Python | PBO_18126/tugas 3.1.py | nurhumairaabri21/PBO | 12bbc2e3ca408330ac5ff2e02492bfa56b21c3eb | [
"MIT"
] | null | null | null | PBO_18126/tugas 3.1.py | nurhumairaabri21/PBO | 12bbc2e3ca408330ac5ff2e02492bfa56b21c3eb | [
"MIT"
] | null | null | null | PBO_18126/tugas 3.1.py | nurhumairaabri21/PBO | 12bbc2e3ca408330ac5ff2e02492bfa56b21c3eb | [
"MIT"
] | null | null | null | #input--> berfungsi untuk menerima baris input dari user dan mengembalikan dalam bentuk string
#int--> berfungsi untuk menkonversi bilangan maupun string angka menjadi bilangan bulat
a=int(input("masukan nilai A: "))
b=int(input("masukan nilai B: "))
a +=3
print(a)
b -=10
print(b)
a *=4
print(a)
b *... | 19.588235 | 95 | 0.684685 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.663664 |
d8b5512902d4771f78aff0209b9c30789409995b | 21,636 | py | Python | tests/6_performance.py | Lucieno/SEAL-Python | 9be8f65e945f43de03669a6550c26de0b098326b | [
"MIT"
] | 3 | 2019-12-24T07:08:33.000Z | 2020-05-13T17:40:28.000Z | tests/6_performance.py | adi-ar/LogisticRegression_SEAL-Python | 047bcf7e2142bbdca178754de26cace4298c5936 | [
"MIT"
] | null | null | null | tests/6_performance.py | adi-ar/LogisticRegression_SEAL-Python | 047bcf7e2142bbdca178754de26cace4298c5936 | [
"MIT"
] | null | null | null | import time
import math
import random
from seal import *
from seal_helper import *
def rand_int():
return int(random.random()*(10**10))
def bfv_performance_test(context):
print_parameters(context)
parms = context.first_context_data().parms()
plain_modulus = parms.plain_modulus()
poly_modulus_de... | 36.921502 | 123 | 0.650259 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,978 | 0.230079 |
d8b7b5fb9877032f2872e9552bf777e9672ad149 | 452 | py | Python | semestr7/subd/model/client.py | ffedoroff/omgtu | 0cad61a2ce6a7c9bb5c9cac72c16eccf33bb4b77 | [
"MIT"
] | 1 | 2017-08-01T03:49:15.000Z | 2017-08-01T03:49:15.000Z | semestr7/subd/model/client.py | ffedoroff/omgtu | 0cad61a2ce6a7c9bb5c9cac72c16eccf33bb4b77 | [
"MIT"
] | null | null | null | semestr7/subd/model/client.py | ffedoroff/omgtu | 0cad61a2ce6a7c9bb5c9cac72c16eccf33bb4b77 | [
"MIT"
] | 4 | 2020-05-22T17:10:38.000Z | 2021-12-08T00:52:00.000Z | # -*- coding: utf-8 -*-
from django.db import models
from django.db.models import DateTimeField, GenericIPAddressField
class Client(models.Model):
class Meta:
app_label = "subd"
verbose_name = "Клиент"
verbose_name_plural = "Клиенты"
fio = models.CharField("ФИО", max_length=200)
... | 22.6 | 65 | 0.650442 | 346 | 0.739316 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.179487 |
d8ba6e17bc85f2ea591e7b78c0b6ba596ae2eb60 | 2,866 | py | Python | google_assist.py | eholic/dash-assistant | 97204e1402fbb742fb7838e995110a22ea814ab5 | [
"MIT"
] | null | null | null | google_assist.py | eholic/dash-assistant | 97204e1402fbb742fb7838e995110a22ea814ab5 | [
"MIT"
] | null | null | null | google_assist.py | eholic/dash-assistant | 97204e1402fbb742fb7838e995110a22ea814ab5 | [
"MIT"
] | null | null | null | import os
import sys
import requests
import logging
import json
import google.auth.transport.grpc
import google.auth.transport.requests
import google.oauth2.credentials
from google.assistant.embedded.v1alpha2 import (
embedded_assistant_pb2,
embedded_assistant_pb2_grpc
)
from config import Config
# Ref: htt... | 34.95122 | 135 | 0.665736 | 0 | 0 | 2,265 | 0.7903 | 0 | 0 | 0 | 0 | 320 | 0.111654 |
d8bab771f310012235c06cb7dfdf54237fe96981 | 125 | py | Python | src/pycrds/__init__.py | lokamigauti/metroclima-crds | 70ad9d13810ed551deba1363e475e6a7271f3af1 | [
"BSD-3-Clause"
] | null | null | null | src/pycrds/__init__.py | lokamigauti/metroclima-crds | 70ad9d13810ed551deba1363e475e6a7271f3af1 | [
"BSD-3-Clause"
] | null | null | null | src/pycrds/__init__.py | lokamigauti/metroclima-crds | 70ad9d13810ed551deba1363e475e6a7271f3af1 | [
"BSD-3-Clause"
] | null | null | null | __all__ = ["datafile", "flags", "graphs"]
for module in __all__:
__import__(__name__ + "." + module, globals(), locals()) | 41.666667 | 60 | 0.648 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.224 |
d8bbf917cb0bbef6cac30c8d90613ab18336f8eb | 2,145 | py | Python | d3d/box/__init__.py | minghanz/d3d | 1d08013238b300489f61be57cdd20a105d16a632 | [
"MIT"
] | null | null | null | d3d/box/__init__.py | minghanz/d3d | 1d08013238b300489f61be57cdd20a105d16a632 | [
"MIT"
] | null | null | null | d3d/box/__init__.py | minghanz/d3d | 1d08013238b300489f61be57cdd20a105d16a632 | [
"MIT"
] | null | null | null | import torch
from .box_impl import (
iou2d as iou2d_cc, iou2d_cuda,
nms2d as nms2d_cc, nms2d_cuda,
rbox_2d_crop as rbox_2d_crop_cc,
IouType, SupressionType)
def box2d_iou(boxes1, boxes2, method="box"):
'''
:param method: 'box' - normal box, 'rbox' - rotated box
'''
if len(boxes1.shape) ... | 34.047619 | 175 | 0.673193 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 740 | 0.344988 |
d8bd67134893a262683665a0dbc9878a51447c79 | 15,809 | py | Python | menu.py | Jasonlmx/Touhou-Star-Salvation | a8804450625957af7b81d0075873a68708374db8 | [
"MIT"
] | 4 | 2021-10-15T13:18:43.000Z | 2022-03-05T10:49:47.000Z | menu.py | Jasonlmx/Touhou-Star-Salvation | a8804450625957af7b81d0075873a68708374db8 | [
"MIT"
] | null | null | null | menu.py | Jasonlmx/Touhou-Star-Salvation | a8804450625957af7b81d0075873a68708374db8 | [
"MIT"
] | 1 | 2021-11-29T04:17:32.000Z | 2021-11-29T04:17:32.000Z | import pygame,sys
import random
import math
from pygame.locals import *
from pygame.sprite import Group
import gF
import Bullet
import DADcharacter
import Slave
import global_var
import Effect
import Item
import gameRule
class titleStar(pygame.sprite.Sprite):
def __init__(self):
super(titleStar,self).__in... | 42.727027 | 161 | 0.567651 | 15,693 | 0.985679 | 0 | 0 | 0 | 0 | 0 | 0 | 1,225 | 0.076942 |